; LLVM IR from tangjz/acm-icpc :: TDL_training/2016-04-10/upsolved (H - Stone Game - tjz)

; 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
@a = external dso_local global [100001 x i32], align 16
@c = external dso_local global [100001 x i32], align 16
@f = external dso_local global [100001 x i32], align 16
@seg = external dso_local global [200002 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3updiiii(i32 noundef, i32 noundef, i32 noundef, 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 noundef i32 @_Z4findiii(i32 noundef, i32 noundef, 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
  store i32 0, ptr %1, align 4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %8

8:                                                ; preds = %100, %0
  %9 = load i32, ptr @t, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr @t, align 4, !tbaa !5
  %11 = icmp ne i32 %9, 0
  br i1 %11, label %12, label %106

12:                                               ; preds = %8
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %24, %12
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds i32, ptr @a, i64 %21
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %22)
  br label %24

24:                                               ; preds = %19
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !5
  br label %14, !llvm.loop !9

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

28:                                               ; preds = %38, %27
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr @c, i64 %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36)
  br label %38

38:                                               ; preds = %33
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %3, align 4, !tbaa !5
  br label %28, !llvm.loop !11

41:                                               ; preds = %32
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = shl i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = mul i64 %44, 4
  call void @llvm.memset.p0.i64(ptr align 16 @seg, i8 0, i64 %45, i1 false)
  store i32 0, ptr getelementptr inbounds ([100001 x i32], ptr @f, i64 0, i64 1), align 4, !tbaa !5
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 1
  call void @_Z3updiiii(i32 noundef 0, i32 noundef %47, i32 noundef 0, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 2, ptr %4, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %73, %41
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %76

53:                                               ; preds = %48
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = sub nsw i32 %54, 1
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100001 x i32], ptr @c, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sub nsw i32 %56, %60
  %62 = call noundef i32 @_Z4findiii(i32 noundef 0, i32 noundef %55, i32 noundef %61)
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %64
  store i32 %62, ptr %65, align 4, !tbaa !5
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = sub nsw i32 %66, 1
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z3updiiii(i32 noundef 0, i32 noundef %67, i32 noundef %71, i32 noundef %72)
  br label %73

73:                                               ; preds = %53
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %4, align 4, !tbaa !5
  br label %48, !llvm.loop !12

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

77:                                               ; preds = %97, %76
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = icmp sle i32 %78, %79
  br i1 %80, label %82, label %81

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

82:                                               ; preds = %77
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = and i32 %86, 1
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %96

89:                                               ; preds = %82
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = xor i32 %94, %93
  store i32 %95, ptr %5, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %89, %82
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %6, align 4, !tbaa !5
  br label %77, !llvm.loop !13

100:                                              ; preds = %81
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = icmp ne i32 %101, 0
  %103 = zext i1 %102 to i64
  %104 = select i1 %102, ptr @.str.1, ptr @.str.2
  %105 = call i32 @puts(ptr noundef %104)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %8, !llvm.loop !14

106:                                              ; preds = %8
  ret i32 0
}

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

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

declare i32 @puts(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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}
!14 = distinct !{!14, !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 global i32, align 4
@a = external dso_local global [100001 x i32], align 16
@c = external dso_local global [100001 x i32], align 16
@f = external dso_local local_unnamed_addr global [100001 x i32], align 16
@seg = external dso_local local_unnamed_addr global [200002 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3updiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @t, align 4, !tbaa !5
  %.not49 = icmp eq i32 %2, 0
  br i1 %.not49, label %._crit_edge52, label %.lr.ph51

.lr.ph51:                                         ; preds = %0, %40
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not2533 = icmp slt i32 %5, 1
  br i1 %.not2533, label %._crit_edge, label %.lr.ph

.preheader31:                                     ; preds = %.lr.ph
  %.not2635 = icmp slt i32 %8, 1
  br i1 %.not2635, label %._crit_edge, label %.lr.ph37

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

._crit_edge:                                      ; preds = %.lr.ph37, %.lr.ph51, %.preheader31
  %.lcssa = phi i32 [ %8, %.preheader31 ], [ %5, %.lr.ph51 ], [ %17, %.lr.ph37 ]
  %10 = shl i32 %.lcssa, 1
  %11 = sext i32 %10 to i64
  %12 = shl nsw i64 %11, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @seg, i8 0, i64 %12, i1 false)
  store i32 0, ptr getelementptr inbounds (i8, ptr @f, i64 4), align 4, !tbaa !5
  %13 = add nsw i32 %.lcssa, -1
  tail call void @_Z3updiiii(i32 noundef 0, i32 noundef %13, i32 noundef 0, i32 noundef 1)
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %.not2738 = icmp slt i32 %14, 2
  br i1 %.not2738, label %.preheader, label %.lr.ph41

.lr.ph37:                                         ; preds = %.preheader31, %.lr.ph37
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %.lr.ph37 ], [ 1, %.preheader31 ]
  %15 = getelementptr inbounds i32, ptr @c, i64 %indvars.iv56
  %16 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %15)
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %.not26.not = icmp slt i64 %indvars.iv56, %18
  br i1 %.not26.not, label %.lr.ph37, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %.lr.ph41, %._crit_edge
  %.lcssa32 = phi i32 [ %14, %._crit_edge ], [ %31, %.lr.ph41 ]
  %.not2843 = icmp slt i32 %.lcssa32, 1
  br i1 %.not2843, label %._crit_edge47.thread, label %.lr.ph46.preheader

.lr.ph46.preheader:                               ; preds = %.preheader
  %19 = zext nneg i32 %.lcssa32 to i64
  %xtraiter = and i64 %19, 1
  %20 = icmp eq i32 %.lcssa32, 1
  br i1 %20, label %._crit_edge47.unr-lcssa, label %.lr.ph46.preheader.new

.lr.ph46.preheader.new:                           ; preds = %.lr.ph46.preheader
  %unroll_iter = and i64 %19, 2147483646
  br label %.lr.ph46

.lr.ph41:                                         ; preds = %._crit_edge, %.lr.ph41
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.lr.ph41 ], [ 2, %._crit_edge ]
  %21 = phi i32 [ %31, %.lr.ph41 ], [ %14, %._crit_edge ]
  %22 = add nsw i32 %21, -1
  %23 = getelementptr inbounds [100001 x i32], ptr @c, i64 0, i64 %indvars.iv59
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = trunc nuw nsw i64 %indvars.iv59 to i32
  %26 = sub nsw i32 %25, %24
  %27 = tail call noundef i32 @_Z4findiii(i32 noundef 0, i32 noundef %22, i32 noundef %26)
  %28 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %indvars.iv59
  store i32 %27, ptr %28, align 4, !tbaa !5
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = add nsw i32 %29, -1
  tail call void @_Z3updiiii(i32 noundef 0, i32 noundef %30, i32 noundef %27, i32 noundef %25)
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %.not27.not = icmp slt i64 %indvars.iv59, %32
  br i1 %.not27.not, label %.lr.ph41, label %.preheader, !llvm.loop !12

._crit_edge47.unr-lcssa:                          ; preds = %59, %.lr.ph46.preheader
  %.1.fr.lcssa.ph = phi i32 [ poison, %.lr.ph46.preheader ], [ %.1.fr.1, %59 ]
  %indvars.iv62.unr = phi i64 [ 1, %.lr.ph46.preheader ], [ %indvars.iv.next63.1, %59 ]
  %.01944.unr = phi i32 [ 0, %.lr.ph46.preheader ], [ %.1.fr.1, %59 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge47, label %.lr.ph46.epil

.lr.ph46.epil:                                    ; preds = %._crit_edge47.unr-lcssa
  %33 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %indvars.iv62.unr
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = and i32 %34, 1
  %.not30.epil = icmp eq i32 %35, 0
  br i1 %.not30.epil, label %._crit_edge47.epilog-lcssa, label %36

36:                                               ; preds = %.lr.ph46.epil
  %37 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %indvars.iv62.unr
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = xor i32 %38, %.01944.unr
  br label %._crit_edge47.epilog-lcssa

._crit_edge47.epilog-lcssa:                       ; preds = %36, %.lr.ph46.epil
  %.1.epil = phi i32 [ %39, %36 ], [ %.01944.unr, %.lr.ph46.epil ]
  %.1.fr.epil = freeze i32 %.1.epil
  br label %._crit_edge47

._crit_edge47:                                    ; preds = %._crit_edge47.unr-lcssa, %._crit_edge47.epilog-lcssa
  %.1.fr.lcssa = phi i32 [ %.1.fr.lcssa.ph, %._crit_edge47.unr-lcssa ], [ %.1.fr.epil, %._crit_edge47.epilog-lcssa ]
  %.not29 = icmp eq i32 %.1.fr.lcssa, 0
  br i1 %.not29, label %._crit_edge47.thread, label %40

._crit_edge47.thread:                             ; preds = %.preheader, %._crit_edge47
  br label %40

40:                                               ; preds = %._crit_edge47, %._crit_edge47.thread
  %41 = phi ptr [ @.str.2, %._crit_edge47.thread ], [ @.str.1, %._crit_edge47 ]
  %42 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %41)
  %43 = load i32, ptr @t, align 4, !tbaa !5
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %43, 0
  br i1 %.not, label %._crit_edge52, label %.lr.ph51, !llvm.loop !13

.lr.ph46:                                         ; preds = %59, %.lr.ph46.preheader.new
  %indvars.iv62 = phi i64 [ 1, %.lr.ph46.preheader.new ], [ %indvars.iv.next63.1, %59 ]
  %.01944 = phi i32 [ 0, %.lr.ph46.preheader.new ], [ %.1.fr.1, %59 ]
  %niter = phi i64 [ 0, %.lr.ph46.preheader.new ], [ %niter.next.1, %59 ]
  %45 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %indvars.iv62
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = and i32 %46, 1
  %.not30 = icmp eq i32 %47, 0
  br i1 %.not30, label %.lr.ph46.1, label %48

48:                                               ; preds = %.lr.ph46
  %49 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %indvars.iv62
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = xor i32 %50, %.01944
  br label %.lr.ph46.1

.lr.ph46.1:                                       ; preds = %.lr.ph46, %48
  %.1 = phi i32 [ %51, %48 ], [ %.01944, %.lr.ph46 ]
  %.1.fr = freeze i32 %.1
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %52 = getelementptr inbounds [100001 x i32], ptr @a, i64 0, i64 %indvars.iv.next63
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = and i32 %53, 1
  %.not30.1 = icmp eq i32 %54, 0
  br i1 %.not30.1, label %59, label %55

55:                                               ; preds = %.lr.ph46.1
  %56 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %indvars.iv.next63
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = xor i32 %57, %.1.fr
  br label %59

59:                                               ; preds = %55, %.lr.ph46.1
  %.1.1 = phi i32 [ %58, %55 ], [ %.1.fr, %.lr.ph46.1 ]
  %.1.fr.1 = freeze i32 %.1.1
  %indvars.iv.next63.1 = add nuw nsw i64 %indvars.iv62, 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_edge47.unr-lcssa, label %.lr.ph46, !llvm.loop !14

._crit_edge52:                                    ; preds = %40, %0
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

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 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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }

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


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