; LLVM IR from upupming/algorithm :: AdvancedLevel_C++/1139. First Contact (30) (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::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::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::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<node, std::allocator<node>>::_Vector_impl" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl" = type { %"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.node = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@arr = external dso_local global %"class.std::unordered_map", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmp4nodeS_(i64, i64) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [10000 x %"class.std::vector"], align 16
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %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 i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::vector.8", align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %struct.node, align 4
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 240000, ptr %5) #7
  %28 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i32 0, i32 0
  %29 = getelementptr inbounds %"class.std::vector", ptr %28, i64 10000
  br label %30

30:                                               ; preds = %30, %0
  %31 = phi ptr [ %28, %0 ], [ %32, %30 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  %32 = getelementptr inbounds %"class.std::vector", ptr %31, i64 1
  %33 = icmp eq ptr %32, %29
  br i1 %33, label %34, label %30

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %100, %34
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %113

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  %41 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %42 unwind label %67

42:                                               ; preds = %40
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %44 unwind label %67

44:                                               ; preds = %42
  %45 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  %46 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  %47 = icmp eq i64 %45, %46
  br i1 %47, label %48, label %79

48:                                               ; preds = %44
  %49 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef null, i32 noundef 10)
          to label %50 unwind label %67

50:                                               ; preds = %48
  %51 = call i32 @llvm.abs.i32(i32 %49, i1 true)
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %54 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef null, i32 noundef 10)
          to label %55 unwind label %71

55:                                               ; preds = %50
  %56 = call i32 @llvm.abs.i32(i32 %54, i1 true)
  store i32 %56, ptr %11, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %57 unwind label %71

57:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  %58 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef null, i32 noundef 10)
          to label %59 unwind label %67

59:                                               ; preds = %57
  %60 = call i32 @llvm.abs.i32(i32 %58, i1 true)
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %63 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef null, i32 noundef 10)
          to label %64 unwind label %75

64:                                               ; preds = %59
  %65 = call i32 @llvm.abs.i32(i32 %63, i1 true)
  store i32 %65, ptr %12, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %66 unwind label %75

66:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %79

67:                                               ; preds = %57, %48, %42, %40
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  br label %112

71:                                               ; preds = %55, %50
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %9, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %112

75:                                               ; preds = %64, %59
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %112

79:                                               ; preds = %66, %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %80 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef null, i32 noundef 10)
          to label %81 unwind label %103

81:                                               ; preds = %79
  %82 = call i32 @llvm.abs.i32(i32 %80, i1 true)
  %83 = mul nsw i32 %82, 10000
  %84 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef null, i32 noundef 10)
          to label %85 unwind label %103

85:                                               ; preds = %81
  %86 = call i32 @llvm.abs.i32(i32 %84, i1 true)
  %87 = add nsw i32 %83, %86
  store i32 %87, ptr %13, align 4, !tbaa !5
  %88 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @arr, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %89 unwind label %103

89:                                               ; preds = %85
  store i8 1, ptr %88, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %90 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef null, i32 noundef 10)
          to label %91 unwind label %107

91:                                               ; preds = %89
  %92 = call i32 @llvm.abs.i32(i32 %90, i1 true)
  %93 = mul nsw i32 %92, 10000
  %94 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef null, i32 noundef 10)
          to label %95 unwind label %107

95:                                               ; preds = %91
  %96 = call i32 @llvm.abs.i32(i32 %94, i1 true)
  %97 = add nsw i32 %93, %96
  store i32 %97, ptr %14, align 4, !tbaa !5
  %98 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @arr, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %99 unwind label %107

99:                                               ; preds = %95
  store i8 1, ptr %98, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %6, align 4, !tbaa !5
  br label %35, !llvm.loop !11

103:                                              ; preds = %85, %81, %79
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %9, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %10, align 4
  br label %111

107:                                              ; preds = %95, %91, %89
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %9, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %111

111:                                              ; preds = %107, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %112

112:                                              ; preds = %111, %75, %71, %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %301

113:                                              ; preds = %39
  %114 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %4)
          to label %115 unwind label %121

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %287, %115
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = load i32, ptr %4, align 4, !tbaa !5
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %125, label %120

120:                                              ; preds = %116
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %292

121:                                              ; preds = %113
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %9, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %10, align 4
  br label %301

125:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %126 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %127 unwind label %140

127:                                              ; preds = %125
  %128 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %126, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %129 unwind label %140

129:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #7
  call void @_ZNSt6vectorI4nodeSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %239, %129
  %131 = load i32, ptr %20, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = load i32, ptr %17, align 4, !tbaa !5
  %134 = call i32 @llvm.abs.i32(i32 %133, i1 true)
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %135
  %137 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %136) #7
  %138 = icmp ult i64 %132, %137
  br i1 %138, label %144, label %139

139:                                              ; preds = %130
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %242

140:                                              ; preds = %127, %125
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %9, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %10, align 4
  br label %291

144:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %234, %144
  %146 = load i32, ptr %21, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = load i32, ptr %18, align 4, !tbaa !5
  %149 = call i32 @llvm.abs.i32(i32 %148, i1 true)
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %150
  %152 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %151) #7
  %153 = icmp ult i64 %147, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %145
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %238

155:                                              ; preds = %145
  %156 = load i32, ptr %17, align 4, !tbaa !5
  %157 = call i32 @llvm.abs.i32(i32 %156, i1 true)
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %158
  %160 = load i32, ptr %20, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %161) #7
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = load i32, ptr %18, align 4, !tbaa !5
  %165 = call i32 @llvm.abs.i32(i32 %164, i1 true)
  %166 = icmp eq i32 %163, %165
  br i1 %166, label %179, label %167

167:                                              ; preds = %155
  %168 = load i32, ptr %17, align 4, !tbaa !5
  %169 = call i32 @llvm.abs.i32(i32 %168, i1 true)
  %170 = load i32, ptr %18, align 4, !tbaa !5
  %171 = call i32 @llvm.abs.i32(i32 %170, i1 true)
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %172
  %174 = load i32, ptr %21, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef %175) #7
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = icmp eq i32 %169, %177
  br i1 %178, label %179, label %180

179:                                              ; preds = %167, %155
  br label %234

180:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %181 = load i32, ptr %17, align 4, !tbaa !5
  %182 = call i32 @llvm.abs.i32(i32 %181, i1 true)
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %183
  %185 = load i32, ptr %20, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %186) #7
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = mul nsw i32 %188, 10000
  %190 = load i32, ptr %18, align 4, !tbaa !5
  %191 = call i32 @llvm.abs.i32(i32 %190, i1 true)
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %192
  %194 = load i32, ptr %21, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %193, i64 noundef %195) #7
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = add nsw i32 %189, %197
  store i32 %198, ptr %22, align 4, !tbaa !5
  %199 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @arr, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %200 unwind label %225

200:                                              ; preds = %180
  %201 = load i8, ptr %199, align 1, !tbaa !9, !range !13, !noundef !14
  %202 = trunc i8 %201 to i1
  %203 = zext i1 %202 to i32
  %204 = icmp eq i32 %203, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br i1 %204, label %205, label %233

205:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %206 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 0
  %207 = load i32, ptr %17, align 4, !tbaa !5
  %208 = call i32 @llvm.abs.i32(i32 %207, i1 true)
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %209
  %211 = load i32, ptr %20, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %210, i64 noundef %212) #7
  %214 = load i32, ptr %213, align 4, !tbaa !5
  store i32 %214, ptr %206, align 4, !tbaa !15
  %215 = getelementptr inbounds %struct.node, ptr %23, i32 0, i32 1
  %216 = load i32, ptr %18, align 4, !tbaa !5
  %217 = call i32 @llvm.abs.i32(i32 %216, i1 true)
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i64 0, i64 %218
  %220 = load i32, ptr %21, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %219, i64 noundef %221) #7
  %223 = load i32, ptr %222, align 4, !tbaa !5
  store i32 %223, ptr %215, align 4, !tbaa !17
  invoke void @_ZNSt6vectorI4nodeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %224 unwind label %229

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

225:                                              ; preds = %180
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %9, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %237

229:                                              ; preds = %205
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %9, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %237

233:                                              ; preds = %224, %200
  br label %234

234:                                              ; preds = %233, %179
  %235 = load i32, ptr %21, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %21, align 4, !tbaa !5
  br label %145, !llvm.loop !18

237:                                              ; preds = %229, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %290

238:                                              ; preds = %154
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %20, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %20, align 4, !tbaa !5
  br label %130, !llvm.loop !19

242:                                              ; preds = %139
  %243 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %244 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %243, ptr %244, align 8
  %245 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %246 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %245, ptr %246, align 8
  %247 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  %248 = load ptr, ptr %247, align 8
  %249 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  %250 = load ptr, ptr %249, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr %248, ptr %250, ptr noundef @_Z3cmp4nodeS_)
          to label %251 unwind label %262

251:                                              ; preds = %242
  %252 = call noundef i64 @_ZNKSt6vectorI4nodeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %253 = trunc i64 %252 to i32
  %254 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %253)
          to label %255 unwind label %262

255:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %256

256:                                              ; preds = %279, %255
  %257 = load i32, ptr %26, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = call noundef i64 @_ZNKSt6vectorI4nodeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %260 = icmp ult i64 %258, %259
  br i1 %260, label %266, label %261

261:                                              ; preds = %256
  store i32 14, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %286

262:                                              ; preds = %251, %242
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %9, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %10, align 4
  br label %290

266:                                              ; preds = %256
  %267 = load i32, ptr %26, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %268) #7
  %270 = getelementptr inbounds %struct.node, ptr %269, i32 0, i32 0
  %271 = load i32, ptr %270, align 4, !tbaa !15
  %272 = load i32, ptr %26, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %273) #7
  %275 = getelementptr inbounds %struct.node, ptr %274, i32 0, i32 1
  %276 = load i32, ptr %275, align 4, !tbaa !17
  %277 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %271, i32 noundef %276)
          to label %278 unwind label %282

278:                                              ; preds = %266
  br label %279

279:                                              ; preds = %278
  %280 = load i32, ptr %26, align 4, !tbaa !5
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %26, align 4, !tbaa !5
  br label %256, !llvm.loop !20

282:                                              ; preds = %266
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %9, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %290

286:                                              ; preds = %261
  call void @_ZNSt6vectorI4nodeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %287

287:                                              ; preds = %286
  %288 = load i32, ptr %15, align 4, !tbaa !5
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %15, align 4, !tbaa !5
  br label %116, !llvm.loop !21

290:                                              ; preds = %282, %262, %237
  call void @_ZNSt6vectorI4nodeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  br label %291

291:                                              ; preds = %290, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %301

292:                                              ; preds = %120
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  %293 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i32 0, i32 0
  %294 = getelementptr inbounds %"class.std::vector", ptr %293, i64 10000
  br label %295

295:                                              ; preds = %295, %292
  %296 = phi ptr [ %294, %292 ], [ %297, %295 ]
  %297 = getelementptr inbounds %"class.std::vector", ptr %296, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %297) #7
  %298 = icmp eq ptr %297, %293
  br i1 %298, label %299, label %295

299:                                              ; preds = %295
  call void @llvm.lifetime.end.p0(i64 240000, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %300 = load i32, ptr %1, align 4
  ret i32 %300

301:                                              ; preds = %291, %121, %112
  %302 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %5, i32 0, i32 0
  %303 = getelementptr inbounds %"class.std::vector", ptr %302, i64 10000
  br label %304

304:                                              ; preds = %304, %301
  %305 = phi ptr [ %303, %301 ], [ %306, %304 ]
  %306 = getelementptr inbounds %"class.std::vector", ptr %305, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %306) #7
  %307 = icmp eq ptr %306, %302
  br i1 %307, label %308, label %304

308:                                              ; preds = %304
  call void @llvm.lifetime.end.p0(i64 240000, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %309

309:                                              ; preds = %308
  %310 = load ptr, ptr %9, align 8
  %311 = load i32, ptr %10, align 4
  %312 = insertvalue { ptr, i32 } poison, ptr %310, 0
  %313 = insertvalue { ptr, i32 } %312, i32 %311, 1
  resume { ptr, i32 } %313
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #5

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr, ptr, ptr noundef) #4

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

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

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

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

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS4node", !6, i64 0, !6, i64 4}
!17 = !{!16, !6, i64 4}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !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::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::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<node, std::allocator<node>>::_Vector_impl" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl" = type { %"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.node = type { i32, i32 }

@arr = external dso_local global %"class.std::unordered_map", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z3cmp4nodeS_(i64, i64) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [10000 x %"class.std::vector"], align 16
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector.8", align 8
  %14 = alloca i32, align 4
  %15 = alloca %struct.node, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 240000, ptr nonnull %4) #8
  br label %17

17:                                               ; preds = %17, %0
  %.idx = phi i64 [ 0, %0 ], [ %.add, %17 ]
  %.ptr = getelementptr inbounds i8, ptr %4, i64 %.idx
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr) #8
  %.add = add nuw nsw i64 %.idx, 24
  %18 = icmp eq i64 %.add, 240000
  br i1 %18, label %.preheader48, label %17

.preheader48:                                     ; preds = %17
  %19 = getelementptr inbounds i8, ptr %4, i64 240000
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %78, %.preheader48
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %3)
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph61, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge58, %._crit_edge
  br label %.preheader

.lr.ph61:                                         ; preds = %._crit_edge
  %25 = getelementptr inbounds i8, ptr %15, i64 4
  br label %88

.lr.ph:                                           ; preds = %.preheader48, %78
  %.02149 = phi i32 [ %79, %78 ], [ 0, %.preheader48 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  %26 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %27 unwind label %52

27:                                               ; preds = %.lr.ph
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %29 unwind label %52

29:                                               ; preds = %27
  %30 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  %31 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  %32 = icmp eq i64 %30, %31
  br i1 %32, label %33, label %58

33:                                               ; preds = %29
  %34 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef null, i32 noundef 10)
          to label %35 unwind label %52

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %36 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef null, i32 noundef 10)
          to label %37 unwind label %54

37:                                               ; preds = %35
  %38 = call i32 @llvm.abs.i32(i32 %34, i1 true)
  %39 = zext nneg i32 %38 to i64
  %40 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %39
  %41 = call i32 @llvm.abs.i32(i32 %36, i1 true)
  store i32 %41, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %42 unwind label %54

42:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %43 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef null, i32 noundef 10)
          to label %44 unwind label %52

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %45 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef null, i32 noundef 10)
          to label %46 unwind label %56

46:                                               ; preds = %44
  %47 = call i32 @llvm.abs.i32(i32 %43, i1 true)
  %48 = zext nneg i32 %47 to i64
  %49 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %48
  %50 = call i32 @llvm.abs.i32(i32 %45, i1 true)
  store i32 %50, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %51 unwind label %56

51:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %58

52:                                               ; preds = %42, %33, %27, %.lr.ph
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %87

54:                                               ; preds = %37, %35
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %87

56:                                               ; preds = %46, %44
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %87

58:                                               ; preds = %51, %29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %59 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef null, i32 noundef 10)
          to label %60 unwind label %82

60:                                               ; preds = %58
  %61 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef null, i32 noundef 10)
          to label %62 unwind label %82

62:                                               ; preds = %60
  %63 = call i32 @llvm.abs.i32(i32 %59, i1 true)
  %64 = mul nuw nsw i32 %63, 10000
  %65 = call i32 @llvm.abs.i32(i32 %61, i1 true)
  %66 = add nuw nsw i32 %65, %64
  store i32 %66, ptr %9, align 4, !tbaa !5
  %67 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @arr, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %68 unwind label %82

68:                                               ; preds = %62
  store i8 1, ptr %67, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %69 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef null, i32 noundef 10)
          to label %70 unwind label %84

70:                                               ; preds = %68
  %71 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef null, i32 noundef 10)
          to label %72 unwind label %84

72:                                               ; preds = %70
  %73 = call i32 @llvm.abs.i32(i32 %69, i1 true)
  %74 = mul nuw nsw i32 %73, 10000
  %75 = call i32 @llvm.abs.i32(i32 %71, i1 true)
  %76 = add nuw nsw i32 %75, %74
  store i32 %76, ptr %10, align 4, !tbaa !5
  %77 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @arr, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %78 unwind label %84

78:                                               ; preds = %72
  store i8 1, ptr %77, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  %79 = add nuw nsw i32 %.02149, 1
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %.lr.ph, label %._crit_edge, !llvm.loop !11

82:                                               ; preds = %62, %60, %58
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %86

84:                                               ; preds = %72, %70, %68
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %86

86:                                               ; preds = %84, %82
  %.pn43 = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %87

87:                                               ; preds = %86, %56, %54, %52
  %.pn43.pn = phi { ptr, i32 } [ %.pn43, %86 ], [ %57, %56 ], [ %53, %52 ], [ %55, %54 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %198

88:                                               ; preds = %.lr.ph61, %._crit_edge58
  %.02459 = phi i32 [ 0, %.lr.ph61 ], [ %179, %._crit_edge58 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %89 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %90 unwind label %105

90:                                               ; preds = %88
  %91 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %89, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %92 unwind label %105

92:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  call void @_ZNSt6vectorI4nodeSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = call i32 @llvm.abs.i32(i32 %93, i1 true)
  %95 = zext nneg i32 %94 to i64
  %96 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %95
  %97 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #8
  %.not = icmp eq i64 %97, 0
  br i1 %.not, label %._crit_edge54, label %.preheader47

.preheader47:                                     ; preds = %92, %._crit_edge52
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %._crit_edge52 ], [ 0, %92 ]
  %98 = load i32, ptr %12, align 4, !tbaa !5
  %99 = call i32 @llvm.abs.i32(i32 %98, i1 true)
  %100 = zext nneg i32 %99 to i64
  %101 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %100
  %102 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #8
  %.not62 = icmp eq i64 %102, 0
  br i1 %.not62, label %._crit_edge52, label %.lr.ph51

._crit_edge54:                                    ; preds = %._crit_edge52, %92
  %103 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %104 = call ptr @_ZNSt6vectorI4nodeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4nodeSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr %103, ptr %104, ptr noundef nonnull @_Z3cmp4nodeS_)
          to label %174 unwind label %182

105:                                              ; preds = %90, %88
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %193

._crit_edge52:                                    ; preds = %167, %.preheader47
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %107 = load i32, ptr %11, align 4, !tbaa !5
  %108 = call i32 @llvm.abs.i32(i32 %107, i1 true)
  %109 = zext nneg i32 %108 to i64
  %110 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %109
  %111 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #8
  %112 = icmp ugt i64 %111, %indvars.iv.next66
  br i1 %112, label %.preheader47, label %._crit_edge54, !llvm.loop !13

.lr.ph51:                                         ; preds = %.preheader47, %167
  %indvars.iv = phi i64 [ %indvars.iv.next, %167 ], [ 0, %.preheader47 ]
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = call i32 @llvm.abs.i32(i32 %113, i1 true)
  %115 = zext nneg i32 %114 to i64
  %116 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %115
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef %indvars.iv65) #8
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = call i32 @llvm.abs.i32(i32 %119, i1 true)
  %121 = icmp eq i32 %118, %120
  br i1 %121, label %167, label %122

122:                                              ; preds = %.lr.ph51
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = call i32 @llvm.abs.i32(i32 %123, i1 true)
  %125 = zext nneg i32 %120 to i64
  %126 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %125
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %indvars.iv) #8
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = icmp eq i32 %124, %128
  br i1 %129, label %167, label %130

130:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  %131 = load i32, ptr %11, align 4, !tbaa !5
  %132 = call i32 @llvm.abs.i32(i32 %131, i1 true)
  %133 = zext nneg i32 %132 to i64
  %134 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %133
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %indvars.iv65) #8
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = mul nsw i32 %136, 10000
  %138 = load i32, ptr %12, align 4, !tbaa !5
  %139 = call i32 @llvm.abs.i32(i32 %138, i1 true)
  %140 = zext nneg i32 %139 to i64
  %141 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %140
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef %indvars.iv) #8
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = add nsw i32 %143, %137
  store i32 %144, ptr %14, align 4, !tbaa !5
  %145 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @arr, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %146 unwind label %163

146:                                              ; preds = %130
  %147 = load i8, ptr %145, align 1, !tbaa !9, !range !14, !noundef !15
  %148 = trunc nuw i8 %147 to i1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br i1 %148, label %149, label %167

149:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = call i32 @llvm.abs.i32(i32 %150, i1 true)
  %152 = zext nneg i32 %151 to i64
  %153 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %152
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %indvars.iv65) #8
  %155 = load i32, ptr %154, align 4, !tbaa !5
  store i32 %155, ptr %15, align 4, !tbaa !16
  %156 = load i32, ptr %12, align 4, !tbaa !5
  %157 = call i32 @llvm.abs.i32(i32 %156, i1 true)
  %158 = zext nneg i32 %157 to i64
  %159 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %158
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %indvars.iv) #8
  %161 = load i32, ptr %160, align 4, !tbaa !5
  store i32 %161, ptr %25, align 4, !tbaa !18
  invoke void @_ZNSt6vectorI4nodeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(8) %15)
          to label %162 unwind label %165

162:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %167

163:                                              ; preds = %130
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br label %192

165:                                              ; preds = %149
  %166 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %192

167:                                              ; preds = %146, %162, %.lr.ph51, %122
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %168 = load i32, ptr %12, align 4, !tbaa !5
  %169 = call i32 @llvm.abs.i32(i32 %168, i1 true)
  %170 = zext nneg i32 %169 to i64
  %171 = getelementptr inbounds [10000 x %"class.std::vector"], ptr %4, i64 0, i64 %170
  %172 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %171) #8
  %173 = icmp ugt i64 %172, %indvars.iv.next
  br i1 %173, label %.lr.ph51, label %._crit_edge52, !llvm.loop !19

174:                                              ; preds = %._crit_edge54
  %175 = call noundef i64 @_ZNKSt6vectorI4nodeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %176 = trunc i64 %175 to i32
  %177 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %176)
  %178 = call noundef i64 @_ZNKSt6vectorI4nodeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %.not63 = icmp eq i64 %178, 0
  br i1 %.not63, label %._crit_edge58, label %.lr.ph57

._crit_edge58:                                    ; preds = %.lr.ph57, %174
  call void @_ZNSt6vectorI4nodeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %179 = add nuw nsw i32 %.02459, 1
  %180 = load i32, ptr %3, align 4, !tbaa !5
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %88, label %.preheader.preheader, !llvm.loop !20

182:                                              ; preds = %._crit_edge54
  %183 = landingpad { ptr, i32 }
          cleanup
  br label %192

.lr.ph57:                                         ; preds = %174, %.lr.ph57
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph57 ], [ 0, %174 ]
  %184 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %indvars.iv68) #8
  %185 = load i32, ptr %184, align 4, !tbaa !16
  %186 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %indvars.iv68) #8
  %187 = getelementptr inbounds i8, ptr %186, i64 4
  %188 = load i32, ptr %187, align 4, !tbaa !18
  %189 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %185, i32 noundef %188)
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %190 = call noundef i64 @_ZNKSt6vectorI4nodeSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %191 = icmp ugt i64 %190, %indvars.iv.next69
  br i1 %191, label %.lr.ph57, label %._crit_edge58, !llvm.loop !21

192:                                              ; preds = %163, %165, %182
  %.pn.pn = phi { ptr, i32 } [ %183, %182 ], [ %166, %165 ], [ %164, %163 ]
  call void @_ZNSt6vectorI4nodeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %193

193:                                              ; preds = %192, %105
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %192 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %198

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %194 = phi ptr [ %195, %.preheader ], [ %19, %.preheader.preheader ]
  %195 = getelementptr inbounds i8, ptr %194, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %195) #8
  %196 = icmp eq ptr %195, %4
  br i1 %196, label %197, label %.preheader

197:                                              ; preds = %.preheader
  call void @llvm.lifetime.end.p0(i64 240000, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

198:                                              ; preds = %193, %87
  %.pn43.pn.pn = phi { ptr, i32 } [ %.pn43.pn, %87 ], [ %.pn.pn.pn, %193 ]
  br label %199

199:                                              ; preds = %199, %198
  %200 = phi ptr [ %19, %198 ], [ %201, %199 ]
  %201 = getelementptr inbounds i8, ptr %200, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %201) #8
  %202 = icmp eq ptr %201, %4
  br i1 %202, label %203, label %199

203:                                              ; preds = %199
  call void @llvm.lifetime.end.p0(i64 240000, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn43.pn.pn
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

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

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 nounwind uwtable
declare dso_local void @_ZNSt6vectorI4nodeSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI4nodeSaIS0_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 4 dereferenceable(8) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS4node", !6, i64 0, !6, i64 4}
!18 = !{!17, !6, i64 4}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass