; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/0723_ARC058 (E2)

; 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" }

@N = external dso_local global i32, align 4
@X = external dso_local global i32, align 4
@Y = external dso_local global i32, align 4
@Z = external dso_local global i32, align 4
@haiku = external dso_local global i32, align 4
@dp = external dso_local global [50 x [131071 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 uwtable
declare dso_local noundef i64 @_Z5powerxx(i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7ishaikui(i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @_Z4initv()
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) @X)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) @Y)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @Z)
  store i32 0, ptr @haiku, align 4, !tbaa !5
  %15 = load i32, ptr @X, align 4, !tbaa !5
  %16 = load i32, ptr @Y, align 4, !tbaa !5
  %17 = add nsw i32 %15, %16
  %18 = load i32, ptr @Z, align 4, !tbaa !5
  %19 = add nsw i32 %17, %18
  %20 = sub nsw i32 %19, 1
  %21 = shl i32 1, %20
  %22 = load i32, ptr @haiku, align 4, !tbaa !5
  %23 = add nsw i32 %22, %21
  store i32 %23, ptr @haiku, align 4, !tbaa !5
  %24 = load i32, ptr @Y, align 4, !tbaa !5
  %25 = load i32, ptr @Z, align 4, !tbaa !5
  %26 = add nsw i32 %24, %25
  %27 = sub nsw i32 %26, 1
  %28 = shl i32 1, %27
  %29 = load i32, ptr @haiku, align 4, !tbaa !5
  %30 = add nsw i32 %29, %28
  store i32 %30, ptr @haiku, align 4, !tbaa !5
  %31 = load i32, ptr @Z, align 4, !tbaa !5
  %32 = sub nsw i32 %31, 1
  %33 = shl i32 1, %32
  %34 = load i32, ptr @haiku, align 4, !tbaa !5
  %35 = add nsw i32 %34, %33
  store i32 %35, ptr @haiku, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @dp, ptr noundef getelementptr inbounds (i64, ptr @dp, i64 6553550), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  store i64 1, ptr @dp, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %107, %0
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = load i32, ptr @N, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %110

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %103, %41
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = icmp slt i32 %43, 131071
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %106

46:                                               ; preds = %42
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %48
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [131071 x i64], ptr %49, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = icmp eq i64 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %46
  br label %103

56:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %99, %56
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = icmp sle i32 %58, 10
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %102

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = shl i32 %62, %63
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = sub nsw i32 %65, 1
  %67 = shl i32 1, %66
  %68 = add nsw i32 %64, %67
  %69 = and i32 %68, 131071
  store i32 %69, ptr %7, align 4, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %70)
  br i1 %71, label %98, label %72

72:                                               ; preds = %61
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %74
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [131071 x i64], ptr %75, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = load i32, ptr %3, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %82
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [131071 x i64], ptr %83, i64 0, i64 %85
  %87 = load i64, ptr %86, align 8, !tbaa !9
  %88 = add nsw i64 %87, %79
  store i64 %88, ptr %86, align 8, !tbaa !9
  %89 = load i32, ptr %3, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %91
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [131071 x i64], ptr %92, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !9
  %97 = srem i64 %96, 1000000007
  store i64 %97, ptr %95, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %72, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %6, align 4, !tbaa !5
  br label %57, !llvm.loop !11

102:                                              ; preds = %60
  br label %103

103:                                              ; preds = %102, %55
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %5, align 4, !tbaa !5
  br label %42, !llvm.loop !13

106:                                              ; preds = %45
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %3, align 4, !tbaa !5
  br label %36, !llvm.loop !14

110:                                              ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %127, %110
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = icmp slt i32 %112, 131071
  br i1 %113, label %115, label %114

114:                                              ; preds = %111
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %130

115:                                              ; preds = %111
  %116 = load i32, ptr @N, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %117
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [131071 x i64], ptr %118, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = load i64, ptr %8, align 8, !tbaa !9
  %124 = add nsw i64 %123, %122
  store i64 %124, ptr %8, align 8, !tbaa !9
  %125 = load i64, ptr %8, align 8, !tbaa !9
  %126 = srem i64 %125, 1000000007
  store i64 %126, ptr %8, align 8, !tbaa !9
  br label %127

127:                                              ; preds = %115
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %9, align 4, !tbaa !5
  br label %111, !llvm.loop !15

130:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %131 = load i32, ptr @N, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = call noundef i64 @_Z5powerxx(i64 noundef 10, i64 noundef %132)
  %134 = load i64, ptr %8, align 8, !tbaa !9
  %135 = sub nsw i64 1000000007, %134
  %136 = add nsw i64 %133, %135
  %137 = srem i64 %136, 1000000007
  store i64 %137, ptr %10, align 8, !tbaa !9
  %138 = load i64, ptr %10, align 8, !tbaa !9
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %138)
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %141 = load i32, ptr %1, align 4
  ret i32 %141
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #5

; 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)) #5

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 = { "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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@X = external dso_local global i32, align 4
@Y = external dso_local global i32, align 4
@Z = external dso_local global i32, align 4
@haiku = external dso_local local_unnamed_addr global i32, align 4
@dp = external dso_local global [50 x [131071 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z7ishaikui(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  tail call void @_Z4initv()
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @X)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) @Y)
  %5 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) @Z)
  %6 = load i32, ptr @X, align 4, !tbaa !5
  %7 = load i32, ptr @Y, align 4, !tbaa !5
  %8 = load i32, ptr @Z, align 4, !tbaa !5
  %9 = add i32 %8, -1
  %10 = add i32 %9, %6
  %11 = add i32 %10, %7
  %12 = shl nuw i32 1, %11
  %13 = add i32 %9, %7
  %14 = shl nuw i32 1, %13
  %15 = shl nuw i32 1, %9
  %16 = add i32 %14, %15
  %17 = add i32 %16, %12
  store i32 %17, ptr @haiku, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @dp, ptr noundef nonnull getelementptr inbounds (i8, ptr @dp, i64 52428400), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  store i64 1, ptr @dp, align 16, !tbaa !9
  %18 = load i32, ptr @N, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.preheader31, label %..preheader_crit_edge

..preheader_crit_edge:                            ; preds = %0
  %.pre = sext i32 %18 to i64
  br label %.preheader

.preheader31:                                     ; preds = %0, %20
  %indvars.iv41 = phi i64 [ %indvars.iv.next42, %20 ], [ 0, %0 ]
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  br label %24

.preheader:                                       ; preds = %20, %..preheader_crit_edge
  %.pre-phi = phi i64 [ %.pre, %..preheader_crit_edge ], [ %22, %20 ]
  br label %144

20:                                               ; preds = %.loopexit
  %21 = load i32, ptr @N, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next42, %22
  br i1 %23, label %.preheader31, label %.preheader, !llvm.loop !11

24:                                               ; preds = %.preheader31, %.loopexit
  %indvars.iv = phi i64 [ 0, %.preheader31 ], [ %indvars.iv.next, %.loopexit ]
  %25 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv41, i64 %indvars.iv
  %26 = load i64, ptr %25, align 8, !tbaa !9
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %.loopexit, label %.preheader30.preheader

.preheader30.preheader:                           ; preds = %24
  %indvars.iv.tr = trunc i64 %indvars.iv to i32
  %28 = shl i32 %indvars.iv.tr, 1
  %29 = and i32 %28, 131070
  %30 = or disjoint i32 %29, 1
  %31 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %30)
  br i1 %31, label %.preheader30.1, label %32

32:                                               ; preds = %.preheader30.preheader
  %33 = load i64, ptr %25, align 8, !tbaa !9
  %34 = zext nneg i32 %30 to i64
  %35 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = add nsw i64 %36, %33
  %38 = srem i64 %37, 1000000007
  store i64 %38, ptr %35, align 8, !tbaa !9
  br label %.preheader30.1

.preheader30.1:                                   ; preds = %32, %.preheader30.preheader
  %indvars.iv.tr48 = trunc i64 %indvars.iv to i32
  %39 = shl i32 %indvars.iv.tr48, 2
  %40 = and i32 %39, 131068
  %41 = or disjoint i32 %40, 2
  %42 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %41)
  br i1 %42, label %.preheader30.2, label %43

43:                                               ; preds = %.preheader30.1
  %44 = load i64, ptr %25, align 8, !tbaa !9
  %45 = zext nneg i32 %41 to i64
  %46 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !9
  %48 = add nsw i64 %47, %44
  %49 = srem i64 %48, 1000000007
  store i64 %49, ptr %46, align 8, !tbaa !9
  br label %.preheader30.2

.preheader30.2:                                   ; preds = %43, %.preheader30.1
  %indvars.iv.tr49 = trunc i64 %indvars.iv to i32
  %50 = shl i32 %indvars.iv.tr49, 3
  %51 = and i32 %50, 131064
  %52 = or disjoint i32 %51, 4
  %53 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %52)
  br i1 %53, label %.preheader30.3, label %54

54:                                               ; preds = %.preheader30.2
  %55 = load i64, ptr %25, align 8, !tbaa !9
  %56 = zext nneg i32 %52 to i64
  %57 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = add nsw i64 %58, %55
  %60 = srem i64 %59, 1000000007
  store i64 %60, ptr %57, align 8, !tbaa !9
  br label %.preheader30.3

.preheader30.3:                                   ; preds = %54, %.preheader30.2
  %indvars.iv.tr50 = trunc i64 %indvars.iv to i32
  %61 = shl i32 %indvars.iv.tr50, 4
  %62 = and i32 %61, 131056
  %63 = or disjoint i32 %62, 8
  %64 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %63)
  br i1 %64, label %.preheader30.4, label %65

65:                                               ; preds = %.preheader30.3
  %66 = load i64, ptr %25, align 8, !tbaa !9
  %67 = zext nneg i32 %63 to i64
  %68 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !9
  %70 = add nsw i64 %69, %66
  %71 = srem i64 %70, 1000000007
  store i64 %71, ptr %68, align 8, !tbaa !9
  br label %.preheader30.4

.preheader30.4:                                   ; preds = %65, %.preheader30.3
  %indvars.iv.tr51 = trunc i64 %indvars.iv to i32
  %72 = shl i32 %indvars.iv.tr51, 5
  %73 = and i32 %72, 131040
  %74 = or disjoint i32 %73, 16
  %75 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %74)
  br i1 %75, label %.preheader30.5, label %76

76:                                               ; preds = %.preheader30.4
  %77 = load i64, ptr %25, align 8, !tbaa !9
  %78 = zext nneg i32 %74 to i64
  %79 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !9
  %81 = add nsw i64 %80, %77
  %82 = srem i64 %81, 1000000007
  store i64 %82, ptr %79, align 8, !tbaa !9
  br label %.preheader30.5

.preheader30.5:                                   ; preds = %76, %.preheader30.4
  %indvars.iv.tr52 = trunc i64 %indvars.iv to i32
  %83 = shl i32 %indvars.iv.tr52, 6
  %84 = and i32 %83, 131008
  %85 = or disjoint i32 %84, 32
  %86 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %85)
  br i1 %86, label %.preheader30.6, label %87

87:                                               ; preds = %.preheader30.5
  %88 = load i64, ptr %25, align 8, !tbaa !9
  %89 = zext nneg i32 %85 to i64
  %90 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !9
  %92 = add nsw i64 %91, %88
  %93 = srem i64 %92, 1000000007
  store i64 %93, ptr %90, align 8, !tbaa !9
  br label %.preheader30.6

.preheader30.6:                                   ; preds = %87, %.preheader30.5
  %indvars.iv.tr53 = trunc i64 %indvars.iv to i32
  %94 = shl i32 %indvars.iv.tr53, 7
  %95 = and i32 %94, 130944
  %96 = or disjoint i32 %95, 64
  %97 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %96)
  br i1 %97, label %.preheader30.7, label %98

98:                                               ; preds = %.preheader30.6
  %99 = load i64, ptr %25, align 8, !tbaa !9
  %100 = zext nneg i32 %96 to i64
  %101 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !9
  %103 = add nsw i64 %102, %99
  %104 = srem i64 %103, 1000000007
  store i64 %104, ptr %101, align 8, !tbaa !9
  br label %.preheader30.7

.preheader30.7:                                   ; preds = %98, %.preheader30.6
  %indvars.iv.tr54 = trunc i64 %indvars.iv to i32
  %105 = shl i32 %indvars.iv.tr54, 8
  %106 = and i32 %105, 130816
  %107 = or disjoint i32 %106, 128
  %108 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %107)
  br i1 %108, label %.preheader30.8, label %109

109:                                              ; preds = %.preheader30.7
  %110 = load i64, ptr %25, align 8, !tbaa !9
  %111 = zext nneg i32 %107 to i64
  %112 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !9
  %114 = add nsw i64 %113, %110
  %115 = srem i64 %114, 1000000007
  store i64 %115, ptr %112, align 8, !tbaa !9
  br label %.preheader30.8

.preheader30.8:                                   ; preds = %109, %.preheader30.7
  %indvars.iv.tr55 = trunc i64 %indvars.iv to i32
  %116 = shl i32 %indvars.iv.tr55, 9
  %117 = and i32 %116, 130560
  %118 = or disjoint i32 %117, 256
  %119 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %118)
  br i1 %119, label %.preheader30.9, label %120

120:                                              ; preds = %.preheader30.8
  %121 = load i64, ptr %25, align 8, !tbaa !9
  %122 = zext nneg i32 %118 to i64
  %123 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !9
  %125 = add nsw i64 %124, %121
  %126 = srem i64 %125, 1000000007
  store i64 %126, ptr %123, align 8, !tbaa !9
  br label %.preheader30.9

.preheader30.9:                                   ; preds = %120, %.preheader30.8
  %indvars.iv.tr56 = trunc i64 %indvars.iv to i32
  %127 = shl i32 %indvars.iv.tr56, 10
  %128 = and i32 %127, 130048
  %129 = or disjoint i32 %128, 512
  %130 = call noundef zeroext i1 @_Z7ishaikui(i32 noundef %129)
  br i1 %130, label %.loopexit, label %131

131:                                              ; preds = %.preheader30.9
  %132 = load i64, ptr %25, align 8, !tbaa !9
  %133 = zext nneg i32 %129 to i64
  %134 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %indvars.iv.next42, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !9
  %136 = add nsw i64 %135, %132
  %137 = srem i64 %136, 1000000007
  store i64 %137, ptr %134, align 8, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader30.9, %131, %24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 131071
  br i1 %exitcond.not, label %20, label %24, !llvm.loop !13

138:                                              ; preds = %144
  %139 = call noundef i64 @_Z5powerxx(i64 noundef 10, i64 noundef %.pre-phi)
  %reass.sub37 = sub i64 %139, %148
  %140 = add i64 %reass.sub37, 1000000007
  %141 = srem i64 %140, 1000000007
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %141)
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

144:                                              ; preds = %149, %.preheader
  %indvars.iv44 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next45.1, %149 ]
  %.02735 = phi i64 [ 0, %.preheader ], [ %153, %149 ]
  %145 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %.pre-phi, i64 %indvars.iv44
  %146 = load i64, ptr %145, align 8, !tbaa !9
  %147 = add nsw i64 %146, %.02735
  %148 = srem i64 %147, 1000000007
  %exitcond47.not = icmp eq i64 %indvars.iv44, 131070
  br i1 %exitcond47.not, label %138, label %149, !llvm.loop !14

149:                                              ; preds = %144
  %indvars.iv.next45 = or disjoint i64 %indvars.iv44, 1
  %150 = getelementptr inbounds [50 x [131071 x i64]], ptr @dp, i64 0, i64 %.pre-phi, i64 %indvars.iv.next45
  %151 = load i64, ptr %150, align 8, !tbaa !9
  %152 = add nsw i64 %151, %148
  %153 = srem i64 %152, 1000000007
  %indvars.iv.next45.1 = add nuw nsw i64 %indvars.iv44, 2
  br label %144
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; 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 #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) local_unnamed_addr #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)) #5

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 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 = { "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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass