; LLVM IR from DionysiosB/CodeForces :: 1600-1699 (1619C-WrongAddition)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %16

16:                                               ; preds = %121, %0
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = add nsw i64 %17, -1
  store i64 %18, ptr %2, align 8, !tbaa !5
  %19 = icmp ne i64 %17, 0
  br i1 %19, label %20, label %123

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 1, ptr %6, align 1, !tbaa !9
  br label %22

22:                                               ; preds = %83, %20
  %23 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %24 = trunc i8 %23 to i1
  br i1 %24, label %25, label %28

25:                                               ; preds = %22
  %26 = load i64, ptr %3, align 8, !tbaa !5
  %27 = icmp sgt i64 %26, 0
  br label %28

28:                                               ; preds = %25, %22
  %29 = phi i1 [ false, %22 ], [ %27, %25 ]
  br i1 %29, label %30, label %85

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %31 = load i64, ptr %3, align 8, !tbaa !5
  %32 = srem i64 %31, 10
  store i64 %32, ptr %7, align 8, !tbaa !5
  %33 = load i64, ptr %3, align 8, !tbaa !5
  %34 = sdiv i64 %33, 10
  store i64 %34, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %35 = load i64, ptr %4, align 8, !tbaa !5
  %36 = srem i64 %35, 10
  store i64 %36, ptr %8, align 8, !tbaa !5
  %37 = load i64, ptr %4, align 8, !tbaa !5
  %38 = sdiv i64 %37, 10
  store i64 %38, ptr %4, align 8, !tbaa !5
  %39 = load i64, ptr %7, align 8, !tbaa !5
  %40 = load i64, ptr %8, align 8, !tbaa !5
  %41 = icmp sle i64 %39, %40
  br i1 %41, label %42, label %51

42:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %43 = load i64, ptr %8, align 8, !tbaa !5
  %44 = load i64, ptr %7, align 8, !tbaa !5
  %45 = sub nsw i64 %43, %44
  store i64 %45, ptr %9, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %46 unwind label %47

46:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %83

47:                                               ; preds = %42
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %10, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %84

51:                                               ; preds = %30
  %52 = load i64, ptr %4, align 8, !tbaa !5
  %53 = icmp sgt i64 %52, 0
  br i1 %53, label %54, label %81

54:                                               ; preds = %51
  %55 = load i64, ptr %4, align 8, !tbaa !5
  %56 = srem i64 %55, 10
  %57 = mul nsw i64 10, %56
  %58 = load i64, ptr %8, align 8, !tbaa !5
  %59 = add nsw i64 %58, %57
  store i64 %59, ptr %8, align 8, !tbaa !5
  %60 = load i64, ptr %4, align 8, !tbaa !5
  %61 = sdiv i64 %60, 10
  store i64 %61, ptr %4, align 8, !tbaa !5
  %62 = load i64, ptr %8, align 8, !tbaa !5
  %63 = load i64, ptr %7, align 8, !tbaa !5
  %64 = icmp slt i64 %62, %63
  br i1 %64, label %70, label %65

65:                                               ; preds = %54
  %66 = load i64, ptr %8, align 8, !tbaa !5
  %67 = load i64, ptr %7, align 8, !tbaa !5
  %68 = add nsw i64 9, %67
  %69 = icmp sgt i64 %66, %68
  br i1 %69, label %70, label %71

70:                                               ; preds = %65, %54
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %80

71:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %72 = load i64, ptr %8, align 8, !tbaa !5
  %73 = load i64, ptr %7, align 8, !tbaa !5
  %74 = sub nsw i64 %72, %73
  store i64 %74, ptr %12, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %75 unwind label %76

75:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %80

76:                                               ; preds = %71
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %10, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %84

80:                                               ; preds = %75, %70
  br label %82

81:                                               ; preds = %51
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %82

82:                                               ; preds = %81, %80
  br label %83

83:                                               ; preds = %82, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %22, !llvm.loop !13

84:                                               ; preds = %76, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %122

85:                                               ; preds = %28
  %86 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %87 = trunc i8 %86 to i1
  br i1 %87, label %88, label %118

88:                                               ; preds = %85
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %89 unwind label %96

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %90 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %91 = sub i64 %90, 1
  store i64 %91, ptr %14, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %107, %89
  %93 = load i64, ptr %14, align 8, !tbaa !5
  %94 = icmp sge i64 %93, 0
  br i1 %94, label %100, label %95

95:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %110

96:                                               ; preds = %118, %88
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %10, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %11, align 4
  br label %122

100:                                              ; preds = %92
  %101 = load i64, ptr %13, align 8, !tbaa !5
  %102 = mul nsw i64 10, %101
  %103 = load i64, ptr %14, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %103) #5
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %106 = add nsw i64 %102, %105
  store i64 %106, ptr %13, align 8, !tbaa !5
  br label %107

107:                                              ; preds = %100
  %108 = load i64, ptr %14, align 8, !tbaa !5
  %109 = add nsw i64 %108, -1
  store i64 %109, ptr %14, align 8, !tbaa !5
  br label %92, !llvm.loop !15

110:                                              ; preds = %95
  %111 = load i64, ptr %13, align 8, !tbaa !5
  %112 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %111)
          to label %113 unwind label %114

113:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %121

114:                                              ; preds = %110
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %10, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %122

118:                                              ; preds = %85
  %119 = invoke i32 @puts(ptr noundef @.str.3)
          to label %120 unwind label %96

120:                                              ; preds = %118
  br label %121

121:                                              ; preds = %120, %113
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %16, !llvm.loop !16

122:                                              ; preds = %114, %96, %84
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %125

123:                                              ; preds = %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %124 = load i32, ptr %1, align 4
  ret i32 %124

125:                                              ; preds = %122
  %126 = load ptr, ptr %10, align 8
  %127 = load i32, ptr %11, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129
}

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

declare i32 @puts(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 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 = { 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 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %8 = load i64, ptr %1, align 8, !tbaa !5
  %9 = add nsw i64 %8, -1
  store i64 %9, ptr %1, align 8, !tbaa !5
  %.not47 = icmp eq i64 %8, 0
  br i1 %.not47, label %._crit_edge50, label %.lr.ph49

.lr.ph49:                                         ; preds = %0, %53
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %10 = 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 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %11 = load i64, ptr %2, align 8
  %12 = icmp sgt i64 %11, 0
  br i1 %12, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.lr.ph49, %39
  %13 = phi i64 [ %40, %39 ], [ %11, %.lr.ph49 ]
  %14 = urem i64 %13, 10
  %15 = udiv i64 %13, 10
  store i64 %15, ptr %2, align 8, !tbaa !5
  %16 = load i64, ptr %3, align 8, !tbaa !5
  %17 = srem i64 %16, 10
  %18 = sdiv i64 %16, 10
  store i64 %18, ptr %3, align 8, !tbaa !5
  %.not33 = icmp sgt i64 %14, %17
  br i1 %.not33, label %24, label %19

19:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %20 = sub nsw i64 %17, %14
  store i64 %20, ptr %5, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %21 unwind label %22

21:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %39

22:                                               ; preds = %19
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %56

24:                                               ; preds = %.lr.ph
  %25 = icmp sgt i64 %16, 9
  br i1 %25, label %26, label %._crit_edge

26:                                               ; preds = %24
  %27 = urem i64 %18, 10
  %28 = mul nuw nsw i64 %27, 10
  %29 = add nuw nsw i64 %28, %17
  %30 = udiv i64 %18, 10
  store i64 %30, ptr %3, align 8, !tbaa !5
  %31 = icmp slt i64 %29, %14
  %32 = add nuw nsw i64 %14, 9
  %33 = icmp sgt i64 %29, %32
  %or.cond = select i1 %31, i1 true, i1 %33
  br i1 %or.cond, label %._crit_edge, label %34

34:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %35 = sub nsw i64 %29, %14
  store i64 %35, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %36 unwind label %37

36:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %39

37:                                               ; preds = %34
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %56

39:                                               ; preds = %36, %21
  %40 = load i64, ptr %2, align 8
  %41 = icmp sgt i64 %40, 0
  br i1 %41, label %.lr.ph, label %.critedge, !llvm.loop !9

.critedge:                                        ; preds = %39, %.lr.ph49
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %42 unwind label %46

42:                                               ; preds = %.critedge
  %43 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %.040 = add i64 %43, -1
  %44 = icmp sgt i64 %.040, -1
  br i1 %44, label %.lr.ph44, label %._crit_edge45

._crit_edge45:                                    ; preds = %.lr.ph44, %42
  %.020.lcssa = phi i64 [ 0, %42 ], [ %51, %.lr.ph44 ]
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.020.lcssa)
  br label %53

46:                                               ; preds = %.critedge
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %56

.lr.ph44:                                         ; preds = %42, %.lr.ph44
  %.042 = phi i64 [ %.0, %.lr.ph44 ], [ %.040, %42 ]
  %.02041 = phi i64 [ %51, %.lr.ph44 ], [ 0, %42 ]
  %48 = mul nsw i64 %.02041, 10
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.042) #5
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = add nsw i64 %50, %48
  %.0 = add nsw i64 %.042, -1
  %.not54 = icmp eq i64 %.042, 0
  br i1 %.not54, label %._crit_edge45, label %.lr.ph44, !llvm.loop !11

._crit_edge:                                      ; preds = %24, %26
  %52 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %53

53:                                               ; preds = %._crit_edge, %._crit_edge45
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %54 = load i64, ptr %1, align 8, !tbaa !5
  %55 = add nsw i64 %54, -1
  store i64 %55, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %54, 0
  br i1 %.not, label %._crit_edge50, label %.lr.ph49, !llvm.loop !12

56:                                               ; preds = %22, %37, %46
  %.pn.pn = phi { ptr, i32 } [ %47, %46 ], [ %23, %22 ], [ %38, %37 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn.pn

._crit_edge50:                                    ; preds = %53, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass