; LLVM IR from reyadussalahin/problem-solving :: ad_hoc/implementation/codeforces/F1392B (Solution)

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

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

15:                                               ; preds = %119, %0
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

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

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %5, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  store i8 0, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 -1000000007, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %45, %20
  %23 = load i32, ptr %9, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = load i64, ptr %5, align 8, !tbaa !11
  %26 = icmp slt i64 %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %22
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %30
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %31)
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %39

38:                                               ; preds = %28
  store i8 1, ptr %7, align 1, !tbaa !9
  br label %39

39:                                               ; preds = %38, %28
  %40 = load i32, ptr %9, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %41
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %44 = load i32, ptr %43, align 4, !tbaa !5
  store i32 %44, ptr %8, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %39
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %9, align 4, !tbaa !5
  br label %22, !llvm.loop !13

48:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 -1000000007, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %70, %48
  %50 = load i32, ptr %11, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = load i64, ptr %5, align 8, !tbaa !11
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %49
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %73

55:                                               ; preds = %49
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sub nsw i32 %56, %60
  %62 = load i32, ptr %11, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %63
  store i32 %61, ptr %64, align 4, !tbaa !5
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %66
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %67)
  %69 = load i32, ptr %68, align 4, !tbaa !5
  store i32 %69, ptr %10, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %55
  %71 = load i32, ptr %11, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %11, align 4, !tbaa !5
  br label %49, !llvm.loop !15

73:                                               ; preds = %54
  %74 = load i64, ptr %6, align 8, !tbaa !11
  %75 = add nsw i64 %74, -1
  store i64 %75, ptr %6, align 8, !tbaa !11
  %76 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %76, ptr %8, align 4, !tbaa !5
  %77 = load i64, ptr %6, align 8, !tbaa !11
  %78 = and i64 %77, 1
  %79 = icmp ne i64 %78, 0
  br i1 %79, label %80, label %101

80:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %97, %80
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = load i64, ptr %5, align 8, !tbaa !11
  %85 = icmp slt i64 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %81
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %100

87:                                               ; preds = %81
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sub nsw i32 %88, %92
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %95
  store i32 %93, ptr %96, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %87
  %98 = load i32, ptr %12, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %12, align 4, !tbaa !5
  br label %81, !llvm.loop !16

100:                                              ; preds = %86
  br label %101

101:                                              ; preds = %100, %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %114, %101
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = load i64, ptr %5, align 8, !tbaa !11
  %106 = icmp slt i64 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %102
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %117

108:                                              ; preds = %102
  %109 = load i32, ptr %13, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %112)
  br label %114

114:                                              ; preds = %108
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %13, align 4, !tbaa !5
  br label %102, !llvm.loop !17

117:                                              ; preds = %107
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %119

119:                                              ; preds = %117
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %3, align 4, !tbaa !5
  br label %15, !llvm.loop !18

122:                                              ; preds = %19
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %123 = load i32, ptr %1, align 4
  ret i32 %123
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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 = { inlinehint 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 #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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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

@a = external dso_local global [200020 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 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 nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph41, label %._crit_edge42

._crit_edge42:                                    ; preds = %._crit_edge38, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0

.lr.ph41:                                         ; preds = %0, %._crit_edge38
  %.02339 = phi i32 [ %42, %._crit_edge38 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 -1000000007, ptr %4, align 4, !tbaa !5
  %10 = load i64, ptr %2, align 8, !tbaa !9
  %11 = icmp sgt i64 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.lr.ph41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 -1000000007, ptr %5, align 4, !tbaa !5
  br label %._crit_edge32

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 -1000000007, ptr %5, align 4, !tbaa !5
  %12 = icmp sgt i64 %17, 0
  br i1 %12, label %.lr.ph31, label %._crit_edge32

.lr.ph:                                           ; preds = %.lr.ph41, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph41 ]
  %13 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %indvars.iv
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %13)
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %16 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %16, ptr %4, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i64, ptr %2, align 8, !tbaa !9
  %18 = icmp sgt i64 %17, %indvars.iv.next
  br i1 %18, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge32:                                    ; preds = %.lr.ph31, %._crit_edge.thread, %._crit_edge
  %19 = phi i32 [ -1000000007, %._crit_edge ], [ -1000000007, %._crit_edge.thread ], [ %35, %.lr.ph31 ]
  %20 = phi i64 [ %17, %._crit_edge ], [ %10, %._crit_edge.thread ], [ %36, %.lr.ph31 ]
  %21 = load i64, ptr %3, align 8, !tbaa !9
  %22 = add nsw i64 %21, -1
  store i64 %22, ptr %3, align 8, !tbaa !9
  store i32 %19, ptr %4, align 4, !tbaa !5
  %23 = and i64 %22, 1
  %.not = icmp ne i64 %23, 0
  %24 = icmp sgt i64 %20, 0
  %or.cond = and i1 %.not, %24
  br i1 %or.cond, label %.lr.ph34.preheader, label %.loopexit

.lr.ph34.preheader:                               ; preds = %._crit_edge32
  %min.iters.check = icmp ult i64 %20, 8
  br i1 %min.iters.check, label %.lr.ph34.preheader59, label %vector.ph

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

vector.ph:                                        ; preds = %.lr.ph34.preheader
  %n.vec = and i64 %20, 9223372036854775800
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %19, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %25 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %index
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %wide.load = load <4 x i32>, ptr %25, align 16, !tbaa !5
  %wide.load58 = load <4 x i32>, ptr %26, align 16, !tbaa !5
  %27 = sub nsw <4 x i32> %broadcast.splat, %wide.load
  %28 = sub nsw <4 x i32> %broadcast.splat, %wide.load58
  store <4 x i32> %27, ptr %25, align 16, !tbaa !5
  store <4 x i32> %28, ptr %26, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %20, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph34.preheader59

.lr.ph31:                                         ; preds = %._crit_edge, %.lr.ph31
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %.lr.ph31 ], [ 0, %._crit_edge ]
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %indvars.iv45
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = sub nsw i32 %30, %32
  store i32 %33, ptr %31, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %35 = load i32, ptr %34, align 4, !tbaa !5
  store i32 %35, ptr %5, align 4, !tbaa !5
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %36 = load i64, ptr %2, align 8, !tbaa !9
  %37 = icmp sgt i64 %36, %indvars.iv.next46
  br i1 %37, label %.lr.ph31, label %._crit_edge32, !llvm.loop !16

.lr.ph34:                                         ; preds = %.lr.ph34.preheader59, %.lr.ph34
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %.lr.ph34 ], [ %indvars.iv48.ph, %.lr.ph34.preheader59 ]
  %38 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %indvars.iv48
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sub nsw i32 %19, %39
  store i32 %40, ptr %38, align 4, !tbaa !5
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next49, %20
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph34, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph34, %middle.block, %._crit_edge32
  br i1 %24, label %.lr.ph37, label %._crit_edge38

._crit_edge38:                                    ; preds = %.lr.ph37, %.loopexit
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %42 = add nuw nsw i32 %.02339, 1
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %.lr.ph41, label %._crit_edge42, !llvm.loop !18

.lr.ph37:                                         ; preds = %.loopexit, %.lr.ph37
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph37 ], [ 0, %.loopexit ]
  %45 = getelementptr inbounds [200020 x i32], ptr @a, i64 0, i64 %indvars.iv51
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %46)
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %48 = load i64, ptr %2, align 8, !tbaa !9
  %49 = icmp sgt i64 %48, %indvars.iv.next52
  br i1 %49, label %.lr.ph37, label %._crit_edge38, !llvm.loop !19
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; 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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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


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