; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/402 Division 1/B (B)

; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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::allocator.5" = type { i8 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@mx = external dso_local global [1010 x i32], align 16
@mn = external dso_local global [1010 x i32], align 16
@_Z3sidB5cxx11 = external dso_local global %"class.std::unordered_map", align 8
@var = external dso_local global %"class.std::vector", align 8
@_Z3conB5cxx11 = external dso_local global [5010 x %"class.std::__cxx11::basic_string"], align 16
@_Z2opB5cxx11 = external dso_local global [5010 x %"class.std::vector.8"], align 16
@bitval = external dso_local global [5010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 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 @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5splitRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.8") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.5", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector.8", align 8
  %10 = alloca %"class.std::vector.8", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %26 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  %31 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %32 = getelementptr i8, ptr %31, i64 -24
  %33 = load i64, ptr %32, align 8
  %34 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %33
  %35 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %34, ptr noundef null)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, i64 noundef 8196)
  call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE15max_load_factorEf(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, float noundef 2.500000e-01)
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %38 unwind label %48

38:                                               ; preds = %0
  %39 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %40 unwind label %52

40:                                               ; preds = %38
  store i32 0, ptr %39, align 4, !tbaa !8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  %41 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_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) %6)
          to label %42 unwind label %57

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !8
  br label %43

43:                                               ; preds = %117, %42
  %44 = load i32, ptr %7, align 4, !tbaa !8
  %45 = load i32, ptr @n, align 4, !tbaa !8
  %46 = icmp sle i32 %44, %45
  br i1 %46, label %61, label %47

47:                                               ; preds = %43
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %123

48:                                               ; preds = %0
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %4, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %5, align 4
  br label %56

52:                                               ; preds = %38
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %4, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %56

56:                                               ; preds = %52, %48
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  br label %383

57:                                               ; preds = %378, %356, %40
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %4, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %5, align 4
  br label %382

61:                                               ; preds = %43
  %62 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_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) %6)
          to label %63 unwind label %71

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  invoke void @_Z5splitRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::vector.8") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %64 unwind label %75

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 2, ptr %11, align 4, !tbaa !8
  br label %65

65:                                               ; preds = %84, %64
  %66 = load i32, ptr %11, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %69 = icmp ult i64 %67, %68
  br i1 %69, label %79, label %70

70:                                               ; preds = %65
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %91

71:                                               ; preds = %61
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %4, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %5, align 4
  br label %122

75:                                               ; preds = %63
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %4, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %5, align 4
  br label %121

79:                                               ; preds = %65
  %80 = load i32, ptr %11, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %81) #7
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(32) %82)
          to label %83 unwind label %87

83:                                               ; preds = %79
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %11, align 4, !tbaa !8
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %11, align 4, !tbaa !8
  br label %65, !llvm.loop !11

87:                                               ; preds = %79
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %4, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %120

91:                                               ; preds = %70
  %92 = load i32, ptr %7, align 4, !tbaa !8
  %93 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0) #7
  %94 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %93)
          to label %95 unwind label %106

95:                                               ; preds = %91
  store i32 %92, ptr %94, align 4, !tbaa !8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @var, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %96 unwind label %106

96:                                               ; preds = %95
  %97 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  %98 = icmp eq i64 %97, 1
  br i1 %98, label %99, label %110

99:                                               ; preds = %96
  %100 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #7
  %101 = load i32, ptr %7, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [5010 x %"class.std::__cxx11::basic_string"], ptr @_Z3conB5cxx11, i64 0, i64 %102
  %104 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %103, ptr noundef nonnull align 8 dereferenceable(32) %100)
          to label %105 unwind label %106

105:                                              ; preds = %99
  br label %116

106:                                              ; preds = %110, %99, %95, %91
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %4, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %5, align 4
  br label %120

110:                                              ; preds = %96
  %111 = load i32, ptr %7, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %112
  %114 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_(ptr noundef nonnull align 8 dereferenceable(24) %113, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %115 unwind label %106

115:                                              ; preds = %110
  br label %116

116:                                              ; preds = %115, %105
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %7, align 4, !tbaa !8
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %7, align 4, !tbaa !8
  br label %43, !llvm.loop !13

120:                                              ; preds = %106, %87
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %121

121:                                              ; preds = %120, %75
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  br label %122

122:                                              ; preds = %121, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %382

123:                                              ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %124

124:                                              ; preds = %332, %123
  %125 = load i32, ptr %12, align 4, !tbaa !8
  %126 = load i32, ptr @m, align 4, !tbaa !8
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %336

129:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !8
  call void @llvm.memset.p0.i64(ptr align 16 @bitval, i8 0, i64 20040, i1 false)
  store i32 0, ptr @bitval, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 1, ptr %15, align 4, !tbaa !8
  br label %130

130:                                              ; preds = %211, %129
  %131 = load i32, ptr %15, align 4, !tbaa !8
  %132 = load i32, ptr @n, align 4, !tbaa !8
  %133 = icmp sle i32 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %215

135:                                              ; preds = %130
  %136 = load i32, ptr %15, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [5010 x %"class.std::__cxx11::basic_string"], ptr @_Z3conB5cxx11, i64 0, i64 %137
  %139 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %138) #7
  %140 = icmp ne i64 %139, 0
  br i1 %140, label %141, label %159

141:                                              ; preds = %135
  %142 = load i32, ptr %15, align 4, !tbaa !8
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [5010 x %"class.std::__cxx11::basic_string"], ptr @_Z3conB5cxx11, i64 0, i64 %143
  %145 = load i32, ptr %12, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %144, i64 noundef %146)
          to label %148 unwind label %155

148:                                              ; preds = %141
  %149 = load i8, ptr %147, align 1, !tbaa !14
  %150 = sext i8 %149 to i32
  %151 = sub nsw i32 %150, 48
  %152 = load i32, ptr %15, align 4, !tbaa !8
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %153
  store i32 %151, ptr %154, align 4, !tbaa !8
  br label %204

155:                                              ; preds = %141
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %4, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %5, align 4
  br label %214

159:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  %160 = load i32, ptr %15, align 4, !tbaa !8
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %161
  %163 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef 1) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %163)
          to label %164 unwind label %190

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %165 = load i32, ptr %15, align 4, !tbaa !8
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %166
  %168 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef 0) #7
  %169 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %168)
          to label %170 unwind label %194

170:                                              ; preds = %164
  %171 = load i32, ptr %169, align 4, !tbaa !8
  store i32 %171, ptr %17, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %172 = load i32, ptr %15, align 4, !tbaa !8
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %173
  %175 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %174, i64 noundef 2) #7
  %176 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %175)
          to label %177 unwind label %198

177:                                              ; preds = %170
  %178 = load i32, ptr %176, align 4, !tbaa !8
  store i32 %178, ptr %18, align 4, !tbaa !8
  %179 = load i32, ptr %17, align 4, !tbaa !8
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %180
  %182 = load i32, ptr %18, align 4, !tbaa !8
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %183
  %185 = invoke noundef i32 @_Z3getRiS_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 4 dereferenceable(4) %181, ptr noundef nonnull align 4 dereferenceable(4) %184, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %186 unwind label %198

186:                                              ; preds = %177
  %187 = load i32, ptr %15, align 4, !tbaa !8
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %188
  store i32 %185, ptr %189, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  br label %204

190:                                              ; preds = %159
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %4, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %5, align 4
  br label %203

194:                                              ; preds = %164
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %4, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %5, align 4
  br label %202

198:                                              ; preds = %177, %170
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %4, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %202

202:                                              ; preds = %198, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %203

203:                                              ; preds = %202, %190
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  br label %214

204:                                              ; preds = %186, %148
  %205 = load i32, ptr %15, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !8
  %209 = load i32, ptr %13, align 4, !tbaa !8
  %210 = add nsw i32 %209, %208
  store i32 %210, ptr %13, align 4, !tbaa !8
  br label %211

211:                                              ; preds = %204
  %212 = load i32, ptr %15, align 4, !tbaa !8
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %15, align 4, !tbaa !8
  br label %130, !llvm.loop !15

214:                                              ; preds = %203, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %335

215:                                              ; preds = %134
  call void @llvm.memset.p0.i64(ptr align 16 @bitval, i8 0, i64 20040, i1 false)
  store i32 1, ptr @bitval, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 1, ptr %19, align 4, !tbaa !8
  br label %216

216:                                              ; preds = %297, %215
  %217 = load i32, ptr %19, align 4, !tbaa !8
  %218 = load i32, ptr @n, align 4, !tbaa !8
  %219 = icmp sle i32 %217, %218
  br i1 %219, label %221, label %220

220:                                              ; preds = %216
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %301

221:                                              ; preds = %216
  %222 = load i32, ptr %19, align 4, !tbaa !8
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [5010 x %"class.std::__cxx11::basic_string"], ptr @_Z3conB5cxx11, i64 0, i64 %223
  %225 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %224) #7
  %226 = icmp ne i64 %225, 0
  br i1 %226, label %227, label %245

227:                                              ; preds = %221
  %228 = load i32, ptr %19, align 4, !tbaa !8
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [5010 x %"class.std::__cxx11::basic_string"], ptr @_Z3conB5cxx11, i64 0, i64 %229
  %231 = load i32, ptr %12, align 4, !tbaa !8
  %232 = sext i32 %231 to i64
  %233 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %230, i64 noundef %232)
          to label %234 unwind label %241

234:                                              ; preds = %227
  %235 = load i8, ptr %233, align 1, !tbaa !14
  %236 = sext i8 %235 to i32
  %237 = sub nsw i32 %236, 48
  %238 = load i32, ptr %19, align 4, !tbaa !8
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %239
  store i32 %237, ptr %240, align 4, !tbaa !8
  br label %290

241:                                              ; preds = %227
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %4, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %5, align 4
  br label %300

245:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  %246 = load i32, ptr %19, align 4, !tbaa !8
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %247
  %249 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %248, i64 noundef 1) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %249)
          to label %250 unwind label %276

250:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %251 = load i32, ptr %19, align 4, !tbaa !8
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %252
  %254 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %253, i64 noundef 0) #7
  %255 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %254)
          to label %256 unwind label %280

256:                                              ; preds = %250
  %257 = load i32, ptr %255, align 4, !tbaa !8
  store i32 %257, ptr %21, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %258 = load i32, ptr %19, align 4, !tbaa !8
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %259
  %261 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %260, i64 noundef 2) #7
  %262 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %261)
          to label %263 unwind label %284

263:                                              ; preds = %256
  %264 = load i32, ptr %262, align 4, !tbaa !8
  store i32 %264, ptr %22, align 4, !tbaa !8
  %265 = load i32, ptr %21, align 4, !tbaa !8
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %266
  %268 = load i32, ptr %22, align 4, !tbaa !8
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %269
  %271 = invoke noundef i32 @_Z3getRiS_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 4 dereferenceable(4) %267, ptr noundef nonnull align 4 dereferenceable(4) %270, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %272 unwind label %284

272:                                              ; preds = %263
  %273 = load i32, ptr %19, align 4, !tbaa !8
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %274
  store i32 %271, ptr %275, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  br label %290

276:                                              ; preds = %245
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %4, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %5, align 4
  br label %289

280:                                              ; preds = %250
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %4, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %5, align 4
  br label %288

284:                                              ; preds = %263, %256
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %4, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %288

288:                                              ; preds = %284, %280
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %289

289:                                              ; preds = %288, %276
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  br label %300

290:                                              ; preds = %272, %234
  %291 = load i32, ptr %19, align 4, !tbaa !8
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %292
  %294 = load i32, ptr %293, align 4, !tbaa !8
  %295 = load i32, ptr %14, align 4, !tbaa !8
  %296 = add nsw i32 %295, %294
  store i32 %296, ptr %14, align 4, !tbaa !8
  br label %297

297:                                              ; preds = %290
  %298 = load i32, ptr %19, align 4, !tbaa !8
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %19, align 4, !tbaa !8
  br label %216, !llvm.loop !16

300:                                              ; preds = %289, %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %335

301:                                              ; preds = %220
  %302 = load i32, ptr %13, align 4, !tbaa !8
  %303 = load i32, ptr %14, align 4, !tbaa !8
  %304 = icmp slt i32 %302, %303
  br i1 %304, label %305, label %312

305:                                              ; preds = %301
  %306 = load i32, ptr %12, align 4, !tbaa !8
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [1010 x i32], ptr @mn, i64 0, i64 %307
  store i32 0, ptr %308, align 4, !tbaa !8
  %309 = load i32, ptr %12, align 4, !tbaa !8
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [1010 x i32], ptr @mx, i64 0, i64 %310
  store i32 1, ptr %311, align 4, !tbaa !8
  br label %331

312:                                              ; preds = %301
  %313 = load i32, ptr %14, align 4, !tbaa !8
  %314 = load i32, ptr %13, align 4, !tbaa !8
  %315 = icmp slt i32 %313, %314
  br i1 %315, label %316, label %323

316:                                              ; preds = %312
  %317 = load i32, ptr %12, align 4, !tbaa !8
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [1010 x i32], ptr @mn, i64 0, i64 %318
  store i32 1, ptr %319, align 4, !tbaa !8
  %320 = load i32, ptr %12, align 4, !tbaa !8
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [1010 x i32], ptr @mx, i64 0, i64 %321
  store i32 0, ptr %322, align 4, !tbaa !8
  br label %330

323:                                              ; preds = %312
  %324 = load i32, ptr %12, align 4, !tbaa !8
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds [1010 x i32], ptr @mx, i64 0, i64 %325
  store i32 0, ptr %326, align 4, !tbaa !8
  %327 = load i32, ptr %12, align 4, !tbaa !8
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [1010 x i32], ptr @mn, i64 0, i64 %328
  store i32 0, ptr %329, align 4, !tbaa !8
  br label %330

330:                                              ; preds = %323, %316
  br label %331

331:                                              ; preds = %330, %305
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %332

332:                                              ; preds = %331
  %333 = load i32, ptr %12, align 4, !tbaa !8
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %12, align 4, !tbaa !8
  br label %124, !llvm.loop !17

335:                                              ; preds = %300, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %382

336:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !8
  br label %337

337:                                              ; preds = %349, %336
  %338 = load i32, ptr %23, align 4, !tbaa !8
  %339 = load i32, ptr @m, align 4, !tbaa !8
  %340 = icmp slt i32 %338, %339
  br i1 %340, label %342, label %341

341:                                              ; preds = %337
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %356

342:                                              ; preds = %337
  %343 = load i32, ptr %23, align 4, !tbaa !8
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [1010 x i32], ptr @mn, i64 0, i64 %344
  %346 = load i32, ptr %345, align 4, !tbaa !8
  %347 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %346)
          to label %348 unwind label %352

348:                                              ; preds = %342
  br label %349

349:                                              ; preds = %348
  %350 = load i32, ptr %23, align 4, !tbaa !8
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %23, align 4, !tbaa !8
  br label %337, !llvm.loop !18

352:                                              ; preds = %342
  %353 = landingpad { ptr, i32 }
          cleanup
  %354 = extractvalue { ptr, i32 } %353, 0
  store ptr %354, ptr %4, align 8
  %355 = extractvalue { ptr, i32 } %353, 1
  store i32 %355, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %382

356:                                              ; preds = %341
  %357 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %358 unwind label %57

358:                                              ; preds = %356
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !8
  br label %359

359:                                              ; preds = %371, %358
  %360 = load i32, ptr %24, align 4, !tbaa !8
  %361 = load i32, ptr @m, align 4, !tbaa !8
  %362 = icmp slt i32 %360, %361
  br i1 %362, label %364, label %363

363:                                              ; preds = %359
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %378

364:                                              ; preds = %359
  %365 = load i32, ptr %24, align 4, !tbaa !8
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds [1010 x i32], ptr @mx, i64 0, i64 %366
  %368 = load i32, ptr %367, align 4, !tbaa !8
  %369 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %368)
          to label %370 unwind label %374

370:                                              ; preds = %364
  br label %371

371:                                              ; preds = %370
  %372 = load i32, ptr %24, align 4, !tbaa !8
  %373 = add nsw i32 %372, 1
  store i32 %373, ptr %24, align 4, !tbaa !8
  br label %359, !llvm.loop !19

374:                                              ; preds = %364
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %4, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %382

378:                                              ; preds = %363
  %379 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %380 unwind label %57

380:                                              ; preds = %378
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  %381 = load i32, ptr %1, align 4
  ret i32 %381

382:                                              ; preds = %374, %352, %335, %122, %57
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #7
  br label %383

383:                                              ; preds = %382, %56
  %384 = load ptr, ptr %4, align 8
  %385 = load i32, ptr %5, align 4
  %386 = insertvalue { ptr, i32 } poison, ptr %384, 0
  %387 = insertvalue { ptr, i32 } %386, i32 %385, 1
  resume { ptr, i32 } %387
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE15max_load_factorEf(ptr noundef nonnull align 8 dereferenceable(56), float noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #1 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 #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

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

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

; 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) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z3getRiS_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32)) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 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 dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!10, !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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::allocator.5" = type { i8 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@mx = external dso_local local_unnamed_addr global [1010 x i32], align 16
@mn = external dso_local local_unnamed_addr global [1010 x i32], align 16
@_Z3sidB5cxx11 = external dso_local global %"class.std::unordered_map", align 8
@var = external dso_local global %"class.std::vector", align 8
@_Z3conB5cxx11 = external dso_local global [5010 x %"class.std::__cxx11::basic_string"], align 16
@_Z2opB5cxx11 = external dso_local global [5010 x %"class.std::vector.8"], align 16
@bitval = external dso_local global [5010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 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 @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5splitRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.8") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator.5", align 1
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector.8", align 8
  %6 = alloca %"class.std::vector.8", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %17
  %19 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %21 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) @m)
  tail call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, i64 noundef 8196)
  tail call void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE15max_load_factorEf(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, float noundef 2.500000e-01)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %22 unwind label %31

22:                                               ; preds = %0
  %23 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %24 unwind label %33

24:                                               ; preds = %22
  store i32 0, ptr %23, align 4, !tbaa !8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %25 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %26 unwind label %36

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 1, ptr %4, align 4, !tbaa !8
  %27 = load i32, ptr @n, align 4, !tbaa !8
  %.not97 = icmp slt i32 %27, 1
  br i1 %.not97, label %._crit_edge100, label %.lr.ph99

._crit_edge100:                                   ; preds = %73, %26
  %28 = phi i32 [ %27, %26 ], [ %76, %73 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %29 = load i32, ptr @m, align 4, !tbaa !8
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph116, label %._crit_edge119

31:                                               ; preds = %0
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %35

33:                                               ; preds = %22
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  br label %35

35:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  br label %198

36:                                               ; preds = %._crit_edge122, %._crit_edge119, %24
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %197

.lr.ph99:                                         ; preds = %26, %73
  %38 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %39 unwind label %46

39:                                               ; preds = %.lr.ph99
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  invoke void @_Z5splitRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.8") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %40 unwind label %48

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %41 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %42 = icmp ugt i64 %41, 2
  br i1 %42, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %51, %40
  %43 = load i32, ptr %4, align 4, !tbaa !8
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #7
  %45 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %44)
          to label %56 unwind label %66

46:                                               ; preds = %.lr.ph99
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %79

48:                                               ; preds = %39
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %78

.lr.ph:                                           ; preds = %40, %51
  %indvars.iv = phi i64 [ %indvars.iv.next, %51 ], [ 2, %40 ]
  %50 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #7
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(32) %50)
          to label %51 unwind label %54

51:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %53 = icmp ugt i64 %52, %indvars.iv.next
  br i1 %53, label %.lr.ph, label %._crit_edge, !llvm.loop !11

54:                                               ; preds = %.lr.ph
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %77

56:                                               ; preds = %._crit_edge
  store i32 %43, ptr %45, align 4, !tbaa !8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @var, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %57 unwind label %66

57:                                               ; preds = %56
  %58 = call noundef i64 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %59 = icmp eq i64 %58, 1
  br i1 %59, label %60, label %68

60:                                               ; preds = %57
  %61 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #7
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [5010 x %"class.std::__cxx11::basic_string"], ptr @_Z3conB5cxx11, i64 0, i64 %63
  %65 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %64, ptr noundef nonnull align 8 dereferenceable(32) %61)
          to label %73 unwind label %66

66:                                               ; preds = %68, %60, %56, %._crit_edge
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %77

68:                                               ; preds = %57
  %69 = load i32, ptr %4, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %70
  %72 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %73 unwind label %66

73:                                               ; preds = %68, %60
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  %74 = load i32, ptr %4, align 4, !tbaa !8
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %4, align 4, !tbaa !8
  %76 = load i32, ptr @n, align 4, !tbaa !8
  %.not.not = icmp slt i32 %74, %76
  br i1 %.not.not, label %.lr.ph99, label %._crit_edge100, !llvm.loop !13

77:                                               ; preds = %66, %54
  %.pn83 = phi { ptr, i32 } [ %55, %54 ], [ %67, %66 ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %78

78:                                               ; preds = %77, %48
  %.pn83.pn = phi { ptr, i32 } [ %.pn83, %77 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  br label %79

79:                                               ; preds = %78, %46
  %.pn83.pn.pn = phi { ptr, i32 } [ %.pn83.pn, %78 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %197

.preheader89:                                     ; preds = %167
  %80 = icmp sgt i32 %171, 0
  br i1 %80, label %.lr.ph118, label %._crit_edge119

.lr.ph116:                                        ; preds = %._crit_edge100, %167
  %81 = phi i32 [ %168, %167 ], [ %28, %._crit_edge100 ]
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %167 ], [ 0, %._crit_edge100 ]
  %.not72101 = icmp slt i32 %81, 1
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20040) @bitval, i8 0, i64 20040, i1 false)
  br i1 %.not72101, label %.thread, label %.lr.ph105

.thread:                                          ; preds = %.lr.ph116
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20040) @bitval, i8 0, i64 20040, i1 false)
  store i32 1, ptr @bitval, align 16, !tbaa !8
  br label %167

._crit_edge106:                                   ; preds = %117
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20040) @bitval, i8 0, i64 20040, i1 false)
  store i32 1, ptr @bitval, align 16, !tbaa !8
  %.not73107 = icmp slt i32 %120, 1
  br i1 %.not73107, label %._crit_edge112, label %.lr.ph111

.lr.ph105:                                        ; preds = %.lr.ph116, %117
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %117 ], [ 1, %.lr.ph116 ]
  %.067102 = phi i32 [ %119, %117 ], [ 0, %.lr.ph116 ]
  %82 = getelementptr inbounds [5010 x %"class.std::__cxx11::basic_string"], ptr @_Z3conB5cxx11, i64 0, i64 %indvars.iv125
  %83 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %82) #7
  %.not78 = icmp eq i64 %83, 0
  br i1 %.not78, label %90, label %84

84:                                               ; preds = %.lr.ph105
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %82, i64 noundef %indvars.iv131)
  %86 = load i8, ptr %85, align 1, !tbaa !14
  %87 = sext i8 %86 to i32
  %88 = add nsw i32 %87, -48
  %89 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %indvars.iv125
  store i32 %88, ptr %89, align 4, !tbaa !8
  br label %117

90:                                               ; preds = %.lr.ph105
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  %91 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %indvars.iv125
  %92 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef 1) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %92)
          to label %93 unwind label %109

93:                                               ; preds = %90
  %94 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef 0) #7
  %95 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %94)
          to label %96 unwind label %111

96:                                               ; preds = %93
  %97 = load i32, ptr %95, align 4, !tbaa !8
  %98 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef 2) #7
  %99 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %98)
          to label %100 unwind label %113

100:                                              ; preds = %96
  %101 = load i32, ptr %99, align 4, !tbaa !8
  %102 = sext i32 %97 to i64
  %103 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %102
  %104 = sext i32 %101 to i64
  %105 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %104
  %106 = invoke noundef i32 @_Z3getRiS_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 4 dereferenceable(4) %103, ptr noundef nonnull align 4 dereferenceable(4) %105, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %107 unwind label %113

107:                                              ; preds = %100
  %108 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %indvars.iv125
  store i32 %106, ptr %108, align 4, !tbaa !8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  %.pre = load i32, ptr %108, align 4, !tbaa !8
  br label %117

109:                                              ; preds = %90
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %116

111:                                              ; preds = %93
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %115

113:                                              ; preds = %100, %96
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %115

115:                                              ; preds = %113, %111
  %.pn79 = phi { ptr, i32 } [ %114, %113 ], [ %112, %111 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %116

116:                                              ; preds = %115, %109
  %.pn79.pn = phi { ptr, i32 } [ %.pn79, %115 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %197

117:                                              ; preds = %107, %84
  %118 = phi i32 [ %.pre, %107 ], [ %88, %84 ]
  %119 = add nsw i32 %118, %.067102
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %120 = load i32, ptr @n, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %.not72.not = icmp slt i64 %indvars.iv125, %121
  br i1 %.not72.not, label %.lr.ph105, label %._crit_edge106, !llvm.loop !15

._crit_edge112:                                   ; preds = %159, %._crit_edge106
  %122 = phi i32 [ %120, %._crit_edge106 ], [ %162, %159 ]
  %.066.lcssa = phi i32 [ 0, %._crit_edge106 ], [ %161, %159 ]
  %123 = icmp slt i32 %119, %.066.lcssa
  br i1 %123, label %167, label %164

.lr.ph111:                                        ; preds = %._crit_edge106, %159
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %159 ], [ 1, %._crit_edge106 ]
  %.066108 = phi i32 [ %161, %159 ], [ 0, %._crit_edge106 ]
  %124 = getelementptr inbounds [5010 x %"class.std::__cxx11::basic_string"], ptr @_Z3conB5cxx11, i64 0, i64 %indvars.iv128
  %125 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %124) #7
  %.not74 = icmp eq i64 %125, 0
  br i1 %.not74, label %132, label %126

126:                                              ; preds = %.lr.ph111
  %127 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %124, i64 noundef %indvars.iv131)
  %128 = load i8, ptr %127, align 1, !tbaa !14
  %129 = sext i8 %128 to i32
  %130 = add nsw i32 %129, -48
  %131 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %indvars.iv128
  store i32 %130, ptr %131, align 4, !tbaa !8
  br label %159

132:                                              ; preds = %.lr.ph111
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %133 = getelementptr inbounds [5010 x %"class.std::vector.8"], ptr @_Z2opB5cxx11, i64 0, i64 %indvars.iv128
  %134 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef 1) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %134)
          to label %135 unwind label %151

135:                                              ; preds = %132
  %136 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef 0) #7
  %137 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %136)
          to label %138 unwind label %153

138:                                              ; preds = %135
  %139 = load i32, ptr %137, align 4, !tbaa !8
  %140 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef 2) #7
  %141 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56) @_Z3sidB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %140)
          to label %142 unwind label %155

142:                                              ; preds = %138
  %143 = load i32, ptr %141, align 4, !tbaa !8
  %144 = sext i32 %139 to i64
  %145 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %144
  %146 = sext i32 %143 to i64
  %147 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %146
  %148 = invoke noundef i32 @_Z3getRiS_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 4 dereferenceable(4) %145, ptr noundef nonnull align 4 dereferenceable(4) %147, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %149 unwind label %155

149:                                              ; preds = %142
  %150 = getelementptr inbounds [5010 x i32], ptr @bitval, i64 0, i64 %indvars.iv128
  store i32 %148, ptr %150, align 4, !tbaa !8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %.pre141 = load i32, ptr %150, align 4, !tbaa !8
  br label %159

151:                                              ; preds = %132
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %158

153:                                              ; preds = %135
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %157

155:                                              ; preds = %142, %138
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %157

157:                                              ; preds = %155, %153
  %.pn75 = phi { ptr, i32 } [ %156, %155 ], [ %154, %153 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %158

158:                                              ; preds = %157, %151
  %.pn75.pn = phi { ptr, i32 } [ %.pn75, %157 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %197

159:                                              ; preds = %149, %126
  %160 = phi i32 [ %.pre141, %149 ], [ %130, %126 ]
  %161 = add nsw i32 %160, %.066108
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %162 = load i32, ptr @n, align 4, !tbaa !8
  %163 = sext i32 %162 to i64
  %.not73.not = icmp slt i64 %indvars.iv128, %163
  br i1 %.not73.not, label %.lr.ph111, label %._crit_edge112, !llvm.loop !16

164:                                              ; preds = %._crit_edge112
  %165 = icmp slt i32 %.066.lcssa, %119
  br i1 %165, label %167, label %166

166:                                              ; preds = %164
  br label %167

167:                                              ; preds = %.thread, %164, %._crit_edge112, %166
  %mn.sink = phi ptr [ @mn, %._crit_edge112 ], [ @mn, %164 ], [ @mx, %.thread ], [ @mx, %166 ]
  %.sink157 = phi i32 [ 0, %._crit_edge112 ], [ 1, %164 ], [ 0, %.thread ], [ 0, %166 ]
  %mx.sink = phi ptr [ @mx, %._crit_edge112 ], [ @mx, %164 ], [ @mn, %.thread ], [ @mn, %166 ]
  %.sink = phi i32 [ 1, %._crit_edge112 ], [ 0, %164 ], [ 0, %.thread ], [ 0, %166 ]
  %168 = phi i32 [ %122, %._crit_edge112 ], [ %122, %164 ], [ %81, %.thread ], [ %122, %166 ]
  %169 = getelementptr inbounds [1010 x i32], ptr %mn.sink, i64 0, i64 %indvars.iv131
  store i32 %.sink157, ptr %169, align 4, !tbaa !8
  %170 = getelementptr inbounds [1010 x i32], ptr %mx.sink, i64 0, i64 %indvars.iv131
  store i32 %.sink, ptr %170, align 4, !tbaa !8
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %171 = load i32, ptr @m, align 4, !tbaa !8
  %172 = sext i32 %171 to i64
  %173 = icmp slt i64 %indvars.iv.next132, %172
  br i1 %173, label %.lr.ph116, label %.preheader89, !llvm.loop !17

._crit_edge119:                                   ; preds = %180, %._crit_edge100, %.preheader89
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %36

.preheader:                                       ; preds = %._crit_edge119
  %175 = load i32, ptr @m, align 4, !tbaa !8
  %176 = icmp sgt i32 %175, 0
  br i1 %176, label %.lr.ph121, label %._crit_edge122

.lr.ph118:                                        ; preds = %.preheader89, %180
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %180 ], [ 0, %.preheader89 ]
  %177 = getelementptr inbounds [1010 x i32], ptr @mn, i64 0, i64 %indvars.iv134
  %178 = load i32, ptr %177, align 4, !tbaa !8
  %179 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %178)
          to label %180 unwind label %184

180:                                              ; preds = %.lr.ph118
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %181 = load i32, ptr @m, align 4, !tbaa !8
  %182 = sext i32 %181 to i64
  %183 = icmp slt i64 %indvars.iv.next135, %182
  br i1 %183, label %.lr.ph118, label %._crit_edge119, !llvm.loop !18

184:                                              ; preds = %.lr.ph118
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %197

._crit_edge122:                                   ; preds = %190, %.preheader
  %186 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %196 unwind label %36

.lr.ph121:                                        ; preds = %.preheader, %190
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %190 ], [ 0, %.preheader ]
  %187 = getelementptr inbounds [1010 x i32], ptr @mx, i64 0, i64 %indvars.iv137
  %188 = load i32, ptr %187, align 4, !tbaa !8
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %188)
          to label %190 unwind label %194

190:                                              ; preds = %.lr.ph121
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %191 = load i32, ptr @m, align 4, !tbaa !8
  %192 = sext i32 %191 to i64
  %193 = icmp slt i64 %indvars.iv.next138, %192
  br i1 %193, label %.lr.ph121, label %._crit_edge122, !llvm.loop !19

194:                                              ; preds = %.lr.ph121
  %195 = landingpad { ptr, i32 }
          cleanup
  br label %197

196:                                              ; preds = %._crit_edge122
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  ret i32 0

197:                                              ; preds = %116, %158, %194, %184, %79, %36
  %.pn83.pn.pn.pn = phi { ptr, i32 } [ %.pn83.pn.pn, %79 ], [ %185, %184 ], [ %195, %194 ], [ %37, %36 ], [ %.pn79.pn, %116 ], [ %.pn75.pn, %158 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %198

198:                                              ; preds = %197, %35
  %.pn83.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn83.pn.pn.pn, %197 ], [ %.pn, %35 ]
  resume { ptr, i32 } %.pn83.pn.pn.pn.pn
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE15max_load_factorEf(ptr noundef nonnull align 8 dereferenceable(56), float noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 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 #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEEixERSB_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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) #6

; 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 #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z3getRiS_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; 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 #1 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 dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { mustprogress 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!10, !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


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