; LLVM IR from tangjz/acm-icpc :: codeforces/gym/104023H.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"

%struct.Node = type { i32, i32, i32, i32, i32, i32, i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<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 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair.0" = type { i32, i32 }

@pat = external dso_local global ptr, align 8
@ptot = external dso_local global i32, align 4
@pool = external dso_local global [200001 x %struct.Node], align 16
@_ZZ5solvevE3buf = external hidden global [200001 x i8], align 16
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@_ZZ5solvevE2rt = external hidden global [200001 x i32], align 16
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [57 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 i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair.0", align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::pair.0", align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::pair.0", align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::pair.0", align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::pair.0", align 4
  %32 = alloca %"struct.std::pair", align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca %"struct.std::pair.0", align 4
  %38 = alloca i32, align 4
  %39 = alloca %"struct.std::pair.0", align 4
  %40 = alloca i32, align 4
  %41 = alloca %"struct.std::pair.0", align 4
  %42 = alloca %"struct.std::pair.0", align 4
  %43 = alloca i32, align 4
  %44 = alloca %"struct.std::pair", align 8
  %45 = alloca %"struct.std::pair.0", align 4
  %46 = alloca %"struct.std::pair", align 8
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca %"struct.std::pair.0", align 4
  %50 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %51 = alloca %"struct.std::pair.0", align 4
  %52 = alloca %"struct.std::pair", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %53 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %1, ptr noundef %2, ptr noundef @_ZZ5solvevE3buf)
  %54 = icmp eq i32 %53, 3
  br i1 %54, label %55, label %72

55:                                               ; preds = %0
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = icmp sle i32 1, %56
  br i1 %57, label %58, label %72

58:                                               ; preds = %55
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = icmp slt i32 %59, 200001
  br i1 %60, label %61, label %72

61:                                               ; preds = %58
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = icmp sle i32 1, %62
  br i1 %63, label %64, label %72

64:                                               ; preds = %61
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = icmp slt i32 %65, 200001
  br i1 %66, label %67, label %72

67:                                               ; preds = %64
  %68 = call i64 @strlen(ptr noundef @_ZZ5solvevE3buf) #9
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = icmp eq i64 %68, %70
  br label %72

72:                                               ; preds = %67, %64, %61, %58, %55, %0
  %73 = phi i1 [ false, %64 ], [ false, %61 ], [ false, %58 ], [ false, %55 ], [ false, %0 ], [ %71, %67 ]
  br i1 %73, label %74, label %75

74:                                               ; preds = %72
  br label %77

75:                                               ; preds = %72
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 80, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

76:                                               ; No predecessors!
  br label %77

77:                                               ; preds = %76, %74
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  store i32 1, ptr @ptot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 -1, ptr %5, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %164, %77
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = load i32, ptr %1, align 4, !tbaa !5
  %81 = icmp sle i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %167

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 -1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %105, %83
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = icmp slt i32 %85, 3
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  store i32 5, ptr %6, align 4
  br label %108

88:                                               ; preds = %84
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = sub nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [200001 x i8], ptr @_ZZ5solvevE3buf, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !9
  %94 = sext i8 %93 to i32
  %95 = load ptr, ptr @pat, align 8, !tbaa !10
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %95, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !9
  %100 = sext i8 %99 to i32
  %101 = icmp eq i32 %94, %100
  br i1 %101, label %102, label %104

102:                                              ; preds = %88
  %103 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %103, ptr %7, align 4, !tbaa !5
  store i32 5, ptr %6, align 4
  br label %108

104:                                              ; preds = %88
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %8, align 4, !tbaa !5
  br label %84, !llvm.loop !12

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

109:                                              ; preds = %108
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = icmp ne i32 %110, -1
  br i1 %111, label %112, label %113

112:                                              ; preds = %109
  br label %115

113:                                              ; preds = %109
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 91, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

114:                                              ; No predecessors!
  br label %115

115:                                              ; preds = %114, %112
  %116 = load i32, ptr %7, align 4, !tbaa !5
  %117 = invoke noundef i32 @_Z7newNodei(i32 noundef %116)
          to label %118 unwind label %151

118:                                              ; preds = %115
  %119 = load i32, ptr %4, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %120
  store i32 %117, ptr %121, align 4, !tbaa !5
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = icmp ne i32 %122, -1
  br i1 %123, label %124, label %155

124:                                              ; preds = %118
  %125 = load i32, ptr %5, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.Node, ptr %130, i32 0, i32 6
  %132 = load i32, ptr %131, align 4, !tbaa !14
  %133 = load i32, ptr %7, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  %135 = srem i32 %134, 3
  %136 = icmp ne i32 %132, %135
  br i1 %136, label %137, label %155

137:                                              ; preds = %124
  %138 = load i32, ptr %5, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = invoke noundef i32 @_Z5mergeii(i32 noundef %141, i32 noundef %145)
          to label %147 unwind label %151

147:                                              ; preds = %137
  %148 = load i32, ptr %5, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %149
  store i32 %146, ptr %150, align 4, !tbaa !5
  br label %163

151:                                              ; preds = %155, %137, %115
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %9, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %945

155:                                              ; preds = %124, %118
  %156 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %157 unwind label %151

157:                                              ; preds = %155
  %158 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %159 = extractvalue { ptr, i8 } %156, 0
  store ptr %159, ptr %158, align 8
  %160 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %161 = extractvalue { ptr, i8 } %156, 1
  store i8 %161, ptr %160, align 8
  %162 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %162, ptr %5, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %157, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %4, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %4, align 4, !tbaa !5
  br label %78, !llvm.loop !16

167:                                              ; preds = %82
  br label %168

168:                                              ; preds = %940, %938, %167
  %169 = load i32, ptr %2, align 4, !tbaa !5
  %170 = add nsw i32 %169, -1
  store i32 %170, ptr %2, align 4, !tbaa !5
  %171 = icmp ne i32 %169, 0
  br i1 %171, label %172, label %944

172:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %173 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %12)
          to label %174 unwind label %186

174:                                              ; preds = %172
  %175 = icmp eq i32 %173, 1
  br i1 %175, label %176, label %182

176:                                              ; preds = %174
  %177 = load i32, ptr %12, align 4, !tbaa !5
  %178 = icmp sle i32 1, %177
  br i1 %178, label %179, label %182

179:                                              ; preds = %176
  %180 = load i32, ptr %12, align 4, !tbaa !5
  %181 = icmp sle i32 %180, 2
  br label %182

182:                                              ; preds = %179, %176, %174
  %183 = phi i1 [ false, %176 ], [ false, %174 ], [ %181, %179 ]
  br i1 %183, label %184, label %185

184:                                              ; preds = %182
  br label %191

185:                                              ; preds = %182
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 107, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

186:                                              ; preds = %258, %194, %172
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %9, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %10, align 4
  br label %943

190:                                              ; No predecessors!
  br label %191

191:                                              ; preds = %190, %184
  %192 = load i32, ptr %12, align 4, !tbaa !5
  %193 = icmp eq i32 %192, 2
  br i1 %193, label %194, label %258

194:                                              ; preds = %191
  %195 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %13)
          to label %196 unwind label %186

196:                                              ; preds = %194
  %197 = icmp eq i32 %195, 1
  br i1 %197, label %198, label %205

198:                                              ; preds = %196
  %199 = load i32, ptr %13, align 4, !tbaa !5
  %200 = icmp sle i32 1, %199
  br i1 %200, label %201, label %205

201:                                              ; preds = %198
  %202 = load i32, ptr %13, align 4, !tbaa !5
  %203 = load i32, ptr %1, align 4, !tbaa !5
  %204 = icmp sle i32 %202, %203
  br label %205

205:                                              ; preds = %201, %198, %196
  %206 = phi i1 [ false, %198 ], [ false, %196 ], [ %204, %201 ]
  br i1 %206, label %207, label %208

207:                                              ; preds = %205
  br label %210

208:                                              ; preds = %205
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.3, i32 noundef 112, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

209:                                              ; No predecessors!
  br label %210

210:                                              ; preds = %209, %207
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %211 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %212 unwind label %249

212:                                              ; preds = %210
  %213 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %211, ptr %213, align 8
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %215 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %214) #8
  %216 = load i32, ptr %215, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  store i32 %216, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %217 = load i32, ptr %13, align 4, !tbaa !5
  %218 = load i32, ptr %15, align 4, !tbaa !5
  %219 = sub nsw i32 %217, %218
  store i32 %219, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %220 = load i32, ptr %15, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = load i32, ptr %17, align 4, !tbaa !5
  %225 = invoke i64 @_Z5splitii(i32 noundef %223, i32 noundef %224)
          to label %226 unwind label %253

226:                                              ; preds = %212
  store i64 %225, ptr %18, align 4
  %227 = load ptr, ptr @pat, align 8, !tbaa !10
  %228 = getelementptr inbounds %"struct.std::pair.0", ptr %18, i32 0, i32 1
  %229 = load i32, ptr %228, align 4, !tbaa !17
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %230
  %232 = getelementptr inbounds %struct.Node, ptr %231, i32 0, i32 5
  %233 = load i32, ptr %232, align 4, !tbaa !19
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds i8, ptr %227, i64 %234
  %236 = load i8, ptr %235, align 1, !tbaa !9
  %237 = sext i8 %236 to i32
  %238 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %237)
          to label %239 unwind label %253

239:                                              ; preds = %226
  %240 = getelementptr inbounds %"struct.std::pair.0", ptr %18, i32 0, i32 0
  %241 = load i32, ptr %240, align 4, !tbaa !20
  %242 = getelementptr inbounds %"struct.std::pair.0", ptr %18, i32 0, i32 1
  %243 = load i32, ptr %242, align 4, !tbaa !17
  %244 = invoke noundef i32 @_Z5mergeii(i32 noundef %241, i32 noundef %243)
          to label %245 unwind label %253

245:                                              ; preds = %239
  %246 = load i32, ptr %15, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %247
  store i32 %244, ptr %248, align 4, !tbaa !5
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %938

249:                                              ; preds = %210
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %9, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %257

253:                                              ; preds = %239, %226, %212
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %9, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %257

257:                                              ; preds = %253, %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %943

258:                                              ; preds = %191
  %259 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.9, ptr noundef %13, ptr noundef %14)
          to label %260 unwind label %186

260:                                              ; preds = %258
  %261 = icmp eq i32 %259, 2
  br i1 %261, label %262, label %273

262:                                              ; preds = %260
  %263 = load i32, ptr %13, align 4, !tbaa !5
  %264 = icmp sle i32 1, %263
  br i1 %264, label %265, label %273

265:                                              ; preds = %262
  %266 = load i32, ptr %13, align 4, !tbaa !5
  %267 = load i32, ptr %14, align 4, !tbaa !5
  %268 = icmp sle i32 %266, %267
  br i1 %268, label %269, label %273

269:                                              ; preds = %265
  %270 = load i32, ptr %14, align 4, !tbaa !5
  %271 = load i32, ptr %1, align 4, !tbaa !5
  %272 = icmp sle i32 %270, %271
  br label %273

273:                                              ; preds = %269, %265, %262, %260
  %274 = phi i1 [ false, %265 ], [ false, %262 ], [ false, %260 ], [ %272, %269 ]
  br i1 %274, label %275, label %276

275:                                              ; preds = %273
  br label %278

276:                                              ; preds = %273
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.3, i32 noundef 122, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

277:                                              ; No predecessors!
  br label %278

278:                                              ; preds = %277, %275
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %279 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %280 unwind label %366

280:                                              ; preds = %278
  %281 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %279, ptr %281, align 8
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  %283 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %282) #8
  %284 = load i32, ptr %283, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  store i32 %284, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %285 = load i32, ptr %19, align 4, !tbaa !5
  %286 = load i32, ptr %19, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %287
  %289 = load i32, ptr %288, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %290
  %292 = getelementptr inbounds %struct.Node, ptr %291, i32 0, i32 3
  %293 = load i32, ptr %292, align 4, !tbaa !21
  %294 = add nsw i32 %285, %293
  store i32 %294, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %295 = load i32, ptr %13, align 4, !tbaa !5
  %296 = load i32, ptr %19, align 4, !tbaa !5
  %297 = sub nsw i32 %295, %296
  store i32 %297, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %298 = load i32, ptr %19, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %299
  %301 = load i32, ptr %300, align 4, !tbaa !5
  %302 = load i32, ptr %22, align 4, !tbaa !5
  %303 = invoke i64 @_Z5splitii(i32 noundef %301, i32 noundef %302)
          to label %304 unwind label %370

304:                                              ; preds = %280
  store i64 %303, ptr %23, align 4
  %305 = load i32, ptr %14, align 4, !tbaa !5
  %306 = load i32, ptr %21, align 4, !tbaa !5
  %307 = icmp slt i32 %305, %306
  br i1 %307, label %308, label %383

308:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %309 = load i32, ptr %14, align 4, !tbaa !5
  %310 = load i32, ptr %13, align 4, !tbaa !5
  %311 = sub nsw i32 %309, %310
  %312 = add nsw i32 %311, 1
  store i32 %312, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %313 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %314 = load i32, ptr %313, align 4, !tbaa !17
  %315 = load i32, ptr %24, align 4, !tbaa !5
  %316 = invoke i64 @_Z5splitii(i32 noundef %314, i32 noundef %315)
          to label %317 unwind label %374

317:                                              ; preds = %308
  store i64 %316, ptr %25, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %318 = getelementptr inbounds %"struct.std::pair.0", ptr %25, i32 0, i32 0
  %319 = load i32, ptr %318, align 4, !tbaa !20
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %320
  %322 = getelementptr inbounds %struct.Node, ptr %321, i32 0, i32 5
  %323 = load i32, ptr %322, align 4, !tbaa !19
  store i32 %323, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %324 = getelementptr inbounds %"struct.std::pair.0", ptr %25, i32 0, i32 0
  %325 = load i32, ptr %324, align 4, !tbaa !20
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %326
  %328 = getelementptr inbounds %struct.Node, ptr %327, i32 0, i32 6
  %329 = load i32, ptr %328, align 4, !tbaa !14
  store i32 %329, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %330 = getelementptr inbounds %"struct.std::pair.0", ptr %25, i32 0, i32 0
  %331 = load i32, ptr %330, align 4, !tbaa !20
  %332 = invoke i64 @_Z5splitii(i32 noundef %331, i32 noundef 1)
          to label %333 unwind label %378

333:                                              ; preds = %317
  store i64 %332, ptr %28, align 4
  %334 = load i32, ptr %27, align 4, !tbaa !5
  %335 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i32 0, i32 0
  %336 = load i32, ptr %335, align 4, !tbaa !20
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %337
  %339 = getelementptr inbounds %struct.Node, ptr %338, i32 0, i32 4
  store i32 %334, ptr %339, align 4, !tbaa !22
  %340 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i32 0, i32 0
  %341 = load i32, ptr %340, align 4, !tbaa !20
  invoke void @_Z3updi(i32 noundef %341)
          to label %342 unwind label %378

342:                                              ; preds = %333
  %343 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i32 0, i32 1
  %344 = load i32, ptr %343, align 4, !tbaa !17
  %345 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i32 0, i32 0
  %346 = load i32, ptr %345, align 4, !tbaa !20
  %347 = invoke noundef i32 @_Z5mergeii(i32 noundef %344, i32 noundef %346)
          to label %348 unwind label %378

348:                                              ; preds = %342
  %349 = getelementptr inbounds %"struct.std::pair.0", ptr %25, i32 0, i32 0
  store i32 %347, ptr %349, align 4, !tbaa !20
  %350 = getelementptr inbounds %"struct.std::pair.0", ptr %25, i32 0, i32 0
  %351 = load i32, ptr %350, align 4, !tbaa !20
  %352 = getelementptr inbounds %"struct.std::pair.0", ptr %25, i32 0, i32 1
  %353 = load i32, ptr %352, align 4, !tbaa !17
  %354 = invoke noundef i32 @_Z5mergeii(i32 noundef %351, i32 noundef %353)
          to label %355 unwind label %378

355:                                              ; preds = %348
  %356 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  store i32 %354, ptr %356, align 4, !tbaa !17
  %357 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %358 = load i32, ptr %357, align 4, !tbaa !20
  %359 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %360 = load i32, ptr %359, align 4, !tbaa !17
  %361 = invoke noundef i32 @_Z5mergeii(i32 noundef %358, i32 noundef %360)
          to label %362 unwind label %378

362:                                              ; preds = %355
  %363 = load i32, ptr %19, align 4, !tbaa !5
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %364
  store i32 %361, ptr %365, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %479

366:                                              ; preds = %278
  %367 = landingpad { ptr, i32 }
          cleanup
  %368 = extractvalue { ptr, i32 } %367, 0
  store ptr %368, ptr %9, align 8
  %369 = extractvalue { ptr, i32 } %367, 1
  store i32 %369, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %942

370:                                              ; preds = %926, %905, %280
  %371 = landingpad { ptr, i32 }
          cleanup
  %372 = extractvalue { ptr, i32 } %371, 0
  store ptr %372, ptr %9, align 8
  %373 = extractvalue { ptr, i32 } %371, 1
  store i32 %373, ptr %10, align 4
  br label %941

374:                                              ; preds = %308
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %9, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %10, align 4
  br label %382

378:                                              ; preds = %355, %348, %342, %333, %317
  %379 = landingpad { ptr, i32 }
          cleanup
  %380 = extractvalue { ptr, i32 } %379, 0
  store ptr %380, ptr %9, align 8
  %381 = extractvalue { ptr, i32 } %379, 1
  store i32 %381, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %382

382:                                              ; preds = %378, %374
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %941

383:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %384 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %385 = load i32, ptr %384, align 4, !tbaa !17
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %386
  %388 = getelementptr inbounds %struct.Node, ptr %387, i32 0, i32 5
  %389 = load i32, ptr %388, align 4, !tbaa !19
  store i32 %389, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %390 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %391 = load i32, ptr %390, align 4, !tbaa !17
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %392
  %394 = getelementptr inbounds %struct.Node, ptr %393, i32 0, i32 6
  %395 = load i32, ptr %394, align 4, !tbaa !14
  store i32 %395, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %396 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %397 = load i32, ptr %396, align 4, !tbaa !17
  %398 = invoke i64 @_Z5splitii(i32 noundef %397, i32 noundef 1)
          to label %399 unwind label %464

399:                                              ; preds = %383
  store i64 %398, ptr %31, align 4
  %400 = load i32, ptr %30, align 4, !tbaa !5
  %401 = getelementptr inbounds %"struct.std::pair.0", ptr %31, i32 0, i32 0
  %402 = load i32, ptr %401, align 4, !tbaa !20
  %403 = sext i32 %402 to i64
  %404 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %403
  %405 = getelementptr inbounds %struct.Node, ptr %404, i32 0, i32 4
  store i32 %400, ptr %405, align 4, !tbaa !22
  %406 = getelementptr inbounds %"struct.std::pair.0", ptr %31, i32 0, i32 0
  %407 = load i32, ptr %406, align 4, !tbaa !20
  invoke void @_Z3updi(i32 noundef %407)
          to label %408 unwind label %464

408:                                              ; preds = %399
  %409 = getelementptr inbounds %"struct.std::pair.0", ptr %31, i32 0, i32 1
  %410 = load i32, ptr %409, align 4, !tbaa !17
  %411 = getelementptr inbounds %"struct.std::pair.0", ptr %31, i32 0, i32 0
  %412 = load i32, ptr %411, align 4, !tbaa !20
  %413 = invoke noundef i32 @_Z5mergeii(i32 noundef %410, i32 noundef %412)
          to label %414 unwind label %464

414:                                              ; preds = %408
  %415 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  store i32 %413, ptr %415, align 4, !tbaa !17
  %416 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %417 = load i32, ptr %416, align 4, !tbaa !20
  %418 = sext i32 %417 to i64
  %419 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %418
  %420 = getelementptr inbounds %struct.Node, ptr %419, i32 0, i32 3
  %421 = load i32, ptr %420, align 4, !tbaa !21
  %422 = icmp ne i32 %421, 0
  br i1 %422, label %423, label %468

423:                                              ; preds = %414
  %424 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %425 = load i32, ptr %424, align 4, !tbaa !20
  %426 = sext i32 %425 to i64
  %427 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %426
  %428 = getelementptr inbounds %struct.Node, ptr %427, i32 0, i32 6
  %429 = load i32, ptr %428, align 4, !tbaa !14
  %430 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %431 = load i32, ptr %430, align 4, !tbaa !17
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %432
  %434 = getelementptr inbounds %struct.Node, ptr %433, i32 0, i32 5
  %435 = load i32, ptr %434, align 4, !tbaa !19
  %436 = add nsw i32 %435, 1
  %437 = srem i32 %436, 3
  %438 = icmp eq i32 %429, %437
  br i1 %438, label %439, label %468

439:                                              ; preds = %423
  %440 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %441 = load i32, ptr %440, align 4, !tbaa !20
  %442 = load i32, ptr %19, align 4, !tbaa !5
  %443 = sext i32 %442 to i64
  %444 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %443
  store i32 %441, ptr %444, align 4, !tbaa !5
  %445 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %446 = load i32, ptr %445, align 4, !tbaa !20
  %447 = sext i32 %446 to i64
  %448 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %447
  %449 = getelementptr inbounds %struct.Node, ptr %448, i32 0, i32 3
  %450 = load i32, ptr %449, align 4, !tbaa !21
  %451 = load i32, ptr %19, align 4, !tbaa !5
  %452 = add nsw i32 %451, %450
  store i32 %452, ptr %19, align 4, !tbaa !5
  %453 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %454 = load i32, ptr %453, align 4, !tbaa !17
  %455 = load i32, ptr %19, align 4, !tbaa !5
  %456 = sext i32 %455 to i64
  %457 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %456
  store i32 %454, ptr %457, align 4, !tbaa !5
  %458 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %459 unwind label %464

459:                                              ; preds = %439
  %460 = getelementptr inbounds { ptr, i8 }, ptr %32, i32 0, i32 0
  %461 = extractvalue { ptr, i8 } %458, 0
  store ptr %461, ptr %460, align 8
  %462 = getelementptr inbounds { ptr, i8 }, ptr %32, i32 0, i32 1
  %463 = extractvalue { ptr, i8 } %458, 1
  store i8 %463, ptr %462, align 8
  br label %478

464:                                              ; preds = %468, %439, %408, %399, %383
  %465 = landingpad { ptr, i32 }
          cleanup
  %466 = extractvalue { ptr, i32 } %465, 0
  store ptr %466, ptr %9, align 8
  %467 = extractvalue { ptr, i32 } %465, 1
  store i32 %467, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %941

468:                                              ; preds = %423, %414
  %469 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %470 = load i32, ptr %469, align 4, !tbaa !20
  %471 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %472 = load i32, ptr %471, align 4, !tbaa !17
  %473 = invoke noundef i32 @_Z5mergeii(i32 noundef %470, i32 noundef %472)
          to label %474 unwind label %464

474:                                              ; preds = %468
  %475 = load i32, ptr %19, align 4, !tbaa !5
  %476 = sext i32 %475 to i64
  %477 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %476
  store i32 %473, ptr %477, align 4, !tbaa !5
  br label %478

478:                                              ; preds = %474, %459
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %479

479:                                              ; preds = %478, %362
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  br label %480

480:                                              ; preds = %849, %479
  %481 = load i32, ptr %21, align 4, !tbaa !5
  %482 = load i32, ptr %14, align 4, !tbaa !5
  %483 = icmp sle i32 %481, %482
  br i1 %483, label %485, label %484

484:                                              ; preds = %480
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %853

485:                                              ; preds = %480
  %486 = load i32, ptr %21, align 4, !tbaa !5
  %487 = load i32, ptr %21, align 4, !tbaa !5
  %488 = sext i32 %487 to i64
  %489 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %488
  %490 = load i32, ptr %489, align 4, !tbaa !5
  %491 = sext i32 %490 to i64
  %492 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %491
  %493 = getelementptr inbounds %struct.Node, ptr %492, i32 0, i32 3
  %494 = load i32, ptr %493, align 4, !tbaa !21
  %495 = add nsw i32 %486, %494
  store i32 %495, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %496 = load i32, ptr %19, align 4, !tbaa !5
  %497 = sext i32 %496 to i64
  %498 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %497
  %499 = load i32, ptr %498, align 4, !tbaa !5
  %500 = sext i32 %499 to i64
  %501 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %500
  %502 = getelementptr inbounds %struct.Node, ptr %501, i32 0, i32 6
  %503 = load i32, ptr %502, align 4, !tbaa !14
  store i32 %503, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %504 = load i32, ptr %34, align 4, !tbaa !5
  %505 = add nsw i32 %504, 2
  %506 = srem i32 %505, 3
  store i32 %506, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %507 = load i32, ptr %34, align 4, !tbaa !5
  %508 = add nsw i32 %507, 1
  %509 = srem i32 %508, 3
  store i32 %509, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %510 = load i32, ptr %14, align 4, !tbaa !5
  %511 = load i32, ptr %33, align 4, !tbaa !5
  %512 = icmp slt i32 %510, %511
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  br i1 %512, label %513, label %524

513:                                              ; preds = %485
  %514 = load i32, ptr %21, align 4, !tbaa !5
  %515 = sext i32 %514 to i64
  %516 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %515
  %517 = load i32, ptr %516, align 4, !tbaa !5
  %518 = load i32, ptr %14, align 4, !tbaa !5
  %519 = load i32, ptr %21, align 4, !tbaa !5
  %520 = sub nsw i32 %518, %519
  %521 = add nsw i32 %520, 1
  %522 = invoke i64 @_Z5splitii(i32 noundef %517, i32 noundef %521)
          to label %523 unwind label %575

523:                                              ; preds = %513
  store i64 %522, ptr %37, align 4
  br label %530

524:                                              ; preds = %485
  %525 = load i32, ptr %21, align 4, !tbaa !5
  %526 = sext i32 %525 to i64
  %527 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %526
  store i32 0, ptr %38, align 4, !tbaa !5
  %528 = invoke i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %527, ptr noundef nonnull align 4 dereferenceable(4) %38)
          to label %529 unwind label %579

529:                                              ; preds = %524
  store i64 %528, ptr %37, align 4
  br label %530

530:                                              ; preds = %529, %523
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  store i32 0, ptr %40, align 4, !tbaa !5
  %531 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  invoke void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %39, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 4 dereferenceable(4) %531)
          to label %532 unwind label %583

532:                                              ; preds = %530
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %533

533:                                              ; preds = %573, %532
  %534 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %535 = load i32, ptr %534, align 4, !tbaa !17
  %536 = sext i32 %535 to i64
  %537 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %536
  %538 = getelementptr inbounds %struct.Node, ptr %537, i32 0, i32 3
  %539 = load i32, ptr %538, align 4, !tbaa !21
  %540 = icmp ne i32 %539, 0
  br i1 %540, label %541, label %550

541:                                              ; preds = %533
  %542 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %543 = load i32, ptr %542, align 4, !tbaa !17
  %544 = sext i32 %543 to i64
  %545 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %544
  %546 = getelementptr inbounds %struct.Node, ptr %545, i32 0, i32 5
  %547 = load i32, ptr %546, align 4, !tbaa !19
  %548 = load i32, ptr %35, align 4, !tbaa !5
  %549 = icmp eq i32 %547, %548
  br label %550

550:                                              ; preds = %541, %533
  %551 = phi i1 [ false, %533 ], [ %549, %541 ]
  br i1 %551, label %552, label %596

552:                                              ; preds = %550
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  %553 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %554 = load i32, ptr %553, align 4, !tbaa !17
  %555 = invoke i64 @_Z5splitii(i32 noundef %554, i32 noundef 1)
          to label %556 unwind label %587

556:                                              ; preds = %552
  store i64 %555, ptr %41, align 4
  %557 = load i32, ptr %34, align 4, !tbaa !5
  %558 = getelementptr inbounds %"struct.std::pair.0", ptr %41, i32 0, i32 0
  %559 = load i32, ptr %558, align 4, !tbaa !20
  %560 = sext i32 %559 to i64
  %561 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %560
  %562 = getelementptr inbounds %struct.Node, ptr %561, i32 0, i32 4
  store i32 %557, ptr %562, align 4, !tbaa !22
  %563 = getelementptr inbounds %"struct.std::pair.0", ptr %41, i32 0, i32 0
  %564 = load i32, ptr %563, align 4, !tbaa !20
  invoke void @_Z3updi(i32 noundef %564)
          to label %565 unwind label %587

565:                                              ; preds = %556
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  %566 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 0
  %567 = load i32, ptr %566, align 4, !tbaa !20
  %568 = getelementptr inbounds %"struct.std::pair.0", ptr %41, i32 0, i32 0
  %569 = load i32, ptr %568, align 4, !tbaa !20
  %570 = invoke noundef i32 @_Z5mergeii(i32 noundef %567, i32 noundef %569)
          to label %571 unwind label %591

571:                                              ; preds = %565
  store i32 %570, ptr %43, align 4, !tbaa !5
  %572 = getelementptr inbounds %"struct.std::pair.0", ptr %41, i32 0, i32 1
  invoke void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_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) %43, ptr noundef nonnull align 4 dereferenceable(4) %572)
          to label %573 unwind label %591

573:                                              ; preds = %571
  %574 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %39, ptr noundef nonnull align 4 dereferenceable(8) %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %533, !llvm.loop !23

575:                                              ; preds = %513
  %576 = landingpad { ptr, i32 }
          cleanup
  %577 = extractvalue { ptr, i32 } %576, 0
  store ptr %577, ptr %9, align 8
  %578 = extractvalue { ptr, i32 } %576, 1
  store i32 %578, ptr %10, align 4
  br label %852

579:                                              ; preds = %524
  %580 = landingpad { ptr, i32 }
          cleanup
  %581 = extractvalue { ptr, i32 } %580, 0
  store ptr %581, ptr %9, align 8
  %582 = extractvalue { ptr, i32 } %580, 1
  store i32 %582, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  br label %852

583:                                              ; preds = %530
  %584 = landingpad { ptr, i32 }
          cleanup
  %585 = extractvalue { ptr, i32 } %584, 0
  store ptr %585, ptr %9, align 8
  %586 = extractvalue { ptr, i32 } %584, 1
  store i32 %586, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %851

587:                                              ; preds = %556, %552
  %588 = landingpad { ptr, i32 }
          cleanup
  %589 = extractvalue { ptr, i32 } %588, 0
  store ptr %589, ptr %9, align 8
  %590 = extractvalue { ptr, i32 } %588, 1
  store i32 %590, ptr %10, align 4
  br label %595

591:                                              ; preds = %571, %565
  %592 = landingpad { ptr, i32 }
          cleanup
  %593 = extractvalue { ptr, i32 } %592, 0
  store ptr %593, ptr %9, align 8
  %594 = extractvalue { ptr, i32 } %592, 1
  store i32 %594, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  br label %595

595:                                              ; preds = %591, %587
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %851

596:                                              ; preds = %550
  %597 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 0
  %598 = load i32, ptr %597, align 4, !tbaa !20
  %599 = sext i32 %598 to i64
  %600 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %599
  %601 = getelementptr inbounds %struct.Node, ptr %600, i32 0, i32 3
  %602 = load i32, ptr %601, align 4, !tbaa !21
  %603 = icmp ne i32 %602, 0
  br i1 %603, label %604, label %646

604:                                              ; preds = %596
  %605 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %606 unwind label %632

606:                                              ; preds = %604
  %607 = load i32, ptr %19, align 4, !tbaa !5
  %608 = sext i32 %607 to i64
  %609 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %608
  %610 = load i32, ptr %609, align 4, !tbaa !5
  %611 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 0
  %612 = load i32, ptr %611, align 4, !tbaa !20
  %613 = invoke noundef i32 @_Z5mergeii(i32 noundef %610, i32 noundef %612)
          to label %614 unwind label %632

614:                                              ; preds = %606
  %615 = load i32, ptr %19, align 4, !tbaa !5
  %616 = sext i32 %615 to i64
  %617 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %616
  store i32 %613, ptr %617, align 4, !tbaa !5
  %618 = load i32, ptr %19, align 4, !tbaa !5
  %619 = load i32, ptr %19, align 4, !tbaa !5
  %620 = sext i32 %619 to i64
  %621 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %620
  %622 = load i32, ptr %621, align 4, !tbaa !5
  %623 = sext i32 %622 to i64
  %624 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %623
  %625 = getelementptr inbounds %struct.Node, ptr %624, i32 0, i32 3
  %626 = load i32, ptr %625, align 4, !tbaa !21
  %627 = add nsw i32 %618, %626
  store i32 %627, ptr %21, align 4, !tbaa !5
  %628 = load i32, ptr %21, align 4, !tbaa !5
  %629 = load i32, ptr %33, align 4, !tbaa !5
  %630 = icmp eq i32 %628, %629
  br i1 %630, label %631, label %636

631:                                              ; preds = %614
  store i32 12, ptr %6, align 4
  br label %846

632:                                              ; preds = %840, %830, %799, %743, %712, %678, %636, %606, %604
  %633 = landingpad { ptr, i32 }
          cleanup
  %634 = extractvalue { ptr, i32 } %633, 0
  store ptr %634, ptr %9, align 8
  %635 = extractvalue { ptr, i32 } %633, 1
  store i32 %635, ptr %10, align 4
  br label %851

636:                                              ; preds = %614
  %637 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %638 = load i32, ptr %637, align 4, !tbaa !17
  %639 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  store i32 %638, ptr %639, align 4, !tbaa !20
  %640 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %641 unwind label %632

641:                                              ; preds = %636
  %642 = getelementptr inbounds { ptr, i8 }, ptr %44, i32 0, i32 0
  %643 = extractvalue { ptr, i8 } %640, 0
  store ptr %643, ptr %642, align 8
  %644 = getelementptr inbounds { ptr, i8 }, ptr %44, i32 0, i32 1
  %645 = extractvalue { ptr, i8 } %640, 1
  store i8 %645, ptr %644, align 8
  br label %646

646:                                              ; preds = %641, %596
  %647 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  %648 = load i32, ptr %647, align 4, !tbaa !20
  %649 = sext i32 %648 to i64
  %650 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %649
  %651 = getelementptr inbounds %struct.Node, ptr %650, i32 0, i32 3
  %652 = load i32, ptr %651, align 4, !tbaa !21
  %653 = icmp ne i32 %652, 0
  br i1 %653, label %654, label %754

654:                                              ; preds = %646
  %655 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  %656 = load i32, ptr %655, align 4, !tbaa !20
  %657 = sext i32 %656 to i64
  %658 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %657
  %659 = getelementptr inbounds %struct.Node, ptr %658, i32 0, i32 5
  %660 = load i32, ptr %659, align 4, !tbaa !19
  %661 = load i32, ptr %36, align 4, !tbaa !5
  %662 = icmp eq i32 %660, %661
  br i1 %662, label %663, label %754

663:                                              ; preds = %654
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %664 = load i32, ptr %19, align 4, !tbaa !5
  %665 = sext i32 %664 to i64
  %666 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %665
  %667 = load i32, ptr %666, align 4, !tbaa !5
  %668 = load i32, ptr %19, align 4, !tbaa !5
  %669 = sext i32 %668 to i64
  %670 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %669
  %671 = load i32, ptr %670, align 4, !tbaa !5
  %672 = sext i32 %671 to i64
  %673 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %672
  %674 = getelementptr inbounds %struct.Node, ptr %673, i32 0, i32 3
  %675 = load i32, ptr %674, align 4, !tbaa !21
  %676 = sub nsw i32 %675, 1
  %677 = invoke i64 @_Z5splitii(i32 noundef %667, i32 noundef %676)
          to label %678 unwind label %739

678:                                              ; preds = %663
  store i64 %677, ptr %45, align 4
  %679 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %39, ptr noundef nonnull align 4 dereferenceable(8) %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  %680 = load i32, ptr %36, align 4, !tbaa !5
  %681 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %682 = load i32, ptr %681, align 4, !tbaa !17
  %683 = sext i32 %682 to i64
  %684 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %683
  %685 = getelementptr inbounds %struct.Node, ptr %684, i32 0, i32 4
  store i32 %680, ptr %685, align 4, !tbaa !22
  %686 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %687 = load i32, ptr %686, align 4, !tbaa !17
  invoke void @_Z3updi(i32 noundef %687)
          to label %688 unwind label %632

688:                                              ; preds = %678
  %689 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 0
  %690 = load i32, ptr %689, align 4, !tbaa !20
  %691 = sext i32 %690 to i64
  %692 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %691
  %693 = getelementptr inbounds %struct.Node, ptr %692, i32 0, i32 3
  %694 = load i32, ptr %693, align 4, !tbaa !21
  %695 = icmp ne i32 %694, 0
  br i1 %695, label %696, label %743

696:                                              ; preds = %688
  %697 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 0
  %698 = load i32, ptr %697, align 4, !tbaa !20
  %699 = sext i32 %698 to i64
  %700 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %699
  %701 = getelementptr inbounds %struct.Node, ptr %700, i32 0, i32 6
  %702 = load i32, ptr %701, align 4, !tbaa !14
  %703 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %704 = load i32, ptr %703, align 4, !tbaa !17
  %705 = sext i32 %704 to i64
  %706 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %705
  %707 = getelementptr inbounds %struct.Node, ptr %706, i32 0, i32 5
  %708 = load i32, ptr %707, align 4, !tbaa !19
  %709 = add nsw i32 %708, 1
  %710 = srem i32 %709, 3
  %711 = icmp eq i32 %702, %710
  br i1 %711, label %712, label %743

712:                                              ; preds = %696
  %713 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 0
  %714 = load i32, ptr %713, align 4, !tbaa !20
  %715 = load i32, ptr %19, align 4, !tbaa !5
  %716 = sext i32 %715 to i64
  %717 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %716
  store i32 %714, ptr %717, align 4, !tbaa !5
  %718 = load i32, ptr %19, align 4, !tbaa !5
  %719 = sext i32 %718 to i64
  %720 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %719
  %721 = load i32, ptr %720, align 4, !tbaa !5
  %722 = sext i32 %721 to i64
  %723 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %722
  %724 = getelementptr inbounds %struct.Node, ptr %723, i32 0, i32 3
  %725 = load i32, ptr %724, align 4, !tbaa !21
  %726 = load i32, ptr %19, align 4, !tbaa !5
  %727 = add nsw i32 %726, %725
  store i32 %727, ptr %19, align 4, !tbaa !5
  %728 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %729 = load i32, ptr %728, align 4, !tbaa !17
  %730 = load i32, ptr %19, align 4, !tbaa !5
  %731 = sext i32 %730 to i64
  %732 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %731
  store i32 %729, ptr %732, align 4, !tbaa !5
  %733 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %734 unwind label %632

734:                                              ; preds = %712
  %735 = getelementptr inbounds { ptr, i8 }, ptr %46, i32 0, i32 0
  %736 = extractvalue { ptr, i8 } %733, 0
  store ptr %736, ptr %735, align 8
  %737 = getelementptr inbounds { ptr, i8 }, ptr %46, i32 0, i32 1
  %738 = extractvalue { ptr, i8 } %733, 1
  store i8 %738, ptr %737, align 8
  br label %753

739:                                              ; preds = %663
  %740 = landingpad { ptr, i32 }
          cleanup
  %741 = extractvalue { ptr, i32 } %740, 0
  store ptr %741, ptr %9, align 8
  %742 = extractvalue { ptr, i32 } %740, 1
  store i32 %742, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %851

743:                                              ; preds = %696, %688
  %744 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 0
  %745 = load i32, ptr %744, align 4, !tbaa !20
  %746 = getelementptr inbounds %"struct.std::pair.0", ptr %39, i32 0, i32 1
  %747 = load i32, ptr %746, align 4, !tbaa !17
  %748 = invoke noundef i32 @_Z5mergeii(i32 noundef %745, i32 noundef %747)
          to label %749 unwind label %632

749:                                              ; preds = %743
  %750 = load i32, ptr %19, align 4, !tbaa !5
  %751 = sext i32 %750 to i64
  %752 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %751
  store i32 %748, ptr %752, align 4, !tbaa !5
  br label %753

753:                                              ; preds = %749, %734
  br label %754

754:                                              ; preds = %753, %654, %646
  %755 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  %756 = load i32, ptr %755, align 4, !tbaa !20
  %757 = sext i32 %756 to i64
  %758 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %757
  %759 = getelementptr inbounds %struct.Node, ptr %758, i32 0, i32 3
  %760 = load i32, ptr %759, align 4, !tbaa !21
  %761 = icmp ne i32 %760, 0
  br i1 %761, label %762, label %799

762:                                              ; preds = %754
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  %763 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  %764 = load i32, ptr %763, align 4, !tbaa !20
  %765 = sext i32 %764 to i64
  %766 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %765
  %767 = getelementptr inbounds %struct.Node, ptr %766, i32 0, i32 5
  %768 = load i32, ptr %767, align 4, !tbaa !19
  store i32 %768, ptr %47, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  %769 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  %770 = load i32, ptr %769, align 4, !tbaa !20
  %771 = sext i32 %770 to i64
  %772 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %771
  %773 = getelementptr inbounds %struct.Node, ptr %772, i32 0, i32 6
  %774 = load i32, ptr %773, align 4, !tbaa !14
  store i32 %774, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  %775 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  %776 = load i32, ptr %775, align 4, !tbaa !20
  %777 = invoke i64 @_Z5splitii(i32 noundef %776, i32 noundef 1)
          to label %778 unwind label %795

778:                                              ; preds = %762
  store i64 %777, ptr %49, align 4
  %779 = load i32, ptr %48, align 4, !tbaa !5
  %780 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i32 0, i32 0
  %781 = load i32, ptr %780, align 4, !tbaa !20
  %782 = sext i32 %781 to i64
  %783 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %782
  %784 = getelementptr inbounds %struct.Node, ptr %783, i32 0, i32 4
  store i32 %779, ptr %784, align 4, !tbaa !22
  %785 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i32 0, i32 0
  %786 = load i32, ptr %785, align 4, !tbaa !20
  invoke void @_Z3updi(i32 noundef %786)
          to label %787 unwind label %795

787:                                              ; preds = %778
  %788 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i32 0, i32 1
  %789 = load i32, ptr %788, align 4, !tbaa !17
  %790 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i32 0, i32 0
  %791 = load i32, ptr %790, align 4, !tbaa !20
  %792 = invoke noundef i32 @_Z5mergeii(i32 noundef %789, i32 noundef %791)
          to label %793 unwind label %795

793:                                              ; preds = %787
  %794 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  store i32 %792, ptr %794, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  br label %799

795:                                              ; preds = %787, %778, %762
  %796 = landingpad { ptr, i32 }
          cleanup
  %797 = extractvalue { ptr, i32 } %796, 0
  store ptr %797, ptr %9, align 8
  %798 = extractvalue { ptr, i32 } %796, 1
  store i32 %798, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  br label %851

799:                                              ; preds = %793, %754
  %800 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 0
  %801 = load i32, ptr %800, align 4, !tbaa !20
  %802 = getelementptr inbounds %"struct.std::pair.0", ptr %37, i32 0, i32 1
  %803 = load i32, ptr %802, align 4, !tbaa !17
  %804 = invoke noundef i32 @_Z5mergeii(i32 noundef %801, i32 noundef %803)
          to label %805 unwind label %632

805:                                              ; preds = %799
  %806 = load i32, ptr %21, align 4, !tbaa !5
  %807 = sext i32 %806 to i64
  %808 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %807
  store i32 %804, ptr %808, align 4, !tbaa !5
  %809 = load i32, ptr %19, align 4, !tbaa !5
  %810 = sext i32 %809 to i64
  %811 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %810
  %812 = load i32, ptr %811, align 4, !tbaa !5
  %813 = sext i32 %812 to i64
  %814 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %813
  %815 = getelementptr inbounds %struct.Node, ptr %814, i32 0, i32 6
  %816 = load i32, ptr %815, align 4, !tbaa !14
  %817 = load i32, ptr %21, align 4, !tbaa !5
  %818 = sext i32 %817 to i64
  %819 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %818
  %820 = load i32, ptr %819, align 4, !tbaa !5
  %821 = sext i32 %820 to i64
  %822 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %821
  %823 = getelementptr inbounds %struct.Node, ptr %822, i32 0, i32 5
  %824 = load i32, ptr %823, align 4, !tbaa !19
  %825 = add nsw i32 %824, 1
  %826 = srem i32 %825, 3
  %827 = icmp eq i32 %816, %826
  br i1 %827, label %828, label %830

828:                                              ; preds = %805
  %829 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %829, ptr %19, align 4, !tbaa !5
  store i32 12, ptr %6, align 4
  br label %846

830:                                              ; preds = %805
  %831 = load i32, ptr %19, align 4, !tbaa !5
  %832 = sext i32 %831 to i64
  %833 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %832
  %834 = load i32, ptr %833, align 4, !tbaa !5
  %835 = load i32, ptr %21, align 4, !tbaa !5
  %836 = sext i32 %835 to i64
  %837 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %836
  %838 = load i32, ptr %837, align 4, !tbaa !5
  %839 = invoke noundef i32 @_Z5mergeii(i32 noundef %834, i32 noundef %838)
          to label %840 unwind label %632

840:                                              ; preds = %830
  %841 = load i32, ptr %19, align 4, !tbaa !5
  %842 = sext i32 %841 to i64
  %843 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %842
  store i32 %839, ptr %843, align 4, !tbaa !5
  %844 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %845 unwind label %632

845:                                              ; preds = %840
  store i32 0, ptr %6, align 4
  br label %846

846:                                              ; preds = %845, %828, %631
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  %847 = load i32, ptr %6, align 4
  switch i32 %847, label %951 [
    i32 0, label %848
    i32 12, label %849
  ]

848:                                              ; preds = %846
  br label %849

849:                                              ; preds = %848, %846
  %850 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %850, ptr %21, align 4, !tbaa !5
  br label %480, !llvm.loop !24

851:                                              ; preds = %795, %739, %632, %595, %583
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  br label %852

852:                                              ; preds = %851, %579, %575
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %941

853:                                              ; preds = %484
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  %854 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %855 unwind label %864

855:                                              ; preds = %853
  %856 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %50, i32 0, i32 0
  store ptr %854, ptr %856, align 8
  %857 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #8
  %858 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %857) #8
  %859 = load i32, ptr %858, align 4, !tbaa !5
  store i32 %859, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  %860 = load i32, ptr %19, align 4, !tbaa !5
  %861 = load i32, ptr %13, align 4, !tbaa !5
  %862 = icmp eq i32 %860, %861
  br i1 %862, label %863, label %868

863:                                              ; preds = %855
  store i32 8, ptr %6, align 4
  br label %937, !llvm.loop !25

864:                                              ; preds = %853
  %865 = landingpad { ptr, i32 }
          cleanup
  %866 = extractvalue { ptr, i32 } %865, 0
  store ptr %866, ptr %9, align 8
  %867 = extractvalue { ptr, i32 } %865, 1
  store i32 %867, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br label %941

868:                                              ; preds = %855
  %869 = load i32, ptr %19, align 4, !tbaa !5
  %870 = load i32, ptr %19, align 4, !tbaa !5
  %871 = sext i32 %870 to i64
  %872 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %871
  %873 = load i32, ptr %872, align 4, !tbaa !5
  %874 = sext i32 %873 to i64
  %875 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %874
  %876 = getelementptr inbounds %struct.Node, ptr %875, i32 0, i32 3
  %877 = load i32, ptr %876, align 4, !tbaa !21
  %878 = add nsw i32 %869, %877
  store i32 %878, ptr %21, align 4, !tbaa !5
  %879 = load i32, ptr %13, align 4, !tbaa !5
  %880 = load i32, ptr %19, align 4, !tbaa !5
  %881 = sub nsw i32 %879, %880
  store i32 %881, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %882 = load i32, ptr %19, align 4, !tbaa !5
  %883 = sext i32 %882 to i64
  %884 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %883
  %885 = load i32, ptr %884, align 4, !tbaa !5
  %886 = load i32, ptr %22, align 4, !tbaa !5
  %887 = invoke i64 @_Z5splitii(i32 noundef %885, i32 noundef %886)
          to label %888 unwind label %922

888:                                              ; preds = %868
  store i64 %887, ptr %51, align 4
  %889 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(8) %51) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  %890 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %891 = load i32, ptr %890, align 4, !tbaa !20
  %892 = sext i32 %891 to i64
  %893 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %892
  %894 = getelementptr inbounds %struct.Node, ptr %893, i32 0, i32 6
  %895 = load i32, ptr %894, align 4, !tbaa !14
  %896 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %897 = load i32, ptr %896, align 4, !tbaa !17
  %898 = sext i32 %897 to i64
  %899 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %898
  %900 = getelementptr inbounds %struct.Node, ptr %899, i32 0, i32 5
  %901 = load i32, ptr %900, align 4, !tbaa !19
  %902 = add nsw i32 %901, 1
  %903 = srem i32 %902, 3
  %904 = icmp eq i32 %895, %903
  br i1 %904, label %905, label %926

905:                                              ; preds = %888
  %906 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %907 = load i32, ptr %906, align 4, !tbaa !20
  %908 = load i32, ptr %19, align 4, !tbaa !5
  %909 = sext i32 %908 to i64
  %910 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %909
  store i32 %907, ptr %910, align 4, !tbaa !5
  %911 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %912 = load i32, ptr %911, align 4, !tbaa !17
  %913 = load i32, ptr %13, align 4, !tbaa !5
  %914 = sext i32 %913 to i64
  %915 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %914
  store i32 %912, ptr %915, align 4, !tbaa !5
  %916 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %917 unwind label %370

917:                                              ; preds = %905
  %918 = getelementptr inbounds { ptr, i8 }, ptr %52, i32 0, i32 0
  %919 = extractvalue { ptr, i8 } %916, 0
  store ptr %919, ptr %918, align 8
  %920 = getelementptr inbounds { ptr, i8 }, ptr %52, i32 0, i32 1
  %921 = extractvalue { ptr, i8 } %916, 1
  store i8 %921, ptr %920, align 8
  br label %936

922:                                              ; preds = %868
  %923 = landingpad { ptr, i32 }
          cleanup
  %924 = extractvalue { ptr, i32 } %923, 0
  store ptr %924, ptr %9, align 8
  %925 = extractvalue { ptr, i32 } %923, 1
  store i32 %925, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  br label %941

926:                                              ; preds = %888
  %927 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 0
  %928 = load i32, ptr %927, align 4, !tbaa !20
  %929 = getelementptr inbounds %"struct.std::pair.0", ptr %23, i32 0, i32 1
  %930 = load i32, ptr %929, align 4, !tbaa !17
  %931 = invoke noundef i32 @_Z5mergeii(i32 noundef %928, i32 noundef %930)
          to label %932 unwind label %370

932:                                              ; preds = %926
  %933 = load i32, ptr %19, align 4, !tbaa !5
  %934 = sext i32 %933 to i64
  %935 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %934
  store i32 %931, ptr %935, align 4, !tbaa !5
  br label %936

936:                                              ; preds = %932, %917
  store i32 0, ptr %6, align 4
  br label %937

937:                                              ; preds = %936, %863
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %938

938:                                              ; preds = %937, %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  %939 = load i32, ptr %6, align 4
  switch i32 %939, label %951 [
    i32 0, label %940
    i32 8, label %168
  ]

940:                                              ; preds = %938
  br label %168, !llvm.loop !25

941:                                              ; preds = %922, %864, %852, %464, %382, %370
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %942

942:                                              ; preds = %941, %366
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %943

943:                                              ; preds = %942, %257, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %945

944:                                              ; preds = %168
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #8
  ret void

945:                                              ; preds = %943, %151
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #8
  br label %946

946:                                              ; preds = %945
  %947 = load ptr, ptr %9, align 8
  %948 = load i32, ptr %10, align 4
  %949 = insertvalue { ptr, i32 } poison, ptr %947, 0
  %950 = insertvalue { ptr, i32 } %949, i32 %948, 1
  resume { ptr, i32 } %950

951:                                              ; preds = %938, %846
  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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7newNodei(i32 noundef) #6

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z5mergeii(i32 noundef, i32 noundef) #6

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_Z5splitii(i32 noundef, i32 noundef) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updi(i32 noundef) #7

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !6, i64 24}
!15 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24}
!16 = distinct !{!16, !13}
!17 = !{!18, !6, i64 4}
!18 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!19 = !{!15, !6, i64 20}
!20 = !{!18, !6, i64 0}
!21 = !{!15, !6, i64 12}
!22 = !{!15, !6, i64 16}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !13}
!25 = distinct !{!25, !13}


; 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"

%struct.Node = type { i32, i32, i32, i32, i32, i32, i32 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<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 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair.0" = type { i32, i32 }

@pat = external dso_local local_unnamed_addr global ptr, align 8
@ptot = external dso_local local_unnamed_addr global i32, align 4
@pool = external dso_local local_unnamed_addr global [200001 x %struct.Node], align 16
@_ZZ5solvevE3buf = external hidden global [200001 x i8], align 16
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@_ZZ5solvevE2rt = external hidden global [200001 x i32], align 16
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [57 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 i32, align 4
  %3 = alloca %"class.std::set", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair.0", align 8
  %13 = alloca %"struct.std::pair.0", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair.0", align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair.0", align 8
  %18 = alloca %"struct.std::pair.0", align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair.0", align 8
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %"struct.std::pair.0", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull @_ZZ5solvevE3buf)
  %24 = icmp eq i32 %23, 3
  %25 = load i32, ptr %1, align 4
  %26 = add i32 %25, -1
  %27 = icmp ult i32 %26, 200000
  %or.cond3 = select i1 %24, i1 %27, i1 false
  %28 = load i32, ptr %2, align 4
  %29 = add i32 %28, -1
  %30 = icmp ult i32 %29, 200000
  %or.cond7 = select i1 %or.cond3, i1 %30, i1 false
  br i1 %or.cond7, label %31, label %.critedge

31:                                               ; preds = %0
  %32 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) @_ZZ5solvevE3buf) #9
  %33 = zext nneg i32 %25 to i64
  %34 = icmp eq i64 %32, %33
  br i1 %34, label %35, label %.critedge

.critedge:                                        ; preds = %0, %31
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 80, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  store i32 1, ptr @ptot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 1, ptr %4, align 4, !tbaa !5
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %.not143 = icmp slt i32 %36, 1
  br i1 %.not143, label %._crit_edge, label %.preheader

.preheader:                                       ; preds = %35, %82
  %.0145 = phi i32 [ %.1, %82 ], [ -1, %35 ]
  %storemerge144 = phi i32 [ %83, %82 ], [ 0, %35 ]
  %37 = sext i32 %storemerge144 to i64
  %38 = getelementptr inbounds [200001 x i8], ptr @_ZZ5solvevE3buf, i64 0, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !9
  %40 = load ptr, ptr @pat, align 8, !tbaa !10
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = icmp eq i8 %39, %41
  br i1 %42, label %58, label %49

._crit_edge:                                      ; preds = %82, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr %2, align 4, !tbaa !5
  %.not101153 = icmp eq i32 %43, 0
  br i1 %.not101153, label %._crit_edge156, label %.lr.ph155

.lr.ph155:                                        ; preds = %._crit_edge
  %45 = getelementptr inbounds i8, ptr %12, i64 4
  %46 = getelementptr inbounds i8, ptr %15, i64 4
  %47 = getelementptr inbounds i8, ptr %17, i64 4
  %48 = getelementptr inbounds i8, ptr %13, i64 4
  br label %86

49:                                               ; preds = %.preheader
  %50 = getelementptr inbounds i8, ptr %40, i64 1
  %51 = load i8, ptr %50, align 1, !tbaa !9
  %52 = icmp eq i8 %39, %51
  br i1 %52, label %58, label %53

53:                                               ; preds = %49
  %54 = getelementptr inbounds i8, ptr %40, i64 2
  %55 = load i8, ptr %54, align 1, !tbaa !9
  %56 = icmp eq i8 %39, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 91, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

58:                                               ; preds = %53, %49, %.preheader
  %.cmp.not = phi i1 [ false, %.preheader ], [ false, %49 ], [ true, %53 ]
  %.080142.lcssa = phi i32 [ 0, %.preheader ], [ 1, %49 ], [ 2, %53 ]
  %59 = invoke noundef i32 @_Z7newNodei(i32 noundef %.080142.lcssa)
          to label %60 unwind label %76

60:                                               ; preds = %58
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %62
  store i32 %59, ptr %63, align 4, !tbaa !5
  %.not128 = icmp eq i32 %.0145, -1
  br i1 %.not128, label %78, label %64

64:                                               ; preds = %60
  %65 = sext i32 %.0145 to i64
  %66 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %68, i32 6
  %70 = load i32, ptr %69, align 4, !tbaa !12
  %71 = add nuw nsw i32 %.080142.lcssa, 1
  %72 = select i1 %.cmp.not, i32 0, i32 %71
  %.not129 = icmp eq i32 %70, %72
  br i1 %.not129, label %78, label %73

73:                                               ; preds = %64
  %74 = invoke noundef i32 @_Z5mergeii(i32 noundef %67, i32 noundef %59)
          to label %75 unwind label %76

75:                                               ; preds = %73
  store i32 %74, ptr %66, align 4, !tbaa !5
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  br label %82

76:                                               ; preds = %78, %73, %58
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %473

78:                                               ; preds = %64, %60
  %79 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %80 unwind label %76

80:                                               ; preds = %78
  %81 = load i32, ptr %4, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %80, %75
  %83 = phi i32 [ %.pre, %75 ], [ %81, %80 ]
  %.1 = phi i32 [ %.0145, %75 ], [ %81, %80 ]
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %4, align 4, !tbaa !5
  %85 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %83, %85
  br i1 %.not.not, label %.preheader, label %._crit_edge, !llvm.loop !14

86:                                               ; preds = %.lr.ph155, %467
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %87 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %5)
  %88 = icmp eq i32 %87, 1
  %89 = load i32, ptr %5, align 4
  %90 = add i32 %89, -1
  %91 = icmp ult i32 %90, 2
  %or.cond23 = select i1 %88, i1 %91, i1 false
  br i1 %or.cond23, label %92, label %.critedge11

.critedge11:                                      ; preds = %86
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 107, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

92:                                               ; preds = %86
  %93 = icmp eq i32 %89, 2
  br i1 %93, label %94, label %128

94:                                               ; preds = %92
  %95 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %6)
  %96 = icmp ne i32 %95, 1
  %97 = load i32, ptr %6, align 4
  %98 = icmp slt i32 %97, 1
  %or.cond13.not137 = select i1 %96, i1 true, i1 %98
  %99 = load i32, ptr %1, align 4
  %.not122 = icmp sgt i32 %97, %99
  %or.cond = select i1 %or.cond13.not137, i1 true, i1 %.not122
  br i1 %or.cond, label %.critedge15, label %100

.critedge15:                                      ; preds = %94
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3, i32 noundef 112, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

100:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %101 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %102 unwind label %124

102:                                              ; preds = %100
  store ptr %101, ptr %8, align 8
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %103) #8
  %105 = load i32, ptr %104, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = sub nsw i32 %106, %105
  %108 = sext i32 %105 to i64
  %109 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = invoke i64 @_Z5splitii(i32 noundef %110, i32 noundef %107)
          to label %112 unwind label %126

112:                                              ; preds = %102
  %.sroa.059.0.extract.trunc = trunc i64 %111 to i32
  %.sroa.5.0.extract.shift = lshr i64 %111, 32
  %.sroa.5.0.extract.trunc = trunc nuw i64 %.sroa.5.0.extract.shift to i32
  %113 = load ptr, ptr @pat, align 8, !tbaa !10
  %114 = ashr i64 %111, 32
  %115 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %114, i32 5
  %116 = load i32, ptr %115, align 4, !tbaa !16
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %113, i64 %117
  %119 = load i8, ptr %118, align 1, !tbaa !9
  %120 = sext i8 %119 to i32
  %121 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %120)
  %122 = invoke noundef i32 @_Z5mergeii(i32 noundef %.sroa.059.0.extract.trunc, i32 noundef %.sroa.5.0.extract.trunc)
          to label %123 unwind label %126

123:                                              ; preds = %112
  store i32 %122, ptr %109, align 4, !tbaa !5
  br label %467

124:                                              ; preds = %100
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %472

126:                                              ; preds = %112, %102
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %472

128:                                              ; preds = %92
  %129 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.9, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %130 = icmp eq i32 %129, 2
  %131 = load i32, ptr %6, align 4
  %132 = icmp sgt i32 %131, 0
  %or.cond17 = select i1 %130, i1 %132, i1 false
  br i1 %or.cond17, label %133, label %.critedge19

133:                                              ; preds = %128
  %134 = load i32, ptr %7, align 4, !tbaa !5
  %.not102 = icmp sgt i32 %131, %134
  %135 = load i32, ptr %1, align 4
  %.not103 = icmp sgt i32 %134, %135
  %or.cond132 = select i1 %.not102, i1 true, i1 %.not103
  br i1 %or.cond132, label %.critedge19, label %136

.critedge19:                                      ; preds = %133, %128
  call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.3, i32 noundef 122, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #10
  unreachable

136:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %137 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %138 unwind label %177

138:                                              ; preds = %136
  store ptr %137, ptr %10, align 8
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %139) #8
  %141 = load i32, ptr %140, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  store i32 %141, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %145, i32 3
  %147 = load i32, ptr %146, align 4, !tbaa !17
  %148 = add nsw i32 %147, %141
  store i32 %148, ptr %11, align 4, !tbaa !5
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = sub nsw i32 %149, %141
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %151 = invoke i64 @_Z5splitii(i32 noundef %144, i32 noundef %150)
          to label %152 unwind label %179

152:                                              ; preds = %138
  store i64 %151, ptr %12, align 8
  %153 = load i32, ptr %7, align 4, !tbaa !5
  %154 = load i32, ptr %11, align 4, !tbaa !5
  %155 = icmp slt i32 %153, %154
  %156 = lshr i64 %151, 32
  %157 = trunc nuw i64 %156 to i32
  br i1 %155, label %158, label %185

158:                                              ; preds = %152
  %159 = load i32, ptr %6, align 4, !tbaa !5
  %160 = add nsw i32 %153, 1
  %161 = sub i32 %160, %159
  %162 = invoke i64 @_Z5splitii(i32 noundef %157, i32 noundef %161)
          to label %163 unwind label %181

163:                                              ; preds = %158
  %.sroa.052.0.extract.trunc = trunc i64 %162 to i32
  %.sroa.9.0.extract.shift = lshr i64 %162, 32
  %.sroa.9.0.extract.trunc = trunc nuw i64 %.sroa.9.0.extract.shift to i32
  %sext105 = shl i64 %162, 32
  %164 = ashr exact i64 %sext105, 32
  %165 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %164, i32 6
  %166 = load i32, ptr %165, align 4, !tbaa !12
  %167 = invoke i64 @_Z5splitii(i32 noundef %.sroa.052.0.extract.trunc, i32 noundef 1)
          to label %168 unwind label %183

168:                                              ; preds = %163
  %.sroa.047.0.extract.trunc = trunc i64 %167 to i32
  %.sroa.750.0.extract.shift = lshr i64 %167, 32
  %.sroa.750.0.extract.trunc = trunc nuw i64 %.sroa.750.0.extract.shift to i32
  %sext106 = shl i64 %167, 32
  %169 = ashr exact i64 %sext106, 32
  %170 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %169, i32 4
  store i32 %166, ptr %170, align 4, !tbaa !18
  call void @_Z3updi(i32 noundef %.sroa.047.0.extract.trunc)
  %171 = invoke noundef i32 @_Z5mergeii(i32 noundef %.sroa.750.0.extract.trunc, i32 noundef %.sroa.047.0.extract.trunc)
          to label %172 unwind label %183

172:                                              ; preds = %168
  %173 = invoke noundef i32 @_Z5mergeii(i32 noundef %171, i32 noundef %.sroa.9.0.extract.trunc)
          to label %174 unwind label %183

174:                                              ; preds = %172
  store i32 %173, ptr %45, align 4, !tbaa !19
  %175 = load i32, ptr %12, align 8, !tbaa !21
  %176 = invoke noundef i32 @_Z5mergeii(i32 noundef %175, i32 noundef %173)
          to label %.sink.split unwind label %183

177:                                              ; preds = %136
  %178 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %471

179:                                              ; preds = %460, %450, %138
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %470

181:                                              ; preds = %158
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %470

183:                                              ; preds = %174, %172, %168, %163
  %184 = landingpad { ptr, i32 }
          cleanup
  br label %470

185:                                              ; preds = %152
  %186 = ashr i64 %151, 32
  %187 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %186, i32 6
  %188 = load i32, ptr %187, align 4, !tbaa !12
  %189 = invoke i64 @_Z5splitii(i32 noundef %157, i32 noundef 1)
          to label %190 unwind label %217

190:                                              ; preds = %185
  %.sroa.042.0.extract.trunc = trunc i64 %189 to i32
  %.sroa.745.0.extract.shift = lshr i64 %189, 32
  %.sroa.745.0.extract.trunc = trunc nuw i64 %.sroa.745.0.extract.shift to i32
  %sext = shl i64 %189, 32
  %191 = ashr exact i64 %sext, 32
  %192 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %191, i32 4
  store i32 %188, ptr %192, align 4, !tbaa !18
  call void @_Z3updi(i32 noundef %.sroa.042.0.extract.trunc)
  %193 = invoke noundef i32 @_Z5mergeii(i32 noundef %.sroa.745.0.extract.trunc, i32 noundef %.sroa.042.0.extract.trunc)
          to label %194 unwind label %217

194:                                              ; preds = %190
  store i32 %193, ptr %45, align 4, !tbaa !19
  %195 = load i32, ptr %12, align 8, !tbaa !21
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %196
  %198 = getelementptr inbounds i8, ptr %197, i64 12
  %199 = load i32, ptr %198, align 4, !tbaa !17
  %.not104 = icmp eq i32 %199, 0
  br i1 %.not104, label %219, label %200

200:                                              ; preds = %194
  %201 = getelementptr inbounds i8, ptr %197, i64 24
  %202 = load i32, ptr %201, align 4, !tbaa !12
  %203 = sext i32 %193 to i64
  %204 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %203, i32 5
  %205 = load i32, ptr %204, align 4, !tbaa !16
  %206 = add nsw i32 %205, 1
  %207 = srem i32 %206, 3
  %208 = icmp eq i32 %202, %207
  br i1 %208, label %209, label %219

209:                                              ; preds = %200
  %210 = load i32, ptr %9, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %211
  store i32 %195, ptr %212, align 4, !tbaa !5
  %213 = add nsw i32 %199, %210
  store i32 %213, ptr %9, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %214
  store i32 %193, ptr %215, align 4, !tbaa !5
  %216 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %223 unwind label %217

217:                                              ; preds = %219, %209, %190, %185
  %218 = landingpad { ptr, i32 }
          cleanup
  br label %470

219:                                              ; preds = %200, %194
  %220 = invoke noundef i32 @_Z5mergeii(i32 noundef %195, i32 noundef %193)
          to label %.sink.split unwind label %217

.sink.split:                                      ; preds = %219, %174
  %.sink = phi i32 [ %176, %174 ], [ %220, %219 ]
  %.sink163 = load i32, ptr %9, align 4, !tbaa !5
  %221 = sext i32 %.sink163 to i64
  %222 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %221
  store i32 %.sink, ptr %222, align 4, !tbaa !5
  br label %223

223:                                              ; preds = %.sink.split, %209
  %224 = load i32, ptr %11, align 4, !tbaa !5
  %225 = load i32, ptr %7, align 4, !tbaa !5
  %.not108149 = icmp sgt i32 %224, %225
  br i1 %.not108149, label %._crit_edge152, label %.lr.ph151

._crit_edge152:                                   ; preds = %415, %223
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  %226 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %419 unwind label %425

.lr.ph151:                                        ; preds = %223, %415
  %227 = phi i32 [ %416, %415 ], [ %225, %223 ]
  %228 = phi i32 [ %235, %415 ], [ %224, %223 ]
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %232, i32 3
  %234 = load i32, ptr %233, align 4, !tbaa !17
  %235 = add nsw i32 %234, %228
  %236 = load i32, ptr %9, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %240, i32 6
  %242 = load i32, ptr %241, align 4, !tbaa !12
  %243 = add nsw i32 %242, 2
  %244 = srem i32 %243, 3
  %245 = add nsw i32 %242, 1
  %246 = srem i32 %245, 3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %247 = icmp slt i32 %227, %235
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  br i1 %247, label %248, label %251

248:                                              ; preds = %.lr.ph151
  %reass.sub = sub i32 %227, %228
  %249 = add i32 %reass.sub, 1
  %250 = invoke i64 @_Z5splitii(i32 noundef %231, i32 noundef %249)
          to label %253 unwind label %278

251:                                              ; preds = %.lr.ph151
  store i32 0, ptr %14, align 4, !tbaa !5
  %252 = invoke i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %230, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %253 unwind label %280

253:                                              ; preds = %251, %248
  %storemerge109 = phi i64 [ %250, %248 ], [ %252, %251 ]
  store i64 %storemerge109, ptr %13, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  %254 = load i32, ptr %46, align 4, !tbaa !19
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %255, i32 3
  %257 = load i32, ptr %256, align 4, !tbaa !17
  %.not110146 = icmp eq i32 %257, 0
  br i1 %.not110146, label %.critedge21, label %.lr.ph

.lr.ph:                                           ; preds = %253, %272
  %258 = phi i64 [ %275, %272 ], [ %255, %253 ]
  %259 = phi i32 [ %274, %272 ], [ %254, %253 ]
  %260 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %258, i32 5
  %261 = load i32, ptr %260, align 4, !tbaa !16
  %262 = icmp eq i32 %261, %244
  br i1 %262, label %263, label %.critedge21

263:                                              ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %264 = invoke i64 @_Z5splitii(i32 noundef %259, i32 noundef 1)
          to label %265 unwind label %282

265:                                              ; preds = %263
  store i64 %264, ptr %17, align 8
  %266 = trunc i64 %264 to i32
  %sext160 = shl i64 %264, 32
  %267 = ashr exact i64 %sext160, 32
  %268 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %267, i32 4
  store i32 %242, ptr %268, align 4, !tbaa !18
  call void @_Z3updi(i32 noundef %266)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #8
  %269 = load i32, ptr %15, align 4, !tbaa !21
  %270 = load i32, ptr %17, align 8, !tbaa !21
  %271 = invoke noundef i32 @_Z5mergeii(i32 noundef %269, i32 noundef %270)
          to label %272 unwind label %284

272:                                              ; preds = %265
  store i32 %271, ptr %19, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %47)
  %273 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  %274 = load i32, ptr %46, align 4, !tbaa !19
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %275, i32 3
  %277 = load i32, ptr %276, align 4, !tbaa !17
  %.not110 = icmp eq i32 %277, 0
  br i1 %.not110, label %.critedge21, label %.lr.ph, !llvm.loop !22

278:                                              ; preds = %248
  %279 = landingpad { ptr, i32 }
          cleanup
  br label %418

280:                                              ; preds = %251
  %281 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br label %418

282:                                              ; preds = %263
  %283 = landingpad { ptr, i32 }
          cleanup
  br label %286

284:                                              ; preds = %265
  %285 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  br label %286

286:                                              ; preds = %284, %282
  %.pn116 = phi { ptr, i32 } [ %285, %284 ], [ %283, %282 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %417

.critedge21:                                      ; preds = %.lr.ph, %272, %253
  %287 = load i32, ptr %15, align 4, !tbaa !21
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %288, i32 3
  %290 = load i32, ptr %289, align 4, !tbaa !17
  %.not111 = icmp eq i32 %290, 0
  br i1 %.not111, label %314, label %291

291:                                              ; preds = %.critedge21
  %292 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %293 unwind label %309

293:                                              ; preds = %291
  %294 = load i32, ptr %9, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %295
  %297 = load i32, ptr %296, align 4, !tbaa !5
  %298 = load i32, ptr %15, align 4, !tbaa !21
  %299 = invoke noundef i32 @_Z5mergeii(i32 noundef %297, i32 noundef %298)
          to label %300 unwind label %309

300:                                              ; preds = %293
  %301 = load i32, ptr %9, align 4, !tbaa !5
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %302
  store i32 %299, ptr %303, align 4, !tbaa !5
  %304 = sext i32 %299 to i64
  %305 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %304, i32 3
  %306 = load i32, ptr %305, align 4, !tbaa !17
  %307 = add nsw i32 %306, %301
  store i32 %307, ptr %11, align 4, !tbaa !5
  %308 = icmp eq i32 %307, %235
  br i1 %308, label %415, label %311

309:                                              ; preds = %410, %408, %386, %363, %353, %311, %293, %291
  %310 = landingpad { ptr, i32 }
          cleanup
  br label %417

311:                                              ; preds = %300
  %312 = load i32, ptr %46, align 4, !tbaa !19
  store i32 %312, ptr %13, align 8, !tbaa !21
  %313 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %314 unwind label %309

314:                                              ; preds = %311, %.critedge21
  %315 = load i32, ptr %13, align 8, !tbaa !21
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %316
  %318 = getelementptr inbounds i8, ptr %317, i64 12
  %319 = load i32, ptr %318, align 4, !tbaa !17
  %.not112 = icmp eq i32 %319, 0
  br i1 %.not112, label %369, label %320

320:                                              ; preds = %314
  %321 = getelementptr inbounds i8, ptr %317, i64 20
  %322 = load i32, ptr %321, align 4, !tbaa !16
  %323 = icmp eq i32 %322, %246
  br i1 %323, label %324, label %369

324:                                              ; preds = %320
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  %325 = load i32, ptr %9, align 4, !tbaa !5
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %326
  %328 = load i32, ptr %327, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %329, i32 3
  %331 = load i32, ptr %330, align 4, !tbaa !17
  %332 = add nsw i32 %331, -1
  %333 = invoke i64 @_Z5splitii(i32 noundef %328, i32 noundef %332)
          to label %334 unwind label %361

334:                                              ; preds = %324
  store i64 %333, ptr %20, align 8
  %335 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  %336 = load i32, ptr %46, align 4, !tbaa !19
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %337, i32 4
  store i32 %246, ptr %338, align 4, !tbaa !18
  call void @_Z3updi(i32 noundef %336)
  %339 = load i32, ptr %15, align 4, !tbaa !21
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %340
  %342 = getelementptr inbounds i8, ptr %341, i64 12
  %343 = load i32, ptr %342, align 4, !tbaa !17
  %.not113 = icmp eq i32 %343, 0
  %.pre158 = load i32, ptr %46, align 4, !tbaa !19
  br i1 %.not113, label %363, label %344

344:                                              ; preds = %334
  %345 = getelementptr inbounds i8, ptr %341, i64 24
  %346 = load i32, ptr %345, align 4, !tbaa !12
  %347 = sext i32 %.pre158 to i64
  %348 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %347, i32 5
  %349 = load i32, ptr %348, align 4, !tbaa !16
  %350 = add nsw i32 %349, 1
  %351 = srem i32 %350, 3
  %352 = icmp eq i32 %346, %351
  br i1 %352, label %353, label %363

353:                                              ; preds = %344
  %354 = load i32, ptr %9, align 4, !tbaa !5
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %355
  store i32 %339, ptr %356, align 4, !tbaa !5
  %357 = add nsw i32 %343, %354
  store i32 %357, ptr %9, align 4, !tbaa !5
  %358 = sext i32 %357 to i64
  %359 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %358
  store i32 %.pre158, ptr %359, align 4, !tbaa !5
  %360 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %369 unwind label %309

361:                                              ; preds = %324
  %362 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  br label %417

363:                                              ; preds = %344, %334
  %364 = invoke noundef i32 @_Z5mergeii(i32 noundef %339, i32 noundef %.pre158)
          to label %365 unwind label %309

365:                                              ; preds = %363
  %366 = load i32, ptr %9, align 4, !tbaa !5
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %367
  store i32 %364, ptr %368, align 4, !tbaa !5
  br label %369

369:                                              ; preds = %353, %365, %320, %314
  %370 = load i32, ptr %13, align 8, !tbaa !21
  %371 = sext i32 %370 to i64
  %372 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %371
  %373 = getelementptr inbounds i8, ptr %372, i64 12
  %374 = load i32, ptr %373, align 4, !tbaa !17
  %.not114 = icmp eq i32 %374, 0
  br i1 %.not114, label %386, label %375

375:                                              ; preds = %369
  %376 = getelementptr inbounds i8, ptr %372, i64 24
  %377 = load i32, ptr %376, align 4, !tbaa !12
  %378 = invoke i64 @_Z5splitii(i32 noundef %370, i32 noundef 1)
          to label %379 unwind label %384

379:                                              ; preds = %375
  %.sroa.024.0.extract.trunc = trunc i64 %378 to i32
  %.sroa.7.0.extract.shift = lshr i64 %378, 32
  %.sroa.7.0.extract.trunc = trunc nuw i64 %.sroa.7.0.extract.shift to i32
  %sext115 = shl i64 %378, 32
  %380 = ashr exact i64 %sext115, 32
  %381 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %380, i32 4
  store i32 %377, ptr %381, align 4, !tbaa !18
  call void @_Z3updi(i32 noundef %.sroa.024.0.extract.trunc)
  %382 = invoke noundef i32 @_Z5mergeii(i32 noundef %.sroa.7.0.extract.trunc, i32 noundef %.sroa.024.0.extract.trunc)
          to label %383 unwind label %384

383:                                              ; preds = %379
  store i32 %382, ptr %13, align 8, !tbaa !21
  br label %386

384:                                              ; preds = %379, %375
  %385 = landingpad { ptr, i32 }
          cleanup
  br label %417

386:                                              ; preds = %383, %369
  %387 = phi i32 [ %382, %383 ], [ %370, %369 ]
  %388 = load i32, ptr %48, align 4, !tbaa !19
  %389 = invoke noundef i32 @_Z5mergeii(i32 noundef %387, i32 noundef %388)
          to label %390 unwind label %309

390:                                              ; preds = %386
  %391 = load i32, ptr %11, align 4, !tbaa !5
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %392
  store i32 %389, ptr %393, align 4, !tbaa !5
  %394 = load i32, ptr %9, align 4, !tbaa !5
  %395 = sext i32 %394 to i64
  %396 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %395
  %397 = load i32, ptr %396, align 4, !tbaa !5
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %398, i32 6
  %400 = load i32, ptr %399, align 4, !tbaa !12
  %401 = sext i32 %389 to i64
  %402 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %401, i32 5
  %403 = load i32, ptr %402, align 4, !tbaa !16
  %404 = add nsw i32 %403, 1
  %405 = srem i32 %404, 3
  %406 = icmp eq i32 %400, %405
  br i1 %406, label %407, label %408

407:                                              ; preds = %390
  store i32 %391, ptr %9, align 4, !tbaa !5
  br label %415

408:                                              ; preds = %390
  %409 = invoke noundef i32 @_Z5mergeii(i32 noundef %397, i32 noundef %389)
          to label %410 unwind label %309

410:                                              ; preds = %408
  %411 = load i32, ptr %9, align 4, !tbaa !5
  %412 = sext i32 %411 to i64
  %413 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %412
  store i32 %409, ptr %413, align 4, !tbaa !5
  %414 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %415 unwind label %309

415:                                              ; preds = %410, %300, %407
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  store i32 %235, ptr %11, align 4, !tbaa !5
  %416 = load i32, ptr %7, align 4, !tbaa !5
  %.not108 = icmp sgt i32 %235, %416
  br i1 %.not108, label %._crit_edge152, label %.lr.ph151, !llvm.loop !23

417:                                              ; preds = %384, %361, %309, %286
  %.pn116.pn = phi { ptr, i32 } [ %.pn116, %286 ], [ %310, %309 ], [ %385, %384 ], [ %362, %361 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %418

418:                                              ; preds = %417, %280, %278
  %.pn116.pn.pn = phi { ptr, i32 } [ %.pn116.pn, %417 ], [ %279, %278 ], [ %281, %280 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %470

419:                                              ; preds = %._crit_edge152
  store ptr %226, ptr %21, align 8
  %420 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  %421 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %420) #8
  %422 = load i32, ptr %421, align 4, !tbaa !5
  store i32 %422, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  %423 = load i32, ptr %6, align 4, !tbaa !5
  %424 = icmp eq i32 %422, %423
  br i1 %424, label %466, label %427, !llvm.loop !24

425:                                              ; preds = %._crit_edge152
  %426 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  br label %470

427:                                              ; preds = %419
  %428 = sext i32 %422 to i64
  %429 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %428
  %430 = load i32, ptr %429, align 4, !tbaa !5
  %431 = sext i32 %430 to i64
  %432 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %431, i32 3
  %433 = load i32, ptr %432, align 4, !tbaa !17
  %434 = add nsw i32 %433, %422
  store i32 %434, ptr %11, align 4, !tbaa !5
  %435 = sub nsw i32 %423, %422
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  %436 = invoke i64 @_Z5splitii(i32 noundef %430, i32 noundef %435)
          to label %437 unwind label %458

437:                                              ; preds = %427
  store i64 %436, ptr %22, align 8
  %438 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  %439 = load i32, ptr %12, align 8, !tbaa !21
  %440 = sext i32 %439 to i64
  %441 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %440, i32 6
  %442 = load i32, ptr %441, align 4, !tbaa !12
  %443 = load i32, ptr %45, align 4, !tbaa !19
  %444 = sext i32 %443 to i64
  %445 = getelementptr inbounds [200001 x %struct.Node], ptr @pool, i64 0, i64 %444, i32 5
  %446 = load i32, ptr %445, align 4, !tbaa !16
  %447 = add nsw i32 %446, 1
  %448 = srem i32 %447, 3
  %449 = icmp eq i32 %442, %448
  br i1 %449, label %450, label %460

450:                                              ; preds = %437
  %451 = load i32, ptr %9, align 4, !tbaa !5
  %452 = sext i32 %451 to i64
  %453 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %452
  store i32 %439, ptr %453, align 4, !tbaa !5
  %454 = load i32, ptr %6, align 4, !tbaa !5
  %455 = sext i32 %454 to i64
  %456 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %455
  store i32 %443, ptr %456, align 4, !tbaa !5
  %457 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %466 unwind label %179

458:                                              ; preds = %427
  %459 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  br label %470

460:                                              ; preds = %437
  %461 = invoke noundef i32 @_Z5mergeii(i32 noundef %439, i32 noundef %443)
          to label %462 unwind label %179

462:                                              ; preds = %460
  %463 = load i32, ptr %9, align 4, !tbaa !5
  %464 = sext i32 %463 to i64
  %465 = getelementptr inbounds [200001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %464
  store i32 %461, ptr %465, align 4, !tbaa !5
  br label %466

466:                                              ; preds = %462, %450, %419
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %467

467:                                              ; preds = %466, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %468 = load i32, ptr %2, align 4, !tbaa !5
  %469 = add nsw i32 %468, -1
  store i32 %469, ptr %2, align 4, !tbaa !5
  %.not101 = icmp eq i32 %468, 0
  br i1 %.not101, label %._crit_edge156, label %86

470:                                              ; preds = %181, %183, %458, %425, %418, %217, %179
  %.pn116.pn.pn.pn = phi { ptr, i32 } [ %.pn116.pn.pn, %418 ], [ %180, %179 ], [ %459, %458 ], [ %426, %425 ], [ %218, %217 ], [ %184, %183 ], [ %182, %181 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %471

471:                                              ; preds = %470, %177
  %.pn116.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn116.pn.pn.pn, %470 ], [ %178, %177 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %472

472:                                              ; preds = %124, %126, %471
  %.pn124.pn = phi { ptr, i32 } [ %.pn116.pn.pn.pn.pn, %471 ], [ %127, %126 ], [ %125, %124 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %473

._crit_edge156:                                   ; preds = %467, %._crit_edge
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret void

473:                                              ; preds = %472, %76
  %.pn130 = phi { ptr, i32 } [ %77, %76 ], [ %.pn124.pn, %472 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn130
}

; 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: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7newNodei(i32 noundef) local_unnamed_addr #6

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z5mergeii(i32 noundef, i32 noundef) local_unnamed_addr #6

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_Z5splitii(i32 noundef, i32 noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updi(i32 noundef) local_unnamed_addr #7

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 24}
!13 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!13, !6, i64 20}
!17 = !{!13, !6, i64 12}
!18 = !{!13, !6, i64 16}
!19 = !{!20, !6, i64 4}
!20 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!21 = !{!20, !6, i64 0}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}


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