; LLVM IR from tangjz/acm-icpc :: lydsy (2375)

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

%"struct.fastIO::Ostream_fwrite" = type { ptr, ptr, ptr }

@_ZN6fastIO7OstreamE = external dso_local global %"struct.fastIO::Ostream_fwrite", align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@fa = external dso_local global [1000001 x i32], align 16
@ans = external dso_local global [1000001 x i32], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(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
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @p, ptr noundef @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %22, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %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) #5
  br label %25

17:                                               ; preds = %12
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %20
  store i32 %18, ptr %21, align 4, !tbaa !5
  br label %22

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

25:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %26 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %26, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = load i32, ptr @p, align 4, !tbaa !5
  %29 = mul nsw i32 %27, %28
  %30 = load i32, ptr @q, align 4, !tbaa !5
  %31 = add nsw i32 %29, %30
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = srem i32 %31, %32
  store i32 %33, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = load i32, ptr @q, align 4, !tbaa !5
  %36 = mul nsw i32 %34, %35
  %37 = load i32, ptr @p, align 4, !tbaa !5
  %38 = add nsw i32 %36, %37
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = srem i32 %38, %39
  store i32 %40, ptr %5, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %98, %25
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %46 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %46, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %47 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %47, ptr %8, align 4, !tbaa !5
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = icmp sgt i32 %48, %49
  br i1 %50, label %51, label %52

51:                                               ; preds = %45
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #5
  br label %52

52:                                               ; preds = %51, %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = call noundef i32 @_Z4findi(i32 noundef %53)
  store i32 %54, ptr %9, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %71, %52
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %74

60:                                               ; preds = %55
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [1000001 x i32], ptr @ans, i64 0, i64 %63
  store i32 %61, ptr %64, align 4, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  %67 = call noundef i32 @_Z4findi(i32 noundef %66)
  %68 = load i32, ptr %9, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %69
  store i32 %67, ptr %70, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %60
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = call noundef i32 @_Z4findi(i32 noundef %72)
  store i32 %73, ptr %9, align 4, !tbaa !5
  br label %55, !llvm.loop !11

74:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = add nsw i32 %76, -1
  store i32 %77, ptr %3, align 4, !tbaa !5
  %78 = load i32, ptr @p, align 4, !tbaa !5
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sub nsw i32 %79, %78
  store i32 %80, ptr %4, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 0
  br i1 %81, label %82, label %87

82:                                               ; preds = %75
  %83 = load i32, ptr @n, align 4, !tbaa !5
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = add nsw i32 %84, %83
  store i32 %85, ptr %4, align 4, !tbaa !5
  %86 = icmp ne i32 %85, 0
  br label %87

87:                                               ; preds = %82, %75
  %88 = phi i1 [ false, %75 ], [ %86, %82 ]
  %89 = load i32, ptr @q, align 4, !tbaa !5
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = sub nsw i32 %90, %89
  store i32 %91, ptr %5, align 4, !tbaa !5
  %92 = icmp slt i32 %91, 0
  br i1 %92, label %93, label %98

93:                                               ; preds = %87
  %94 = load i32, ptr @n, align 4, !tbaa !5
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = add nsw i32 %95, %94
  store i32 %96, ptr %5, align 4, !tbaa !5
  %97 = icmp ne i32 %96, 0
  br label %98

98:                                               ; preds = %93, %87
  %99 = phi i1 [ false, %87 ], [ %97, %93 ]
  br label %41, !llvm.loop !12

100:                                              ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %111, %100
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = load i32, ptr @n, align 4, !tbaa !5
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %114

106:                                              ; preds = %101
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1000001 x i32], ptr @ans, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  call void @_ZN6fastIO14Ostream_fwrite7printlnEi(ptr noundef nonnull align 8 dereferenceable(24) @_ZN6fastIO7OstreamE, i32 noundef %110)
  br label %111

111:                                              ; preds = %106
  %112 = load i32, ptr %10, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %10, align 4, !tbaa !5
  br label %101, !llvm.loop !13

114:                                              ; preds = %105
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6fastIO14Ostream_fwrite7printlnEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #0 align 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 = { "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #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}


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

%"struct.fastIO::Ostream_fwrite" = type { ptr, ptr, ptr }

@_ZN6fastIO7OstreamE = external dso_local global %"struct.fastIO::Ostream_fwrite", align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@fa = external dso_local local_unnamed_addr global [1000001 x i32], align 16
@ans = external dso_local local_unnamed_addr global [1000001 x i32], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @p, ptr noundef nonnull @q)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not35 = icmp slt i32 %4, 0
  br i1 %.not35, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %5 = add nuw i32 %4, 1
  %wide.trip.count = zext i32 %5 to i64
  %min.iters.check = icmp ult i32 %4, 7
  br i1 %min.iters.check, label %.lr.ph.preheader55, label %vector.ph

.lr.ph.preheader55:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 4294967288
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %6 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %index
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  store <4 x i32> %vec.ind, ptr %6, align 16, !tbaa !5
  store <4 x i32> %step.add, ptr %7, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %8 = icmp eq i64 %index.next, %n.vec
  br i1 %8, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader55

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph46.preheader, label %.preheader

.lr.ph46.preheader:                               ; preds = %._crit_edge
  %11 = load i32, ptr @q, align 4, !tbaa !5
  %12 = mul nsw i32 %11, %9
  %13 = load i32, ptr @p, align 4, !tbaa !5
  %14 = add nsw i32 %12, %13
  %15 = srem i32 %14, %4
  %16 = mul nsw i32 %13, %9
  %17 = add nsw i32 %16, %11
  %18 = srem i32 %17, %4
  br label %.lr.ph46

.lr.ph:                                           ; preds = %.lr.ph.preheader55, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader55 ]
  %19 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %indvars.iv
  %20 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %20, ptr %19, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

.preheader:                                       ; preds = %._crit_edge41, %._crit_edge
  %21 = phi i32 [ %4, %._crit_edge ], [ %33, %._crit_edge41 ]
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph48, label %._crit_edge49

.lr.ph46:                                         ; preds = %.lr.ph46.preheader, %._crit_edge41
  %.02444 = phi i32 [ %.1, %._crit_edge41 ], [ %15, %.lr.ph46.preheader ]
  %.02543 = phi i32 [ %.126, %._crit_edge41 ], [ %18, %.lr.ph46.preheader ]
  %.02742 = phi i32 [ %29, %._crit_edge41 ], [ %9, %.lr.ph46.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 %.02543, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 %.02444, ptr %2, align 4, !tbaa !5
  %23 = icmp sgt i32 %.02543, %.02444
  br i1 %23, label %24, label %25

24:                                               ; preds = %.lr.ph46
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) #5
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %24, %.lr.ph46
  %26 = phi i32 [ %.pre, %24 ], [ %.02543, %.lr.ph46 ]
  %27 = call noundef i32 @_Z4findi(i32 noundef %26)
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %.not3437 = icmp sgt i32 %27, %28
  br i1 %.not3437, label %._crit_edge41, label %.lr.ph40

._crit_edge41:                                    ; preds = %.lr.ph40, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %29 = add nsw i32 %.02742, -1
  %30 = load i32, ptr @p, align 4, !tbaa !5
  %31 = sub nsw i32 %.02543, %30
  %32 = icmp slt i32 %31, 0
  %33 = load i32, ptr @n, align 4
  %34 = select i1 %32, i32 %33, i32 0
  %.126 = add nsw i32 %34, %31
  %35 = load i32, ptr @q, align 4, !tbaa !5
  %36 = sub nsw i32 %.02444, %35
  %37 = icmp slt i32 %36, 0
  %38 = select i1 %37, i32 %33, i32 0
  %.1 = add nsw i32 %38, %36
  %39 = icmp sgt i32 %.02742, 1
  br i1 %39, label %.lr.ph46, label %.preheader, !llvm.loop !14

.lr.ph40:                                         ; preds = %25, %.lr.ph40
  %.02338 = phi i32 [ %45, %.lr.ph40 ], [ %27, %25 ]
  %40 = sext i32 %.02338 to i64
  %41 = getelementptr inbounds [1000001 x i32], ptr @ans, i64 0, i64 %40
  store i32 %.02742, ptr %41, align 4, !tbaa !5
  %42 = add nsw i32 %.02338, 1
  %43 = call noundef i32 @_Z4findi(i32 noundef %42)
  %44 = getelementptr inbounds [1000001 x i32], ptr @fa, i64 0, i64 %40
  store i32 %43, ptr %44, align 4, !tbaa !5
  %45 = call noundef i32 @_Z4findi(i32 noundef %.02338)
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %.not34 = icmp sgt i32 %45, %46
  br i1 %.not34, label %._crit_edge41, label %.lr.ph40, !llvm.loop !15

._crit_edge49:                                    ; preds = %.lr.ph48, %.preheader
  ret i32 0

.lr.ph48:                                         ; preds = %.preheader, %.lr.ph48
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph48 ], [ 0, %.preheader ]
  %47 = getelementptr inbounds [1000001 x i32], ptr @ans, i64 0, i64 %indvars.iv51
  %48 = load i32, ptr %47, align 4, !tbaa !5
  call void @_ZN6fastIO14Ostream_fwrite7printlnEi(ptr noundef nonnull align 8 dereferenceable(24) @_ZN6fastIO7OstreamE, i32 noundef %48)
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next52, %50
  br i1 %51, label %.lr.ph48, label %._crit_edge49, !llvm.loop !16
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6fastIO14Ostream_fwrite7printlnEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #0 align 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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint 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 #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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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