; LLVM IR from eyangch/competitive-programming :: Codeforces/1696 (d)

; 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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.segtree1 = type { i64, [1000000 x i64] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::less<std::pair<long long, long long>>>::_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" = type { i64, i64 }
%"struct.std::pair.3" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"class.std::set.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::greater<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::greater<std::pair<long long, long long>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@a = external dso_local global [500000 x i64], align 16
@amx = external dso_local global [250000 x i64], align 16
@amn = external dso_local global [250000 x i64], align 16
@bmx = external dso_local global [250000 x i64], align 16
@bmn = external dso_local global [250000 x i64], align 16
@dp = external dso_local global [250000 x i64], align 16
@qx = external dso_local global [250001 x %"class.std::vector"], align 16
@qn = external dso_local global [250001 x %"class.std::vector"], align 16
@stmn = external dso_local global %struct.segtree1, align 8
@stmx = external dso_local global %struct.segtree1, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::set", align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair.3", align 8
  %14 = alloca %"class.std::set.5", align 8
  %15 = alloca i64, align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca %"struct.std::pair.3", align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %24 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca %"struct.std::pair.3", align 8
  %29 = alloca i64, align 8
  %30 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %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::pair", align 8
  %35 = alloca %"struct.std::pair.3", align 8
  %36 = alloca double, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  %40 = alloca i64, align 8
  %41 = alloca ptr, align 8
  %42 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %43 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %44 = alloca i64, align 8
  %45 = alloca ptr, align 8
  %46 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %48 = alloca i64, align 8
  %49 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %50 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %51 = getelementptr i8, ptr %50, i64 -24
  %52 = load i64, ptr %51, align 8
  %53 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %52
  %54 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %53, ptr noundef null)
  %55 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %57

57:                                               ; preds = %507, %0
  %58 = load i64, ptr @T, align 8, !tbaa !8
  %59 = add nsw i64 %58, -1
  store i64 %59, ptr @T, align 8, !tbaa !8
  %60 = icmp ne i64 %58, 0
  br i1 %60, label %61, label %510

61:                                               ; preds = %57
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %63

63:                                               ; preds = %72, %61
  %64 = load i64, ptr %2, align 8, !tbaa !8
  %65 = load i64, ptr @N, align 8, !tbaa !8
  %66 = icmp slt i64 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %75

68:                                               ; preds = %63
  %69 = load i64, ptr %2, align 8, !tbaa !8
  %70 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %69
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %70)
  br label %72

72:                                               ; preds = %68
  %73 = load i64, ptr %2, align 8, !tbaa !8
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %2, align 8, !tbaa !8
  br label %63, !llvm.loop !11

75:                                               ; preds = %67
  %76 = load i64, ptr @N, align 8, !tbaa !8
  %77 = getelementptr inbounds i64, ptr @amx, i64 %76
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @amx, ptr noundef %77, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %78 = load i64, ptr @N, align 8, !tbaa !8
  %79 = getelementptr inbounds i64, ptr @amn, i64 %78
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @amn, ptr noundef %79, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %80 = load i64, ptr @N, align 8, !tbaa !8
  %81 = getelementptr inbounds i64, ptr @bmx, i64 %80
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @bmx, ptr noundef %81, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %82 = load i64, ptr @N, align 8, !tbaa !8
  %83 = getelementptr inbounds i64, ptr @bmn, i64 %82
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @bmn, ptr noundef %83, ptr noundef nonnull align 8 dereferenceable(8) @N)
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #8
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  store i64 0, ptr %4, align 8, !tbaa !8
  br label %84

84:                                               ; preds = %132, %75
  %85 = load i64, ptr %4, align 8, !tbaa !8
  %86 = load i64, ptr @N, align 8, !tbaa !8
  %87 = icmp slt i64 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  store i32 7, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %140

89:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %90 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %91 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %6, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  br label %92

92:                                               ; preds = %115, %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %93 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %94 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %7, i32 0, i32 0
  store ptr %93, ptr %94, align 8
  %95 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIxxEES4_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 10, ptr %5, align 4
  br label %121

97:                                               ; preds = %92
  %98 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %99 = getelementptr inbounds %"struct.std::pair", ptr %98, i32 0, i32 0
  %100 = load i64, ptr %99, align 8, !tbaa !13
  %101 = load i64, ptr %4, align 8, !tbaa !8
  %102 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %101
  %103 = load i64, ptr %102, align 8, !tbaa !8
  %104 = icmp sgt i64 %100, %103
  br i1 %104, label %105, label %106

105:                                              ; preds = %97
  store i32 10, ptr %5, align 4
  br label %121

106:                                              ; preds = %97
  %107 = load i64, ptr %4, align 8, !tbaa !8
  %108 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %109 = getelementptr inbounds %"struct.std::pair", ptr %108, i32 0, i32 1
  %110 = load i64, ptr %109, align 8, !tbaa !15
  %111 = getelementptr inbounds [250000 x i64], ptr @amx, i64 0, i64 %110
  store i64 %107, ptr %111, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %6, i64 8, i1 false), !tbaa.struct !16
  %112 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %9, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8
  %114 = invoke ptr @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr %113)
          to label %115 unwind label %117

115:                                              ; preds = %106
  %116 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %8, i32 0, i32 0
  store ptr %114, ptr %116, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %8, i64 8, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %92, !llvm.loop !19

117:                                              ; preds = %106
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %10, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %139

121:                                              ; preds = %105, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %122

122:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %123 = load i64, ptr %4, align 8, !tbaa !8
  %124 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %123
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %125 unwind label %135

125:                                              ; preds = %122
  %126 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %127 unwind label %135

127:                                              ; preds = %125
  %128 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 0
  %129 = extractvalue { ptr, i8 } %126, 0
  store ptr %129, ptr %128, align 8
  %130 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 1
  %131 = extractvalue { ptr, i8 } %126, 1
  store i8 %131, ptr %130, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %132

132:                                              ; preds = %127
  %133 = load i64, ptr %4, align 8, !tbaa !8
  %134 = add nsw i64 %133, 1
  store i64 %134, ptr %4, align 8, !tbaa !8
  br label %84, !llvm.loop !20

135:                                              ; preds = %125, %122
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %10, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %139

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

140:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #8
  call void @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 0, ptr %15, align 8, !tbaa !8
  br label %141

141:                                              ; preds = %189, %140
  %142 = load i64, ptr %15, align 8, !tbaa !8
  %143 = load i64, ptr @N, align 8, !tbaa !8
  %144 = icmp slt i64 %142, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  store i32 12, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %197

146:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %147 = call ptr @_ZNKSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  %148 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %147, ptr %148, align 8
  br label %149

149:                                              ; preds = %172, %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %150 = call ptr @_ZNKSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  %151 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %150, ptr %151, align 8
  %152 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIxxEES4_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 15, ptr %5, align 4
  br label %178

154:                                              ; preds = %149
  %155 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %156 = getelementptr inbounds %"struct.std::pair", ptr %155, i32 0, i32 0
  %157 = load i64, ptr %156, align 8, !tbaa !13
  %158 = load i64, ptr %15, align 8, !tbaa !8
  %159 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !8
  %161 = icmp slt i64 %157, %160
  br i1 %161, label %162, label %163

162:                                              ; preds = %154
  store i32 15, ptr %5, align 4
  br label %178

163:                                              ; preds = %154
  %164 = load i64, ptr %15, align 8, !tbaa !8
  %165 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %166 = getelementptr inbounds %"struct.std::pair", ptr %165, i32 0, i32 1
  %167 = load i64, ptr %166, align 8, !tbaa !15
  %168 = getelementptr inbounds [250000 x i64], ptr @amn, i64 0, i64 %167
  store i64 %164, ptr %168, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %16, i64 8, i1 false), !tbaa.struct !16
  %169 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8
  %171 = invoke ptr @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr %170)
          to label %172 unwind label %174

172:                                              ; preds = %163
  %173 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %171, ptr %173, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %18, i64 8, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %149, !llvm.loop !21

174:                                              ; preds = %163
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %10, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %196

178:                                              ; preds = %162, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %179

179:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  %180 = load i64, ptr %15, align 8, !tbaa !8
  %181 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %180
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %182 unwind label %192

182:                                              ; preds = %179
  %183 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %184 unwind label %192

184:                                              ; preds = %182
  %185 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 0
  %186 = extractvalue { ptr, i8 } %183, 0
  store ptr %186, ptr %185, align 8
  %187 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 1
  %188 = extractvalue { ptr, i8 } %183, 1
  store i8 %188, ptr %187, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %189

189:                                              ; preds = %184
  %190 = load i64, ptr %15, align 8, !tbaa !8
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr %15, align 8, !tbaa !8
  br label %141, !llvm.loop !22

192:                                              ; preds = %182, %179
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %10, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %196

196:                                              ; preds = %192, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %508

197:                                              ; preds = %145
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %198 = load i64, ptr @N, align 8, !tbaa !8
  %199 = sub nsw i64 %198, 1
  store i64 %199, ptr %22, align 8, !tbaa !8
  br label %200

200:                                              ; preds = %247, %197
  %201 = load i64, ptr %22, align 8, !tbaa !8
  %202 = icmp sge i64 %201, 0
  br i1 %202, label %204, label %203

203:                                              ; preds = %200
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %255

204:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %205 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %206 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %23, i32 0, i32 0
  store ptr %205, ptr %206, align 8
  br label %207

207:                                              ; preds = %230, %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %208 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %209 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %24, i32 0, i32 0
  store ptr %208, ptr %209, align 8
  %210 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIxxEES4_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br i1 %210, label %212, label %211

211:                                              ; preds = %207
  store i32 20, ptr %5, align 4
  br label %236

212:                                              ; preds = %207
  %213 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %214 = getelementptr inbounds %"struct.std::pair", ptr %213, i32 0, i32 0
  %215 = load i64, ptr %214, align 8, !tbaa !13
  %216 = load i64, ptr %22, align 8, !tbaa !8
  %217 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %216
  %218 = load i64, ptr %217, align 8, !tbaa !8
  %219 = icmp sgt i64 %215, %218
  br i1 %219, label %220, label %221

220:                                              ; preds = %212
  store i32 20, ptr %5, align 4
  br label %236

221:                                              ; preds = %212
  %222 = load i64, ptr %22, align 8, !tbaa !8
  %223 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %224 = getelementptr inbounds %"struct.std::pair", ptr %223, i32 0, i32 1
  %225 = load i64, ptr %224, align 8, !tbaa !15
  %226 = getelementptr inbounds [250000 x i64], ptr @bmx, i64 0, i64 %225
  store i64 %222, ptr %226, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %23, i64 8, i1 false), !tbaa.struct !16
  %227 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %26, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8
  %229 = invoke ptr @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr %228)
          to label %230 unwind label %232

230:                                              ; preds = %221
  %231 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %25, i32 0, i32 0
  store ptr %229, ptr %231, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %25, i64 8, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %207, !llvm.loop !23

232:                                              ; preds = %221
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %10, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %254

236:                                              ; preds = %220, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %237

237:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  %238 = load i64, ptr %22, align 8, !tbaa !8
  %239 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %238
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %239, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %240 unwind label %250

240:                                              ; preds = %237
  %241 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %242 unwind label %250

242:                                              ; preds = %240
  %243 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 0
  %244 = extractvalue { ptr, i8 } %241, 0
  store ptr %244, ptr %243, align 8
  %245 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 1
  %246 = extractvalue { ptr, i8 } %241, 1
  store i8 %246, ptr %245, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %247

247:                                              ; preds = %242
  %248 = load i64, ptr %22, align 8, !tbaa !8
  %249 = add nsw i64 %248, -1
  store i64 %249, ptr %22, align 8, !tbaa !8
  br label %200, !llvm.loop !24

250:                                              ; preds = %240, %237
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %10, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  br label %254

254:                                              ; preds = %250, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %508

255:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %256 = load i64, ptr @N, align 8, !tbaa !8
  %257 = sub nsw i64 %256, 1
  store i64 %257, ptr %29, align 8, !tbaa !8
  br label %258

258:                                              ; preds = %305, %255
  %259 = load i64, ptr %29, align 8, !tbaa !8
  %260 = icmp sge i64 %259, 0
  br i1 %260, label %262, label %261

261:                                              ; preds = %258
  store i32 22, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %313

262:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %263 = call ptr @_ZNKSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  %264 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %30, i32 0, i32 0
  store ptr %263, ptr %264, align 8
  br label %265

265:                                              ; preds = %288, %262
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %266 = call ptr @_ZNKSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  %267 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %31, i32 0, i32 0
  store ptr %266, ptr %267, align 8
  %268 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIxxEES4_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br i1 %268, label %270, label %269

269:                                              ; preds = %265
  store i32 25, ptr %5, align 4
  br label %294

270:                                              ; preds = %265
  %271 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #8
  %272 = getelementptr inbounds %"struct.std::pair", ptr %271, i32 0, i32 0
  %273 = load i64, ptr %272, align 8, !tbaa !13
  %274 = load i64, ptr %29, align 8, !tbaa !8
  %275 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %274
  %276 = load i64, ptr %275, align 8, !tbaa !8
  %277 = icmp slt i64 %273, %276
  br i1 %277, label %278, label %279

278:                                              ; preds = %270
  store i32 25, ptr %5, align 4
  br label %294

279:                                              ; preds = %270
  %280 = load i64, ptr %29, align 8, !tbaa !8
  %281 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #8
  %282 = getelementptr inbounds %"struct.std::pair", ptr %281, i32 0, i32 1
  %283 = load i64, ptr %282, align 8, !tbaa !15
  %284 = getelementptr inbounds [250000 x i64], ptr @bmn, i64 0, i64 %283
  store i64 %280, ptr %284, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %30, i64 8, i1 false), !tbaa.struct !16
  %285 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %33, i32 0, i32 0
  %286 = load ptr, ptr %285, align 8
  %287 = invoke ptr @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr %286)
          to label %288 unwind label %290

288:                                              ; preds = %279
  %289 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %32, i32 0, i32 0
  store ptr %287, ptr %289, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %32, i64 8, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %265, !llvm.loop !25

290:                                              ; preds = %279
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %10, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %312

294:                                              ; preds = %278, %269
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %295

295:                                              ; preds = %294
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #8
  %296 = load i64, ptr %29, align 8, !tbaa !8
  %297 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %296
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(8) %297, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %298 unwind label %308

298:                                              ; preds = %295
  %299 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(16) %34)
          to label %300 unwind label %308

300:                                              ; preds = %298
  %301 = getelementptr inbounds { ptr, i8 }, ptr %35, i32 0, i32 0
  %302 = extractvalue { ptr, i8 } %299, 0
  store ptr %302, ptr %301, align 8
  %303 = getelementptr inbounds { ptr, i8 }, ptr %35, i32 0, i32 1
  %304 = extractvalue { ptr, i8 } %299, 1
  store i8 %304, ptr %303, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #8
  br label %305

305:                                              ; preds = %300
  %306 = load i64, ptr %29, align 8, !tbaa !8
  %307 = add nsw i64 %306, -1
  store i64 %307, ptr %29, align 8, !tbaa !8
  br label %258, !llvm.loop !26

308:                                              ; preds = %298, %295
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %10, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #8
  br label %312

312:                                              ; preds = %308, %290
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %508

313:                                              ; preds = %261
  %314 = load i64, ptr @N, align 8, !tbaa !8
  %315 = getelementptr inbounds i64, ptr @dp, i64 %314
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  store double 1.000000e+09, ptr %36, align 8, !tbaa !27
  invoke void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef @dp, ptr noundef %315, ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %316 unwind label %339

316:                                              ; preds = %313
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  %317 = load i64, ptr @N, align 8, !tbaa !8
  %318 = sub nsw i64 %317, 1
  %319 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %318
  store i64 0, ptr %319, align 8, !tbaa !8
  %320 = load i64, ptr @N, align 8, !tbaa !8
  invoke void @_ZN8segtree14initEx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef %320)
          to label %321 unwind label %343

321:                                              ; preds = %316
  %322 = load i64, ptr @N, align 8, !tbaa !8
  invoke void @_ZN8segtree14initEx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef %322)
          to label %323 unwind label %343

323:                                              ; preds = %321
  %324 = load i64, ptr @N, align 8, !tbaa !8
  %325 = sub nsw i64 %324, 1
  %326 = load i64, ptr @N, align 8, !tbaa !8
  %327 = sub nsw i64 %326, 1
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef 1, i64 noundef 0, i64 noundef %325, i64 noundef %327, i64 noundef 0)
          to label %328 unwind label %343

328:                                              ; preds = %323
  %329 = load i64, ptr @N, align 8, !tbaa !8
  %330 = sub nsw i64 %329, 1
  %331 = load i64, ptr @N, align 8, !tbaa !8
  %332 = sub nsw i64 %331, 1
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef 1, i64 noundef 0, i64 noundef %330, i64 noundef %332, i64 noundef 0)
          to label %333 unwind label %343

333:                                              ; preds = %328
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  store i64 0, ptr %37, align 8, !tbaa !8
  br label %334

334:                                              ; preds = %352, %333
  %335 = load i64, ptr %37, align 8, !tbaa !8
  %336 = load i64, ptr @N, align 8, !tbaa !8
  %337 = icmp slt i64 %335, %336
  br i1 %337, label %347, label %338

338:                                              ; preds = %334
  store i32 27, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %355

339:                                              ; preds = %313
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %10, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %508

343:                                              ; preds = %505, %502, %328, %323, %321, %316
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %10, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %11, align 4
  br label %508

347:                                              ; preds = %334
  %348 = load i64, ptr %37, align 8, !tbaa !8
  %349 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qx, i64 0, i64 %348
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %349) #8
  %350 = load i64, ptr %37, align 8, !tbaa !8
  %351 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qn, i64 0, i64 %350
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %351) #8
  br label %352

352:                                              ; preds = %347
  %353 = load i64, ptr %37, align 8, !tbaa !8
  %354 = add nsw i64 %353, 1
  store i64 %354, ptr %37, align 8, !tbaa !8
  br label %334, !llvm.loop !29

355:                                              ; preds = %338
  %356 = load i64, ptr @N, align 8, !tbaa !8
  %357 = sub nsw i64 %356, 1
  %358 = getelementptr inbounds [250000 x i64], ptr @bmx, i64 0, i64 %357
  %359 = load i64, ptr %358, align 8, !tbaa !8
  %360 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qx, i64 0, i64 %359
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %361 = load i64, ptr @N, align 8, !tbaa !8
  %362 = sub nsw i64 %361, 1
  store i64 %362, ptr %38, align 8, !tbaa !8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %360, ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %363 unwind label %378

363:                                              ; preds = %355
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  %364 = load i64, ptr @N, align 8, !tbaa !8
  %365 = sub nsw i64 %364, 1
  %366 = getelementptr inbounds [250000 x i64], ptr @bmn, i64 0, i64 %365
  %367 = load i64, ptr %366, align 8, !tbaa !8
  %368 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qn, i64 0, i64 %367
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %369 = load i64, ptr @N, align 8, !tbaa !8
  %370 = sub nsw i64 %369, 1
  store i64 %370, ptr %39, align 8, !tbaa !8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %368, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %371 unwind label %382

371:                                              ; preds = %363
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %372 = load i64, ptr @N, align 8, !tbaa !8
  %373 = sub nsw i64 %372, 2
  store i64 %373, ptr %40, align 8, !tbaa !8
  br label %374

374:                                              ; preds = %490, %371
  %375 = load i64, ptr %40, align 8, !tbaa !8
  %376 = icmp sge i64 %375, 0
  br i1 %376, label %386, label %377

377:                                              ; preds = %374
  store i32 30, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %502

378:                                              ; preds = %355
  %379 = landingpad { ptr, i32 }
          cleanup
  %380 = extractvalue { ptr, i32 } %379, 0
  store ptr %380, ptr %10, align 8
  %381 = extractvalue { ptr, i32 } %379, 1
  store i32 %381, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %508

382:                                              ; preds = %363
  %383 = landingpad { ptr, i32 }
          cleanup
  %384 = extractvalue { ptr, i32 } %383, 0
  store ptr %384, ptr %10, align 8
  %385 = extractvalue { ptr, i32 } %383, 1
  store i32 %385, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  br label %508

386:                                              ; preds = %374
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  %387 = load i64, ptr %40, align 8, !tbaa !8
  %388 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qx, i64 0, i64 %387
  store ptr %388, ptr %41, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %389 = load ptr, ptr %41, align 8, !tbaa !17
  %390 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %389) #8
  %391 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %42, i32 0, i32 0
  store ptr %390, ptr %391, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %392 = load ptr, ptr %41, align 8, !tbaa !17
  %393 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %392) #8
  %394 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %43, i32 0, i32 0
  store ptr %393, ptr %394, align 8
  br label %395

395:                                              ; preds = %405, %386
  %396 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  br i1 %396, label %398, label %397

397:                                              ; preds = %395
  store i32 33, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, 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 %411

398:                                              ; preds = %395
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %399 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  %400 = load i64, ptr %399, align 8, !tbaa !8
  store i64 %400, ptr %44, align 8, !tbaa !8
  %401 = load i64, ptr @N, align 8, !tbaa !8
  %402 = sub nsw i64 %401, 1
  %403 = load i64, ptr %44, align 8, !tbaa !8
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef 1, i64 noundef 0, i64 noundef %402, i64 noundef %403, i64 noundef 1000000000)
          to label %404 unwind label %407

404:                                              ; preds = %398
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  br label %405

405:                                              ; preds = %404
  %406 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  br label %395

407:                                              ; preds = %398
  %408 = landingpad { ptr, i32 }
          cleanup
  %409 = extractvalue { ptr, i32 } %408, 0
  store ptr %409, ptr %10, align 8
  %410 = extractvalue { ptr, i32 } %408, 1
  store i32 %410, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, 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 %501

411:                                              ; preds = %397
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %412 = load i64, ptr %40, align 8, !tbaa !8
  %413 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qn, i64 0, i64 %412
  store ptr %413, ptr %45, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #8
  %414 = load ptr, ptr %45, align 8, !tbaa !17
  %415 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %414) #8
  %416 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %46, i32 0, i32 0
  store ptr %415, ptr %416, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  %417 = load ptr, ptr %45, align 8, !tbaa !17
  %418 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %417) #8
  %419 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %47, i32 0, i32 0
  store ptr %418, ptr %419, align 8
  br label %420

420:                                              ; preds = %430, %411
  %421 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  br i1 %421, label %423, label %422

422:                                              ; preds = %420
  store i32 35, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %436

423:                                              ; preds = %420
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %424 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #8
  %425 = load i64, ptr %424, align 8, !tbaa !8
  store i64 %425, ptr %48, align 8, !tbaa !8
  %426 = load i64, ptr @N, align 8, !tbaa !8
  %427 = sub nsw i64 %426, 1
  %428 = load i64, ptr %48, align 8, !tbaa !8
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef 1, i64 noundef 0, i64 noundef %427, i64 noundef %428, i64 noundef 1000000000)
          to label %429 unwind label %432

429:                                              ; preds = %423
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  br label %430

430:                                              ; preds = %429
  %431 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #8
  br label %420

432:                                              ; preds = %423
  %433 = landingpad { ptr, i32 }
          cleanup
  %434 = extractvalue { ptr, i32 } %433, 0
  store ptr %434, ptr %10, align 8
  %435 = extractvalue { ptr, i32 } %433, 1
  store i32 %435, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %501

436:                                              ; preds = %422
  %437 = load i64, ptr @N, align 8, !tbaa !8
  %438 = sub nsw i64 %437, 1
  %439 = load i64, ptr %40, align 8, !tbaa !8
  %440 = load i64, ptr %40, align 8, !tbaa !8
  %441 = getelementptr inbounds [250000 x i64], ptr @amn, i64 0, i64 %440
  %442 = load i64, ptr %441, align 8, !tbaa !8
  %443 = invoke noundef i64 @_ZN8segtree13qryExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef 1, i64 noundef 0, i64 noundef %438, i64 noundef %439, i64 noundef %442)
          to label %444 unwind label %493

444:                                              ; preds = %436
  %445 = load i64, ptr %40, align 8, !tbaa !8
  %446 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %445
  store i64 %443, ptr %446, align 8, !tbaa !8
  %447 = load i64, ptr %40, align 8, !tbaa !8
  %448 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %447
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  %449 = load i64, ptr @N, align 8, !tbaa !8
  %450 = sub nsw i64 %449, 1
  %451 = load i64, ptr %40, align 8, !tbaa !8
  %452 = load i64, ptr %40, align 8, !tbaa !8
  %453 = getelementptr inbounds [250000 x i64], ptr @amx, i64 0, i64 %452
  %454 = load i64, ptr %453, align 8, !tbaa !8
  %455 = invoke noundef i64 @_ZN8segtree13qryExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef 1, i64 noundef 0, i64 noundef %450, i64 noundef %451, i64 noundef %454)
          to label %456 unwind label %497

456:                                              ; preds = %444
  store i64 %455, ptr %49, align 8, !tbaa !8
  %457 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %448, ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %458 unwind label %497

458:                                              ; preds = %456
  %459 = load i64, ptr %457, align 8, !tbaa !8
  %460 = load i64, ptr %40, align 8, !tbaa !8
  %461 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %460
  store i64 %459, ptr %461, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  %462 = load i64, ptr %40, align 8, !tbaa !8
  %463 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %462
  %464 = load i64, ptr %463, align 8, !tbaa !8
  %465 = add nsw i64 %464, 1
  store i64 %465, ptr %463, align 8, !tbaa !8
  %466 = load i64, ptr @N, align 8, !tbaa !8
  %467 = sub nsw i64 %466, 1
  %468 = load i64, ptr %40, align 8, !tbaa !8
  %469 = load i64, ptr %40, align 8, !tbaa !8
  %470 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %469
  %471 = load i64, ptr %470, align 8, !tbaa !8
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef 1, i64 noundef 0, i64 noundef %467, i64 noundef %468, i64 noundef %471)
          to label %472 unwind label %493

472:                                              ; preds = %458
  %473 = load i64, ptr @N, align 8, !tbaa !8
  %474 = sub nsw i64 %473, 1
  %475 = load i64, ptr %40, align 8, !tbaa !8
  %476 = load i64, ptr %40, align 8, !tbaa !8
  %477 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %476
  %478 = load i64, ptr %477, align 8, !tbaa !8
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef 1, i64 noundef 0, i64 noundef %474, i64 noundef %475, i64 noundef %478)
          to label %479 unwind label %493

479:                                              ; preds = %472
  %480 = load i64, ptr %40, align 8, !tbaa !8
  %481 = getelementptr inbounds [250000 x i64], ptr @bmx, i64 0, i64 %480
  %482 = load i64, ptr %481, align 8, !tbaa !8
  %483 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qx, i64 0, i64 %482
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %483, ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %484 unwind label %493

484:                                              ; preds = %479
  %485 = load i64, ptr %40, align 8, !tbaa !8
  %486 = getelementptr inbounds [250000 x i64], ptr @bmn, i64 0, i64 %485
  %487 = load i64, ptr %486, align 8, !tbaa !8
  %488 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qn, i64 0, i64 %487
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %488, ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %489 unwind label %493

489:                                              ; preds = %484
  br label %490

490:                                              ; preds = %489
  %491 = load i64, ptr %40, align 8, !tbaa !8
  %492 = add nsw i64 %491, -1
  store i64 %492, ptr %40, align 8, !tbaa !8
  br label %374, !llvm.loop !30

493:                                              ; preds = %484, %479, %472, %458, %436
  %494 = landingpad { ptr, i32 }
          cleanup
  %495 = extractvalue { ptr, i32 } %494, 0
  store ptr %495, ptr %10, align 8
  %496 = extractvalue { ptr, i32 } %494, 1
  store i32 %496, ptr %11, align 4
  br label %501

497:                                              ; preds = %456, %444
  %498 = landingpad { ptr, i32 }
          cleanup
  %499 = extractvalue { ptr, i32 } %498, 0
  store ptr %499, ptr %10, align 8
  %500 = extractvalue { ptr, i32 } %498, 1
  store i32 %500, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  br label %501

501:                                              ; preds = %497, %493, %432, %407
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %508

502:                                              ; preds = %377
  %503 = load i64, ptr @dp, align 16, !tbaa !8
  %504 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %503)
          to label %505 unwind label %343

505:                                              ; preds = %502
  %506 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %504, i8 noundef signext 10)
          to label %507 unwind label %343

507:                                              ; preds = %505
  call void @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #8
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  br label %57, !llvm.loop !31

508:                                              ; preds = %501, %382, %378, %343, %339, %312, %254, %196
  call void @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #8
  br label %509

509:                                              ; preds = %508, %139
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  br label %512

510:                                              ; preds = %57
  %511 = load i32, ptr %1, align 4
  ret i32 %511

512:                                              ; preds = %509
  %513 = load ptr, ptr %10, align 8
  %514 = load i32, ptr %11, align 4
  %515 = insertvalue { ptr, i32 } poison, ptr %513, 0
  %516 = insertvalue { ptr, i32 } %515, i32 %514, 1
  resume { ptr, i32 } %516
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

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

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

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8segtree14initEx(ptr noundef nonnull align 8 dereferenceable(8000008), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008), i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #3 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN8segtree13qryExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008), i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !9, i64 0}
!14 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!15 = !{!14, !9, i64 8}
!16 = !{i64 0, i64 8, !17}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !10, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = !{!28, !28, i64 0}
!28 = !{!"double", !10, i64 0}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.segtree1 = type { i64, [1000000 x i64] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::less<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::less<std::pair<long long, long long>>>::_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" = type { i64, i64 }
%"class.std::set.5" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::greater<std::pair<long long, long long>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<long long, long long>, std::pair<long long, long long>, std::_Identity<std::pair<long long, long long>>, std::greater<std::pair<long long, long long>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@a = external dso_local global [500000 x i64], align 16
@amx = external dso_local global [250000 x i64], align 16
@amn = external dso_local global [250000 x i64], align 16
@bmx = external dso_local global [250000 x i64], align 16
@bmn = external dso_local global [250000 x i64], align 16
@dp = external dso_local global [250000 x i64], align 16
@qx = external dso_local global [250001 x %"class.std::vector"], align 16
@qn = external dso_local global [250001 x %"class.std::vector"], align 16
@stmn = external dso_local global %struct.segtree1, align 8
@stmx = external dso_local global %struct.segtree1, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::set", align 8
  %2 = alloca i64, align 8
  %3 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"class.std::set.5", align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i64, align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::pair", align 8
  %19 = alloca double, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca i64, align 8
  %28 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %29 = getelementptr i8, ptr %28, i64 -24
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %30
  %32 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %31, ptr noundef null)
  %33 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %34 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %35 = load i64, ptr @T, align 8, !tbaa !8
  %36 = add nsw i64 %35, -1
  store i64 %36, ptr @T, align 8, !tbaa !8
  %.not92 = icmp eq i64 %35, 0
  br i1 %.not92, label %._crit_edge95, label %.lr.ph94

.lr.ph94:                                         ; preds = %0, %293
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %38 = load i64, ptr @N, align 8, !tbaa !8
  %39 = icmp sgt i64 %38, 0
  br i1 %39, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph94
  %.lcssa = phi i64 [ %38, %.lr.ph94 ], [ %52, %.lr.ph ]
  %40 = getelementptr inbounds i64, ptr @amx, i64 %.lcssa
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @amx, ptr noundef nonnull %40, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %41 = load i64, ptr @N, align 8, !tbaa !8
  %42 = getelementptr inbounds i64, ptr @amn, i64 %41
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @amn, ptr noundef nonnull %42, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %43 = load i64, ptr @N, align 8, !tbaa !8
  %44 = getelementptr inbounds i64, ptr @bmx, i64 %43
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @bmx, ptr noundef nonnull %44, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %45 = load i64, ptr @N, align 8, !tbaa !8
  %46 = getelementptr inbounds i64, ptr @bmn, i64 %45
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @bmn, ptr noundef nonnull %46, ptr noundef nonnull align 8 dereferenceable(8) @N)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #7
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  %47 = load i64, ptr @N, align 8, !tbaa !8
  %48 = icmp sgt i64 %47, 0
  br i1 %48, label %.lr.ph63, label %._crit_edge64

.lr.ph:                                           ; preds = %.lr.ph94, %.lr.ph
  %.061 = phi i64 [ %51, %.lr.ph ], [ 0, %.lr.ph94 ]
  %49 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %.061
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %49)
  %51 = add nuw nsw i64 %.061, 1
  %52 = load i64, ptr @N, align 8, !tbaa !8
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge64:                                    ; preds = %78, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #7
  call void @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  %54 = load i64, ptr @N, align 8, !tbaa !8
  %55 = icmp sgt i64 %54, 0
  br i1 %55, label %.lr.ph66, label %._crit_edge67

.lr.ph63:                                         ; preds = %._crit_edge, %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %56 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  br label %57

57:                                               ; preds = %67, %.lr.ph63
  %storemerge56 = phi ptr [ %56, %.lr.ph63 ], [ %72, %67 ]
  store ptr %storemerge56, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %58 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %58, ptr %4, align 8
  %59 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIxxEES4_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br i1 %59, label %60, label %._crit_edge98

._crit_edge98:                                    ; preds = %57
  %.pre = load i64, ptr %2, align 8, !tbaa !8
  br label %split

60:                                               ; preds = %57
  %61 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %62 = load i64, ptr %61, align 8, !tbaa !13
  %63 = load i64, ptr %2, align 8, !tbaa !8
  %64 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !8
  %66 = icmp sgt i64 %62, %65
  br i1 %66, label %split, label %67

67:                                               ; preds = %60
  %68 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  %70 = load i64, ptr %69, align 8, !tbaa !15
  %71 = getelementptr inbounds [250000 x i64], ptr @amx, i64 0, i64 %70
  store i64 %63, ptr %71, align 8, !tbaa !8
  %.sroa.023.0.copyload = load ptr, ptr %3, align 8, !tbaa !16
  %72 = invoke ptr @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr %.sroa.023.0.copyload)
          to label %57 unwind label %73, !llvm.loop !18

73:                                               ; preds = %67
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %85

split:                                            ; preds = %60, %._crit_edge98
  %75 = phi i64 [ %.pre, %._crit_edge98 ], [ %63, %60 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %76 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %75
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %77 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %78 unwind label %83

78:                                               ; preds = %split
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %79 = load i64, ptr %2, align 8, !tbaa !8
  %80 = add nsw i64 %79, 1
  store i64 %80, ptr %2, align 8, !tbaa !8
  %81 = load i64, ptr @N, align 8, !tbaa !8
  %82 = icmp slt i64 %80, %81
  br i1 %82, label %.lr.ph63, label %._crit_edge64, !llvm.loop !19

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

85:                                               ; preds = %83, %73
  %.pn57 = phi { ptr, i32 } [ %84, %83 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %297

._crit_edge67:                                    ; preds = %109, %._crit_edge64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %storemerge42.in68 = load i64, ptr @N, align 8, !tbaa !8
  %storemerge4269 = add nsw i64 %storemerge42.in68, -1
  store i64 %storemerge4269, ptr %11, align 8, !tbaa !8
  %86 = icmp sgt i64 %storemerge42.in68, 0
  br i1 %86, label %.lr.ph71, label %._crit_edge72.thread

._crit_edge72.thread:                             ; preds = %._crit_edge67
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  br label %._crit_edge77

.lr.ph66:                                         ; preds = %._crit_edge64, %109
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %87 = call ptr @_ZNKSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  br label %88

88:                                               ; preds = %98, %.lr.ph66
  %storemerge52 = phi ptr [ %87, %.lr.ph66 ], [ %103, %98 ]
  store ptr %storemerge52, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %89 = call ptr @_ZNKSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  store ptr %89, ptr %9, align 8
  %90 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIxxEES4_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br i1 %90, label %91, label %._crit_edge99

._crit_edge99:                                    ; preds = %88
  %.pre101 = load i64, ptr %7, align 8, !tbaa !8
  br label %split100

91:                                               ; preds = %88
  %92 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %93 = load i64, ptr %92, align 8, !tbaa !13
  %94 = load i64, ptr %7, align 8, !tbaa !8
  %95 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !8
  %97 = icmp slt i64 %93, %96
  br i1 %97, label %split100, label %98

98:                                               ; preds = %91
  %99 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %100 = getelementptr inbounds i8, ptr %99, i64 8
  %101 = load i64, ptr %100, align 8, !tbaa !15
  %102 = getelementptr inbounds [250000 x i64], ptr @amn, i64 0, i64 %101
  store i64 %94, ptr %102, align 8, !tbaa !8
  %.sroa.017.0.copyload = load ptr, ptr %8, align 8, !tbaa !16
  %103 = invoke ptr @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr %.sroa.017.0.copyload)
          to label %88 unwind label %104, !llvm.loop !20

104:                                              ; preds = %98
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %116

split100:                                         ; preds = %91, %._crit_edge99
  %106 = phi i64 [ %.pre101, %._crit_edge99 ], [ %94, %91 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  %107 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %106
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %108 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %109 unwind label %114

109:                                              ; preds = %split100
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  %110 = load i64, ptr %7, align 8, !tbaa !8
  %111 = add nsw i64 %110, 1
  store i64 %111, ptr %7, align 8, !tbaa !8
  %112 = load i64, ptr @N, align 8, !tbaa !8
  %113 = icmp slt i64 %111, %112
  br i1 %113, label %.lr.ph66, label %._crit_edge67, !llvm.loop !21

114:                                              ; preds = %split100
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %116

116:                                              ; preds = %114, %104
  %.pn53 = phi { ptr, i32 } [ %115, %114 ], [ %105, %104 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %296

._crit_edge72:                                    ; preds = %140
  %storemerge43.in73.pre = load i64, ptr @N, align 8, !tbaa !8
  %.pre110 = add nsw i64 %storemerge43.in73.pre, -1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store i64 %.pre110, ptr %15, align 8, !tbaa !8
  %117 = icmp sgt i64 %storemerge43.in73.pre, 0
  br i1 %117, label %.lr.ph76, label %._crit_edge77

.lr.ph71:                                         ; preds = %._crit_edge67, %140
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %118 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  br label %119

119:                                              ; preds = %129, %.lr.ph71
  %storemerge49 = phi ptr [ %118, %.lr.ph71 ], [ %134, %129 ]
  store ptr %storemerge49, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %120 = call ptr @_ZNKSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %120, ptr %13, align 8
  %121 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIxxEES4_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br i1 %121, label %122, label %._crit_edge102

._crit_edge102:                                   ; preds = %119
  %.pre104 = load i64, ptr %11, align 8, !tbaa !8
  br label %split103

122:                                              ; preds = %119
  %123 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %124 = load i64, ptr %123, align 8, !tbaa !13
  %125 = load i64, ptr %11, align 8, !tbaa !8
  %126 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !8
  %128 = icmp sgt i64 %124, %127
  br i1 %128, label %split103, label %129

129:                                              ; preds = %122
  %130 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %131 = getelementptr inbounds i8, ptr %130, i64 8
  %132 = load i64, ptr %131, align 8, !tbaa !15
  %133 = getelementptr inbounds [250000 x i64], ptr @bmx, i64 0, i64 %132
  store i64 %125, ptr %133, align 8, !tbaa !8
  %.sroa.013.0.copyload = load ptr, ptr %12, align 8, !tbaa !16
  %134 = invoke ptr @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr %.sroa.013.0.copyload)
          to label %119 unwind label %135, !llvm.loop !22

135:                                              ; preds = %129
  %136 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %144

split103:                                         ; preds = %122, %._crit_edge102
  %137 = phi i64 [ %.pre104, %._crit_edge102 ], [ %125, %122 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #7
  %138 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %137
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %138, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %139 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %140 unwind label %142

140:                                              ; preds = %split103
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  %storemerge42.in = load i64, ptr %11, align 8, !tbaa !8
  %storemerge42 = add nsw i64 %storemerge42.in, -1
  store i64 %storemerge42, ptr %11, align 8, !tbaa !8
  %141 = icmp sgt i64 %storemerge42.in, 0
  br i1 %141, label %.lr.ph71, label %._crit_edge72, !llvm.loop !23

142:                                              ; preds = %split103
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  br label %144

144:                                              ; preds = %142, %135
  %.pn50 = phi { ptr, i32 } [ %143, %142 ], [ %136, %135 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %296

._crit_edge77.loopexit:                           ; preds = %169
  %.pre109 = load i64, ptr @N, align 8, !tbaa !8
  br label %._crit_edge77

._crit_edge77:                                    ; preds = %._crit_edge72.thread, %._crit_edge77.loopexit, %._crit_edge72
  %145 = phi i64 [ %.pre109, %._crit_edge77.loopexit ], [ %storemerge43.in73.pre, %._crit_edge72 ], [ %storemerge42.in68, %._crit_edge72.thread ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  %146 = getelementptr inbounds i64, ptr @dp, i64 %145
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  store double 1.000000e+09, ptr %19, align 8, !tbaa !24
  invoke void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef nonnull @dp, ptr noundef nonnull %146, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %174 unwind label %192

.lr.ph76:                                         ; preds = %._crit_edge72, %169
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %147 = call ptr @_ZNKSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  br label %148

148:                                              ; preds = %158, %.lr.ph76
  %storemerge46 = phi ptr [ %147, %.lr.ph76 ], [ %163, %158 ]
  store ptr %storemerge46, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %149 = call ptr @_ZNKSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  store ptr %149, ptr %17, align 8
  %150 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIxxEES4_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br i1 %150, label %151, label %._crit_edge106

._crit_edge106:                                   ; preds = %148
  %.pre108 = load i64, ptr %15, align 8, !tbaa !8
  br label %split107

151:                                              ; preds = %148
  %152 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %153 = load i64, ptr %152, align 8, !tbaa !13
  %154 = load i64, ptr %15, align 8, !tbaa !8
  %155 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %154
  %156 = load i64, ptr %155, align 8, !tbaa !8
  %157 = icmp slt i64 %153, %156
  br i1 %157, label %split107, label %158

158:                                              ; preds = %151
  %159 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIxxEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %160 = getelementptr inbounds i8, ptr %159, i64 8
  %161 = load i64, ptr %160, align 8, !tbaa !15
  %162 = getelementptr inbounds [250000 x i64], ptr @bmn, i64 0, i64 %161
  store i64 %154, ptr %162, align 8, !tbaa !8
  %.sroa.09.0.copyload = load ptr, ptr %16, align 8, !tbaa !16
  %163 = invoke ptr @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr %.sroa.09.0.copyload)
          to label %148 unwind label %164, !llvm.loop !26

164:                                              ; preds = %158
  %165 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %173

split107:                                         ; preds = %151, %._crit_edge106
  %166 = phi i64 [ %.pre108, %._crit_edge106 ], [ %154, %151 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #7
  %167 = getelementptr inbounds [500000 x i64], ptr @a, i64 0, i64 %166
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %168 = invoke { ptr, i8 } @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %169 unwind label %171

169:                                              ; preds = %split107
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  %storemerge43.in = load i64, ptr %15, align 8, !tbaa !8
  %storemerge43 = add nsw i64 %storemerge43.in, -1
  store i64 %storemerge43, ptr %15, align 8, !tbaa !8
  %170 = icmp sgt i64 %storemerge43.in, 0
  br i1 %170, label %.lr.ph76, label %._crit_edge77.loopexit, !llvm.loop !27

171:                                              ; preds = %split107
  %172 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  br label %173

173:                                              ; preds = %171, %164
  %.pn47 = phi { ptr, i32 } [ %172, %171 ], [ %165, %164 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %296

174:                                              ; preds = %._crit_edge77
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  %175 = load i64, ptr @N, align 8, !tbaa !8
  %176 = add nsw i64 %175, -1
  %177 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %176
  store i64 0, ptr %177, align 8, !tbaa !8
  invoke void @_ZN8segtree14initEx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef %175)
          to label %178 unwind label %194

178:                                              ; preds = %174
  %179 = load i64, ptr @N, align 8, !tbaa !8
  invoke void @_ZN8segtree14initEx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef %179)
          to label %180 unwind label %194

180:                                              ; preds = %178
  %181 = load i64, ptr @N, align 8, !tbaa !8
  %182 = add nsw i64 %181, -1
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef 1, i64 noundef 0, i64 noundef %182, i64 noundef %182, i64 noundef 0)
          to label %183 unwind label %194

183:                                              ; preds = %180
  %184 = load i64, ptr @N, align 8, !tbaa !8
  %185 = add nsw i64 %184, -1
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef 1, i64 noundef 0, i64 noundef %185, i64 noundef %185, i64 noundef 0)
          to label %.preheader unwind label %194

.preheader:                                       ; preds = %183
  %186 = load i64, ptr @N, align 8, !tbaa !8
  %187 = icmp sgt i64 %186, 0
  br i1 %187, label %.lr.ph79, label %._crit_edge80

._crit_edge80:                                    ; preds = %.lr.ph79, %.preheader
  %.lcssa60 = phi i64 [ %186, %.preheader ], [ %199, %.lr.ph79 ]
  %188 = add nsw i64 %.lcssa60, -1
  %189 = getelementptr inbounds [250000 x i64], ptr @bmx, i64 0, i64 %188
  %190 = load i64, ptr %189, align 8, !tbaa !8
  %191 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qx, i64 0, i64 %190
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  store i64 %188, ptr %20, align 8, !tbaa !8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %191, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %201 unwind label %213

192:                                              ; preds = %._crit_edge77
  %193 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br label %296

194:                                              ; preds = %291, %._crit_edge91, %183, %180, %178, %174
  %195 = landingpad { ptr, i32 }
          cleanup
  br label %296

.lr.ph79:                                         ; preds = %.preheader, %.lr.ph79
  %.03778 = phi i64 [ %198, %.lr.ph79 ], [ 0, %.preheader ]
  %196 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qx, i64 0, i64 %.03778
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %196) #7
  %197 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qn, i64 0, i64 %.03778
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %197) #7
  %198 = add nuw nsw i64 %.03778, 1
  %199 = load i64, ptr @N, align 8, !tbaa !8
  %200 = icmp slt i64 %198, %199
  br i1 %200, label %.lr.ph79, label %._crit_edge80, !llvm.loop !28

201:                                              ; preds = %._crit_edge80
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  %202 = load i64, ptr @N, align 8, !tbaa !8
  %203 = add nsw i64 %202, -1
  %204 = getelementptr inbounds [250000 x i64], ptr @bmn, i64 0, i64 %203
  %205 = load i64, ptr %204, align 8, !tbaa !8
  %206 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qn, i64 0, i64 %205
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  store i64 %203, ptr %21, align 8, !tbaa !8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %206, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %207 unwind label %215

207:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %208 = load i64, ptr @N, align 8, !tbaa !8
  %209 = add nsw i64 %208, -2
  store i64 %209, ptr %22, align 8, !tbaa !8
  %210 = icmp sgt i64 %208, 1
  br i1 %210, label %.lr.ph90, label %._crit_edge91

._crit_edge91:                                    ; preds = %282, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  %211 = load i64, ptr @dp, align 16, !tbaa !8
  %212 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %211)
          to label %291 unwind label %194

213:                                              ; preds = %._crit_edge80
  %214 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br label %296

215:                                              ; preds = %201
  %216 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  br label %296

.lr.ph90:                                         ; preds = %207, %282
  %storemerge4488 = phi i64 [ %284, %282 ], [ %209, %207 ]
  %217 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qx, i64 0, i64 %storemerge4488
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  %218 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #7
  store ptr %218, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  %219 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #7
  store ptr %219, ptr %24, align 8
  %220 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  br i1 %220, label %.lr.ph83, label %._crit_edge84

._crit_edge84:                                    ; preds = %230, %.lr.ph90
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  %221 = load i64, ptr %22, align 8, !tbaa !8
  %222 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qn, i64 0, i64 %221
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #7
  %223 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %222) #7
  store ptr %223, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #7
  %224 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %222) #7
  store ptr %224, ptr %26, align 8
  %225 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  br i1 %225, label %.lr.ph86, label %._crit_edge87

.lr.ph83:                                         ; preds = %.lr.ph90, %230
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  %227 = load i64, ptr %226, align 8, !tbaa !8
  %228 = load i64, ptr @N, align 8, !tbaa !8
  %229 = add nsw i64 %228, -1
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef 1, i64 noundef 0, i64 noundef %229, i64 noundef %227, i64 noundef 1000000000)
          to label %230 unwind label %233

230:                                              ; preds = %.lr.ph83
  %231 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  %232 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  br i1 %232, label %.lr.ph83, label %._crit_edge84

233:                                              ; preds = %.lr.ph83
  %234 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  br label %290

._crit_edge87:                                    ; preds = %245, %._crit_edge84
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  %235 = load i64, ptr @N, align 8, !tbaa !8
  %236 = add nsw i64 %235, -1
  %237 = load i64, ptr %22, align 8, !tbaa !8
  %238 = getelementptr inbounds [250000 x i64], ptr @amn, i64 0, i64 %237
  %239 = load i64, ptr %238, align 8, !tbaa !8
  %240 = invoke noundef i64 @_ZN8segtree13qryExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef 1, i64 noundef 0, i64 noundef %236, i64 noundef %237, i64 noundef %239)
          to label %250 unwind label %286

.lr.ph86:                                         ; preds = %._crit_edge84, %245
  %241 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  %242 = load i64, ptr %241, align 8, !tbaa !8
  %243 = load i64, ptr @N, align 8, !tbaa !8
  %244 = add nsw i64 %243, -1
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef 1, i64 noundef 0, i64 noundef %244, i64 noundef %242, i64 noundef 1000000000)
          to label %245 unwind label %248

245:                                              ; preds = %.lr.ph86
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  %247 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  br i1 %247, label %.lr.ph86, label %._crit_edge87

248:                                              ; preds = %.lr.ph86
  %249 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  br label %290

250:                                              ; preds = %._crit_edge87
  %251 = load i64, ptr %22, align 8, !tbaa !8
  %252 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %251
  store i64 %240, ptr %252, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #7
  %253 = load i64, ptr @N, align 8, !tbaa !8
  %254 = add nsw i64 %253, -1
  %255 = getelementptr inbounds [250000 x i64], ptr @amx, i64 0, i64 %251
  %256 = load i64, ptr %255, align 8, !tbaa !8
  %257 = invoke noundef i64 @_ZN8segtree13qryExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef 1, i64 noundef 0, i64 noundef %254, i64 noundef %251, i64 noundef %256)
          to label %258 unwind label %288

258:                                              ; preds = %250
  store i64 %257, ptr %27, align 8, !tbaa !8
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %252, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %260 = load i64, ptr %259, align 8, !tbaa !8
  %261 = load i64, ptr %22, align 8, !tbaa !8
  %262 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %261
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  %263 = add nsw i64 %260, 1
  store i64 %263, ptr %262, align 8, !tbaa !8
  %264 = load i64, ptr @N, align 8, !tbaa !8
  %265 = add nsw i64 %264, -1
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmx, i64 noundef 1, i64 noundef 0, i64 noundef %265, i64 noundef %261, i64 noundef %263)
          to label %266 unwind label %286

266:                                              ; preds = %258
  %267 = load i64, ptr @N, align 8, !tbaa !8
  %268 = add nsw i64 %267, -1
  %269 = load i64, ptr %22, align 8, !tbaa !8
  %270 = getelementptr inbounds [250000 x i64], ptr @dp, i64 0, i64 %269
  %271 = load i64, ptr %270, align 8, !tbaa !8
  invoke void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008) @stmn, i64 noundef 1, i64 noundef 0, i64 noundef %268, i64 noundef %269, i64 noundef %271)
          to label %272 unwind label %286

272:                                              ; preds = %266
  %273 = load i64, ptr %22, align 8, !tbaa !8
  %274 = getelementptr inbounds [250000 x i64], ptr @bmx, i64 0, i64 %273
  %275 = load i64, ptr %274, align 8, !tbaa !8
  %276 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qx, i64 0, i64 %275
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %276, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %277 unwind label %286

277:                                              ; preds = %272
  %278 = load i64, ptr %22, align 8, !tbaa !8
  %279 = getelementptr inbounds [250000 x i64], ptr @bmn, i64 0, i64 %278
  %280 = load i64, ptr %279, align 8, !tbaa !8
  %281 = getelementptr inbounds [250001 x %"class.std::vector"], ptr @qn, i64 0, i64 %280
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %281, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %282 unwind label %286

282:                                              ; preds = %277
  %283 = load i64, ptr %22, align 8, !tbaa !8
  %284 = add nsw i64 %283, -1
  store i64 %284, ptr %22, align 8, !tbaa !8
  %285 = icmp sgt i64 %283, 0
  br i1 %285, label %.lr.ph90, label %._crit_edge91, !llvm.loop !29

286:                                              ; preds = %277, %272, %266, %258, %._crit_edge87
  %287 = landingpad { ptr, i32 }
          cleanup
  br label %290

288:                                              ; preds = %250
  %289 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #7
  br label %290

290:                                              ; preds = %288, %286, %248, %233
  %.pn = phi { ptr, i32 } [ %234, %233 ], [ %249, %248 ], [ %287, %286 ], [ %289, %288 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %296

291:                                              ; preds = %._crit_edge91
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %212, i8 noundef signext 10)
          to label %293 unwind label %194

293:                                              ; preds = %291
  call void @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  %294 = load i64, ptr @T, align 8, !tbaa !8
  %295 = add nsw i64 %294, -1
  store i64 %295, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %294, 0
  br i1 %.not, label %._crit_edge95, label %.lr.ph94, !llvm.loop !30

296:                                              ; preds = %290, %215, %213, %194, %192, %173, %144, %116
  %.pn53.pn = phi { ptr, i32 } [ %.pn53, %116 ], [ %.pn50, %144 ], [ %.pn47, %173 ], [ %.pn, %290 ], [ %195, %194 ], [ %216, %215 ], [ %214, %213 ], [ %193, %192 ]
  call void @_ZNSt3setISt4pairIxxESt7greaterIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  br label %297

297:                                              ; preds = %296, %85
  %.pn57.pn = phi { ptr, i32 } [ %.pn57, %85 ], [ %.pn53.pn, %296 ]
  call void @_ZNSt3setISt4pairIxxESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn57.pn

._crit_edge95:                                    ; preds = %293, %0
  ret i32 0
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8segtree14initEx(ptr noundef nonnull align 8 dereferenceable(8000008), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8segtree13updExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008), i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN8segtree13qryExxxxx(ptr noundef nonnull align 8 dereferenceable(8000008), i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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


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