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

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@w = external dso_local global [2002 x i32], align 16
@f = external dso_local global [2002 x i8], align 16
@g = external dso_local global [2002 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

13:                                               ; preds = %9
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %68

14:                                               ; preds = %9
  %15 = load i32, ptr %2, align 4, !tbaa !8
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i32, ptr @w, i64 %16
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %19 = load i32, ptr @m, align 4, !tbaa !8
  store i32 %19, ptr %4, align 4, !tbaa !8
  br label %20

20:                                               ; preds = %61, %14
  %21 = load i32, ptr %4, align 4, !tbaa !8
  %22 = load i32, ptr %2, align 4, !tbaa !8
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [2002 x i32], ptr @w, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !8
  %26 = icmp sge i32 %21, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %20
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %64

28:                                               ; preds = %20
  %29 = load i32, ptr %4, align 4, !tbaa !8
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [2002 x i32], ptr @w, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !8
  %34 = sub nsw i32 %29, %33
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [2002 x i8], ptr @f, i64 0, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !5
  %38 = sext i8 %37 to i32
  %39 = load i32, ptr %4, align 4, !tbaa !8
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [2002 x i8], ptr @f, i64 0, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !5
  %43 = sext i8 %42 to i32
  %44 = add nsw i32 %43, %38
  %45 = trunc i32 %44 to i8
  store i8 %45, ptr %41, align 1, !tbaa !5
  %46 = load i32, ptr %4, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [2002 x i8], ptr @f, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !5
  %50 = sext i8 %49 to i32
  %51 = icmp sge i32 %50, 10
  br i1 %51, label %52, label %60

52:                                               ; preds = %28
  %53 = load i32, ptr %4, align 4, !tbaa !8
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [2002 x i8], ptr @f, i64 0, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !5
  %57 = sext i8 %56 to i32
  %58 = sub nsw i32 %57, 10
  %59 = trunc i32 %58 to i8
  store i8 %59, ptr %55, align 1, !tbaa !5
  br label %60

60:                                               ; preds = %52, %28
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = add nsw i32 %62, -1
  store i32 %63, ptr %4, align 4, !tbaa !8
  br label %20, !llvm.loop !10

64:                                               ; preds = %27
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %2, align 4, !tbaa !8
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %2, align 4, !tbaa !8
  br label %9, !llvm.loop !12

68:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %149, %68
  %70 = load i32, ptr %5, align 4, !tbaa !8
  %71 = load i32, ptr @n, align 4, !tbaa !8
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %152

74:                                               ; preds = %69
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @g, ptr align 16 @f, i64 2002, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %75 = load i32, ptr %5, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [2002 x i32], ptr @w, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !8
  store i32 %78, ptr %6, align 4, !tbaa !8
  br label %79

79:                                               ; preds = %127, %74
  %80 = load i32, ptr %6, align 4, !tbaa !8
  %81 = load i32, ptr @m, align 4, !tbaa !8
  %82 = icmp sle i32 %80, %81
  br i1 %82, label %84, label %83

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

84:                                               ; preds = %79
  %85 = load i32, ptr %6, align 4, !tbaa !8
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %86
  %88 = load i8, ptr %87, align 1, !tbaa !5
  %89 = sext i8 %88 to i32
  %90 = load i32, ptr %6, align 4, !tbaa !8
  %91 = load i32, ptr %5, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [2002 x i32], ptr @w, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !8
  %95 = sub nsw i32 %90, %94
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %96
  %98 = load i8, ptr %97, align 1, !tbaa !5
  %99 = sext i8 %98 to i32
  %100 = icmp slt i32 %89, %99
  br i1 %100, label %101, label %109

101:                                              ; preds = %84
  %102 = load i32, ptr %6, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %103
  %105 = load i8, ptr %104, align 1, !tbaa !5
  %106 = sext i8 %105 to i32
  %107 = add nsw i32 %106, 10
  %108 = trunc i32 %107 to i8
  store i8 %108, ptr %104, align 1, !tbaa !5
  br label %109

109:                                              ; preds = %101, %84
  %110 = load i32, ptr %6, align 4, !tbaa !8
  %111 = load i32, ptr %5, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [2002 x i32], ptr @w, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !8
  %115 = sub nsw i32 %110, %114
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %116
  %118 = load i8, ptr %117, align 1, !tbaa !5
  %119 = sext i8 %118 to i32
  %120 = load i32, ptr %6, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !5
  %124 = sext i8 %123 to i32
  %125 = sub nsw i32 %124, %119
  %126 = trunc i32 %125 to i8
  store i8 %126, ptr %122, align 1, !tbaa !5
  br label %127

127:                                              ; preds = %109
  %128 = load i32, ptr %6, align 4, !tbaa !8
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %6, align 4, !tbaa !8
  br label %79, !llvm.loop !13

130:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !8
  br label %131

131:                                              ; preds = %144, %130
  %132 = load i32, ptr %7, align 4, !tbaa !8
  %133 = load i32, ptr @m, align 4, !tbaa !8
  %134 = icmp sle i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %147

136:                                              ; preds = %131
  %137 = load i32, ptr %7, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %138
  %140 = load i8, ptr %139, align 1, !tbaa !5
  %141 = sext i8 %140 to i32
  %142 = add nsw i32 %141, 48
  %143 = trunc i32 %142 to i8
  store i8 %143, ptr %139, align 1, !tbaa !5
  br label %144

144:                                              ; preds = %136
  %145 = load i32, ptr %7, align 4, !tbaa !8
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %7, align 4, !tbaa !8
  br label %131, !llvm.loop !14

147:                                              ; preds = %135
  %148 = call i32 @puts(ptr noundef getelementptr inbounds (i8, ptr @g, i64 1))
  br label %149

149:                                              ; preds = %147
  %150 = load i32, ptr %5, align 4, !tbaa !8
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %5, align 4, !tbaa !8
  br label %69, !llvm.loop !15

152:                                              ; preds = %73
  ret i32 0
}

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

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

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

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

declare i32 @puts(ptr noundef) #1

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}


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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@w = external dso_local global [2002 x i32], align 16
@f = external dso_local local_unnamed_addr global [2002 x i8], align 16
@g = external dso_local global [2002 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  store i8 1, ptr @f, align 16, !tbaa !5
  %2 = load i32, ptr @n, align 4, !tbaa !8
  %.not40 = icmp slt i32 %2, 1
  br i1 %.not40, label %._crit_edge55, label %.lr.ph43

.preheader37:                                     ; preds = %._crit_edge
  %3 = icmp slt i32 %29, 1
  br i1 %3, label %._crit_edge55, label %.lr.ph54

.lr.ph43:                                         ; preds = %0, %._crit_edge
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %._crit_edge ], [ 1, %0 ]
  %4 = getelementptr inbounds i32, ptr @w, i64 %indvars.iv57
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %4)
  %6 = load i32, ptr @m, align 4, !tbaa !8
  %7 = load i32, ptr %4, align 4, !tbaa !8
  %.not3638 = icmp slt i32 %6, %7
  br i1 %.not3638, label %._crit_edge, label %iter.check

iter.check:                                       ; preds = %.lr.ph43
  %8 = sext i32 %6 to i64
  %9 = sext i32 %7 to i64
  %10 = add nsw i64 %8, 1
  %11 = sub nsw i64 %10, %9
  %min.iters.check = icmp ult i64 %11, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %iter.check
  %12 = sub nsw i64 %8, %9
  %scevgep = getelementptr i8, ptr @f, i64 %8
  %13 = sub nsw i64 0, %12
  %14 = getelementptr i8, ptr %scevgep, i64 %13
  %15 = icmp ugt ptr %14, %scevgep
  %scevgep71 = getelementptr i8, ptr @f, i64 %12
  %16 = icmp ult ptr %scevgep71, @f
  %17 = or i1 %15, %16
  br i1 %17, label %.lr.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %scevgep75 = getelementptr i8, ptr @f, i64 %9
  %scevgep76 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 1), i64 %8
  %18 = sub nsw i64 %8, %9
  %scevgep77 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 1), i64 %18
  %bound0 = icmp ult ptr %scevgep75, %scevgep77
  %bound1 = icmp ugt ptr %scevgep76, @f
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.memcheck
  %min.iters.check78 = icmp ult i64 %11, 16
  br i1 %min.iters.check78, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %11, -16
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = sub i64 %8, %index
  %19 = sub nsw i64 %offset.idx, %9
  %gep = getelementptr [2002 x i8], ptr getelementptr (i8, ptr @f, i64 -15), i64 0, i64 %19
  %wide.load = load <16 x i8>, ptr %gep, align 1, !tbaa !5, !alias.scope !10
  %gep221 = getelementptr [2002 x i8], ptr getelementptr (i8, ptr @f, i64 -15), i64 0, i64 %offset.idx
  %wide.load79 = load <16 x i8>, ptr %gep221, align 1, !tbaa !5, !alias.scope !13, !noalias !10
  %20 = add <16 x i8> %wide.load79, %wide.load
  %21 = icmp sgt <16 x i8> %20, <i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9>
  %22 = add nsw <16 x i8> %20, <i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10>
  %reverse81 = select <16 x i1> %21, <16 x i8> %22, <16 x i8> %20
  store <16 x i8> %reverse81, ptr %gep221, align 1, !tbaa !5, !alias.scope !13, !noalias !10
  %index.next = add nuw i64 %index, 16
  %23 = icmp eq i64 %index.next, %n.vec
  br i1 %23, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %11, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end84 = sub nsw i64 %8, %n.vec
  %n.vec.remaining = and i64 %11, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %.lr.ph.preheader, label %vec.epilog.ph

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %vector.memcheck, %vector.scevcheck, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ %8, %iter.check ], [ %8, %vector.memcheck ], [ %8, %vector.scevcheck ], [ %ind.end84, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  br label %.lr.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec83 = and i64 %11, -8
  %ind.end = sub nsw i64 %8, %n.vec83
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index85 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next92, %vec.epilog.vector.body ]
  %offset.idx86 = sub i64 %8, %index85
  %24 = sub nsw i64 %offset.idx86, %9
  %gep222 = getelementptr [2002 x i8], ptr getelementptr (i8, ptr @f, i64 -7), i64 0, i64 %24
  %wide.load87 = load <8 x i8>, ptr %gep222, align 1, !tbaa !5, !alias.scope !19
  %gep223 = getelementptr [2002 x i8], ptr getelementptr (i8, ptr @f, i64 -7), i64 0, i64 %offset.idx86
  %wide.load89 = load <8 x i8>, ptr %gep223, align 1, !tbaa !5, !alias.scope !22, !noalias !19
  %25 = add <8 x i8> %wide.load89, %wide.load87
  %26 = icmp sgt <8 x i8> %25, <i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9, i8 9>
  %27 = add nsw <8 x i8> %25, <i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10, i8 -10>
  %reverse91 = select <8 x i1> %26, <8 x i8> %27, <8 x i8> %25
  store <8 x i8> %reverse91, ptr %gep223, align 1, !tbaa !5, !alias.scope !22, !noalias !19
  %index.next92 = add nuw i64 %index85, 8
  %28 = icmp eq i64 %index.next92, %n.vec83
  br i1 %28, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !24

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n93 = icmp eq i64 %11, %n.vec83
  br i1 %cmp.n93, label %._crit_edge, label %.lr.ph.preheader

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %vec.epilog.middle.block, %.lr.ph43
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %29 = load i32, ptr @n, align 4, !tbaa !8
  %30 = sext i32 %29 to i64
  %.not.not = icmp slt i64 %indvars.iv57, %30
  br i1 %.not.not, label %.lr.ph43, label %.preheader37, !llvm.loop !25

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %31 = sub nsw i64 %indvars.iv, %9
  %32 = getelementptr inbounds [2002 x i8], ptr @f, i64 0, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !5
  %34 = getelementptr inbounds [2002 x i8], ptr @f, i64 0, i64 %indvars.iv
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %36 = add i8 %35, %33
  %37 = icmp sgt i8 %36, 9
  %38 = add nsw i8 %36, -10
  %spec.select = select i1 %37, i8 %38, i8 %36
  store i8 %spec.select, ptr %34, align 1, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.not36.not = icmp sgt i64 %indvars.iv, %9
  br i1 %.not36.not, label %.lr.ph, label %._crit_edge, !llvm.loop !26

._crit_edge55:                                    ; preds = %._crit_edge51, %0, %.preheader37
  ret i32 0

.lr.ph54:                                         ; preds = %.preheader37, %._crit_edge51
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %._crit_edge51 ], [ 1, %.preheader37 ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(2002) @g, ptr noundef nonnull align 16 dereferenceable(2002) @f, i64 2002, i1 false)
  %39 = getelementptr inbounds [2002 x i32], ptr @w, i64 0, i64 %indvars.iv67
  %40 = load i32, ptr %39, align 4, !tbaa !8
  %41 = load i32, ptr @m, align 4, !tbaa !8
  %.not3444 = icmp sgt i32 %40, %41
  br i1 %.not3444, label %.preheader, label %iter.check138

iter.check138:                                    ; preds = %.lr.ph54
  %42 = sext i32 %40 to i64
  %43 = add i32 %41, 1
  %44 = sub i32 %41, %40
  %45 = zext i32 %44 to i64
  %46 = add nuw nsw i64 %45, 1
  %min.iters.check136 = icmp ult i32 %44, 7
  br i1 %min.iters.check136, label %.lr.ph47.preheader, label %vector.memcheck128

vector.memcheck128:                               ; preds = %iter.check138
  %scevgep129 = getelementptr i8, ptr @g, i64 %42
  %47 = sub i32 %41, %40
  %48 = zext i32 %47 to i64
  %49 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @g, i64 1), i64 %42
  %scevgep130 = getelementptr i8, ptr %49, i64 %48
  %scevgep131 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @g, i64 1), i64 %48
  %bound0132 = icmp ult ptr %scevgep129, %scevgep131
  %bound1133 = icmp ugt ptr %scevgep130, @g
  %found.conflict134 = and i1 %bound0132, %bound1133
  br i1 %found.conflict134, label %.lr.ph47.preheader, label %vector.main.loop.iter.check140

vector.main.loop.iter.check140:                   ; preds = %vector.memcheck128
  %min.iters.check139 = icmp ult i32 %44, 15
  br i1 %min.iters.check139, label %vec.epilog.ph185, label %vector.ph141

vector.ph141:                                     ; preds = %vector.main.loop.iter.check140
  %n.vec143 = and i64 %46, 8589934576
  br label %vector.body144

vector.body144:                                   ; preds = %pred.store.continue178, %vector.ph141
  %index145 = phi i64 [ 0, %vector.ph141 ], [ %index.next181, %pred.store.continue178 ]
  %offset.idx146 = add i64 %index145, %42
  %50 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %offset.idx146
  %wide.load147 = load <16 x i8>, ptr %50, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  %51 = getelementptr [2002 x i8], ptr @g, i64 0, i64 %index145
  %wide.load148 = load <16 x i8>, ptr %51, align 16, !tbaa !5, !alias.scope !30
  %52 = icmp slt <16 x i8> %wide.load147, %wide.load148
  %53 = add <16 x i8> %wide.load147, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %54 = extractelement <16 x i1> %52, i64 0
  br i1 %54, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body144
  %55 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %offset.idx146
  %56 = extractelement <16 x i8> %53, i64 0
  store i8 %56, ptr %55, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body144
  %57 = extractelement <16 x i1> %52, i64 1
  br i1 %57, label %pred.store.if149, label %pred.store.continue150

pred.store.if149:                                 ; preds = %pred.store.continue
  %58 = add i64 %offset.idx146, 1
  %59 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %58
  %60 = extractelement <16 x i8> %53, i64 1
  store i8 %60, ptr %59, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue150

pred.store.continue150:                           ; preds = %pred.store.if149, %pred.store.continue
  %61 = extractelement <16 x i1> %52, i64 2
  br i1 %61, label %pred.store.if151, label %pred.store.continue152

pred.store.if151:                                 ; preds = %pred.store.continue150
  %62 = add i64 %offset.idx146, 2
  %63 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %62
  %64 = extractelement <16 x i8> %53, i64 2
  store i8 %64, ptr %63, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue152

pred.store.continue152:                           ; preds = %pred.store.if151, %pred.store.continue150
  %65 = extractelement <16 x i1> %52, i64 3
  br i1 %65, label %pred.store.if153, label %pred.store.continue154

pred.store.if153:                                 ; preds = %pred.store.continue152
  %66 = add i64 %offset.idx146, 3
  %67 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %66
  %68 = extractelement <16 x i8> %53, i64 3
  store i8 %68, ptr %67, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue154

pred.store.continue154:                           ; preds = %pred.store.if153, %pred.store.continue152
  %69 = extractelement <16 x i1> %52, i64 4
  br i1 %69, label %pred.store.if155, label %pred.store.continue156

pred.store.if155:                                 ; preds = %pred.store.continue154
  %70 = add i64 %offset.idx146, 4
  %71 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %70
  %72 = extractelement <16 x i8> %53, i64 4
  store i8 %72, ptr %71, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue156

pred.store.continue156:                           ; preds = %pred.store.if155, %pred.store.continue154
  %73 = extractelement <16 x i1> %52, i64 5
  br i1 %73, label %pred.store.if157, label %pred.store.continue158

pred.store.if157:                                 ; preds = %pred.store.continue156
  %74 = add i64 %offset.idx146, 5
  %75 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %74
  %76 = extractelement <16 x i8> %53, i64 5
  store i8 %76, ptr %75, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue158

pred.store.continue158:                           ; preds = %pred.store.if157, %pred.store.continue156
  %77 = extractelement <16 x i1> %52, i64 6
  br i1 %77, label %pred.store.if159, label %pred.store.continue160

pred.store.if159:                                 ; preds = %pred.store.continue158
  %78 = add i64 %offset.idx146, 6
  %79 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %78
  %80 = extractelement <16 x i8> %53, i64 6
  store i8 %80, ptr %79, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue160

pred.store.continue160:                           ; preds = %pred.store.if159, %pred.store.continue158
  %81 = extractelement <16 x i1> %52, i64 7
  br i1 %81, label %pred.store.if161, label %pred.store.continue162

pred.store.if161:                                 ; preds = %pred.store.continue160
  %82 = add i64 %offset.idx146, 7
  %83 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %82
  %84 = extractelement <16 x i8> %53, i64 7
  store i8 %84, ptr %83, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue162

pred.store.continue162:                           ; preds = %pred.store.if161, %pred.store.continue160
  %85 = extractelement <16 x i1> %52, i64 8
  br i1 %85, label %pred.store.if163, label %pred.store.continue164

pred.store.if163:                                 ; preds = %pred.store.continue162
  %86 = add i64 %offset.idx146, 8
  %87 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %86
  %88 = extractelement <16 x i8> %53, i64 8
  store i8 %88, ptr %87, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue164

pred.store.continue164:                           ; preds = %pred.store.if163, %pred.store.continue162
  %89 = extractelement <16 x i1> %52, i64 9
  br i1 %89, label %pred.store.if165, label %pred.store.continue166

pred.store.if165:                                 ; preds = %pred.store.continue164
  %90 = add i64 %offset.idx146, 9
  %91 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %90
  %92 = extractelement <16 x i8> %53, i64 9
  store i8 %92, ptr %91, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue166

pred.store.continue166:                           ; preds = %pred.store.if165, %pred.store.continue164
  %93 = extractelement <16 x i1> %52, i64 10
  br i1 %93, label %pred.store.if167, label %pred.store.continue168

pred.store.if167:                                 ; preds = %pred.store.continue166
  %94 = add i64 %offset.idx146, 10
  %95 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %94
  %96 = extractelement <16 x i8> %53, i64 10
  store i8 %96, ptr %95, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue168

pred.store.continue168:                           ; preds = %pred.store.if167, %pred.store.continue166
  %97 = extractelement <16 x i1> %52, i64 11
  br i1 %97, label %pred.store.if169, label %pred.store.continue170

pred.store.if169:                                 ; preds = %pred.store.continue168
  %98 = add i64 %offset.idx146, 11
  %99 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %98
  %100 = extractelement <16 x i8> %53, i64 11
  store i8 %100, ptr %99, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue170

pred.store.continue170:                           ; preds = %pred.store.if169, %pred.store.continue168
  %101 = extractelement <16 x i1> %52, i64 12
  br i1 %101, label %pred.store.if171, label %pred.store.continue172

pred.store.if171:                                 ; preds = %pred.store.continue170
  %102 = add i64 %offset.idx146, 12
  %103 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %102
  %104 = extractelement <16 x i8> %53, i64 12
  store i8 %104, ptr %103, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue172

pred.store.continue172:                           ; preds = %pred.store.if171, %pred.store.continue170
  %105 = extractelement <16 x i1> %52, i64 13
  br i1 %105, label %pred.store.if173, label %pred.store.continue174

pred.store.if173:                                 ; preds = %pred.store.continue172
  %106 = add i64 %offset.idx146, 13
  %107 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %106
  %108 = extractelement <16 x i8> %53, i64 13
  store i8 %108, ptr %107, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue174

pred.store.continue174:                           ; preds = %pred.store.if173, %pred.store.continue172
  %109 = extractelement <16 x i1> %52, i64 14
  br i1 %109, label %pred.store.if175, label %pred.store.continue176

pred.store.if175:                                 ; preds = %pred.store.continue174
  %110 = add i64 %offset.idx146, 14
  %111 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %110
  %112 = extractelement <16 x i8> %53, i64 14
  store i8 %112, ptr %111, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue176

pred.store.continue176:                           ; preds = %pred.store.if175, %pred.store.continue174
  %113 = extractelement <16 x i1> %52, i64 15
  br i1 %113, label %pred.store.if177, label %pred.store.continue178

pred.store.if177:                                 ; preds = %pred.store.continue176
  %114 = add i64 %offset.idx146, 15
  %115 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %114
  %116 = extractelement <16 x i8> %53, i64 15
  store i8 %116, ptr %115, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  br label %pred.store.continue178

pred.store.continue178:                           ; preds = %pred.store.if177, %pred.store.continue176
  %wide.load179 = load <16 x i8>, ptr %51, align 16, !tbaa !5, !alias.scope !30
  %predphi = select <16 x i1> %52, <16 x i8> %53, <16 x i8> %wide.load147
  %predphi180 = select <16 x i1> %52, <16 x i8> %wide.load179, <16 x i8> %wide.load148
  %117 = sub <16 x i8> %predphi, %predphi180
  store <16 x i8> %117, ptr %50, align 1, !tbaa !5, !alias.scope !27, !noalias !30
  %index.next181 = add nuw i64 %index145, 16
  %118 = icmp eq i64 %index.next181, %n.vec143
  br i1 %118, label %middle.block135, label %vector.body144, !llvm.loop !32

middle.block135:                                  ; preds = %pred.store.continue178
  %cmp.n182 = icmp eq i64 %46, %n.vec143
  br i1 %cmp.n182, label %.preheader, label %vec.epilog.iter.check186

vec.epilog.iter.check186:                         ; preds = %middle.block135
  %ind.end193 = add nsw i64 %n.vec143, %42
  %n.vec.remaining187 = and i64 %46, 8
  %min.epilog.iters.check188.not.not = icmp eq i64 %n.vec.remaining187, 0
  br i1 %min.epilog.iters.check188.not.not, label %.lr.ph47.preheader, label %vec.epilog.ph185

.lr.ph47.preheader:                               ; preds = %vec.epilog.middle.block183, %vector.memcheck128, %iter.check138, %vec.epilog.iter.check186
  %indvars.iv60.ph = phi i64 [ %42, %iter.check138 ], [ %42, %vector.memcheck128 ], [ %ind.end193, %vec.epilog.iter.check186 ], [ %ind.end192, %vec.epilog.middle.block183 ]
  br label %.lr.ph47

vec.epilog.ph185:                                 ; preds = %vector.main.loop.iter.check140, %vec.epilog.iter.check186
  %vec.epilog.resume.val189 = phi i64 [ %n.vec143, %vec.epilog.iter.check186 ], [ 0, %vector.main.loop.iter.check140 ]
  %n.vec191 = and i64 %46, 8589934584
  %ind.end192 = add nsw i64 %n.vec191, %42
  br label %vec.epilog.vector.body195

vec.epilog.vector.body195:                        ; preds = %pred.store.continue215, %vec.epilog.ph185
  %index196 = phi i64 [ %vec.epilog.resume.val189, %vec.epilog.ph185 ], [ %index.next219, %pred.store.continue215 ]
  %offset.idx197 = add i64 %index196, %42
  %119 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %offset.idx197
  %wide.load198 = load <8 x i8>, ptr %119, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  %120 = getelementptr [2002 x i8], ptr @g, i64 0, i64 %index196
  %wide.load199 = load <8 x i8>, ptr %120, align 8, !tbaa !5, !alias.scope !36
  %121 = icmp slt <8 x i8> %wide.load198, %wide.load199
  %122 = add <8 x i8> %wide.load198, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
  %123 = extractelement <8 x i1> %121, i64 0
  br i1 %123, label %pred.store.if200, label %pred.store.continue201

pred.store.if200:                                 ; preds = %vec.epilog.vector.body195
  %124 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %offset.idx197
  %125 = extractelement <8 x i8> %122, i64 0
  store i8 %125, ptr %124, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  br label %pred.store.continue201

pred.store.continue201:                           ; preds = %pred.store.if200, %vec.epilog.vector.body195
  %126 = extractelement <8 x i1> %121, i64 1
  br i1 %126, label %pred.store.if202, label %pred.store.continue203

pred.store.if202:                                 ; preds = %pred.store.continue201
  %127 = add i64 %offset.idx197, 1
  %128 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %127
  %129 = extractelement <8 x i8> %122, i64 1
  store i8 %129, ptr %128, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  br label %pred.store.continue203

pred.store.continue203:                           ; preds = %pred.store.if202, %pred.store.continue201
  %130 = extractelement <8 x i1> %121, i64 2
  br i1 %130, label %pred.store.if204, label %pred.store.continue205

pred.store.if204:                                 ; preds = %pred.store.continue203
  %131 = add i64 %offset.idx197, 2
  %132 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %131
  %133 = extractelement <8 x i8> %122, i64 2
  store i8 %133, ptr %132, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  br label %pred.store.continue205

pred.store.continue205:                           ; preds = %pred.store.if204, %pred.store.continue203
  %134 = extractelement <8 x i1> %121, i64 3
  br i1 %134, label %pred.store.if206, label %pred.store.continue207

pred.store.if206:                                 ; preds = %pred.store.continue205
  %135 = add i64 %offset.idx197, 3
  %136 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %135
  %137 = extractelement <8 x i8> %122, i64 3
  store i8 %137, ptr %136, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  br label %pred.store.continue207

pred.store.continue207:                           ; preds = %pred.store.if206, %pred.store.continue205
  %138 = extractelement <8 x i1> %121, i64 4
  br i1 %138, label %pred.store.if208, label %pred.store.continue209

pred.store.if208:                                 ; preds = %pred.store.continue207
  %139 = add i64 %offset.idx197, 4
  %140 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %139
  %141 = extractelement <8 x i8> %122, i64 4
  store i8 %141, ptr %140, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  br label %pred.store.continue209

pred.store.continue209:                           ; preds = %pred.store.if208, %pred.store.continue207
  %142 = extractelement <8 x i1> %121, i64 5
  br i1 %142, label %pred.store.if210, label %pred.store.continue211

pred.store.if210:                                 ; preds = %pred.store.continue209
  %143 = add i64 %offset.idx197, 5
  %144 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %143
  %145 = extractelement <8 x i8> %122, i64 5
  store i8 %145, ptr %144, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  br label %pred.store.continue211

pred.store.continue211:                           ; preds = %pred.store.if210, %pred.store.continue209
  %146 = extractelement <8 x i1> %121, i64 6
  br i1 %146, label %pred.store.if212, label %pred.store.continue213

pred.store.if212:                                 ; preds = %pred.store.continue211
  %147 = add i64 %offset.idx197, 6
  %148 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %147
  %149 = extractelement <8 x i8> %122, i64 6
  store i8 %149, ptr %148, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  br label %pred.store.continue213

pred.store.continue213:                           ; preds = %pred.store.if212, %pred.store.continue211
  %150 = extractelement <8 x i1> %121, i64 7
  br i1 %150, label %pred.store.if214, label %pred.store.continue215

pred.store.if214:                                 ; preds = %pred.store.continue213
  %151 = add i64 %offset.idx197, 7
  %152 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %151
  %153 = extractelement <8 x i8> %122, i64 7
  store i8 %153, ptr %152, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  br label %pred.store.continue215

pred.store.continue215:                           ; preds = %pred.store.if214, %pred.store.continue213
  %wide.load216 = load <8 x i8>, ptr %120, align 8, !tbaa !5, !alias.scope !36
  %predphi217 = select <8 x i1> %121, <8 x i8> %122, <8 x i8> %wide.load198
  %predphi218 = select <8 x i1> %121, <8 x i8> %wide.load216, <8 x i8> %wide.load199
  %154 = sub <8 x i8> %predphi217, %predphi218
  store <8 x i8> %154, ptr %119, align 1, !tbaa !5, !alias.scope !33, !noalias !36
  %index.next219 = add nuw i64 %index196, 8
  %155 = icmp eq i64 %index.next219, %n.vec191
  br i1 %155, label %vec.epilog.middle.block183, label %vec.epilog.vector.body195, !llvm.loop !38

vec.epilog.middle.block183:                       ; preds = %pred.store.continue215
  %cmp.n220 = icmp eq i64 %46, %n.vec191
  br i1 %cmp.n220, label %.preheader, label %.lr.ph47.preheader

.preheader:                                       ; preds = %174, %middle.block135, %vec.epilog.middle.block183, %.lr.ph54
  %.not3548 = icmp slt i32 %41, 1
  br i1 %.not3548, label %._crit_edge51, label %iter.check97

iter.check97:                                     ; preds = %.preheader
  %156 = add nuw i32 %41, 1
  %wide.trip.count = zext i32 %156 to i64
  %157 = zext nneg i32 %41 to i64
  %min.iters.check95 = icmp ult i32 %41, 8
  br i1 %min.iters.check95, label %.lr.ph50.preheader, label %vector.main.loop.iter.check99

vector.main.loop.iter.check99:                    ; preds = %iter.check97
  %min.iters.check98 = icmp ult i32 %41, 32
  br i1 %min.iters.check98, label %vec.epilog.ph112, label %vector.ph100

vector.ph100:                                     ; preds = %vector.main.loop.iter.check99
  %n.vec102 = and i64 %157, 2147483616
  br label %vector.body103

vector.body103:                                   ; preds = %vector.body103, %vector.ph100
  %index104 = phi i64 [ 0, %vector.ph100 ], [ %index.next108, %vector.body103 ]
  %offset.idx105 = or disjoint i64 %index104, 1
  %158 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %offset.idx105
  %159 = getelementptr inbounds i8, ptr %158, i64 16
  %wide.load106 = load <16 x i8>, ptr %158, align 1, !tbaa !5
  %wide.load107 = load <16 x i8>, ptr %159, align 1, !tbaa !5
  %160 = add <16 x i8> %wide.load106, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  %161 = add <16 x i8> %wide.load107, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  store <16 x i8> %160, ptr %158, align 1, !tbaa !5
  store <16 x i8> %161, ptr %159, align 1, !tbaa !5
  %index.next108 = add nuw i64 %index104, 32
  %162 = icmp eq i64 %index.next108, %n.vec102
  br i1 %162, label %middle.block94, label %vector.body103, !llvm.loop !39

middle.block94:                                   ; preds = %vector.body103
  %cmp.n109 = icmp eq i64 %n.vec102, %157
  br i1 %cmp.n109, label %._crit_edge51, label %vec.epilog.iter.check113

vec.epilog.iter.check113:                         ; preds = %middle.block94
  %ind.end120 = or disjoint i64 %n.vec102, 1
  %n.vec.remaining114 = and i64 %157, 24
  %min.epilog.iters.check115 = icmp eq i64 %n.vec.remaining114, 0
  br i1 %min.epilog.iters.check115, label %.lr.ph50.preheader, label %vec.epilog.ph112

.lr.ph50.preheader:                               ; preds = %vec.epilog.middle.block110, %iter.check97, %vec.epilog.iter.check113
  %indvars.iv63.ph = phi i64 [ 1, %iter.check97 ], [ %ind.end120, %vec.epilog.iter.check113 ], [ %ind.end119, %vec.epilog.middle.block110 ]
  br label %.lr.ph50

vec.epilog.ph112:                                 ; preds = %vector.main.loop.iter.check99, %vec.epilog.iter.check113
  %vec.epilog.resume.val116 = phi i64 [ %n.vec102, %vec.epilog.iter.check113 ], [ 0, %vector.main.loop.iter.check99 ]
  %n.vec118 = and i64 %157, 2147483640
  %ind.end119 = or disjoint i64 %n.vec118, 1
  br label %vec.epilog.vector.body122

vec.epilog.vector.body122:                        ; preds = %vec.epilog.vector.body122, %vec.epilog.ph112
  %index123 = phi i64 [ %vec.epilog.resume.val116, %vec.epilog.ph112 ], [ %index.next126, %vec.epilog.vector.body122 ]
  %offset.idx124 = or disjoint i64 %index123, 1
  %163 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %offset.idx124
  %wide.load125 = load <8 x i8>, ptr %163, align 1, !tbaa !5
  %164 = add <8 x i8> %wide.load125, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
  store <8 x i8> %164, ptr %163, align 1, !tbaa !5
  %index.next126 = add nuw i64 %index123, 8
  %165 = icmp eq i64 %index.next126, %n.vec118
  br i1 %165, label %vec.epilog.middle.block110, label %vec.epilog.vector.body122, !llvm.loop !40

vec.epilog.middle.block110:                       ; preds = %vec.epilog.vector.body122
  %cmp.n127 = icmp eq i64 %n.vec118, %157
  br i1 %cmp.n127, label %._crit_edge51, label %.lr.ph50.preheader

.lr.ph47:                                         ; preds = %.lr.ph47.preheader, %174
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %174 ], [ %indvars.iv60.ph, %.lr.ph47.preheader ]
  %166 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %indvars.iv60
  %167 = load i8, ptr %166, align 1, !tbaa !5
  %168 = sub nsw i64 %indvars.iv60, %42
  %169 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %168
  %170 = load i8, ptr %169, align 1, !tbaa !5
  %171 = icmp slt i8 %167, %170
  br i1 %171, label %172, label %174

172:                                              ; preds = %.lr.ph47
  %173 = add i8 %167, 10
  store i8 %173, ptr %166, align 1, !tbaa !5
  %.pre = load i8, ptr %169, align 1, !tbaa !5
  br label %174

174:                                              ; preds = %172, %.lr.ph47
  %175 = phi i8 [ %173, %172 ], [ %167, %.lr.ph47 ]
  %176 = phi i8 [ %.pre, %172 ], [ %170, %.lr.ph47 ]
  %177 = sub i8 %175, %176
  store i8 %177, ptr %166, align 1, !tbaa !5
  %indvars.iv.next61 = add nsw i64 %indvars.iv60, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next61 to i32
  %exitcond.not = icmp eq i32 %43, %lftr.wideiv
  br i1 %exitcond.not, label %.preheader, label %.lr.ph47, !llvm.loop !41

._crit_edge51:                                    ; preds = %.lr.ph50, %middle.block94, %vec.epilog.middle.block110, %.preheader
  %178 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @g, i64 1))
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %179 = load i32, ptr @n, align 4, !tbaa !8
  %180 = sext i32 %179 to i64
  %.not33.not = icmp slt i64 %indvars.iv67, %180
  br i1 %.not33.not, label %.lr.ph54, label %._crit_edge55, !llvm.loop !42

.lr.ph50:                                         ; preds = %.lr.ph50.preheader, %.lr.ph50
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.lr.ph50 ], [ %indvars.iv63.ph, %.lr.ph50.preheader ]
  %181 = getelementptr inbounds [2002 x i8], ptr @g, i64 0, i64 %indvars.iv63
  %182 = load i8, ptr %181, align 1, !tbaa !5
  %183 = add i8 %182, 48
  store i8 %183, ptr %181, align 1, !tbaa !5
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count
  br i1 %exitcond66.not, label %._crit_edge51, label %.lr.ph50, !llvm.loop !43
}

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

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

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

attributes #0 = { mustprogress nofree 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 #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11}
!11 = distinct !{!11, !12}
!12 = distinct !{!12, !"LVerDomain"}
!13 = !{!14}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !16, !17, !18}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = !{!20}
!20 = distinct !{!20, !21}
!21 = distinct !{!21, !"LVerDomain"}
!22 = !{!23}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !16, !17, !18}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !16, !17}
!27 = !{!28}
!28 = distinct !{!28, !29}
!29 = distinct !{!29, !"LVerDomain"}
!30 = !{!31}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !16, !17, !18}
!33 = !{!34}
!34 = distinct !{!34, !35}
!35 = distinct !{!35, !"LVerDomain"}
!36 = !{!37}
!37 = distinct !{!37, !35}
!38 = distinct !{!38, !16, !17, !18}
!39 = distinct !{!39, !16, !17, !18}
!40 = distinct !{!40, !16, !17, !18}
!41 = distinct !{!41, !16, !17}
!42 = distinct !{!42, !16}
!43 = distinct !{!43, !16, !18, !17}


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