; LLVM IR from tangjz/acm-icpc :: uvalive (5873)

; 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
@tot = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@x = external dso_local global [100001 x i32], align 16
@y = external dso_local global [100001 x i32], align 16
@row = external dso_local global [100001 x i32], align 16
@col = external dso_local global [100001 x i32], align 16
@vis = external dso_local global [100001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solveiPiS_iS_(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr 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 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 [2 x i8], align 1
  %5 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %7

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

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

13:                                               ; preds = %26, %11
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

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

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

26:                                               ; preds = %18
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %2, align 4, !tbaa !5
  br label %13, !llvm.loop !9

29:                                               ; preds = %17
  store i32 0, ptr @q, align 4, !tbaa !5
  store i32 0, ptr @p, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %52, %29
  %31 = load i32, ptr @tot, align 4, !tbaa !5
  %32 = add nsw i32 %31, -1
  store i32 %32, ptr @tot, align 4, !tbaa !5
  %33 = icmp ne i32 %31, 0
  br i1 %33, label %34, label %54

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 2, ptr %4) #5
  %35 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 0
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %35, ptr noundef %3)
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 0
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %40, 72
  br i1 %41, label %42, label %47

42:                                               ; preds = %34
  %43 = load i32, ptr @p, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr @p, align 4, !tbaa !5
  %45 = sext i32 %43 to i64
  %46 = getelementptr inbounds [100001 x i32], ptr @row, i64 0, i64 %45
  br label %52

47:                                               ; preds = %34
  %48 = load i32, ptr @q, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr @q, align 4, !tbaa !5
  %50 = sext i32 %48 to i64
  %51 = getelementptr inbounds [100001 x i32], ptr @col, i64 0, i64 %50
  br label %52

52:                                               ; preds = %47, %42
  %53 = phi ptr [ %46, %42 ], [ %51, %47 ]
  store i32 %37, ptr %53, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 2, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %30, !llvm.loop !12

54:                                               ; preds = %30
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = mul i64 %56, 1
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 %57, i1 false)
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = load i32, ptr @p, align 4, !tbaa !5
  call void @_Z5solveiPiS_iS_(i32 noundef %58, ptr noundef @x, ptr noundef @y, i32 noundef %59, ptr noundef @row)
  %60 = load i32, ptr @n, align 4, !tbaa !5
  %61 = load i32, ptr @q, align 4, !tbaa !5
  call void @_Z5solveiPiS_iS_(i32 noundef %60, ptr noundef @y, ptr noundef @x, i32 noundef %61, ptr noundef @col)
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %77, %54
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %80

67:                                               ; preds = %62
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %69
  %71 = load i8, ptr %70, align 1, !tbaa !13, !range !15, !noundef !16
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %76

73:                                               ; preds = %67
  %74 = load i32, ptr @tot, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr @tot, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %73, %67
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %5, align 4, !tbaa !5
  br label %62, !llvm.loop !17

80:                                               ; preds = %66
  %81 = load i32, ptr @tot, align 4, !tbaa !5
  %82 = mul nsw i32 %81, 5
  %83 = load i32, ptr @n, align 4, !tbaa !5
  %84 = mul nsw i32 3, %83
  %85 = icmp sge i32 %82, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %80
  br label %88

87:                                               ; preds = %80
  br label %88

88:                                               ; preds = %87, %86
  %89 = phi ptr [ @.str.3, %86 ], [ @.str.4, %87 ]
  %90 = getelementptr inbounds [7 x i8], ptr %89, i64 0, i64 0
  %91 = call i32 @puts(ptr noundef %90)
  br label %7, !llvm.loop !18

92:                                               ; preds = %7
  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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !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
@tot = external dso_local global i32, align 4
@p = external dso_local local_unnamed_addr global i32, align 4
@q = external dso_local local_unnamed_addr global i32, align 4
@x = external dso_local global [100001 x i32], align 16
@y = external dso_local global [100001 x i32], align 16
@row = external dso_local global [100001 x i32], align 16
@col = external dso_local global [100001 x i32], align 16
@vis = external dso_local local_unnamed_addr global [100001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solveiPiS_iS_(i32 noundef, ptr noundef, ptr noundef, i32 noundef, ptr 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca [2 x i8], align 1
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @t, align 4, !tbaa !5
  %.not20 = icmp eq i32 %4, 0
  br i1 %.not20, label %._crit_edge23, label %.lr.ph22

.lr.ph22:                                         ; preds = %0, %._crit_edge19
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @tot)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph22
  %9 = phi i32 [ %7, %.lr.ph22 ], [ %15, %.lr.ph ]
  store i32 0, ptr @q, align 4, !tbaa !5
  store i32 0, ptr @p, align 4, !tbaa !5
  %10 = load i32, ptr @tot, align 4, !tbaa !5
  %11 = add nsw i32 %10, -1
  store i32 %11, ptr @tot, align 4, !tbaa !5
  %.not912 = icmp eq i32 %10, 0
  br i1 %.not912, label %._crit_edge15, label %.lr.ph14

.lr.ph:                                           ; preds = %.lr.ph22, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph22 ]
  %12 = getelementptr inbounds i32, ptr @x, i64 %indvars.iv
  %13 = getelementptr inbounds i32, ptr @y, i64 %indvars.iv
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph14:                                         ; preds = %._crit_edge, %.lr.ph14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %2) #5
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %2, ptr noundef nonnull %1)
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = load i8, ptr %2, align 1, !tbaa !11
  %21 = icmp eq i8 %20, 72
  %p.q = select i1 %21, ptr @p, ptr @q
  %row.col = select i1 %21, ptr @row, ptr @col
  %22 = load i32, ptr %p.q, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %p.q, align 4, !tbaa !5
  %24 = sext i32 %22 to i64
  %25 = getelementptr inbounds [100001 x i32], ptr %row.col, i64 0, i64 %24
  store i32 %19, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %26 = load i32, ptr @tot, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr @tot, align 4, !tbaa !5
  %.not9 = icmp eq i32 %26, 0
  br i1 %.not9, label %._crit_edge15.loopexit, label %.lr.ph14, !llvm.loop !12

._crit_edge15.loopexit:                           ; preds = %.lr.ph14
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  %.pre28 = load i32, ptr @p, align 4, !tbaa !5
  br label %._crit_edge15

._crit_edge15:                                    ; preds = %._crit_edge15.loopexit, %._crit_edge
  %28 = phi i32 [ %.pre28, %._crit_edge15.loopexit ], [ 0, %._crit_edge ]
  %29 = phi i32 [ %.pre, %._crit_edge15.loopexit ], [ %9, %._crit_edge ]
  %30 = sext i32 %29 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @vis, i8 0, i64 %30, i1 false)
  call void @_Z5solveiPiS_iS_(i32 noundef %29, ptr noundef nonnull @x, ptr noundef nonnull @y, i32 noundef %28, ptr noundef nonnull @row)
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = load i32, ptr @q, align 4, !tbaa !5
  call void @_Z5solveiPiS_iS_(i32 noundef %31, ptr noundef nonnull @y, ptr noundef nonnull @x, i32 noundef %32, ptr noundef nonnull @col)
  store i32 0, ptr @tot, align 4, !tbaa !5
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph18.preheader, label %._crit_edge19

.lr.ph18.preheader:                               ; preds = %._crit_edge15
  %wide.trip.count = zext nneg i32 %33 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %35 = icmp ult i32 %33, 4
  br i1 %35, label %._crit_edge19.loopexit.unr-lcssa, label %.lr.ph18.preheader.new

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

._crit_edge19.loopexit.unr-lcssa:                 ; preds = %75, %.lr.ph18.preheader
  %.lcssa34.ph = phi i32 [ poison, %.lr.ph18.preheader ], [ %76, %75 ]
  %indvars.iv25.unr = phi i64 [ 0, %.lr.ph18.preheader ], [ %indvars.iv.next26.3, %75 ]
  %.unr = phi i32 [ 0, %.lr.ph18.preheader ], [ %76, %75 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge19, label %.lr.ph18.epil

.lr.ph18.epil:                                    ; preds = %._crit_edge19.loopexit.unr-lcssa, %42
  %indvars.iv25.epil = phi i64 [ %indvars.iv.next26.epil, %42 ], [ %indvars.iv25.unr, %._crit_edge19.loopexit.unr-lcssa ]
  %36 = phi i32 [ %43, %42 ], [ %.unr, %._crit_edge19.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %42 ], [ 0, %._crit_edge19.loopexit.unr-lcssa ]
  %37 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %indvars.iv25.epil
  %38 = load i8, ptr %37, align 1, !tbaa !13, !range !15, !noundef !16
  %39 = trunc nuw i8 %38 to i1
  br i1 %39, label %40, label %42

40:                                               ; preds = %.lr.ph18.epil
  %41 = add nsw i32 %36, 1
  store i32 %41, ptr @tot, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %40, %.lr.ph18.epil
  %43 = phi i32 [ %36, %.lr.ph18.epil ], [ %41, %40 ]
  %indvars.iv.next26.epil = add nuw nsw i64 %indvars.iv25.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_edge19, label %.lr.ph18.epil, !llvm.loop !17

._crit_edge19:                                    ; preds = %._crit_edge19.loopexit.unr-lcssa, %42, %._crit_edge15
  %44 = phi i32 [ 0, %._crit_edge15 ], [ %.lcssa34.ph, %._crit_edge19.loopexit.unr-lcssa ], [ %43, %42 ]
  %45 = mul nsw i32 %44, 5
  %46 = mul nsw i32 %33, 3
  %.not10 = icmp slt i32 %45, %46
  %47 = select i1 %.not10, ptr @.str.4, ptr @.str.3
  %48 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %47)
  %49 = load i32, ptr @t, align 4, !tbaa !5
  %50 = add nsw i32 %49, -1
  store i32 %50, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %49, 0
  br i1 %.not, label %._crit_edge23, label %.lr.ph22, !llvm.loop !19

.lr.ph18:                                         ; preds = %75, %.lr.ph18.preheader.new
  %indvars.iv25 = phi i64 [ 0, %.lr.ph18.preheader.new ], [ %indvars.iv.next26.3, %75 ]
  %51 = phi i32 [ 0, %.lr.ph18.preheader.new ], [ %76, %75 ]
  %niter = phi i64 [ 0, %.lr.ph18.preheader.new ], [ %niter.next.3, %75 ]
  %52 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %indvars.iv25
  %53 = load i8, ptr %52, align 4, !tbaa !13, !range !15, !noundef !16
  %54 = trunc nuw i8 %53 to i1
  br i1 %54, label %55, label %.lr.ph18.1

55:                                               ; preds = %.lr.ph18
  %56 = add nsw i32 %51, 1
  store i32 %56, ptr @tot, align 4, !tbaa !5
  br label %.lr.ph18.1

.lr.ph18.1:                                       ; preds = %.lr.ph18, %55
  %57 = phi i32 [ %51, %.lr.ph18 ], [ %56, %55 ]
  %indvars.iv.next26 = or disjoint i64 %indvars.iv25, 1
  %58 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %indvars.iv.next26
  %59 = load i8, ptr %58, align 1, !tbaa !13, !range !15, !noundef !16
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %61, label %.lr.ph18.2

61:                                               ; preds = %.lr.ph18.1
  %62 = add nsw i32 %57, 1
  store i32 %62, ptr @tot, align 4, !tbaa !5
  br label %.lr.ph18.2

.lr.ph18.2:                                       ; preds = %61, %.lr.ph18.1
  %63 = phi i32 [ %57, %.lr.ph18.1 ], [ %62, %61 ]
  %indvars.iv.next26.1 = or disjoint i64 %indvars.iv25, 2
  %64 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %indvars.iv.next26.1
  %65 = load i8, ptr %64, align 2, !tbaa !13, !range !15, !noundef !16
  %66 = trunc nuw i8 %65 to i1
  br i1 %66, label %67, label %.lr.ph18.3

67:                                               ; preds = %.lr.ph18.2
  %68 = add nsw i32 %63, 1
  store i32 %68, ptr @tot, align 4, !tbaa !5
  br label %.lr.ph18.3

.lr.ph18.3:                                       ; preds = %67, %.lr.ph18.2
  %69 = phi i32 [ %63, %.lr.ph18.2 ], [ %68, %67 ]
  %indvars.iv.next26.2 = or disjoint i64 %indvars.iv25, 3
  %70 = getelementptr inbounds [100001 x i8], ptr @vis, i64 0, i64 %indvars.iv.next26.2
  %71 = load i8, ptr %70, align 1, !tbaa !13, !range !15, !noundef !16
  %72 = trunc nuw i8 %71 to i1
  br i1 %72, label %73, label %75

73:                                               ; preds = %.lr.ph18.3
  %74 = add nsw i32 %69, 1
  store i32 %74, ptr @tot, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %73, %.lr.ph18.3
  %76 = phi i32 [ %69, %.lr.ph18.3 ], [ %74, %73 ]
  %indvars.iv.next26.3 = add nuw nsw i64 %indvars.iv25, 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_edge19.loopexit.unr-lcssa, label %.lr.ph18, !llvm.loop !20

._crit_edge23:                                    ; preds = %._crit_edge19, %0
  ret i32 0
}

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(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 = { mustprogress 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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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