; LLVM IR from DionysiosB/CodeForces :: 1500-1599 (1551B1-WonderfulColoring1)

; 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::__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] }

@_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 i64, align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca [26 x i64], align 16
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %12

12:                                               ; preds = %80, %0
  %13 = load i64, ptr %2, align 8, !tbaa !5
  %14 = add nsw i64 %13, -1
  store i64 %14, ptr %2, align 8, !tbaa !5
  %15 = icmp ne i64 %13, 0
  br i1 %15, label %16, label %87

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %17 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %18 unwind label %24

18:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 208, ptr %6) #7
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 208, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %39, %18
  %20 = load i64, ptr %7, align 8, !tbaa !5
  %21 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %22 = icmp ult i64 %20, %21
  br i1 %22, label %28, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %46

24:                                               ; preds = %16
  %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
  br label %86

28:                                               ; preds = %19
  %29 = load i64, ptr %7, align 8, !tbaa !5
  %30 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %29)
          to label %31 unwind label %42

31:                                               ; preds = %28
  %32 = load i8, ptr %30, align 1, !tbaa !9
  %33 = sext i8 %32 to i32
  %34 = sub nsw i32 %33, 97
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [26 x i64], ptr %6, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %36, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %31
  %40 = load i64, ptr %7, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %7, align 8, !tbaa !5
  br label %19, !llvm.loop !10

42:                                               ; preds = %28
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %4, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %85

46:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %69, %46
  %48 = load i64, ptr %10, align 8, !tbaa !5
  %49 = icmp slt i64 %48, 26
  br i1 %49, label %51, label %50

50:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %72

51:                                               ; preds = %47
  %52 = load i64, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds [26 x i64], ptr %6, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = icmp eq i64 %54, 1
  br i1 %55, label %56, label %59

56:                                               ; preds = %51
  %57 = load i64, ptr %8, align 8, !tbaa !5
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %8, align 8, !tbaa !5
  br label %68

59:                                               ; preds = %51
  %60 = load i64, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds [26 x i64], ptr %6, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = icmp sgt i64 %62, 1
  br i1 %63, label %64, label %67

64:                                               ; preds = %59
  %65 = load i64, ptr %9, align 8, !tbaa !5
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %9, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %64, %59
  br label %68

68:                                               ; preds = %67, %56
  br label %69

69:                                               ; preds = %68
  %70 = load i64, ptr %10, align 8, !tbaa !5
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %10, align 8, !tbaa !5
  br label %47, !llvm.loop !12

72:                                               ; preds = %50
  %73 = load i64, ptr %8, align 8, !tbaa !5
  %74 = sdiv i64 %73, 2
  %75 = load i64, ptr %9, align 8, !tbaa !5
  %76 = add nsw i64 %74, %75
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %76)
          to label %78 unwind label %81

78:                                               ; preds = %72
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %80 unwind label %81

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  br label %12, !llvm.loop !13

81:                                               ; preds = %78, %72
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %4, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %85

85:                                               ; preds = %81, %42
  call void @llvm.lifetime.end.p0(i64 208, ptr %6) #7
  br label %86

86:                                               ; preds = %85, %24
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %89

87:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %88 = load i32, ptr %1, align 4
  ret i32 %88

89:                                               ; preds = %86
  %90 = load ptr, ptr %4, align 8
  %91 = load i32, ptr %5, align 4
  %92 = insertvalue { ptr, i32 } poison, ptr %90, 0
  %93 = insertvalue { ptr, i32 } %92, i32 %91, 1
  resume { ptr, i32 } %93
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #3 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}


; 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::__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] }

@_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 i64, align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca [26 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %5 = load i64, ptr %1, align 8, !tbaa !5
  %6 = add nsw i64 %5, -1
  store i64 %6, ptr %1, align 8, !tbaa !5
  %.not25 = icmp eq i64 %5, 0
  br i1 %.not25, label %._crit_edge, label %.lr.ph26.preheader

.lr.ph26.preheader:                               ; preds = %0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %3, i64 8
  %.phi.trans.insert29 = getelementptr inbounds i8, ptr %3, i64 16
  %.phi.trans.insert31 = getelementptr inbounds i8, ptr %3, i64 24
  %.phi.trans.insert33 = getelementptr inbounds i8, ptr %3, i64 32
  %.phi.trans.insert35 = getelementptr inbounds i8, ptr %3, i64 40
  %.phi.trans.insert37 = getelementptr inbounds i8, ptr %3, i64 48
  %.phi.trans.insert39 = getelementptr inbounds i8, ptr %3, i64 56
  %.phi.trans.insert41 = getelementptr inbounds i8, ptr %3, i64 64
  %.phi.trans.insert43 = getelementptr inbounds i8, ptr %3, i64 72
  %.phi.trans.insert45 = getelementptr inbounds i8, ptr %3, i64 80
  %.phi.trans.insert47 = getelementptr inbounds i8, ptr %3, i64 88
  %.phi.trans.insert49 = getelementptr inbounds i8, ptr %3, i64 96
  %7 = getelementptr inbounds i8, ptr %3, i64 104
  %8 = getelementptr inbounds i8, ptr %3, i64 112
  %9 = getelementptr inbounds i8, ptr %3, i64 120
  %10 = getelementptr inbounds i8, ptr %3, i64 128
  %11 = getelementptr inbounds i8, ptr %3, i64 136
  %12 = getelementptr inbounds i8, ptr %3, i64 144
  %13 = getelementptr inbounds i8, ptr %3, i64 152
  %14 = getelementptr inbounds i8, ptr %3, i64 160
  %15 = getelementptr inbounds i8, ptr %3, i64 168
  %16 = getelementptr inbounds i8, ptr %3, i64 176
  %17 = getelementptr inbounds i8, ptr %3, i64 184
  %18 = getelementptr inbounds i8, ptr %3, i64 192
  %19 = getelementptr inbounds i8, ptr %3, i64 200
  br label %.lr.ph26

.lr.ph26:                                         ; preds = %.lr.ph26.preheader, %170
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %20 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %21 unwind label %156

21:                                               ; preds = %.lr.ph26
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %3) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %3, i8 0, i64 208, i1 false)
  %22 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %.not27 = icmp eq i64 %22, 0
  br i1 %.not27, label %.preheader, label %.lr.ph

.preheader.loopexit:                              ; preds = %.lr.ph
  %.pre = load i64, ptr %3, align 16, !tbaa !5
  %.pre28 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !5
  %.pre30 = load i64, ptr %.phi.trans.insert29, align 16, !tbaa !5
  %.pre32 = load i64, ptr %.phi.trans.insert31, align 8, !tbaa !5
  %.pre34 = load i64, ptr %.phi.trans.insert33, align 16, !tbaa !5
  %.pre36 = load i64, ptr %.phi.trans.insert35, align 8, !tbaa !5
  %.pre38 = load i64, ptr %.phi.trans.insert37, align 16, !tbaa !5
  %.pre40 = load i64, ptr %.phi.trans.insert39, align 8, !tbaa !5
  %.pre42 = load i64, ptr %.phi.trans.insert41, align 16, !tbaa !5
  %.pre44 = load i64, ptr %.phi.trans.insert43, align 8, !tbaa !5
  %.pre46 = load i64, ptr %.phi.trans.insert45, align 16, !tbaa !5
  %.pre48 = load i64, ptr %.phi.trans.insert47, align 8, !tbaa !5
  %.pre50 = load i64, ptr %.phi.trans.insert49, align 16, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %21
  %23 = phi i64 [ %.pre50, %.preheader.loopexit ], [ 0, %21 ]
  %24 = phi i64 [ %.pre48, %.preheader.loopexit ], [ 0, %21 ]
  %25 = phi i64 [ %.pre46, %.preheader.loopexit ], [ 0, %21 ]
  %26 = phi i64 [ %.pre44, %.preheader.loopexit ], [ 0, %21 ]
  %27 = phi i64 [ %.pre42, %.preheader.loopexit ], [ 0, %21 ]
  %28 = phi i64 [ %.pre40, %.preheader.loopexit ], [ 0, %21 ]
  %29 = phi i64 [ %.pre38, %.preheader.loopexit ], [ 0, %21 ]
  %30 = phi i64 [ %.pre36, %.preheader.loopexit ], [ 0, %21 ]
  %31 = phi i64 [ %.pre34, %.preheader.loopexit ], [ 0, %21 ]
  %32 = phi i64 [ %.pre32, %.preheader.loopexit ], [ 0, %21 ]
  %33 = phi i64 [ %.pre30, %.preheader.loopexit ], [ 0, %21 ]
  %34 = phi i64 [ %.pre28, %.preheader.loopexit ], [ 0, %21 ]
  %35 = phi i64 [ %.pre, %.preheader.loopexit ], [ 0, %21 ]
  %36 = icmp eq i64 %35, 1
  %37 = icmp sgt i64 %35, 1
  %38 = zext i1 %37 to i64
  %39 = zext i1 %36 to i64
  %40 = icmp eq i64 %34, 1
  %41 = icmp sgt i64 %34, 1
  %42 = zext i1 %41 to i64
  %spec.select.1 = add nuw nsw i64 %38, %42
  %43 = zext i1 %40 to i64
  %.115.1 = add nuw nsw i64 %39, %43
  %44 = icmp eq i64 %33, 1
  %45 = icmp sgt i64 %33, 1
  %46 = zext i1 %45 to i64
  %spec.select.2 = add nuw nsw i64 %spec.select.1, %46
  %47 = zext i1 %44 to i64
  %.115.2 = add nuw nsw i64 %.115.1, %47
  %48 = icmp eq i64 %32, 1
  %49 = icmp sgt i64 %32, 1
  %50 = zext i1 %49 to i64
  %spec.select.3 = add nuw nsw i64 %spec.select.2, %50
  %51 = zext i1 %48 to i64
  %.115.3 = add nuw nsw i64 %.115.2, %51
  %52 = icmp eq i64 %31, 1
  %53 = icmp sgt i64 %31, 1
  %54 = zext i1 %53 to i64
  %spec.select.4 = add nuw nsw i64 %spec.select.3, %54
  %55 = zext i1 %52 to i64
  %.115.4 = add nuw nsw i64 %.115.3, %55
  %56 = icmp eq i64 %30, 1
  %57 = icmp sgt i64 %30, 1
  %58 = zext i1 %57 to i64
  %spec.select.5 = add nuw nsw i64 %spec.select.4, %58
  %59 = zext i1 %56 to i64
  %.115.5 = add nuw nsw i64 %.115.4, %59
  %60 = icmp eq i64 %29, 1
  %61 = icmp sgt i64 %29, 1
  %62 = zext i1 %61 to i64
  %spec.select.6 = add nuw nsw i64 %spec.select.5, %62
  %63 = zext i1 %60 to i64
  %.115.6 = add nuw nsw i64 %.115.5, %63
  %64 = icmp eq i64 %28, 1
  %65 = icmp sgt i64 %28, 1
  %66 = zext i1 %65 to i64
  %spec.select.7 = add nuw nsw i64 %spec.select.6, %66
  %67 = zext i1 %64 to i64
  %.115.7 = add nuw nsw i64 %.115.6, %67
  %68 = icmp eq i64 %27, 1
  %69 = icmp sgt i64 %27, 1
  %70 = zext i1 %69 to i64
  %spec.select.8 = add nuw nsw i64 %spec.select.7, %70
  %71 = zext i1 %68 to i64
  %.115.8 = add nuw nsw i64 %.115.7, %71
  %72 = icmp eq i64 %26, 1
  %73 = icmp sgt i64 %26, 1
  %74 = zext i1 %73 to i64
  %spec.select.9 = add nuw nsw i64 %spec.select.8, %74
  %75 = zext i1 %72 to i64
  %.115.9 = add nuw nsw i64 %.115.8, %75
  %76 = icmp eq i64 %25, 1
  %77 = icmp sgt i64 %25, 1
  %78 = zext i1 %77 to i64
  %spec.select.10 = add nuw nsw i64 %spec.select.9, %78
  %79 = zext i1 %76 to i64
  %.115.10 = add nuw nsw i64 %.115.9, %79
  %80 = icmp eq i64 %24, 1
  %81 = icmp sgt i64 %24, 1
  %82 = zext i1 %81 to i64
  %spec.select.11 = add nuw nsw i64 %spec.select.10, %82
  %83 = zext i1 %80 to i64
  %.115.11 = add nuw nsw i64 %.115.10, %83
  %84 = icmp eq i64 %23, 1
  %85 = icmp sgt i64 %23, 1
  %86 = zext i1 %85 to i64
  %spec.select.12 = add nuw nsw i64 %spec.select.11, %86
  %87 = zext i1 %84 to i64
  %.115.12 = add nuw nsw i64 %.115.11, %87
  %88 = load i64, ptr %7, align 8, !tbaa !5
  %89 = icmp eq i64 %88, 1
  %90 = icmp sgt i64 %88, 1
  %91 = zext i1 %90 to i64
  %spec.select.13 = add nuw nsw i64 %spec.select.12, %91
  %92 = zext i1 %89 to i64
  %.115.13 = add nuw nsw i64 %.115.12, %92
  %93 = load i64, ptr %8, align 16, !tbaa !5
  %94 = icmp eq i64 %93, 1
  %95 = icmp sgt i64 %93, 1
  %96 = zext i1 %95 to i64
  %spec.select.14 = add nuw nsw i64 %spec.select.13, %96
  %97 = zext i1 %94 to i64
  %.115.14 = add nuw nsw i64 %.115.13, %97
  %98 = load i64, ptr %9, align 8, !tbaa !5
  %99 = icmp eq i64 %98, 1
  %100 = icmp sgt i64 %98, 1
  %101 = zext i1 %100 to i64
  %spec.select.15 = add nuw nsw i64 %spec.select.14, %101
  %102 = zext i1 %99 to i64
  %.115.15 = add nuw nsw i64 %.115.14, %102
  %103 = load i64, ptr %10, align 16, !tbaa !5
  %104 = icmp eq i64 %103, 1
  %105 = icmp sgt i64 %103, 1
  %106 = zext i1 %105 to i64
  %spec.select.16 = add nuw nsw i64 %spec.select.15, %106
  %107 = zext i1 %104 to i64
  %.115.16 = add nuw nsw i64 %.115.15, %107
  %108 = load i64, ptr %11, align 8, !tbaa !5
  %109 = icmp eq i64 %108, 1
  %110 = icmp sgt i64 %108, 1
  %111 = zext i1 %110 to i64
  %spec.select.17 = add nuw nsw i64 %spec.select.16, %111
  %112 = zext i1 %109 to i64
  %.115.17 = add nuw nsw i64 %.115.16, %112
  %113 = load i64, ptr %12, align 16, !tbaa !5
  %114 = icmp eq i64 %113, 1
  %115 = icmp sgt i64 %113, 1
  %116 = zext i1 %115 to i64
  %spec.select.18 = add nuw nsw i64 %spec.select.17, %116
  %117 = zext i1 %114 to i64
  %.115.18 = add nuw nsw i64 %.115.17, %117
  %118 = load i64, ptr %13, align 8, !tbaa !5
  %119 = icmp eq i64 %118, 1
  %120 = icmp sgt i64 %118, 1
  %121 = zext i1 %120 to i64
  %spec.select.19 = add nuw nsw i64 %spec.select.18, %121
  %122 = zext i1 %119 to i64
  %.115.19 = add nuw nsw i64 %.115.18, %122
  %123 = load i64, ptr %14, align 16, !tbaa !5
  %124 = icmp eq i64 %123, 1
  %125 = icmp sgt i64 %123, 1
  %126 = zext i1 %125 to i64
  %spec.select.20 = add nuw nsw i64 %spec.select.19, %126
  %127 = zext i1 %124 to i64
  %.115.20 = add nuw nsw i64 %.115.19, %127
  %128 = load i64, ptr %15, align 8, !tbaa !5
  %129 = icmp eq i64 %128, 1
  %130 = icmp sgt i64 %128, 1
  %131 = zext i1 %130 to i64
  %spec.select.21 = add nuw nsw i64 %spec.select.20, %131
  %132 = zext i1 %129 to i64
  %.115.21 = add nuw nsw i64 %.115.20, %132
  %133 = load i64, ptr %16, align 16, !tbaa !5
  %134 = icmp eq i64 %133, 1
  %135 = icmp sgt i64 %133, 1
  %136 = zext i1 %135 to i64
  %spec.select.22 = add nuw nsw i64 %spec.select.21, %136
  %137 = zext i1 %134 to i64
  %.115.22 = add nuw nsw i64 %.115.21, %137
  %138 = load i64, ptr %17, align 8, !tbaa !5
  %139 = icmp eq i64 %138, 1
  %140 = icmp sgt i64 %138, 1
  %141 = zext i1 %140 to i64
  %spec.select.23 = add nuw nsw i64 %spec.select.22, %141
  %142 = zext i1 %139 to i64
  %.115.23 = add nuw nsw i64 %.115.22, %142
  %143 = load i64, ptr %18, align 16, !tbaa !5
  %144 = icmp eq i64 %143, 1
  %145 = icmp sgt i64 %143, 1
  %146 = zext i1 %145 to i64
  %spec.select.24 = add nuw nsw i64 %spec.select.23, %146
  %147 = zext i1 %144 to i64
  %.115.24 = add nuw nsw i64 %.115.23, %147
  %148 = load i64, ptr %19, align 8, !tbaa !5
  %149 = icmp eq i64 %148, 1
  %150 = icmp sgt i64 %148, 1
  %151 = zext i1 %150 to i64
  %spec.select.25 = add nuw nsw i64 %spec.select.24, %151
  %152 = zext i1 %149 to i64
  %.115.25 = add nuw nsw i64 %.115.24, %152
  %153 = lshr i64 %.115.25, 1
  %154 = add nuw nsw i64 %153, %spec.select.25
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %154)
          to label %168 unwind label %173

156:                                              ; preds = %.lr.ph26
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %175

.lr.ph:                                           ; preds = %21, %.lr.ph
  %.01621 = phi i64 [ %165, %.lr.ph ], [ 0, %21 ]
  %158 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.01621)
  %159 = load i8, ptr %158, align 1, !tbaa !9
  %160 = sext i8 %159 to i64
  %161 = add nsw i64 %160, -97
  %162 = getelementptr inbounds [26 x i64], ptr %3, i64 0, i64 %161
  %163 = load i64, ptr %162, align 8, !tbaa !5
  %164 = add nsw i64 %163, 1
  store i64 %164, ptr %162, align 8, !tbaa !5
  %165 = add nuw nsw i64 %.01621, 1
  %166 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %167 = icmp ult i64 %165, %166
  br i1 %167, label %.lr.ph, label %.preheader.loopexit, !llvm.loop !10

168:                                              ; preds = %.preheader
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %170 unwind label %173

170:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  %171 = load i64, ptr %1, align 8, !tbaa !5
  %172 = add nsw i64 %171, -1
  store i64 %172, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %171, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph26, !llvm.loop !12

173:                                              ; preds = %168, %.preheader
  %174 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %3) #7
  br label %175

175:                                              ; preds = %173, %156
  %.pn = phi { ptr, i32 } [ %174, %173 ], [ %157, %156 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn

._crit_edge:                                      ; preds = %170, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #3 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


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