; LLVM IR from brpapa/algorithms :: solutions/uri (1271)

; 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 [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [50005 x i32], align 16
  %3 = alloca [50005 x i32], align 16
  %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 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 200020, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 200020, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %108, %0
  br label %15

15:                                               ; preds = %14
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %4)
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %21

19:                                               ; preds = %15
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 200020, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 200020, ptr %2) #4
  %20 = load i32, ptr %1, align 4
  ret i32 %20

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %35, %21
  %23 = load i32, ptr %12, align 4, !tbaa !5
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = icmp sle i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  %28 = load i32, ptr %12, align 4, !tbaa !5
  %29 = load i32, ptr %12, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [50005 x i32], ptr %3, i64 0, i64 %30
  store i32 %28, ptr %31, align 4, !tbaa !5
  %32 = load i32, ptr %12, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %33
  store i32 %28, ptr %34, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %27
  %36 = load i32, ptr %12, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %12, align 4, !tbaa !5
  br label %22, !llvm.loop !9

38:                                               ; preds = %26
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  br label %40

40:                                               ; preds = %91, %38
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr %5, align 4, !tbaa !5
  %43 = icmp ne i32 %41, 0
  br i1 %43, label %44, label %92

44:                                               ; preds = %40
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %6, ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %88, %44
  %47 = load i32, ptr %13, align 4, !tbaa !5
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = sub nsw i32 %48, %49
  %51 = add nsw i32 %50, 1
  %52 = sdiv i32 %51, 2
  %53 = icmp slt i32 %47, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %46
  store i32 9, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %91

55:                                               ; preds = %46
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = load i32, ptr %13, align 4, !tbaa !5
  %58 = add nsw i32 %56, %57
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %59
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = load i32, ptr %13, align 4, !tbaa !5
  %63 = sub nsw i32 %61, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %64
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %60, ptr noundef nonnull align 4 dereferenceable(4) %65) #4
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = load i32, ptr %13, align 4, !tbaa !5
  %68 = add nsw i32 %66, %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = load i32, ptr %13, align 4, !tbaa !5
  %71 = add nsw i32 %69, %70
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [50005 x i32], ptr %3, i64 0, i64 %75
  store i32 %68, ptr %76, align 4, !tbaa !5
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = load i32, ptr %13, align 4, !tbaa !5
  %79 = sub nsw i32 %77, %78
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = load i32, ptr %13, align 4, !tbaa !5
  %82 = sub nsw i32 %80, %81
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [50005 x i32], ptr %3, i64 0, i64 %86
  store i32 %79, ptr %87, align 4, !tbaa !5
  br label %88

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

91:                                               ; preds = %54
  br label %40, !llvm.loop !12

92:                                               ; preds = %40
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %10, align 4, !tbaa !5
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %93)
  %96 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %8)
  br label %97

97:                                               ; preds = %101, %92
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = add nsw i32 %98, -1
  store i32 %99, ptr %8, align 4, !tbaa !5
  %100 = icmp ne i32 %98, 0
  br i1 %100, label %101, label %108

101:                                              ; preds = %97
  %102 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %9)
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [50005 x i32], ptr %3, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %106)
  br label %97, !llvm.loop !13

108:                                              ; preds = %97
  br label %14, !llvm.loop !14
}

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

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

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [50005 x i32], align 16
  %2 = alloca [50005 x i32], align 16
  %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
  call void @llvm.lifetime.start.p0(i64 200020, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 200020, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %._crit_edge34, label %.preheader

.loopexit19:                                      ; preds = %.lr.ph32, %._crit_edge29
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %._crit_edge34, label %.preheader, !llvm.loop !9

.preheader:                                       ; preds = %0, %.loopexit19
  %15 = phi i32 [ %13, %.loopexit19 ], [ %10, %0 ]
  %.01633 = phi i32 [ %64, %.loopexit19 ], [ 1, %0 ]
  %.not20 = icmp slt i32 %15, 1
  br i1 %.not20, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %16 = add nuw i32 %15, 1
  %wide.trip.count = zext i32 %16 to i64
  %17 = zext nneg i32 %15 to i64
  %min.iters.check = icmp ult i32 %15, 8
  br i1 %min.iters.check, label %.lr.ph.preheader37, label %vector.ph

.lr.ph.preheader37:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %17, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx = or disjoint i64 %index, 1
  %18 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %offset.idx
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store <4 x i32> %vec.ind, ptr %18, align 4, !tbaa !5
  store <4 x i32> %step.add, ptr %19, align 4, !tbaa !5
  %20 = getelementptr inbounds [50005 x i32], ptr %1, i64 0, i64 %offset.idx
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  store <4 x i32> %vec.ind, ptr %20, align 4, !tbaa !5
  store <4 x i32> %step.add, ptr %21, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %22 = icmp eq i64 %index.next, %n.vec
  br i1 %22, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %17
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader37

._crit_edge34:                                    ; preds = %.loopexit19, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  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 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 200020, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 200020, ptr nonnull %1) #4
  ret i32 0

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.preheader
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = add nsw i32 %24, -1
  store i32 %25, ptr %4, align 4, !tbaa !5
  %.not1726 = icmp eq i32 %24, 0
  br i1 %.not1726, label %._crit_edge29, label %.lr.ph28

.lr.ph:                                           ; preds = %.lr.ph.preheader37, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader37 ]
  %26 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %indvars.iv
  %27 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %27, ptr %26, align 4, !tbaa !5
  %28 = getelementptr inbounds [50005 x i32], ptr %1, i64 0, i64 %indvars.iv
  store i32 %27, ptr %28, 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 !14

.loopexit:                                        ; preds = %.lr.ph25, %.lr.ph28
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = add nsw i32 %29, -1
  store i32 %30, ptr %4, align 4, !tbaa !5
  %.not17 = icmp eq i32 %29, 0
  br i1 %.not17, label %._crit_edge29, label %.lr.ph28, !llvm.loop !15

.lr.ph28:                                         ; preds = %._crit_edge, %.loopexit
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = add i32 %32, 1
  %35 = sub i32 %34, %33
  %36 = icmp sgt i32 %35, 1
  br i1 %36, label %.lr.ph25, label %.loopexit

.lr.ph25:                                         ; preds = %.lr.ph28, %.lr.ph25
  %37 = phi i32 [ %45, %.lr.ph25 ], [ %33, %.lr.ph28 ]
  %38 = phi i32 [ %52, %.lr.ph25 ], [ %32, %.lr.ph28 ]
  %.023 = phi i32 [ %59, %.lr.ph25 ], [ 0, %.lr.ph28 ]
  %39 = add nsw i32 %37, %.023
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [50005 x i32], ptr %1, i64 0, i64 %40
  %42 = sub nsw i32 %38, %.023
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [50005 x i32], ptr %1, i64 0, i64 %43
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(4) %44) #4
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = add nsw i32 %45, %.023
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [50005 x i32], ptr %1, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %50
  store i32 %46, ptr %51, align 4, !tbaa !5
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sub nsw i32 %52, %.023
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [50005 x i32], ptr %1, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %57
  store i32 %53, ptr %58, align 4, !tbaa !5
  %59 = add nuw nsw i32 %.023, 1
  %60 = add i32 %52, 1
  %61 = sub i32 %60, %45
  %62 = sdiv i32 %61, 2
  %63 = icmp slt i32 %59, %62
  br i1 %63, label %.lr.ph25, label %.loopexit, !llvm.loop !16

._crit_edge29:                                    ; preds = %.loopexit, %._crit_edge
  %64 = add nuw nsw i32 %.01633, 1
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.01633)
  %66 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7)
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = add nsw i32 %67, -1
  store i32 %68, ptr %7, align 4, !tbaa !5
  %.not1830 = icmp eq i32 %67, 0
  br i1 %.not1830, label %.loopexit19, label %.lr.ph32

.lr.ph32:                                         ; preds = %._crit_edge29, %.lr.ph32
  %69 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %8)
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [50005 x i32], ptr %2, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %73)
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr %7, align 4, !tbaa !5
  %.not18 = icmp eq i32 %75, 0
  br i1 %.not18, label %.loopexit19, label %.lr.ph32, !llvm.loop !17
}

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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


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