; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (2062)

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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 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 i64, align 8
  %4 = alloca [30 x i64], align 16
  %5 = alloca i32, align 4
  %6 = alloca [30 x i32], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 240, ptr %4) #4
  %12 = getelementptr inbounds [30 x i64], ptr %4, i64 0, i64 1
  store i64 1, ptr %12, align 8, !tbaa !5
  %13 = getelementptr inbounds [30 x i64], ptr %4, i64 0, i64 2
  store i64 2, ptr %13, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 3, ptr %5, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %32, %0
  %15 = load i32, ptr %5, align 4, !tbaa !9
  %16 = icmp slt i32 %15, 22
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %35

18:                                               ; preds = %14
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = sub nsw i32 %19, 1
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [30 x i64], ptr %4, i64 0, i64 %21
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = sub nsw i32 %24, 1
  %26 = sext i32 %25 to i64
  %27 = mul nsw i64 %23, %26
  %28 = add nsw i64 %27, 1
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [30 x i64], ptr %4, i64 0, i64 %30
  store i64 %28, ptr %31, align 8, !tbaa !5
  br label %32

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

35:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 120, ptr %6) #4
  br label %36

36:                                               ; preds = %147, %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  %38 = icmp ne i32 %37, -1
  br i1 %38, label %39, label %149

39:                                               ; preds = %36
  %40 = getelementptr inbounds [30 x i32], ptr %6, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %40, i8 0, i64 120, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %51, %39
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = load i32, ptr %2, align 4, !tbaa !9
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [30 x i32], ptr %6, i64 0, i64 %49
  store i32 %47, ptr %50, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %46
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %7, align 4, !tbaa !9
  br label %41, !llvm.loop !13

54:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %55 = load i32, ptr %2, align 4, !tbaa !9
  store i32 %55, ptr %8, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %146, %54
  %57 = load i32, ptr %2, align 4, !tbaa !9
  %58 = add nsw i32 %57, -1
  store i32 %58, ptr %2, align 4, !tbaa !9
  %59 = icmp ne i32 %57, 0
  br i1 %59, label %60, label %147

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %61 = load i64, ptr %3, align 8, !tbaa !5
  %62 = load i32, ptr %2, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [30 x i64], ptr %4, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = srem i64 %61, %66
  %68 = icmp ne i64 %67, 0
  br i1 %68, label %69, label %78

69:                                               ; preds = %60
  %70 = load i64, ptr %3, align 8, !tbaa !5
  %71 = load i32, ptr %2, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [30 x i64], ptr %4, i64 0, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !5
  %76 = sdiv i64 %70, %75
  %77 = add nsw i64 %76, 1
  br label %86

78:                                               ; preds = %60
  %79 = load i64, ptr %3, align 8, !tbaa !5
  %80 = load i32, ptr %2, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [30 x i64], ptr %4, i64 0, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !5
  %85 = sdiv i64 %79, %84
  br label %86

86:                                               ; preds = %78, %69
  %87 = phi i64 [ %77, %69 ], [ %85, %78 ]
  %88 = trunc i64 %87 to i32
  store i32 %88, ptr %9, align 4, !tbaa !9
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [30 x i32], ptr %6, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %95

94:                                               ; preds = %86
  store i32 11, ptr %10, align 4
  br label %144

95:                                               ; preds = %86
  %96 = load i32, ptr %8, align 4, !tbaa !9
  %97 = sub nsw i32 %96, 1
  %98 = load i32, ptr %2, align 4, !tbaa !9
  %99 = icmp eq i32 %97, %98
  br i1 %99, label %100, label %106

100:                                              ; preds = %95
  %101 = load i32, ptr %9, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [30 x i32], ptr %6, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %104)
  br label %112

106:                                              ; preds = %95
  %107 = load i32, ptr %9, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [30 x i32], ptr %6, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !9
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %110)
  br label %112

112:                                              ; preds = %106, %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %113 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %113, ptr %11, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %128, %112
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = load i32, ptr %2, align 4, !tbaa !9
  %117 = icmp sle i32 %115, %116
  br i1 %117, label %119, label %118

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

119:                                              ; preds = %114
  %120 = load i32, ptr %11, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [30 x i32], ptr %6, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [30 x i32], ptr %6, i64 0, i64 %126
  store i32 %124, ptr %127, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %119
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %11, align 4, !tbaa !9
  br label %114, !llvm.loop !14

131:                                              ; preds = %118
  %132 = load i64, ptr %3, align 8, !tbaa !5
  %133 = load i32, ptr %2, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [30 x i64], ptr %4, i64 0, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !5
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = mul nsw i64 %137, %140
  %142 = add nsw i64 %141, 1
  %143 = sub nsw i64 %132, %142
  store i64 %143, ptr %3, align 8, !tbaa !5
  store i32 0, ptr %10, align 4
  br label %144

144:                                              ; preds = %131, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %145 = load i32, ptr %10, align 4
  switch i32 %145, label %151 [
    i32 0, label %146
    i32 11, label %147
  ]

146:                                              ; preds = %144
  br label %56, !llvm.loop !15

147:                                              ; preds = %144, %56
  %148 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %36, !llvm.loop !16

149:                                              ; preds = %36
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 240, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %150 = load i32, ptr %1, align 4
  ret i32 %150

151:                                              ; preds = %144
  unreachable
}

; 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

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

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

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

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


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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca [30 x i64], align 16
  %4 = alloca [30 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %3) #4
  %5 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 1, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %3, i64 16
  store i64 2, ptr %6, align 16, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %3, i64 24
  store i64 5, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %3, i64 32
  store i64 16, ptr %8, align 16, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %3, i64 40
  store i64 65, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 48
  store i64 326, ptr %10, align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %3, i64 56
  store i64 1957, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %3, i64 64
  store i64 13700, ptr %12, align 16, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %3, i64 72
  store i64 109601, ptr %13, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %3, i64 80
  store i64 986410, ptr %14, align 16, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %3, i64 88
  store i64 9864101, ptr %15, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %3, i64 96
  store i64 108505112, ptr %16, align 16, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %3, i64 104
  store i64 1302061345, ptr %17, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %3, i64 112
  store i64 16926797486, ptr %18, align 16, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %3, i64 120
  store i64 236975164805, ptr %19, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %3, i64 128
  store i64 3554627472076, ptr %20, align 16, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %3, i64 136
  store i64 56874039553217, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %3, i64 144
  store i64 966858672404690, ptr %22, align 16, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %3, i64 152
  store i64 17403456103284421, ptr %23, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %3, i64 160
  store i64 330665665962404000, ptr %24, align 16, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %3, i64 168
  store i64 6613313319248080001, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %4) #4
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %.not46 = icmp eq i32 %26, -1
  br i1 %.not46, label %._crit_edge49, label %.lr.ph48

.lr.ph48:                                         ; preds = %0, %._crit_edge
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(120) %4, i8 0, i64 120, i1 false)
  %27 = load i32, ptr %1, align 4, !tbaa !9
  %.not2837 = icmp slt i32 %27, 1
  br i1 %.not2837, label %.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph48
  %28 = add nuw i32 %27, 1
  %wide.trip.count = zext i32 %28 to i64
  %29 = zext nneg i32 %27 to i64
  %min.iters.check62 = icmp ult i32 %27, 8
  br i1 %min.iters.check62, label %.lr.ph.preheader76, label %vector.ph63

.lr.ph.preheader76:                               ; preds = %middle.block60, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end66, %middle.block60 ]
  br label %.lr.ph

vector.ph63:                                      ; preds = %.lr.ph.preheader
  %n.vec65 = and i64 %29, 2147483640
  %ind.end66 = or disjoint i64 %n.vec65, 1
  br label %vector.body68

vector.body68:                                    ; preds = %vector.body68, %vector.ph63
  %index69 = phi i64 [ 0, %vector.ph63 ], [ %index.next72, %vector.body68 ]
  %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph63 ], [ %vec.ind.next, %vector.body68 ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx71 = or disjoint i64 %index69, 1
  %30 = getelementptr inbounds [30 x i32], ptr %4, i64 0, i64 %offset.idx71
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  store <4 x i32> %vec.ind, ptr %30, align 4, !tbaa !9
  store <4 x i32> %step.add, ptr %31, align 4, !tbaa !9
  %index.next72 = add nuw i64 %index69, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %32 = icmp eq i64 %index.next72, %n.vec65
  br i1 %32, label %middle.block60, label %vector.body68, !llvm.loop !11

middle.block60:                                   ; preds = %vector.body68
  %cmp.n73 = icmp eq i64 %n.vec65, %29
  br i1 %cmp.n73, label %.preheader, label %.lr.ph.preheader76

.preheader:                                       ; preds = %.lr.ph, %middle.block60, %.lr.ph48
  %33 = add nsw i32 %27, -1
  store i32 %33, ptr %1, align 4, !tbaa !9
  %.not2943 = icmp eq i32 %27, 0
  br i1 %.not2943, label %._crit_edge, label %.lr.ph44.preheader

.lr.ph44.preheader:                               ; preds = %.preheader
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  br label %.lr.ph44

.lr.ph:                                           ; preds = %.lr.ph.preheader76, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader76 ]
  %34 = getelementptr inbounds [30 x i32], ptr %4, i64 0, i64 %indvars.iv
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %35, ptr %34, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !15

thread-pre-split:                                 ; preds = %.lr.ph41, %middle.block, %.thread-pre-split_crit_edge
  %.pre-phi = phi i32 [ %.pre57, %.thread-pre-split_crit_edge ], [ %63, %middle.block ], [ %63, %.lr.ph41 ]
  %36 = load i64, ptr %2, align 8, !tbaa !5
  %37 = sext i32 %.pre-phi to i64
  %38 = getelementptr inbounds [30 x i64], ptr %3, i64 0, i64 %37
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %sext32 = add i64 %sext, -4294967296
  %40 = ashr exact i64 %sext32, 32
  %41 = mul nsw i64 %39, %40
  %.neg = xor i64 %41, -1
  %42 = add i64 %36, %.neg
  store i64 %42, ptr %2, align 8, !tbaa !5
  %43 = add nsw i32 %61, -1
  store i32 %43, ptr %1, align 4, !tbaa !9
  %.not29 = icmp eq i32 %61, 0
  br i1 %.not29, label %._crit_edge, label %.lr.ph44

.lr.ph44:                                         ; preds = %.lr.ph44.preheader, %thread-pre-split
  %44 = phi i64 [ %42, %thread-pre-split ], [ %.pre, %.lr.ph44.preheader ]
  %45 = phi i32 [ %61, %thread-pre-split ], [ %27, %.lr.ph44.preheader ]
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [30 x i64], ptr %3, i64 0, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = srem i64 %44, %48
  %.not30 = icmp ne i64 %49, 0
  %50 = sdiv i64 %44, %48
  %51 = zext i1 %.not30 to i64
  %52 = add nsw i64 %50, %51
  %sext = shl i64 %52, 32
  %53 = ashr exact i64 %sext, 32
  %54 = getelementptr inbounds [30 x i32], ptr %4, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %._crit_edge, label %57

57:                                               ; preds = %.lr.ph44
  %58 = trunc i64 %52 to i32
  %59 = icmp eq i32 %27, %45
  %.str.1..str.2 = select i1 %59, ptr @.str.1, ptr @.str.2
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2, i32 noundef %55)
  %61 = load i32, ptr %1, align 4, !tbaa !9
  %.not3139 = icmp slt i32 %61, %58
  br i1 %.not3139, label %.thread-pre-split_crit_edge, label %.lr.ph41.preheader

.thread-pre-split_crit_edge:                      ; preds = %57
  %.pre57 = add nsw i32 %61, 1
  br label %thread-pre-split

.lr.ph41.preheader:                               ; preds = %57
  %sext58 = shl i64 %52, 32
  %62 = ashr exact i64 %sext58, 32
  %63 = add i32 %61, 1
  %.neg74 = sext i1 %.not30 to i32
  %64 = add i32 %61, %.neg74
  %65 = trunc i64 %50 to i32
  %66 = sub i32 %64, %65
  %67 = zext i32 %66 to i64
  %68 = add nuw nsw i64 %67, 1
  %min.iters.check = icmp ult i32 %66, 7
  br i1 %min.iters.check, label %.lr.ph41.preheader75, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph41.preheader
  %n.vec = and i64 %68, 8589934584
  %ind.end = add nsw i64 %62, %n.vec
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %62, %index
  %69 = add nsw i64 %offset.idx, 1
  %70 = getelementptr inbounds [30 x i32], ptr %4, i64 0, i64 %69
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %wide.load = load <4 x i32>, ptr %70, align 4, !tbaa !9
  %wide.load59 = load <4 x i32>, ptr %71, align 4, !tbaa !9
  %72 = getelementptr inbounds [30 x i32], ptr %4, i64 0, i64 %offset.idx
  %73 = getelementptr inbounds i8, ptr %72, i64 16
  store <4 x i32> %wide.load, ptr %72, align 4, !tbaa !9
  store <4 x i32> %wide.load59, ptr %73, align 4, !tbaa !9
  %index.next = add nuw i64 %index, 8
  %74 = icmp eq i64 %index.next, %n.vec
  br i1 %74, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %68, %n.vec
  br i1 %cmp.n, label %thread-pre-split, label %.lr.ph41.preheader75

.lr.ph41.preheader75:                             ; preds = %middle.block, %.lr.ph41.preheader
  %indvars.iv53.ph = phi i64 [ %62, %.lr.ph41.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph41

.lr.ph41:                                         ; preds = %.lr.ph41.preheader75, %.lr.ph41
  %indvars.iv53 = phi i64 [ %indvars.iv.next54, %.lr.ph41 ], [ %indvars.iv53.ph, %.lr.ph41.preheader75 ]
  %indvars.iv.next54 = add nsw i64 %indvars.iv53, 1
  %75 = getelementptr inbounds [30 x i32], ptr %4, i64 0, i64 %indvars.iv.next54
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = getelementptr inbounds [30 x i32], ptr %4, i64 0, i64 %indvars.iv53
  store i32 %76, ptr %77, align 4, !tbaa !9
  %lftr.wideiv = trunc i64 %indvars.iv.next54 to i32
  %exitcond56.not = icmp eq i32 %63, %lftr.wideiv
  br i1 %exitcond56.not, label %thread-pre-split, label %.lr.ph41, !llvm.loop !17

._crit_edge:                                      ; preds = %thread-pre-split, %.lr.ph44, %.preheader
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %79 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %.not = icmp eq i32 %79, -1
  br i1 %.not, label %._crit_edge49, label %.lr.ph48, !llvm.loop !18

._crit_edge49:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0
}

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

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

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

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

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

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


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