; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/LONG/AUG15/DCGAME (A)

; 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<std::pair<int, long long>, std::allocator<std::pair<int, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, long long>, std::allocator<std::pair<int, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, long long>, std::allocator<std::pair<int, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, long long>, std::allocator<std::pair<int, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i32, i64 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [1001000 x i32], align 16
@l = external dso_local global [1001000 x i32], align 16
@r = external dso_local global [1001000 x i32], align 16
@s = external dso_local global [1001000 x i32], align 16
@tp = external dso_local global i32, align 4
@cnt = external dso_local global %"class.std::unordered_map", align 8
@gcnt = external dso_local global %"class.std::vector", align 8
@lcnt = external dso_local global %"class.std::vector", align 8
@tmp = external dso_local global %"class.std::vector", align 8
@it = external dso_local global %"class.__gnu_cxx::__normal_iterator", align 8
@tmpp = external dso_local global i64, align 8
@INF = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca i64, align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca i8, align 1
  %24 = alloca i8, align 1
  %25 = alloca i32, align 4
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"struct.std::pair", align 8
  %30 = alloca i64, align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %36 = alloca %"struct.std::pair", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %49, %0
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %52

44:                                               ; preds = %39
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %46
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %47)
  br label %49

49:                                               ; preds = %44
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %2, align 4, !tbaa !5
  br label %39, !llvm.loop !9

52:                                               ; preds = %43
  store i32 -1, ptr @l, align 16, !tbaa !5
  store i32 0, ptr @s, align 16, !tbaa !5
  store i32 0, ptr @tp, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %101, %52
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %104

58:                                               ; preds = %53
  br label %59

59:                                               ; preds = %77, %58
  %60 = load i32, ptr @tp, align 4, !tbaa !5
  %61 = icmp sge i32 %60, 0
  br i1 %61, label %62, label %75

62:                                               ; preds = %59
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr @tp, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = icmp sgt i32 %66, %73
  br label %75

75:                                               ; preds = %62, %59
  %76 = phi i1 [ false, %59 ], [ %74, %62 ]
  br i1 %76, label %77, label %80

77:                                               ; preds = %75
  %78 = load i32, ptr @tp, align 4, !tbaa !5
  %79 = add nsw i32 %78, -1
  store i32 %79, ptr @tp, align 4, !tbaa !5
  br label %59, !llvm.loop !11

80:                                               ; preds = %75
  %81 = load i32, ptr @tp, align 4, !tbaa !5
  %82 = icmp sge i32 %81, 0
  br i1 %82, label %83, label %91

83:                                               ; preds = %80
  %84 = load i32, ptr @tp, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = load i32, ptr %3, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1001000 x i32], ptr @l, i64 0, i64 %89
  store i32 %87, ptr %90, align 4, !tbaa !5
  br label %95

91:                                               ; preds = %80
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1001000 x i32], ptr @l, i64 0, i64 %93
  store i32 -1, ptr %94, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %91, %83
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = load i32, ptr @tp, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr @tp, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %99
  store i32 %96, ptr %100, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %95
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %3, align 4, !tbaa !5
  br label %53, !llvm.loop !12

104:                                              ; preds = %57
  %105 = load i32, ptr @n, align 4, !tbaa !5
  %106 = load i32, ptr @n, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1001000 x i32], ptr @r, i64 0, i64 %108
  store i32 %105, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr @n, align 4, !tbaa !5
  %111 = sub nsw i32 %110, 1
  store i32 %111, ptr @s, align 16, !tbaa !5
  store i32 0, ptr @tp, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %112 = load i32, ptr @n, align 4, !tbaa !5
  %113 = sub nsw i32 %112, 2
  store i32 %113, ptr %4, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %162, %104
  %115 = load i32, ptr %4, align 4, !tbaa !5
  %116 = icmp sge i32 %115, 0
  br i1 %116, label %118, label %117

117:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %165

118:                                              ; preds = %114
  br label %119

119:                                              ; preds = %137, %118
  %120 = load i32, ptr @tp, align 4, !tbaa !5
  %121 = icmp sge i32 %120, 0
  br i1 %121, label %122, label %135

122:                                              ; preds = %119
  %123 = load i32, ptr %4, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = load i32, ptr @tp, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = icmp sge i32 %126, %133
  br label %135

135:                                              ; preds = %122, %119
  %136 = phi i1 [ false, %119 ], [ %134, %122 ]
  br i1 %136, label %137, label %140

137:                                              ; preds = %135
  %138 = load i32, ptr @tp, align 4, !tbaa !5
  %139 = add nsw i32 %138, -1
  store i32 %139, ptr @tp, align 4, !tbaa !5
  br label %119, !llvm.loop !13

140:                                              ; preds = %135
  %141 = load i32, ptr @tp, align 4, !tbaa !5
  %142 = icmp sge i32 %141, 0
  br i1 %142, label %143, label %151

143:                                              ; preds = %140
  %144 = load i32, ptr @tp, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1001000 x i32], ptr @r, i64 0, i64 %149
  store i32 %147, ptr %150, align 4, !tbaa !5
  br label %156

151:                                              ; preds = %140
  %152 = load i32, ptr @n, align 4, !tbaa !5
  %153 = load i32, ptr %4, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [1001000 x i32], ptr @r, i64 0, i64 %154
  store i32 %152, ptr %155, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %151, %143
  %157 = load i32, ptr %4, align 4, !tbaa !5
  %158 = load i32, ptr @tp, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr @tp, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %160
  store i32 %157, ptr %161, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %156
  %163 = load i32, ptr %4, align 4, !tbaa !5
  %164 = add nsw i32 %163, -1
  store i32 %164, ptr %4, align 4, !tbaa !5
  br label %114, !llvm.loop !14

165:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %193, %165
  %167 = load i32, ptr %5, align 4, !tbaa !5
  %168 = load i32, ptr @n, align 4, !tbaa !5
  %169 = icmp slt i32 %167, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %166
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %196

171:                                              ; preds = %166
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [1001000 x i32], ptr @r, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = load i32, ptr %5, align 4, !tbaa !5
  %177 = sub nsw i32 %175, %176
  %178 = sext i32 %177 to i64
  %179 = load i32, ptr %5, align 4, !tbaa !5
  %180 = load i32, ptr %5, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [1001000 x i32], ptr @l, i64 0, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sub nsw i32 %179, %183
  %185 = sext i32 %184 to i64
  %186 = mul nsw i64 %178, %185
  %187 = load i32, ptr %5, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %188
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cnt, ptr noundef nonnull align 4 dereferenceable(4) %189)
  %191 = load i64, ptr %190, align 8, !tbaa !15
  %192 = add nsw i64 %191, %186
  store i64 %192, ptr %190, align 8, !tbaa !15
  br label %193

193:                                              ; preds = %171
  %194 = load i32, ptr %5, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %5, align 4, !tbaa !5
  br label %166, !llvm.loop !17

196:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %197 = call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) @cnt) #8
  %198 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %6, i32 0, i32 0
  %199 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %198, i32 0, i32 0
  store ptr %197, ptr %199, align 8
  br label %200

200:                                              ; preds = %208, %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %201 = call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @cnt) #8
  %202 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %7, i32 0, i32 0
  %203 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %202, i32 0, i32 0
  store ptr %201, ptr %203, align 8
  %204 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKixELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br i1 %204, label %206, label %205

205:                                              ; preds = %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %212

206:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %207 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @_ZNSt4pairIixEC2IKixTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairIS4_S5_EEclsr6_PCCFPIS4_S5_EE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKS_IS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %207)
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @tmp, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  br label %208

208:                                              ; preds = %206
  %209 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0) #8
  %210 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %9, i32 0, i32 0
  %211 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %210, i32 0, i32 0
  store ptr %209, ptr %211, align 8
  br label %200, !llvm.loop !18

212:                                              ; preds = %205
  %213 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #8
  %214 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %213, ptr %214, align 8
  %215 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #8
  %216 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %215, ptr %216, align 8
  %217 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8
  %219 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %218, ptr %220)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %221 = call noundef i64 @_ZNKSt6vectorISt4pairIixESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #8
  %222 = trunc i64 %221 to i32
  store i32 %222, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  %223 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef 0) #8
  %224 = getelementptr inbounds %"struct.std::pair", ptr %223, i32 0, i32 0
  %225 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef 0) #8
  %226 = getelementptr inbounds %"struct.std::pair", ptr %225, i32 0, i32 1
  %227 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %224, ptr noundef nonnull align 8 dereferenceable(8) %226)
  %228 = getelementptr inbounds { i32, i64 }, ptr %13, i32 0, i32 0
  %229 = extractvalue { i32, i64 } %227, 0
  store i32 %229, ptr %228, align 8
  %230 = getelementptr inbounds { i32, i64 }, ptr %13, i32 0, i32 1
  %231 = extractvalue { i32, i64 } %227, 1
  store i64 %231, ptr %230, align 8
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @lcnt, ptr noundef nonnull align 8 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %232

232:                                              ; preds = %259, %212
  %233 = load i32, ptr %14, align 4, !tbaa !5
  %234 = load i32, ptr %12, align 4, !tbaa !5
  %235 = icmp slt i32 %233, %234
  br i1 %235, label %237, label %236

236:                                              ; preds = %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %262

237:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %238 = load i32, ptr %14, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %239) #8
  %241 = getelementptr inbounds %"struct.std::pair", ptr %240, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %242 = load i32, ptr %14, align 4, !tbaa !5
  %243 = sub nsw i32 %242, 1
  %244 = sext i32 %243 to i64
  %245 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lcnt, i64 noundef %244) #8
  %246 = getelementptr inbounds %"struct.std::pair", ptr %245, i32 0, i32 1
  %247 = load i64, ptr %246, align 8, !tbaa !19
  %248 = load i32, ptr %14, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %249) #8
  %251 = getelementptr inbounds %"struct.std::pair", ptr %250, i32 0, i32 1
  %252 = load i64, ptr %251, align 8, !tbaa !19
  %253 = add nsw i64 %247, %252
  store i64 %253, ptr %16, align 8, !tbaa !15
  %254 = call { i32, i64 } @_ZSt9make_pairIRixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %241, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %255 = getelementptr inbounds { i32, i64 }, ptr %15, i32 0, i32 0
  %256 = extractvalue { i32, i64 } %254, 0
  store i32 %256, ptr %255, align 8
  %257 = getelementptr inbounds { i32, i64 }, ptr %15, i32 0, i32 1
  %258 = extractvalue { i32, i64 } %254, 1
  store i64 %258, ptr %257, align 8
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @lcnt, ptr noundef nonnull align 8 dereferenceable(16) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  br label %259

259:                                              ; preds = %237
  %260 = load i32, ptr %14, align 4, !tbaa !5
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %14, align 4, !tbaa !5
  br label %232, !llvm.loop !21

262:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  %263 = load i32, ptr %12, align 4, !tbaa !5
  %264 = sub nsw i32 %263, 1
  %265 = sext i32 %264 to i64
  %266 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %265) #8
  %267 = getelementptr inbounds %"struct.std::pair", ptr %266, i32 0, i32 0
  %268 = load i32, ptr %12, align 4, !tbaa !5
  %269 = sub nsw i32 %268, 1
  %270 = sext i32 %269 to i64
  %271 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %270) #8
  %272 = getelementptr inbounds %"struct.std::pair", ptr %271, i32 0, i32 1
  %273 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %267, ptr noundef nonnull align 8 dereferenceable(8) %272)
  %274 = getelementptr inbounds { i32, i64 }, ptr %17, i32 0, i32 0
  %275 = extractvalue { i32, i64 } %273, 0
  store i32 %275, ptr %274, align 8
  %276 = getelementptr inbounds { i32, i64 }, ptr %17, i32 0, i32 1
  %277 = extractvalue { i32, i64 } %273, 1
  store i64 %277, ptr %276, align 8
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @gcnt, ptr noundef nonnull align 8 dereferenceable(16) %17)
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %278 = load i32, ptr %12, align 4, !tbaa !5
  %279 = sub nsw i32 %278, 2
  store i32 %279, ptr %18, align 4, !tbaa !5
  br label %280

280:                                              ; preds = %308, %262
  %281 = load i32, ptr %18, align 4, !tbaa !5
  %282 = icmp sge i32 %281, 0
  br i1 %282, label %284, label %283

283:                                              ; preds = %280
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %311

284:                                              ; preds = %280
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #8
  %285 = load i32, ptr %18, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %286) #8
  %288 = getelementptr inbounds %"struct.std::pair", ptr %287, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %289 = load i32, ptr %12, align 4, !tbaa !5
  %290 = load i32, ptr %18, align 4, !tbaa !5
  %291 = sub nsw i32 %289, %290
  %292 = sub nsw i32 %291, 2
  %293 = sext i32 %292 to i64
  %294 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gcnt, i64 noundef %293) #8
  %295 = getelementptr inbounds %"struct.std::pair", ptr %294, i32 0, i32 1
  %296 = load i64, ptr %295, align 8, !tbaa !19
  %297 = load i32, ptr %18, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %298) #8
  %300 = getelementptr inbounds %"struct.std::pair", ptr %299, i32 0, i32 1
  %301 = load i64, ptr %300, align 8, !tbaa !19
  %302 = add nsw i64 %296, %301
  store i64 %302, ptr %20, align 8, !tbaa !15
  %303 = call { i32, i64 } @_ZSt9make_pairIRixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %288, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %304 = getelementptr inbounds { i32, i64 }, ptr %19, i32 0, i32 0
  %305 = extractvalue { i32, i64 } %303, 0
  store i32 %305, ptr %304, align 8
  %306 = getelementptr inbounds { i32, i64 }, ptr %19, i32 0, i32 1
  %307 = extractvalue { i32, i64 } %303, 1
  store i64 %307, ptr %306, align 8
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @gcnt, ptr noundef nonnull align 8 dereferenceable(16) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  br label %308

308:                                              ; preds = %284
  %309 = load i32, ptr %18, align 4, !tbaa !5
  %310 = add nsw i32 %309, -1
  store i32 %310, ptr %18, align 4, !tbaa !5
  br label %280, !llvm.loop !22

311:                                              ; preds = %283
  %312 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #8
  %313 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %312, ptr %313, align 8
  %314 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #8
  %315 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %314, ptr %315, align 8
  %316 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %317 = load ptr, ptr %316, align 8
  %318 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %319 = load ptr, ptr %318, align 8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %317, ptr %319)
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  br label %320

320:                                              ; preds = %406, %311
  %321 = load i32, ptr @m, align 4, !tbaa !5
  %322 = add nsw i32 %321, -1
  store i32 %322, ptr @m, align 4, !tbaa !5
  %323 = icmp ne i32 %321, 0
  br i1 %323, label %324, label %407

324:                                              ; preds = %320
  %325 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %23, ptr noundef %25, ptr noundef %24)
  %326 = load i8, ptr %23, align 1, !tbaa !23
  %327 = sext i8 %326 to i32
  %328 = icmp eq i32 %327, 61
  br i1 %328, label %329, label %332

329:                                              ; preds = %324
  %330 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cnt, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %331 = load i64, ptr %330, align 8, !tbaa !15
  store i64 %331, ptr @tmpp, align 8, !tbaa !15
  br label %389

332:                                              ; preds = %324
  %333 = load i8, ptr %23, align 1, !tbaa !23
  %334 = sext i8 %333 to i32
  %335 = icmp eq i32 %334, 60
  br i1 %335, label %336, label %363

336:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %337 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @lcnt) #8
  %338 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %337, ptr %338, align 8
  %339 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @lcnt) #8
  %340 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %339, ptr %340, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  store i64 -1, ptr %30, align 8, !tbaa !15
  %341 = call { i32, i64 } @_ZSt9make_pairIRixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %342 = getelementptr inbounds { i32, i64 }, ptr %29, i32 0, i32 0
  %343 = extractvalue { i32, i64 } %341, 0
  store i32 %343, ptr %342, align 8
  %344 = getelementptr inbounds { i32, i64 }, ptr %29, i32 0, i32 1
  %345 = extractvalue { i32, i64 } %341, 1
  store i64 %345, ptr %344, align 8
  %346 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  %347 = load ptr, ptr %346, align 8
  %348 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  %349 = load ptr, ptr %348, align 8
  %350 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %347, ptr %349, ptr noundef nonnull align 8 dereferenceable(16) %29)
  %351 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %350, ptr %351, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @it, ptr align 8 %26, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %352 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @lcnt) #8
  %353 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %352, ptr %353, align 8
  %354 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairIixESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) @it, ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br i1 %354, label %355, label %356

355:                                              ; preds = %336
  store i64 0, ptr @tmpp, align 8, !tbaa !15
  br label %362

356:                                              ; preds = %336
  %357 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS2_SaIS2_EEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) @it, i32 noundef 0) #8
  %358 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %357, ptr %358, align 8
  %359 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) @it) #8
  %360 = getelementptr inbounds %"struct.std::pair", ptr %359, i32 0, i32 1
  %361 = load i64, ptr %360, align 8, !tbaa !19
  store i64 %361, ptr @tmpp, align 8, !tbaa !15
  br label %362

362:                                              ; preds = %356, %355
  br label %388

363:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %364 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #8
  %365 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %364, ptr %365, align 8
  %366 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #8
  %367 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %35, i32 0, i32 0
  store ptr %366, ptr %367, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  %368 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 8 dereferenceable(8) @INF)
  %369 = getelementptr inbounds { i32, i64 }, ptr %36, i32 0, i32 0
  %370 = extractvalue { i32, i64 } %368, 0
  store i32 %370, ptr %369, align 8
  %371 = getelementptr inbounds { i32, i64 }, ptr %36, i32 0, i32 1
  %372 = extractvalue { i32, i64 } %368, 1
  store i64 %372, ptr %371, align 8
  %373 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  %374 = load ptr, ptr %373, align 8
  %375 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %35, i32 0, i32 0
  %376 = load ptr, ptr %375, align 8
  %377 = call ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %374, ptr %376, ptr noundef nonnull align 8 dereferenceable(16) %36)
  %378 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %377, ptr %378, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @it, ptr align 8 %33, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %379 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #8
  %380 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  store ptr %379, ptr %380, align 8
  %381 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairIixESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) @it, ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br i1 %381, label %382, label %383

382:                                              ; preds = %363
  store i64 0, ptr @tmpp, align 8, !tbaa !15
  br label %387

383:                                              ; preds = %363
  %384 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) @it) #8
  %385 = getelementptr inbounds %"struct.std::pair", ptr %384, i32 0, i32 1
  %386 = load i64, ptr %385, align 8, !tbaa !19
  store i64 %386, ptr @tmpp, align 8, !tbaa !15
  br label %387

387:                                              ; preds = %383, %382
  br label %388

388:                                              ; preds = %387, %362
  br label %389

389:                                              ; preds = %388, %329
  %390 = load i64, ptr @tmpp, align 8, !tbaa !15
  %391 = and i64 %390, 1
  %392 = icmp eq i64 %391, 0
  br i1 %392, label %393, label %402

393:                                              ; preds = %389
  %394 = load i8, ptr %24, align 1, !tbaa !23
  %395 = sext i8 %394 to i32
  %396 = icmp eq i32 %395, 68
  br i1 %396, label %397, label %399

397:                                              ; preds = %393
  %398 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %401

399:                                              ; preds = %393
  %400 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %401

401:                                              ; preds = %399, %397
  br label %406

402:                                              ; preds = %389
  %403 = load i8, ptr %24, align 1, !tbaa !23
  %404 = sext i8 %403 to i32
  %405 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %404)
  br label %406

406:                                              ; preds = %402, %401
  br label %320, !llvm.loop !27

407:                                              ; preds = %320
  %408 = call i32 @puts(ptr noundef @.str.10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  ret i32 0
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIixEC2IKixTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairIS4_S5_EEclsr6_PCCFPIS4_S5_EE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKS_IS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, i64 } @_ZSt9make_pairIRixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS2_SaIS2_EEEmmEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4 align 2

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

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

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

declare i32 @puts(ptr noundef) #1

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 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 = { 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 #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: readwrite) }
attributes #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!20, !16, i64 8}
!20 = !{!"_ZTSSt4pairIixE", !6, i64 0, !16, i64 8}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = !{!7, !7, i64 0}
!24 = !{i64 0, i64 8, !25}
!25 = !{!26, !26, i64 0}
!26 = !{!"any pointer", !7, i64 0}
!27 = distinct !{!27, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::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<std::pair<int, long long>, std::allocator<std::pair<int, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, long long>, std::allocator<std::pair<int, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, long long>, std::allocator<std::pair<int, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, long long>, std::allocator<std::pair<int, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i32, i64 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [1001000 x i32], align 16
@l = external dso_local local_unnamed_addr global [1001000 x i32], align 16
@r = external dso_local local_unnamed_addr global [1001000 x i32], align 16
@s = external dso_local local_unnamed_addr global [1001000 x i32], align 16
@tp = external dso_local local_unnamed_addr global i32, align 4
@cnt = external dso_local global %"class.std::unordered_map", align 8
@gcnt = external dso_local global %"class.std::vector", align 8
@lcnt = external dso_local global %"class.std::vector", align 8
@tmp = external dso_local global %"class.std::vector", align 8
@it = external dso_local global %"class.__gnu_cxx::__normal_iterator", align 8
@tmpp = external dso_local local_unnamed_addr global i64, align 8
@INF = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %2 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  store i32 -1, ptr @l, align 16, !tbaa !5
  br label %.thread

._crit_edge:                                      ; preds = %.lr.ph
  store i32 -1, ptr @l, align 16, !tbaa !5
  store i32 0, ptr @s, align 16, !tbaa !5
  %21 = icmp sgt i32 %24, 1
  br i1 %21, label %thread-pre-split.preheader, label %.thread

thread-pre-split.preheader:                       ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %24 to i64
  br label %thread-pre-split

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %22 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %indvars.iv
  %23 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %22)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %indvars.iv.next, %25
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.thread:                                          ; preds = %._crit_edge.thread, %._crit_edge
  %.ph130 = phi i32 [ %24, %._crit_edge ], [ %19, %._crit_edge.thread ]
  %27 = add nsw i32 %.ph130, -1
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [1001000 x i32], ptr @r, i64 0, i64 %28
  store i32 %.ph130, ptr %29, align 4, !tbaa !5
  store i32 %27, ptr @s, align 16, !tbaa !5
  %30 = icmp sgt i32 %.ph130, 0
  store i32 0, ptr @tp, align 4, !tbaa !5
  br i1 %30, label %.lr.ph85.preheader, label %._crit_edge86

31:                                               ; preds = %.critedge
  %32 = add nsw i32 %24, -1
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1001000 x i32], ptr @r, i64 0, i64 %33
  store i32 %24, ptr %34, align 4, !tbaa !5
  store i32 %32, ptr @s, align 16, !tbaa !5
  store i32 0, ptr @tp, align 4, !tbaa !5
  br i1 %21, label %thread-pre-split63.preheader, label %.lr.ph85.preheader

thread-pre-split63.preheader:                     ; preds = %31
  %35 = add nsw i32 %24, -2
  %36 = zext nneg i32 %35 to i64
  br label %thread-pre-split63

thread-pre-split:                                 ; preds = %thread-pre-split.preheader, %.critedge
  %indvars.iv112 = phi i64 [ 1, %thread-pre-split.preheader ], [ %indvars.iv.next113, %.critedge ]
  %.pr7273 = phi i32 [ 0, %thread-pre-split.preheader ], [ %54, %.critedge ]
  %37 = icmp sgt i32 %.pr7273, -1
  br i1 %37, label %.lr.ph70, label %.critedge

.lr.ph70:                                         ; preds = %thread-pre-split
  %38 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %indvars.iv112
  %39 = load i32, ptr %38, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %.lr.ph70, %49
  %41 = phi i32 [ %.pr7273, %.lr.ph70 ], [ %50, %49 ]
  %42 = zext nneg i32 %41 to i64
  %43 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp sgt i32 %39, %47
  br i1 %48, label %49, label %.critedge

49:                                               ; preds = %40
  %50 = add nsw i32 %41, -1
  %51 = icmp sgt i32 %41, 0
  br i1 %51, label %40, label %.critedge, !llvm.loop !11

.critedge:                                        ; preds = %49, %40, %thread-pre-split
  %.sink = phi i32 [ -1, %thread-pre-split ], [ %44, %40 ], [ -1, %49 ]
  %52 = phi i32 [ %.pr7273, %thread-pre-split ], [ %41, %40 ], [ -1, %49 ]
  %53 = getelementptr inbounds [1001000 x i32], ptr @l, i64 0, i64 %indvars.iv112
  store i32 %.sink, ptr %53, align 4, !tbaa !5
  %54 = add nsw i32 %52, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %55
  %57 = trunc nuw nsw i64 %indvars.iv112 to i32
  store i32 %57, ptr %56, align 4, !tbaa !5
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next113, %wide.trip.count
  br i1 %exitcond.not, label %31, label %thread-pre-split, !llvm.loop !12

thread-pre-split63:                               ; preds = %thread-pre-split63.preheader, %.critedge2
  %indvars.iv115 = phi i64 [ %36, %thread-pre-split63.preheader ], [ %indvars.iv.next116, %.critedge2 ]
  %.pr648081 = phi i32 [ 0, %thread-pre-split63.preheader ], [ %74, %.critedge2 ]
  %58 = icmp sgt i32 %.pr648081, -1
  br i1 %58, label %.lr.ph77, label %.critedge2

.lr.ph77:                                         ; preds = %thread-pre-split63
  %59 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %indvars.iv115
  %60 = load i32, ptr %59, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %.lr.ph77, %69
  %62 = phi i32 [ %.pr648081, %.lr.ph77 ], [ %70, %69 ]
  %63 = zext nneg i32 %62 to i64
  %64 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %.not62 = icmp slt i32 %60, %68
  br i1 %.not62, label %.critedge2, label %69

69:                                               ; preds = %61
  %70 = add nsw i32 %62, -1
  %71 = icmp sgt i32 %62, 0
  br i1 %71, label %61, label %.critedge2, !llvm.loop !13

.critedge2:                                       ; preds = %69, %61, %thread-pre-split63
  %.lcssa142.sink = phi i32 [ %24, %thread-pre-split63 ], [ %65, %61 ], [ %24, %69 ]
  %72 = phi i32 [ %.pr648081, %thread-pre-split63 ], [ %62, %61 ], [ -1, %69 ]
  %73 = getelementptr inbounds [1001000 x i32], ptr @r, i64 0, i64 %indvars.iv115
  store i32 %.lcssa142.sink, ptr %73, align 4, !tbaa !5
  %74 = add nsw i32 %72, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [1001000 x i32], ptr @s, i64 0, i64 %75
  %77 = trunc nuw nsw i64 %indvars.iv115 to i32
  store i32 %77, ptr %76, align 4, !tbaa !5
  %indvars.iv.next116 = add nsw i64 %indvars.iv115, -1
  %78 = icmp sgt i64 %indvars.iv115, 0
  br i1 %78, label %thread-pre-split63, label %.lr.ph85.critedge, !llvm.loop !14

._crit_edge86:                                    ; preds = %.lr.ph85, %.thread
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %79 = tail call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) @cnt) #7
  store ptr %79, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %80 = tail call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @cnt) #7
  store ptr %80, ptr %2, align 8
  %81 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKixELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br i1 %81, label %.lr.ph88, label %._crit_edge89

.lr.ph85.critedge:                                ; preds = %.critedge2
  store i32 %74, ptr @tp, align 4, !tbaa !5
  br label %.lr.ph85.preheader

.lr.ph85.preheader:                               ; preds = %.thread, %.lr.ph85.critedge, %31
  br label %.lr.ph85

.lr.ph85:                                         ; preds = %.lr.ph85.preheader, %.lr.ph85
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %.lr.ph85 ], [ 0, %.lr.ph85.preheader ]
  %82 = getelementptr inbounds [1001000 x i32], ptr @r, i64 0, i64 %indvars.iv118
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = trunc nuw nsw i64 %indvars.iv118 to i32
  %85 = sub nsw i32 %83, %84
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [1001000 x i32], ptr @l, i64 0, i64 %indvars.iv118
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = sub nsw i32 %84, %88
  %90 = sext i32 %89 to i64
  %91 = mul nsw i64 %90, %86
  %92 = getelementptr inbounds [1001000 x i32], ptr @a, i64 0, i64 %indvars.iv118
  %93 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cnt, ptr noundef nonnull align 4 dereferenceable(4) %92)
  %94 = load i64, ptr %93, align 8, !tbaa !15
  %95 = add nsw i64 %91, %94
  store i64 %95, ptr %93, align 8, !tbaa !15
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = icmp slt i64 %indvars.iv.next119, %97
  br i1 %98, label %.lr.ph85, label %._crit_edge86, !llvm.loop !17

._crit_edge89:                                    ; preds = %.lr.ph88, %._crit_edge86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %99 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %100 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %99, ptr %100)
  %101 = call noundef i64 @_ZNKSt6vectorISt4pairIixESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @tmp) #7
  %102 = trunc i64 %101 to i32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef 0) #7
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef 0) #7
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  %106 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %103, ptr noundef nonnull align 8 dereferenceable(8) %105)
  %107 = extractvalue { i32, i64 } %106, 0
  store i32 %107, ptr %4, align 8
  %108 = getelementptr inbounds i8, ptr %4, i64 8
  %109 = extractvalue { i32, i64 } %106, 1
  store i64 %109, ptr %108, align 8
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @lcnt, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  %110 = icmp sgt i32 %102, 1
  br i1 %110, label %.lr.ph92, label %._crit_edge93

.lr.ph92:                                         ; preds = %._crit_edge89
  %111 = getelementptr inbounds i8, ptr %5, i64 8
  %wide.trip.count124 = and i64 %101, 2147483647
  br label %128

.lr.ph88:                                         ; preds = %._crit_edge86, %.lr.ph88
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %112 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #7
  call void @_ZNSt4pairIixEC2IKixTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairIS4_S5_EEclsr6_PCCFPIS4_S5_EE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKS_IS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %112)
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @tmp, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %113 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %114 = call ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @cnt) #7
  store ptr %114, ptr %2, align 8
  %115 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKixELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br i1 %115, label %.lr.ph88, label %._crit_edge89, !llvm.loop !18

._crit_edge93:                                    ; preds = %128, %._crit_edge89
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %116 = shl i64 %101, 32
  %sext = add i64 %116, -4294967296
  %117 = ashr exact i64 %sext, 32
  %118 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %117) #7
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %117) #7
  %120 = getelementptr inbounds i8, ptr %119, i64 8
  %121 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %118, ptr noundef nonnull align 8 dereferenceable(8) %120)
  %122 = extractvalue { i32, i64 } %121, 0
  store i32 %122, ptr %7, align 8
  %123 = getelementptr inbounds i8, ptr %7, i64 8
  %124 = extractvalue { i32, i64 } %121, 1
  store i64 %124, ptr %123, align 8
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @gcnt, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br i1 %110, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %._crit_edge93
  %125 = getelementptr inbounds i8, ptr %8, i64 8
  %126 = shl i64 %101, 32
  %sext129 = add nsw i64 %126, -8589934592
  %127 = ashr exact i64 %sext129, 32
  br label %147

128:                                              ; preds = %.lr.ph92, %128
  %indvars.iv121 = phi i64 [ 1, %.lr.ph92 ], [ %indvars.iv.next122, %128 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %129 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %indvars.iv121) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %130 = add nsw i64 %indvars.iv121, -1
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @lcnt, i64 noundef %130) #7
  %132 = getelementptr inbounds i8, ptr %131, i64 8
  %133 = load i64, ptr %132, align 8, !tbaa !19
  %134 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %indvars.iv121) #7
  %135 = getelementptr inbounds i8, ptr %134, i64 8
  %136 = load i64, ptr %135, align 8, !tbaa !19
  %137 = add nsw i64 %136, %133
  store i64 %137, ptr %6, align 8, !tbaa !15
  %138 = call { i32, i64 } @_ZSt9make_pairIRixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %129, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %139 = extractvalue { i32, i64 } %138, 0
  store i32 %139, ptr %5, align 8
  %140 = extractvalue { i32, i64 } %138, 1
  store i64 %140, ptr %111, align 8
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @lcnt, ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next122, %wide.trip.count124
  br i1 %exitcond125.not, label %._crit_edge93, label %128, !llvm.loop !21

._crit_edge97:                                    ; preds = %147, %._crit_edge93
  %141 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #7
  %142 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #7
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %141, ptr %142)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %143 = load i32, ptr @m, align 4, !tbaa !5
  %144 = add nsw i32 %143, -1
  store i32 %144, ptr @m, align 4, !tbaa !5
  %.not98 = icmp eq i32 %143, 0
  br i1 %.not98, label %._crit_edge101, label %.lr.ph100

.lr.ph100:                                        ; preds = %._crit_edge97
  %145 = getelementptr inbounds i8, ptr %13, i64 8
  %146 = getelementptr inbounds i8, ptr %16, i64 8
  br label %161

147:                                              ; preds = %.lr.ph96, %147
  %indvars.iv126 = phi i64 [ %127, %.lr.ph96 ], [ %indvars.iv.next127, %147 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  %148 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %indvars.iv126) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %149 = sub nuw nsw i64 %127, %indvars.iv126
  %150 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gcnt, i64 noundef %149) #7
  %151 = getelementptr inbounds i8, ptr %150, i64 8
  %152 = load i64, ptr %151, align 8, !tbaa !19
  %153 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIixESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @tmp, i64 noundef %indvars.iv126) #7
  %154 = getelementptr inbounds i8, ptr %153, i64 8
  %155 = load i64, ptr %154, align 8, !tbaa !19
  %156 = add nsw i64 %155, %152
  store i64 %156, ptr %9, align 8, !tbaa !15
  %157 = call { i32, i64 } @_ZSt9make_pairIRixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %148, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %158 = extractvalue { i32, i64 } %157, 0
  store i32 %158, ptr %8, align 8
  %159 = extractvalue { i32, i64 } %157, 1
  store i64 %159, ptr %125, align 8
  call void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @gcnt, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  %indvars.iv.next127 = add nsw i64 %indvars.iv126, -1
  %160 = icmp sgt i64 %indvars.iv126, 0
  br i1 %160, label %147, label %._crit_edge97, !llvm.loop !22

161:                                              ; preds = %.lr.ph100, %205
  %162 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %10, ptr noundef nonnull %12, ptr noundef nonnull %11)
  %163 = load i8, ptr %10, align 1, !tbaa !23
  switch i8 %163, label %179 [
    i8 61, label %164
    i8 60, label %166
  ]

164:                                              ; preds = %161
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @cnt, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br label %191

166:                                              ; preds = %161
  %167 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @lcnt) #7
  %168 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @lcnt) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  store i64 -1, ptr %14, align 8, !tbaa !15
  %169 = call { i32, i64 } @_ZSt9make_pairIRixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %170 = extractvalue { i32, i64 } %169, 0
  store i32 %170, ptr %13, align 8
  %171 = extractvalue { i32, i64 } %169, 1
  store i64 %171, ptr %145, align 8
  %172 = call ptr @_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %167, ptr %168, ptr noundef nonnull align 8 dereferenceable(16) %13)
  store ptr %172, ptr @it, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %173 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @lcnt) #7
  store ptr %173, ptr %15, align 8
  %174 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairIixESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) @it, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %174, label %.thread132.sink.split, label %175

175:                                              ; preds = %166
  %176 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS2_SaIS2_EEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) @it, i32 noundef 0) #7
  %177 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) @it) #7
  %178 = getelementptr inbounds i8, ptr %177, i64 8
  br label %191

179:                                              ; preds = %161
  %180 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #7
  %181 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %182 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 8 dereferenceable(8) @INF)
  %183 = extractvalue { i32, i64 } %182, 0
  store i32 %183, ptr %16, align 8
  %184 = extractvalue { i32, i64 } %182, 1
  store i64 %184, ptr %146, align 8
  %185 = call ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %180, ptr %181, ptr noundef nonnull align 8 dereferenceable(16) %16)
  store ptr %185, ptr @it, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %186 = call ptr @_ZNSt6vectorISt4pairIixESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @gcnt) #7
  store ptr %186, ptr %17, align 8
  %187 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairIixESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) @it, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br i1 %187, label %.thread132.sink.split, label %188

188:                                              ; preds = %179
  %189 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) @it) #7
  %190 = getelementptr inbounds i8, ptr %189, i64 8
  br label %191

191:                                              ; preds = %175, %188, %164
  %.sink147 = phi ptr [ %178, %175 ], [ %190, %188 ], [ %165, %164 ]
  %192 = load i64, ptr %.sink147, align 8, !tbaa !15
  store i64 %192, ptr @tmpp, align 8, !tbaa !15
  %193 = and i64 %192, 1
  %194 = icmp eq i64 %193, 0
  br i1 %194, label %.thread132, label %201

.thread132.sink.split:                            ; preds = %179, %166
  store i64 0, ptr @tmpp, align 8, !tbaa !15
  br label %.thread132

.thread132:                                       ; preds = %.thread132.sink.split, %191
  %195 = load i8, ptr %11, align 1, !tbaa !23
  %196 = icmp eq i8 %195, 68
  br i1 %196, label %197, label %199

197:                                              ; preds = %.thread132
  %198 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %205

199:                                              ; preds = %.thread132
  %200 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %205

201:                                              ; preds = %191
  %202 = load i8, ptr %11, align 1, !tbaa !23
  %203 = sext i8 %202 to i32
  %204 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %203)
  br label %205

205:                                              ; preds = %197, %199, %201
  %206 = load i32, ptr @m, align 4, !tbaa !5
  %207 = add nsw i32 %206, -1
  store i32 %207, ptr @m, align 4, !tbaa !5
  %.not = icmp eq i32 %206, 0
  br i1 %.not, label %._crit_edge101, label %161, !llvm.loop !26

._crit_edge101:                                   ; preds = %205, %._crit_edge97
  %208 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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 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 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIixESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIixEC2IKixTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairIS4_S5_EEclsr6_PCCFPIS4_S5_EE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKS_IS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKixELb0ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, i64 } @_ZSt9make_pairIRixESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIixESt6vectorIS2_SaIS2_EEEmmEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!20, !16, i64 8}
!20 = !{!"_ZTSSt4pairIixE", !6, i64 0, !16, i64 8}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = !{!7, !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"any pointer", !7, i64 0}
!26 = distinct !{!26, !10}


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