; LLVM IR from DionysiosB/CodeForces :: 1400-1499/1465B-FairNumbers.ll (Z5checkx)

; 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::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5checkx(i64 noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::_Bit_reference", align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef 10, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %13 unwind label %30

13:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %14 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %14, ptr %8, align 8, !tbaa !5
  br label %15

15:                                               ; preds = %22, %13
  %16 = load i64, ptr %8, align 8, !tbaa !5
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %18, label %38

18:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #3
  %19 = load i64, ptr %8, align 8, !tbaa !5
  %20 = srem i64 %19, 10
  %21 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %20)
          to label %22 unwind label %34

22:                                               ; preds = %18
  %23 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %24 = extractvalue { ptr, i64 } %21, 0
  store ptr %24, ptr %23, align 8
  %25 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %26 = extractvalue { ptr, i64 } %21, 1
  store i64 %26, ptr %25, align 8
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext true) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  %28 = load i64, ptr %8, align 8, !tbaa !5
  %29 = sdiv i64 %28, 10
  store i64 %29, ptr %8, align 8, !tbaa !5
  br label %15, !llvm.loop !9

30:                                               ; preds = %1
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %6, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  br label %74

34:                                               ; preds = %18
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %6, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #3
  br label %73

38:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 1, ptr %10, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %65, %38
  %40 = load i64, ptr %10, align 8, !tbaa !5
  %41 = icmp sle i64 %40, 9
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 4, ptr %11, align 4
  br label %68

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #3
  %44 = load i64, ptr %10, align 8, !tbaa !5
  %45 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %44)
          to label %46 unwind label %60

46:                                               ; preds = %43
  %47 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %48 = extractvalue { ptr, i64 } %45, 0
  store ptr %48, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %50 = extractvalue { ptr, i64 } %45, 1
  store i64 %50, ptr %49, align 8
  %51 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #3
  br i1 %51, label %52, label %57

52:                                               ; preds = %46
  %53 = load i64, ptr %3, align 8, !tbaa !5
  %54 = load i64, ptr %10, align 8, !tbaa !5
  %55 = srem i64 %53, %54
  %56 = icmp ne i64 %55, 0
  br label %57

57:                                               ; preds = %52, %46
  %58 = phi i1 [ false, %46 ], [ %56, %52 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #3
  br i1 %58, label %59, label %64

59:                                               ; preds = %57
  store i1 false, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %68

60:                                               ; preds = %43
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %6, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %73

64:                                               ; preds = %57
  br label %65

65:                                               ; preds = %64
  %66 = load i64, ptr %10, align 8, !tbaa !5
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %10, align 8, !tbaa !5
  br label %39, !llvm.loop !11

68:                                               ; preds = %59, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %69 = load i32, ptr %11, align 4
  switch i32 %69, label %71 [
    i32 4, label %70
  ]

70:                                               ; preds = %68
  store i1 true, ptr %2, align 1
  store i32 1, ptr %11, align 4
  br label %71

71:                                               ; preds = %70, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #3
  %72 = load i1, ptr %2, align 1
  ret i1 %72

73:                                               ; preds = %60, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #3
  br label %74

74:                                               ; preds = %73, %30
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #3
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %6, align 8
  %77 = load i32, ptr %7, align 4
  %78 = insertvalue { ptr, i32 } poison, ptr %76, 0
  %79 = insertvalue { ptr, i32 } %78, i32 %77, 1
  resume { ptr, i32 } %79
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; 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 { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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


; 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::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5checkx(i64 noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"struct.std::_Bit_reference", align 8
  %5 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #3
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 10, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %6 unwind label %19

6:                                                ; preds = %1
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  %7 = icmp sgt i64 %0, 0
  br i1 %7, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %6
  %8 = getelementptr inbounds i8, ptr %4, i64 8
  br label %11

.preheader:                                       ; preds = %15, %6
  %9 = getelementptr inbounds i8, ptr %5, i64 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %10 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 1)
          to label %23 unwind label %28

11:                                               ; preds = %.lr.ph, %15
  %.01324 = phi i64 [ %0, %.lr.ph ], [ %13, %15 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  %12 = urem i64 %.01324, 10
  %13 = udiv i64 %.01324, 10
  %14 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %12)
          to label %15 unwind label %21

15:                                               ; preds = %11
  %16 = extractvalue { ptr, i64 } %14, 0
  store ptr %16, ptr %4, align 8
  %17 = extractvalue { ptr, i64 } %14, 1
  store i64 %17, ptr %8, align 8
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %4, i1 noundef zeroext true) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  %.not26 = icmp ult i64 %.01324, 10
  br i1 %.not26, label %.preheader, label %11, !llvm.loop !5

19:                                               ; preds = %1
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  br label %94

21:                                               ; preds = %11
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  br label %93

23:                                               ; preds = %.preheader
  %24 = extractvalue { ptr, i64 } %10, 0
  store ptr %24, ptr %5, align 8
  %25 = extractvalue { ptr, i64 } %10, 1
  store i64 %25, ptr %9, align 8
  %26 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %27 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 2)
          to label %30 unwind label %28

28:                                               ; preds = %84, %76, %68, %60, %52, %44, %36, %23, %.preheader
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %93

30:                                               ; preds = %23
  %31 = extractvalue { ptr, i64 } %27, 0
  store ptr %31, ptr %5, align 8
  %32 = extractvalue { ptr, i64 } %27, 1
  store i64 %32, ptr %9, align 8
  %33 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  br i1 %33, label %34, label %.critedge.1

.critedge.1:                                      ; preds = %30
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %36

34:                                               ; preds = %30
  %35 = and i64 %0, 1
  %.not.1 = icmp eq i64 %35, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %.not.1, label %36, label %.critedge22

36:                                               ; preds = %34, %.critedge.1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %37 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 3)
          to label %38 unwind label %28

38:                                               ; preds = %36
  %39 = extractvalue { ptr, i64 } %37, 0
  store ptr %39, ptr %5, align 8
  %40 = extractvalue { ptr, i64 } %37, 1
  store i64 %40, ptr %9, align 8
  %41 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  br i1 %41, label %42, label %.critedge.2

.critedge.2:                                      ; preds = %38
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %44

42:                                               ; preds = %38
  %43 = srem i64 %0, 3
  %.not.2 = icmp eq i64 %43, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %.not.2, label %44, label %.critedge22

44:                                               ; preds = %42, %.critedge.2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %45 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 4)
          to label %46 unwind label %28

46:                                               ; preds = %44
  %47 = extractvalue { ptr, i64 } %45, 0
  store ptr %47, ptr %5, align 8
  %48 = extractvalue { ptr, i64 } %45, 1
  store i64 %48, ptr %9, align 8
  %49 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  br i1 %49, label %50, label %.critedge.3

.critedge.3:                                      ; preds = %46
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %52

50:                                               ; preds = %46
  %51 = and i64 %0, 3
  %.not.3 = icmp eq i64 %51, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %.not.3, label %52, label %.critedge22

52:                                               ; preds = %50, %.critedge.3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %53 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 5)
          to label %54 unwind label %28

54:                                               ; preds = %52
  %55 = extractvalue { ptr, i64 } %53, 0
  store ptr %55, ptr %5, align 8
  %56 = extractvalue { ptr, i64 } %53, 1
  store i64 %56, ptr %9, align 8
  %57 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  br i1 %57, label %58, label %.critedge.4

.critedge.4:                                      ; preds = %54
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %60

58:                                               ; preds = %54
  %59 = srem i64 %0, 5
  %.not.4 = icmp eq i64 %59, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %.not.4, label %60, label %.critedge22

60:                                               ; preds = %58, %.critedge.4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %61 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 6)
          to label %62 unwind label %28

62:                                               ; preds = %60
  %63 = extractvalue { ptr, i64 } %61, 0
  store ptr %63, ptr %5, align 8
  %64 = extractvalue { ptr, i64 } %61, 1
  store i64 %64, ptr %9, align 8
  %65 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  br i1 %65, label %66, label %.critedge.5

.critedge.5:                                      ; preds = %62
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %68

66:                                               ; preds = %62
  %67 = srem i64 %0, 6
  %.not.5 = icmp eq i64 %67, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %.not.5, label %68, label %.critedge22

68:                                               ; preds = %66, %.critedge.5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %69 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 7)
          to label %70 unwind label %28

70:                                               ; preds = %68
  %71 = extractvalue { ptr, i64 } %69, 0
  store ptr %71, ptr %5, align 8
  %72 = extractvalue { ptr, i64 } %69, 1
  store i64 %72, ptr %9, align 8
  %73 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  br i1 %73, label %74, label %.critedge.6

.critedge.6:                                      ; preds = %70
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %76

74:                                               ; preds = %70
  %75 = srem i64 %0, 7
  %.not.6 = icmp eq i64 %75, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %.not.6, label %76, label %.critedge22

76:                                               ; preds = %74, %.critedge.6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %77 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 8)
          to label %78 unwind label %28

78:                                               ; preds = %76
  %79 = extractvalue { ptr, i64 } %77, 0
  store ptr %79, ptr %5, align 8
  %80 = extractvalue { ptr, i64 } %77, 1
  store i64 %80, ptr %9, align 8
  %81 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  br i1 %81, label %82, label %.critedge.7

.critedge.7:                                      ; preds = %78
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %84

82:                                               ; preds = %78
  %83 = and i64 %0, 7
  %.not.7 = icmp eq i64 %83, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %.not.7, label %84, label %.critedge22

84:                                               ; preds = %82, %.critedge.7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %85 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 9)
          to label %86 unwind label %28

86:                                               ; preds = %84
  %87 = extractvalue { ptr, i64 } %85, 0
  store ptr %87, ptr %5, align 8
  %88 = extractvalue { ptr, i64 } %85, 1
  store i64 %88, ptr %9, align 8
  %89 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  br i1 %89, label %90, label %.critedge.8

.critedge.8:                                      ; preds = %86
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %92

90:                                               ; preds = %86
  %91 = srem i64 %0, 9
  %.not.8 = icmp eq i64 %91, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br i1 %.not.8, label %92, label %.critedge22

92:                                               ; preds = %90, %.critedge.8
  br label %.critedge22

.critedge22:                                      ; preds = %92, %90, %82, %74, %66, %58, %50, %42, %34
  %.lcssa = phi i1 [ false, %34 ], [ false, %42 ], [ false, %50 ], [ false, %58 ], [ false, %66 ], [ false, %74 ], [ false, %82 ], [ false, %90 ], [ true, %92 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #3
  ret i1 %.lcssa

93:                                               ; preds = %28, %21
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %29, %28 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #3
  br label %94

94:                                               ; preds = %93, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %93 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #3
  resume { ptr, i32 } %.pn.pn
}

; 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 nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 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: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2 align 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass