; LLVM IR from Tudor67/Competitive-Programming :: Codeforces/#710#div3/E/E.ll (Z5solveRSiRSo)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.4" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"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 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveRSiRSo(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::vector.0", align 8
  %17 = alloca i8, align 1
  %18 = alloca %"class.std::allocator.4", align 1
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::_Bit_reference", align 8
  %21 = alloca %"class.std::set", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::_Bit_reference", align 8
  %24 = alloca %"struct.std::pair", align 8
  %25 = alloca %"class.std::set", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %32 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %33 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %34 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = add nsw i32 %39, 1
  %41 = sext i32 %40 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %42 unwind label %48

42:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %59, %42
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = load i32, ptr %5, align 4, !tbaa !9
  %46 = icmp sle i32 %44, %45
  br i1 %46, label %52, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %66

48:                                               ; preds = %2
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %8, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  br label %336

52:                                               ; preds = %43
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %55) #6
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 4 dereferenceable(4) %56)
          to label %58 unwind label %62

58:                                               ; preds = %52
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %10, align 4, !tbaa !9
  br label %43, !llvm.loop !11

62:                                               ; preds = %52
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %8, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %335

66:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %69, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %70 unwind label %80

70:                                               ; preds = %66
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %73, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %74 unwind label %84

74:                                               ; preds = %70
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %115, %74
  %76 = load i32, ptr %15, align 4, !tbaa !9
  %77 = load i32, ptr %5, align 4, !tbaa !9
  %78 = icmp sle i32 %76, %77
  br i1 %78, label %88, label %79

79:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %118

80:                                               ; preds = %66
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %8, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %334

84:                                               ; preds = %70
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %8, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  br label %333

88:                                               ; preds = %75
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = sub nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %91) #6
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = load i32, ptr %15, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %95) #6
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = icmp ne i32 %93, %97
  br i1 %98, label %99, label %114

99:                                               ; preds = %88
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %101) #6
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = load i32, ptr %15, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %105) #6
  store i32 %103, ptr %106, align 4, !tbaa !9
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %108) #6
  %110 = load i32, ptr %109, align 4, !tbaa !9
  %111 = load i32, ptr %15, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %112) #6
  store i32 %110, ptr %113, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %99, %88
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %15, align 4, !tbaa !9
  br label %75, !llvm.loop !13

118:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #6
  %119 = load i32, ptr %5, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 0, ptr %17, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef %121, ptr noundef nonnull align 1 dereferenceable(1) %17, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %122 unwind label %128

122:                                              ; preds = %118
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %145, %122
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = load i32, ptr %5, align 4, !tbaa !9
  %126 = icmp sle i32 %124, %125
  br i1 %126, label %132, label %127

127:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %152

128:                                              ; preds = %118
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %8, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  br label %332

132:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  %133 = load i32, ptr %19, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %134) #6
  %136 = load i32, ptr %135, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef %137)
          to label %139 unwind label %148

139:                                              ; preds = %132
  %140 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %141 = extractvalue { ptr, i64 } %138, 0
  store ptr %141, ptr %140, align 8
  %142 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %143 = extractvalue { ptr, i64 } %138, 1
  store i64 %143, ptr %142, align 8
  %144 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %20, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  br label %145

145:                                              ; preds = %139
  %146 = load i32, ptr %19, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %19, align 4, !tbaa !9
  br label %123, !llvm.loop !16

148:                                              ; preds = %132
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %8, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %331

152:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 48, ptr %21) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 1, ptr %22, align 4, !tbaa !9
  br label %153

153:                                              ; preds = %185, %152
  %154 = load i32, ptr %22, align 4, !tbaa !9
  %155 = load i32, ptr %5, align 4, !tbaa !9
  %156 = icmp sle i32 %154, %155
  br i1 %156, label %158, label %157

157:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %189

158:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  %159 = load i32, ptr %22, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef %160)
          to label %162 unwind label %176

162:                                              ; preds = %158
  %163 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %164 = extractvalue { ptr, i64 } %161, 0
  store ptr %164, ptr %163, align 8
  %165 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %166 = extractvalue { ptr, i64 } %161, 1
  store i64 %166, ptr %165, align 8
  %167 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %23) #6
  %168 = xor i1 %167, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  br i1 %168, label %169, label %184

169:                                              ; preds = %162
  %170 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %171 unwind label %180

171:                                              ; preds = %169
  %172 = getelementptr inbounds { ptr, i8 }, ptr %24, i32 0, i32 0
  %173 = extractvalue { ptr, i8 } %170, 0
  store ptr %173, ptr %172, align 8
  %174 = getelementptr inbounds { ptr, i8 }, ptr %24, i32 0, i32 1
  %175 = extractvalue { ptr, i8 } %170, 1
  store i8 %175, ptr %174, align 8
  br label %184

176:                                              ; preds = %158
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %8, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  br label %188

180:                                              ; preds = %169
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %8, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %9, align 4
  br label %188

184:                                              ; preds = %171, %162
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %22, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %22, align 4, !tbaa !9
  br label %153, !llvm.loop !17

188:                                              ; preds = %180, %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %330

189:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 48, ptr %25) #6
  invoke void @_ZNSt3setIiSt4lessIiESaIiEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(48) %25, ptr noundef nonnull align 8 dereferenceable(48) %21)
          to label %190 unwind label %196

190:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 1, ptr %26, align 4, !tbaa !9
  br label %191

191:                                              ; preds = %224, %190
  %192 = load i32, ptr %26, align 4, !tbaa !9
  %193 = load i32, ptr %5, align 4, !tbaa !9
  %194 = icmp sle i32 %192, %193
  br i1 %194, label %200, label %195

195:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %227

196:                                              ; preds = %189
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %8, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %9, align 4
  br label %329

200:                                              ; preds = %191
  %201 = load i32, ptr %26, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %202) #6
  %204 = load i32, ptr %203, align 4, !tbaa !9
  %205 = icmp eq i32 %204, 0
  br i1 %205, label %206, label %223

206:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %207 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #6
  %208 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  store ptr %207, ptr %208, align 8
  %209 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  %210 = load i32, ptr %209, align 4, !tbaa !9
  %211 = load i32, ptr %26, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %212) #6
  store i32 %210, ptr %213, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %27, i64 8, i1 false), !tbaa.struct !18
  %214 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %28, i32 0, i32 0
  %215 = load ptr, ptr %214, align 8
  %216 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr %215)
          to label %217 unwind label %219

217:                                              ; preds = %206
  %218 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %29, i32 0, i32 0
  store ptr %216, ptr %218, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %223

219:                                              ; preds = %206
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %8, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %328

223:                                              ; preds = %217, %200
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %26, align 4, !tbaa !9
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %26, align 4, !tbaa !9
  br label %191, !llvm.loop !19

227:                                              ; preds = %195
  %228 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIiSt4lessIiESaIiEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 8 dereferenceable(48) %25)
          to label %229 unwind label %235

229:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 1, ptr %30, align 4, !tbaa !9
  br label %230

230:                                              ; preds = %272, %229
  %231 = load i32, ptr %30, align 4, !tbaa !9
  %232 = load i32, ptr %5, align 4, !tbaa !9
  %233 = icmp sle i32 %231, %232
  br i1 %233, label %239, label %234

234:                                              ; preds = %230
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %275

235:                                              ; preds = %324, %298, %227
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %8, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %9, align 4
  br label %328

239:                                              ; preds = %230
  %240 = load i32, ptr %30, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %241) #6
  %243 = load i32, ptr %242, align 4, !tbaa !9
  %244 = icmp eq i32 %243, 0
  br i1 %244, label %245, label %271

245:                                              ; preds = %239
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %246 = load i32, ptr %30, align 4, !tbaa !9
  %247 = sext i32 %246 to i64
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %247) #6
  %249 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11lower_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 4 dereferenceable(4) %248)
          to label %250 unwind label %267

250:                                              ; preds = %245
  %251 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %32, i32 0, i32 0
  store ptr %249, ptr %251, align 8
  %252 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %32, i32 0, i32 0
  %253 = load ptr, ptr %252, align 8
  %254 = invoke ptr @_ZSt4prevISt23_Rb_tree_const_iteratorIiEET_S2_NSt15iterator_traitsIS2_E15difference_typeE(ptr %253, i64 noundef 1)
          to label %255 unwind label %267

255:                                              ; preds = %250
  %256 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %31, i32 0, i32 0
  store ptr %254, ptr %256, align 8
  %257 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  %258 = load i32, ptr %257, align 4, !tbaa !9
  %259 = load i32, ptr %30, align 4, !tbaa !9
  %260 = sext i32 %259 to i64
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %260) #6
  store i32 %258, ptr %261, align 4, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %31, i64 8, i1 false), !tbaa.struct !18
  %262 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %33, i32 0, i32 0
  %263 = load ptr, ptr %262, align 8
  %264 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr %263)
          to label %265 unwind label %267

265:                                              ; preds = %255
  %266 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %34, i32 0, i32 0
  store ptr %264, ptr %266, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %271

267:                                              ; preds = %255, %250, %245
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %8, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %328

271:                                              ; preds = %265, %239
  br label %272

272:                                              ; preds = %271
  %273 = load i32, ptr %30, align 4, !tbaa !9
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %30, align 4, !tbaa !9
  br label %230, !llvm.loop !20

275:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  store i32 1, ptr %35, align 4, !tbaa !9
  br label %276

276:                                              ; preds = %291, %275
  %277 = load i32, ptr %35, align 4, !tbaa !9
  %278 = load i32, ptr %5, align 4, !tbaa !9
  %279 = icmp sle i32 %277, %278
  br i1 %279, label %281, label %280

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

281:                                              ; preds = %276
  %282 = load ptr, ptr %4, align 8, !tbaa !5
  %283 = load i32, ptr %35, align 4, !tbaa !9
  %284 = sext i32 %283 to i64
  %285 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %284) #6
  %286 = load i32, ptr %285, align 4, !tbaa !9
  %287 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %282, i32 noundef %286)
          to label %288 unwind label %294

288:                                              ; preds = %281
  %289 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %287, ptr noundef @.str)
          to label %290 unwind label %294

290:                                              ; preds = %288
  br label %291

291:                                              ; preds = %290
  %292 = load i32, ptr %35, align 4, !tbaa !9
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %35, align 4, !tbaa !9
  br label %276, !llvm.loop !21

294:                                              ; preds = %288, %281
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %8, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %328

298:                                              ; preds = %280
  %299 = load ptr, ptr %4, align 8, !tbaa !5
  %300 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %299, ptr noundef @.str.1)
          to label %301 unwind label %235

301:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  store i32 1, ptr %36, align 4, !tbaa !9
  br label %302

302:                                              ; preds = %317, %301
  %303 = load i32, ptr %36, align 4, !tbaa !9
  %304 = load i32, ptr %5, align 4, !tbaa !9
  %305 = icmp sle i32 %303, %304
  br i1 %305, label %307, label %306

306:                                              ; preds = %302
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %324

307:                                              ; preds = %302
  %308 = load ptr, ptr %4, align 8, !tbaa !5
  %309 = load i32, ptr %36, align 4, !tbaa !9
  %310 = sext i32 %309 to i64
  %311 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %310) #6
  %312 = load i32, ptr %311, align 4, !tbaa !9
  %313 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %308, i32 noundef %312)
          to label %314 unwind label %320

314:                                              ; preds = %307
  %315 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %313, ptr noundef @.str)
          to label %316 unwind label %320

316:                                              ; preds = %314
  br label %317

317:                                              ; preds = %316
  %318 = load i32, ptr %36, align 4, !tbaa !9
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %36, align 4, !tbaa !9
  br label %302, !llvm.loop !22

320:                                              ; preds = %314, %307
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %8, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %328

324:                                              ; preds = %306
  %325 = load ptr, ptr %4, align 8, !tbaa !5
  %326 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %325, ptr noundef @.str.1)
          to label %327 unwind label %235

327:                                              ; preds = %324
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %25) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void

328:                                              ; preds = %320, %294, %267, %235, %219
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %25) #6
  br label %329

329:                                              ; preds = %328, %196
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #6
  br label %330

330:                                              ; preds = %329, %188
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #6
  br label %331

331:                                              ; preds = %330, %148
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #6
  br label %332

332:                                              ; preds = %331, %128
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %333

333:                                              ; preds = %332, %84
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %334

334:                                              ; preds = %333, %80
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  br label %335

335:                                              ; preds = %334, %62
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %336

336:                                              ; preds = %335, %48
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %337

337:                                              ; preds = %336
  %338 = load ptr, ptr %8, align 8
  %339 = load i32, ptr %9, align 4
  %340 = insertvalue { ptr, i32 } poison, ptr %338, 0
  %341 = insertvalue { ptr, i32 } %340, i32 %339, 1
  resume { ptr, i32 } %341
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; 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 void @_ZNSt3setIiSt4lessIiESaIiEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4prevISt23_Rb_tree_const_iteratorIiEET_S2_NSt15iterator_traitsIS2_E15difference_typeE(ptr, i64 noundef) #5

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.4" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"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 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveRSiRSo(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca i8, align 1
  %12 = alloca %"class.std::allocator.4", align 1
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca %"class.std::set", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca %"class.std::set", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  %23 = sext i32 %22 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %23, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %28

24:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %.not84 = icmp slt i32 %25, 1
  br i1 %.not84, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %32, %24
  %.lcssa82 = phi i32 [ %25, %24 ], [ %33, %32 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  %26 = add nsw i32 %.lcssa82, 1
  %27 = sext i32 %26 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %27, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %37 unwind label %45

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %176

.lr.ph:                                           ; preds = %24, %32
  %indvars.iv = phi i64 [ %indvars.iv.next, %32 ], [ 1, %24 ]
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #5
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %32 unwind label %35

32:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %.not.not = icmp slt i64 %indvars.iv, %34
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

35:                                               ; preds = %.lr.ph
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %175

37:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %40, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %41 unwind label %47

41:                                               ; preds = %37
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %.not5886 = icmp slt i32 %42, 1
  br i1 %.not5886, label %._crit_edge90, label %.lr.ph89

._crit_edge90:                                    ; preds = %61, %41
  %.lcssa = phi i32 [ %42, %41 ], [ %62, %61 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #5
  %43 = add nsw i32 %.lcssa, 1
  %44 = sext i32 %43 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  store i8 0, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %44, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %64 unwind label %69

45:                                               ; preds = %._crit_edge
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  br label %174

47:                                               ; preds = %37
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  br label %173

.lr.ph89:                                         ; preds = %41, %61
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %61 ], [ 1, %41 ]
  %49 = add nsw i64 %indvars.iv120, -1
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %49) #5
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv120) #5
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %.not75 = icmp eq i32 %51, %53
  br i1 %.not75, label %61, label %54

54:                                               ; preds = %.lr.ph89
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv120) #5
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv120) #5
  store i32 %56, ptr %57, align 4, !tbaa !5
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv120) #5
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv120) #5
  store i32 %59, ptr %60, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %.lr.ph89, %54
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %.not58.not = icmp slt i64 %indvars.iv120, %63
  br i1 %.not58.not, label %.lr.ph89, label %._crit_edge90, !llvm.loop !13

64:                                               ; preds = %._crit_edge90
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %.not5992 = icmp slt i32 %65, 1
  br i1 %.not5992, label %._crit_edge96, label %.lr.ph95

.lr.ph95:                                         ; preds = %64
  %66 = getelementptr inbounds i8, ptr %13, i64 8
  br label %71

._crit_edge96:                                    ; preds = %76, %64
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %14) #5
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  store i32 1, ptr %15, align 4, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %.not6097 = icmp slt i32 %67, 1
  br i1 %.not6097, label %._crit_edge101, label %.lr.ph100

.lr.ph100:                                        ; preds = %._crit_edge96
  %68 = getelementptr inbounds i8, ptr %16, i64 8
  br label %85

69:                                               ; preds = %._crit_edge90
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %172

71:                                               ; preds = %.lr.ph95, %76
  %indvars.iv123 = phi i64 [ 1, %.lr.ph95 ], [ %indvars.iv.next124, %76 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv123) #5
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %74)
          to label %76 unwind label %82

76:                                               ; preds = %71
  %77 = extractvalue { ptr, i64 } %75, 0
  store ptr %77, ptr %13, align 8
  %78 = extractvalue { ptr, i64 } %75, 1
  store i64 %78, ptr %66, align 8
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %13, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %80 = load i32, ptr %3, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %.not59.not = icmp slt i64 %indvars.iv123, %81
  br i1 %.not59.not, label %71, label %._crit_edge96, !llvm.loop !14

82:                                               ; preds = %71
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %171

._crit_edge101:                                   ; preds = %98, %._crit_edge96
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %17) #5
  invoke void @_ZNSt3setIiSt4lessIiESaIiEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(48) %17, ptr noundef nonnull align 8 dereferenceable(48) %14)
          to label %.preheader81 unwind label %105

.preheader81:                                     ; preds = %._crit_edge101
  %84 = load i32, ptr %3, align 4, !tbaa !5
  %.not61102 = icmp slt i32 %84, 1
  br i1 %.not61102, label %._crit_edge105, label %.lr.ph104

85:                                               ; preds = %.lr.ph100, %98
  %storemerge98 = phi i32 [ 1, %.lr.ph100 ], [ %100, %98 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #5
  %86 = sext i32 %storemerge98 to i64
  %87 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %86)
          to label %88 unwind label %94

88:                                               ; preds = %85
  %89 = extractvalue { ptr, i64 } %87, 0
  store ptr %89, ptr %16, align 8
  %90 = extractvalue { ptr, i64 } %87, 1
  store i64 %90, ptr %68, align 8
  %91 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  br i1 %91, label %98, label %92

92:                                               ; preds = %88
  %93 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %98 unwind label %96

94:                                               ; preds = %85
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  br label %102

96:                                               ; preds = %92
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %102

98:                                               ; preds = %92, %88
  %99 = load i32, ptr %15, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %15, align 4, !tbaa !5
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %.not60.not = icmp slt i32 %99, %101
  br i1 %.not60.not, label %85, label %._crit_edge101, !llvm.loop !15

102:                                              ; preds = %96, %94
  %.pn67 = phi { ptr, i32 } [ %97, %96 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  br label %170

._crit_edge105:                                   ; preds = %119, %.preheader81
  %103 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIiSt4lessIiESaIiEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(48) %17)
          to label %.preheader80 unwind label %123

.preheader80:                                     ; preds = %._crit_edge105
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %.not62106 = icmp slt i32 %104, 1
  br i1 %.not62106, label %._crit_edge112, label %.lr.ph108

105:                                              ; preds = %._crit_edge101
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %169

.lr.ph104:                                        ; preds = %.preheader81, %119
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %119 ], [ 1, %.preheader81 ]
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv126) #5
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %119

110:                                              ; preds = %.lr.ph104
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  %111 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  store ptr %111, ptr %18, align 8
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv126) #5
  store i32 %113, ptr %114, align 4, !tbaa !5
  %.sroa.014.0.copyload = load ptr, ptr %18, align 8, !tbaa !16
  %115 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr %.sroa.014.0.copyload)
          to label %116 unwind label %117

116:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  br label %119

117:                                              ; preds = %110
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  br label %168

119:                                              ; preds = %.lr.ph104, %116
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %.not61.not = icmp slt i64 %indvars.iv126, %121
  br i1 %.not61.not, label %.lr.ph104, label %._crit_edge105, !llvm.loop !18

.preheader79:                                     ; preds = %141
  %122 = icmp slt i32 %142, 1
  br i1 %122, label %._crit_edge112, label %.lr.ph111

123:                                              ; preds = %._crit_edge116, %._crit_edge112, %._crit_edge105
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %168

.lr.ph108:                                        ; preds = %.preheader80, %141
  %indvars.iv129 = phi i64 [ %indvars.iv.next130, %141 ], [ 1, %.preheader80 ]
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv129) #5
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %141

128:                                              ; preds = %.lr.ph108
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #5
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv129) #5
  %130 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11lower_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %129)
          to label %131 unwind label %139

131:                                              ; preds = %128
  %132 = invoke ptr @_ZSt4prevISt23_Rb_tree_const_iteratorIiEET_S2_NSt15iterator_traitsIS2_E15difference_typeE(ptr %130, i64 noundef 1)
          to label %133 unwind label %139

133:                                              ; preds = %131
  store ptr %132, ptr %19, align 8
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv129) #5
  store i32 %135, ptr %136, align 4, !tbaa !5
  %.sroa.06.0.copyload = load ptr, ptr %19, align 8, !tbaa !16
  %137 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr %.sroa.06.0.copyload)
          to label %138 unwind label %139

138:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  br label %141

139:                                              ; preds = %133, %131, %128
  %140 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  br label %168

141:                                              ; preds = %.lr.ph108, %138
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %142 = load i32, ptr %3, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %.not62.not = icmp slt i64 %indvars.iv129, %143
  br i1 %.not62.not, label %.lr.ph108, label %.preheader79, !llvm.loop !19

._crit_edge112:                                   ; preds = %151, %.preheader80, %.preheader79
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.1)
          to label %.preheader unwind label %123

.preheader:                                       ; preds = %._crit_edge112
  %145 = load i32, ptr %3, align 4, !tbaa !5
  %.not64113 = icmp slt i32 %145, 1
  br i1 %.not64113, label %._crit_edge116, label %.lr.ph115

.lr.ph111:                                        ; preds = %.preheader79, %151
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %151 ], [ 1, %.preheader79 ]
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv132) #5
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %147)
          to label %149 unwind label %154

149:                                              ; preds = %.lr.ph111
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %148, ptr noundef nonnull @.str)
          to label %151 unwind label %154

151:                                              ; preds = %149
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %152 = load i32, ptr %3, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %.not63.not = icmp slt i64 %indvars.iv132, %153
  br i1 %.not63.not, label %.lr.ph111, label %._crit_edge112, !llvm.loop !20

154:                                              ; preds = %149, %.lr.ph111
  %155 = landingpad { ptr, i32 }
          cleanup
  br label %168

._crit_edge116:                                   ; preds = %162, %.preheader
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.1)
          to label %167 unwind label %123

.lr.ph115:                                        ; preds = %.preheader, %162
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %162 ], [ 1, %.preheader ]
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv135) #5
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %158)
          to label %160 unwind label %165

160:                                              ; preds = %.lr.ph115
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef nonnull @.str)
          to label %162 unwind label %165

162:                                              ; preds = %160
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %163 = load i32, ptr %3, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %.not64.not = icmp slt i64 %indvars.iv135, %164
  br i1 %.not64.not, label %.lr.ph115, label %._crit_edge116, !llvm.loop !21

165:                                              ; preds = %160, %.lr.ph115
  %166 = landingpad { ptr, i32 }
          cleanup
  br label %168

167:                                              ; preds = %._crit_edge116
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %17) #5
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %14) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret void

168:                                              ; preds = %165, %154, %139, %123, %117
  %.pn = phi { ptr, i32 } [ %118, %117 ], [ %140, %139 ], [ %155, %154 ], [ %166, %165 ], [ %124, %123 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #5
  br label %169

169:                                              ; preds = %168, %105
  %.pn.pn = phi { ptr, i32 } [ %.pn, %168 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %17) #5
  br label %170

170:                                              ; preds = %169, %102
  %.pn67.pn = phi { ptr, i32 } [ %.pn67, %102 ], [ %.pn.pn, %169 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %14) #5
  br label %171

171:                                              ; preds = %170, %82
  %.pn70 = phi { ptr, i32 } [ %83, %82 ], [ %.pn67.pn, %170 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  br label %172

172:                                              ; preds = %171, %69
  %.pn70.pn = phi { ptr, i32 } [ %.pn70, %171 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %173

173:                                              ; preds = %172, %47
  %.pn70.pn.pn = phi { ptr, i32 } [ %.pn70.pn, %172 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %174

174:                                              ; preds = %173, %45
  %.pn70.pn.pn.pn = phi { ptr, i32 } [ %.pn70.pn.pn, %173 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %175

175:                                              ; preds = %174, %35
  %.pn76 = phi { ptr, i32 } [ %36, %35 ], [ %.pn70.pn.pn.pn, %174 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %176

176:                                              ; preds = %175, %28
  %.pn76.pn = phi { ptr, i32 } [ %.pn76, %175 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn76.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; 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 void @_ZNSt3setIiSt4lessIiESaIiEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4prevISt23_Rb_tree_const_iteratorIiEET_S2_NSt15iterator_traitsIS2_E15difference_typeE(ptr, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { "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 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

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


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