; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/WF/Easy Medium/XETF/A.ll (Z4get1xx)

; 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 [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [104 x i8], align 1
@__PRETTY_FUNCTION__._Z4get1xx = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4fastxx(i64 noundef, i64 noundef) #0

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

; 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 @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9getPrimesx(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef) #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z4get1xx(i64 noundef %0, i64 noundef %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store i64 %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  %17 = load i64, ptr %3, align 8, !tbaa !5
  call void @_Z9getPrimesx(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %5, i64 noundef %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %18 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %86, %2
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = shl i32 1, %22
  %24 = icmp slt i32 %21, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %20
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %90

26:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 1, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %48, %26
  %28 = load i32, ptr %12, align 4, !tbaa !9
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = load i32, ptr %12, align 4, !tbaa !9
  %35 = shl i32 1, %34
  %36 = and i32 %33, %35
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %47

38:                                               ; preds = %32
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40) #5
  %42 = load i64, ptr %41, align 8, !tbaa !5
  %43 = load i64, ptr %10, align 8, !tbaa !5
  %44 = mul nsw i64 %43, %42
  store i64 %44, ptr %10, align 8, !tbaa !5
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = xor i32 %45, 1
  store i32 %46, ptr %11, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %38, %32
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %12, align 4, !tbaa !9
  br label %27, !llvm.loop !11

51:                                               ; preds = %31
  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
  %52 = load i64, ptr %10, align 8, !tbaa !5
  store i64 %52, ptr %14, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %63, %51
  %54 = load i64, ptr %14, align 8, !tbaa !5
  %55 = load i64, ptr %3, align 8, !tbaa !5
  %56 = icmp sle i64 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %71

58:                                               ; preds = %53
  %59 = load i64, ptr %14, align 8, !tbaa !5
  %60 = load i64, ptr %4, align 8, !tbaa !5
  %61 = call noundef i64 @_Z4fastxx(i64 noundef %59, i64 noundef %60)
  invoke void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %61)
          to label %62 unwind label %67

62:                                               ; preds = %58
  br label %63

63:                                               ; preds = %62
  %64 = load i64, ptr %10, align 8, !tbaa !5
  %65 = load i64, ptr %14, align 8, !tbaa !5
  %66 = add nsw i64 %65, %64
  store i64 %66, ptr %14, align 8, !tbaa !5
  br label %53, !llvm.loop !13

67:                                               ; preds = %58
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %15, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %89

71:                                               ; preds = %57
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %74, label %82

74:                                               ; preds = %71
  %75 = load i64, ptr %13, align 8, !tbaa !5
  %76 = sub nsw i64 1000000007, %75
  invoke void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %76)
          to label %77 unwind label %78

77:                                               ; preds = %74
  br label %85

78:                                               ; preds = %82, %74
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %15, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %16, align 4
  br label %89

82:                                               ; preds = %71
  %83 = load i64, ptr %13, align 8, !tbaa !5
  invoke void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %83)
          to label %84 unwind label %78

84:                                               ; preds = %82
  br label %85

85:                                               ; preds = %84, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %8, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %8, align 4, !tbaa !9
  br label %20, !llvm.loop !14

89:                                               ; preds = %78, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  br label %103

90:                                               ; preds = %25
  %91 = load i64, ptr %7, align 8, !tbaa !5
  %92 = icmp sle i64 0, %91
  br i1 %92, label %93, label %96

93:                                               ; preds = %90
  %94 = load i64, ptr %7, align 8, !tbaa !5
  %95 = icmp slt i64 %94, 1000000007
  br label %96

96:                                               ; preds = %93, %90
  %97 = phi i1 [ false, %90 ], [ %95, %93 ]
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  br label %101

99:                                               ; preds = %96
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 156, ptr noundef @__PRETTY_FUNCTION__._Z4get1xx) #6
  unreachable

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %98
  %102 = load i64, ptr %7, align 8, !tbaa !5
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret i64 %102

103:                                              ; preds = %89
  %104 = load ptr, ptr %15, align 8
  %105 = load i32, ptr %16, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 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) #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { noreturn 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; 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 [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [104 x i8], align 1
@__PRETTY_FUNCTION__._Z4get1xx = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4fastxx(i64 noundef, i64 noundef) local_unnamed_addr #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: 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 @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9getPrimesx(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i64 0, 1000000007) i64 @_Z4get1xx(i64 noundef %0, i64 noundef %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_Z9getPrimesx(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %3, i64 noundef %0)
  %6 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %7 = trunc i64 %6 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 0, ptr %4, align 8, !tbaa !5
  %8 = shl nuw i32 1, %7
  %.not41 = icmp eq i32 %7, 31
  br i1 %.not41, label %._crit_edge38.thread, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %2
  %9 = icmp sgt i32 %7, 0
  br i1 %9, label %.preheader.us.preheader, label %.preheader.lr.ph.split

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %smax49 = call i32 @llvm.smax.i32(i32 %8, i32 1)
  %wide.trip.count = and i64 %6, 2147483647
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge36.us
  %.02437.us = phi i32 [ %14, %._crit_edge36.us ], [ 0, %.preheader.us.preheader ]
  br label %15

.lr.ph35.us:                                      ; preds = %._crit_edge.us, %.lr.ph35.us
  %.033.us = phi i64 [ %11, %.lr.ph35.us ], [ %.123.us, %._crit_edge.us ]
  %10 = call noundef i64 @_Z4fastxx(i64 noundef %.033.us, i64 noundef %1)
  call void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %10)
  %11 = add nsw i64 %.033.us, %.123.us
  %.not.us = icmp sgt i64 %11, %0
  br i1 %.not.us, label %._crit_edge36.us, label %.lr.ph35.us, !llvm.loop !9

._crit_edge36.us:                                 ; preds = %.lr.ph35.us, %._crit_edge.us
  %.not26.us = icmp eq i32 %.1.us, 0
  %12 = load i64, ptr %5, align 8, !tbaa !5
  %13 = sub nsw i64 1000000007, %12
  %.sink = select i1 %.not26.us, i64 %12, i64 %13
  call void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %14 = add nuw nsw i32 %.02437.us, 1
  %exitcond50.not = icmp eq i32 %14, %smax49
  br i1 %exitcond50.not, label %._crit_edge38, label %.preheader.us, !llvm.loop !11

15:                                               ; preds = %.preheader.us, %24
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %24 ]
  %.02129.us = phi i32 [ 0, %.preheader.us ], [ %.1.us, %24 ]
  %.02228.us = phi i64 [ 1, %.preheader.us ], [ %.123.us, %24 ]
  %16 = trunc nuw nsw i64 %indvars.iv to i32
  %17 = shl nuw i32 1, %16
  %18 = and i32 %17, %.02437.us
  %.not27.us = icmp eq i32 %18, 0
  br i1 %.not27.us, label %24, label %19

19:                                               ; preds = %15
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #6
  %21 = load i64, ptr %20, align 8, !tbaa !5
  %22 = mul nsw i64 %21, %.02228.us
  %23 = xor i32 %.02129.us, 1
  br label %24

24:                                               ; preds = %19, %15
  %.123.us = phi i64 [ %22, %19 ], [ %.02228.us, %15 ]
  %.1.us = phi i32 [ %23, %19 ], [ %.02129.us, %15 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond48.not, label %._crit_edge.us, label %15, !llvm.loop !12

._crit_edge.us:                                   ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  %.not32.us = icmp sgt i64 %.123.us, %0
  br i1 %.not32.us, label %._crit_edge36.us, label %.lr.ph35.us

.preheader.lr.ph.split:                           ; preds = %.preheader.lr.ph
  %.not32 = icmp slt i64 %0, 1
  %smax45 = call i32 @llvm.smax.i32(i32 %8, i32 1)
  br i1 %.not32, label %.preheader.us39, label %.preheader

.preheader.us39:                                  ; preds = %.preheader.lr.ph.split, %.preheader.us39
  %.02437.us40 = phi i32 [ %25, %.preheader.us39 ], [ 0, %.preheader.lr.ph.split ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %25 = add nuw nsw i32 %.02437.us40, 1
  %exitcond46.not = icmp eq i32 %25, %smax45
  br i1 %exitcond46.not, label %._crit_edge38, label %.preheader.us39, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.lr.ph.split, %._crit_edge36
  %.02437 = phi i32 [ %28, %._crit_edge36 ], [ 0, %.preheader.lr.ph.split ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  br label %29

._crit_edge38:                                    ; preds = %._crit_edge36, %.preheader.us39, %._crit_edge36.us
  %.pr = load i64, ptr %4, align 8
  %26 = icmp ult i64 %.pr, 1000000007
  br i1 %26, label %._crit_edge38.thread, label %32

._crit_edge36:                                    ; preds = %29
  %27 = load i64, ptr %5, align 8, !tbaa !5
  call void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %27)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %28 = add nuw nsw i32 %.02437, 1
  %exitcond44.not = icmp eq i32 %28, %smax45
  br i1 %exitcond44.not, label %._crit_edge38, label %.preheader, !llvm.loop !11

29:                                               ; preds = %.preheader, %29
  %.033 = phi i64 [ 1, %.preheader ], [ %31, %29 ]
  %30 = call noundef i64 @_Z4fastxx(i64 noundef %.033, i64 noundef %1)
  call void @_Z3addRxx(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %30)
  %31 = add nuw i64 %.033, 1
  %exitcond.not = icmp eq i64 %.033, %0
  br i1 %exitcond.not, label %._crit_edge36, label %29, !llvm.loop !9

32:                                               ; preds = %._crit_edge38
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 156, ptr noundef nonnull @__PRETTY_FUNCTION__._Z4get1xx) #7
  unreachable

._crit_edge38.thread:                             ; preds = %2, %._crit_edge38
  %33 = phi i64 [ %.pr, %._crit_edge38 ], [ 0, %2 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret i64 %33
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 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 #0 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { noreturn 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass