; LLVM IR from tangjz/acm-icpc :: buaa/oj3rd (728)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@f = external dso_local global [6161 x i32], align 16
@pre = external dso_local global [6161 x i32], align 16
@_ZL1a = external hidden constant [122 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 63, i64 24644, i1 false)
  store i32 0, ptr @f, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %7

7:                                                ; preds = %66, %0
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = icmp sle i32 %8, %9
  br i1 %10, label %12, label %11

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

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

13:                                               ; preds = %62, %12
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [122 x i32], ptr @_ZL1a, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = add nsw i32 %14, %18
  %20 = icmp slt i32 %19, 6161
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %13
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [122 x i32], ptr @_ZL1a, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = add nsw i32 %23, %27
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  %37 = icmp sgt i32 %31, %36
  br i1 %37, label %38, label %61

38:                                               ; preds = %22
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [122 x i32], ptr @_ZL1a, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add nsw i32 %44, %48
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %50
  store i32 %43, ptr %51, align 4, !tbaa !5
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [122 x i32], ptr @_ZL1a, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = add nsw i32 %53, %57
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [6161 x i32], ptr @pre, i64 0, i64 %59
  store i32 %52, ptr %60, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %38, %22
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %4, align 4, !tbaa !5
  br label %13, !llvm.loop !9

65:                                               ; preds = %21
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %2, align 4, !tbaa !5
  br label %7, !llvm.loop !11

69:                                               ; preds = %11
  %70 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %71

71:                                               ; preds = %139, %69
  %72 = load i32, ptr @t, align 4, !tbaa !5
  %73 = add nsw i32 %72, -1
  store i32 %73, ptr @t, align 4, !tbaa !5
  %74 = icmp ne i32 %72, 0
  br i1 %74, label %75, label %140

75:                                               ; preds = %71
  %76 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @v)
  %77 = load i32, ptr @v, align 4, !tbaa !5
  %78 = call noundef zeroext i1 @_Z5has61i(i32 noundef %77)
  br i1 %78, label %79, label %82

79:                                               ; preds = %75
  %80 = load i32, ptr @v, align 4, !tbaa !5
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %80)
  br label %139

82:                                               ; preds = %75
  %83 = load i32, ptr @v, align 4, !tbaa !5
  %84 = icmp sge i32 %83, 6161
  br i1 %84, label %85, label %106

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %86 = load i32, ptr @v, align 4, !tbaa !5
  %87 = sdiv i32 %86, 100
  store i32 %87, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %88 = load i32, ptr @v, align 4, !tbaa !5
  %89 = srem i32 %88, 100
  store i32 %89, ptr %6, align 4, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = icmp slt i32 %90, 61
  br i1 %91, label %92, label %97

92:                                               ; preds = %85
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = add nsw i32 %93, -1
  store i32 %94, ptr %5, align 4, !tbaa !5
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = add nsw i32 %95, 100
  store i32 %96, ptr %6, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %92, %85
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sub nsw i32 %98, 61
  %100 = mul nsw i32 %99, 100
  %101 = add nsw i32 %100, 61
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = sub nsw i32 %102, 61
  %104 = add nsw i32 6100, %103
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %101, i32 noundef %104)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %138

106:                                              ; preds = %82
  %107 = load i32, ptr @v, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = icmp ne i32 %110, 1061109567
  br i1 %111, label %112, label %135

112:                                              ; preds = %106
  %113 = load i32, ptr @v, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %116)
  br label %118

118:                                              ; preds = %121, %112
  %119 = load i32, ptr @v, align 4, !tbaa !5
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %133

121:                                              ; preds = %118
  %122 = load i32, ptr @v, align 4, !tbaa !5
  %123 = load i32, ptr @v, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [6161 x i32], ptr @pre, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = sub nsw i32 %122, %126
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %127)
  %129 = load i32, ptr @v, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [6161 x i32], ptr @pre, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  store i32 %132, ptr @v, align 4, !tbaa !5
  br label %118, !llvm.loop !12

133:                                              ; preds = %118
  %134 = call i32 @putchar(i32 noundef 10)
  br label %137

135:                                              ; preds = %106
  %136 = call i32 @puts(ptr noundef @.str.4)
  br label %137

137:                                              ; preds = %135, %133
  br label %138

138:                                              ; preds = %137, %97
  br label %139

139:                                              ; preds = %138, %79
  br label %71, !llvm.loop !13

140:                                              ; preds = %71
  %141 = load i32, ptr %1, align 4
  ret i32 %141
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #5

declare i32 @puts(ptr noundef) #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 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !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"

@t = external dso_local global i32, align 4
@n = external dso_local local_unnamed_addr global i32, align 4
@v = external dso_local global i32, align 4
@f = external dso_local local_unnamed_addr global [6161 x i32], align 16
@pre = external dso_local local_unnamed_addr global [6161 x i32], align 16
@_ZL1a = external hidden local_unnamed_addr constant [122 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24644) @f, i8 63, i64 24644, i1 false)
  store i32 0, ptr @f, align 16, !tbaa !5
  %1 = load i32, ptr @n, align 4, !tbaa !5
  %.not34 = icmp slt i32 %1, 1
  br i1 %.not34, label %._crit_edge36, label %.preheader.preheader

.preheader.preheader:                             ; preds = %0
  %2 = add nuw i32 %1, 1
  %wide.trip.count49 = zext i32 %2 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv46 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next47, %._crit_edge ]
  %3 = getelementptr inbounds [122 x i32], ptr @_ZL1a, i64 0, i64 %indvars.iv46
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp slt i32 %4, 6161
  br i1 %5, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %6 = sext i32 %4 to i64
  %7 = sub i32 6161, %4
  %wide.trip.count = zext i32 %7 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %8 = icmp eq i32 %4, 6160
  br i1 %8, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

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

._crit_edge36:                                    ; preds = %._crit_edge, %0
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %10 = load i32, ptr @t, align 4, !tbaa !5
  %11 = add nsw i32 %10, -1
  store i32 %11, ptr @t, align 4, !tbaa !5
  %.not3041 = icmp eq i32 %10, 0
  br i1 %.not3041, label %._crit_edge44, label %.lr.ph43

._crit_edge.loopexit.unr-lcssa:                   ; preds = %42, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %42 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %12 = add nsw i64 %indvars.iv.unr, %6
  %13 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %indvars.iv.unr
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  %18 = icmp sgt i32 %14, %17
  br i1 %18, label %19, label %._crit_edge

19:                                               ; preds = %.lr.ph.epil
  store i32 %17, ptr %13, align 4, !tbaa !5
  %20 = getelementptr inbounds [6161 x i32], ptr @pre, i64 0, i64 %12
  %21 = trunc nuw nsw i64 %indvars.iv.unr to i32
  store i32 %21, ptr %20, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %19, %.lr.ph.epil, %.preheader
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond50.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count49
  br i1 %exitcond50.not, label %._crit_edge36, label %.preheader, !llvm.loop !9

.lr.ph:                                           ; preds = %42, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %42 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %42 ]
  %22 = add nsw i64 %indvars.iv, %6
  %23 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %indvars.iv
  %26 = load i32, ptr %25, align 8, !tbaa !5
  %27 = add nsw i32 %26, 1
  %28 = icmp sgt i32 %24, %27
  br i1 %28, label %29, label %.lr.ph.1

29:                                               ; preds = %.lr.ph
  store i32 %27, ptr %23, align 4, !tbaa !5
  %30 = getelementptr inbounds [6161 x i32], ptr @pre, i64 0, i64 %22
  %31 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %31, ptr %30, align 4, !tbaa !5
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph, %29
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %32 = add nsw i64 %indvars.iv.next, %6
  %33 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %indvars.iv.next
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  %38 = icmp sgt i32 %34, %37
  br i1 %38, label %39, label %42

39:                                               ; preds = %.lr.ph.1
  store i32 %37, ptr %33, align 4, !tbaa !5
  %40 = getelementptr inbounds [6161 x i32], ptr @pre, i64 0, i64 %32
  %41 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %41, ptr %40, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %39, %.lr.ph.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

.lr.ph43:                                         ; preds = %._crit_edge36, %80
  %43 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @v)
  %44 = load i32, ptr @v, align 4, !tbaa !5
  %45 = tail call noundef zeroext i1 @_Z5has61i(i32 noundef %44)
  %46 = load i32, ptr @v, align 4, !tbaa !5
  br i1 %45, label %47, label %49

47:                                               ; preds = %.lr.ph43
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %46)
  br label %80

49:                                               ; preds = %.lr.ph43
  %50 = icmp sgt i32 %46, 6160
  br i1 %50, label %51, label %61

51:                                               ; preds = %49
  %52 = udiv i32 %46, 100
  %53 = urem i32 %46, 100
  %54 = icmp ult i32 %53, 61
  %55 = add nuw nsw i32 %53, 100
  %56 = sext i1 %54 to i32
  %.020 = add nsw i32 %52, %56
  %.0 = select i1 %54, i32 %55, i32 %53
  %57 = mul nuw nsw i32 %.020, 100
  %58 = add nsw i32 %57, -6039
  %59 = add nuw nsw i32 %.0, 6039
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %58, i32 noundef %59)
  br label %80

61:                                               ; preds = %49
  %62 = sext i32 %46 to i64
  %63 = getelementptr inbounds [6161 x i32], ptr @f, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %.not31 = icmp eq i32 %64, 1061109567
  br i1 %.not31, label %78, label %65

65:                                               ; preds = %61
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %64)
  %.pr = load i32, ptr @v, align 4, !tbaa !5
  %.not3237 = icmp eq i32 %.pr, 0
  br i1 %.not3237, label %._crit_edge40, label %.lr.ph39

.lr.ph39:                                         ; preds = %65, %.lr.ph39
  %67 = phi i32 [ %76, %.lr.ph39 ], [ %.pr, %65 ]
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [6161 x i32], ptr @pre, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sub nsw i32 %67, %70
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %71)
  %73 = load i32, ptr @v, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [6161 x i32], ptr @pre, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr @v, align 4, !tbaa !5
  %.not32 = icmp eq i32 %76, 0
  br i1 %.not32, label %._crit_edge40, label %.lr.ph39, !llvm.loop !12

._crit_edge40:                                    ; preds = %.lr.ph39, %65
  %77 = tail call i32 @putchar(i32 noundef 10)
  br label %80

78:                                               ; preds = %61
  %79 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %80

80:                                               ; preds = %51, %78, %._crit_edge40, %47
  %81 = load i32, ptr @t, align 4, !tbaa !5
  %82 = add nsw i32 %81, -1
  store i32 %82, ptr @t, align 4, !tbaa !5
  %.not30 = icmp eq i32 %81, 0
  br i1 %.not30, label %._crit_edge44, label %.lr.ph43, !llvm.loop !13

._crit_edge44:                                    ; preds = %80, %._crit_edge36
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #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 norecurse 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { inlinehint mustprogress nofree 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" }

!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 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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