; LLVM IR from tangjz/acm-icpc :: hdu (5244)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [2097152 x i64], align 16
@tmp = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 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
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %129, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @t, align 4, !tbaa !5
  %15 = icmp sle i32 %13, %14
  br i1 %15, label %17, label %16

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

17:                                               ; preds = %12
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m)
  %19 = load i32, ptr @m, align 4, !tbaa !5
  %20 = shl i32 1, %19
  store i32 %20, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %31, %17
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i64, ptr @a, i64 %28
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %29)
  br label %31

31:                                               ; preds = %26
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %4, align 4, !tbaa !5
  br label %21, !llvm.loop !9

34:                                               ; preds = %25
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %35)
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %38 = icmp eq i32 %37, 1
  br i1 %38, label %39, label %42

39:                                               ; preds = %34
  %40 = load i64, ptr @a, align 16, !tbaa !11
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %40)
  br label %129

42:                                               ; preds = %34
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = sub nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !11
  store i64 %47, ptr @tmp, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %98, %42
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %54 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %54, ptr %7, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %92, %53
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

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

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %88, %60
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %91

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !11
  store i64 %70, ptr %9, align 8, !tbaa !11
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !11
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %6, align 4, !tbaa !5
  %77 = sext i32 %75 to i64
  %78 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = add nsw i64 %79, %74
  store i64 %80, ptr %78, align 8, !tbaa !11
  %81 = load i64, ptr %9, align 8, !tbaa !11
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %7, align 4, !tbaa !5
  %84 = sext i32 %82 to i64
  %85 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = sub nsw i64 %86, %81
  store i64 %87, ptr %85, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %88

88:                                               ; preds = %66
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %8, align 4, !tbaa !5
  br label %61, !llvm.loop !13

91:                                               ; preds = %65
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %93, ptr %6, align 4, !tbaa !5
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  store i32 %96, ptr %7, align 4, !tbaa !5
  br label %55, !llvm.loop !14

97:                                               ; preds = %59
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = shl i32 %99, 1
  store i32 %100, ptr %5, align 4, !tbaa !5
  br label %48, !llvm.loop !15

101:                                              ; preds = %52
  %102 = load i64, ptr @tmp, align 8, !tbaa !11
  %103 = load i32, ptr @m, align 4, !tbaa !5
  %104 = sub nsw i32 %103, 1
  %105 = zext i32 %104 to i64
  %106 = shl i64 %102, %105
  %107 = load i64, ptr @a, align 16, !tbaa !11
  %108 = sub nsw i64 %107, %106
  store i64 %108, ptr @a, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %124, %101
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = load i32, ptr @n, align 4, !tbaa !5
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %127

114:                                              ; preds = %109
  %115 = load i32, ptr %10, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !11
  %119 = load i32, ptr @m, align 4, !tbaa !5
  %120 = sub nsw i32 %119, 1
  %121 = zext i32 %120 to i64
  %122 = ashr i64 %118, %121
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %122)
  br label %124

124:                                              ; preds = %114
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %10, align 4, !tbaa !5
  br label %109, !llvm.loop !16

127:                                              ; preds = %113
  %128 = call i32 @putchar(i32 noundef 10)
  br label %129

129:                                              ; preds = %127, %39
  %130 = load i32, ptr %2, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !17

132:                                              ; preds = %16
  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 @printf(ptr noundef, ...) #1

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #3

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 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@t = external dso_local global i32, align 4
@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [2097152 x i64], align 16
@tmp = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 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
  %.not53 = icmp slt i32 %2, 1
  br i1 %.not53, label %._crit_edge57, label %.lr.ph56

._crit_edge57:                                    ; preds = %94, %0
  ret i32 0

.lr.ph56:                                         ; preds = %0, %94
  %.02454 = phi i32 [ %95, %94 ], [ 1, %0 ]
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m)
  %4 = load i32, ptr @m, align 4, !tbaa !5
  %5 = shl nuw i32 1, %4
  store i32 %5, ptr @n, align 4, !tbaa !5
  %.not58 = icmp eq i32 %4, 31
  br i1 %.not58, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph56
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.02454)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp eq i32 %7, 1
  br i1 %8, label %14, label %17

.lr.ph:                                           ; preds = %.lr.ph56, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph56 ]
  %9 = getelementptr inbounds i64, ptr @a, i64 %indvars.iv
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %9)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = icmp slt i64 %indvars.iv.next, %12
  br i1 %13, label %.lr.ph, label %._crit_edge, !llvm.loop !9

14:                                               ; preds = %._crit_edge
  %15 = load i64, ptr @a, align 16, !tbaa !11
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %15)
  br label %94

17:                                               ; preds = %._crit_edge
  %18 = add nsw i32 %7, -1
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %19
  %21 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %21, ptr @tmp, align 8, !tbaa !11
  %22 = icmp sgt i32 %7, 1
  br i1 %22, label %.preheader32.us, label %._crit_edge44.split.us

.preheader32.us:                                  ; preds = %17, %._crit_edge41.us
  %.02942.us = phi i32 [ %31, %._crit_edge41.us ], [ 1, %17 ]
  %23 = icmp sgt i32 %.02942.us, 0
  br i1 %23, label %.preheader.us.us.preheader, label %._crit_edge41.us

.preheader.us.us.preheader:                       ; preds = %.preheader32.us
  %24 = add nsw i32 %.02942.us, -1
  %25 = zext i32 %24 to i64
  %26 = shl nuw nsw i64 %25, 3
  %scevgep71 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @a, i64 8), i64 %26
  %scevgep74 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @a, i64 8), i64 %26
  %27 = zext nneg i32 %.02942.us to i64
  %28 = shl nuw i32 %.02942.us, 1
  %29 = shl nuw i32 %.02942.us, 1
  %30 = add i32 %28, -1
  %min.iters.check = icmp ult i32 %.02942.us, 4
  %n.vec = and i64 %27, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %27
  br label %.preheader.us.us

._crit_edge41.us:                                 ; preds = %._crit_edge38.us.us, %.preheader32.us
  %31 = shl i32 %.02942.us, 1
  %32 = icmp slt i32 %31, %7
  br i1 %32, label %.preheader32.us, label %._crit_edge44.split.us, !llvm.loop !13

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge38.us.us
  %indvar = phi i32 [ 0, %.preheader.us.us.preheader ], [ %indvar.next, %._crit_edge38.us.us ]
  %.02640.us.us = phi i32 [ %.02942.us, %.preheader.us.us.preheader ], [ %74, %._crit_edge38.us.us ]
  %.02739.us.us = phi i32 [ 0, %.preheader.us.us.preheader ], [ %37, %._crit_edge38.us.us ]
  %33 = mul i32 %29, %indvar
  %34 = add i32 %30, %33
  %35 = sext i32 %.02640.us.us to i64
  %36 = sext i32 %.02739.us.us to i64
  %37 = add i32 %.02942.us, %.02640.us.us
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.preheader.us.us
  %38 = sext i32 %.02640.us.us to i64
  %39 = shl nsw i64 %38, 3
  %scevgep75 = getelementptr i8, ptr %scevgep74, i64 %39
  %scevgep73 = getelementptr i8, ptr @a, i64 %39
  %40 = sext i32 %.02739.us.us to i64
  %41 = shl nsw i64 %40, 3
  %scevgep72 = getelementptr i8, ptr %scevgep71, i64 %41
  %scevgep = getelementptr i8, ptr @a, i64 %41
  %bound0 = icmp ult ptr %scevgep, %scevgep75
  %bound1 = icmp ult ptr %scevgep73, %scevgep72
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %ind.end = add nsw i64 %n.vec, %36
  %ind.end76 = add nsw i64 %n.vec, %35
  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 %index, %36
  %offset.idx78 = add i64 %index, %35
  %42 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %offset.idx
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %wide.load = load <2 x i64>, ptr %42, align 8, !tbaa !11, !alias.scope !14, !noalias !17
  %wide.load79 = load <2 x i64>, ptr %43, align 8, !tbaa !11, !alias.scope !14, !noalias !17
  %44 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %offset.idx78
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %wide.load80 = load <2 x i64>, ptr %44, align 8, !tbaa !11, !alias.scope !17
  %wide.load81 = load <2 x i64>, ptr %45, align 8, !tbaa !11, !alias.scope !17
  %46 = add nsw <2 x i64> %wide.load80, %wide.load
  %47 = add nsw <2 x i64> %wide.load81, %wide.load79
  store <2 x i64> %46, ptr %42, align 8, !tbaa !11, !alias.scope !14, !noalias !17
  store <2 x i64> %47, ptr %43, align 8, !tbaa !11, !alias.scope !14, !noalias !17
  %48 = sub nsw <2 x i64> %wide.load80, %wide.load
  %49 = sub nsw <2 x i64> %wide.load81, %wide.load79
  store <2 x i64> %48, ptr %44, align 8, !tbaa !11, !alias.scope !17
  store <2 x i64> %49, ptr %45, align 8, !tbaa !11, !alias.scope !17
  %index.next = add nuw i64 %index, 4
  %50 = icmp eq i64 %index.next, %n.vec
  br i1 %50, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge38.us.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader.us.us
  %indvars.iv63.ph = phi i64 [ %36, %vector.memcheck ], [ %36, %.preheader.us.us ], [ %ind.end, %middle.block ]
  %indvars.iv61.ph = phi i64 [ %35, %vector.memcheck ], [ %35, %.preheader.us.us ], [ %ind.end76, %middle.block ]
  %51 = trunc i64 %indvars.iv61.ph to i32
  %xtraiter = and i32 %51, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %52 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %indvars.iv63.ph
  %53 = load i64, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %indvars.iv61.ph
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %indvars.iv.next64.prol = add nsw i64 %indvars.iv63.ph, 1
  %56 = add nsw i64 %55, %53
  store i64 %56, ptr %52, align 8, !tbaa !11
  %indvars.iv.next62.prol = add nsw i64 %indvars.iv61.ph, 1
  %57 = load i64, ptr %54, align 8, !tbaa !11
  %58 = sub nsw i64 %57, %53
  store i64 %58, ptr %54, align 8, !tbaa !11
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv63.unr = phi i64 [ %indvars.iv63.ph, %scalar.ph.preheader ], [ %indvars.iv.next64.prol, %scalar.ph.prol ]
  %indvars.iv61.unr = phi i64 [ %indvars.iv61.ph, %scalar.ph.preheader ], [ %indvars.iv.next62.prol, %scalar.ph.prol ]
  %59 = icmp eq i32 %34, %51
  br i1 %59, label %._crit_edge38.us.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv63 = phi i64 [ %indvars.iv.next64.1, %scalar.ph ], [ %indvars.iv63.unr, %scalar.ph.prol.loopexit ]
  %indvars.iv61 = phi i64 [ %indvars.iv.next62.1, %scalar.ph ], [ %indvars.iv61.unr, %scalar.ph.prol.loopexit ]
  %60 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %indvars.iv63
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %indvars.iv61
  %63 = load i64, ptr %62, align 8, !tbaa !11
  %indvars.iv.next64 = add nsw i64 %indvars.iv63, 1
  %64 = add nsw i64 %63, %61
  store i64 %64, ptr %60, align 8, !tbaa !11
  %indvars.iv.next62 = add nsw i64 %indvars.iv61, 1
  %65 = load i64, ptr %62, align 8, !tbaa !11
  %66 = sub nsw i64 %65, %61
  store i64 %66, ptr %62, align 8, !tbaa !11
  %67 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %indvars.iv.next64
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %indvars.iv.next62
  %70 = load i64, ptr %69, align 8, !tbaa !11
  %indvars.iv.next64.1 = add nsw i64 %indvars.iv63, 2
  %71 = add nsw i64 %70, %68
  store i64 %71, ptr %67, align 8, !tbaa !11
  %indvars.iv.next62.1 = add nsw i64 %indvars.iv61, 2
  %72 = load i64, ptr %69, align 8, !tbaa !11
  %73 = sub nsw i64 %72, %68
  store i64 %73, ptr %69, align 8, !tbaa !11
  %lftr.wideiv.1 = trunc i64 %indvars.iv.next62.1 to i32
  %exitcond.not.1 = icmp eq i32 %37, %lftr.wideiv.1
  br i1 %exitcond.not.1, label %._crit_edge38.us.us, label %scalar.ph, !llvm.loop !22

._crit_edge38.us.us:                              ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %74 = add nsw i32 %37, %.02942.us
  %75 = icmp slt i32 %37, %7
  %indvar.next = add i32 %indvar, 1
  br i1 %75, label %.preheader.us.us, label %._crit_edge41.us, !llvm.loop !23

._crit_edge44.split.us:                           ; preds = %._crit_edge41.us, %17
  %76 = load i32, ptr @m, align 4, !tbaa !5
  %77 = add nsw i32 %76, -1
  %78 = zext nneg i32 %77 to i64
  %79 = shl i64 %21, %78
  %80 = load i64, ptr @a, align 16, !tbaa !11
  %81 = sub nsw i64 %80, %79
  store i64 %81, ptr @a, align 16, !tbaa !11
  %82 = icmp sgt i32 %7, 0
  br i1 %82, label %.lr.ph51, label %._crit_edge52

._crit_edge52:                                    ; preds = %.lr.ph51, %._crit_edge44.split.us
  %83 = tail call i32 @putchar(i32 noundef 10)
  br label %94

.lr.ph51:                                         ; preds = %._crit_edge44.split.us, %.lr.ph51
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph51 ], [ 0, %._crit_edge44.split.us ]
  %84 = getelementptr inbounds [2097152 x i64], ptr @a, i64 0, i64 %indvars.iv68
  %85 = load i64, ptr %84, align 8, !tbaa !11
  %86 = load i32, ptr @m, align 4, !tbaa !5
  %87 = add nsw i32 %86, -1
  %88 = zext nneg i32 %87 to i64
  %89 = ashr i64 %85, %88
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %89)
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %91 = load i32, ptr @n, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = icmp slt i64 %indvars.iv.next69, %92
  br i1 %93, label %.lr.ph51, label %._crit_edge52, !llvm.loop !24

94:                                               ; preds = %._crit_edge52, %14
  %95 = add nuw nsw i32 %.02454, 1
  %96 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.02454, %96
  br i1 %.not.not, label %.lr.ph56, label %._crit_edge57, !llvm.loop !25
}

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) 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 = { 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{!15}
!15 = distinct !{!15, !16}
!16 = distinct !{!16, !"LVerDomain"}
!17 = !{!18}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !10, !20, !21}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !10, !20}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}


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