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

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

@w = external dso_local global [18 x i32], align 16
@x = external dso_local global [131072 x i32], align 16
@y = external dso_local global [131072 x i32], align 16
@n = external dso_local global i32, align 4
@str = external dso_local global [131072 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
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3powiii(i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4ConvPiS_i(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 noundef i32 @_Z3powiii(i32 noundef 3, i32 noundef 7520, i32 noundef 985661441)
  store i32 %8, ptr getelementptr inbounds ([18 x i32], ptr @w, i64 0, i64 17), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 16, ptr %2, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %32, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = icmp sge i32 %10, 0
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %35

13:                                               ; preds = %9
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = add nsw i32 %14, 1
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [18 x i32], ptr @w, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [18 x i32], ptr @w, i64 0, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = mul nsw i64 %19, %25
  %27 = srem i64 %26, 985661441
  %28 = trunc i64 %27 to i32
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [18 x i32], ptr @w, i64 0, i64 %30
  store i32 %28, ptr %31, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %13
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr %2, align 4, !tbaa !5
  br label %9, !llvm.loop !9

35:                                               ; preds = %12
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %55, %35
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %58

42:                                               ; preds = %37
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = sub nsw i32 %43, 1
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = sub nsw i32 %44, %45
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [131072 x i8], ptr @str, i64 0, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !11
  %50 = sext i8 %49 to i32
  %51 = sub nsw i32 %50, 48
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %53
  store i32 %51, ptr %54, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %42
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !5
  br label %37, !llvm.loop !12

58:                                               ; preds = %41
  %59 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %78, %58
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = load i32, ptr @n, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %81

65:                                               ; preds = %60
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = sub nsw i32 %66, 1
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = sub nsw i32 %67, %68
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [131072 x i8], ptr @str, i64 0, i64 %70
  %72 = load i8, ptr %71, align 1, !tbaa !11
  %73 = sext i8 %72 to i32
  %74 = sub nsw i32 %73, 48
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [131072 x i32], ptr @y, i64 0, i64 %76
  store i32 %74, ptr %77, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %65
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %4, align 4, !tbaa !5
  br label %60, !llvm.loop !13

81:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %87, %81
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %86, label %90

86:                                               ; preds = %82
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = shl i32 %88, 1
  store i32 %89, ptr %5, align 4, !tbaa !5
  br label %82, !llvm.loop !14

90:                                               ; preds = %82
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = shl i32 %91, 1
  store i32 %92, ptr %5, align 4, !tbaa !5
  %93 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z4ConvPiS_i(ptr noundef @x, ptr noundef @y, i32 noundef %93)
  %94 = load i32, ptr @n, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = add nsw i32 %96, %95
  store i32 %97, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %127, %90
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %130

103:                                              ; preds = %98
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = icmp sge i32 %107, 10
  br i1 %108, label %109, label %126

109:                                              ; preds = %103
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = sdiv i32 %113, 10
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = add nsw i32 %119, %114
  store i32 %120, ptr %118, align 4, !tbaa !5
  %121 = load i32, ptr %6, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = srem i32 %124, 10
  store i32 %125, ptr %123, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %109, %103
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %6, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %6, align 4, !tbaa !5
  br label %98, !llvm.loop !15

130:                                              ; preds = %102
  %131 = load i32, ptr @n, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %139

136:                                              ; preds = %130
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr @n, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %136, %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %140 = load i32, ptr @n, align 4, !tbaa !5
  %141 = sub nsw i32 %140, 1
  store i32 %141, ptr %7, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %152, %139
  %143 = load i32, ptr %7, align 4, !tbaa !5
  %144 = icmp sge i32 %143, 0
  br i1 %144, label %146, label %145

145:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %155

146:                                              ; preds = %142
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %150)
  br label %152

152:                                              ; preds = %146
  %153 = load i32, ptr %7, align 4, !tbaa !5
  %154 = add nsw i32 %153, -1
  store i32 %154, ptr %7, align 4, !tbaa !5
  br label %142, !llvm.loop !16

155:                                              ; preds = %145
  %156 = call i32 @putchar(i32 noundef 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret i32 0
}

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

declare i32 @printf(ptr noundef, ...) #4

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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"

@w = external dso_local local_unnamed_addr global [18 x i32], align 16
@x = external dso_local global [131072 x i32], align 16
@y = external dso_local global [131072 x i32], align 16
@n = external dso_local global i32, align 4
@str = external dso_local global [131072 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
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4ConvPiS_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = tail call noundef i32 @_Z3powiii(i32 noundef 3, i32 noundef 7520, i32 noundef 985661441)
  store i32 %1, ptr getelementptr inbounds (i8, ptr @w, i64 68), align 4, !tbaa !5
  %2 = sext i32 %1 to i64
  %3 = mul nsw i64 %2, %2
  %4 = urem i64 %3, 985661441
  %5 = trunc nuw nsw i64 %4 to i32
  store i32 %5, ptr getelementptr inbounds (i8, ptr @w, i64 64), align 16, !tbaa !5
  %6 = mul nuw nsw i64 %4, %4
  %7 = urem i64 %6, 985661441
  %8 = trunc nuw nsw i64 %7 to i32
  store i32 %8, ptr getelementptr inbounds (i8, ptr @w, i64 60), align 4, !tbaa !5
  %9 = mul nuw nsw i64 %7, %7
  %10 = urem i64 %9, 985661441
  %11 = trunc nuw nsw i64 %10 to i32
  store i32 %11, ptr getelementptr inbounds (i8, ptr @w, i64 56), align 8, !tbaa !5
  %12 = mul nuw nsw i64 %10, %10
  %13 = urem i64 %12, 985661441
  %14 = trunc nuw nsw i64 %13 to i32
  store i32 %14, ptr getelementptr inbounds (i8, ptr @w, i64 52), align 4, !tbaa !5
  %15 = mul nuw nsw i64 %13, %13
  %16 = urem i64 %15, 985661441
  %17 = trunc nuw nsw i64 %16 to i32
  store i32 %17, ptr getelementptr inbounds (i8, ptr @w, i64 48), align 16, !tbaa !5
  %18 = mul nuw nsw i64 %16, %16
  %19 = urem i64 %18, 985661441
  %20 = trunc nuw nsw i64 %19 to i32
  store i32 %20, ptr getelementptr inbounds (i8, ptr @w, i64 44), align 4, !tbaa !5
  %21 = mul nuw nsw i64 %19, %19
  %22 = urem i64 %21, 985661441
  %23 = trunc nuw nsw i64 %22 to i32
  store i32 %23, ptr getelementptr inbounds (i8, ptr @w, i64 40), align 8, !tbaa !5
  %24 = mul nuw nsw i64 %22, %22
  %25 = urem i64 %24, 985661441
  %26 = trunc nuw nsw i64 %25 to i32
  store i32 %26, ptr getelementptr inbounds (i8, ptr @w, i64 36), align 4, !tbaa !5
  %27 = mul nuw nsw i64 %25, %25
  %28 = urem i64 %27, 985661441
  %29 = trunc nuw nsw i64 %28 to i32
  store i32 %29, ptr getelementptr inbounds (i8, ptr @w, i64 32), align 16, !tbaa !5
  %30 = mul nuw nsw i64 %28, %28
  %31 = urem i64 %30, 985661441
  %32 = trunc nuw nsw i64 %31 to i32
  store i32 %32, ptr getelementptr inbounds (i8, ptr @w, i64 28), align 4, !tbaa !5
  %33 = mul nuw nsw i64 %31, %31
  %34 = urem i64 %33, 985661441
  %35 = trunc nuw nsw i64 %34 to i32
  store i32 %35, ptr getelementptr inbounds (i8, ptr @w, i64 24), align 8, !tbaa !5
  %36 = mul nuw nsw i64 %34, %34
  %37 = urem i64 %36, 985661441
  %38 = trunc nuw nsw i64 %37 to i32
  store i32 %38, ptr getelementptr inbounds (i8, ptr @w, i64 20), align 4, !tbaa !5
  %39 = mul nuw nsw i64 %37, %37
  %40 = urem i64 %39, 985661441
  %41 = trunc nuw nsw i64 %40 to i32
  store i32 %41, ptr getelementptr inbounds (i8, ptr @w, i64 16), align 16, !tbaa !5
  %42 = mul nuw nsw i64 %40, %40
  %43 = urem i64 %42, 985661441
  %44 = trunc nuw nsw i64 %43 to i32
  store i32 %44, ptr getelementptr inbounds (i8, ptr @w, i64 12), align 4, !tbaa !5
  %45 = mul nuw nsw i64 %43, %43
  %46 = urem i64 %45, 985661441
  %47 = trunc nuw nsw i64 %46 to i32
  store i32 %47, ptr getelementptr inbounds (i8, ptr @w, i64 8), align 8, !tbaa !5
  %48 = mul nuw nsw i64 %46, %46
  %49 = urem i64 %48, 985661441
  %50 = trunc nuw nsw i64 %49 to i32
  store i32 %50, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !5
  %51 = mul nuw nsw i64 %49, %49
  %52 = urem i64 %51, 985661441
  %53 = trunc nuw nsw i64 %52 to i32
  store i32 %53, ptr @w, align 16, !tbaa !5
  %54 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @str)
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %57 = zext nneg i32 %55 to i64
  %wide.trip.count = zext nneg i32 %55 to i64
  %min.iters.check = icmp ult i32 %55, 8
  br i1 %min.iters.check, label %.lr.ph.preheader82, label %vector.ph

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

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

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %58 = xor i64 %index, -1
  %59 = add nsw i64 %57, %58
  %60 = getelementptr inbounds [131072 x i8], ptr @str, i64 0, i64 %59
  %61 = getelementptr inbounds i8, ptr %60, i64 -3
  %62 = getelementptr inbounds i8, ptr %60, i64 -7
  %wide.load = load <4 x i8>, ptr %61, align 1, !tbaa !9
  %reverse = shufflevector <4 x i8> %wide.load, <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load64 = load <4 x i8>, ptr %62, align 1, !tbaa !9
  %reverse65 = shufflevector <4 x i8> %wide.load64, <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %63 = sext <4 x i8> %reverse to <4 x i32>
  %64 = sext <4 x i8> %reverse65 to <4 x i32>
  %65 = add nsw <4 x i32> %63, <i32 -48, i32 -48, i32 -48, i32 -48>
  %66 = add nsw <4 x i32> %64, <i32 -48, i32 -48, i32 -48, i32 -48>
  %67 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %index
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  store <4 x i32> %65, ptr %67, align 16, !tbaa !5
  store <4 x i32> %66, ptr %68, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %69 = icmp eq i64 %index.next, %n.vec
  br i1 %69, label %middle.block, label %vector.body, !llvm.loop !10

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

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  %70 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str)
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph40.preheader, label %.preheader.preheader

.lr.ph40.preheader:                               ; preds = %._crit_edge
  %73 = zext nneg i32 %71 to i64
  %wide.trip.count54 = zext nneg i32 %71 to i64
  %min.iters.check68 = icmp ult i32 %71, 8
  br i1 %min.iters.check68, label %.lr.ph40.preheader81, label %vector.ph69

.lr.ph40.preheader81:                             ; preds = %middle.block66, %.lr.ph40.preheader
  %indvars.iv51.ph = phi i64 [ 0, %.lr.ph40.preheader ], [ %n.vec71, %middle.block66 ]
  br label %.lr.ph40

vector.ph69:                                      ; preds = %.lr.ph40.preheader
  %n.vec71 = and i64 %wide.trip.count54, 2147483640
  br label %vector.body73

vector.body73:                                    ; preds = %vector.body73, %vector.ph69
  %index74 = phi i64 [ 0, %vector.ph69 ], [ %index.next79, %vector.body73 ]
  %74 = xor i64 %index74, -1
  %75 = add nsw i64 %73, %74
  %76 = getelementptr inbounds [131072 x i8], ptr @str, i64 0, i64 %75
  %77 = getelementptr inbounds i8, ptr %76, i64 -3
  %78 = getelementptr inbounds i8, ptr %76, i64 -7
  %wide.load75 = load <4 x i8>, ptr %77, align 1, !tbaa !9
  %reverse76 = shufflevector <4 x i8> %wide.load75, <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load77 = load <4 x i8>, ptr %78, align 1, !tbaa !9
  %reverse78 = shufflevector <4 x i8> %wide.load77, <4 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %79 = sext <4 x i8> %reverse76 to <4 x i32>
  %80 = sext <4 x i8> %reverse78 to <4 x i32>
  %81 = add nsw <4 x i32> %79, <i32 -48, i32 -48, i32 -48, i32 -48>
  %82 = add nsw <4 x i32> %80, <i32 -48, i32 -48, i32 -48, i32 -48>
  %83 = getelementptr inbounds [131072 x i32], ptr @y, i64 0, i64 %index74
  %84 = getelementptr inbounds i8, ptr %83, i64 16
  store <4 x i32> %81, ptr %83, align 16, !tbaa !5
  store <4 x i32> %82, ptr %84, align 16, !tbaa !5
  %index.next79 = add nuw i64 %index74, 8
  %85 = icmp eq i64 %index.next79, %n.vec71
  br i1 %85, label %middle.block66, label %vector.body73, !llvm.loop !14

middle.block66:                                   ; preds = %vector.body73
  %cmp.n80 = icmp eq i64 %n.vec71, %wide.trip.count54
  br i1 %cmp.n80, label %.preheader.preheader, label %.lr.ph40.preheader81

.lr.ph:                                           ; preds = %.lr.ph.preheader82, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader82 ]
  %86 = xor i64 %indvars.iv, -1
  %87 = add nsw i64 %57, %86
  %88 = getelementptr inbounds [131072 x i8], ptr @str, i64 0, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !9
  %90 = sext i8 %89 to i32
  %91 = add nsw i32 %90, -48
  %92 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %indvars.iv
  store i32 %91, ptr %92, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !15

.lr.ph40:                                         ; preds = %.lr.ph40.preheader81, %.lr.ph40
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph40 ], [ %indvars.iv51.ph, %.lr.ph40.preheader81 ]
  %93 = xor i64 %indvars.iv51, -1
  %94 = add nsw i64 %73, %93
  %95 = getelementptr inbounds [131072 x i8], ptr @str, i64 0, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !9
  %97 = sext i8 %96 to i32
  %98 = add nsw i32 %97, -48
  %99 = getelementptr inbounds [131072 x i32], ptr @y, i64 0, i64 %indvars.iv51
  store i32 %98, ptr %99, align 4, !tbaa !5
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next52, %wide.trip.count54
  br i1 %exitcond55.not, label %.preheader.preheader, label %.lr.ph40, !llvm.loop !16

.preheader.preheader:                             ; preds = %.lr.ph40, %middle.block66, %._crit_edge
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %.027 = phi i32 [ %100, %.preheader ], [ 1, %.preheader.preheader ]
  %.not = icmp sgt i32 %.027, %71
  %100 = shl i32 %.027, 1
  br i1 %.not, label %101, label %.preheader, !llvm.loop !17

101:                                              ; preds = %.preheader
  tail call void @_Z4ConvPiS_i(ptr noundef nonnull @x, ptr noundef nonnull @y, i32 noundef %100)
  %102 = load i32, ptr @n, align 4, !tbaa !5
  %reass.add = shl i32 %102, 1
  %103 = add i32 %reass.add, -1
  store i32 %103, ptr @n, align 4, !tbaa !5
  %104 = icmp sgt i32 %103, 0
  br i1 %104, label %.lr.ph43.preheader, label %._crit_edge44

.lr.ph43.preheader:                               ; preds = %101
  %wide.trip.count59 = zext nneg i32 %103 to i64
  br label %.lr.ph43

._crit_edge44:                                    ; preds = %118, %101
  %105 = sext i32 %103 to i64
  %106 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %.not35 = icmp eq i32 %107, 0
  br i1 %.not35, label %120, label %119

.lr.ph43:                                         ; preds = %.lr.ph43.preheader, %118
  %indvars.iv56 = phi i64 [ 0, %.lr.ph43.preheader ], [ %indvars.iv.next57.pre-phi, %118 ]
  %108 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %indvars.iv56
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp sgt i32 %109, 9
  br i1 %110, label %111, label %.lr.ph43._crit_edge

.lr.ph43._crit_edge:                              ; preds = %.lr.ph43
  %.pre = add nuw nsw i64 %indvars.iv56, 1
  br label %118

111:                                              ; preds = %.lr.ph43
  %112 = udiv i32 %109, 10
  %113 = add nuw nsw i64 %indvars.iv56, 1
  %114 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = add nsw i32 %115, %112
  store i32 %116, ptr %114, align 4, !tbaa !5
  %117 = urem i32 %109, 10
  store i32 %117, ptr %108, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %.lr.ph43._crit_edge, %111
  %indvars.iv.next57.pre-phi = phi i64 [ %.pre, %.lr.ph43._crit_edge ], [ %113, %111 ]
  %exitcond60.not = icmp eq i64 %indvars.iv.next57.pre-phi, %wide.trip.count59
  br i1 %exitcond60.not, label %._crit_edge44, label %.lr.ph43, !llvm.loop !18

119:                                              ; preds = %._crit_edge44
  store i32 %reass.add, ptr @n, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %119, %._crit_edge44
  %121 = phi i32 [ %reass.add, %119 ], [ %103, %._crit_edge44 ]
  %122 = icmp sgt i32 %121, 0
  br i1 %122, label %.lr.ph47.preheader, label %._crit_edge48

.lr.ph47.preheader:                               ; preds = %120
  %123 = zext nneg i32 %121 to i64
  br label %.lr.ph47

._crit_edge48:                                    ; preds = %.lr.ph47, %120
  %124 = tail call i32 @putchar(i32 noundef 10)
  ret i32 0

.lr.ph47:                                         ; preds = %.lr.ph47.preheader, %.lr.ph47
  %indvars.iv61 = phi i64 [ %123, %.lr.ph47.preheader ], [ %indvars.iv.next62, %.lr.ph47 ]
  %indvars.iv.next62 = add nsw i64 %indvars.iv61, -1
  %125 = getelementptr inbounds [131072 x i32], ptr @x, i64 0, i64 %indvars.iv.next62
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %126)
  %128 = icmp ugt i64 %indvars.iv61, 1
  br i1 %128, label %.lr.ph47, label %._crit_edge48, !llvm.loop !19
}

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4

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 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 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nofree 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" }

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


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