; LLVM IR from manishbisht/Competitive-Programming :: Codeforces/Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) (main)

; 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 i64, align 8
  %4 = alloca [7 x i64], align 16
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %8 = 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) %5)
          to label %9 unwind label %19

9:                                                ; preds = %0
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %16, %9
  %11 = load i64, ptr %3, align 8, !tbaa !5
  %12 = icmp slt i64 %11, 7
  br i1 %12, label %13, label %23

13:                                               ; preds = %10
  %14 = load i64, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 %14
  store i64 0, ptr %15, align 8, !tbaa !5
  br label %16

16:                                               ; preds = %13
  %17 = load i64, ptr %3, align 8, !tbaa !5
  %18 = add nsw i64 %17, 1
  store i64 %18, ptr %3, align 8, !tbaa !5
  br label %10, !llvm.loop !9

19:                                               ; preds = %131, %128, %115, %94, %83, %72, %61, %50, %39, %28, %0
  %20 = landingpad { ptr, i32 }
          cleanup
  %21 = extractvalue { ptr, i32 } %20, 0
  store ptr %21, ptr %6, align 8
  %22 = extractvalue { ptr, i32 } %20, 1
  store i32 %22, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %135

23:                                               ; preds = %10
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %112, %23
  %25 = load i64, ptr %3, align 8, !tbaa !5
  %26 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %27 = icmp ult i64 %25, %26
  br i1 %27, label %28, label %115

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

31:                                               ; preds = %28
  %32 = load i8, ptr %30, align 1, !tbaa !11
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 66
  br i1 %34, label %35, label %39

35:                                               ; preds = %31
  %36 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 0
  %37 = load i64, ptr %36, align 16, !tbaa !5
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %36, align 16, !tbaa !5
  br label %111

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

42:                                               ; preds = %39
  %43 = load i8, ptr %41, align 1, !tbaa !11
  %44 = sext i8 %43 to i32
  %45 = icmp eq i32 %44, 117
  br i1 %45, label %46, label %50

46:                                               ; preds = %42
  %47 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 1
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = add nsw i64 %48, 1
  store i64 %49, ptr %47, align 8, !tbaa !5
  br label %110

50:                                               ; preds = %42
  %51 = load i64, ptr %3, align 8, !tbaa !5
  %52 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %51)
          to label %53 unwind label %19

53:                                               ; preds = %50
  %54 = load i8, ptr %52, align 1, !tbaa !11
  %55 = sext i8 %54 to i32
  %56 = icmp eq i32 %55, 108
  br i1 %56, label %57, label %61

57:                                               ; preds = %53
  %58 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 2
  %59 = load i64, ptr %58, align 16, !tbaa !5
  %60 = add nsw i64 %59, 1
  store i64 %60, ptr %58, align 16, !tbaa !5
  br label %109

61:                                               ; preds = %53
  %62 = load i64, ptr %3, align 8, !tbaa !5
  %63 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %62)
          to label %64 unwind label %19

64:                                               ; preds = %61
  %65 = load i8, ptr %63, align 1, !tbaa !11
  %66 = sext i8 %65 to i32
  %67 = icmp eq i32 %66, 98
  br i1 %67, label %68, label %72

68:                                               ; preds = %64
  %69 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 3
  %70 = load i64, ptr %69, align 8, !tbaa !5
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %69, align 8, !tbaa !5
  br label %108

72:                                               ; preds = %64
  %73 = load i64, ptr %3, align 8, !tbaa !5
  %74 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %73)
          to label %75 unwind label %19

75:                                               ; preds = %72
  %76 = load i8, ptr %74, align 1, !tbaa !11
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %77, 97
  br i1 %78, label %79, label %83

79:                                               ; preds = %75
  %80 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 4
  %81 = load i64, ptr %80, align 16, !tbaa !5
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %80, align 16, !tbaa !5
  br label %107

83:                                               ; preds = %75
  %84 = load i64, ptr %3, align 8, !tbaa !5
  %85 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %84)
          to label %86 unwind label %19

86:                                               ; preds = %83
  %87 = load i8, ptr %85, align 1, !tbaa !11
  %88 = sext i8 %87 to i32
  %89 = icmp eq i32 %88, 115
  br i1 %89, label %90, label %94

90:                                               ; preds = %86
  %91 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 5
  %92 = load i64, ptr %91, align 8, !tbaa !5
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %91, align 8, !tbaa !5
  br label %106

94:                                               ; preds = %86
  %95 = load i64, ptr %3, align 8, !tbaa !5
  %96 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %95)
          to label %97 unwind label %19

97:                                               ; preds = %94
  %98 = load i8, ptr %96, align 1, !tbaa !11
  %99 = sext i8 %98 to i32
  %100 = icmp eq i32 %99, 114
  br i1 %100, label %101, label %105

101:                                              ; preds = %97
  %102 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 6
  %103 = load i64, ptr %102, align 16, !tbaa !5
  %104 = add nsw i64 %103, 1
  store i64 %104, ptr %102, align 16, !tbaa !5
  br label %105

105:                                              ; preds = %101, %97
  br label %106

106:                                              ; preds = %105, %90
  br label %107

107:                                              ; preds = %106, %79
  br label %108

108:                                              ; preds = %107, %68
  br label %109

109:                                              ; preds = %108, %57
  br label %110

110:                                              ; preds = %109, %46
  br label %111

111:                                              ; preds = %110, %35
  br label %112

112:                                              ; preds = %111
  %113 = load i64, ptr %3, align 8, !tbaa !5
  %114 = add nsw i64 %113, 1
  store i64 %114, ptr %3, align 8, !tbaa !5
  br label %24, !llvm.loop !12

115:                                              ; preds = %24
  %116 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 1
  %117 = load i64, ptr %116, align 8, !tbaa !5
  %118 = sdiv i64 %117, 2
  %119 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 1
  store i64 %118, ptr %119, align 8, !tbaa !5
  %120 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 4
  %121 = load i64, ptr %120, align 16, !tbaa !5
  %122 = sdiv i64 %121, 2
  %123 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 4
  store i64 %122, ptr %123, align 16, !tbaa !5
  %124 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 0
  %125 = getelementptr inbounds [7 x i64], ptr %4, i64 0, i64 0
  %126 = getelementptr inbounds i64, ptr %125, i64 7
  %127 = invoke noundef ptr @_ZSt11min_elementIPxET_S1_S1_(ptr noundef %124, ptr noundef %126)
          to label %128 unwind label %19

128:                                              ; preds = %115
  %129 = load i64, ptr %127, align 8, !tbaa !5
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %129)
          to label %131 unwind label %19

131:                                              ; preds = %128
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %133 unwind label %19

133:                                              ; preds = %131
  store i32 0, ptr %1, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %134 = load i32, ptr %1, align 4
  ret i32 %134

135:                                              ; preds = %19
  %136 = load ptr, ptr %6, align 8
  %137 = load i32, ptr %7, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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)) #3

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11min_elementIPxET_S1_S1_(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 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)) #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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

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 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 = { "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 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!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::__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 [7 x i64], align 16
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %1) #7
  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
  %3 = 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 %.preheader14.preheader unwind label %10

.preheader14.preheader:                           ; preds = %0
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(56) %1, i8 0, i64 56, i1 false), !tbaa !5
  %4 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %.not = icmp eq i64 %4, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader14.preheader
  %5 = getelementptr inbounds i8, ptr %1, i64 48
  %6 = getelementptr inbounds i8, ptr %1, i64 40
  %7 = getelementptr inbounds i8, ptr %1, i64 32
  %8 = getelementptr inbounds i8, ptr %1, i64 24
  %9 = getelementptr inbounds i8, ptr %1, i64 16
  br label %12

10:                                               ; preds = %83, %80, %._crit_edge, %0
  %11 = landingpad { ptr, i32 }
          cleanup
  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 56, ptr nonnull %1) #7
  resume { ptr, i32 } %11

12:                                               ; preds = %.lr.ph, %61
  %13 = phi i64 [ 0, %.lr.ph ], [ %62, %61 ]
  %14 = phi i64 [ 0, %.lr.ph ], [ %63, %61 ]
  %15 = phi i64 [ 0, %.lr.ph ], [ %64, %61 ]
  %16 = phi i64 [ 0, %.lr.ph ], [ %65, %61 ]
  %17 = phi i64 [ 0, %.lr.ph ], [ %66, %61 ]
  %18 = phi i64 [ 0, %.lr.ph ], [ %67, %61 ]
  %19 = phi i64 [ 0, %.lr.ph ], [ %68, %61 ]
  %.116 = phi i64 [ 0, %.lr.ph ], [ %69, %61 ]
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.116)
  %21 = load i8, ptr %20, align 1, !tbaa !9
  %22 = icmp eq i8 %21, 66
  br i1 %22, label %23, label %25

23:                                               ; preds = %12
  %24 = add nsw i64 %13, 1
  store i64 %24, ptr %1, align 16, !tbaa !5
  br label %61

25:                                               ; preds = %12
  %26 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.116)
  %27 = load i8, ptr %26, align 1, !tbaa !9
  %28 = icmp eq i8 %27, 117
  br i1 %28, label %29, label %31

29:                                               ; preds = %25
  %30 = add nsw i64 %14, 1
  br label %61

31:                                               ; preds = %25
  %32 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.116)
  %33 = load i8, ptr %32, align 1, !tbaa !9
  %34 = icmp eq i8 %33, 108
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  %36 = add nsw i64 %15, 1
  store i64 %36, ptr %9, align 16, !tbaa !5
  br label %61

37:                                               ; preds = %31
  %38 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.116)
  %39 = load i8, ptr %38, align 1, !tbaa !9
  %40 = icmp eq i8 %39, 98
  br i1 %40, label %41, label %43

41:                                               ; preds = %37
  %42 = add nsw i64 %16, 1
  store i64 %42, ptr %8, align 8, !tbaa !5
  br label %61

43:                                               ; preds = %37
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.116)
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = icmp eq i8 %45, 97
  br i1 %46, label %47, label %49

47:                                               ; preds = %43
  %48 = add nsw i64 %17, 1
  store i64 %48, ptr %7, align 16, !tbaa !5
  br label %61

49:                                               ; preds = %43
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.116)
  %51 = load i8, ptr %50, align 1, !tbaa !9
  %52 = icmp eq i8 %51, 115
  br i1 %52, label %53, label %55

53:                                               ; preds = %49
  %54 = add nsw i64 %18, 1
  store i64 %54, ptr %6, align 8, !tbaa !5
  br label %61

55:                                               ; preds = %49
  %56 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %.116)
  %57 = load i8, ptr %56, align 1, !tbaa !9
  %58 = icmp eq i8 %57, 114
  br i1 %58, label %59, label %61

59:                                               ; preds = %55
  %60 = add nsw i64 %19, 1
  store i64 %60, ptr %5, align 16, !tbaa !5
  br label %61

61:                                               ; preds = %23, %35, %47, %55, %59, %53, %41, %29
  %62 = phi i64 [ %24, %23 ], [ %13, %35 ], [ %13, %47 ], [ %13, %55 ], [ %13, %59 ], [ %13, %53 ], [ %13, %41 ], [ %13, %29 ]
  %63 = phi i64 [ %14, %23 ], [ %14, %35 ], [ %14, %47 ], [ %14, %55 ], [ %14, %59 ], [ %14, %53 ], [ %14, %41 ], [ %30, %29 ]
  %64 = phi i64 [ %15, %23 ], [ %36, %35 ], [ %15, %47 ], [ %15, %55 ], [ %15, %59 ], [ %15, %53 ], [ %15, %41 ], [ %15, %29 ]
  %65 = phi i64 [ %16, %23 ], [ %16, %35 ], [ %16, %47 ], [ %16, %55 ], [ %16, %59 ], [ %16, %53 ], [ %42, %41 ], [ %16, %29 ]
  %66 = phi i64 [ %17, %23 ], [ %17, %35 ], [ %48, %47 ], [ %17, %55 ], [ %17, %59 ], [ %17, %53 ], [ %17, %41 ], [ %17, %29 ]
  %67 = phi i64 [ %18, %23 ], [ %18, %35 ], [ %18, %47 ], [ %18, %55 ], [ %18, %59 ], [ %54, %53 ], [ %18, %41 ], [ %18, %29 ]
  %68 = phi i64 [ %19, %23 ], [ %19, %35 ], [ %19, %47 ], [ %19, %55 ], [ %60, %59 ], [ %19, %53 ], [ %19, %41 ], [ %19, %29 ]
  %69 = add nuw nsw i64 %.116, 1
  %70 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %71 = icmp ult i64 %69, %70
  br i1 %71, label %12, label %._crit_edge.loopexit, !llvm.loop !10

._crit_edge.loopexit:                             ; preds = %61
  %72 = sdiv i64 %63, 2
  %73 = sdiv i64 %66, 2
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader14.preheader
  %74 = phi i64 [ %73, %._crit_edge.loopexit ], [ 0, %.preheader14.preheader ]
  %75 = phi i64 [ %72, %._crit_edge.loopexit ], [ 0, %.preheader14.preheader ]
  %76 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %75, ptr %76, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %1, i64 32
  store i64 %74, ptr %77, align 16, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %1, i64 56
  %79 = invoke noundef ptr @_ZSt11min_elementIPxET_S1_S1_(ptr noundef nonnull %1, ptr noundef nonnull %78)
          to label %80 unwind label %10

80:                                               ; preds = %._crit_edge
  %81 = load i64, ptr %79, align 8, !tbaa !5
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %81)
          to label %83 unwind label %10

83:                                               ; preds = %80
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %85 unwind label %10

85:                                               ; preds = %83
  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 56, 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 #3

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11min_elementIPxET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #5

; 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 #4 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)) #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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 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 = { "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 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 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"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass