; LLVM IR from tangjz/acm-icpc :: codeforces/gym (100443I)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<std::pair<int, std::__cxx11::basic_string<char>>, std::pair<int, std::__cxx11::basic_string<char>>, std::_Identity<std::pair<int, std::__cxx11::basic_string<char>>>, std::less<std::pair<int, std::__cxx11::basic_string<char>>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, std::__cxx11::basic_string<char>>, std::pair<int, std::__cxx11::basic_string<char>>, std::_Identity<std::pair<int, std::__cxx11::basic_string<char>>>, std::less<std::pair<int, std::__cxx11::basic_string<char>>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.8" = type { i32, %"class.std::__cxx11::basic_string" }
%"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] }
%"struct.std::pair.10" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::allocator.5" = type { i8 }
%"struct.std::pair" = type <{ %"class.std::__cxx11::basic_string", i32, [4 x i8] }>

@day = external dso_local global i32, align 4
@_Z3echB5cxx11 = external dso_local global [7 x %"class.std::map"], align 16
@_Z3comB5cxx11 = external dso_local global %"class.std::map", align 8
@_Z4HashB5cxx11 = external dso_local global %"class.std::set", align 8
@buf = external dso_local global [33 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %3 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair.8", align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair.8", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair.10", align 8
  %12 = alloca %"class.std::map", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.5", align 1
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair.8", align 8
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair.8", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::pair.10", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store i32 0, ptr %1, align 4
  br label %28

28:                                               ; preds = %266, %0
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @buf)
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %267

31:                                               ; preds = %28
  %32 = load i8, ptr @buf, align 16, !tbaa !5
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 %33, 60
  br i1 %34, label %35, label %39

35:                                               ; preds = %31
  %36 = load i8, ptr getelementptr inbounds ([33 x i8], ptr @buf, i64 0, i64 1), align 1, !tbaa !5
  %37 = sext i8 %36 to i32
  %38 = icmp eq i32 %37, 116
  br label %39

39:                                               ; preds = %35, %31
  %40 = phi i1 [ false, %31 ], [ %38, %35 ]
  br i1 %40, label %41, label %42

41:                                               ; preds = %39
  br label %44

42:                                               ; preds = %39
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 10, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %41
  %45 = load i8, ptr getelementptr inbounds ([33 x i8], ptr @buf, i64 0, i64 2), align 2, !tbaa !5
  %46 = sext i8 %45 to i32
  %47 = icmp eq i32 %46, 101
  br i1 %47, label %48, label %211

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #11
  %49 = load i32, ptr @day, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %50
  %52 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %51) #11
  %53 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %2, i32 0, i32 0
  store ptr %52, ptr %53, align 8
  br label %54

54:                                               ; preds = %107, %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #11
  %55 = load i32, ptr @day, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %56
  %58 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %57) #11
  %59 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %3, i32 0, i32 0
  store ptr %58, ptr %59, align 8
  %60 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESB_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #11
  br i1 %60, label %62, label %61

61:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #11
  br label %110

62:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #11
  %63 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #11
  %64 = getelementptr inbounds %"struct.std::pair", ptr %63, i32 0, i32 0
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) @_Z3comB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %64)
  %66 = load i32, ptr %65, align 4, !tbaa !8
  store i32 %66, ptr %4, align 4, !tbaa !8
  %67 = load i32, ptr %4, align 4, !tbaa !8
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %80

69:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #11
  %70 = load i32, ptr %4, align 4, !tbaa !8
  %71 = sub nsw i32 0, %70
  store i32 %71, ptr %6, align 4, !tbaa !8
  %72 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #11
  %73 = getelementptr inbounds %"struct.std::pair", ptr %72, i32 0, i32 0
  call void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 8 dereferenceable(32) %73)
  %74 = invoke noundef i64 @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5eraseERKS7_(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11, ptr noundef nonnull align 8 dereferenceable(40) %5)
          to label %75 unwind label %76

75:                                               ; preds = %69
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #11
  br label %80

76:                                               ; preds = %69
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %7, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %8, align 4
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #11
  br label %109

80:                                               ; preds = %75, %62
  %81 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #11
  %82 = getelementptr inbounds %"struct.std::pair", ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !10
  %84 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #11
  %85 = getelementptr inbounds %"struct.std::pair", ptr %84, i32 0, i32 0
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) @_Z3comB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %85)
  %87 = load i32, ptr %86, align 4, !tbaa !8
  %88 = sub nsw i32 %87, %83
  store i32 %88, ptr %86, align 4, !tbaa !8
  store i32 %88, ptr %4, align 4, !tbaa !8
  %89 = load i32, ptr %4, align 4, !tbaa !8
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %106

91:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #11
  %92 = load i32, ptr %4, align 4, !tbaa !8
  %93 = sub nsw i32 0, %92
  store i32 %93, ptr %10, align 4, !tbaa !8
  %94 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #11
  %95 = getelementptr inbounds %"struct.std::pair", ptr %94, i32 0, i32 0
  call void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 8 dereferenceable(32) %95)
  %96 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE6insertEOS7_(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11, ptr noundef nonnull align 8 dereferenceable(40) %9)
          to label %97 unwind label %102

97:                                               ; preds = %91
  %98 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %99 = extractvalue { ptr, i8 } %96, 0
  store ptr %99, ptr %98, align 8
  %100 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %101 = extractvalue { ptr, i8 } %96, 1
  store i8 %101, ptr %100, align 8
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #11
  br label %106

102:                                              ; preds = %91
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %7, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %8, align 4
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #11
  br label %109

106:                                              ; preds = %97, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #11
  br label %107

107:                                              ; preds = %106
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #11
  br label %54, !llvm.loop !16

109:                                              ; preds = %102, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #11
  br label %268

110:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #11
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #11
  %111 = load i32, ptr @day, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %112
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE4swapERSC_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(48) %113) #11
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #11
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #11
  br label %114

114:                                              ; preds = %144, %110
  %115 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @buf)
  %116 = icmp eq i32 %115, 1
  br i1 %116, label %117, label %121

117:                                              ; preds = %114
  %118 = load i8, ptr @buf, align 16, !tbaa !5
  %119 = sext i8 %118 to i32
  %120 = icmp ne i32 %119, 60
  br label %121

121:                                              ; preds = %117, %114
  %122 = phi i1 [ false, %114 ], [ %120, %117 ]
  br i1 %122, label %123, label %145

123:                                              ; preds = %121
  %124 = call i64 @strlen(ptr noundef @buf) #12
  %125 = icmp uge i64 %124, 4
  br i1 %125, label %126, label %144

126:                                              ; preds = %123
  %127 = load i32, ptr @day, align 4, !tbaa !8
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %128
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #11
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #11
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @buf, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %130 unwind label %135

130:                                              ; preds = %126
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) %129, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %132 unwind label %139

132:                                              ; preds = %130
  %133 = load i32, ptr %131, align 4, !tbaa !8
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %131, align 4, !tbaa !8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #11
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #11
  br label %144

135:                                              ; preds = %126
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %7, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %8, align 4
  br label %143

139:                                              ; preds = %130
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %7, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #11
  br label %143

143:                                              ; preds = %139, %135
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #11
  br label %268

144:                                              ; preds = %132, %123
  br label %114, !llvm.loop !18

145:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #11
  %146 = load i32, ptr @day, align 4, !tbaa !8
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %147
  %149 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %148) #11
  %150 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %15, i32 0, i32 0
  store ptr %149, ptr %150, align 8
  br label %151

151:                                              ; preds = %204, %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #11
  %152 = load i32, ptr @day, align 4, !tbaa !8
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %153
  %155 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %154) #11
  %156 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %16, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  %157 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESB_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #11
  br i1 %157, label %159, label %158

158:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #11
  br label %207

159:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #11
  %160 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #11
  %161 = getelementptr inbounds %"struct.std::pair", ptr %160, i32 0, i32 0
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) @_Z3comB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %161)
  %163 = load i32, ptr %162, align 4, !tbaa !8
  store i32 %163, ptr %17, align 4, !tbaa !8
  %164 = load i32, ptr %17, align 4, !tbaa !8
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %177

166:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #11
  %167 = load i32, ptr %17, align 4, !tbaa !8
  %168 = sub nsw i32 0, %167
  store i32 %168, ptr %19, align 4, !tbaa !8
  %169 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #11
  %170 = getelementptr inbounds %"struct.std::pair", ptr %169, i32 0, i32 0
  call void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 8 dereferenceable(32) %170)
  %171 = invoke noundef i64 @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5eraseERKS7_(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11, ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %172 unwind label %173

172:                                              ; preds = %166
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #11
  br label %177

173:                                              ; preds = %166
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %7, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %8, align 4
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #11
  br label %206

177:                                              ; preds = %172, %159
  %178 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #11
  %179 = getelementptr inbounds %"struct.std::pair", ptr %178, i32 0, i32 1
  %180 = load i32, ptr %179, align 8, !tbaa !10
  %181 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #11
  %182 = getelementptr inbounds %"struct.std::pair", ptr %181, i32 0, i32 0
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) @_Z3comB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %182)
  %184 = load i32, ptr %183, align 4, !tbaa !8
  %185 = add nsw i32 %184, %180
  store i32 %185, ptr %183, align 4, !tbaa !8
  store i32 %185, ptr %17, align 4, !tbaa !8
  %186 = load i32, ptr %17, align 4, !tbaa !8
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %203

188:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #11
  %189 = load i32, ptr %17, align 4, !tbaa !8
  %190 = sub nsw i32 0, %189
  store i32 %190, ptr %21, align 4, !tbaa !8
  %191 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #11
  %192 = getelementptr inbounds %"struct.std::pair", ptr %191, i32 0, i32 0
  call void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind writable sret(%"struct.std::pair.8") align 8 %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 8 dereferenceable(32) %192)
  %193 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE6insertEOS7_(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11, ptr noundef nonnull align 8 dereferenceable(40) %20)
          to label %194 unwind label %199

194:                                              ; preds = %188
  %195 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 0
  %196 = extractvalue { ptr, i8 } %193, 0
  store ptr %196, ptr %195, align 8
  %197 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 1
  %198 = extractvalue { ptr, i8 } %193, 1
  store i8 %198, ptr %197, align 8
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #11
  br label %203

199:                                              ; preds = %188
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %7, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %8, align 4
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #11
  br label %206

203:                                              ; preds = %194, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  br label %204

204:                                              ; preds = %203
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #11
  br label %151, !llvm.loop !19

206:                                              ; preds = %199, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #11
  br label %268

207:                                              ; preds = %158
  %208 = load i32, ptr @day, align 4, !tbaa !8
  %209 = add nsw i32 %208, 1
  %210 = srem i32 %209, 7
  store i32 %210, ptr @day, align 4, !tbaa !8
  br label %266

211:                                              ; preds = %44
  %212 = load i8, ptr getelementptr inbounds ([33 x i8], ptr @buf, i64 0, i64 2), align 2, !tbaa !5
  %213 = sext i8 %212 to i32
  %214 = icmp eq i32 %213, 111
  br i1 %214, label %215, label %216

215:                                              ; preds = %211
  br label %218

216:                                              ; preds = %211
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.5, i32 noundef 34, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

217:                                              ; No predecessors!
  br label %218

218:                                              ; preds = %217, %215
  %219 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @buf)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  %220 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef @buf, ptr noundef @.str.7, ptr noundef %23) #11
  %221 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @buf)
  %222 = load i32, ptr %23, align 4, !tbaa !8
  %223 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %222)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #11
  %224 = call ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11) #11
  %225 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %24, i32 0, i32 0
  store ptr %224, ptr %225, align 8
  br label %226

226:                                              ; preds = %263, %218
  %227 = load i32, ptr %23, align 4, !tbaa !8
  %228 = icmp sgt i32 %227, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #11
  br i1 %228, label %229, label %233

229:                                              ; preds = %226
  %230 = call ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11) #11
  %231 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %25, i32 0, i32 0
  store ptr %230, ptr %231, align 8
  %232 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #11
  br label %233

233:                                              ; preds = %229, %226
  %234 = phi i1 [ false, %226 ], [ %232, %229 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #11
  br i1 %234, label %235, label %264

235:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #11
  %236 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #11
  %237 = getelementptr inbounds %"struct.std::pair.8", ptr %236, i32 0, i32 0
  %238 = load i32, ptr %237, align 8, !tbaa !20
  store i32 %238, ptr %26, align 4, !tbaa !8
  br label %239

239:                                              ; preds = %251, %235
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #11
  %240 = call ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11) #11
  %241 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  store ptr %240, ptr %241, align 8
  %242 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %27) #11
  br i1 %242, label %243, label %249

243:                                              ; preds = %239
  %244 = load i32, ptr %26, align 4, !tbaa !8
  %245 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #11
  %246 = getelementptr inbounds %"struct.std::pair.8", ptr %245, i32 0, i32 0
  %247 = load i32, ptr %246, align 8, !tbaa !20
  %248 = icmp eq i32 %244, %247
  br label %249

249:                                              ; preds = %243, %239
  %250 = phi i1 [ false, %239 ], [ %248, %243 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  br i1 %250, label %251, label %263

251:                                              ; preds = %249
  %252 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #11
  %253 = getelementptr inbounds %"struct.std::pair.8", ptr %252, i32 0, i32 1
  %254 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %253) #11
  %255 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #11
  %256 = getelementptr inbounds %"struct.std::pair.8", ptr %255, i32 0, i32 0
  %257 = load i32, ptr %256, align 8, !tbaa !20
  %258 = sub nsw i32 0, %257
  %259 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %254, i32 noundef %258)
  %260 = load i32, ptr %23, align 4, !tbaa !8
  %261 = add nsw i32 %260, -1
  store i32 %261, ptr %23, align 4, !tbaa !8
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #11
  br label %239, !llvm.loop !22

263:                                              ; preds = %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #11
  br label %226, !llvm.loop !23

264:                                              ; preds = %233
  %265 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %266

266:                                              ; preds = %264, %207
  br label %28, !llvm.loop !24

267:                                              ; preds = %28
  ret i32 0

268:                                              ; preds = %206, %143, %109
  %269 = load ptr, ptr %7, align 8
  %270 = load i32, ptr %8, align 4
  %271 = insertvalue { ptr, i32 } poison, ptr %269, 0
  %272 = insertvalue { ptr, i32 } %271, i32 %270, 1
  resume { ptr, i32 } %272
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5eraseERKS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.8") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32)) #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE6insertEOS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE4swapERSC_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #8

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #5 align 2

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

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

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #9

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

attributes #0 = { 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 #1 = { 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 #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 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { inlinehint 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind willreturn memory(read) "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 #9 = { 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 #10 = { noreturn nounwind }
attributes #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(read) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !9, i64 32}
!11 = !{!"_ZTSSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiE", !12, i64 0, !9, i64 32}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !6, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !6, i64 0}
!15 = !{!"long", !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!21, !9, i64 0}
!21 = !{!"_ZTSSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE", !9, i64 0, !12, i64 8}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}


; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree.0" }
%"class.std::_Rb_tree.0" = type { %"struct.std::_Rb_tree<std::pair<int, std::__cxx11::basic_string<char>>, std::pair<int, std::__cxx11::basic_string<char>>, std::_Identity<std::pair<int, std::__cxx11::basic_string<char>>>, std::less<std::pair<int, std::__cxx11::basic_string<char>>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, std::__cxx11::basic_string<char>>, std::pair<int, std::__cxx11::basic_string<char>>, std::_Identity<std::pair<int, std::__cxx11::basic_string<char>>>, std::less<std::pair<int, std::__cxx11::basic_string<char>>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.8" = type { i32, %"class.std::__cxx11::basic_string" }
%"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.5" = type { i8 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@day = external dso_local local_unnamed_addr global i32, align 4
@_Z3echB5cxx11 = external dso_local global [7 x %"class.std::map"], align 16
@_Z3comB5cxx11 = external dso_local global %"class.std::map", align 8
@_Z4HashB5cxx11 = external dso_local global %"class.std::set", align 8
@buf = external dso_local global [33 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %2 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %3 = alloca %"struct.std::pair.8", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair.8", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::map", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.5", align 1
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %12 = alloca %"struct.std::pair.8", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair.8", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  %21 = icmp eq i32 %20, 1
  br i1 %21, label %.lr.ph42, label %._crit_edge43

.lr.ph42:                                         ; preds = %0, %184
  %22 = load i8, ptr @buf, align 16, !tbaa !5
  %23 = icmp eq i8 %22, 60
  %24 = load i8, ptr getelementptr inbounds (i8, ptr @buf, i64 1), align 1
  %25 = icmp eq i8 %24, 116
  %26 = select i1 %23, i1 %25, i1 false
  br i1 %26, label %28, label %27

27:                                               ; preds = %.lr.ph42
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 10, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

28:                                               ; preds = %.lr.ph42
  %29 = load i8, ptr getelementptr inbounds (i8, ptr @buf, i64 2), align 2, !tbaa !5
  switch i8 %29, label %148 [
    i8 101, label %30
    i8 111, label %149
  ]

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #10
  %31 = load i32, ptr @day, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %32
  %34 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %33) #10
  store ptr %34, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #10
  %35 = load i32, ptr @day, align 4, !tbaa !8
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %36
  %38 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %37) #10
  store ptr %38, ptr %2, align 8
  %39 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESB_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  br i1 %39, label %.lr.ph34, label %._crit_edge

._crit_edge:                                      ; preds = %73, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %7, i8 0, i64 48, i1 false)
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #10
  %40 = load i32, ptr @day, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %41
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE4swapERSC_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %42) #10
  call void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #10
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  %44 = icmp eq i32 %43, 1
  %45 = load i8, ptr @buf, align 16
  %46 = icmp ne i8 %45, 60
  %47 = select i1 %44, i1 %46, i1 false
  br i1 %47, label %.lr.ph36, label %._crit_edge37

.lr.ph34:                                         ; preds = %30, %73
  %48 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) @_Z3comB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %48)
  %50 = load i32, ptr %49, align 4, !tbaa !8
  %.not27 = icmp eq i32 %50, 0
  br i1 %.not27, label %58, label %51

51:                                               ; preds = %.lr.ph34
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #10
  %52 = sub nsw i32 0, %50
  store i32 %52, ptr %4, align 4, !tbaa !8
  %53 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  call void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(32) %53)
  %54 = invoke noundef i64 @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5eraseERKS7_(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11, ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %55 unwind label %56

55:                                               ; preds = %51
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #10
  br label %58

56:                                               ; preds = %51
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #10
  br label %80

58:                                               ; preds = %55, %.lr.ph34
  %59 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %60 = getelementptr inbounds i8, ptr %59, i64 32
  %61 = load i32, ptr %60, align 8, !tbaa !10
  %62 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) @_Z3comB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %62)
  %64 = load i32, ptr %63, align 4, !tbaa !8
  %65 = sub nsw i32 %64, %61
  store i32 %65, ptr %63, align 4, !tbaa !8
  %.not28 = icmp eq i32 %64, %61
  br i1 %.not28, label %73, label %66

66:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  %67 = sub nsw i32 0, %65
  store i32 %67, ptr %6, align 4, !tbaa !8
  %68 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  call void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 8 dereferenceable(32) %68)
  %69 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE6insertEOS7_(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11, ptr noundef nonnull align 8 dereferenceable(40) %5)
          to label %70 unwind label %71

70:                                               ; preds = %66
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #10
  br label %73

71:                                               ; preds = %66
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #10
  br label %80

73:                                               ; preds = %70, %58
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #10
  %75 = load i32, ptr @day, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %76
  %78 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %77) #10
  store ptr %78, ptr %2, align 8
  %79 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESB_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  br i1 %79, label %.lr.ph34, label %._crit_edge, !llvm.loop !16

80:                                               ; preds = %71, %56
  %.pn29 = phi { ptr, i32 } [ %72, %71 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #10
  br label %187

.lr.ph36:                                         ; preds = %._crit_edge, %97
  %81 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @buf) #11
  %82 = icmp ugt i64 %81, 3
  br i1 %82, label %83, label %97

83:                                               ; preds = %.lr.ph36
  %84 = load i32, ptr @day, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @buf, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %85 unwind label %92

85:                                               ; preds = %83
  %86 = sext i32 %84 to i64
  %87 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %86
  %88 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) %87, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %89 unwind label %94

89:                                               ; preds = %85
  %90 = load i32, ptr %88, align 4, !tbaa !8
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %88, align 4, !tbaa !8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  br label %97

92:                                               ; preds = %83
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %96

94:                                               ; preds = %85
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  br label %96

96:                                               ; preds = %94, %92
  %.pn25 = phi { ptr, i32 } [ %95, %94 ], [ %93, %92 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  br label %187

97:                                               ; preds = %89, %.lr.ph36
  %98 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  %99 = icmp eq i32 %98, 1
  %100 = load i8, ptr @buf, align 16
  %101 = icmp ne i8 %100, 60
  %102 = select i1 %99, i1 %101, i1 false
  br i1 %102, label %.lr.ph36, label %._crit_edge37, !llvm.loop !18

._crit_edge37:                                    ; preds = %97, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #10
  %103 = load i32, ptr @day, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %104
  %106 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %105) #10
  store ptr %106, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  %107 = load i32, ptr @day, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %108
  %110 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %109) #10
  store ptr %110, ptr %11, align 8
  %111 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  br i1 %111, label %.lr.ph39, label %._crit_edge40

._crit_edge40:                                    ; preds = %140, %._crit_edge37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  %112 = load i32, ptr @day, align 4, !tbaa !8
  %113 = add nsw i32 %112, 1
  %114 = srem i32 %113, 7
  store i32 %114, ptr @day, align 4, !tbaa !8
  br label %184

.lr.ph39:                                         ; preds = %._crit_edge37, %140
  %115 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) @_Z3comB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %115)
  %117 = load i32, ptr %116, align 4, !tbaa !8
  %.not = icmp eq i32 %117, 0
  br i1 %.not, label %125, label %118

118:                                              ; preds = %.lr.ph39
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #10
  %119 = sub nsw i32 0, %117
  store i32 %119, ptr %13, align 4, !tbaa !8
  %120 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  call void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 8 dereferenceable(32) %120)
  %121 = invoke noundef i64 @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5eraseERKS7_(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11, ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %122 unwind label %123

122:                                              ; preds = %118
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #10
  br label %125

123:                                              ; preds = %118
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #10
  br label %147

125:                                              ; preds = %122, %.lr.ph39
  %126 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  %127 = getelementptr inbounds i8, ptr %126, i64 32
  %128 = load i32, ptr %127, align 8, !tbaa !10
  %129 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) @_Z3comB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %129)
  %131 = load i32, ptr %130, align 4, !tbaa !8
  %132 = add nsw i32 %131, %128
  store i32 %132, ptr %130, align 4, !tbaa !8
  %.not23 = icmp eq i32 %132, 0
  br i1 %.not23, label %140, label %133

133:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #10
  %134 = sub nsw i32 0, %132
  store i32 %134, ptr %15, align 4, !tbaa !8
  %135 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  call void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.8") align 8 %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 8 dereferenceable(32) %135)
  %136 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE6insertEOS7_(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %137 unwind label %138

137:                                              ; preds = %133
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #10
  br label %140

138:                                              ; preds = %133
  %139 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #10
  br label %147

140:                                              ; preds = %137, %125
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  %142 = load i32, ptr @day, align 4, !tbaa !8
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [7 x %"class.std::map"], ptr @_Z3echB5cxx11, i64 0, i64 %143
  %145 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %144) #10
  store ptr %145, ptr %11, align 8
  %146 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  br i1 %146, label %.lr.ph39, label %._crit_edge40, !llvm.loop !19

147:                                              ; preds = %138, %123
  %.pn = phi { ptr, i32 } [ %139, %138 ], [ %124, %123 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #10
  br label %187

148:                                              ; preds = %28
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.5, i32 noundef 34, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

149:                                              ; preds = %28
  %150 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #10
  %151 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull @buf, ptr noundef nonnull @.str.7, ptr noundef nonnull %16) #10
  %152 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  %153 = load i32, ptr %16, align 4, !tbaa !8
  %154 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %153)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  %155 = call ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11) #10
  store ptr %155, ptr %17, align 8
  %156 = load i32, ptr %16, align 4, !tbaa !8
  %157 = icmp sgt i32 %156, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #10
  br i1 %157, label %.lr.ph33, label %.critedge

.lr.ph33:                                         ; preds = %149, %.loopexit
  %158 = call ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11) #10
  store ptr %158, ptr %18, align 8
  %159 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  br i1 %159, label %160, label %.loopexit32

160:                                              ; preds = %.lr.ph33
  %161 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #10
  %162 = load i32, ptr %161, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #10
  %163 = call ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11) #10
  store ptr %163, ptr %19, align 8
  %164 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %19) #10
  br i1 %164, label %.lr.ph, label %.critedge2

.lr.ph:                                           ; preds = %160, %168
  %165 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #10
  %166 = load i32, ptr %165, align 8, !tbaa !20
  %167 = icmp eq i32 %162, %166
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #10
  br i1 %167, label %168, label %.loopexit

168:                                              ; preds = %.lr.ph
  %169 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #10
  %170 = getelementptr inbounds i8, ptr %169, i64 8
  %171 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %170) #10
  %172 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #10
  %173 = load i32, ptr %172, align 8, !tbaa !20
  %174 = sub nsw i32 0, %173
  %175 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef %171, i32 noundef %174)
  %176 = load i32, ptr %16, align 4, !tbaa !8
  %177 = add nsw i32 %176, -1
  store i32 %177, ptr %16, align 4, !tbaa !8
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #10
  %179 = call ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z4HashB5cxx11) #10
  store ptr %179, ptr %19, align 8
  %180 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %19) #10
  br i1 %180, label %.lr.ph, label %.critedge2, !llvm.loop !22

.critedge2:                                       ; preds = %168, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #10
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %.critedge2
  %181 = load i32, ptr %16, align 4, !tbaa !8
  %182 = icmp sgt i32 %181, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #10
  br i1 %182, label %.lr.ph33, label %.critedge, !llvm.loop !23

.critedge:                                        ; preds = %.loopexit, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  br label %.loopexit32

.loopexit32:                                      ; preds = %.lr.ph33, %.critedge
  %183 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #10
  br label %184

184:                                              ; preds = %.loopexit32, %._crit_edge40
  %185 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @buf)
  %186 = icmp eq i32 %185, 1
  br i1 %186, label %.lr.ph42, label %._crit_edge43, !llvm.loop !24

._crit_edge43:                                    ; preds = %184, %0
  ret i32 0

187:                                              ; preds = %147, %96, %80
  %.pn29.pn = phi { ptr, i32 } [ %.pn29, %80 ], [ %.pn25, %96 ], [ %.pn, %147 ]
  resume { ptr, i32 } %.pn29.pn
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5eraseERKS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS9_INSA_IT0_E4typeEE6__typeEEOSB_OSG_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.8") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE6insertEOS7_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEE4swapERSC_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #8

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4lessIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #5 align 2

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt4lessIS7_ESaIS7_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { 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 #2 = { nofree 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { inlinehint 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #9 = { noreturn nounwind }
attributes #10 = { nounwind }
attributes #11 = { nounwind willreturn memory(read) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !9, i64 32}
!11 = !{!"_ZTSSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiE", !12, i64 0, !9, i64 32}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !6, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !6, i64 0}
!15 = !{!"long", !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = !{!21, !9, i64 0}
!21 = !{!"_ZTSSt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE", !9, i64 0, !12, i64 8}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17}


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