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

; 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
@m = external dso_local global i32, align 4
@str = external dso_local global [101 x i8], align 16
@seq = external dso_local global [701 x i8], align 16
@mx = external dso_local global i8, align 1
@out = external dso_local global [701 x i8], align 16
@.str = external hidden unnamed_addr constant [3 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
  store i32 0, ptr %1, align 4
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %5

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

9:                                                ; preds = %5
  store i32 0, ptr @m, align 4, !tbaa !5
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @str)
  %11 = load i8, ptr @str, align 16, !tbaa !9
  store i8 %11, ptr @mx, align 1, !tbaa !9
  %12 = load i32, ptr @m, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  store i32 %13, ptr @m, align 4, !tbaa !5
  %14 = sext i32 %12 to i64
  %15 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %14
  store i8 %11, ptr %15, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %118, %9
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [101 x i8], ptr @str, i64 0, i64 %18
  %20 = load i8, ptr %19, align 1, !tbaa !9
  %21 = icmp ne i8 %20, 0
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %16
  %24 = load i32, ptr @m, align 4, !tbaa !5
  %25 = sub nsw i32 %24, 1
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %26
  %28 = load i8, ptr %27, align 1, !tbaa !9
  %29 = sext i8 %28 to i32
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [101 x i8], ptr @str, i64 0, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !9
  %34 = sext i8 %33 to i32
  %35 = icmp eq i32 %29, %34
  br i1 %35, label %36, label %45

36:                                               ; preds = %23
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [101 x i8], ptr @str, i64 0, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !9
  %41 = load i32, ptr @m, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr @m, align 4, !tbaa !5
  %43 = sext i32 %41 to i64
  %44 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %43
  store i8 %40, ptr %44, align 1, !tbaa !9
  br label %45

45:                                               ; preds = %36, %23
  br label %46

46:                                               ; preds = %60, %45
  %47 = load i32, ptr @m, align 4, !tbaa !5
  %48 = sub nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %49
  %51 = load i8, ptr %50, align 1, !tbaa !9
  %52 = sext i8 %51 to i32
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [101 x i8], ptr @str, i64 0, i64 %54
  %56 = load i8, ptr %55, align 1, !tbaa !9
  %57 = sext i8 %56 to i32
  %58 = icmp slt i32 %52, %57
  br i1 %58, label %59, label %74

59:                                               ; preds = %46
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr @m, align 4, !tbaa !5
  %62 = sub nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !9
  %66 = sext i8 %65 to i32
  %67 = add nsw i32 %66, 1
  %68 = trunc i32 %67 to i8
  %69 = load i32, ptr @m, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %70
  store i8 %68, ptr %71, align 1, !tbaa !9
  %72 = load i32, ptr @m, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr @m, align 4, !tbaa !5
  br label %46, !llvm.loop !10

74:                                               ; preds = %46
  br label %75

75:                                               ; preds = %89, %74
  %76 = load i32, ptr @m, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = sext i8 %80 to i32
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [101 x i8], ptr @str, i64 0, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = sext i8 %85 to i32
  %87 = icmp sgt i32 %81, %86
  br i1 %87, label %88, label %103

88:                                               ; preds = %75
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr @m, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !9
  %95 = sext i8 %94 to i32
  %96 = sub nsw i32 %95, 1
  %97 = trunc i32 %96 to i8
  %98 = load i32, ptr @m, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %99
  store i8 %97, ptr %100, align 1, !tbaa !9
  %101 = load i32, ptr @m, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr @m, align 4, !tbaa !5
  br label %75, !llvm.loop !12

103:                                              ; preds = %75
  %104 = load i8, ptr @mx, align 1, !tbaa !9
  %105 = sext i8 %104 to i32
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [101 x i8], ptr @str, i64 0, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !9
  %110 = sext i8 %109 to i32
  %111 = icmp slt i32 %105, %110
  br i1 %111, label %112, label %117

112:                                              ; preds = %103
  %113 = load i32, ptr %2, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [101 x i8], ptr @str, i64 0, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !9
  store i8 %116, ptr @mx, align 1, !tbaa !9
  br label %117

117:                                              ; preds = %112, %103
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !13

121:                                              ; preds = %22
  br label %122

122:                                              ; preds = %154, %121
  %123 = load i8, ptr @mx, align 1, !tbaa !9
  %124 = sext i8 %123 to i32
  %125 = icmp sgt i32 %124, 48
  br i1 %125, label %126, label %157

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %146, %126
  %128 = load i32, ptr %3, align 4, !tbaa !5
  %129 = load i32, ptr @m, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  br label %149

132:                                              ; preds = %127
  %133 = load i32, ptr %3, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !9
  %137 = sext i8 %136 to i32
  %138 = load i8, ptr @mx, align 1, !tbaa !9
  %139 = sext i8 %138 to i32
  %140 = icmp slt i32 %137, %139
  %141 = zext i1 %140 to i64
  %142 = select i1 %140, i8 42, i8 43
  %143 = load i32, ptr %3, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [701 x i8], ptr @out, i64 0, i64 %144
  store i8 %142, ptr %145, align 1, !tbaa !9
  br label %146

146:                                              ; preds = %132
  %147 = load i32, ptr %3, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %3, align 4, !tbaa !5
  br label %127, !llvm.loop !14

149:                                              ; preds = %131
  %150 = load i32, ptr @m, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [701 x i8], ptr @out, i64 0, i64 %151
  store i8 0, ptr %152, align 1, !tbaa !9
  %153 = call i32 @puts(ptr noundef @out)
  br label %154

154:                                              ; preds = %149
  %155 = load i8, ptr @mx, align 1, !tbaa !9
  %156 = add i8 %155, -1
  store i8 %156, ptr @mx, align 1, !tbaa !9
  br label %122, !llvm.loop !15

157:                                              ; preds = %122
  br label %5, !llvm.loop !16

158:                                              ; preds = %5
  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

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 = { 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 = !{!7, !7, 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}
!16 = distinct !{!16, !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"

@t = external dso_local global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@str = external dso_local global [101 x i8], align 16
@seq = external dso_local local_unnamed_addr global [701 x i8], align 16
@mx = external dso_local local_unnamed_addr global i8, align 1
@out = external dso_local global [701 x i8], align 16
@.str = external hidden unnamed_addr constant [3 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 @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
  %.not37 = icmp eq i32 %2, 0
  br i1 %.not37, label %._crit_edge40, label %.lr.ph39

.loopexit:                                        ; preds = %._crit_edge36, %thread-pre-split
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %._crit_edge40, label %.lr.ph39, !llvm.loop !9

.lr.ph39:                                         ; preds = %0, %.loopexit
  store i32 0, ptr @m, align 4, !tbaa !5
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str)
  %7 = load i8, ptr @str, align 16, !tbaa !11
  store i8 %7, ptr @mx, align 1, !tbaa !11
  %8 = load i32, ptr @m, align 4, !tbaa !5
  %9 = add nsw i32 %8, 1
  store i32 %9, ptr @m, align 4, !tbaa !5
  %10 = sext i32 %8 to i64
  %11 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %10
  store i8 %7, ptr %11, align 1, !tbaa !11
  %12 = load i8, ptr getelementptr inbounds (i8, ptr @str, i64 1), align 1, !tbaa !11
  %.not1829 = icmp eq i8 %12, 0
  br i1 %.not1829, label %thread-pre-split, label %.lr.ph33

.lr.ph33:                                         ; preds = %.lr.ph39, %61
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %61 ], [ 1, %.lr.ph39 ]
  %13 = phi i8 [ %64, %61 ], [ %12, %.lr.ph39 ]
  %.lcssa232630 = phi i32 [ %.lcssa2327, %61 ], [ %9, %.lr.ph39 ]
  %14 = phi i8 [ %62, %61 ], [ %7, %.lr.ph39 ]
  %15 = add nsw i32 %.lcssa232630, -1
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !11
  %19 = icmp eq i8 %18, %13
  br i1 %19, label %.thread, label %23

.thread:                                          ; preds = %.lr.ph33
  %20 = add nsw i32 %.lcssa232630, 1
  store i32 %20, ptr @m, align 4, !tbaa !5
  %21 = sext i32 %.lcssa232630 to i64
  %22 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %21
  store i8 %13, ptr %22, align 1, !tbaa !11
  %.pre50 = sext i32 %.lcssa232630 to i64
  br label %.preheader19

23:                                               ; preds = %.lr.ph33
  %24 = icmp slt i8 %18, %13
  br i1 %24, label %.lr.ph.preheader, label %.preheader19

.lr.ph.preheader:                                 ; preds = %23
  %25 = sext i32 %.lcssa232630 to i64
  %26 = xor i8 %18, -1
  %27 = add i8 %13, %26
  %28 = zext i8 %27 to i64
  %29 = add nuw nsw i64 %28, 1
  %min.iters.check83 = icmp ult i8 %27, 31
  br i1 %min.iters.check83, label %.lr.ph.preheader105, label %vector.ph84

.lr.ph.preheader105:                              ; preds = %middle.block81, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ %25, %.lr.ph.preheader ], [ %ind.end87, %middle.block81 ]
  %.ph106 = phi i8 [ %18, %.lr.ph.preheader ], [ %ind.end90, %middle.block81 ]
  br label %.lr.ph

vector.ph84:                                      ; preds = %.lr.ph.preheader
  %n.vec86 = and i64 %29, 480
  %ind.end87 = add nsw i64 %n.vec86, %25
  %.cast89 = trunc i64 %n.vec86 to i8
  %ind.end90 = add i8 %18, %.cast89
  %.splatinsert94 = insertelement <16 x i8> poison, i8 %18, i64 0
  %.splat95 = shufflevector <16 x i8> %.splatinsert94, <16 x i8> poison, <16 x i32> zeroinitializer
  %induction96 = add <16 x i8> %.splat95, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>
  br label %vector.body92

vector.body92:                                    ; preds = %vector.body92, %vector.ph84
  %index93 = phi i64 [ 0, %vector.ph84 ], [ %index.next102, %vector.body92 ]
  %vec.ind97 = phi <16 x i8> [ %induction96, %vector.ph84 ], [ %vec.ind.next100, %vector.body92 ]
  %offset.idx101 = add i64 %index93, %25
  %30 = add nsw <16 x i8> %vec.ind97, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  %31 = add <16 x i8> %vec.ind97, <i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17, i8 17>
  %32 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %offset.idx101
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  store <16 x i8> %30, ptr %32, align 1, !tbaa !11
  store <16 x i8> %31, ptr %33, align 1, !tbaa !11
  %index.next102 = add nuw i64 %index93, 32
  %vec.ind.next100 = add <16 x i8> %vec.ind97, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %34 = icmp eq i64 %index.next102, %n.vec86
  br i1 %34, label %middle.block81, label %vector.body92, !llvm.loop !12

middle.block81:                                   ; preds = %vector.body92
  %cmp.n103 = icmp eq i64 %29, %n.vec86
  %cmo = add nsw i64 %n.vec86, -1
  %ind.escape = add nsw i64 %cmo, %25
  br i1 %cmp.n103, label %..preheader19_crit_edge, label %.lr.ph.preheader105

..preheader19_crit_edge:                          ; preds = %.lr.ph, %middle.block81
  %indvars.iv.lcssa = phi i64 [ %ind.escape, %middle.block81 ], [ %indvars.iv, %.lr.ph ]
  %indvars.iv.next.lcssa = phi i64 [ %ind.end87, %middle.block81 ], [ %indvars.iv.next, %.lr.ph ]
  %35 = trunc nsw i64 %indvars.iv.next.lcssa to i32
  store i32 %35, ptr @m, align 4, !tbaa !5
  %sext = shl i64 %indvars.iv.lcssa, 32
  %.pre54 = ashr exact i64 %sext, 32
  br label %.preheader19

.preheader19:                                     ; preds = %.thread, %..preheader19_crit_edge, %23
  %.pre-phi55 = phi i64 [ %.pre54, %..preheader19_crit_edge ], [ %16, %23 ], [ %.pre50, %.thread ]
  %.lcssa2328 = phi i32 [ %35, %..preheader19_crit_edge ], [ %.lcssa232630, %23 ], [ %20, %.thread ]
  %36 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %.pre-phi55
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = icmp sgt i8 %37, %13
  br i1 %38, label %.lr.ph22.preheader, label %58

.lr.ph22.preheader:                               ; preds = %.preheader19
  %39 = sext i32 %.lcssa2328 to i64
  %40 = xor i8 %13, -1
  %41 = add i8 %37, %40
  %42 = zext i8 %41 to i64
  %43 = add nuw nsw i64 %42, 1
  %min.iters.check69 = icmp ult i8 %41, 31
  br i1 %min.iters.check69, label %.lr.ph22.preheader104, label %vector.ph70

.lr.ph22.preheader104:                            ; preds = %middle.block68, %.lr.ph22.preheader
  %indvars.iv42.ph = phi i64 [ %39, %.lr.ph22.preheader ], [ %ind.end, %middle.block68 ]
  %.ph = phi i8 [ %37, %.lr.ph22.preheader ], [ %ind.end74, %middle.block68 ]
  br label %.lr.ph22

vector.ph70:                                      ; preds = %.lr.ph22.preheader
  %n.vec72 = and i64 %43, 480
  %ind.end = add nsw i64 %n.vec72, %39
  %.cast = trunc i64 %n.vec72 to i8
  %ind.end74 = sub i8 %37, %.cast
  %.splatinsert = insertelement <16 x i8> poison, i8 %37, i64 0
  %.splat = shufflevector <16 x i8> %.splatinsert, <16 x i8> poison, <16 x i32> zeroinitializer
  %induction = add <16 x i8> %.splat, <i8 0, i8 -1, i8 -2, i8 -3, i8 -4, i8 -5, i8 -6, i8 -7, i8 -8, i8 -9, i8 -10, i8 -11, i8 -12, i8 -13, i8 -14, i8 -15>
  br label %vector.body76

vector.body76:                                    ; preds = %vector.body76, %vector.ph70
  %index77 = phi i64 [ 0, %vector.ph70 ], [ %index.next79, %vector.body76 ]
  %vec.ind = phi <16 x i8> [ %induction, %vector.ph70 ], [ %vec.ind.next, %vector.body76 ]
  %offset.idx = add i64 %index77, %39
  %44 = add nsw <16 x i8> %vec.ind, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
  %45 = add <16 x i8> %vec.ind, <i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17, i8 -17>
  %46 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %offset.idx
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  store <16 x i8> %44, ptr %46, align 1, !tbaa !11
  store <16 x i8> %45, ptr %47, align 1, !tbaa !11
  %index.next79 = add nuw i64 %index77, 32
  %vec.ind.next = add <16 x i8> %vec.ind, <i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32>
  %48 = icmp eq i64 %index.next79, %n.vec72
  br i1 %48, label %middle.block68, label %vector.body76, !llvm.loop !15

middle.block68:                                   ; preds = %vector.body76
  %cmp.n80 = icmp eq i64 %43, %n.vec72
  br i1 %cmp.n80, label %._crit_edge, label %.lr.ph22.preheader104

.lr.ph:                                           ; preds = %.lr.ph.preheader105, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader105 ]
  %49 = phi i8 [ %50, %.lr.ph ], [ %.ph106, %.lr.ph.preheader105 ]
  %50 = add nsw i8 %49, 1
  %51 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %indvars.iv
  store i8 %50, ptr %51, align 1, !tbaa !11
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %52 = icmp slt i8 %50, %13
  br i1 %52, label %.lr.ph, label %..preheader19_crit_edge, !llvm.loop !16

.lr.ph22:                                         ; preds = %.lr.ph22.preheader104, %.lr.ph22
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %.lr.ph22 ], [ %indvars.iv42.ph, %.lr.ph22.preheader104 ]
  %53 = phi i8 [ %54, %.lr.ph22 ], [ %.ph, %.lr.ph22.preheader104 ]
  %54 = add nsw i8 %53, -1
  %55 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %indvars.iv42
  store i8 %54, ptr %55, align 1, !tbaa !11
  %indvars.iv.next43 = add nsw i64 %indvars.iv42, 1
  %56 = icmp sgt i8 %54, %13
  br i1 %56, label %.lr.ph22, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph22, %middle.block68
  %indvars.iv.next43.lcssa = phi i64 [ %ind.end, %middle.block68 ], [ %indvars.iv.next43, %.lr.ph22 ]
  %57 = trunc nsw i64 %indvars.iv.next43.lcssa to i32
  store i32 %57, ptr @m, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %._crit_edge, %.preheader19
  %.lcssa2327 = phi i32 [ %57, %._crit_edge ], [ %.lcssa2328, %.preheader19 ]
  %59 = icmp slt i8 %14, %13
  br i1 %59, label %60, label %61

60:                                               ; preds = %58
  store i8 %13, ptr @mx, align 1, !tbaa !11
  br label %61

61:                                               ; preds = %58, %60
  %62 = phi i8 [ %14, %58 ], [ %13, %60 ]
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %63 = getelementptr inbounds [101 x i8], ptr @str, i64 0, i64 %indvars.iv.next45
  %64 = load i8, ptr %63, align 1, !tbaa !11
  %.not18 = icmp eq i8 %64, 0
  br i1 %.not18, label %thread-pre-split, label %.lr.ph33, !llvm.loop !18

thread-pre-split:                                 ; preds = %61, %.lr.ph39
  %.pr = phi i8 [ %7, %.lr.ph39 ], [ %62, %61 ]
  %65 = icmp sgt i8 %.pr, 48
  br i1 %65, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %thread-pre-split, %._crit_edge36
  %66 = phi i8 [ %87, %._crit_edge36 ], [ %.pr, %thread-pre-split ]
  %67 = load i32, ptr @m, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %iter.check, label %._crit_edge36

iter.check:                                       ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %67 to i64
  %min.iters.check = icmp ult i32 %67, 8
  br i1 %min.iters.check, label %.lr.ph35.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check58 = icmp ult i32 %67, 32
  br i1 %min.iters.check58, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %wide.trip.count, 2147483616
  %broadcast.splatinsert = insertelement <16 x i8> poison, i8 %66, i64 0
  %broadcast.splat = shufflevector <16 x i8> %broadcast.splatinsert, <16 x i8> poison, <16 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %69 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %index
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %wide.load = load <16 x i8>, ptr %69, align 16, !tbaa !11
  %wide.load59 = load <16 x i8>, ptr %70, align 16, !tbaa !11
  %71 = icmp slt <16 x i8> %wide.load, %broadcast.splat
  %72 = icmp slt <16 x i8> %wide.load59, %broadcast.splat
  %73 = select <16 x i1> %71, <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, <16 x i8> <i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43>
  %74 = select <16 x i1> %72, <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, <16 x i8> <i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43>
  %75 = getelementptr inbounds [701 x i8], ptr @out, i64 0, i64 %index
  %76 = getelementptr inbounds i8, ptr %75, i64 16
  store <16 x i8> %73, ptr %75, align 16, !tbaa !11
  store <16 x i8> %74, ptr %76, align 16, !tbaa !11
  %index.next = add nuw i64 %index, 32
  %77 = icmp eq i64 %index.next, %n.vec
  br i1 %77, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge36, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %wide.trip.count, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph35.preheader, label %vec.epilog.ph

.lr.ph35.preheader:                               ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv46.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec61, %vec.epilog.middle.block ]
  br label %.lr.ph35

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.vec61 = and i64 %wide.trip.count, 2147483640
  %broadcast.splatinsert64 = insertelement <8 x i8> poison, i8 %66, i64 0
  %broadcast.splat65 = shufflevector <8 x i8> %broadcast.splatinsert64, <8 x i8> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index62 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next66, %vec.epilog.vector.body ]
  %78 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %index62
  %wide.load63 = load <8 x i8>, ptr %78, align 8, !tbaa !11
  %79 = icmp slt <8 x i8> %wide.load63, %broadcast.splat65
  %80 = select <8 x i1> %79, <8 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>, <8 x i8> <i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43, i8 43>
  %81 = getelementptr inbounds [701 x i8], ptr @out, i64 0, i64 %index62
  store <8 x i8> %80, ptr %81, align 8, !tbaa !11
  %index.next66 = add nuw i64 %index62, 8
  %82 = icmp eq i64 %index.next66, %n.vec61
  br i1 %82, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !20

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n67 = icmp eq i64 %n.vec61, %wide.trip.count
  br i1 %cmp.n67, label %._crit_edge36, label %.lr.ph35.preheader

._crit_edge36:                                    ; preds = %.lr.ph35, %middle.block, %vec.epilog.middle.block, %.preheader
  %83 = sext i32 %67 to i64
  %84 = getelementptr inbounds [701 x i8], ptr @out, i64 0, i64 %83
  store i8 0, ptr %84, align 1, !tbaa !11
  %85 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @out)
  %86 = load i8, ptr @mx, align 1, !tbaa !11
  %87 = add i8 %86, -1
  store i8 %87, ptr @mx, align 1, !tbaa !11
  %88 = icmp sgt i8 %87, 48
  br i1 %88, label %.preheader, label %.loopexit, !llvm.loop !21

.lr.ph35:                                         ; preds = %.lr.ph35.preheader, %.lr.ph35
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %.lr.ph35 ], [ %indvars.iv46.ph, %.lr.ph35.preheader ]
  %89 = getelementptr inbounds [701 x i8], ptr @seq, i64 0, i64 %indvars.iv46
  %90 = load i8, ptr %89, align 1, !tbaa !11
  %91 = icmp slt i8 %90, %66
  %92 = select i1 %91, i8 42, i8 43
  %93 = getelementptr inbounds [701 x i8], ptr @out, i64 0, i64 %indvars.iv46
  store i8 %92, ptr %93, align 1, !tbaa !11
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge36, label %.lr.ph35, !llvm.loop !22

._crit_edge40:                                    ; preds = %.loopexit, %0
  ret i32 0
}

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10, !13, !14}
!16 = distinct !{!16, !10, !14, !13}
!17 = distinct !{!17, !10, !14, !13}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !13, !14}
!20 = distinct !{!20, !10, !13, !14}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10, !14, !13}


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