; LLVM IR from eyangch/competitive-programming :: Codeforces/1601 (c)

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

%struct.BIT = type { i64, [2000001 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::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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@A = external dso_local global [1000000 x i64], align 16
@B = external dso_local global [1000000 x i64], align 16
@F = external dso_local global [2000000 x i64], align 16
@L = external dso_local global [1000000 x i64], align 16
@bit = external dso_local global %struct.BIT, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2dcxxxx(i64 noundef, i64 noundef, i64 noundef, i64 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = 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 %23

23:                                               ; preds = %217, %0
  %24 = load i64, ptr @T, align 8, !tbaa !8
  %25 = add nsw i64 %24, -1
  store i64 %25, ptr @T, align 8, !tbaa !8
  %26 = icmp ne i64 %24, 0
  br i1 %26, label %27, label %224

27:                                               ; preds = %23
  %28 = 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)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) @M)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %30

30:                                               ; preds = %44, %27
  %31 = load i64, ptr %2, align 8, !tbaa !8
  %32 = load i64, ptr @N, align 8, !tbaa !8
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %47

35:                                               ; preds = %30
  %36 = load i64, ptr %2, align 8, !tbaa !8
  %37 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %36
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %37)
  %39 = load i64, ptr %2, align 8, !tbaa !8
  %40 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %39
  %41 = load i64, ptr %40, align 8, !tbaa !8
  %42 = load i64, ptr %2, align 8, !tbaa !8
  %43 = getelementptr inbounds [2000000 x i64], ptr @F, i64 0, i64 %42
  store i64 %41, ptr %43, align 8, !tbaa !8
  br label %44

44:                                               ; preds = %35
  %45 = load i64, ptr %2, align 8, !tbaa !8
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr %2, align 8, !tbaa !8
  br label %30, !llvm.loop !11

47:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %48

48:                                               ; preds = %64, %47
  %49 = load i64, ptr %3, align 8, !tbaa !8
  %50 = load i64, ptr @M, align 8, !tbaa !8
  %51 = icmp slt i64 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %67

53:                                               ; preds = %48
  %54 = load i64, ptr %3, align 8, !tbaa !8
  %55 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %54
  %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) %55)
  %57 = load i64, ptr %3, align 8, !tbaa !8
  %58 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !8
  %60 = load i64, ptr %3, align 8, !tbaa !8
  %61 = load i64, ptr @N, align 8, !tbaa !8
  %62 = add nsw i64 %60, %61
  %63 = getelementptr inbounds [2000000 x i64], ptr @F, i64 0, i64 %62
  store i64 %59, ptr %63, align 8, !tbaa !8
  br label %64

64:                                               ; preds = %53
  %65 = load i64, ptr %3, align 8, !tbaa !8
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %3, align 8, !tbaa !8
  br label %48, !llvm.loop !13

67:                                               ; preds = %52
  %68 = load i64, ptr @N, align 8, !tbaa !8
  %69 = getelementptr inbounds i64, ptr @F, i64 %68
  %70 = load i64, ptr @M, align 8, !tbaa !8
  %71 = getelementptr inbounds i64, ptr %69, i64 %70
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef @F, ptr noundef %71)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %72 = load i64, ptr @N, align 8, !tbaa !8
  %73 = getelementptr inbounds i64, ptr @F, i64 %72
  %74 = load i64, ptr @M, align 8, !tbaa !8
  %75 = getelementptr inbounds i64, ptr %73, i64 %74
  %76 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef @F, ptr noundef %75)
  %77 = ptrtoint ptr %76 to i64
  %78 = sub i64 %77, ptrtoint (ptr @F to i64)
  %79 = sdiv exact i64 %78, 8
  store i64 %79, ptr %4, align 8, !tbaa !8
  %80 = load i64, ptr %4, align 8, !tbaa !8
  %81 = add nsw i64 %80, 1
  call void @_ZN3BIT4initEx(ptr noundef nonnull align 8 dereferenceable(16000016) @bit, i64 noundef %81)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %82

82:                                               ; preds = %98, %67
  %83 = load i64, ptr %5, align 8, !tbaa !8
  %84 = load i64, ptr @N, align 8, !tbaa !8
  %85 = icmp slt i64 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %101

87:                                               ; preds = %82
  %88 = load i64, ptr %4, align 8, !tbaa !8
  %89 = getelementptr inbounds i64, ptr @F, i64 %88
  %90 = load i64, ptr %5, align 8, !tbaa !8
  %91 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %90
  %92 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef @F, ptr noundef %89, ptr noundef nonnull align 8 dereferenceable(8) %91)
  %93 = ptrtoint ptr %92 to i64
  %94 = sub i64 %93, ptrtoint (ptr @F to i64)
  %95 = sdiv exact i64 %94, 8
  %96 = load i64, ptr %5, align 8, !tbaa !8
  %97 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %96
  store i64 %95, ptr %97, align 8, !tbaa !8
  br label %98

98:                                               ; preds = %87
  %99 = load i64, ptr %5, align 8, !tbaa !8
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %5, align 8, !tbaa !8
  br label %82, !llvm.loop !14

101:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !8
  br label %102

102:                                              ; preds = %118, %101
  %103 = load i64, ptr %6, align 8, !tbaa !8
  %104 = load i64, ptr @M, align 8, !tbaa !8
  %105 = icmp slt i64 %103, %104
  br i1 %105, label %107, label %106

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

107:                                              ; preds = %102
  %108 = load i64, ptr %4, align 8, !tbaa !8
  %109 = getelementptr inbounds i64, ptr @F, i64 %108
  %110 = load i64, ptr %6, align 8, !tbaa !8
  %111 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %110
  %112 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef @F, ptr noundef %109, ptr noundef nonnull align 8 dereferenceable(8) %111)
  %113 = ptrtoint ptr %112 to i64
  %114 = sub i64 %113, ptrtoint (ptr @F to i64)
  %115 = sdiv exact i64 %114, 8
  %116 = load i64, ptr %6, align 8, !tbaa !8
  %117 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %116
  store i64 %115, ptr %117, align 8, !tbaa !8
  br label %118

118:                                              ; preds = %107
  %119 = load i64, ptr %6, align 8, !tbaa !8
  %120 = add nsw i64 %119, 1
  store i64 %120, ptr %6, align 8, !tbaa !8
  br label %102, !llvm.loop !15

121:                                              ; preds = %106
  %122 = load i64, ptr @M, align 8, !tbaa !8
  %123 = getelementptr inbounds i64, ptr @B, i64 %122
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef @B, ptr noundef %123)
  %124 = load i64, ptr @N, align 8, !tbaa !8
  %125 = sub nsw i64 %124, 1
  %126 = load i64, ptr @M, align 8, !tbaa !8
  %127 = sub nsw i64 %126, 1
  call void @_Z2dcxxxx(i64 noundef 0, i64 noundef %125, i64 noundef 0, i64 noundef %127)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %128 = load i64, ptr @N, align 8, !tbaa !8
  %129 = sub nsw i64 %128, 1
  store i64 %129, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %130 = load i64, ptr @M, align 8, !tbaa !8
  %131 = sub nsw i64 %130, 1
  store i64 %131, ptr %9, align 8, !tbaa !8
  br label %132

132:                                              ; preds = %158, %121
  %133 = load i64, ptr %9, align 8, !tbaa !8
  %134 = icmp sge i64 %133, 0
  br i1 %134, label %136, label %135

135:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %161

136:                                              ; preds = %132
  br label %137

137:                                              ; preds = %147, %136
  %138 = load i64, ptr %8, align 8, !tbaa !8
  %139 = load i64, ptr %9, align 8, !tbaa !8
  %140 = getelementptr inbounds [1000000 x i64], ptr @L, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !8
  %142 = icmp sgt i64 %138, %141
  br i1 %142, label %143, label %154

143:                                              ; preds = %137
  %144 = load i64, ptr %8, align 8, !tbaa !8
  %145 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %144
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %145)
          to label %146 unwind label %150

146:                                              ; preds = %143
  br label %147

147:                                              ; preds = %146
  %148 = load i64, ptr %8, align 8, !tbaa !8
  %149 = add nsw i64 %148, -1
  store i64 %149, ptr %8, align 8, !tbaa !8
  br label %137, !llvm.loop !16

150:                                              ; preds = %154, %143
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %10, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %223

154:                                              ; preds = %137
  %155 = load i64, ptr %9, align 8, !tbaa !8
  %156 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %155
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %156)
          to label %157 unwind label %150

157:                                              ; preds = %154
  br label %158

158:                                              ; preds = %157
  %159 = load i64, ptr %9, align 8, !tbaa !8
  %160 = add nsw i64 %159, -1
  store i64 %160, ptr %9, align 8, !tbaa !8
  br label %132, !llvm.loop !17

161:                                              ; preds = %135
  br label %162

162:                                              ; preds = %169, %161
  %163 = load i64, ptr %8, align 8, !tbaa !8
  %164 = icmp sge i64 %163, 0
  br i1 %164, label %165, label %176

165:                                              ; preds = %162
  %166 = load i64, ptr %8, align 8, !tbaa !8
  %167 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %166
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %167)
          to label %168 unwind label %172

168:                                              ; preds = %165
  br label %169

169:                                              ; preds = %168
  %170 = load i64, ptr %8, align 8, !tbaa !8
  %171 = add nsw i64 %170, -1
  store i64 %171, ptr %8, align 8, !tbaa !8
  br label %162, !llvm.loop !18

172:                                              ; preds = %176, %165
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %10, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %11, align 4
  br label %223

176:                                              ; preds = %162
  %177 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %178 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %177, ptr %178, align 8
  %179 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %180 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %179, ptr %180, align 8
  %181 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8
  %183 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEEvT_S7_(ptr %182, ptr %184)
          to label %185 unwind label %172

185:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %186 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %187 = sub i64 %186, 1
  store i64 %187, ptr %15, align 8, !tbaa !8
  br label %188

188:                                              ; preds = %205, %185
  %189 = load i64, ptr %15, align 8, !tbaa !8
  %190 = icmp sge i64 %189, 0
  br i1 %190, label %192, label %191

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

192:                                              ; preds = %188
  %193 = load i64, ptr %15, align 8, !tbaa !8
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %193) #6
  %195 = load i64, ptr %194, align 8, !tbaa !8
  %196 = sub nsw i64 %195, 1
  %197 = invoke noundef i64 @_ZN3BIT3qryEx(ptr noundef nonnull align 8 dereferenceable(16000016) @bit, i64 noundef %196)
          to label %198 unwind label %208

198:                                              ; preds = %192
  %199 = load i64, ptr %14, align 8, !tbaa !8
  %200 = add nsw i64 %199, %197
  store i64 %200, ptr %14, align 8, !tbaa !8
  %201 = load i64, ptr %15, align 8, !tbaa !8
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %201) #6
  %203 = load i64, ptr %202, align 8, !tbaa !8
  invoke void @_ZN3BIT3updExx(ptr noundef nonnull align 8 dereferenceable(16000016) @bit, i64 noundef %203, i64 noundef 1)
          to label %204 unwind label %208

204:                                              ; preds = %198
  br label %205

205:                                              ; preds = %204
  %206 = load i64, ptr %15, align 8, !tbaa !8
  %207 = add nsw i64 %206, -1
  store i64 %207, ptr %15, align 8, !tbaa !8
  br label %188, !llvm.loop !19

208:                                              ; preds = %198, %192
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %10, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %222

212:                                              ; preds = %191
  %213 = load i64, ptr %14, align 8, !tbaa !8
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %213)
          to label %215 unwind label %218

215:                                              ; preds = %212
  %216 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %214, i8 noundef signext 10)
          to label %217 unwind label %218

217:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %23, !llvm.loop !20

218:                                              ; preds = %215, %212
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %10, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %11, align 4
  br label %222

222:                                              ; preds = %218, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %223

223:                                              ; preds = %222, %172, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %226

224:                                              ; preds = %23
  %225 = load i32, ptr %1, align 4
  ret i32 %225

226:                                              ; preds = %223
  %227 = load ptr, ptr %10, align 8
  %228 = load i32, ptr %11, align 4
  %229 = insertvalue { ptr, i32 } poison, ptr %227, 0
  %230 = insertvalue { ptr, i32 } %229, i32 %228, 1
  resume { ptr, i32 } %230
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3BIT4initEx(ptr noundef nonnull align 8 dereferenceable(16000016), i64 noundef) #0 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3BIT3updExx(ptr noundef nonnull align 8 dereferenceable(16000016), i64 noundef, i64 noundef) #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) #0 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !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"

%struct.BIT = type { i64, [2000001 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::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 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@A = external dso_local global [1000000 x i64], align 16
@B = external dso_local global [1000000 x i64], align 16
@F = external dso_local global [2000000 x i64], align 16
@L = external dso_local local_unnamed_addr global [1000000 x i64], align 16
@bit = external dso_local global %struct.BIT, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2dcxxxx(i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %8 = 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)
  %9 = load i64, ptr @T, align 8, !tbaa !8
  %10 = add nsw i64 %9, -1
  store i64 %10, ptr @T, align 8, !tbaa !8
  %.not88 = icmp eq i64 %9, 0
  br i1 %.not88, label %._crit_edge91, label %.lr.ph90

.lr.ph90:                                         ; preds = %0, %109
  %11 = 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)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %13 = load i64, ptr @N, align 8, !tbaa !8
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %.lr.ph, label %.preheader59

.preheader59:                                     ; preds = %.lr.ph, %.lr.ph90
  %15 = phi i64 [ %13, %.lr.ph90 ], [ %23, %.lr.ph ]
  %16 = load i64, ptr @M, align 8, !tbaa !8
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph66, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph90, %.lr.ph
  %.04164 = phi i64 [ %22, %.lr.ph ], [ 0, %.lr.ph90 ]
  %18 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %.04164
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %20 = load i64, ptr %18, align 8, !tbaa !8
  %21 = getelementptr inbounds [2000000 x i64], ptr @F, i64 0, i64 %.04164
  store i64 %20, ptr %21, align 8, !tbaa !8
  %22 = add nuw nsw i64 %.04164, 1
  %23 = load i64, ptr @N, align 8, !tbaa !8
  %24 = icmp slt i64 %22, %23
  br i1 %24, label %.lr.ph, label %.preheader59, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph66, %.preheader59
  %25 = phi i64 [ %15, %.preheader59 ], [ %43, %.lr.ph66 ]
  %.lcssa = phi i64 [ %16, %.preheader59 ], [ %47, %.lr.ph66 ]
  %26 = getelementptr inbounds i64, ptr @F, i64 %25
  %27 = getelementptr inbounds i64, ptr %26, i64 %.lcssa
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull @F, ptr noundef nonnull %27)
  %28 = load i64, ptr @N, align 8, !tbaa !8
  %29 = getelementptr inbounds i64, ptr @F, i64 %28
  %30 = load i64, ptr @M, align 8, !tbaa !8
  %31 = getelementptr inbounds i64, ptr %29, i64 %30
  %32 = call noundef ptr @_ZSt6uniqueIPxET_S1_S1_(ptr noundef nonnull @F, ptr noundef nonnull %31)
  %33 = ptrtoint ptr %32 to i64
  %34 = sub i64 %33, ptrtoint (ptr @F to i64)
  %35 = ashr exact i64 %34, 3
  %36 = add nsw i64 %35, 1
  call void @_ZN3BIT4initEx(ptr noundef nonnull align 8 dereferenceable(16000016) @bit, i64 noundef %36)
  %37 = load i64, ptr @N, align 8, !tbaa !8
  %38 = icmp sgt i64 %37, 0
  br i1 %38, label %.lr.ph69, label %.preheader58

.lr.ph69:                                         ; preds = %._crit_edge
  %39 = getelementptr inbounds i8, ptr @F, i64 %34
  br label %52

.lr.ph66:                                         ; preds = %.preheader59, %.lr.ph66
  %.04265 = phi i64 [ %46, %.lr.ph66 ], [ 0, %.preheader59 ]
  %40 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %.04265
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %40)
  %42 = load i64, ptr %40, align 8, !tbaa !8
  %43 = load i64, ptr @N, align 8, !tbaa !8
  %44 = add nsw i64 %43, %.04265
  %45 = getelementptr inbounds [2000000 x i64], ptr @F, i64 0, i64 %44
  store i64 %42, ptr %45, align 8, !tbaa !8
  %46 = add nuw nsw i64 %.04265, 1
  %47 = load i64, ptr @M, align 8, !tbaa !8
  %48 = icmp slt i64 %46, %47
  br i1 %48, label %.lr.ph66, label %._crit_edge, !llvm.loop !13

.preheader58:                                     ; preds = %52, %._crit_edge
  %49 = load i64, ptr @M, align 8, !tbaa !8
  %50 = icmp sgt i64 %49, 0
  br i1 %50, label %.lr.ph71, label %._crit_edge72

.lr.ph71:                                         ; preds = %.preheader58
  %51 = getelementptr inbounds i8, ptr @F, i64 %34
  br label %69

52:                                               ; preds = %.lr.ph69, %52
  %.04867 = phi i64 [ 0, %.lr.ph69 ], [ %58, %52 ]
  %53 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %.04867
  %54 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef nonnull @F, ptr noundef nonnull %39, ptr noundef nonnull align 8 dereferenceable(8) %53)
  %55 = ptrtoint ptr %54 to i64
  %56 = sub i64 %55, ptrtoint (ptr @F to i64)
  %57 = ashr exact i64 %56, 3
  store i64 %57, ptr %53, align 8, !tbaa !8
  %58 = add nuw nsw i64 %.04867, 1
  %59 = load i64, ptr @N, align 8, !tbaa !8
  %60 = icmp slt i64 %58, %59
  br i1 %60, label %52, label %.preheader58, !llvm.loop !14

._crit_edge72:                                    ; preds = %69, %.preheader58
  %.lcssa60 = phi i64 [ %49, %.preheader58 ], [ %76, %69 ]
  %61 = getelementptr inbounds i64, ptr @B, i64 %.lcssa60
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull @B, ptr noundef nonnull %61)
  %62 = load i64, ptr @N, align 8, !tbaa !8
  %63 = add nsw i64 %62, -1
  %64 = load i64, ptr @M, align 8, !tbaa !8
  %65 = add nsw i64 %64, -1
  call void @_Z2dcxxxx(i64 noundef 0, i64 noundef %63, i64 noundef 0, i64 noundef %65)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %66 = load i64, ptr @N, align 8, !tbaa !8
  %67 = add nsw i64 %66, -1
  %68 = load i64, ptr @M, align 8, !tbaa !8
  br label %78

69:                                               ; preds = %.lr.ph71, %69
  %.04770 = phi i64 [ 0, %.lr.ph71 ], [ %75, %69 ]
  %70 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %.04770
  %71 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef nonnull @F, ptr noundef nonnull %51, ptr noundef nonnull align 8 dereferenceable(8) %70)
  %72 = ptrtoint ptr %71 to i64
  %73 = sub i64 %72, ptrtoint (ptr @F to i64)
  %74 = ashr exact i64 %73, 3
  store i64 %74, ptr %70, align 8, !tbaa !8
  %75 = add nuw nsw i64 %.04770, 1
  %76 = load i64, ptr @M, align 8, !tbaa !8
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %69, label %._crit_edge72, !llvm.loop !15

78:                                               ; preds = %._crit_edge76, %._crit_edge72
  %.046 = phi i64 [ %67, %._crit_edge72 ], [ %.1.lcssa, %._crit_edge76 ]
  %.045.in = phi i64 [ %68, %._crit_edge72 ], [ %.045, %._crit_edge76 ]
  %.045 = add nsw i64 %.045.in, -1
  %79 = icmp sgt i64 %.045.in, 0
  br i1 %79, label %.preheader, label %.preheader52

.preheader52:                                     ; preds = %78
  %80 = icmp sgt i64 %.046, -1
  br i1 %80, label %.lr.ph79, label %._crit_edge80

.preheader:                                       ; preds = %78
  %81 = getelementptr inbounds [1000000 x i64], ptr @L, i64 0, i64 %.045
  %82 = load i64, ptr %81, align 8, !tbaa !8
  %83 = icmp sgt i64 %.046, %82
  br i1 %83, label %.lr.ph75, label %._crit_edge76

.lr.ph75:                                         ; preds = %.preheader, %85
  %.174 = phi i64 [ %86, %85 ], [ %.046, %.preheader ]
  %84 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %.174
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(8) %84)
          to label %85 unwind label %.loopexit

85:                                               ; preds = %.lr.ph75
  %86 = add nsw i64 %.174, -1
  %87 = load i64, ptr %81, align 8, !tbaa !8
  %88 = icmp sgt i64 %86, %87
  br i1 %88, label %.lr.ph75, label %._crit_edge76, !llvm.loop !16

.loopexit:                                        ; preds = %.lr.ph75
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %114

.loopexit.split-lp:                               ; preds = %._crit_edge76
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %114

._crit_edge76:                                    ; preds = %85, %.preheader
  %.1.lcssa = phi i64 [ %.046, %.preheader ], [ %86, %85 ]
  %89 = getelementptr inbounds [1000000 x i64], ptr @B, i64 0, i64 %.045
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %78 unwind label %.loopexit.split-lp, !llvm.loop !17

.lr.ph79:                                         ; preds = %.preheader52, %91
  %.278 = phi i64 [ %92, %91 ], [ %.046, %.preheader52 ]
  %90 = getelementptr inbounds [1000000 x i64], ptr @A, i64 0, i64 %.278
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(8) %90)
          to label %91 unwind label %.loopexit53

91:                                               ; preds = %.lr.ph79
  %92 = add nsw i64 %.278, -1
  %93 = icmp sgt i64 %.278, 0
  br i1 %93, label %.lr.ph79, label %._crit_edge80, !llvm.loop !18

.loopexit53:                                      ; preds = %.lr.ph79
  %lpad.loopexit55 = landingpad { ptr, i32 }
          cleanup
  br label %114

.loopexit.split-lp54:                             ; preds = %._crit_edge80
  %lpad.loopexit.split-lp56 = landingpad { ptr, i32 }
          cleanup
  br label %114

._crit_edge80:                                    ; preds = %91, %.preheader52
  %94 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %95 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEEvT_S7_(ptr %94, ptr %95)
          to label %96 unwind label %.loopexit.split-lp54

96:                                               ; preds = %._crit_edge80
  %97 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %.081 = add i64 %97, -1
  %98 = icmp sgt i64 %.081, -1
  br i1 %98, label %.lr.ph85, label %._crit_edge86

._crit_edge86:                                    ; preds = %.lr.ph85, %96
  %.040.lcssa = phi i64 [ 0, %96 ], [ %104, %.lr.ph85 ]
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.040.lcssa)
          to label %107 unwind label %112

.lr.ph85:                                         ; preds = %96, %.lr.ph85
  %.083 = phi i64 [ %.0, %.lr.ph85 ], [ %.081, %96 ]
  %.04082 = phi i64 [ %104, %.lr.ph85 ], [ 0, %96 ]
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.083) #6
  %101 = load i64, ptr %100, align 8, !tbaa !8
  %102 = add nsw i64 %101, -1
  %103 = call noundef i64 @_ZN3BIT3qryEx(ptr noundef nonnull align 8 dereferenceable(16000016) @bit, i64 noundef %102)
  %104 = add nsw i64 %103, %.04082
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.083) #6
  %106 = load i64, ptr %105, align 8, !tbaa !8
  call void @_ZN3BIT3updExx(ptr noundef nonnull align 8 dereferenceable(16000016) @bit, i64 noundef %106, i64 noundef 1)
  %.0 = add nsw i64 %.083, -1
  %.not106 = icmp eq i64 %.083, 0
  br i1 %.not106, label %._crit_edge86, label %.lr.ph85, !llvm.loop !19

107:                                              ; preds = %._crit_edge86
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %99, i8 noundef signext 10)
          to label %109 unwind label %112

109:                                              ; preds = %107
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  %110 = load i64, ptr @T, align 8, !tbaa !8
  %111 = add nsw i64 %110, -1
  store i64 %111, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %110, 0
  br i1 %.not, label %._crit_edge91, label %.lr.ph90, !llvm.loop !20

112:                                              ; preds = %107, %._crit_edge86
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %114

114:                                              ; preds = %.loopexit53, %.loopexit.split-lp54, %.loopexit, %.loopexit.split-lp, %112
  %.pn = phi { ptr, i32 } [ %113, %112 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit55, %.loopexit53 ], [ %lpad.loopexit.split-lp56, %.loopexit.split-lp54 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn

._crit_edge91:                                    ; preds = %109, %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 #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3BIT4initEx(ptr noundef nonnull align 8 dereferenceable(16000016), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPxxET_S1_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 @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3BIT3updExx(ptr noundef nonnull align 8 dereferenceable(16000016), i64 noundef, i64 noundef) 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 #0 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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