; LLVM IR from tangjz/acm-icpc :: codeforces/gym (101234D)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@e = external dso_local global [100001 x %"class.std::vector"], align 16
@ans = external dso_local global [100001 x i64], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7initFFTi(i32 noundef) #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 void @_Z8dfs_treei(i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %27, %0
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %30

19:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %4, ptr noundef %5)
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %22
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %25
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %27

27:                                               ; preds = %19
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %3, align 4, !tbaa !5
  br label %14, !llvm.loop !9

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

31:                                               ; preds = %38, %30
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = add nsw i32 %33, %34
  %36 = icmp slt i32 %32, %35
  br i1 %36, label %37, label %41

37:                                               ; preds = %31
  br label %38

38:                                               ; preds = %37
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = shl i32 %39, 1
  store i32 %40, ptr %6, align 4, !tbaa !5
  br label %31, !llvm.loop !11

41:                                               ; preds = %31
  %42 = load i32, ptr %6, align 4, !tbaa !5
  call void @_Z7initFFTi(i32 noundef %42)
  call void @_Z8dfs_treei(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %82, %41
  %44 = load i32, ptr %8, align 4, !tbaa !5
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %85

48:                                               ; preds = %43
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !12
  %53 = icmp slt i64 %52, 1000000007
  br i1 %53, label %54, label %59

54:                                               ; preds = %48
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !12
  br label %65

59:                                               ; preds = %48
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %61
  %63 = load i64, ptr %62, align 8, !tbaa !12
  %64 = srem i64 %63, 1000000007
  br label %65

65:                                               ; preds = %59, %54
  %66 = phi i64 [ %58, %54 ], [ %64, %59 ]
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = mul nsw i64 %66, %68
  %70 = srem i64 %69, 1000000007
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %72
  store i64 %70, ptr %73, align 8, !tbaa !12
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = add nsw i64 %77, 1
  %79 = mul nsw i64 %75, %78
  %80 = srem i64 %79, 1000000007
  %81 = trunc i64 %80 to i32
  store i32 %81, ptr %9, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %65
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %8, align 4, !tbaa !5
  br label %43, !llvm.loop !14

85:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %86 = load i32, ptr %2, align 4, !tbaa !5
  %87 = sub nsw i32 %86, 1
  store i32 %87, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %112, %85
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = icmp sge i32 %89, 0
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %115

92:                                               ; preds = %88
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !12
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = mul nsw i64 %96, %98
  %100 = srem i64 %99, 1000000007
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %102
  store i64 %100, ptr %103, align 8, !tbaa !12
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = load i32, ptr %10, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = add nsw i64 %107, 1
  %109 = mul nsw i64 %105, %108
  %110 = srem i64 %109, 1000000007
  %111 = trunc i64 %110 to i32
  store i32 %111, ptr %11, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %92
  %113 = load i32, ptr %10, align 4, !tbaa !5
  %114 = add nsw i32 %113, -1
  store i32 %114, ptr %10, align 4, !tbaa !5
  br label %88, !llvm.loop !15

115:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %137, %115
  %117 = load i32, ptr %12, align 4, !tbaa !5
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %140

121:                                              ; preds = %116
  %122 = load i32, ptr %12, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %123
  %125 = load i64, ptr %124, align 8, !tbaa !12
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = add nsw i64 %127, %125
  %129 = trunc i64 %128 to i32
  store i32 %129, ptr %7, align 4, !tbaa !5
  %130 = icmp sge i32 %129, 1000000007
  br i1 %130, label %131, label %135

131:                                              ; preds = %121
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = sub nsw i32 %132, 1000000007
  store i32 %133, ptr %7, align 4, !tbaa !5
  %134 = icmp ne i32 %133, 0
  br label %135

135:                                              ; preds = %131, %121
  %136 = phi i1 [ false, %121 ], [ %134, %131 ]
  br label %137

137:                                              ; preds = %135
  %138 = load i32, ptr %12, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %12, align 4, !tbaa !5
  br label %116, !llvm.loop !16

140:                                              ; preds = %120
  %141 = load i32, ptr %7, align 4, !tbaa !5
  %142 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %141)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

declare i32 @printf(ptr noundef, ...) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@e = external dso_local global [100001 x %"class.std::vector"], align 16
@ans = external dso_local local_unnamed_addr global [100001 x i64], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7initFFTi(i32 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) #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 void @_Z8dfs_treei(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 1
  br i1 %6, label %.lr.ph, label %.preheader40

.preheader40:                                     ; preds = %.lr.ph, %0
  %.lcssa41 = phi i32 [ %5, %0 ], [ %16, %.lr.ph ]
  %7 = shl nsw i32 %.lcssa41, 1
  br label %18

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.03342 = phi i32 [ %15, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %10
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @e, i64 0, i64 %13
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %15 = add nuw nsw i32 %.03342, 1
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %.lr.ph, label %.preheader40, !llvm.loop !9

18:                                               ; preds = %18, %.preheader40
  %.032 = phi i32 [ %20, %18 ], [ 1, %.preheader40 ]
  %19 = icmp slt i32 %.032, %7
  %20 = shl i32 %.032, 1
  br i1 %19, label %18, label %21, !llvm.loop !11

21:                                               ; preds = %18
  call void @_Z7initFFTi(i32 noundef %.032)
  call void @_Z8dfs_treei(i32 noundef 1)
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph45.preheader, label %._crit_edge

.lr.ph45.preheader:                               ; preds = %21
  %wide.trip.count = zext nneg i32 %22 to i64
  br label %.lr.ph45

.preheader39:                                     ; preds = %.lr.ph45
  br i1 %23, label %.lr.ph49.preheader, label %._crit_edge

.lr.ph49.preheader:                               ; preds = %.preheader39
  %24 = zext nneg i32 %22 to i64
  br label %.lr.ph49

.lr.ph45:                                         ; preds = %.lr.ph45.preheader, %.lr.ph45
  %indvars.iv = phi i64 [ 0, %.lr.ph45.preheader ], [ %32, %.lr.ph45 ]
  %.02944 = phi i64 [ 1, %.lr.ph45.preheader ], [ %34, %.lr.ph45 ]
  %25 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %indvars.iv
  %26 = load i64, ptr %25, align 8, !tbaa !12
  %27 = icmp slt i64 %26, 1000000007
  %28 = urem i64 %26, 1000000007
  %29 = select i1 %27, i64 %26, i64 %28
  %30 = mul nsw i64 %29, %.02944
  %31 = srem i64 %30, 1000000007
  store i64 %31, ptr %25, align 8, !tbaa !12
  %32 = add nuw nsw i64 %indvars.iv, 1
  %33 = mul nsw i64 %32, %.02944
  %34 = srem i64 %33, 1000000007
  %exitcond.not = icmp eq i64 %32, %wide.trip.count
  br i1 %exitcond.not, label %.preheader39, label %.lr.ph45, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph49
  br i1 %23, label %.lr.ph52.preheader, label %._crit_edge

.lr.ph52.preheader:                               ; preds = %.preheader
  %xtraiter = and i64 %wide.trip.count, 3
  %35 = icmp ult i32 %22, 4
  br i1 %35, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph52.preheader.new

.lr.ph52.preheader.new:                           ; preds = %.lr.ph52.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph52

.lr.ph49:                                         ; preds = %.lr.ph49.preheader, %.lr.ph49
  %indvars.iv55 = phi i64 [ %24, %.lr.ph49.preheader ], [ %indvars.iv.next56, %.lr.ph49 ]
  %.02748 = phi i64 [ 1, %.lr.ph49.preheader ], [ %41, %.lr.ph49 ]
  %indvars.iv.next56 = add nsw i64 %indvars.iv55, -1
  %36 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %indvars.iv.next56
  %37 = load i64, ptr %36, align 8, !tbaa !12
  %38 = mul nsw i64 %37, %.02748
  %39 = srem i64 %38, 1000000007
  store i64 %39, ptr %36, align 8, !tbaa !12
  %40 = mul nuw nsw i64 %.02748, %indvars.iv55
  %41 = urem i64 %40, 1000000007
  %42 = icmp ugt i64 %indvars.iv55, 1
  br i1 %42, label %.lr.ph49, label %.preheader, !llvm.loop !15

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph52, %.lr.ph52.preheader
  %spec.select.lcssa.ph = phi i32 [ poison, %.lr.ph52.preheader ], [ %spec.select.3, %.lr.ph52 ]
  %indvars.iv58.unr = phi i64 [ 0, %.lr.ph52.preheader ], [ %indvars.iv.next59.3, %.lr.ph52 ]
  %.03150.unr = phi i32 [ 0, %.lr.ph52.preheader ], [ %spec.select.3, %.lr.ph52 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph52.epil

.lr.ph52.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph52.epil
  %indvars.iv58.epil = phi i64 [ %indvars.iv.next59.epil, %.lr.ph52.epil ], [ %indvars.iv58.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.03150.epil = phi i32 [ %spec.select.epil, %.lr.ph52.epil ], [ %.03150.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph52.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %43 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %indvars.iv58.epil
  %44 = load i64, ptr %43, align 8, !tbaa !12
  %45 = trunc i64 %44 to i32
  %46 = add i32 %.03150.epil, %45
  %47 = icmp sgt i32 %46, 1000000006
  %48 = add nsw i32 %46, -1000000007
  %spec.select.epil = select i1 %47, i32 %48, i32 %46
  %indvars.iv.next59.epil = add nuw nsw i64 %indvars.iv58.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph52.epil, !llvm.loop !16

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph52.epil, %21, %.preheader39, %.preheader
  %.031.lcssa = phi i32 [ 0, %.preheader ], [ 0, %.preheader39 ], [ 0, %21 ], [ %spec.select.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %spec.select.epil, %.lr.ph52.epil ]
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %.031.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0

.lr.ph52:                                         ; preds = %.lr.ph52, %.lr.ph52.preheader.new
  %indvars.iv58 = phi i64 [ 0, %.lr.ph52.preheader.new ], [ %indvars.iv.next59.3, %.lr.ph52 ]
  %.03150 = phi i32 [ 0, %.lr.ph52.preheader.new ], [ %spec.select.3, %.lr.ph52 ]
  %niter = phi i64 [ 0, %.lr.ph52.preheader.new ], [ %niter.next.3, %.lr.ph52 ]
  %50 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %indvars.iv58
  %51 = load i64, ptr %50, align 16, !tbaa !12
  %52 = trunc i64 %51 to i32
  %53 = add i32 %.03150, %52
  %54 = icmp sgt i32 %53, 1000000006
  %55 = add nsw i32 %53, -1000000007
  %spec.select = select i1 %54, i32 %55, i32 %53
  %indvars.iv.next59 = or disjoint i64 %indvars.iv58, 1
  %56 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %indvars.iv.next59
  %57 = load i64, ptr %56, align 8, !tbaa !12
  %58 = trunc i64 %57 to i32
  %59 = add i32 %spec.select, %58
  %60 = icmp sgt i32 %59, 1000000006
  %61 = add nsw i32 %59, -1000000007
  %spec.select.1 = select i1 %60, i32 %61, i32 %59
  %indvars.iv.next59.1 = or disjoint i64 %indvars.iv58, 2
  %62 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %indvars.iv.next59.1
  %63 = load i64, ptr %62, align 16, !tbaa !12
  %64 = trunc i64 %63 to i32
  %65 = add i32 %spec.select.1, %64
  %66 = icmp sgt i32 %65, 1000000006
  %67 = add nsw i32 %65, -1000000007
  %spec.select.2 = select i1 %66, i32 %67, i32 %65
  %indvars.iv.next59.2 = or disjoint i64 %indvars.iv58, 3
  %68 = getelementptr inbounds [100001 x i64], ptr @ans, i64 0, i64 %indvars.iv.next59.2
  %69 = load i64, ptr %68, align 8, !tbaa !12
  %70 = trunc i64 %69 to i32
  %71 = add i32 %spec.select.2, %70
  %72 = icmp sgt i32 %71, 1000000006
  %73 = add nsw i32 %71, -1000000007
  %spec.select.3 = select i1 %72, i32 %73, i32 %71
  %indvars.iv.next59.3 = add nuw nsw i64 %indvars.iv58, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph52, !llvm.loop !18
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nofree nounwind "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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = distinct !{!18, !10}


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