; LLVM IR from DionysiosB/CodeForces :: CodeforcesEDU (PracticeTwoPointersMethod3A-LoopedPlaylist)

; 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 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 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 %"class.std::vector", align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %19 = load i64, ptr %2, align 8, !tbaa !5
  %20 = mul nsw i64 2, %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %20, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %21 unwind label %27

21:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %48, %21
  %23 = load i64, ptr %10, align 8, !tbaa !5
  %24 = load i64, ptr %2, align 8, !tbaa !5
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %31, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %55

27:                                               ; preds = %0
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %7, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %135

31:                                               ; preds = %22
  %32 = load i64, ptr %10, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %32) #5
  %34 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %33)
          to label %35 unwind label %51

35:                                               ; preds = %31
  %36 = load i64, ptr %10, align 8, !tbaa !5
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %36) #5
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = load i64, ptr %10, align 8, !tbaa !5
  %40 = load i64, ptr %2, align 8, !tbaa !5
  %41 = add nsw i64 %39, %40
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %41) #5
  store i64 %38, ptr %42, align 8, !tbaa !5
  %43 = load i64, ptr %10, align 8, !tbaa !5
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %43) #5
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = load i64, ptr %9, align 8, !tbaa !5
  %47 = add nsw i64 %46, %45
  store i64 %47, ptr %9, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %35
  %49 = load i64, ptr %10, align 8, !tbaa !5
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %10, align 8, !tbaa !5
  br label %22, !llvm.loop !9

51:                                               ; preds = %31
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %134

55:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %56 = load i64, ptr %3, align 8, !tbaa !5
  %57 = load i64, ptr %9, align 8, !tbaa !5
  %58 = sdiv i64 %56, %57
  store i64 %58, ptr %11, align 8, !tbaa !5
  %59 = load i64, ptr %9, align 8, !tbaa !5
  %60 = load i64, ptr %3, align 8, !tbaa !5
  %61 = srem i64 %60, %59
  store i64 %61, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !5
  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
  store i64 0, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 1, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %116, %55
  %63 = load i64, ptr %3, align 8, !tbaa !5
  %64 = icmp ne i64 %63, 0
  br i1 %64, label %65, label %70

65:                                               ; preds = %62
  %66 = load i64, ptr %16, align 8, !tbaa !5
  %67 = load i64, ptr %2, align 8, !tbaa !5
  %68 = mul nsw i64 2, %67
  %69 = icmp slt i64 %66, %68
  br label %70

70:                                               ; preds = %65, %62
  %71 = phi i1 [ false, %62 ], [ %69, %65 ]
  br i1 %71, label %73, label %72

72:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %119

73:                                               ; preds = %70
  %74 = load i64, ptr %16, align 8, !tbaa !5
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %74) #5
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = load i64, ptr %13, align 8, !tbaa !5
  %78 = add nsw i64 %77, %76
  store i64 %78, ptr %13, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %87, %73
  %80 = load i64, ptr %13, align 8, !tbaa !5
  %81 = load i64, ptr %3, align 8, !tbaa !5
  %82 = load i64, ptr %12, align 8, !tbaa !5
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %82) #5
  %84 = load i64, ptr %83, align 8, !tbaa !5
  %85 = add nsw i64 %81, %84
  %86 = icmp sgt i64 %80, %85
  br i1 %86, label %87, label %95

87:                                               ; preds = %79
  %88 = load i64, ptr %12, align 8, !tbaa !5
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %88) #5
  %90 = load i64, ptr %89, align 8, !tbaa !5
  %91 = load i64, ptr %13, align 8, !tbaa !5
  %92 = sub nsw i64 %91, %90
  store i64 %92, ptr %13, align 8, !tbaa !5
  %93 = load i64, ptr %12, align 8, !tbaa !5
  %94 = add nsw i64 %93, 1
  store i64 %94, ptr %12, align 8, !tbaa !5
  br label %79, !llvm.loop !11

95:                                               ; preds = %79
  %96 = load i64, ptr %13, align 8, !tbaa !5
  %97 = load i64, ptr %3, align 8, !tbaa !5
  %98 = icmp slt i64 %96, %97
  br i1 %98, label %99, label %100

99:                                               ; preds = %95
  br label %116

100:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %101 = load i64, ptr %16, align 8, !tbaa !5
  %102 = load i64, ptr %12, align 8, !tbaa !5
  %103 = sub nsw i64 %101, %102
  %104 = add nsw i64 %103, 1
  store i64 %104, ptr %17, align 8, !tbaa !5
  %105 = load i64, ptr %14, align 8, !tbaa !5
  %106 = icmp sle i64 %105, 0
  br i1 %106, label %111, label %107

107:                                              ; preds = %100
  %108 = load i64, ptr %17, align 8, !tbaa !5
  %109 = load i64, ptr %14, align 8, !tbaa !5
  %110 = icmp slt i64 %108, %109
  br i1 %110, label %111, label %115

111:                                              ; preds = %107, %100
  %112 = load i64, ptr %12, align 8, !tbaa !5
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %15, align 8, !tbaa !5
  %114 = load i64, ptr %17, align 8, !tbaa !5
  store i64 %114, ptr %14, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %111, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %116

116:                                              ; preds = %115, %99
  %117 = load i64, ptr %16, align 8, !tbaa !5
  %118 = add nsw i64 %117, 1
  store i64 %118, ptr %16, align 8, !tbaa !5
  br label %62, !llvm.loop !12

119:                                              ; preds = %72
  %120 = load i64, ptr %11, align 8, !tbaa !5
  %121 = load i64, ptr %2, align 8, !tbaa !5
  %122 = mul nsw i64 %120, %121
  %123 = load i64, ptr %14, align 8, !tbaa !5
  %124 = add nsw i64 %123, %122
  store i64 %124, ptr %14, align 8, !tbaa !5
  %125 = load i64, ptr %15, align 8, !tbaa !5
  %126 = load i64, ptr %14, align 8, !tbaa !5
  %127 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %125, i64 noundef %126)
          to label %128 unwind label %130

128:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, 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
  %129 = load i32, ptr %1, align 4
  ret i32 %129

130:                                              ; preds = %119
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %7, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %134

134:                                              ; preds = %130, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %135

135:                                              ; preds = %134, %27
  call void @llvm.lifetime.end.p0(i64 24, 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 %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %7, align 8
  %138 = load i32, ptr %8, align 4
  %139 = insertvalue { ptr, i32 } poison, ptr %137, 0
  %140 = insertvalue { ptr, i32 } %139, i32 %138, 1
  resume { ptr, i32 } %140
}

; 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 @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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 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

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

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

%"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 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 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 %"class.std::vector", align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %7 = load i64, ptr %1, align 8, !tbaa !5
  %8 = shl nsw i64 %7, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %8, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %9 unwind label %16

9:                                                ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = icmp sgt i64 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %9
  %12 = phi i64 [ %10, %9 ], [ %29, %.lr.ph ]
  %.0.lcssa = phi i64 [ 0, %9 ], [ %27, %.lr.ph ]
  %13 = load i64, ptr %2, align 8, !tbaa !5
  %14 = srem i64 %13, %.0.lcssa
  %15 = sdiv i64 %13, %.0.lcssa
  store i64 %14, ptr %2, align 8, !tbaa !5
  %.not51 = icmp eq i64 %14, 0
  br i1 %.not51, label %.critedge, label %.lr.ph58

16:                                               ; preds = %0
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 24, 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 } %17

.lr.ph:                                           ; preds = %9, %.lr.ph
  %.043 = phi i64 [ %27, %.lr.ph ], [ 0, %9 ]
  %.04142 = phi i64 [ %28, %.lr.ph ], [ 0, %9 ]
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04142) #5
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %18)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04142) #5
  %21 = load i64, ptr %20, align 8, !tbaa !5
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = add nsw i64 %22, %.04142
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %23) #5
  store i64 %21, ptr %24, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04142) #5
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %27 = add nsw i64 %26, %.043
  %28 = add nuw nsw i64 %.04142, 1
  %29 = load i64, ptr %1, align 8, !tbaa !5
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph58:                                         ; preds = %._crit_edge, %64
  %.03256 = phi i64 [ %65, %64 ], [ 0, %._crit_edge ]
  %.03355 = phi i64 [ %.2, %64 ], [ 1, %._crit_edge ]
  %.03454 = phi i64 [ %.236, %64 ], [ 0, %._crit_edge ]
  %.03753 = phi i64 [ %.138.lcssa, %64 ], [ 0, %._crit_edge ]
  %.03952 = phi i64 [ %.140.lcssa, %64 ], [ 0, %._crit_edge ]
  %31 = load i64, ptr %1, align 8, !tbaa !5
  %32 = shl nsw i64 %31, 1
  %33 = icmp slt i64 %.03256, %32
  br i1 %33, label %38, label %.critedge

.critedge:                                        ; preds = %.lr.ph58, %..critedge.loopexit_crit_edge, %._crit_edge
  %34 = phi i64 [ %12, %._crit_edge ], [ %.pre.pre, %..critedge.loopexit_crit_edge ], [ %31, %.lr.ph58 ]
  %.034.lcssa = phi i64 [ 0, %._crit_edge ], [ %.236, %..critedge.loopexit_crit_edge ], [ %.03454, %.lr.ph58 ]
  %.033.lcssa = phi i64 [ 1, %._crit_edge ], [ %.2, %..critedge.loopexit_crit_edge ], [ %.03355, %.lr.ph58 ]
  %35 = mul nsw i64 %34, %15
  %36 = add nsw i64 %35, %.034.lcssa
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.033.lcssa, i64 noundef %36)
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, 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
  ret i32 0

38:                                               ; preds = %.lr.ph58
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03256) #5
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = add nsw i64 %40, %.03753
  %42 = load i64, ptr %2, align 8, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.03952) #5
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = add nsw i64 %44, %42
  %46 = icmp sgt i64 %41, %45
  br i1 %46, label %.lr.ph47, label %._crit_edge48

.lr.ph47:                                         ; preds = %38, %.lr.ph47
  %.13845 = phi i64 [ %49, %.lr.ph47 ], [ %41, %38 ]
  %.14044 = phi i64 [ %50, %.lr.ph47 ], [ %.03952, %38 ]
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.14044) #5
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = sub nsw i64 %.13845, %48
  %50 = add nsw i64 %.14044, 1
  %51 = load i64, ptr %2, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %50) #5
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = add nsw i64 %53, %51
  %55 = icmp sgt i64 %49, %54
  br i1 %55, label %.lr.ph47, label %._crit_edge48, !llvm.loop !11

._crit_edge48:                                    ; preds = %.lr.ph47, %38
  %.140.lcssa = phi i64 [ %.03952, %38 ], [ %50, %.lr.ph47 ]
  %.138.lcssa = phi i64 [ %41, %38 ], [ %49, %.lr.ph47 ]
  %56 = load i64, ptr %2, align 8, !tbaa !5
  %57 = icmp slt i64 %.138.lcssa, %56
  br i1 %57, label %64, label %58

58:                                               ; preds = %._crit_edge48
  %59 = sub nsw i64 %.03256, %.140.lcssa
  %60 = add nsw i64 %59, 1
  %61 = icmp slt i64 %.03454, 1
  %62 = icmp slt i64 %60, %.03454
  %or.cond = select i1 %61, i1 true, i1 %62
  %63 = add nsw i64 %.140.lcssa, 1
  %.135 = select i1 %or.cond, i64 %60, i64 %.03454
  %.1 = select i1 %or.cond, i64 %63, i64 %.03355
  br label %64

64:                                               ; preds = %._crit_edge48, %58
  %.236 = phi i64 [ %.03454, %._crit_edge48 ], [ %.135, %58 ]
  %.2 = phi i64 [ %.03355, %._crit_edge48 ], [ %.1, %58 ]
  %65 = add nuw nsw i64 %.03256, 1
  %.not = icmp eq i64 %56, 0
  br i1 %.not, label %..critedge.loopexit_crit_edge, label %.lr.ph58, !llvm.loop !12

..critedge.loopexit_crit_edge:                    ; preds = %64
  %.pre.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %.critedge
}

; 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 @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) 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 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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: DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass