; LLVM IR from abeaumont/competitive-programming :: kattis (primesieve)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::bitset<100000001>::reference" = type { ptr, i64 }

@p = external dso_local global { [1562501 x i64] }, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::bitset<100000001>::reference", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::bitset<100000001>::reference", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %14 = call noundef nonnull align 8 dereferenceable(12500008) ptr @_ZNSt6bitsetILm100000001EE3setEmb(ptr noundef nonnull align 8 dereferenceable(12500008) @p, i64 noundef 1, i1 noundef zeroext true)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %43, %0
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = icmp sle i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %46

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  call void @_ZNSt6bitsetILm100000001EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<100000001>::reference") align 8 %7, ptr noundef nonnull align 8 dereferenceable(12500008) @p, i64 noundef %22)
  %23 = call noundef zeroext i1 @_ZNKSt6bitsetILm100000001EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  %24 = xor i1 %23, true
  call void @_ZNSt6bitsetILm100000001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  br i1 %24, label %25, label %42

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = mul nsw i32 %26, 2
  store i32 %27, ptr %8, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %37, %25
  %29 = load i32, ptr %8, align 4, !tbaa !5
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 8 dereferenceable(12500008) ptr @_ZNSt6bitsetILm100000001EE3setEmb(ptr noundef nonnull align 8 dereferenceable(12500008) @p, i64 noundef %35, i1 noundef zeroext true)
  br label %37

37:                                               ; preds = %33
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr %8, align 4, !tbaa !5
  br label %28, !llvm.loop !9

41:                                               ; preds = %32
  br label %42

42:                                               ; preds = %41, %20
  br label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %5, align 4, !tbaa !5
  br label %15, !llvm.loop !11

46:                                               ; preds = %19
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = call noundef i64 @_ZNKSt6bitsetILm100000001EE5countEv(ptr noundef nonnull align 8 dereferenceable(12500008) @p) #6
  %50 = sub i64 %48, %49
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %50)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %51, i8 noundef signext 10)
  br label %53

53:                                               ; preds = %66, %46
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = add nsw i32 %54, -1
  store i32 %55, ptr %3, align 4, !tbaa !5
  %56 = icmp ne i32 %54, 0
  br i1 %56, label %57, label %71

57:                                               ; preds = %53
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  call void @_ZNSt6bitsetILm100000001EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<100000001>::reference") align 8 %9, ptr noundef nonnull align 8 dereferenceable(12500008) @p, i64 noundef %60)
  %61 = call noundef zeroext i1 @_ZNKSt6bitsetILm100000001EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  %62 = xor i1 %61, true
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %62)
          to label %64 unwind label %67

64:                                               ; preds = %57
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %63, i8 noundef signext 10)
          to label %66 unwind label %67

66:                                               ; preds = %64
  call void @_ZNSt6bitsetILm100000001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %53, !llvm.loop !12

67:                                               ; preds = %64, %57
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  call void @_ZNSt6bitsetILm100000001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %73

71:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %72 = load i32, ptr %1, align 4
  ret i32 %72

73:                                               ; preds = %67
  %74 = load ptr, ptr %10, align 8
  %75 = load i32, ptr %11, align 4
  %76 = insertvalue { ptr, i32 } poison, ptr %74, 0
  %77 = insertvalue { ptr, i32 } %76, i32 %75, 1
  resume { ptr, i32 } %77
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12500008) ptr @_ZNSt6bitsetILm100000001EE3setEmb(ptr noundef nonnull align 8 dereferenceable(12500008), i64 noundef, i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm100000001EEixEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset<100000001>::reference") align 8, ptr noundef nonnull align 8 dereferenceable(12500008), i64 noundef) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm100000001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6bitsetILm100000001EE5countEv(ptr noundef nonnull align 8 dereferenceable(12500008)) #4 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) #3 align 2

declare i32 @__gxx_personality_v0(...)

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 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 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 #5 = { inlinehint 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 #6 = { nounwind }

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

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


; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::bitset<100000001>::reference" = type { ptr, i64 }

@p = external dso_local global { [1562501 x i64] }, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::bitset<100000001>::reference", align 8
  %5 = alloca %"class.std::bitset<100000001>::reference", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %8 = call noundef nonnull align 8 dereferenceable(12500008) ptr @_ZNSt6bitsetILm100000001EE3setEmb(ptr noundef nonnull align 8 dereferenceable(12500008) @p, i64 noundef 1, i1 noundef zeroext true)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %.not16 = icmp slt i32 %9, 2
  br i1 %.not16, label %.._crit_edge_crit_edge, label %.lr.ph19

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre31 = sext i32 %9 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.loopexit, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre31, %.._crit_edge_crit_edge ], [ %22, %.loopexit ]
  %10 = call noundef i64 @_ZNKSt6bitsetILm100000001EE5countEv(ptr noundef nonnull align 8 dereferenceable(12500008) @p) #6
  %11 = sub i64 %.pre-phi, %10
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %11)
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %12, i8 noundef signext 10)
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr %2, align 4, !tbaa !5
  %.not1220 = icmp eq i32 %14, 0
  br i1 %.not1220, label %._crit_edge23, label %.lr.ph22

.lr.ph19:                                         ; preds = %0, %.loopexit
  %indvars.iv25 = phi i64 [ %indvars.iv.next26, %.loopexit ], [ 2, %0 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit ], [ 4, %0 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @_ZNSt6bitsetILm100000001EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<100000001>::reference") align 8 %4, ptr noundef nonnull align 8 dereferenceable(12500008) @p, i64 noundef %indvars.iv25)
  %16 = call noundef zeroext i1 @_ZNKSt6bitsetILm100000001EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  call void @_ZNSt6bitsetILm100000001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %indvars.iv25.tr = trunc i64 %indvars.iv25 to i32
  %17 = shl i32 %indvars.iv25.tr, 1
  %.not1314 = icmp sgt i32 %17, %.pre
  %or.cond = select i1 %16, i1 true, i1 %.not1314
  br i1 %or.cond, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph19, %.lr.ph
  %indvars.iv27 = phi i64 [ %indvars.iv.next28, %.lr.ph ], [ %indvars.iv, %.lr.ph19 ]
  %18 = call noundef nonnull align 8 dereferenceable(12500008) ptr @_ZNSt6bitsetILm100000001EE3setEmb(ptr noundef nonnull align 8 dereferenceable(12500008) @p, i64 noundef %indvars.iv27, i1 noundef zeroext true)
  %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, %indvars.iv25
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = trunc nuw i64 %indvars.iv.next28 to i32
  %.not13 = icmp slt i32 %19, %20
  br i1 %.not13, label %.loopexit, label %.lr.ph, !llvm.loop !9

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph19
  %21 = phi i32 [ %.pre, %.lr.ph19 ], [ %19, %.lr.ph ]
  %indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 1
  %22 = sext i32 %21 to i64
  %.not.not = icmp slt i64 %indvars.iv25, %22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  br i1 %.not.not, label %.lr.ph19, label %._crit_edge, !llvm.loop !11

.lr.ph22:                                         ; preds = %._crit_edge, %31
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  call void @_ZNSt6bitsetILm100000001EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<100000001>::reference") align 8 %5, ptr noundef nonnull align 8 dereferenceable(12500008) @p, i64 noundef %25)
  %26 = call noundef zeroext i1 @_ZNKSt6bitsetILm100000001EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  %27 = xor i1 %26, true
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %27)
          to label %29 unwind label %34

29:                                               ; preds = %.lr.ph22
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %28, i8 noundef signext 10)
          to label %31 unwind label %34

31:                                               ; preds = %29
  call void @_ZNSt6bitsetILm100000001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr %2, align 4, !tbaa !5
  %.not12 = icmp eq i32 %32, 0
  br i1 %.not12, label %._crit_edge23, label %.lr.ph22, !llvm.loop !12

34:                                               ; preds = %29, %.lr.ph22
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6bitsetILm100000001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %35

._crit_edge23:                                    ; preds = %31, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12500008) ptr @_ZNSt6bitsetILm100000001EE3setEmb(ptr noundef nonnull align 8 dereferenceable(12500008), i64 noundef, i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm100000001EEixEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset<100000001>::reference") align 8, ptr noundef nonnull align 8 dereferenceable(12500008), i64 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6bitsetILm100000001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6bitsetILm100000001EE5countEv(ptr noundef nonnull align 8 dereferenceable(12500008)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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 = { "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 = { 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 #5 = { inlinehint 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 #6 = { nounwind }

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

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


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