; LLVM IR from eyangch/competitive-programming :: Codeforces/1606 (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 }
%"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.anon = type { i8 }

@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 [500000 x %"class.std::vector"], align 16
@tl = external dso_local global [500000 x %"class.std::vector"], align 16
@tr = external dso_local global [500000 x %"class.std::vector"], align 16
@bl = external dso_local global [500000 x %"class.std::vector"], align 16
@br = external dso_local global [500000 x %"class.std::vector"], align 16
@o = external dso_local global [500000 x i64], align 16
@ans = external dso_local global [500000 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1

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

33:                                               ; preds = %511, %0
  %34 = load i64, ptr @T, align 8, !tbaa !8
  %35 = add nsw i64 %34, -1
  store i64 %35, ptr @T, align 8, !tbaa !8
  %36 = icmp ne i64 %34, 0
  br i1 %36, label %37, label %512

37:                                               ; preds = %33
  %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) @N)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(8) @M)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %40

40:                                               ; preds = %67, %37
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = load i64, ptr @N, align 8, !tbaa !8
  %43 = icmp slt i64 %41, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !8
  br label %46

46:                                               ; preds = %63, %45
  %47 = load i64, ptr %4, align 8, !tbaa !8
  %48 = load i64, ptr @M, align 8, !tbaa !8
  %49 = icmp slt i64 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 7, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %66

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %53 = load i64, ptr %2, align 8, !tbaa !8
  %54 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @a, i64 0, i64 %53
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %55 = load i64, ptr %2, align 8, !tbaa !8
  %56 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %55
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %57 = load i64, ptr %2, align 8, !tbaa !8
  %58 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %57
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %59 = load i64, ptr %2, align 8, !tbaa !8
  %60 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %59
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %61 = load i64, ptr %2, align 8, !tbaa !8
  %62 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %61
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %63

63:                                               ; preds = %51
  %64 = load i64, ptr %4, align 8, !tbaa !8
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %4, align 8, !tbaa !8
  br label %46, !llvm.loop !11

66:                                               ; preds = %50
  br label %67

67:                                               ; preds = %66
  %68 = load i64, ptr %2, align 8, !tbaa !8
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %2, align 8, !tbaa !8
  br label %40, !llvm.loop !13

70:                                               ; preds = %44
  %71 = load i64, ptr @N, align 8, !tbaa !8
  %72 = getelementptr inbounds i64, ptr @o, i64 %71
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef @o, ptr noundef %72, i32 noundef 0)
  %73 = load i64, ptr @N, align 8, !tbaa !8
  %74 = getelementptr inbounds i64, ptr @o, i64 %73
  call void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef @o, ptr noundef %74)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %75

75:                                               ; preds = %141, %70
  %76 = load i64, ptr %7, align 8, !tbaa !8
  %77 = load i64, ptr @N, align 8, !tbaa !8
  %78 = icmp slt i64 %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %144

80:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !8
  br label %81

81:                                               ; preds = %137, %80
  %82 = load i64, ptr %8, align 8, !tbaa !8
  %83 = load i64, ptr @M, align 8, !tbaa !8
  %84 = icmp slt i64 %82, %83
  br i1 %84, label %86, label %85

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

86:                                               ; preds = %81
  %87 = load i64, ptr %7, align 8, !tbaa !8
  %88 = icmp sgt i64 %87, 0
  br i1 %88, label %89, label %111

89:                                               ; preds = %86
  %90 = load i64, ptr %7, align 8, !tbaa !8
  %91 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %92
  %94 = load i64, ptr %8, align 8, !tbaa !8
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %94) #7
  %96 = load i64, ptr %7, align 8, !tbaa !8
  %97 = sub nsw i64 %96, 1
  %98 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %99
  %101 = load i64, ptr %8, align 8, !tbaa !8
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %101) #7
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull align 8 dereferenceable(8) %102)
  %104 = load i64, ptr %103, align 8, !tbaa !8
  %105 = load i64, ptr %7, align 8, !tbaa !8
  %106 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !8
  %108 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %107
  %109 = load i64, ptr %8, align 8, !tbaa !8
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %108, i64 noundef %109) #7
  store i64 %104, ptr %110, align 8, !tbaa !8
  br label %111

111:                                              ; preds = %89, %86
  %112 = load i64, ptr %8, align 8, !tbaa !8
  %113 = icmp sgt i64 %112, 0
  br i1 %113, label %114, label %136

114:                                              ; preds = %111
  %115 = load i64, ptr %7, align 8, !tbaa !8
  %116 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !8
  %118 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %117
  %119 = load i64, ptr %8, align 8, !tbaa !8
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %119) #7
  %121 = load i64, ptr %7, align 8, !tbaa !8
  %122 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !8
  %124 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %123
  %125 = load i64, ptr %8, align 8, !tbaa !8
  %126 = sub nsw i64 %125, 1
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %126) #7
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef nonnull align 8 dereferenceable(8) %127)
  %129 = load i64, ptr %128, align 8, !tbaa !8
  %130 = load i64, ptr %7, align 8, !tbaa !8
  %131 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !8
  %133 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %132
  %134 = load i64, ptr %8, align 8, !tbaa !8
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef %134) #7
  store i64 %129, ptr %135, align 8, !tbaa !8
  br label %136

136:                                              ; preds = %114, %111
  br label %137

137:                                              ; preds = %136
  %138 = load i64, ptr %8, align 8, !tbaa !8
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %8, align 8, !tbaa !8
  br label %81, !llvm.loop !14

140:                                              ; preds = %85
  br label %141

141:                                              ; preds = %140
  %142 = load i64, ptr %7, align 8, !tbaa !8
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %7, align 8, !tbaa !8
  br label %75, !llvm.loop !15

144:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %145 = load i64, ptr @N, align 8, !tbaa !8
  %146 = sub nsw i64 %145, 1
  store i64 %146, ptr %9, align 8, !tbaa !8
  br label %147

147:                                              ; preds = %214, %144
  %148 = load i64, ptr %9, align 8, !tbaa !8
  %149 = icmp sge i64 %148, 0
  br i1 %149, label %151, label %150

150:                                              ; preds = %147
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %217

151:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !8
  br label %152

152:                                              ; preds = %210, %151
  %153 = load i64, ptr %10, align 8, !tbaa !8
  %154 = load i64, ptr @M, align 8, !tbaa !8
  %155 = icmp slt i64 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %213

157:                                              ; preds = %152
  %158 = load i64, ptr %9, align 8, !tbaa !8
  %159 = load i64, ptr @N, align 8, !tbaa !8
  %160 = sub nsw i64 %159, 1
  %161 = icmp slt i64 %158, %160
  br i1 %161, label %162, label %184

162:                                              ; preds = %157
  %163 = load i64, ptr %9, align 8, !tbaa !8
  %164 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %163
  %165 = load i64, ptr %164, align 8, !tbaa !8
  %166 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %165
  %167 = load i64, ptr %10, align 8, !tbaa !8
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %166, i64 noundef %167) #7
  %169 = load i64, ptr %9, align 8, !tbaa !8
  %170 = add nsw i64 %169, 1
  %171 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !8
  %173 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %172
  %174 = load i64, ptr %10, align 8, !tbaa !8
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %173, i64 noundef %174) #7
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %168, ptr noundef nonnull align 8 dereferenceable(8) %175)
  %177 = load i64, ptr %176, align 8, !tbaa !8
  %178 = load i64, ptr %9, align 8, !tbaa !8
  %179 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !8
  %181 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %180
  %182 = load i64, ptr %10, align 8, !tbaa !8
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %182) #7
  store i64 %177, ptr %183, align 8, !tbaa !8
  br label %184

184:                                              ; preds = %162, %157
  %185 = load i64, ptr %10, align 8, !tbaa !8
  %186 = icmp sgt i64 %185, 0
  br i1 %186, label %187, label %209

187:                                              ; preds = %184
  %188 = load i64, ptr %9, align 8, !tbaa !8
  %189 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %188
  %190 = load i64, ptr %189, align 8, !tbaa !8
  %191 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %190
  %192 = load i64, ptr %10, align 8, !tbaa !8
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef %192) #7
  %194 = load i64, ptr %9, align 8, !tbaa !8
  %195 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %194
  %196 = load i64, ptr %195, align 8, !tbaa !8
  %197 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %196
  %198 = load i64, ptr %10, align 8, !tbaa !8
  %199 = sub nsw i64 %198, 1
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %197, i64 noundef %199) #7
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef nonnull align 8 dereferenceable(8) %200)
  %202 = load i64, ptr %201, align 8, !tbaa !8
  %203 = load i64, ptr %9, align 8, !tbaa !8
  %204 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %203
  %205 = load i64, ptr %204, align 8, !tbaa !8
  %206 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %205
  %207 = load i64, ptr %10, align 8, !tbaa !8
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef %207) #7
  store i64 %202, ptr %208, align 8, !tbaa !8
  br label %209

209:                                              ; preds = %187, %184
  br label %210

210:                                              ; preds = %209
  %211 = load i64, ptr %10, align 8, !tbaa !8
  %212 = add nsw i64 %211, 1
  store i64 %212, ptr %10, align 8, !tbaa !8
  br label %152, !llvm.loop !16

213:                                              ; preds = %156
  br label %214

214:                                              ; preds = %213
  %215 = load i64, ptr %9, align 8, !tbaa !8
  %216 = add nsw i64 %215, -1
  store i64 %216, ptr %9, align 8, !tbaa !8
  br label %147, !llvm.loop !17

217:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %218

218:                                              ; preds = %287, %217
  %219 = load i64, ptr %11, align 8, !tbaa !8
  %220 = load i64, ptr @N, align 8, !tbaa !8
  %221 = icmp slt i64 %219, %220
  br i1 %221, label %223, label %222

222:                                              ; preds = %218
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %290

223:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %224 = load i64, ptr @M, align 8, !tbaa !8
  %225 = sub nsw i64 %224, 1
  store i64 %225, ptr %12, align 8, !tbaa !8
  br label %226

226:                                              ; preds = %283, %223
  %227 = load i64, ptr %12, align 8, !tbaa !8
  %228 = icmp sge i64 %227, 0
  br i1 %228, label %230, label %229

229:                                              ; preds = %226
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %286

230:                                              ; preds = %226
  %231 = load i64, ptr %11, align 8, !tbaa !8
  %232 = icmp sgt i64 %231, 0
  br i1 %232, label %233, label %255

233:                                              ; preds = %230
  %234 = load i64, ptr %11, align 8, !tbaa !8
  %235 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %234
  %236 = load i64, ptr %235, align 8, !tbaa !8
  %237 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %236
  %238 = load i64, ptr %12, align 8, !tbaa !8
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %238) #7
  %240 = load i64, ptr %11, align 8, !tbaa !8
  %241 = sub nsw i64 %240, 1
  %242 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %241
  %243 = load i64, ptr %242, align 8, !tbaa !8
  %244 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %243
  %245 = load i64, ptr %12, align 8, !tbaa !8
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %244, i64 noundef %245) #7
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %239, ptr noundef nonnull align 8 dereferenceable(8) %246)
  %248 = load i64, ptr %247, align 8, !tbaa !8
  %249 = load i64, ptr %11, align 8, !tbaa !8
  %250 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %249
  %251 = load i64, ptr %250, align 8, !tbaa !8
  %252 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %251
  %253 = load i64, ptr %12, align 8, !tbaa !8
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %252, i64 noundef %253) #7
  store i64 %248, ptr %254, align 8, !tbaa !8
  br label %255

255:                                              ; preds = %233, %230
  %256 = load i64, ptr %12, align 8, !tbaa !8
  %257 = load i64, ptr @M, align 8, !tbaa !8
  %258 = sub nsw i64 %257, 1
  %259 = icmp slt i64 %256, %258
  br i1 %259, label %260, label %282

260:                                              ; preds = %255
  %261 = load i64, ptr %11, align 8, !tbaa !8
  %262 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %261
  %263 = load i64, ptr %262, align 8, !tbaa !8
  %264 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %263
  %265 = load i64, ptr %12, align 8, !tbaa !8
  %266 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %264, i64 noundef %265) #7
  %267 = load i64, ptr %11, align 8, !tbaa !8
  %268 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %267
  %269 = load i64, ptr %268, align 8, !tbaa !8
  %270 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %269
  %271 = load i64, ptr %12, align 8, !tbaa !8
  %272 = add nsw i64 %271, 1
  %273 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %270, i64 noundef %272) #7
  %274 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %266, ptr noundef nonnull align 8 dereferenceable(8) %273)
  %275 = load i64, ptr %274, align 8, !tbaa !8
  %276 = load i64, ptr %11, align 8, !tbaa !8
  %277 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %276
  %278 = load i64, ptr %277, align 8, !tbaa !8
  %279 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %278
  %280 = load i64, ptr %12, align 8, !tbaa !8
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %279, i64 noundef %280) #7
  store i64 %275, ptr %281, align 8, !tbaa !8
  br label %282

282:                                              ; preds = %260, %255
  br label %283

283:                                              ; preds = %282
  %284 = load i64, ptr %12, align 8, !tbaa !8
  %285 = add nsw i64 %284, -1
  store i64 %285, ptr %12, align 8, !tbaa !8
  br label %226, !llvm.loop !18

286:                                              ; preds = %229
  br label %287

287:                                              ; preds = %286
  %288 = load i64, ptr %11, align 8, !tbaa !8
  %289 = add nsw i64 %288, 1
  store i64 %289, ptr %11, align 8, !tbaa !8
  br label %218, !llvm.loop !19

290:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %291 = load i64, ptr @N, align 8, !tbaa !8
  %292 = sub nsw i64 %291, 1
  store i64 %292, ptr %13, align 8, !tbaa !8
  br label %293

293:                                              ; preds = %363, %290
  %294 = load i64, ptr %13, align 8, !tbaa !8
  %295 = icmp sge i64 %294, 0
  br i1 %295, label %297, label %296

296:                                              ; preds = %293
  store i32 28, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %366

297:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %298 = load i64, ptr @M, align 8, !tbaa !8
  %299 = sub nsw i64 %298, 1
  store i64 %299, ptr %14, align 8, !tbaa !8
  br label %300

300:                                              ; preds = %359, %297
  %301 = load i64, ptr %14, align 8, !tbaa !8
  %302 = icmp sge i64 %301, 0
  br i1 %302, label %304, label %303

303:                                              ; preds = %300
  store i32 31, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %362

304:                                              ; preds = %300
  %305 = load i64, ptr %13, align 8, !tbaa !8
  %306 = load i64, ptr @N, align 8, !tbaa !8
  %307 = sub nsw i64 %306, 1
  %308 = icmp slt i64 %305, %307
  br i1 %308, label %309, label %331

309:                                              ; preds = %304
  %310 = load i64, ptr %13, align 8, !tbaa !8
  %311 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %310
  %312 = load i64, ptr %311, align 8, !tbaa !8
  %313 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %312
  %314 = load i64, ptr %14, align 8, !tbaa !8
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %313, i64 noundef %314) #7
  %316 = load i64, ptr %13, align 8, !tbaa !8
  %317 = add nsw i64 %316, 1
  %318 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %317
  %319 = load i64, ptr %318, align 8, !tbaa !8
  %320 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %319
  %321 = load i64, ptr %14, align 8, !tbaa !8
  %322 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %320, i64 noundef %321) #7
  %323 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %315, ptr noundef nonnull align 8 dereferenceable(8) %322)
  %324 = load i64, ptr %323, align 8, !tbaa !8
  %325 = load i64, ptr %13, align 8, !tbaa !8
  %326 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %325
  %327 = load i64, ptr %326, align 8, !tbaa !8
  %328 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %327
  %329 = load i64, ptr %14, align 8, !tbaa !8
  %330 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %328, i64 noundef %329) #7
  store i64 %324, ptr %330, align 8, !tbaa !8
  br label %331

331:                                              ; preds = %309, %304
  %332 = load i64, ptr %14, align 8, !tbaa !8
  %333 = load i64, ptr @M, align 8, !tbaa !8
  %334 = sub nsw i64 %333, 1
  %335 = icmp slt i64 %332, %334
  br i1 %335, label %336, label %358

336:                                              ; preds = %331
  %337 = load i64, ptr %13, align 8, !tbaa !8
  %338 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %337
  %339 = load i64, ptr %338, align 8, !tbaa !8
  %340 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %339
  %341 = load i64, ptr %14, align 8, !tbaa !8
  %342 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %340, i64 noundef %341) #7
  %343 = load i64, ptr %13, align 8, !tbaa !8
  %344 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %343
  %345 = load i64, ptr %344, align 8, !tbaa !8
  %346 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %345
  %347 = load i64, ptr %14, align 8, !tbaa !8
  %348 = add nsw i64 %347, 1
  %349 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %346, i64 noundef %348) #7
  %350 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %342, ptr noundef nonnull align 8 dereferenceable(8) %349)
  %351 = load i64, ptr %350, align 8, !tbaa !8
  %352 = load i64, ptr %13, align 8, !tbaa !8
  %353 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %352
  %354 = load i64, ptr %353, align 8, !tbaa !8
  %355 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %354
  %356 = load i64, ptr %14, align 8, !tbaa !8
  %357 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %355, i64 noundef %356) #7
  store i64 %351, ptr %357, align 8, !tbaa !8
  br label %358

358:                                              ; preds = %336, %331
  br label %359

359:                                              ; preds = %358
  %360 = load i64, ptr %14, align 8, !tbaa !8
  %361 = add nsw i64 %360, -1
  store i64 %361, ptr %14, align 8, !tbaa !8
  br label %300, !llvm.loop !20

362:                                              ; preds = %303
  br label %363

363:                                              ; preds = %362
  %364 = load i64, ptr %13, align 8, !tbaa !8
  %365 = add nsw i64 %364, -1
  store i64 %365, ptr %13, align 8, !tbaa !8
  br label %293, !llvm.loop !21

366:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 0, ptr %15, align 1, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 1, ptr %16, align 8, !tbaa !8
  br label %367

367:                                              ; preds = %481, %366
  %368 = load i64, ptr %16, align 8, !tbaa !8
  %369 = load i64, ptr @M, align 8, !tbaa !8
  %370 = icmp slt i64 %368, %369
  br i1 %370, label %372, label %371

371:                                              ; preds = %367
  store i32 34, ptr %3, align 4
  br label %484

372:                                              ; preds = %367
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 1, ptr %17, align 8, !tbaa !8
  br label %373

373:                                              ; preds = %472, %372
  %374 = load i64, ptr %17, align 8, !tbaa !8
  %375 = load i64, ptr @N, align 8, !tbaa !8
  %376 = icmp slt i64 %374, %375
  br i1 %376, label %378, label %377

377:                                              ; preds = %373
  store i32 37, ptr %3, align 4
  br label %475

378:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %379 = load i64, ptr %17, align 8, !tbaa !8
  %380 = sub nsw i64 %379, 1
  %381 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %380
  %382 = load i64, ptr %381, align 8, !tbaa !8
  %383 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %382
  %384 = load i64, ptr %16, align 8, !tbaa !8
  %385 = sub nsw i64 %384, 1
  %386 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %383, i64 noundef %385) #7
  %387 = load i64, ptr %386, align 8, !tbaa !8
  store i64 %387, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %388 = load i64, ptr %17, align 8, !tbaa !8
  %389 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %388
  %390 = load i64, ptr %389, align 8, !tbaa !8
  %391 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %390
  %392 = load i64, ptr %16, align 8, !tbaa !8
  %393 = sub nsw i64 %392, 1
  %394 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %391, i64 noundef %393) #7
  %395 = load i64, ptr %394, align 8, !tbaa !8
  store i64 %395, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %396 = load i64, ptr %17, align 8, !tbaa !8
  %397 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %396
  %398 = load i64, ptr %397, align 8, !tbaa !8
  %399 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %398
  %400 = load i64, ptr %16, align 8, !tbaa !8
  %401 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %399, i64 noundef %400) #7
  %402 = load i64, ptr %401, align 8, !tbaa !8
  store i64 %402, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %403 = load i64, ptr %17, align 8, !tbaa !8
  %404 = sub nsw i64 %403, 1
  %405 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %404
  %406 = load i64, ptr %405, align 8, !tbaa !8
  %407 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %406
  %408 = load i64, ptr %16, align 8, !tbaa !8
  %409 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %407, i64 noundef %408) #7
  %410 = load i64, ptr %409, align 8, !tbaa !8
  store i64 %410, ptr %21, align 8, !tbaa !8
  %411 = load i64, ptr %18, align 8, !tbaa !8
  %412 = load i64, ptr %19, align 8, !tbaa !8
  %413 = icmp slt i64 %411, %412
  br i1 %413, label %414, label %468

414:                                              ; preds = %378
  %415 = load i64, ptr %20, align 8, !tbaa !8
  %416 = load i64, ptr %21, align 8, !tbaa !8
  %417 = icmp slt i64 %415, %416
  br i1 %417, label %418, label %468

418:                                              ; preds = %414
  %419 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %420 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %419, i8 noundef signext 10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !8
  br label %421

421:                                              ; preds = %431, %418
  %422 = load i64, ptr %22, align 8, !tbaa !8
  %423 = load i64, ptr %17, align 8, !tbaa !8
  %424 = icmp slt i64 %422, %423
  br i1 %424, label %426, label %425

425:                                              ; preds = %421
  store i32 40, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %434

426:                                              ; preds = %421
  %427 = load i64, ptr %22, align 8, !tbaa !8
  %428 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %427
  %429 = load i64, ptr %428, align 8, !tbaa !8
  %430 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %429
  store i8 66, ptr %430, align 1, !tbaa !24
  br label %431

431:                                              ; preds = %426
  %432 = load i64, ptr %22, align 8, !tbaa !8
  %433 = add nsw i64 %432, 1
  store i64 %433, ptr %22, align 8, !tbaa !8
  br label %421, !llvm.loop !25

434:                                              ; preds = %425
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %435 = load i64, ptr %17, align 8, !tbaa !8
  store i64 %435, ptr %23, align 8, !tbaa !8
  br label %436

436:                                              ; preds = %446, %434
  %437 = load i64, ptr %23, align 8, !tbaa !8
  %438 = load i64, ptr @N, align 8, !tbaa !8
  %439 = icmp slt i64 %437, %438
  br i1 %439, label %441, label %440

440:                                              ; preds = %436
  store i32 43, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %449

441:                                              ; preds = %436
  %442 = load i64, ptr %23, align 8, !tbaa !8
  %443 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %442
  %444 = load i64, ptr %443, align 8, !tbaa !8
  %445 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %444
  store i8 82, ptr %445, align 1, !tbaa !24
  br label %446

446:                                              ; preds = %441
  %447 = load i64, ptr %23, align 8, !tbaa !8
  %448 = add nsw i64 %447, 1
  store i64 %448, ptr %23, align 8, !tbaa !8
  br label %436, !llvm.loop !26

449:                                              ; preds = %440
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store i64 0, ptr %24, align 8, !tbaa !8
  br label %450

450:                                              ; preds = %460, %449
  %451 = load i64, ptr %24, align 8, !tbaa !8
  %452 = load i64, ptr @N, align 8, !tbaa !8
  %453 = icmp slt i64 %451, %452
  br i1 %453, label %455, label %454

454:                                              ; preds = %450
  store i32 46, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %463

455:                                              ; preds = %450
  %456 = load i64, ptr %24, align 8, !tbaa !8
  %457 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %456
  %458 = load i8, ptr %457, align 1, !tbaa !24
  %459 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %458)
  br label %460

460:                                              ; preds = %455
  %461 = load i64, ptr %24, align 8, !tbaa !8
  %462 = add nsw i64 %461, 1
  store i64 %462, ptr %24, align 8, !tbaa !8
  br label %450, !llvm.loop !27

463:                                              ; preds = %454
  %464 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 32)
  %465 = load i64, ptr %16, align 8, !tbaa !8
  %466 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %464, i64 noundef %465)
  %467 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %466, i8 noundef signext 10)
  store i8 1, ptr %15, align 1, !tbaa !22
  store i32 37, ptr %3, align 4
  br label %469

468:                                              ; preds = %414, %378
  store i32 0, ptr %3, align 4
  br label %469

469:                                              ; preds = %468, %463
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %470 = load i32, ptr %3, align 4
  switch i32 %470, label %475 [
    i32 0, label %471
  ]

471:                                              ; preds = %469
  br label %472

472:                                              ; preds = %471
  %473 = load i64, ptr %17, align 8, !tbaa !8
  %474 = add nsw i64 %473, 1
  store i64 %474, ptr %17, align 8, !tbaa !8
  br label %373, !llvm.loop !28

475:                                              ; preds = %469, %377
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %476

476:                                              ; preds = %475
  %477 = load i8, ptr %15, align 1, !tbaa !22, !range !29, !noundef !30
  %478 = trunc i8 %477 to i1
  br i1 %478, label %479, label %480

479:                                              ; preds = %476
  store i32 34, ptr %3, align 4
  br label %484

480:                                              ; preds = %476
  br label %481

481:                                              ; preds = %480
  %482 = load i64, ptr %16, align 8, !tbaa !8
  %483 = add nsw i64 %482, 1
  store i64 %483, ptr %16, align 8, !tbaa !8
  br label %367, !llvm.loop !31

484:                                              ; preds = %479, %371
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %485

485:                                              ; preds = %484
  %486 = load i8, ptr %15, align 1, !tbaa !22, !range !29, !noundef !30
  %487 = trunc i8 %486 to i1
  br i1 %487, label %491, label %488

488:                                              ; preds = %485
  %489 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %490 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %489, i8 noundef signext 10)
  br label %491

491:                                              ; preds = %488, %485
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store i64 0, ptr %25, align 8, !tbaa !8
  br label %492

492:                                              ; preds = %508, %491
  %493 = load i64, ptr %25, align 8, !tbaa !8
  %494 = load i64, ptr @N, align 8, !tbaa !8
  %495 = icmp slt i64 %493, %494
  br i1 %495, label %497, label %496

496:                                              ; preds = %492
  store i32 49, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %511

497:                                              ; preds = %492
  %498 = load i64, ptr %25, align 8, !tbaa !8
  %499 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @a, i64 0, i64 %498
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %499) #7
  %500 = load i64, ptr %25, align 8, !tbaa !8
  %501 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %500
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %501) #7
  %502 = load i64, ptr %25, align 8, !tbaa !8
  %503 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %502
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %503) #7
  %504 = load i64, ptr %25, align 8, !tbaa !8
  %505 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %504
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %505) #7
  %506 = load i64, ptr %25, align 8, !tbaa !8
  %507 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %506
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %507) #7
  br label %508

508:                                              ; preds = %497
  %509 = load i64, ptr %25, align 8, !tbaa !8
  %510 = add nsw i64 %509, 1
  store i64 %510, ptr %25, align 8, !tbaa !8
  br label %492, !llvm.loop !32

511:                                              ; preds = %496
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  br label %33, !llvm.loop !33

512:                                              ; preds = %33
  %513 = load i32, ptr %1, align 4
  ret i32 %513
}

; 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: 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) #5

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

; 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) #1 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)) #6

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5

; 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 @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #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 = { 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 = 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}
!21 = distinct !{!21, !12}
!22 = !{!23, !23, i64 0}
!23 = !{!"bool", !10, i64 0}
!24 = !{!10, !10, i64 0}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
!33 = distinct !{!33, !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 }
%"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" }

@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 [500000 x %"class.std::vector"], align 16
@tl = external dso_local global [500000 x %"class.std::vector"], align 16
@tr = external dso_local global [500000 x %"class.std::vector"], align 16
@bl = external dso_local global [500000 x %"class.std::vector"], align 16
@br = external dso_local global [500000 x %"class.std::vector"], align 16
@o = external dso_local global [500000 x i64], align 16
@ans = external dso_local local_unnamed_addr global [500000 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, 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
  %.not211 = icmp eq i64 %9, 0
  br i1 %.not211, label %._crit_edge214, label %.lr.ph213

.loopexit156:                                     ; preds = %.lr.ph210, %325
  %11 = load i64, ptr @T, align 8, !tbaa !8
  %12 = add nsw i64 %11, -1
  store i64 %12, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %._crit_edge214, label %.lr.ph213, !llvm.loop !11

.lr.ph213:                                        ; preds = %0, %.loopexit156
  %13 = 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)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %15 = load i64, ptr @N, align 8, !tbaa !8
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %.preheader155.preheader, label %._crit_edge169

.preheader155.preheader:                          ; preds = %.lr.ph213
  %.pre = load i64, ptr @M, align 8, !tbaa !8
  br label %.preheader155

.preheader155:                                    ; preds = %.preheader155.preheader, %._crit_edge
  %17 = phi i64 [ %30, %._crit_edge ], [ %15, %.preheader155.preheader ]
  %18 = phi i64 [ %31, %._crit_edge ], [ %.pre, %.preheader155.preheader ]
  %.0123168 = phi i64 [ %32, %._crit_edge ], [ 0, %.preheader155.preheader ]
  %19 = icmp sgt i64 %18, 0
  br i1 %19, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader155
  %20 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @a, i64 0, i64 %.0123168
  %21 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %.0123168
  %22 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %.0123168
  %23 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %.0123168
  %24 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %.0123168
  br label %34

._crit_edge169:                                   ; preds = %._crit_edge, %.lr.ph213
  %.lcssa = phi i64 [ %15, %.lr.ph213 ], [ %30, %._crit_edge ]
  %25 = getelementptr inbounds i64, ptr @o, i64 %.lcssa
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef nonnull @o, ptr noundef nonnull %25, i32 noundef 0)
  %26 = load i64, ptr @N, align 8, !tbaa !8
  %27 = getelementptr inbounds i64, ptr @o, i64 %26
  call void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef nonnull @o, ptr noundef nonnull %27)
  %28 = load i64, ptr @N, align 8, !tbaa !8
  %29 = icmp sgt i64 %28, 0
  br i1 %29, label %.preheader154.preheader, label %.preheader159

.preheader154.preheader:                          ; preds = %._crit_edge169
  %.pre228 = load i64, ptr @M, align 8, !tbaa !8
  br label %.preheader154

._crit_edge.loopexit:                             ; preds = %34
  %.pre227 = load i64, ptr @N, align 8, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader155
  %30 = phi i64 [ %.pre227, %._crit_edge.loopexit ], [ %17, %.preheader155 ]
  %31 = phi i64 [ %37, %._crit_edge.loopexit ], [ %18, %.preheader155 ]
  %32 = add nuw nsw i64 %.0123168, 1
  %33 = icmp slt i64 %32, %30
  br i1 %33, label %.preheader155, label %._crit_edge169, !llvm.loop !13

34:                                               ; preds = %.lr.ph, %34
  %.0125167 = phi i64 [ 0, %.lr.ph ], [ %36, %34 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %36 = add nuw nsw i64 %.0125167, 1
  %37 = load i64, ptr @M, align 8, !tbaa !8
  %38 = icmp slt i64 %36, %37
  br i1 %38, label %34, label %._crit_edge.loopexit, !llvm.loop !14

.preheader162:                                    ; preds = %._crit_edge172
  %39 = icmp sgt i64 %77, 0
  br i1 %39, label %.preheader152.preheader, label %.preheader159

.preheader152.preheader:                          ; preds = %.preheader162
  %.pre231 = load i64, ptr @M, align 8, !tbaa !8
  br label %.preheader152

.preheader154:                                    ; preds = %.preheader154.preheader, %._crit_edge172
  %40 = phi i64 [ %74, %._crit_edge172 ], [ %.pre228, %.preheader154.preheader ]
  %41 = phi i64 [ %75, %._crit_edge172 ], [ %.pre228, %.preheader154.preheader ]
  %.0126173 = phi i64 [ %76, %._crit_edge172 ], [ 0, %.preheader154.preheader ]
  %42 = icmp sgt i64 %41, 0
  br i1 %42, label %.lr.ph171, label %._crit_edge172

.lr.ph171:                                        ; preds = %.preheader154
  %.not142 = icmp eq i64 %.0126173, 0
  %43 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0126173
  %44 = add nsw i64 %.0126173, -1
  %45 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %44
  br i1 %.not142, label %.lr.ph171.split.us.preheader, label %46

46:                                               ; preds = %.lr.ph171
  %47 = load i64, ptr %43, align 8, !tbaa !8
  %48 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %47
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef 0) #7
  %50 = load i64, ptr %45, align 8, !tbaa !8
  %51 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %50
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 0) #7
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %52)
  %54 = load i64, ptr %53, align 8, !tbaa !8
  %55 = load i64, ptr %43, align 8, !tbaa !8
  %56 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %55
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef 0) #7
  store i64 %54, ptr %57, align 8, !tbaa !8
  %.pre229 = load i64, ptr @M, align 8, !tbaa !8
  %58 = icmp sgt i64 %.pre229, 1
  br i1 %58, label %.lr.ph171.split.peel.next, label %._crit_edge172

.lr.ph171.split.us.preheader:                     ; preds = %.lr.ph171
  %59 = icmp sgt i64 %40, 1
  br i1 %59, label %.lr.ph171.split.us.peel.next, label %._crit_edge172

.lr.ph171.split.us.peel.next:                     ; preds = %.lr.ph171.split.us.preheader, %.lr.ph171.split.us.peel.next
  %.0136170.us = phi i64 [ %72, %.lr.ph171.split.us.peel.next ], [ 1, %.lr.ph171.split.us.preheader ]
  %60 = load i64, ptr %43, align 8, !tbaa !8
  %61 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %60
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %.0136170.us) #7
  %63 = load i64, ptr %43, align 8, !tbaa !8
  %64 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %63
  %65 = add nsw i64 %.0136170.us, -1
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %65) #7
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull align 8 dereferenceable(8) %66)
  %68 = load i64, ptr %67, align 8, !tbaa !8
  %69 = load i64, ptr %43, align 8, !tbaa !8
  %70 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %69
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %.0136170.us) #7
  store i64 %68, ptr %71, align 8, !tbaa !8
  %.pre230 = load i64, ptr @M, align 8, !tbaa !8
  %72 = add nuw nsw i64 %.0136170.us, 1
  %73 = icmp slt i64 %72, %.pre230
  br i1 %73, label %.lr.ph171.split.us.peel.next, label %._crit_edge172, !llvm.loop !15

._crit_edge172:                                   ; preds = %.lr.ph171.split.peel.next, %.lr.ph171.split.us.peel.next, %46, %.lr.ph171.split.us.preheader, %.preheader154
  %74 = phi i64 [ %40, %.preheader154 ], [ %40, %.lr.ph171.split.us.preheader ], [ %.pre229, %46 ], [ %.pre230, %.lr.ph171.split.us.peel.next ], [ %103, %.lr.ph171.split.peel.next ]
  %75 = phi i64 [ %41, %.preheader154 ], [ %40, %.lr.ph171.split.us.preheader ], [ %.pre229, %46 ], [ %.pre230, %.lr.ph171.split.us.peel.next ], [ %103, %.lr.ph171.split.peel.next ]
  %76 = add nuw nsw i64 %.0126173, 1
  %77 = load i64, ptr @N, align 8, !tbaa !8
  %78 = icmp slt i64 %76, %77
  br i1 %78, label %.preheader154, label %.preheader162, !llvm.loop !17

.lr.ph171.split.peel.next:                        ; preds = %46, %.lr.ph171.split.peel.next
  %.0136170 = phi i64 [ %102, %.lr.ph171.split.peel.next ], [ 1, %46 ]
  %79 = load i64, ptr %43, align 8, !tbaa !8
  %80 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %79
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %.0136170) #7
  %82 = load i64, ptr %45, align 8, !tbaa !8
  %83 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %82
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %.0136170) #7
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %84)
  %86 = load i64, ptr %85, align 8, !tbaa !8
  %87 = load i64, ptr %43, align 8, !tbaa !8
  %88 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %87
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %.0136170) #7
  store i64 %86, ptr %89, align 8, !tbaa !8
  %90 = load i64, ptr %43, align 8, !tbaa !8
  %91 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %90
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %.0136170) #7
  %93 = load i64, ptr %43, align 8, !tbaa !8
  %94 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %93
  %95 = add nsw i64 %.0136170, -1
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %95) #7
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull align 8 dereferenceable(8) %96)
  %98 = load i64, ptr %97, align 8, !tbaa !8
  %99 = load i64, ptr %43, align 8, !tbaa !8
  %100 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %99
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %.0136170) #7
  store i64 %98, ptr %101, align 8, !tbaa !8
  %102 = add nuw nsw i64 %.0136170, 1
  %103 = load i64, ptr @M, align 8, !tbaa !8
  %104 = icmp slt i64 %102, %103
  br i1 %104, label %.lr.ph171.split.peel.next, label %._crit_edge172, !llvm.loop !18

.loopexit153:                                     ; preds = %141, %._crit_edge232, %.preheader152
  %105 = phi i64 [ %108, %.preheader152 ], [ %.pre233, %._crit_edge232 ], [ %155, %141 ]
  %106 = icmp sgt i64 %.0135.in178, 1
  br i1 %106, label %.preheader152, label %.preheader161, !llvm.loop !19

.preheader161:                                    ; preds = %.loopexit153
  %.pre235 = load i64, ptr @N, align 8, !tbaa !8
  %107 = icmp sgt i64 %.pre235, 0
  br i1 %107, label %.lr.ph187, label %.preheader159

.preheader152:                                    ; preds = %.preheader152.preheader, %.loopexit153
  %108 = phi i64 [ %105, %.loopexit153 ], [ %.pre231, %.preheader152.preheader ]
  %.0135.in178 = phi i64 [ %.0135179, %.loopexit153 ], [ %77, %.preheader152.preheader ]
  %.0135179 = add nsw i64 %.0135.in178, -1
  %109 = icmp sgt i64 %108, 0
  br i1 %109, label %.lr.ph176, label %.loopexit153

.lr.ph176:                                        ; preds = %.preheader152
  %110 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0135179
  %111 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0135.in178
  %112 = load i64, ptr @N, align 8, !tbaa !8
  %113 = icmp slt i64 %.0135.in178, %112
  br i1 %113, label %114, label %._crit_edge232

114:                                              ; preds = %.lr.ph176
  %115 = load i64, ptr %110, align 8, !tbaa !8
  %116 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %115
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef 0) #7
  %118 = load i64, ptr %111, align 8, !tbaa !8
  %119 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %118
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef 0) #7
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull align 8 dereferenceable(8) %120)
  %122 = load i64, ptr %121, align 8, !tbaa !8
  %123 = load i64, ptr %110, align 8, !tbaa !8
  %124 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %123
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef 0) #7
  store i64 %122, ptr %125, align 8, !tbaa !8
  br label %._crit_edge232

._crit_edge232:                                   ; preds = %114, %.lr.ph176
  %.pre233 = load i64, ptr @M, align 8, !tbaa !8
  %126 = icmp sgt i64 %.pre233, 1
  br i1 %126, label %.peel.next, label %.loopexit153

.peel.next:                                       ; preds = %._crit_edge232, %141
  %.0134175 = phi i64 [ %154, %141 ], [ 1, %._crit_edge232 ]
  %127 = load i64, ptr @N, align 8, !tbaa !8
  %128 = icmp slt i64 %.0135.in178, %127
  br i1 %128, label %129, label %141

129:                                              ; preds = %.peel.next
  %130 = load i64, ptr %110, align 8, !tbaa !8
  %131 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %130
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %.0134175) #7
  %133 = load i64, ptr %111, align 8, !tbaa !8
  %134 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %133
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef %.0134175) #7
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef nonnull align 8 dereferenceable(8) %135)
  %137 = load i64, ptr %136, align 8, !tbaa !8
  %138 = load i64, ptr %110, align 8, !tbaa !8
  %139 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %138
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %.0134175) #7
  store i64 %137, ptr %140, align 8, !tbaa !8
  br label %141

141:                                              ; preds = %129, %.peel.next
  %142 = load i64, ptr %110, align 8, !tbaa !8
  %143 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %142
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef %.0134175) #7
  %145 = load i64, ptr %110, align 8, !tbaa !8
  %146 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %145
  %147 = add nsw i64 %.0134175, -1
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %146, i64 noundef %147) #7
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef nonnull align 8 dereferenceable(8) %148)
  %150 = load i64, ptr %149, align 8, !tbaa !8
  %151 = load i64, ptr %110, align 8, !tbaa !8
  %152 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %151
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %152, i64 noundef %.0134175) #7
  store i64 %150, ptr %153, align 8, !tbaa !8
  %154 = add nuw nsw i64 %.0134175, 1
  %155 = load i64, ptr @M, align 8, !tbaa !8
  %156 = icmp slt i64 %154, %155
  br i1 %156, label %.peel.next, label %.loopexit153, !llvm.loop !20

.preheader160:                                    ; preds = %._crit_edge185
  %157 = icmp sgt i64 %181, 0
  br i1 %157, label %.lr.ph197, label %.preheader159

.lr.ph187:                                        ; preds = %.preheader161, %._crit_edge185
  %.0133186 = phi i64 [ %180, %._crit_edge185 ], [ 0, %.preheader161 ]
  %158 = load i64, ptr @M, align 8, !tbaa !8
  %159 = icmp sgt i64 %158, 0
  br i1 %159, label %.lr.ph184, label %._crit_edge185

.lr.ph184:                                        ; preds = %.lr.ph187
  %.0132180 = add nsw i64 %158, -1
  %.not140 = icmp eq i64 %.0133186, 0
  %160 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0133186
  %161 = add nsw i64 %.0133186, -1
  %162 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %161
  br i1 %.not140, label %.lr.ph184.split.us, label %.lr.ph184.split

.lr.ph184.split.us:                               ; preds = %.lr.ph184, %177
  %163 = phi i64 [ %178, %177 ], [ %158, %.lr.ph184 ]
  %.0132182.us = phi i64 [ %.0132.us, %177 ], [ %.0132180, %.lr.ph184 ]
  %.0132.in181.us = phi i64 [ %.0132182.us, %177 ], [ %158, %.lr.ph184 ]
  %164 = icmp slt i64 %.0132.in181.us, %163
  br i1 %164, label %165, label %177

165:                                              ; preds = %.lr.ph184.split.us
  %166 = load i64, ptr %160, align 8, !tbaa !8
  %167 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %166
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %.0132182.us) #7
  %169 = load i64, ptr %160, align 8, !tbaa !8
  %170 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %169
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %170, i64 noundef %.0132.in181.us) #7
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %168, ptr noundef nonnull align 8 dereferenceable(8) %171)
  %173 = load i64, ptr %172, align 8, !tbaa !8
  %174 = load i64, ptr %160, align 8, !tbaa !8
  %175 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %174
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %175, i64 noundef %.0132182.us) #7
  store i64 %173, ptr %176, align 8, !tbaa !8
  %.pre236 = load i64, ptr @M, align 8, !tbaa !8
  br label %177

177:                                              ; preds = %165, %.lr.ph184.split.us
  %178 = phi i64 [ %.pre236, %165 ], [ %163, %.lr.ph184.split.us ]
  %.0132.us = add nsw i64 %.0132182.us, -1
  %179 = icmp sgt i64 %.0132182.us, 0
  br i1 %179, label %.lr.ph184.split.us, label %._crit_edge185, !llvm.loop !21

._crit_edge185:                                   ; preds = %208, %177, %.lr.ph187
  %180 = add nuw nsw i64 %.0133186, 1
  %181 = load i64, ptr @N, align 8, !tbaa !8
  %182 = icmp slt i64 %180, %181
  br i1 %182, label %.lr.ph187, label %.preheader160, !llvm.loop !22

.lr.ph184.split:                                  ; preds = %.lr.ph184, %208
  %.0132182 = phi i64 [ %.0132, %208 ], [ %.0132180, %.lr.ph184 ]
  %.0132.in181 = phi i64 [ %.0132182, %208 ], [ %158, %.lr.ph184 ]
  %183 = load i64, ptr %160, align 8, !tbaa !8
  %184 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %183
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %.0132182) #7
  %186 = load i64, ptr %162, align 8, !tbaa !8
  %187 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %186
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef %.0132182) #7
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %185, ptr noundef nonnull align 8 dereferenceable(8) %188)
  %190 = load i64, ptr %189, align 8, !tbaa !8
  %191 = load i64, ptr %160, align 8, !tbaa !8
  %192 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %191
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %192, i64 noundef %.0132182) #7
  store i64 %190, ptr %193, align 8, !tbaa !8
  %194 = load i64, ptr @M, align 8, !tbaa !8
  %195 = icmp slt i64 %.0132.in181, %194
  br i1 %195, label %196, label %208

196:                                              ; preds = %.lr.ph184.split
  %197 = load i64, ptr %160, align 8, !tbaa !8
  %198 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %197
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %198, i64 noundef %.0132182) #7
  %200 = load i64, ptr %160, align 8, !tbaa !8
  %201 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %200
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef %.0132.in181) #7
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %199, ptr noundef nonnull align 8 dereferenceable(8) %202)
  %204 = load i64, ptr %203, align 8, !tbaa !8
  %205 = load i64, ptr %160, align 8, !tbaa !8
  %206 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %205
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef %.0132182) #7
  store i64 %204, ptr %207, align 8, !tbaa !8
  br label %208

208:                                              ; preds = %.lr.ph184.split, %196
  %.0132 = add nsw i64 %.0132182, -1
  %209 = icmp sgt i64 %.0132182, 0
  br i1 %209, label %.lr.ph184.split, label %._crit_edge185, !llvm.loop !21

.loopexit:                                        ; preds = %247, %.lr.ph197
  %210 = icmp sgt i64 %.0131.in195, 1
  br i1 %210, label %.lr.ph197, label %.preheader159, !llvm.loop !23

.preheader159:                                    ; preds = %.loopexit, %._crit_edge169, %.preheader162, %.preheader161, %.preheader160
  %211 = load i64, ptr @M, align 8, !tbaa !8
  %212 = icmp sgt i64 %211, 1
  br i1 %212, label %.preheader.preheader, label %._crit_edge202

.preheader.preheader:                             ; preds = %.preheader159
  %.pre238 = load i64, ptr @N, align 8, !tbaa !8
  br label %.preheader

.lr.ph197:                                        ; preds = %.preheader160, %.loopexit
  %.0131.in195 = phi i64 [ %.0131196, %.loopexit ], [ %181, %.preheader160 ]
  %.0131196 = add nsw i64 %.0131.in195, -1
  %213 = load i64, ptr @M, align 8, !tbaa !8
  %214 = icmp sgt i64 %213, 0
  br i1 %214, label %.lr.ph193, label %.loopexit

.lr.ph193:                                        ; preds = %.lr.ph197
  %215 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0131196
  %216 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0131.in195
  br label %217

217:                                              ; preds = %.lr.ph193, %247
  %.0130.in190 = phi i64 [ %213, %.lr.ph193 ], [ %.0130191, %247 ]
  %.0130191 = add nsw i64 %.0130.in190, -1
  %218 = load i64, ptr @N, align 8, !tbaa !8
  %219 = icmp slt i64 %.0131.in195, %218
  br i1 %219, label %220, label %232

220:                                              ; preds = %217
  %221 = load i64, ptr %215, align 8, !tbaa !8
  %222 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %221
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %222, i64 noundef %.0130191) #7
  %224 = load i64, ptr %216, align 8, !tbaa !8
  %225 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %224
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %225, i64 noundef %.0130191) #7
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %223, ptr noundef nonnull align 8 dereferenceable(8) %226)
  %228 = load i64, ptr %227, align 8, !tbaa !8
  %229 = load i64, ptr %215, align 8, !tbaa !8
  %230 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %229
  %231 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %230, i64 noundef %.0130191) #7
  store i64 %228, ptr %231, align 8, !tbaa !8
  br label %232

232:                                              ; preds = %220, %217
  %233 = load i64, ptr @M, align 8, !tbaa !8
  %234 = icmp slt i64 %.0130.in190, %233
  br i1 %234, label %235, label %247

235:                                              ; preds = %232
  %236 = load i64, ptr %215, align 8, !tbaa !8
  %237 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %236
  %238 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %.0130191) #7
  %239 = load i64, ptr %215, align 8, !tbaa !8
  %240 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %239
  %241 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %240, i64 noundef %.0130.in190) #7
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %238, ptr noundef nonnull align 8 dereferenceable(8) %241)
  %243 = load i64, ptr %242, align 8, !tbaa !8
  %244 = load i64, ptr %215, align 8, !tbaa !8
  %245 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %244
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %245, i64 noundef %.0130191) #7
  store i64 %243, ptr %246, align 8, !tbaa !8
  br label %247

247:                                              ; preds = %232, %235
  %248 = icmp ugt i64 %.0130.in190, 1
  br i1 %248, label %217, label %.loopexit, !llvm.loop !24

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge200
  %249 = phi i64 [ %320, %._crit_edge200 ], [ %211, %.preheader.preheader ]
  %250 = phi i64 [ %321, %._crit_edge200 ], [ %.pre238, %.preheader.preheader ]
  %.0128201 = phi i64 [ %322, %._crit_edge200 ], [ 1, %.preheader.preheader ]
  %251 = icmp sgt i64 %250, 1
  br i1 %251, label %.lr.ph199, label %._crit_edge200

.lr.ph199:                                        ; preds = %.preheader
  %252 = add nsw i64 %.0128201, -1
  br label %253

253:                                              ; preds = %.lr.ph199, %316
  %indvar = phi i64 [ 0, %.lr.ph199 ], [ %indvar.next, %316 ]
  %.0127198 = phi i64 [ 1, %.lr.ph199 ], [ %317, %316 ]
  %254 = add nsw i64 %.0127198, -1
  %255 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %254
  %256 = load i64, ptr %255, align 8, !tbaa !8
  %257 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %256
  %258 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %257, i64 noundef %252) #7
  %259 = load i64, ptr %258, align 8, !tbaa !8
  %260 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0127198
  %261 = load i64, ptr %260, align 8, !tbaa !8
  %262 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %261
  %263 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %262, i64 noundef %252) #7
  %264 = load i64, ptr %263, align 8, !tbaa !8
  %265 = load i64, ptr %260, align 8, !tbaa !8
  %266 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %265
  %267 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %266, i64 noundef %.0128201) #7
  %268 = load i64, ptr %267, align 8, !tbaa !8
  %269 = load i64, ptr %255, align 8, !tbaa !8
  %270 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %269
  %271 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %270, i64 noundef %.0128201) #7
  %272 = icmp slt i64 %259, %264
  %273 = load i64, ptr %271, align 8
  %274 = icmp slt i64 %268, %273
  %or.cond = select i1 %272, i1 %274, i1 false
  br i1 %or.cond, label %275, label %316

275:                                              ; preds = %253
  %276 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %277 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %276, i8 noundef signext 10)
  %xtraiter = and i64 %.0127198, 3
  %278 = icmp ult i64 %indvar, 3
  br i1 %278, label %.preheader158.unr-lcssa, label %.new

.new:                                             ; preds = %275
  %unroll_iter = and i64 %.0127198, 9223372036854775804
  br label %285

.preheader158.unr-lcssa:                          ; preds = %285, %275
  %.0122203.unr = phi i64 [ 0, %275 ], [ %301, %285 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader158, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader158.unr-lcssa, %.epil.preheader
  %.0122203.epil = phi i64 [ %282, %.epil.preheader ], [ %.0122203.unr, %.preheader158.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader158.unr-lcssa ]
  %279 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0122203.epil
  %280 = load i64, ptr %279, align 8, !tbaa !8
  %281 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %280
  store i8 66, ptr %281, align 1, !tbaa !25
  %282 = add nuw nsw i64 %.0122203.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader158, label %.epil.preheader, !llvm.loop !26

.preheader158:                                    ; preds = %.epil.preheader, %.preheader158.unr-lcssa
  %283 = load i64, ptr @N, align 8, !tbaa !8
  %284 = icmp slt i64 %.0127198, %283
  br i1 %284, label %.lr.ph205, label %.preheader157

285:                                              ; preds = %285, %.new
  %.0122203 = phi i64 [ 0, %.new ], [ %301, %285 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.3, %285 ]
  %286 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0122203
  %287 = load i64, ptr %286, align 16, !tbaa !8
  %288 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %287
  store i8 66, ptr %288, align 1, !tbaa !25
  %289 = or disjoint i64 %.0122203, 1
  %290 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %289
  %291 = load i64, ptr %290, align 8, !tbaa !8
  %292 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %291
  store i8 66, ptr %292, align 1, !tbaa !25
  %293 = or disjoint i64 %.0122203, 2
  %294 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %293
  %295 = load i64, ptr %294, align 16, !tbaa !8
  %296 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %295
  store i8 66, ptr %296, align 1, !tbaa !25
  %297 = or disjoint i64 %.0122203, 3
  %298 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %297
  %299 = load i64, ptr %298, align 8, !tbaa !8
  %300 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %299
  store i8 66, ptr %300, align 1, !tbaa !25
  %301 = add nuw nsw i64 %.0122203, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader158.unr-lcssa, label %285, !llvm.loop !28

.preheader157:                                    ; preds = %.lr.ph205, %.preheader158
  %302 = icmp sgt i64 %283, 0
  br i1 %302, label %.lr.ph207, label %.thread150

.lr.ph205:                                        ; preds = %.preheader158, %.lr.ph205
  %.0121204 = phi i64 [ %306, %.lr.ph205 ], [ %.0127198, %.preheader158 ]
  %303 = getelementptr inbounds [500000 x i64], ptr @o, i64 0, i64 %.0121204
  %304 = load i64, ptr %303, align 8, !tbaa !8
  %305 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %304
  store i8 82, ptr %305, align 1, !tbaa !25
  %306 = add nuw nsw i64 %.0121204, 1
  %307 = icmp slt i64 %306, %283
  br i1 %307, label %.lr.ph205, label %.preheader157, !llvm.loop !29

.lr.ph207:                                        ; preds = %.preheader157, %.lr.ph207
  %.0120206 = phi i64 [ %311, %.lr.ph207 ], [ 0, %.preheader157 ]
  %308 = getelementptr inbounds [500000 x i8], ptr @ans, i64 0, i64 %.0120206
  %309 = load i8, ptr %308, align 1, !tbaa !25
  %310 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %309)
  %311 = add nuw nsw i64 %.0120206, 1
  %312 = load i64, ptr @N, align 8, !tbaa !8
  %313 = icmp slt i64 %311, %312
  br i1 %313, label %.lr.ph207, label %.thread150, !llvm.loop !30

.thread150:                                       ; preds = %.lr.ph207, %.preheader157
  %314 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 32)
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %314, i64 noundef %.0128201)
  br label %325

316:                                              ; preds = %253
  %317 = add nuw nsw i64 %.0127198, 1
  %318 = load i64, ptr @N, align 8, !tbaa !8
  %319 = icmp slt i64 %317, %318
  %indvar.next = add i64 %indvar, 1
  br i1 %319, label %253, label %._crit_edge200.loopexit, !llvm.loop !31

._crit_edge200.loopexit:                          ; preds = %316
  %.pre239 = load i64, ptr @M, align 8, !tbaa !8
  br label %._crit_edge200

._crit_edge200:                                   ; preds = %._crit_edge200.loopexit, %.preheader
  %320 = phi i64 [ %.pre239, %._crit_edge200.loopexit ], [ %249, %.preheader ]
  %321 = phi i64 [ %318, %._crit_edge200.loopexit ], [ %250, %.preheader ]
  %322 = add nuw nsw i64 %.0128201, 1
  %323 = icmp slt i64 %322, %320
  br i1 %323, label %.preheader, label %._crit_edge202, !llvm.loop !32

._crit_edge202:                                   ; preds = %._crit_edge200, %.preheader159
  %324 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  br label %325

325:                                              ; preds = %.thread150, %._crit_edge202
  %.sink = phi ptr [ %315, %.thread150 ], [ %324, %._crit_edge202 ]
  %326 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %.sink, i8 noundef signext 10)
  %327 = load i64, ptr @N, align 8, !tbaa !8
  %328 = icmp sgt i64 %327, 0
  br i1 %328, label %.lr.ph210, label %.loopexit156

.lr.ph210:                                        ; preds = %325, %.lr.ph210
  %.0208 = phi i64 [ %334, %.lr.ph210 ], [ 0, %325 ]
  %329 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @a, i64 0, i64 %.0208
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %329) #7
  %330 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tl, i64 0, i64 %.0208
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %330) #7
  %331 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @tr, i64 0, i64 %.0208
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %331) #7
  %332 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @bl, i64 0, i64 %.0208
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %332) #7
  %333 = getelementptr inbounds [500000 x %"class.std::vector"], ptr @br, i64 0, i64 %.0208
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %333) #7
  %334 = add nuw nsw i64 %.0208, 1
  %335 = load i64, ptr @N, align 8, !tbaa !8
  %336 = icmp slt i64 %334, %335
  br i1 %336, label %.lr.ph210, label %.loopexit156, !llvm.loop !33

._crit_edge214:                                   ; preds = %.loopexit156, %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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(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 @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 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: 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #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 @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !16}
!16 = !{!"llvm.loop.peeled.count", i32 1}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12, !16}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12, !16}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.unroll.disable"}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
!33 = distinct !{!33, !12}


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