; LLVM IR from tangjz/acm-icpc :: codeforces/1408F.ll (Z5solvev)

; 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::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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::pair.8" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZZ5solvevE3ids = external hidden global [20001 x %"class.std::vector"], align 16
@_ZGVZ5solvevE3ids = external hidden global i64, align 8
@__dso_handle = external hidden global i8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::set", align 8
  %4 = alloca %"class.std::vector.3", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %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 %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair", align 4
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::pair.8", align 8
  %23 = alloca i8, align 1
  %24 = alloca %"struct.std::pair", align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca %"struct.std::pair", align 4
  %36 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %41 = alloca %"struct.std::pair", align 4
  %42 = alloca %"struct.std::pair", align 4
  %43 = alloca %"struct.std::pair", align 4
  %44 = alloca i32, align 4
  %45 = alloca %"struct.std::pair.8", align 8
  %46 = alloca %"class.std::reverse_iterator", align 8
  %47 = alloca %"struct.std::pair", align 4
  %48 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca %"struct.std::pair", align 4
  %55 = alloca %"struct.std::pair.8", align 8
  %56 = alloca %"struct.std::pair.8", align 8
  %57 = alloca ptr, align 8
  %58 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %59 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %60 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  %61 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  %62 = load i32, ptr %1, align 4, !tbaa !5
  %63 = icmp sle i32 %62, 2
  br i1 %63, label %64, label %66

64:                                               ; preds = %0
  %65 = call i32 @puts(ptr noundef @.str.1)
  store i32 1, ptr %2, align 4
  br label %461

66:                                               ; preds = %0
  %67 = load atomic i8, ptr @_ZGVZ5solvevE3ids acquire, align 8
  %68 = icmp eq i8 %67, 0
  br i1 %68, label %69, label %79, !prof !9

69:                                               ; preds = %66
  %70 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ5solvevE3ids) #3
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %79

72:                                               ; preds = %69
  br label %73

73:                                               ; preds = %73, %72
  %74 = phi ptr [ @_ZZ5solvevE3ids, %72 ], [ %75, %73 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %74) #3
  %75 = getelementptr inbounds %"class.std::vector", ptr %74, i64 1
  %76 = icmp eq ptr %75, getelementptr inbounds (%"class.std::vector", ptr @_ZZ5solvevE3ids, i64 20001)
  br i1 %76, label %77, label %73

77:                                               ; preds = %73
  %78 = call i32 @__cxa_atexit(ptr @__cxx_global_array_dtor, ptr null, ptr @__dso_handle) #3
  call void @__cxa_guard_release(ptr @_ZGVZ5solvevE3ids) #3
  br label %79

79:                                               ; preds = %77, %69, %66
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #3
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #3
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %86, %79
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = shl i32 1, %81
  %83 = load i32, ptr %1, align 4, !tbaa !5
  %84 = icmp sle i32 %82, %83
  br i1 %84, label %85, label %89

85:                                               ; preds = %80
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %5, align 4, !tbaa !5
  br label %80, !llvm.loop !10

89:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 1
  store i32 %91, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %185, %89
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = icmp sge i32 %93, 0
  br i1 %94, label %96, label %95

95:                                               ; preds = %92
  store i32 5, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %193

96:                                               ; preds = %92
  %97 = load i32, ptr %1, align 4, !tbaa !5
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = ashr i32 %97, %98
  %100 = and i32 %99, 1
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %103, label %102

102:                                              ; preds = %96
  br label %185

103:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = shl i32 1, %104
  store i32 %105, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %152, %103
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  store i32 8, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %155

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %146, %111
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 11, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %151

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

118:                                              ; preds = %138, %117
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 14, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %145

123:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = add nsw i32 %124, %125
  %127 = load i32, ptr %12, align 4, !tbaa !5
  %128 = add nsw i32 %126, %127
  store i32 %128, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %129 = load i32, ptr %8, align 4, !tbaa !5
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = add nsw i32 %129, %130
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = add nsw i32 %131, %132
  %134 = load i32, ptr %10, align 4, !tbaa !5
  %135 = add nsw i32 %133, %134
  store i32 %135, ptr %15, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %136 unwind label %141

136:                                              ; preds = %123
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %137 unwind label %141

137:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %12, align 4, !tbaa !5
  br label %118, !llvm.loop !12

141:                                              ; preds = %136, %123
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %16, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %192

145:                                              ; preds = %122
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %10, align 4, !tbaa !5
  %148 = shl i32 %147, 1
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = add nsw i32 %149, %148
  store i32 %150, ptr %11, align 4, !tbaa !5
  br label %112, !llvm.loop !13

151:                                              ; preds = %116
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = shl i32 %153, 1
  store i32 %154, ptr %10, align 4, !tbaa !5
  br label %106, !llvm.loop !14

155:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %168, %155
  %157 = load i32, ptr %18, align 4, !tbaa !5
  %158 = load i32, ptr %9, align 4, !tbaa !5
  %159 = icmp slt i32 %157, %158
  br i1 %159, label %161, label %160

160:                                              ; preds = %156
  store i32 17, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %175

161:                                              ; preds = %156
  %162 = load i32, ptr %6, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %165 = load i32, ptr %8, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %8, align 4, !tbaa !5
  store i32 %165, ptr %19, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %164, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %167 unwind label %171

167:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %18, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %18, align 4, !tbaa !5
  br label %156, !llvm.loop !15

171:                                              ; preds = %161
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %16, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %192

175:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %176 = load i32, ptr %6, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %6, align 4, !tbaa !5
  store i32 %176, ptr %21, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %178 unwind label %188

178:                                              ; preds = %175
  %179 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %180 unwind label %188

180:                                              ; preds = %178
  %181 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 0
  %182 = extractvalue { ptr, i8 } %179, 0
  store ptr %182, ptr %181, align 8
  %183 = getelementptr inbounds { ptr, i8 }, ptr %22, i32 0, i32 1
  %184 = extractvalue { ptr, i8 } %179, 1
  store i8 %184, ptr %183, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %185

185:                                              ; preds = %180, %102
  %186 = load i32, ptr %7, align 4, !tbaa !5
  %187 = add nsw i32 %186, -1
  store i32 %187, ptr %7, align 4, !tbaa !5
  br label %92, !llvm.loop !16

188:                                              ; preds = %178, %175
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %16, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  br label %192

192:                                              ; preds = %188, %171, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %464

193:                                              ; preds = %95
  br label %194

194:                                              ; preds = %417, %415, %193
  %195 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  %196 = icmp ugt i64 %195, 2
  br i1 %196, label %197, label %424

197:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #3
  store i8 0, ptr %23, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  store i32 -1, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  store i32 -1, ptr %26, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %198 unwind label %208

198:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  store ptr %3, ptr %27, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %199 = load ptr, ptr %27, align 8, !tbaa !19
  %200 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %199) #3
  %201 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %28, i32 0, i32 0
  store ptr %200, ptr %201, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %202 = load ptr, ptr %27, align 8, !tbaa !19
  %203 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %202) #3
  %204 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %29, i32 0, i32 0
  store ptr %203, ptr %204, align 8
  br label %205

205:                                              ; preds = %322, %198
  %206 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #3
  br i1 %206, label %212, label %207

207:                                              ; preds = %205
  store i32 22, ptr %2, align 4
  br label %329

208:                                              ; preds = %197
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %16, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  br label %423

212:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %213 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #3
  store ptr %213, ptr %30, align 8, !tbaa !19
  %214 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 0
  %215 = load i32, ptr %214, align 4, !tbaa !21
  %216 = load ptr, ptr %30, align 8, !tbaa !19
  %217 = getelementptr inbounds %"struct.std::pair", ptr %216, i32 0, i32 0
  %218 = load i32, ptr %217, align 4, !tbaa !21
  %219 = icmp eq i32 %215, %218
  br i1 %219, label %220, label %315

220:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  %221 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 0
  %222 = load i32, ptr %221, align 4, !tbaa !21
  store i32 %222, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  %223 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 1
  %224 = load i32, ptr %223, align 4, !tbaa !23
  store i32 %224, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  %225 = load ptr, ptr %30, align 8, !tbaa !19
  %226 = getelementptr inbounds %"struct.std::pair", ptr %225, i32 0, i32 1
  %227 = load i32, ptr %226, align 4, !tbaa !23
  store i32 %227, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #3
  store i32 0, ptr %34, align 4, !tbaa !5
  br label %228

228:                                              ; preds = %248, %220
  %229 = load i32, ptr %34, align 4, !tbaa !5
  %230 = load i32, ptr %31, align 4, !tbaa !5
  %231 = icmp slt i32 %229, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %228
  store i32 24, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  br label %255

233:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #3
  %234 = load i32, ptr %32, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %235
  %237 = load i32, ptr %34, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %236, i64 noundef %238) #3
  %240 = load i32, ptr %33, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %241
  %243 = load i32, ptr %34, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %242, i64 noundef %244) #3
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(4) %239, ptr noundef nonnull align 4 dereferenceable(4) %245)
          to label %246 unwind label %251

246:                                              ; preds = %233
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(8) %35)
          to label %247 unwind label %251

247:                                              ; preds = %246
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %34, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %34, align 4, !tbaa !5
  br label %228, !llvm.loop !24

251:                                              ; preds = %246, %233
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %16, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  br label %314

255:                                              ; preds = %232
  %256 = load i32, ptr %33, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %257
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #3
  %259 = load i32, ptr %33, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %260
  %262 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %261) #3
  %263 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  store ptr %262, ptr %263, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #3
  %264 = load i32, ptr %32, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %265
  %267 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %266) #3
  %268 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %38, i32 0, i32 0
  store ptr %267, ptr %268, align 8
  %269 = load i32, ptr %32, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %270
  %272 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %271) #3
  %273 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  store ptr %272, ptr %273, align 8
  %274 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %36, i32 0, i32 0
  %275 = load ptr, ptr %274, align 8
  %276 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %38, i32 0, i32 0
  %277 = load ptr, ptr %276, align 8
  %278 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  %279 = load ptr, ptr %278, align 8
  %280 = invoke ptr @_ZNSt6vectorIiSaIiEE6insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEvEES6_NS4_IPKiS1_EET_SA_(ptr noundef nonnull align 8 dereferenceable(24) %258, ptr %275, ptr %277, ptr %279)
          to label %281 unwind label %298

281:                                              ; preds = %255
  %282 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %40, i32 0, i32 0
  store ptr %280, ptr %282, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #3
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %41, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %283 unwind label %302

283:                                              ; preds = %281
  %284 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %41)
          to label %285 unwind label %302

285:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #3
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %42, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %286 unwind label %306

286:                                              ; preds = %285
  %287 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %42)
          to label %288 unwind label %306

288:                                              ; preds = %286
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #3
  %289 = load i32, ptr %31, align 4, !tbaa !5
  %290 = shl i32 %289, 1
  store i32 %290, ptr %44, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(4) %44, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %291 unwind label %310

291:                                              ; preds = %288
  %292 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %43)
          to label %293 unwind label %310

293:                                              ; preds = %291
  %294 = getelementptr inbounds { ptr, i8 }, ptr %45, i32 0, i32 0
  %295 = extractvalue { ptr, i8 } %292, 0
  store ptr %295, ptr %294, align 8
  %296 = getelementptr inbounds { ptr, i8 }, ptr %45, i32 0, i32 1
  %297 = extractvalue { ptr, i8 } %292, 1
  store i8 %297, ptr %296, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #3
  store i8 1, ptr %23, align 1, !tbaa !17
  store i32 22, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  br label %319

298:                                              ; preds = %255
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %16, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #3
  br label %314

302:                                              ; preds = %283, %281
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %16, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #3
  br label %314

306:                                              ; preds = %286, %285
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %16, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #3
  br label %314

310:                                              ; preds = %291, %288
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %16, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #3
  br label %314

314:                                              ; preds = %310, %306, %302, %298, %251
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  br label %328

315:                                              ; preds = %212
  %316 = load ptr, ptr %30, align 8, !tbaa !19
  %317 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(8) %316)
          to label %318 unwind label %324

318:                                              ; preds = %315
  store i32 0, ptr %2, align 4
  br label %319

319:                                              ; preds = %318, %293
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  %320 = load i32, ptr %2, align 4
  switch i32 %320, label %329 [
    i32 0, label %321
  ]

321:                                              ; preds = %319
  br label %322

322:                                              ; preds = %321
  %323 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #3
  br label %205

324:                                              ; preds = %315
  %325 = landingpad { ptr, i32 }
          cleanup
  %326 = extractvalue { ptr, i32 } %325, 0
  store ptr %326, ptr %16, align 8
  %327 = extractvalue { ptr, i32 } %325, 1
  store i32 %327, ptr %17, align 4
  br label %328

328:                                              ; preds = %324, %314
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  br label %423

329:                                              ; preds = %319, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  br label %330

330:                                              ; preds = %329
  %331 = load i8, ptr %23, align 1, !tbaa !17, !range !25, !noundef !26
  %332 = trunc i8 %331 to i1
  br i1 %332, label %333, label %334

333:                                              ; preds = %330
  store i32 20, ptr %2, align 4
  br label %415, !llvm.loop !27

334:                                              ; preds = %330
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #3
  call void @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %46, ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  %335 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorISt4pairIiiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %336 unwind label %353

336:                                              ; preds = %334
  %337 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(8) %335)
          to label %338 unwind label %353

338:                                              ; preds = %336
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #3
  %339 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  %340 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %48, i32 0, i32 0
  store ptr %339, ptr %340, align 8
  %341 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %341, i64 8, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #3
  %342 = getelementptr inbounds %"struct.std::pair", ptr %47, i32 0, i32 0
  %343 = load i32, ptr %342, align 4, !tbaa !21
  store i32 %343, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #3
  %344 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 1
  %345 = load i32, ptr %344, align 4, !tbaa !23
  store i32 %345, ptr %50, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #3
  %346 = getelementptr inbounds %"struct.std::pair", ptr %47, i32 0, i32 1
  %347 = load i32, ptr %346, align 4, !tbaa !23
  store i32 %347, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #3
  store i32 0, ptr %52, align 4, !tbaa !5
  br label %348

348:                                              ; preds = %378, %338
  %349 = load i32, ptr %52, align 4, !tbaa !5
  %350 = load i32, ptr %49, align 4, !tbaa !5
  %351 = icmp slt i32 %349, %350
  br i1 %351, label %357, label %352

352:                                              ; preds = %348
  store i32 27, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #3
  br label %390

353:                                              ; preds = %336, %334
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %16, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #3
  br label %423

357:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #3
  %358 = load i32, ptr %50, align 4, !tbaa !5
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %359
  %361 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %360) #3
  %362 = load i32, ptr %361, align 4, !tbaa !5
  store i32 %362, ptr %53, align 4, !tbaa !5
  %363 = load i32, ptr %50, align 4, !tbaa !5
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %364
  call void @_ZNSt6vectorIiSaIiEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %365) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #3
  %366 = load i32, ptr %51, align 4, !tbaa !5
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %367
  %369 = load i32, ptr %52, align 4, !tbaa !5
  %370 = sext i32 %369 to i64
  %371 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %368, i64 noundef %370) #3
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %54, ptr noundef nonnull align 4 dereferenceable(4) %53, ptr noundef nonnull align 4 dereferenceable(4) %371)
          to label %372 unwind label %381

372:                                              ; preds = %357
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(8) %54)
          to label %373 unwind label %381

373:                                              ; preds = %372
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #3
  %374 = load i32, ptr %51, align 4, !tbaa !5
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %375
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %376, ptr noundef nonnull align 4 dereferenceable(4) %53)
          to label %377 unwind label %385

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

378:                                              ; preds = %377
  %379 = load i32, ptr %52, align 4, !tbaa !5
  %380 = add nsw i32 %379, 1
  store i32 %380, ptr %52, align 4, !tbaa !5
  br label %348, !llvm.loop !28

381:                                              ; preds = %372, %357
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %16, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #3
  br label %389

385:                                              ; preds = %373
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %16, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %17, align 4
  br label %389

389:                                              ; preds = %385, %381
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #3
  br label %422

390:                                              ; preds = %352
  %391 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %24)
          to label %392 unwind label %418

392:                                              ; preds = %390
  %393 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %47)
          to label %394 unwind label %418

394:                                              ; preds = %392
  %395 = load i32, ptr %49, align 4, !tbaa !5
  %396 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 0
  %397 = load i32, ptr %396, align 4, !tbaa !21
  %398 = sub nsw i32 %397, %395
  store i32 %398, ptr %396, align 4, !tbaa !21
  %399 = load i32, ptr %49, align 4, !tbaa !5
  %400 = getelementptr inbounds %"struct.std::pair", ptr %47, i32 0, i32 0
  %401 = load i32, ptr %400, align 4, !tbaa !21
  %402 = add nsw i32 %401, %399
  store i32 %402, ptr %400, align 4, !tbaa !21
  %403 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %24)
          to label %404 unwind label %418

404:                                              ; preds = %394
  %405 = getelementptr inbounds { ptr, i8 }, ptr %55, i32 0, i32 0
  %406 = extractvalue { ptr, i8 } %403, 0
  store ptr %406, ptr %405, align 8
  %407 = getelementptr inbounds { ptr, i8 }, ptr %55, i32 0, i32 1
  %408 = extractvalue { ptr, i8 } %403, 1
  store i8 %408, ptr %407, align 8
  %409 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %47)
          to label %410 unwind label %418

410:                                              ; preds = %404
  %411 = getelementptr inbounds { ptr, i8 }, ptr %56, i32 0, i32 0
  %412 = extractvalue { ptr, i8 } %409, 0
  store ptr %412, ptr %411, align 8
  %413 = getelementptr inbounds { ptr, i8 }, ptr %56, i32 0, i32 1
  %414 = extractvalue { ptr, i8 } %409, 1
  store i8 %414, ptr %413, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #3
  store i32 0, ptr %2, align 4
  br label %415

415:                                              ; preds = %410, %333
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #3
  %416 = load i32, ptr %2, align 4
  switch i32 %416, label %470 [
    i32 0, label %417
    i32 20, label %194
  ]

417:                                              ; preds = %415
  br label %194, !llvm.loop !27

418:                                              ; preds = %404, %394, %392, %390
  %419 = landingpad { ptr, i32 }
          cleanup
  %420 = extractvalue { ptr, i32 } %419, 0
  store ptr %420, ptr %16, align 8
  %421 = extractvalue { ptr, i32 } %419, 1
  store i32 %421, ptr %17, align 4
  br label %422

422:                                              ; preds = %418, %389
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #3
  br label %423

423:                                              ; preds = %422, %353, %328, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #3
  br label %464

424:                                              ; preds = %194
  %425 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  %426 = trunc i64 %425 to i32
  %427 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %426)
          to label %428 unwind label %438

428:                                              ; preds = %424
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #3
  store ptr %4, ptr %57, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #3
  %429 = load ptr, ptr %57, align 8, !tbaa !19
  %430 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %429) #3
  %431 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %58, i32 0, i32 0
  store ptr %430, ptr %431, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #3
  %432 = load ptr, ptr %57, align 8, !tbaa !19
  %433 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %432) #3
  %434 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %59, i32 0, i32 0
  store ptr %433, ptr %434, align 8
  br label %435

435:                                              ; preds = %454, %428
  %436 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 8 dereferenceable(8) %59) #3
  br i1 %436, label %442, label %437

437:                                              ; preds = %435
  store i32 30, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #3
  br label %460

438:                                              ; preds = %424
  %439 = landingpad { ptr, i32 }
          cleanup
  %440 = extractvalue { ptr, i32 } %439, 0
  store ptr %440, ptr %16, align 8
  %441 = extractvalue { ptr, i32 } %439, 1
  store i32 %441, ptr %17, align 4
  br label %464

442:                                              ; preds = %435
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #3
  %443 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %58) #3
  store ptr %443, ptr %60, align 8, !tbaa !19
  %444 = load ptr, ptr %60, align 8, !tbaa !19
  %445 = getelementptr inbounds %"struct.std::pair", ptr %444, i32 0, i32 0
  %446 = load i32, ptr %445, align 4, !tbaa !21
  %447 = add nsw i32 %446, 1
  %448 = load ptr, ptr %60, align 8, !tbaa !19
  %449 = getelementptr inbounds %"struct.std::pair", ptr %448, i32 0, i32 1
  %450 = load i32, ptr %449, align 4, !tbaa !23
  %451 = add nsw i32 %450, 1
  %452 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %447, i32 noundef %451)
          to label %453 unwind label %456

453:                                              ; preds = %442
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #3
  br label %454

454:                                              ; preds = %453
  %455 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %58) #3
  br label %435

456:                                              ; preds = %442
  %457 = landingpad { ptr, i32 }
          cleanup
  %458 = extractvalue { ptr, i32 } %457, 0
  store ptr %458, ptr %16, align 8
  %459 = extractvalue { ptr, i32 } %457, 1
  store i32 %459, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #3
  br label %464

460:                                              ; preds = %437
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #3
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #3
  store i32 0, ptr %2, align 4
  br label %461

461:                                              ; preds = %460, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  %462 = load i32, ptr %2, align 4
  switch i32 %462, label %470 [
    i32 0, label %463
    i32 1, label %463
  ]

463:                                              ; preds = %461, %461
  ret void

464:                                              ; preds = %456, %438, %423, %192
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #3
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  br label %465

465:                                              ; preds = %464
  %466 = load ptr, ptr %16, align 8
  %467 = load i32, ptr %17, align 4
  %468 = insertvalue { ptr, i32 } poison, ptr %466, 0
  %469 = insertvalue { ptr, i32 } %468, i32 %467, 1
  resume { ptr, i32 } %469

470:                                              ; preds = %461, %415
  unreachable
}

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

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

declare i32 @puts(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #3

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

; Function Attrs: uwtable
declare hidden void @__cxx_global_array_dtor(ptr noundef) #5 section ".text.startup"

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #3

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

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

; 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_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 noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

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

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

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

!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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!23 = !{!22, !6, i64 4}
!24 = distinct !{!24, !11}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !11}
!28 = distinct !{!28, !11}


; 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::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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZZ5solvevE3ids = external hidden global [20001 x %"class.std::vector"], align 16
@_ZGVZ5solvevE3ids = external hidden global i64, align 8
@__dso_handle = external hidden global i8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::set", align 8
  %3 = alloca %"class.std::vector.3", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"struct.std::pair", align 4
  %23 = alloca %"struct.std::pair", align 4
  %24 = alloca %"struct.std::pair", align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::reverse_iterator", align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::pair", align 4
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = icmp slt i32 %34, 3
  br i1 %35, label %36, label %38

36:                                               ; preds = %0
  %37 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %213

38:                                               ; preds = %0
  %39 = load atomic i8, ptr @_ZGVZ5solvevE3ids acquire, align 8
  %40 = icmp eq i8 %39, 0
  br i1 %40, label %41, label %46, !prof !9

41:                                               ; preds = %38
  %42 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ5solvevE3ids) #7
  %.not = icmp eq i32 %42, 0
  br i1 %.not, label %46, label %.preheader106

.preheader106:                                    ; preds = %41, %.preheader106
  %.idx = phi i64 [ %.add, %.preheader106 ], [ 0, %41 ]
  %.ptr = getelementptr inbounds i8, ptr @_ZZ5solvevE3ids, i64 %.idx
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr) #7
  %.add = add nuw nsw i64 %.idx, 24
  %43 = icmp eq i64 %.add, 480024
  br i1 %43, label %44, label %.preheader106

44:                                               ; preds = %.preheader106
  %45 = call i32 @__cxa_atexit(ptr nonnull @__cxx_global_array_dtor, ptr null, ptr nonnull @__dso_handle) #7
  call void @__cxa_guard_release(ptr nonnull @_ZGVZ5solvevE3ids) #7
  br label %46

46:                                               ; preds = %44, %41, %38
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %47 = load i32, ptr %1, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %48, %46
  %.062 = phi i32 [ 0, %46 ], [ %50, %48 ]
  %49 = shl nuw i32 1, %.062
  %.not87 = icmp sgt i32 %49, %47
  %50 = add nuw nsw i32 %.062, 1
  br i1 %.not87, label %.preheader105, label %48, !llvm.loop !10

.preheader105:                                    ; preds = %48
  %.not144 = icmp eq i32 %.062, 0
  br i1 %.not144, label %.preheader, label %.lr.ph125

.preheader:                                       ; preds = %90, %.preheader105
  %51 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  %52 = icmp ugt i64 %51, 2
  br i1 %52, label %.lr.ph139, label %._crit_edge140

.lr.ph139:                                        ; preds = %.preheader
  %53 = getelementptr inbounds i8, ptr %11, i64 4
  br label %95

.lr.ph125:                                        ; preds = %.preheader105, %90
  %.064124.in = phi i32 [ %.064124, %90 ], [ %.062, %.preheader105 ]
  %.063123 = phi i32 [ %.1, %90 ], [ 0, %.preheader105 ]
  %.065122 = phi i32 [ %.2, %90 ], [ 0, %.preheader105 ]
  %.064124 = add nsw i32 %.064124.in, -1
  %54 = load i32, ptr %1, align 4, !tbaa !5
  %55 = shl nuw i32 1, %.064124
  %56 = and i32 %54, %55
  %.not94 = icmp eq i32 %56, 0
  br i1 %.not94, label %90, label %57

57:                                               ; preds = %.lr.ph125
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 %55, ptr %4, align 4, !tbaa !5
  %58 = icmp sgt i32 %55, 1
  br i1 %58, label %.preheader103, label %.preheader104

.preheader104:                                    ; preds = %._crit_edge116, %57
  %59 = phi i32 [ %55, %57 ], [ %77, %._crit_edge116 ]
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader104
  %61 = sext i32 %.063123 to i64
  %62 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %61
  br label %80

.preheader103:                                    ; preds = %57, %._crit_edge116
  %63 = phi i32 [ %77, %._crit_edge116 ], [ %55, %57 ]
  %.067117 = phi i32 [ %.pre-phi, %._crit_edge116 ], [ 1, %57 ]
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.preheader102.lr.ph, label %.preheader103.._crit_edge116_crit_edge

.preheader103.._crit_edge116_crit_edge:           ; preds = %.preheader103
  %.pre156 = shl i32 %.067117, 1
  br label %._crit_edge116

.preheader102.lr.ph:                              ; preds = %.preheader103
  %65 = icmp sgt i32 %.067117, 0
  %66 = shl i32 %.067117, 1
  br i1 %65, label %.preheader102.us, label %._crit_edge116

.preheader102.us:                                 ; preds = %.preheader102.lr.ph, %._crit_edge.us
  %.069115.us = phi i32 [ %73, %._crit_edge.us ], [ 0, %.preheader102.lr.ph ]
  %67 = add nsw i32 %.069115.us, %.065122
  br label %68

68:                                               ; preds = %.preheader102.us, %71
  %.070114.us = phi i32 [ 0, %.preheader102.us ], [ %72, %71 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %69 = add nsw i32 %67, %.070114.us
  store i32 %69, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %70 = add nsw i32 %69, %.067117
  store i32 %70, ptr %7, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %71 unwind label %.split.us

71:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %72 = add nuw nsw i32 %.070114.us, 1
  %exitcond.not = icmp eq i32 %72, %.067117
  br i1 %exitcond.not, label %._crit_edge.us, label %68, !llvm.loop !12

._crit_edge.us:                                   ; preds = %71
  %73 = add nsw i32 %.069115.us, %66
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %.preheader102.us, label %._crit_edge116, !llvm.loop !13

.split.us:                                        ; preds = %68
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %94

._crit_edge116:                                   ; preds = %._crit_edge.us, %.preheader102.lr.ph, %.preheader103.._crit_edge116_crit_edge
  %.pre-phi = phi i32 [ %.pre156, %.preheader103.._crit_edge116_crit_edge ], [ %66, %.preheader102.lr.ph ], [ %66, %._crit_edge.us ]
  %77 = phi i32 [ %63, %.preheader103.._crit_edge116_crit_edge ], [ %63, %.preheader102.lr.ph ], [ %74, %._crit_edge.us ]
  %78 = icmp slt i32 %.pre-phi, %77
  br i1 %78, label %.preheader103, label %.preheader104, !llvm.loop !14

._crit_edge:                                      ; preds = %81, %.preheader104
  %.166.lcssa = phi i32 [ %.065122, %.preheader104 ], [ %82, %81 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  store i32 %.063123, ptr %10, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %79 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %88 unwind label %92

80:                                               ; preds = %.lr.ph, %81
  %.166120 = phi i32 [ %.065122, %.lr.ph ], [ %82, %81 ]
  %.080119 = phi i32 [ 0, %.lr.ph ], [ %83, %81 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 %.166120, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %81 unwind label %86

81:                                               ; preds = %80
  %82 = add nsw i32 %.166120, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  %83 = add nuw nsw i32 %.080119, 1
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %80, label %._crit_edge, !llvm.loop !16

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

88:                                               ; preds = %._crit_edge
  %89 = add nsw i32 %.063123, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %90

90:                                               ; preds = %.lr.ph125, %88
  %.2 = phi i32 [ %.166.lcssa, %88 ], [ %.065122, %.lr.ph125 ]
  %.1 = phi i32 [ %89, %88 ], [ %.063123, %.lr.ph125 ]
  %91 = icmp sgt i32 %.064124.in, 1
  br i1 %91, label %.lr.ph125, label %.preheader, !llvm.loop !17

92:                                               ; preds = %._crit_edge
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %94

94:                                               ; preds = %92, %86, %.split.us
  %.pn95 = phi { ptr, i32 } [ %76, %.split.us ], [ %87, %86 ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %214

95:                                               ; preds = %.lr.ph139, %191
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 -1, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store i32 -1, ptr %13, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %96 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %96, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %97 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %97, ptr %15, align 8
  %98 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %98, label %.lr.ph132, label %.critedge

.lr.ph132:                                        ; preds = %95, %.thread
  %99 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %100 = load i32, ptr %11, align 4, !tbaa !18
  %101 = load i32, ptr %99, align 4, !tbaa !18
  %.not88 = icmp eq i32 %100, %101
  br i1 %.not88, label %102, label %.thread

102:                                              ; preds = %.lr.ph132
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 %100, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  %103 = load i32, ptr %53, align 4, !tbaa !20
  store i32 %103, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  %104 = getelementptr inbounds i8, ptr %99, i64 4
  %105 = load i32, ptr %104, align 4, !tbaa !20
  store i32 %105, ptr %18, align 4, !tbaa !5
  %106 = icmp sgt i32 %100, 0
  br i1 %106, label %.lr.ph128, label %._crit_edge129

._crit_edge129.loopexit:                          ; preds = %129
  %.pre = load i32, ptr %18, align 4, !tbaa !5
  br label %._crit_edge129

._crit_edge129:                                   ; preds = %._crit_edge129.loopexit, %102
  %107 = phi i32 [ %.pre, %._crit_edge129.loopexit ], [ %105, %102 ]
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %108
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  %110 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %109) #7
  store ptr %110, ptr %21, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %111 = load i32, ptr %17, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %112
  %114 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #7
  %115 = load i32, ptr %17, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %116
  %118 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %117) #7
  %119 = load ptr, ptr %20, align 8
  %120 = invoke ptr @_ZNSt6vectorIiSaIiEE6insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEvEES6_NS4_IPKiS1_EET_SA_(ptr noundef nonnull align 8 dereferenceable(24) %109, ptr %119, ptr %114, ptr %118)
          to label %135 unwind label %143

.lr.ph128:                                        ; preds = %102, %129
  %indvars.iv153 = phi i64 [ %indvars.iv.next154, %129 ], [ 0, %102 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %121 = load i32, ptr %17, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %122
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %indvars.iv153) #7
  %125 = load i32, ptr %18, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %126
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %indvars.iv153) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %124, ptr noundef nonnull align 4 dereferenceable(4) %128)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %129 unwind label %133

129:                                              ; preds = %.lr.ph128
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %130 = load i32, ptr %16, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = icmp slt i64 %indvars.iv.next154, %131
  br i1 %132, label %.lr.ph128, label %._crit_edge129.loopexit, !llvm.loop !21

133:                                              ; preds = %.lr.ph128
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br label %151

135:                                              ; preds = %._crit_edge129
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %136 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %137 unwind label %145

137:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %138 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %139 unwind label %147

139:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #7
  %140 = load i32, ptr %16, align 4, !tbaa !5
  %141 = shl i32 %140, 1
  store i32 %141, ptr %25, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %142 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(8) %24)
          to label %.thread100 unwind label %149

143:                                              ; preds = %._crit_edge129
  %144 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  br label %151

145:                                              ; preds = %135
  %146 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %151

147:                                              ; preds = %137
  %148 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  br label %151

149:                                              ; preds = %139
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  br label %151

151:                                              ; preds = %149, %147, %145, %143, %133
  %.pn91 = phi { ptr, i32 } [ %134, %133 ], [ %150, %149 ], [ %148, %147 ], [ %146, %145 ], [ %144, %143 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %197

.thread:                                          ; preds = %.lr.ph132
  %152 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %99)
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %154 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %154, label %.lr.ph132, label %._crit_edge133

.thread100:                                       ; preds = %139
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %191

._crit_edge133:                                   ; preds = %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %155

.critedge:                                        ; preds = %95
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %155

155:                                              ; preds = %._crit_edge133, %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #7
  call void @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %26, ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  %156 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorISt4pairIiiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26)
  %157 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(8) %156)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #7
  %158 = call ptr @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %158, ptr %28, align 8
  %159 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  %160 = load i64, ptr %159, align 4
  store i64 %160, ptr %27, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  %161 = trunc i64 %160 to i32
  %162 = icmp sgt i32 %161, 0
  br i1 %162, label %.lr.ph137, label %._crit_edge138

.lr.ph137:                                        ; preds = %155
  %163 = load i32, ptr %53, align 4, !tbaa !20
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %164
  %166 = ashr i64 %160, 32
  %167 = getelementptr inbounds [20001 x %"class.std::vector"], ptr @_ZZ5solvevE3ids, i64 0, i64 %166
  %wide.trip.count = and i64 %160, 2147483647
  br label %169

._crit_edge138:                                   ; preds = %174, %155
  %168 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %180 unwind label %194

169:                                              ; preds = %.lr.ph137, %174
  %indvars.iv = phi i64 [ 0, %.lr.ph137 ], [ %indvars.iv.next, %174 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #7
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #7
  %171 = load i32, ptr %170, align 4, !tbaa !5
  store i32 %171, ptr %29, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #7
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %indvars.iv) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %172)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(8) %30)
          to label %173 unwind label %175

173:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %167, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %174 unwind label %177

174:                                              ; preds = %173
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond152.not, label %._crit_edge138, label %169, !llvm.loop !22

175:                                              ; preds = %169
  %176 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  br label %179

177:                                              ; preds = %173
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %179

179:                                              ; preds = %177, %175
  %.pn = phi { ptr, i32 } [ %178, %177 ], [ %176, %175 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #7
  br label %196

180:                                              ; preds = %._crit_edge138
  %181 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %182 unwind label %194

182:                                              ; preds = %180
  %183 = load i32, ptr %11, align 4, !tbaa !18
  %184 = sub nsw i32 %183, %161
  store i32 %184, ptr %11, align 4, !tbaa !18
  %185 = load i32, ptr %27, align 8, !tbaa !18
  %186 = add nsw i32 %185, %161
  store i32 %186, ptr %27, align 8, !tbaa !18
  %187 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %188 unwind label %194

188:                                              ; preds = %182
  %189 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %190 unwind label %194

190:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  br label %191

191:                                              ; preds = %.thread100, %190
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %192 = call noundef i64 @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  %193 = icmp ugt i64 %192, 2
  br i1 %193, label %95, label %._crit_edge140

194:                                              ; preds = %188, %182, %180, %._crit_edge138
  %195 = landingpad { ptr, i32 }
          cleanup
  br label %196

196:                                              ; preds = %194, %179
  %.pn.pn = phi { ptr, i32 } [ %.pn, %179 ], [ %195, %194 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  br label %197

197:                                              ; preds = %196, %151
  %.pn91.pn = phi { ptr, i32 } [ %.pn91, %151 ], [ %.pn.pn, %196 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %214

._crit_edge140:                                   ; preds = %191, %.preheader
  %198 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %199 = trunc i64 %198 to i32
  %200 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %199)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %31) #7
  %201 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  store ptr %201, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #7
  %202 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  store ptr %202, ptr %32, align 8
  %203 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  br i1 %203, label %.lr.ph142, label %._crit_edge143

._crit_edge143:                                   ; preds = %.lr.ph142, %._crit_edge140
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %31) #7
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  br label %213

.lr.ph142:                                        ; preds = %._crit_edge140, %.lr.ph142
  %204 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #7
  %205 = load i32, ptr %204, align 4, !tbaa !18
  %206 = add nsw i32 %205, 1
  %207 = getelementptr inbounds i8, ptr %204, i64 4
  %208 = load i32, ptr %207, align 4, !tbaa !20
  %209 = add nsw i32 %208, 1
  %210 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %206, i32 noundef %209)
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #7
  %212 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  br i1 %212, label %.lr.ph142, label %._crit_edge143

213:                                              ; preds = %._crit_edge143, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret void

214:                                              ; preds = %197, %94
  %.pn95.pn = phi { ptr, i32 } [ %.pn95, %94 ], [ %.pn91.pn, %197 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn95.pn
}

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

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

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

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #3

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

; Function Attrs: uwtable
declare hidden void @__cxx_global_array_dtor(ptr noundef) #5 section ".text.startup"

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #3

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIiiEES4_(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 noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 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 #4 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_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 noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
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 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11, !15}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!20 = !{!19, !6, i64 4}
!21 = distinct !{!21, !11}
!22 = distinct !{!22, !11}


; Effective O3 passes: AggressiveInstCombinePass,BDCEPass,ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass