; LLVM IR from tangjz/acm-icpc :: self_training/2015-09-22 (I)

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

@n = external dso_local global i32, align 4
@seq = external dso_local global [55 x i32], align 16
@now = external dso_local global [55 x i64], align 16
@nxt = external dso_local global [55 x i64], align 16
@last = external dso_local global i64, align 8
@ans = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %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
  store i32 0, ptr %1, align 4
  br label %8

8:                                                ; preds = %116, %0
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %11, label %119

11:                                               ; preds = %8
  store i64 0, ptr @now, align 16, !tbaa !5
  store i64 0, ptr @ans, align 8, !tbaa !5
  store i64 1, ptr @last, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %12

12:                                               ; preds = %22, %11
  %13 = load i32, ptr %2, align 4, !tbaa !9
  %14 = load i32, ptr @n, align 4, !tbaa !9
  %15 = icmp sle i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %25

17:                                               ; preds = %12
  %18 = load i32, ptr %2, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds i32, ptr @seq, i64 %19
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %20)
  br label %22

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !9
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %2, align 4, !tbaa !9
  br label %12, !llvm.loop !11

25:                                               ; preds = %16
  %26 = load i32, ptr @n, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i32, ptr @seq, i64 %27
  %29 = getelementptr inbounds i32, ptr %28, i64 1
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef getelementptr inbounds (i32, ptr @seq, i64 1), ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %30 = load i32, ptr @n, align 4, !tbaa !9
  store i32 %30, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %31 = load i32, ptr @n, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [55 x i32], ptr @seq, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !9
  store i32 %34, ptr %4, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %113, %25
  %36 = load i32, ptr %4, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 7, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %116

39:                                               ; preds = %35
  br label %40

40:                                               ; preds = %60, %39
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = icmp sge i32 %41, 0
  br i1 %42, label %43, label %50

43:                                               ; preds = %40
  %44 = load i32, ptr %3, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [55 x i32], ptr @seq, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = load i32, ptr %4, align 4, !tbaa !9
  %49 = icmp eq i32 %47, %48
  br label %50

50:                                               ; preds = %43, %40
  %51 = phi i1 [ false, %40 ], [ %49, %43 ]
  br i1 %51, label %52, label %63

52:                                               ; preds = %50
  %53 = load i64, ptr @last, align 8, !tbaa !5
  %54 = load i64, ptr @now, align 16, !tbaa !5
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr @now, align 16, !tbaa !5
  %56 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %55
  store i64 %53, ptr %56, align 8, !tbaa !5
  %57 = load i64, ptr @last, align 8, !tbaa !5
  %58 = load i64, ptr @ans, align 8, !tbaa !5
  %59 = add nsw i64 %58, %57
  store i64 %59, ptr @ans, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %52
  %61 = load i32, ptr %3, align 4, !tbaa !9
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr %3, align 4, !tbaa !9
  br label %40, !llvm.loop !13

63:                                               ; preds = %50
  %64 = load i64, ptr @now, align 16, !tbaa !5
  %65 = getelementptr inbounds i64, ptr @now, i64 %64
  %66 = getelementptr inbounds i64, ptr %65, i64 1
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef getelementptr inbounds (i64, ptr @now, i64 1), ptr noundef %66)
  store i64 0, ptr @nxt, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %87, %63
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = load i64, ptr @now, align 16, !tbaa !5
  %71 = icmp sle i64 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %67
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %90

73:                                               ; preds = %67
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %75
  %77 = load i64, ptr %76, align 8, !tbaa !5
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !5
  %83 = add nsw i64 %77, %82
  %84 = load i64, ptr @nxt, align 16, !tbaa !5
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr @nxt, align 16, !tbaa !5
  %86 = getelementptr inbounds [55 x i64], ptr @nxt, i64 0, i64 %85
  store i64 %83, ptr %86, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %73
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = add nsw i32 %88, 2
  store i32 %89, ptr %6, align 4, !tbaa !9
  br label %67, !llvm.loop !14

90:                                               ; preds = %72
  %91 = load i64, ptr @now, align 16, !tbaa !5
  %92 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !5
  store i64 %93, ptr @last, align 8, !tbaa !5
  %94 = load i64, ptr @nxt, align 16, !tbaa !5
  store i64 %94, ptr @now, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %109, %90
  %96 = load i32, ptr %7, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = load i64, ptr @now, align 16, !tbaa !5
  %99 = icmp sle i64 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %95
  store i32 16, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %112

101:                                              ; preds = %95
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [55 x i64], ptr @nxt, i64 0, i64 %103
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %107
  store i64 %105, ptr %108, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %101
  %110 = load i32, ptr %7, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %7, align 4, !tbaa !9
  br label %95, !llvm.loop !15

112:                                              ; preds = %100
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %4, align 4, !tbaa !9
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr %4, align 4, !tbaa !9
  br label %35, !llvm.loop !16

116:                                              ; preds = %38
  %117 = load i64, ptr @ans, align 8, !tbaa !5
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %117)
  br label %8, !llvm.loop !17

119:                                              ; preds = %8
  ret i32 0
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) #3

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

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!"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"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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"

@n = external dso_local global i32, align 4
@seq = external dso_local global [55 x i32], align 16
@now = external dso_local global [55 x i64], align 16
@nxt = external dso_local local_unnamed_addr global [55 x i64], align 16
@last = external dso_local local_unnamed_addr global i64, align 8
@ans = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %2 = icmp eq i32 %1, 1
  br i1 %2, label %.lr.ph52, label %._crit_edge53

.lr.ph52:                                         ; preds = %0, %._crit_edge49
  store i64 0, ptr @now, align 16, !tbaa !5
  store i64 0, ptr @ans, align 8, !tbaa !5
  store i64 1, ptr @last, align 8, !tbaa !5
  %3 = load i32, ptr @n, align 4, !tbaa !9
  %.not29 = icmp slt i32 %3, 1
  br i1 %.not29, label %.lr.ph52.._crit_edge_crit_edge, label %.lr.ph

.lr.ph52.._crit_edge_crit_edge:                   ; preds = %.lr.ph52
  %.pre62 = sext i32 %3 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph52.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre62, %.lr.ph52.._crit_edge_crit_edge ], [ %11, %.lr.ph ]
  %gep50 = getelementptr i32, ptr getelementptr inbounds (i8, ptr @seq, i64 4), i64 %.pre-phi
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @seq, i64 4), ptr noundef nonnull %gep50)
  %4 = load i32, ptr @n, align 4, !tbaa !9
  %5 = sext i32 %4 to i64
  %6 = getelementptr inbounds [55 x i32], ptr @seq, i64 0, i64 %5
  %7 = load i32, ptr %6, align 4, !tbaa !9
  %.not2546 = icmp eq i32 %7, 0
  br i1 %.not2546, label %._crit_edge49, label %.preheader

.lr.ph:                                           ; preds = %.lr.ph52, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph52 ]
  %8 = getelementptr inbounds i32, ptr @seq, i64 %indvars.iv
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %8)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %10 = load i32, ptr @n, align 4, !tbaa !9
  %11 = sext i32 %10 to i64
  %.not.not = icmp slt i64 %indvars.iv, %11
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %._crit_edge, %._crit_edge45
  %.01848 = phi i32 [ %70, %._crit_edge45 ], [ %7, %._crit_edge ]
  %.01947 = phi i32 [ %.1.lcssa, %._crit_edge45 ], [ %4, %._crit_edge ]
  %12 = icmp sgt i32 %.01947, -1
  br i1 %12, label %.lr.ph32, label %.critedge

.lr.ph32:                                         ; preds = %.preheader
  %ans.promoted = load i64, ptr @ans, align 8, !tbaa !5
  %13 = load i64, ptr @last, align 8
  br label %18

._crit_edge49:                                    ; preds = %._crit_edge45, %._crit_edge
  %14 = load i64, ptr @ans, align 8, !tbaa !5
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %14)
  %16 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %.lr.ph52, label %._crit_edge53, !llvm.loop !13

18:                                               ; preds = %.lr.ph32, %24
  %.131 = phi i32 [ %.01947, %.lr.ph32 ], [ %29, %24 ]
  %19 = phi i64 [ %ans.promoted, %.lr.ph32 ], [ %28, %24 ]
  %20 = zext nneg i32 %.131 to i64
  %21 = getelementptr inbounds [55 x i32], ptr @seq, i64 0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %23 = icmp eq i32 %22, %.01848
  br i1 %23, label %24, label %.critedge

24:                                               ; preds = %18
  %25 = load i64, ptr @now, align 16, !tbaa !5
  %26 = add nsw i64 %25, 1
  store i64 %26, ptr @now, align 16, !tbaa !5
  %27 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %26
  store i64 %13, ptr %27, align 8, !tbaa !5
  %28 = add nsw i64 %19, %13
  store i64 %28, ptr @ans, align 8, !tbaa !5
  %29 = add nsw i32 %.131, -1
  %30 = icmp sgt i32 %.131, 0
  br i1 %30, label %18, label %.critedge, !llvm.loop !14

.critedge:                                        ; preds = %18, %24, %.preheader
  %.1.lcssa = phi i32 [ %.01947, %.preheader ], [ -1, %24 ], [ %.131, %18 ]
  %31 = load i64, ptr @now, align 16, !tbaa !5
  %gep = getelementptr i64, ptr getelementptr inbounds (i8, ptr @now, i64 8), i64 %31
  tail call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @now, i64 8), ptr noundef nonnull %gep)
  store i64 0, ptr @nxt, align 16, !tbaa !5
  %32 = load i64, ptr @now, align 16, !tbaa !5
  %.not2636 = icmp slt i64 %32, 1
  br i1 %.not2636, label %._crit_edge39.thread, label %.lr.ph38.preheader

.lr.ph38.preheader:                               ; preds = %.critedge
  %33 = add nsw i64 %32, -1
  %34 = icmp ult i64 %32, 3
  br i1 %34, label %._crit_edge39.unr-lcssa, label %.lr.ph38.preheader.new

.lr.ph38.preheader.new:                           ; preds = %.lr.ph38.preheader
  %35 = lshr i64 %33, 1
  %36 = add nuw i64 %35, 1
  %unroll_iter = and i64 %36, -2
  br label %.lr.ph38

._crit_edge39.thread:                             ; preds = %.critedge
  %37 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %32
  %38 = load i64, ptr %37, align 8, !tbaa !5
  store i64 %38, ptr @last, align 8, !tbaa !5
  store i64 0, ptr @now, align 16, !tbaa !5
  br label %._crit_edge45

._crit_edge39.unr-lcssa:                          ; preds = %.lr.ph38, %.lr.ph38.preheader
  %indvars.iv56.unr = phi i64 [ 1, %.lr.ph38.preheader ], [ %indvars.iv.next57.1, %.lr.ph38 ]
  %39 = and i64 %33, 2
  %lcmp.mod.not.not = icmp eq i64 %39, 0
  br i1 %lcmp.mod.not.not, label %.lr.ph38.epil, label %._crit_edge39

.lr.ph38.epil:                                    ; preds = %._crit_edge39.unr-lcssa
  %40 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %indvars.iv56.unr
  %41 = load i64, ptr %40, align 8, !tbaa !5
  %42 = add nuw nsw i64 %indvars.iv56.unr, 1
  %43 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = add nsw i64 %44, %41
  %46 = load i64, ptr @nxt, align 16, !tbaa !5
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr @nxt, align 16, !tbaa !5
  %48 = getelementptr inbounds [55 x i64], ptr @nxt, i64 0, i64 %47
  store i64 %45, ptr %48, align 8, !tbaa !5
  br label %._crit_edge39

._crit_edge39:                                    ; preds = %._crit_edge39.unr-lcssa, %.lr.ph38.epil
  %.pre = load i64, ptr @nxt, align 16, !tbaa !5
  %49 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %32
  %50 = load i64, ptr %49, align 8, !tbaa !5
  store i64 %50, ptr @last, align 8, !tbaa !5
  store i64 %.pre, ptr @now, align 16, !tbaa !5
  %.not2741 = icmp slt i64 %.pre, 1
  br i1 %.not2741, label %._crit_edge45, label %.lr.ph44.preheader

.lr.ph44.preheader:                               ; preds = %._crit_edge39
  %51 = shl nuw i64 %.pre, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @now, i64 8), ptr nonnull align 8 getelementptr inbounds (i8, ptr @nxt, i64 8), i64 %51, i1 false), !tbaa !5
  br label %._crit_edge45

.lr.ph38:                                         ; preds = %.lr.ph38, %.lr.ph38.preheader.new
  %indvars.iv56 = phi i64 [ 1, %.lr.ph38.preheader.new ], [ %indvars.iv.next57.1, %.lr.ph38 ]
  %niter = phi i64 [ 0, %.lr.ph38.preheader.new ], [ %niter.next.1, %.lr.ph38 ]
  %52 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %indvars.iv56
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = add nuw nsw i64 %indvars.iv56, 1
  %55 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = add nsw i64 %56, %53
  %58 = load i64, ptr @nxt, align 16, !tbaa !5
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr @nxt, align 16, !tbaa !5
  %60 = getelementptr inbounds [55 x i64], ptr @nxt, i64 0, i64 %59
  store i64 %57, ptr %60, align 8, !tbaa !5
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 2
  %61 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %indvars.iv.next57
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = add nuw nsw i64 %indvars.iv56, 3
  %64 = getelementptr inbounds [55 x i64], ptr @now, i64 0, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !5
  %66 = add nsw i64 %65, %62
  %67 = load i64, ptr @nxt, align 16, !tbaa !5
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr @nxt, align 16, !tbaa !5
  %69 = getelementptr inbounds [55 x i64], ptr @nxt, i64 0, i64 %68
  store i64 %66, ptr %69, align 8, !tbaa !5
  %indvars.iv.next57.1 = add nuw nsw i64 %indvars.iv56, 4
  %niter.next.1 = add nuw nsw i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge39.unr-lcssa, label %.lr.ph38, !llvm.loop !15

._crit_edge45:                                    ; preds = %._crit_edge39.thread, %.lr.ph44.preheader, %._crit_edge39
  %70 = add nsw i32 %.01848, -1
  %.not25 = icmp eq i32 %70, 0
  br i1 %.not25, label %._crit_edge49, label %.preheader, !llvm.loop !16

._crit_edge53:                                    ; preds = %._crit_edge49, %0
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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