; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SHORT/COOK68/Problem A/A.ll (Z5solvev)

; 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 [100100 x i32], align 16
@ans = external dso_local global [100100 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %20, %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  br label %23

15:                                               ; preds = %10
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %17
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %18)
  br label %20

20:                                               ; preds = %15
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !9

23:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %75, %23
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

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

29:                                               ; preds = %24
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %35, label %42

35:                                               ; preds = %29
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = sub nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %55, label %42

42:                                               ; preds = %35, %29
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp slt i32 %46, 0
  br i1 %47, label %48, label %74

48:                                               ; preds = %42
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = icmp slt i32 %53, 0
  br i1 %54, label %55, label %74

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

57:                                               ; preds = %69, %55
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

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

62:                                               ; preds = %57
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = sub nsw i32 %63, %64
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %67
  store i32 %65, ptr %68, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %62
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %6, align 4, !tbaa !5
  br label %57, !llvm.loop !11

72:                                               ; preds = %61
  %73 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %73, ptr %3, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %72, %48, %42
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %4, align 4, !tbaa !5
  br label %24, !llvm.loop !12

78:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %79 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %79, ptr %7, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %92, %78
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = load i32, ptr %1, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %95

85:                                               ; preds = %80
  %86 = load i32, ptr %1, align 4, !tbaa !5
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = sub nsw i32 %86, %87
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %90
  store i32 %88, ptr %91, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %85
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %7, align 4, !tbaa !5
  br label %80, !llvm.loop !13

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

96:                                               ; preds = %107, %95
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = load i32, ptr %1, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

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

101:                                              ; preds = %96
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %105)
  br label %107

107:                                              ; preds = %101
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %8, align 4, !tbaa !5
  br label %96, !llvm.loop !14

110:                                              ; preds = %100
  %111 = call i32 @puts(ptr noundef @.str.2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

; 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

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

declare i32 @puts(ptr noundef) #2

attributes #0 = { 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 #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 = { 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"

@a = external dso_local global [100100 x i32], align 16
@ans = external dso_local local_unnamed_addr global [100100 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress nofree nounwind uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  %2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %.preheader31

.preheader32:                                     ; preds = %.lr.ph
  %5 = icmp sgt i32 %8, 1
  br i1 %5, label %.lr.ph38.preheader, label %.preheader31

.lr.ph38.preheader:                               ; preds = %.preheader32
  %wide.trip.count52 = zext nneg i32 %8 to i64
  br label %.lr.ph38

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %6 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %indvars.iv
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %6)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = icmp slt i64 %indvars.iv.next, %9
  br i1 %10, label %.lr.ph, label %.preheader32, !llvm.loop !9

.preheader31:                                     ; preds = %.thread, %0, %.preheader32
  %11 = phi i32 [ %8, %.preheader32 ], [ %3, %0 ], [ %8, %.thread ]
  %.028.lcssa = phi i32 [ 0, %.preheader32 ], [ 0, %0 ], [ %.1, %.thread ]
  %12 = icmp slt i32 %.028.lcssa, %11
  br i1 %12, label %.lr.ph41.preheader, label %.preheader

.lr.ph41.preheader:                               ; preds = %.preheader31
  %13 = sext i32 %.028.lcssa to i64
  %14 = sext i32 %11 to i64
  %15 = sub nsw i64 %14, %13
  %min.iters.check64 = icmp ult i64 %15, 8
  br i1 %min.iters.check64, label %.lr.ph41.preheader84, label %vector.ph65

.lr.ph41.preheader84:                             ; preds = %middle.block62, %.lr.ph41.preheader
  %indvars.iv54.ph = phi i64 [ %13, %.lr.ph41.preheader ], [ %ind.end68, %middle.block62 ]
  br label %.lr.ph41

vector.ph65:                                      ; preds = %.lr.ph41.preheader
  %n.vec67 = and i64 %15, -8
  %ind.end68 = add nsw i64 %n.vec67, %13
  %.splatinsert72 = insertelement <4 x i32> poison, i32 %.028.lcssa, i64 0
  %.splat73 = shufflevector <4 x i32> %.splatinsert72, <4 x i32> poison, <4 x i32> zeroinitializer
  %induction74 = add <4 x i32> %.splat73, <i32 0, i32 1, i32 2, i32 3>
  %broadcast.splatinsert80 = insertelement <4 x i32> poison, i32 %11, i64 0
  %broadcast.splat81 = shufflevector <4 x i32> %broadcast.splatinsert80, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body70

vector.body70:                                    ; preds = %vector.body70, %vector.ph65
  %index71 = phi i64 [ 0, %vector.ph65 ], [ %index.next82, %vector.body70 ]
  %vec.ind75 = phi <4 x i32> [ %induction74, %vector.ph65 ], [ %vec.ind.next78, %vector.body70 ]
  %step.add76 = add <4 x i32> %vec.ind75, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx79 = add i64 %index71, %13
  %16 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %offset.idx79
  %17 = sub <4 x i32> %broadcast.splat81, %vec.ind75
  %18 = sub <4 x i32> %broadcast.splat81, %step.add76
  %19 = getelementptr inbounds i8, ptr %16, i64 16
  store <4 x i32> %17, ptr %16, align 4, !tbaa !5
  store <4 x i32> %18, ptr %19, align 4, !tbaa !5
  %index.next82 = add nuw i64 %index71, 8
  %vec.ind.next78 = add <4 x i32> %vec.ind75, <i32 8, i32 8, i32 8, i32 8>
  %20 = icmp eq i64 %index.next82, %n.vec67
  br i1 %20, label %middle.block62, label %vector.body70, !llvm.loop !11

middle.block62:                                   ; preds = %vector.body70
  %cmp.n83 = icmp eq i64 %15, %n.vec67
  br i1 %cmp.n83, label %.preheader, label %.lr.ph41.preheader84

.lr.ph38:                                         ; preds = %.lr.ph38.preheader, %.thread
  %indvars.iv49 = phi i64 [ 1, %.lr.ph38.preheader ], [ %indvars.iv.next50, %.thread ]
  %.02836 = phi i32 [ 0, %.lr.ph38.preheader ], [ %.1, %.thread ]
  %21 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %indvars.iv49
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %24, label %29

24:                                               ; preds = %.lr.ph38
  %25 = add nsw i64 %indvars.iv49, -1
  %26 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %36, label %.thread

29:                                               ; preds = %.lr.ph38
  %30 = icmp slt i32 %22, 0
  br i1 %30, label %31, label %.thread

31:                                               ; preds = %29
  %32 = add nsw i64 %indvars.iv49, -1
  %33 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = icmp slt i32 %34, 0
  br i1 %35, label %36, label %.thread

36:                                               ; preds = %31, %24
  %37 = sext i32 %.02836 to i64
  %38 = icmp sgt i64 %indvars.iv49, %37
  %39 = trunc nuw nsw i64 %indvars.iv49 to i32
  br i1 %38, label %.lr.ph35.preheader, label %.thread

.lr.ph35.preheader:                               ; preds = %36
  %40 = sub i64 %indvars.iv49, %37
  %min.iters.check = icmp ult i64 %40, 8
  br i1 %min.iters.check, label %.lr.ph35.preheader85, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph35.preheader
  %n.vec = and i64 %40, -8
  %ind.end = add i64 %n.vec, %37
  %.splatinsert = insertelement <4 x i64> poison, i64 %37, i64 0
  %.splat = shufflevector <4 x i64> %.splatinsert, <4 x i64> poison, <4 x i32> zeroinitializer
  %induction = add <4 x i64> %.splat, <i64 0, i64 1, i64 2, i64 3>
  %broadcast.splatinsert = insertelement <4 x i64> poison, i64 %indvars.iv49, i64 0
  %broadcast.splat = shufflevector <4 x i64> %broadcast.splatinsert, <4 x i64> 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 ]
  %vec.ind = phi <4 x i64> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i64> %vec.ind, <i64 4, i64 4, i64 4, i64 4>
  %offset.idx = add i64 %index, %37
  %41 = sub nsw <4 x i64> %broadcast.splat, %vec.ind
  %42 = sub nsw <4 x i64> %broadcast.splat, %step.add
  %43 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %offset.idx
  %44 = trunc <4 x i64> %41 to <4 x i32>
  %45 = trunc <4 x i64> %42 to <4 x i32>
  %46 = getelementptr inbounds i8, ptr %43, i64 16
  store <4 x i32> %44, ptr %43, align 4, !tbaa !5
  store <4 x i32> %45, ptr %46, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i64> %vec.ind, <i64 8, i64 8, i64 8, i64 8>
  %47 = icmp eq i64 %index.next, %n.vec
  br i1 %47, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %40, %n.vec
  br i1 %cmp.n, label %.thread, label %.lr.ph35.preheader85

.lr.ph35.preheader85:                             ; preds = %middle.block, %.lr.ph35.preheader
  %indvars.iv46.ph = phi i64 [ %37, %.lr.ph35.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph35

.lr.ph35:                                         ; preds = %.lr.ph35.preheader85, %.lr.ph35
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %.lr.ph35 ], [ %indvars.iv46.ph, %.lr.ph35.preheader85 ]
  %48 = sub nsw i64 %indvars.iv49, %indvars.iv46
  %49 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %indvars.iv46
  %50 = trunc nsw i64 %48 to i32
  store i32 %50, ptr %49, align 4, !tbaa !5
  %indvars.iv.next47 = add nsw i64 %indvars.iv46, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next47, %indvars.iv49
  br i1 %exitcond.not, label %.thread, label %.lr.ph35, !llvm.loop !15

.thread:                                          ; preds = %.lr.ph35, %middle.block, %36, %24, %29, %31
  %.1 = phi i32 [ %.02836, %31 ], [ %.02836, %29 ], [ %.02836, %24 ], [ %39, %36 ], [ %39, %middle.block ], [ %39, %.lr.ph35 ]
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %exitcond53.not = icmp eq i64 %indvars.iv.next50, %wide.trip.count52
  br i1 %exitcond53.not, label %.preheader31, label %.lr.ph38, !llvm.loop !16

.preheader:                                       ; preds = %.lr.ph41, %middle.block62, %.preheader31
  %51 = icmp sgt i32 %11, 0
  br i1 %51, label %.lr.ph43, label %._crit_edge

.lr.ph41:                                         ; preds = %.lr.ph41.preheader84, %.lr.ph41
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.lr.ph41 ], [ %indvars.iv54.ph, %.lr.ph41.preheader84 ]
  %52 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %indvars.iv54
  %53 = trunc i64 %indvars.iv54 to i32
  %54 = sub i32 %11, %53
  store i32 %54, ptr %52, align 4, !tbaa !5
  %indvars.iv.next55 = add nsw i64 %indvars.iv54, 1
  %exitcond57.not = icmp eq i64 %indvars.iv.next55, %14
  br i1 %exitcond57.not, label %.preheader, label %.lr.ph41, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph43, %.preheader
  %55 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  ret void

.lr.ph43:                                         ; preds = %.preheader, %.lr.ph43
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %.lr.ph43 ], [ 0, %.preheader ]
  %56 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %indvars.iv58
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %57)
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next59, %60
  br i1 %61, label %.lr.ph43, label %._crit_edge, !llvm.loop !18
}

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

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

attributes #0 = { 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" }
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 = { 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, !12, !13}
!15 = distinct !{!15, !10, !13, !12}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !13, !12}
!18 = distinct !{!18, !10}


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