; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2009-10 (diet4)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::bitset<45001>::reference" = type { ptr, i64 }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [704 x i64] }

@b = external dso_local global { [704 x i64] }, align 8
@H = external dso_local global i32, align 4
@N = external dso_local global i32, align 4
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #0

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::bitset<45001>::reference", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::bitset", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::bitset<45001>::reference", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %12 unwind label %20

12:                                               ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %13 unwind label %24

13:                                               ; preds = %12
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  call void @_ZN2io2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) @H, ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @_ZNSt6bitsetILm45001EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<45001>::reference") align 8 %6, ptr noundef nonnull align 8 dereferenceable(5632) @b, i64 noundef 0)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm45001EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %6, i1 noundef zeroext true) #5
  call void @_ZNSt6bitsetILm45001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %33, %13
  %16 = load i32, ptr %7, align 4, !tbaa !5
  %17 = load i32, ptr @N, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %29, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %36

20:                                               ; preds = %0
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %4, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %5, align 4
  br label %28

24:                                               ; preds = %12
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %4, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %28

28:                                               ; preds = %24, %20
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  br label %55

29:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @_ZN2io2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.start.p0(i64 5632, ptr %9) #5
  %30 = load i32, ptr %8, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  call void @_ZNKSt6bitsetILm45001EElsEm(ptr dead_on_unwind writable sret(%"class.std::bitset") align 8 %9, ptr noundef nonnull align 8 dereferenceable(5632) @b, i64 noundef %31) #5
  %32 = call noundef nonnull align 8 dereferenceable(5632) ptr @_ZNSt6bitsetILm45001EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(5632) @b, ptr noundef nonnull align 8 dereferenceable(5632) %9) #5
  call void @llvm.lifetime.end.p0(i64 5632, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %33

33:                                               ; preds = %29
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %7, align 4, !tbaa !5
  br label %15, !llvm.loop !9

36:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %37 = load i32, ptr @H, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  %39 = sub nsw i32 %38, 1
  store i32 %39, ptr %10, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %50, %36
  %41 = load i32, ptr %10, align 4, !tbaa !5
  %42 = icmp sge i32 %41, 0
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %53

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %45 = load i32, ptr %10, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  call void @_ZNSt6bitsetILm45001EEixEm(ptr dead_on_unwind writable sret(%"class.std::bitset<45001>::reference") align 8 %11, ptr noundef nonnull align 8 dereferenceable(5632) @b, i64 noundef %46)
  %47 = call noundef zeroext i1 @_ZNKSt6bitsetILm45001EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @_ZNSt6bitsetILm45001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  call void @_ZN2io2prIiEEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @exit(i32 noundef 0) #6
  unreachable

49:                                               ; preds = %44
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = add nsw i32 %51, -1
  store i32 %52, ptr %10, align 4, !tbaa !5
  br label %40, !llvm.loop !11

53:                                               ; preds = %43
  %54 = load i32, ptr %1, align 4
  ret i32 %54

55:                                               ; preds = %28
  %56 = load ptr, ptr %4, align 8
  %57 = load i32, ptr %5, align 4
  %58 = insertvalue { ptr, i32 } poison, ptr %56, 0
  %59 = insertvalue { ptr, i32 } %58, i32 %57, 1
  resume { ptr, i32 } %59
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt6bitsetILm45001EElsEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset") align 8, ptr noundef nonnull align 8 dereferenceable(5632), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(5632) ptr @_ZNSt6bitsetILm45001EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(5632), ptr noundef nonnull align 8 dereferenceable(5632)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io2prIiEEvRKT_(ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!"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}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::bitset<45001>::reference" = type { ptr, i64 }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [704 x i64] }

@b = external dso_local global { [704 x i64] }, align 8
@H = external dso_local global i32, align 4
@N = external dso_local global i32, align 4
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca %"class.std::bitset<45001>::reference", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::bitset", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::bitset<45001>::reference", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %8 unwind label %15

8:                                                ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %9 unwind label %17

9:                                                ; preds = %8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @_ZN2io2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) @H, ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZNSt6bitsetILm45001EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<45001>::reference") align 8 %3, ptr noundef nonnull align 8 dereferenceable(5632) @b, i64 noundef 0)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6bitsetILm45001EE9referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %3, i1 noundef zeroext true) #5
  call void @_ZNSt6bitsetILm45001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %11 = load i32, ptr @N, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %13 = load i32, ptr @H, align 4, !tbaa !5
  store i32 %13, ptr %6, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, -1
  br i1 %14, label %.lr.ph10, label %._crit_edge11

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %19

17:                                               ; preds = %8
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #5
  br label %19

19:                                               ; preds = %17, %15
  %.pn = phi { ptr, i32 } [ %18, %17 ], [ %16, %15 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn

.lr.ph:                                           ; preds = %9, %.lr.ph
  %.07 = phi i32 [ %23, %.lr.ph ], [ 0, %9 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN2io2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 5632, ptr nonnull %5) #5
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  call void @_ZNKSt6bitsetILm45001EElsEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset") align 8 %5, ptr noundef nonnull align 8 dereferenceable(5632) @b, i64 noundef %21) #5
  %22 = call noundef nonnull align 8 dereferenceable(5632) ptr @_ZNSt6bitsetILm45001EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(5632) @b, ptr noundef nonnull align 8 dereferenceable(5632) %5) #5
  call void @llvm.lifetime.end.p0(i64 5632, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %23 = add nuw nsw i32 %.07, 1
  %24 = load i32, ptr @N, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge11:                                    ; preds = %30, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  ret i32 0

.lr.ph10:                                         ; preds = %._crit_edge, %30
  %26 = phi i32 [ %31, %30 ], [ %13, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %27 = zext nneg i32 %26 to i64
  call void @_ZNSt6bitsetILm45001EEixEm(ptr dead_on_unwind nonnull writable sret(%"class.std::bitset<45001>::reference") align 8 %7, ptr noundef nonnull align 8 dereferenceable(5632) @b, i64 noundef %27)
  %28 = call noundef zeroext i1 @_ZNKSt6bitsetILm45001EE9referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @_ZNSt6bitsetILm45001EE9referenceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br i1 %28, label %29, label %30

29:                                               ; preds = %.lr.ph10
  call void @_ZN2io2prIiEEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @exit(i32 noundef 0) #6
  unreachable

30:                                               ; preds = %.lr.ph10
  %31 = add nsw i32 %26, -1
  store i32 %31, ptr %6, align 4, !tbaa !5
  %32 = icmp sgt i32 %26, 0
  br i1 %32, label %.lr.ph10, label %._crit_edge11, !llvm.loop !11
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt6bitsetILm45001EElsEm(ptr dead_on_unwind noalias writable sret(%"class.std::bitset") align 8, ptr noundef nonnull align 8 dereferenceable(5632), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(5632) ptr @_ZNSt6bitsetILm45001EEoRERKS0_(ptr noundef nonnull align 8 dereferenceable(5632), ptr noundef nonnull align 8 dereferenceable(5632)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io2prIiEEvRKT_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!"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}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass