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

; 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
@m = external dso_local global i32, align 4
@nxt = external dso_local global [456 x [26 x i32]], align 16
@f = external dso_local global [4194304 x i32], align 16
@s = external dso_local global [26 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 [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

13:                                               ; preds = %9
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef getelementptr inbounds (i8, ptr @s, i64 1))
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = icmp sgt i32 %15, 22
  br i1 %16, label %17, label %19

17:                                               ; preds = %13
  %18 = call i32 @puts(ptr noundef @.str.2)
  br label %9, !llvm.loop !9

19:                                               ; preds = %13
  %20 = call i64 @strlen(ptr noundef getelementptr inbounds (i8, ptr @s, i64 1)) #6
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %37, %19
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %40

27:                                               ; preds = %22
  %28 = load i32, ptr @m, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  %30 = load i32, ptr @m, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %32
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [26 x i32], ptr %33, i64 0, i64 %35
  store i32 %29, ptr %36, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %27
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !11

40:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %41 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %41, ptr %3, align 4, !tbaa !5
  br label %42

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

45:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %71

46:                                               ; preds = %42
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %48
  %50 = getelementptr inbounds [26 x i32], ptr %49, i64 0, i64 0
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %53
  %55 = getelementptr inbounds [26 x i32], ptr %54, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %50, ptr align 8 %55, i64 104, i1 false)
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %58
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [26 x i8], ptr @s, i64 0, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !12
  %64 = sext i8 %63 to i32
  %65 = sub nsw i32 %64, 97
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [26 x i32], ptr %59, i64 0, i64 %66
  store i32 %56, ptr %67, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %46
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = add nsw i32 %69, -1
  store i32 %70, ptr %3, align 4, !tbaa !5
  br label %42, !llvm.loop !13

71:                                               ; preds = %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @nxt, ptr align 8 getelementptr inbounds ([456 x [26 x i32]], ptr @nxt, i64 0, i64 1), i64 104, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = shl i32 1, %72
  store i32 %73, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %116, %71
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %119

79:                                               ; preds = %74
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [4194304 x i32], ptr @f, i64 0, i64 %81
  store i32 0, ptr %82, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %112, %79
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = load i32, ptr @n, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %115

88:                                               ; preds = %83
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = shl i32 1, %90
  %92 = and i32 %89, %91
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %111

94:                                               ; preds = %88
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [4194304 x i32], ptr @f, i64 0, i64 %96
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = shl i32 1, %99
  %101 = xor i32 %98, %100
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [4194304 x i32], ptr @f, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %105
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [26 x i32], ptr %106, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %97, i32 noundef %110)
  br label %111

111:                                              ; preds = %94, %88
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %7, align 4, !tbaa !5
  br label %83, !llvm.loop !14

115:                                              ; preds = %87
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %5, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %5, align 4, !tbaa !5
  br label %74, !llvm.loop !15

119:                                              ; preds = %78
  %120 = load i32, ptr %4, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [4194304 x i32], ptr @f, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr @m, align 4, !tbaa !5
  %126 = icmp sle i32 %124, %125
  %127 = zext i1 %126 to i64
  %128 = select i1 %126, ptr @.str.3, ptr @.str.2
  %129 = call i32 @puts(ptr noundef %128)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %9, !llvm.loop !9

130:                                              ; preds = %9
  ret i32 0
}

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

declare i32 @puts(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

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

; 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) #5

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 = { "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 = { nounwind willreturn memory(read) "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { 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 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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
@m = external dso_local local_unnamed_addr global i32, align 4
@nxt = external dso_local local_unnamed_addr global [456 x [26 x i32]], align 16
@f = external dso_local global [4194304 x i32], align 16
@s = external dso_local global [26 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 [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress norecurse nounwind 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
  %.not40 = icmp eq i32 %2, 0
  br i1 %.not40, label %._crit_edge43, label %.lr.ph42

.lr.ph42:                                         ; preds = %0, %.backedge
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull getelementptr inbounds (i8, ptr @s, i64 1))
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 22
  br i1 %6, label %.backedge, label %10

.backedge:                                        ; preds = %.lr.ph42, %._crit_edge39
  %.str.2.sink = phi ptr [ %44, %._crit_edge39 ], [ @.str.2, %.lr.ph42 ]
  %7 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
  %8 = load i32, ptr @t, align 4, !tbaa !5
  %9 = add nsw i32 %8, -1
  store i32 %9, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %._crit_edge43, label %.lr.ph42, !llvm.loop !9

10:                                               ; preds = %.lr.ph42
  %11 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @s, i64 1)) #6
  %12 = trunc i64 %11 to i32
  store i32 %12, ptr @m, align 4, !tbaa !5
  %13 = icmp sgt i32 %5, 0
  br i1 %13, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %10
  %14 = add nsw i32 %12, 1
  %15 = sext i32 %14 to i64
  %wide.trip.count = zext nneg i32 %5 to i64
  %min.iters.check = icmp ult i32 %5, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

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

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483640
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %14, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %16 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %15, i64 0
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  store <4 x i32> %broadcast.splat, ptr %16, align 8, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %17, align 8, !tbaa !5
  %18 = icmp eq i64 %n.vec, 8
  br i1 %18, label %middle.block, label %vector.body.1, !llvm.loop !11

vector.body.1:                                    ; preds = %vector.ph
  %19 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %15, i64 8
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  store <4 x i32> %broadcast.splat, ptr %19, align 8, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %20, align 8, !tbaa !5
  br label %middle.block

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

.preheader:                                       ; preds = %scalar.ph, %middle.block, %10
  %21 = icmp sgt i32 %12, 0
  br i1 %21, label %.lr.ph31.preheader, label %._crit_edge

.lr.ph31.preheader:                               ; preds = %.preheader
  %22 = and i64 %11, 2147483647
  br label %.lr.ph31

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %23 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %15, i64 %indvars.iv
  store i32 %14, ptr %23, 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 %.preheader, label %scalar.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph31, %.preheader
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) @nxt, ptr noundef nonnull align 8 dereferenceable(104) getelementptr inbounds (i8, ptr @nxt, i64 104), i64 104, i1 false)
  %24 = shl nuw i32 1, %5
  %25 = icmp sgt i32 %24, 1
  br i1 %25, label %.lr.ph38, label %._crit_edge39

.lr.ph38:                                         ; preds = %._crit_edge
  br i1 %13, label %.lr.ph38.split.preheader, label %.lr.ph38.split.us.preheader

.lr.ph38.split.us.preheader:                      ; preds = %.lr.ph38
  %26 = add nsw i32 %24, -1
  %27 = zext nneg i32 %26 to i64
  %28 = shl nuw nsw i64 %27, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @f, i64 4), i8 0, i64 %28, i1 false), !tbaa !5
  br label %._crit_edge39

.lr.ph38.split.preheader:                         ; preds = %.lr.ph38
  %wide.trip.count58 = zext nneg i32 %24 to i64
  br label %.lr.ph38.split

.lr.ph31:                                         ; preds = %.lr.ph31.preheader, %.lr.ph31
  %indvars.iv46 = phi i64 [ %22, %.lr.ph31.preheader ], [ %indvars.iv.next47, %.lr.ph31 ]
  %29 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %indvars.iv46
  %30 = add nuw nsw i64 %indvars.iv46, 1
  %31 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %30
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(104) %29, ptr noundef nonnull align 8 dereferenceable(104) %31, i64 104, i1 false)
  %32 = getelementptr inbounds [26 x i8], ptr @s, i64 0, i64 %indvars.iv46
  %33 = load i8, ptr %32, align 1, !tbaa !15
  %34 = sext i8 %33 to i64
  %35 = add nsw i64 %34, -97
  %36 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %indvars.iv46, i64 %35
  %37 = trunc nuw nsw i64 %indvars.iv46 to i32
  store i32 %37, ptr %36, align 4, !tbaa !5
  %indvars.iv.next47 = add nsw i64 %indvars.iv46, -1
  %38 = icmp ugt i64 %indvars.iv46, 1
  br i1 %38, label %.lr.ph31, label %._crit_edge, !llvm.loop !16

._crit_edge39.loopexit:                           ; preds = %._crit_edge35
  %.pre60 = load i32, ptr @m, align 4, !tbaa !5
  br label %._crit_edge39

._crit_edge39:                                    ; preds = %.lr.ph38.split.us.preheader, %._crit_edge39.loopexit, %._crit_edge
  %39 = phi i32 [ %12, %.lr.ph38.split.us.preheader ], [ %.pre60, %._crit_edge39.loopexit ], [ %12, %._crit_edge ]
  %40 = add nsw i32 %24, -1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [4194304 x i32], ptr @f, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %.not27 = icmp sgt i32 %43, %39
  %44 = select i1 %.not27, ptr @.str.2, ptr @.str.3
  br label %.backedge

.lr.ph38.split:                                   ; preds = %.lr.ph38.split.preheader, %._crit_edge35
  %45 = phi i32 [ %5, %.lr.ph38.split.preheader ], [ %50, %._crit_edge35 ]
  %46 = phi i32 [ %5, %.lr.ph38.split.preheader ], [ %51, %._crit_edge35 ]
  %indvars.iv55 = phi i64 [ 1, %.lr.ph38.split.preheader ], [ %indvars.iv.next56, %._crit_edge35 ]
  %47 = getelementptr inbounds [4194304 x i32], ptr @f, i64 0, i64 %indvars.iv55
  store i32 0, ptr %47, align 4, !tbaa !5
  %48 = icmp sgt i32 %46, 0
  br i1 %48, label %.lr.ph34.preheader, label %._crit_edge35

.lr.ph34.preheader:                               ; preds = %.lr.ph38.split
  %49 = trunc nuw nsw i64 %indvars.iv55 to i32
  br label %.lr.ph34

._crit_edge35:                                    ; preds = %64, %.lr.ph38.split
  %50 = phi i32 [ %45, %.lr.ph38.split ], [ %65, %64 ]
  %51 = phi i32 [ %46, %.lr.ph38.split ], [ %65, %64 ]
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next56, %wide.trip.count58
  br i1 %exitcond59.not, label %._crit_edge39.loopexit, label %.lr.ph38.split, !llvm.loop !17

.lr.ph34:                                         ; preds = %.lr.ph34.preheader, %64
  %52 = phi i32 [ %45, %.lr.ph34.preheader ], [ %65, %64 ]
  %indvars.iv52 = phi i64 [ 0, %.lr.ph34.preheader ], [ %indvars.iv.next53, %64 ]
  %53 = trunc nuw nsw i64 %indvars.iv52 to i32
  %54 = shl nuw i32 1, %53
  %55 = and i32 %54, %49
  %.not28 = icmp eq i32 %55, 0
  br i1 %.not28, label %64, label %56

56:                                               ; preds = %.lr.ph34
  %57 = xor i32 %54, %49
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [4194304 x i32], ptr @f, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [456 x [26 x i32]], ptr @nxt, i64 0, i64 %61, i64 %indvars.iv52
  %63 = load i32, ptr %62, align 4, !tbaa !5
  tail call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %47, i32 noundef %63)
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %.lr.ph34, %56
  %65 = phi i32 [ %52, %.lr.ph34 ], [ %.pre, %56 ]
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %66 = sext i32 %65 to i64
  %67 = icmp slt i64 %indvars.iv.next53, %66
  br i1 %67, label %.lr.ph34, label %._crit_edge35, !llvm.loop !19

._crit_edge43:                                    ; preds = %.backedge, %0
  ret i32 0
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress 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) #4

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

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 = { 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 nofree nounwind willreturn memory(argmem: read) "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: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind willreturn memory(read) }

!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, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10, !13, !12}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !10}


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