; LLVM IR from eyangch/competitive-programming :: USACOcontests/platinum/2021.01 (sum_of_distances)

; 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<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { i8 }
%class.anon.8 = type { i8 }

@MOD = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@N = external dso_local global [50000 x i64], align 16
@M = external dso_local global [50000 x i64], align 16
@I = external dso_local global [50000 x i64], align 16
@G = external dso_local global [50000 x %"class.std::vector"], align 16
@E = external dso_local global [50000 x %"class.std::vector.0"], align 16
@O = external dso_local global [50000 x %"class.std::vector.0"], align 16
@occ = external dso_local global [50000 x %"class.std::vector.0"], align 16
@pfx = external dso_local global [50000 x %"class.std::vector.0"], align 16
@occB = external dso_local global [50000 x %"class.std::vector.0"], align 16
@pfxB = external dso_local global [50000 x %"class.std::vector.0"], align 16
@Cpfx = external dso_local global [200000 x i64], align 16
@Csfx = external dso_local global [200000 x i64], align 16
@Zpfx = external dso_local global [200000 x i64], align 16
@Zsfx = external dso_local global [200000 x i64], align 16
@Bpfx = external dso_local global [200000 x i64], align 16
@Bsfx = external dso_local global [200000 x i64], align 16
@BZpfx = external dso_local global [200000 x i64], align 16
@BZsfx = external dso_local global [200000 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3invx(i64 noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4calcxxRA200000_xS0_S0_S0_x(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), i64 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %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 i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.std::queue", align 8
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca i64, align 8
  %30 = alloca %"struct.std::pair", align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca %class.anon, align 1
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  %40 = alloca i64, align 8
  %41 = alloca i64, align 8
  %42 = alloca i64, align 8
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i64, align 8
  %46 = alloca i64, align 8
  %47 = alloca i64, align 8
  %48 = alloca i64, align 8
  %49 = alloca %class.anon.8, align 1
  %50 = alloca i64, align 8
  %51 = alloca i64, align 8
  %52 = alloca i64, align 8
  %53 = alloca i64, align 8
  %54 = alloca i64, align 8
  %55 = alloca i64, align 8
  %56 = alloca i64, align 8
  %57 = alloca i64, align 8
  %58 = alloca i64, align 8
  %59 = alloca i64, align 8
  %60 = alloca i64, align 8
  %61 = alloca i64, align 8
  %62 = alloca i64, align 8
  %63 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %64 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %65 = getelementptr i8, ptr %64, i64 -24
  %66 = load i64, ptr %65, align 8
  %67 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %66
  %68 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %67, ptr noundef null)
  %69 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @K)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @Cpfx, ptr noundef getelementptr inbounds (i64, ptr @Cpfx, i64 200000), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @Csfx, ptr noundef getelementptr inbounds (i64, ptr @Csfx, i64 200000), ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @Bpfx, ptr noundef getelementptr inbounds (i64, ptr @Bpfx, i64 200000), ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @Bsfx, ptr noundef getelementptr inbounds (i64, ptr @Bsfx, i64 200000), ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %71

71:                                               ; preds = %363, %0
  %72 = load i64, ptr %7, align 8, !tbaa !8
  %73 = load i64, ptr @K, align 8, !tbaa !8
  %74 = icmp slt i64 %72, %73
  br i1 %74, label %76, label %75

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

76:                                               ; preds = %71
  %77 = load i64, ptr %7, align 8, !tbaa !8
  %78 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %77
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %78)
  %80 = load i64, ptr %7, align 8, !tbaa !8
  %81 = getelementptr inbounds [50000 x i64], ptr @M, i64 0, i64 %80
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull align 8 dereferenceable(8) %81)
  %83 = load i64, ptr %7, align 8, !tbaa !8
  %84 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %83
  %85 = load i64, ptr %7, align 8, !tbaa !8
  %86 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %85
  %87 = load i64, ptr %86, align 8, !tbaa !8
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %87)
  %88 = load i64, ptr %7, align 8, !tbaa !8
  %89 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @E, i64 0, i64 %88
  %90 = load i64, ptr %7, align 8, !tbaa !8
  %91 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 1000000000000000, ptr %9, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %92, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %93 = load i64, ptr %7, align 8, !tbaa !8
  %94 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @O, i64 0, i64 %93
  %95 = load i64, ptr %7, align 8, !tbaa !8
  %96 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 1000000000000000, ptr %10, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %97, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %98 = load i64, ptr %7, align 8, !tbaa !8
  %99 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occ, i64 0, i64 %98
  %100 = load i64, ptr %7, align 8, !tbaa !8
  %101 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !8
  %103 = mul nsw i64 2, %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %103, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %104 = load i64, ptr %7, align 8, !tbaa !8
  %105 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %104
  %106 = load i64, ptr %7, align 8, !tbaa !8
  %107 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %106
  %108 = load i64, ptr %107, align 8, !tbaa !8
  %109 = mul nsw i64 2, %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %109, ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %110 = load i64, ptr %7, align 8, !tbaa !8
  %111 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occB, i64 0, i64 %110
  %112 = load i64, ptr %7, align 8, !tbaa !8
  %113 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !8
  %115 = mul nsw i64 2, %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %115, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %116 = load i64, ptr %7, align 8, !tbaa !8
  %117 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %116
  %118 = load i64, ptr %7, align 8, !tbaa !8
  %119 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %118
  %120 = load i64, ptr %119, align 8, !tbaa !8
  %121 = mul nsw i64 2, %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %121, ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %122 = load i64, ptr %7, align 8, !tbaa !8
  %123 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %122
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %123)
  %125 = load i64, ptr %124, align 8, !tbaa !8
  store i64 %125, ptr %2, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !8
  br label %126

126:                                              ; preds = %148, %76
  %127 = load i64, ptr %15, align 8, !tbaa !8
  %128 = load i64, ptr %7, align 8, !tbaa !8
  %129 = getelementptr inbounds [50000 x i64], ptr @M, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !8
  %131 = icmp slt i64 %127, %130
  br i1 %131, label %133, label %132

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

133:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %134 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %135 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %134, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %136 = load i64, ptr %16, align 8, !tbaa !8
  %137 = add nsw i64 %136, -1
  store i64 %137, ptr %16, align 8, !tbaa !8
  %138 = load i64, ptr %17, align 8, !tbaa !8
  %139 = add nsw i64 %138, -1
  store i64 %139, ptr %17, align 8, !tbaa !8
  %140 = load i64, ptr %7, align 8, !tbaa !8
  %141 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %140
  %142 = load i64, ptr %16, align 8, !tbaa !8
  %143 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef %142) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %143, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %144 = load i64, ptr %7, align 8, !tbaa !8
  %145 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %144
  %146 = load i64, ptr %17, align 8, !tbaa !8
  %147 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %146) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %147, ptr noundef nonnull align 8 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %148

148:                                              ; preds = %133
  %149 = load i64, ptr %15, align 8, !tbaa !8
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %15, align 8, !tbaa !8
  br label %126, !llvm.loop !13

151:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #7
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !11
  invoke void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %152 unwind label %180

152:                                              ; preds = %151
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %18, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %153 unwind label %180

153:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %154

154:                                              ; preds = %276, %274, %153
  %155 = invoke noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %156 unwind label %184

156:                                              ; preds = %154
  %157 = xor i1 %155, true
  br i1 %157, label %158, label %279

158:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %159 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %160 unwind label %188

160:                                              ; preds = %158
  %161 = getelementptr inbounds %"struct.std::pair", ptr %159, i32 0, i32 0
  %162 = load i64, ptr %161, align 8, !tbaa !15
  store i64 %162, ptr %24, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %163 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %164 unwind label %192

164:                                              ; preds = %160
  %165 = getelementptr inbounds %"struct.std::pair", ptr %163, i32 0, i32 1
  %166 = load i64, ptr %165, align 8, !tbaa !17
  store i64 %166, ptr %25, align 8, !tbaa !8
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %18)
          to label %167 unwind label %192

167:                                              ; preds = %164
  %168 = load i64, ptr %25, align 8, !tbaa !8
  %169 = srem i64 %168, 2
  %170 = icmp ne i64 %169, 0
  br i1 %170, label %171, label %202

171:                                              ; preds = %167
  %172 = load i64, ptr %7, align 8, !tbaa !8
  %173 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @O, i64 0, i64 %172
  %174 = load i64, ptr %24, 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 = load i64, ptr %175, align 8, !tbaa !8
  %177 = sitofp i64 %176 to double
  %178 = fcmp une double %177, 1.000000e+15
  br i1 %178, label %179, label %196

179:                                              ; preds = %171
  store i32 8, ptr %8, align 4
  br label %274, !llvm.loop !18

180:                                              ; preds = %152, %151
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %22, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %366

184:                                              ; preds = %154
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %22, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %23, align 4
  br label %366

188:                                              ; preds = %158
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %22, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %23, align 4
  br label %278

192:                                              ; preds = %164, %160
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %22, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %23, align 4
  br label %277

196:                                              ; preds = %171
  %197 = load i64, ptr %25, align 8, !tbaa !8
  %198 = load i64, ptr %7, align 8, !tbaa !8
  %199 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @O, i64 0, i64 %198
  %200 = load i64, ptr %24, align 8, !tbaa !8
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %199, i64 noundef %200) #7
  store i64 %197, ptr %201, align 8, !tbaa !8
  br label %217

202:                                              ; preds = %167
  %203 = load i64, ptr %7, align 8, !tbaa !8
  %204 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @E, i64 0, i64 %203
  %205 = load i64, ptr %24, align 8, !tbaa !8
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %204, i64 noundef %205) #7
  %207 = load i64, ptr %206, align 8, !tbaa !8
  %208 = sitofp i64 %207 to double
  %209 = fcmp une double %208, 1.000000e+15
  br i1 %209, label %210, label %211

210:                                              ; preds = %202
  store i32 8, ptr %8, align 4
  br label %274, !llvm.loop !18

211:                                              ; preds = %202
  %212 = load i64, ptr %25, align 8, !tbaa !8
  %213 = load i64, ptr %7, align 8, !tbaa !8
  %214 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @E, i64 0, i64 %213
  %215 = load i64, ptr %24, align 8, !tbaa !8
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %214, i64 noundef %215) #7
  store i64 %212, ptr %216, align 8, !tbaa !8
  br label %217

217:                                              ; preds = %211, %196
  %218 = load i64, ptr %7, align 8, !tbaa !8
  %219 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occ, i64 0, i64 %218
  %220 = load i64, ptr %25, align 8, !tbaa !8
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %219, i64 noundef %220) #7
  %222 = load i64, ptr %221, align 8, !tbaa !8
  %223 = add nsw i64 %222, 1
  store i64 %223, ptr %221, align 8, !tbaa !8
  %224 = load i64, ptr %7, align 8, !tbaa !8
  %225 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @O, i64 0, i64 %224
  %226 = load i64, ptr %24, align 8, !tbaa !8
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %225, i64 noundef %226) #7
  %228 = load i64, ptr %227, align 8, !tbaa !8
  %229 = sitofp i64 %228 to double
  %230 = fcmp une double %229, 1.000000e+15
  br i1 %230, label %231, label %246

231:                                              ; preds = %217
  %232 = load i64, ptr %7, align 8, !tbaa !8
  %233 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @E, i64 0, i64 %232
  %234 = load i64, ptr %24, align 8, !tbaa !8
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %233, i64 noundef %234) #7
  %236 = load i64, ptr %235, align 8, !tbaa !8
  %237 = sitofp i64 %236 to double
  %238 = fcmp une double %237, 1.000000e+15
  br i1 %238, label %239, label %246

239:                                              ; preds = %231
  %240 = load i64, ptr %7, align 8, !tbaa !8
  %241 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occB, i64 0, i64 %240
  %242 = load i64, ptr %25, align 8, !tbaa !8
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %241, i64 noundef %242) #7
  %244 = load i64, ptr %243, align 8, !tbaa !8
  %245 = add nsw i64 %244, 1
  store i64 %245, ptr %243, align 8, !tbaa !8
  br label %246

246:                                              ; preds = %239, %231, %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %247 = load i64, ptr %7, align 8, !tbaa !8
  %248 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %247
  %249 = load i64, ptr %24, align 8, !tbaa !8
  %250 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %248, i64 noundef %249) #7
  store ptr %250, ptr %26, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %251 = load ptr, ptr %26, align 8, !tbaa !19
  %252 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %251) #7
  %253 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %252, ptr %253, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %254 = load ptr, ptr %26, align 8, !tbaa !19
  %255 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %254) #7
  %256 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %255, ptr %256, align 8
  br label %257

257:                                              ; preds = %267, %246
  %258 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br i1 %258, label %260, label %259

259:                                              ; preds = %257
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %273

260:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %261 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  %262 = load i64, ptr %261, align 8, !tbaa !8
  store i64 %262, ptr %29, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %263 = load i64, ptr %25, align 8, !tbaa !8
  %264 = add nsw i64 %263, 1
  store i64 %264, ptr %31, align 8, !tbaa !8
  invoke void @_ZNSt4pairIxxEC2IRxxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %265 unwind label %269

265:                                              ; preds = %260
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %18, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %266 unwind label %269

266:                                              ; preds = %265
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  br label %267

267:                                              ; preds = %266
  %268 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  br label %257

269:                                              ; preds = %265, %260
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %22, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %277

273:                                              ; preds = %259
  store i32 0, ptr %8, align 4
  br label %274

274:                                              ; preds = %273, %210, %179
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  %275 = load i32, ptr %8, align 4
  switch i32 %275, label %865 [
    i32 0, label %276
    i32 8, label %154
  ]

276:                                              ; preds = %274
  br label %154, !llvm.loop !18

277:                                              ; preds = %269, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %278

278:                                              ; preds = %277, %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %366

279:                                              ; preds = %156
  %280 = load i64, ptr %7, align 8, !tbaa !8
  %281 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occ, i64 0, i64 %280
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %281, i64 noundef 0) #7
  %283 = load i64, ptr %282, align 8, !tbaa !8
  %284 = load i64, ptr %7, align 8, !tbaa !8
  %285 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %284
  %286 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %285, i64 noundef 0) #7
  store i64 %283, ptr %286, align 8, !tbaa !8
  %287 = load i64, ptr %7, align 8, !tbaa !8
  %288 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occ, i64 0, i64 %287
  %289 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %288, i64 noundef 1) #7
  %290 = load i64, ptr %289, align 8, !tbaa !8
  %291 = load i64, ptr %7, align 8, !tbaa !8
  %292 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %291
  %293 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %292, i64 noundef 1) #7
  store i64 %290, ptr %293, align 8, !tbaa !8
  %294 = load i64, ptr %7, align 8, !tbaa !8
  %295 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occB, i64 0, i64 %294
  %296 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %295, i64 noundef 0) #7
  %297 = load i64, ptr %296, align 8, !tbaa !8
  %298 = load i64, ptr %7, align 8, !tbaa !8
  %299 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %298
  %300 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %299, i64 noundef 0) #7
  store i64 %297, ptr %300, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  store i64 2, ptr %32, align 8, !tbaa !8
  br label %301

301:                                              ; preds = %328, %279
  %302 = load i64, ptr %32, align 8, !tbaa !8
  %303 = load i64, ptr %7, align 8, !tbaa !8
  %304 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %303
  %305 = load i64, ptr %304, align 8, !tbaa !8
  %306 = mul nsw i64 2, %305
  %307 = icmp slt i64 %302, %306
  br i1 %307, label %309, label %308

308:                                              ; preds = %301
  store i32 12, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %331

309:                                              ; preds = %301
  %310 = load i64, ptr %7, align 8, !tbaa !8
  %311 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occ, i64 0, i64 %310
  %312 = load i64, ptr %32, align 8, !tbaa !8
  %313 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %311, i64 noundef %312) #7
  %314 = load i64, ptr %313, align 8, !tbaa !8
  %315 = load i64, ptr %7, align 8, !tbaa !8
  %316 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %315
  %317 = load i64, ptr %32, align 8, !tbaa !8
  %318 = sub nsw i64 %317, 2
  %319 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %316, i64 noundef %318) #7
  %320 = load i64, ptr %319, align 8, !tbaa !8
  %321 = add nsw i64 %314, %320
  %322 = load i64, ptr @MOD, align 8, !tbaa !8
  %323 = srem i64 %321, %322
  %324 = load i64, ptr %7, align 8, !tbaa !8
  %325 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %324
  %326 = load i64, ptr %32, align 8, !tbaa !8
  %327 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %325, i64 noundef %326) #7
  store i64 %323, ptr %327, align 8, !tbaa !8
  br label %328

328:                                              ; preds = %309
  %329 = load i64, ptr %32, align 8, !tbaa !8
  %330 = add nsw i64 %329, 1
  store i64 %330, ptr %32, align 8, !tbaa !8
  br label %301, !llvm.loop !21

331:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  store i64 1, ptr %33, align 8, !tbaa !8
  br label %332

332:                                              ; preds = %359, %331
  %333 = load i64, ptr %33, align 8, !tbaa !8
  %334 = load i64, ptr %7, align 8, !tbaa !8
  %335 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %334
  %336 = load i64, ptr %335, align 8, !tbaa !8
  %337 = mul nsw i64 2, %336
  %338 = icmp slt i64 %333, %337
  br i1 %338, label %340, label %339

339:                                              ; preds = %332
  store i32 15, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %362

340:                                              ; preds = %332
  %341 = load i64, ptr %7, align 8, !tbaa !8
  %342 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occB, i64 0, i64 %341
  %343 = load i64, ptr %33, align 8, !tbaa !8
  %344 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %342, i64 noundef %343) #7
  %345 = load i64, ptr %344, align 8, !tbaa !8
  %346 = load i64, ptr %7, align 8, !tbaa !8
  %347 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %346
  %348 = load i64, ptr %33, align 8, !tbaa !8
  %349 = sub nsw i64 %348, 1
  %350 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %347, i64 noundef %349) #7
  %351 = load i64, ptr %350, align 8, !tbaa !8
  %352 = add nsw i64 %345, %351
  %353 = load i64, ptr @MOD, align 8, !tbaa !8
  %354 = srem i64 %352, %353
  %355 = load i64, ptr %7, align 8, !tbaa !8
  %356 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %355
  %357 = load i64, ptr %33, align 8, !tbaa !8
  %358 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %356, i64 noundef %357) #7
  store i64 %354, ptr %358, align 8, !tbaa !8
  br label %359

359:                                              ; preds = %340
  %360 = load i64, ptr %33, align 8, !tbaa !8
  %361 = add nsw i64 %360, 1
  store i64 %361, ptr %33, align 8, !tbaa !8
  br label %332, !llvm.loop !22

362:                                              ; preds = %339
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #7
  br label %363

363:                                              ; preds = %362
  %364 = load i64, ptr %7, align 8, !tbaa !8
  %365 = add nsw i64 %364, 1
  store i64 %365, ptr %7, align 8, !tbaa !8
  br label %71, !llvm.loop !23

366:                                              ; preds = %278, %184, %180
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %18) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %860

367:                                              ; preds = %75
  %368 = load i64, ptr @K, align 8, !tbaa !8
  %369 = getelementptr inbounds i64, ptr @I, i64 %368
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef @I, ptr noundef %369, i32 noundef 0)
  %370 = load i64, ptr @K, align 8, !tbaa !8
  %371 = getelementptr inbounds i64, ptr @I, i64 %370
  call void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef @I, ptr noundef %371)
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  store i64 0, ptr %35, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  store i64 1, ptr %36, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  store i64 1, ptr %37, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  store i64 0, ptr %38, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  store i64 0, ptr %39, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  store i64 0, ptr %40, align 8, !tbaa !8
  br label %372

372:                                              ; preds = %519, %367
  %373 = load i64, ptr %40, align 8, !tbaa !8
  %374 = load i64, ptr %2, align 8, !tbaa !8
  %375 = mul nsw i64 2, %374
  %376 = icmp slt i64 %373, %375
  br i1 %376, label %378, label %377

377:                                              ; preds = %372
  store i32 18, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %522

378:                                              ; preds = %372
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %379 = load i64, ptr %35, align 8, !tbaa !8
  store i64 %379, ptr %41, align 8, !tbaa !8
  br label %380

380:                                              ; preds = %481, %378
  %381 = load i64, ptr %41, align 8, !tbaa !8
  %382 = load i64, ptr @K, align 8, !tbaa !8
  %383 = icmp slt i64 %381, %382
  br i1 %383, label %385, label %384

384:                                              ; preds = %380
  store i32 21, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %484

385:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  %386 = load i64, ptr %41, align 8, !tbaa !8
  %387 = getelementptr inbounds [50000 x i64], ptr @I, i64 0, i64 %386
  %388 = load i64, ptr %387, align 8, !tbaa !8
  store i64 %388, ptr %42, align 8, !tbaa !8
  %389 = load i64, ptr %42, align 8, !tbaa !8
  %390 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %389
  %391 = load i64, ptr %390, align 8, !tbaa !8
  %392 = mul nsw i64 2, %391
  %393 = load i64, ptr %40, align 8, !tbaa !8
  %394 = icmp sle i64 %392, %393
  br i1 %394, label %395, label %453

395:                                              ; preds = %385
  %396 = load i64, ptr %35, align 8, !tbaa !8
  %397 = add nsw i64 %396, 1
  store i64 %397, ptr %35, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %398 = load i64, ptr %42, align 8, !tbaa !8
  %399 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %398
  %400 = load i64, ptr %399, align 8, !tbaa !8
  %401 = mul nsw i64 2, %400
  %402 = sub nsw i64 %401, 1
  store i64 %402, ptr %43, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %403 = load i64, ptr %42, align 8, !tbaa !8
  %404 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %403
  %405 = load i64, ptr %404, align 8, !tbaa !8
  %406 = mul nsw i64 2, %405
  %407 = sub nsw i64 %406, 2
  store i64 %407, ptr %44, align 8, !tbaa !8
  %408 = load i64, ptr %44, align 8, !tbaa !8
  %409 = srem i64 %408, 2
  %410 = icmp ne i64 %409, 0
  br i1 %410, label %411, label %412

411:                                              ; preds = %395
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %44) #7
  br label %412

412:                                              ; preds = %411, %395
  %413 = load i64, ptr %42, align 8, !tbaa !8
  %414 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %413
  %415 = load i64, ptr %43, align 8, !tbaa !8
  %416 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %414, i64 noundef %415) #7
  %417 = load i64, ptr %416, align 8, !tbaa !8
  %418 = icmp eq i64 %417, 0
  br i1 %418, label %419, label %422

419:                                              ; preds = %412
  %420 = load i64, ptr %39, align 8, !tbaa !8
  %421 = add nsw i64 %420, 1
  store i64 %421, ptr %39, align 8, !tbaa !8
  br label %432

422:                                              ; preds = %412
  %423 = load i64, ptr %37, align 8, !tbaa !8
  %424 = load i64, ptr %42, align 8, !tbaa !8
  %425 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %424
  %426 = load i64, ptr %43, align 8, !tbaa !8
  %427 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %425, i64 noundef %426) #7
  %428 = load i64, ptr %427, align 8, !tbaa !8
  %429 = mul nsw i64 %423, %428
  %430 = load i64, ptr @MOD, align 8, !tbaa !8
  %431 = srem i64 %429, %430
  store i64 %431, ptr %37, align 8, !tbaa !8
  br label %432

432:                                              ; preds = %422, %419
  %433 = load i64, ptr %42, align 8, !tbaa !8
  %434 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %433
  %435 = load i64, ptr %44, align 8, !tbaa !8
  %436 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %434, i64 noundef %435) #7
  %437 = load i64, ptr %436, align 8, !tbaa !8
  %438 = icmp eq i64 %437, 0
  br i1 %438, label %439, label %442

439:                                              ; preds = %432
  %440 = load i64, ptr %38, align 8, !tbaa !8
  %441 = add nsw i64 %440, 1
  store i64 %441, ptr %38, align 8, !tbaa !8
  br label %452

442:                                              ; preds = %432
  %443 = load i64, ptr %36, align 8, !tbaa !8
  %444 = load i64, ptr %42, align 8, !tbaa !8
  %445 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %444
  %446 = load i64, ptr %44, align 8, !tbaa !8
  %447 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %445, i64 noundef %446) #7
  %448 = load i64, ptr %447, align 8, !tbaa !8
  %449 = mul nsw i64 %443, %448
  %450 = load i64, ptr @MOD, align 8, !tbaa !8
  %451 = srem i64 %449, %450
  store i64 %451, ptr %36, align 8, !tbaa !8
  br label %452

452:                                              ; preds = %442, %439
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %480

453:                                              ; preds = %385
  %454 = load i64, ptr %42, align 8, !tbaa !8
  %455 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %454
  %456 = load i64, ptr %40, align 8, !tbaa !8
  %457 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %455, i64 noundef %456) #7
  %458 = load i64, ptr %457, align 8, !tbaa !8
  %459 = icmp eq i64 %458, 0
  br i1 %459, label %460, label %465

460:                                              ; preds = %453
  %461 = load i64, ptr %40, align 8, !tbaa !8
  %462 = getelementptr inbounds [200000 x i64], ptr @Zsfx, i64 0, i64 %461
  %463 = load i64, ptr %462, align 8, !tbaa !8
  %464 = add nsw i64 %463, 1
  store i64 %464, ptr %462, align 8, !tbaa !8
  br label %479

465:                                              ; preds = %453
  %466 = load i64, ptr %40, align 8, !tbaa !8
  %467 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %466
  %468 = load i64, ptr %467, align 8, !tbaa !8
  %469 = load i64, ptr %42, align 8, !tbaa !8
  %470 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %469
  %471 = load i64, ptr %40, align 8, !tbaa !8
  %472 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %470, i64 noundef %471) #7
  %473 = load i64, ptr %472, align 8, !tbaa !8
  %474 = mul nsw i64 %468, %473
  %475 = load i64, ptr @MOD, align 8, !tbaa !8
  %476 = srem i64 %474, %475
  %477 = load i64, ptr %40, align 8, !tbaa !8
  %478 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %477
  store i64 %476, ptr %478, align 8, !tbaa !8
  br label %479

479:                                              ; preds = %465, %460
  br label %480

480:                                              ; preds = %479, %452
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  br label %481

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

484:                                              ; preds = %384
  %485 = load i64, ptr %40, align 8, !tbaa !8
  %486 = srem i64 %485, 2
  %487 = icmp ne i64 %486, 0
  br i1 %487, label %488, label %503

488:                                              ; preds = %484
  %489 = load i64, ptr %39, align 8, !tbaa !8
  %490 = load i64, ptr %40, align 8, !tbaa !8
  %491 = getelementptr inbounds [200000 x i64], ptr @Zsfx, i64 0, i64 %490
  %492 = load i64, ptr %491, align 8, !tbaa !8
  %493 = add nsw i64 %492, %489
  store i64 %493, ptr %491, align 8, !tbaa !8
  %494 = load i64, ptr %40, align 8, !tbaa !8
  %495 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %494
  %496 = load i64, ptr %495, align 8, !tbaa !8
  %497 = load i64, ptr %37, align 8, !tbaa !8
  %498 = mul nsw i64 %496, %497
  %499 = load i64, ptr @MOD, align 8, !tbaa !8
  %500 = srem i64 %498, %499
  %501 = load i64, ptr %40, align 8, !tbaa !8
  %502 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %501
  store i64 %500, ptr %502, align 8, !tbaa !8
  br label %518

503:                                              ; preds = %484
  %504 = load i64, ptr %38, align 8, !tbaa !8
  %505 = load i64, ptr %40, align 8, !tbaa !8
  %506 = getelementptr inbounds [200000 x i64], ptr @Zsfx, i64 0, i64 %505
  %507 = load i64, ptr %506, align 8, !tbaa !8
  %508 = add nsw i64 %507, %504
  store i64 %508, ptr %506, align 8, !tbaa !8
  %509 = load i64, ptr %40, align 8, !tbaa !8
  %510 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %509
  %511 = load i64, ptr %510, align 8, !tbaa !8
  %512 = load i64, ptr %36, align 8, !tbaa !8
  %513 = mul nsw i64 %511, %512
  %514 = load i64, ptr @MOD, align 8, !tbaa !8
  %515 = srem i64 %513, %514
  %516 = load i64, ptr %40, align 8, !tbaa !8
  %517 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %516
  store i64 %515, ptr %517, align 8, !tbaa !8
  br label %518

518:                                              ; preds = %503, %488
  br label %519

519:                                              ; preds = %518
  %520 = load i64, ptr %40, align 8, !tbaa !8
  %521 = add nsw i64 %520, 1
  store i64 %521, ptr %40, align 8, !tbaa !8
  br label %372, !llvm.loop !25

522:                                              ; preds = %377
  store i64 0, ptr %35, align 8, !tbaa !8
  store i64 1, ptr %37, align 8, !tbaa !8
  store i64 0, ptr %39, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  store i64 0, ptr %45, align 8, !tbaa !8
  br label %523

523:                                              ; preds = %620, %522
  %524 = load i64, ptr %45, align 8, !tbaa !8
  %525 = load i64, ptr %2, align 8, !tbaa !8
  %526 = mul nsw i64 2, %525
  %527 = icmp slt i64 %524, %526
  br i1 %527, label %529, label %528

528:                                              ; preds = %523
  store i32 24, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  br label %623

529:                                              ; preds = %523
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #7
  %530 = load i64, ptr %35, align 8, !tbaa !8
  store i64 %530, ptr %46, align 8, !tbaa !8
  br label %531

531:                                              ; preds = %602, %529
  %532 = load i64, ptr %46, align 8, !tbaa !8
  %533 = load i64, ptr @K, align 8, !tbaa !8
  %534 = icmp slt i64 %532, %533
  br i1 %534, label %536, label %535

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

536:                                              ; preds = %531
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #7
  %537 = load i64, ptr %46, align 8, !tbaa !8
  %538 = getelementptr inbounds [50000 x i64], ptr @I, i64 0, i64 %537
  %539 = load i64, ptr %538, align 8, !tbaa !8
  store i64 %539, ptr %47, align 8, !tbaa !8
  %540 = load i64, ptr %47, align 8, !tbaa !8
  %541 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %540
  %542 = load i64, ptr %541, align 8, !tbaa !8
  %543 = mul nsw i64 2, %542
  %544 = load i64, ptr %45, align 8, !tbaa !8
  %545 = icmp sle i64 %543, %544
  br i1 %545, label %546, label %574

546:                                              ; preds = %536
  %547 = load i64, ptr %35, align 8, !tbaa !8
  %548 = add nsw i64 %547, 1
  store i64 %548, ptr %35, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #7
  %549 = load i64, ptr %47, align 8, !tbaa !8
  %550 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %549
  %551 = load i64, ptr %550, align 8, !tbaa !8
  %552 = mul nsw i64 2, %551
  %553 = sub nsw i64 %552, 1
  store i64 %553, ptr %48, align 8, !tbaa !8
  %554 = load i64, ptr %47, align 8, !tbaa !8
  %555 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %554
  %556 = load i64, ptr %48, align 8, !tbaa !8
  %557 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %555, i64 noundef %556) #7
  %558 = load i64, ptr %557, align 8, !tbaa !8
  %559 = icmp eq i64 %558, 0
  br i1 %559, label %560, label %563

560:                                              ; preds = %546
  %561 = load i64, ptr %39, align 8, !tbaa !8
  %562 = add nsw i64 %561, 1
  store i64 %562, ptr %39, align 8, !tbaa !8
  br label %573

563:                                              ; preds = %546
  %564 = load i64, ptr %37, align 8, !tbaa !8
  %565 = load i64, ptr %47, align 8, !tbaa !8
  %566 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %565
  %567 = load i64, ptr %48, align 8, !tbaa !8
  %568 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %566, i64 noundef %567) #7
  %569 = load i64, ptr %568, align 8, !tbaa !8
  %570 = mul nsw i64 %564, %569
  %571 = load i64, ptr @MOD, align 8, !tbaa !8
  %572 = srem i64 %570, %571
  store i64 %572, ptr %37, align 8, !tbaa !8
  br label %573

573:                                              ; preds = %563, %560
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  br label %601

574:                                              ; preds = %536
  %575 = load i64, ptr %47, align 8, !tbaa !8
  %576 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %575
  %577 = load i64, ptr %45, align 8, !tbaa !8
  %578 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %576, i64 noundef %577) #7
  %579 = load i64, ptr %578, align 8, !tbaa !8
  %580 = icmp eq i64 %579, 0
  br i1 %580, label %581, label %586

581:                                              ; preds = %574
  %582 = load i64, ptr %45, align 8, !tbaa !8
  %583 = getelementptr inbounds [200000 x i64], ptr @BZsfx, i64 0, i64 %582
  %584 = load i64, ptr %583, align 8, !tbaa !8
  %585 = add nsw i64 %584, 1
  store i64 %585, ptr %583, align 8, !tbaa !8
  br label %600

586:                                              ; preds = %574
  %587 = load i64, ptr %45, align 8, !tbaa !8
  %588 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %587
  %589 = load i64, ptr %588, align 8, !tbaa !8
  %590 = load i64, ptr %47, align 8, !tbaa !8
  %591 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %590
  %592 = load i64, ptr %45, align 8, !tbaa !8
  %593 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %591, i64 noundef %592) #7
  %594 = load i64, ptr %593, align 8, !tbaa !8
  %595 = mul nsw i64 %589, %594
  %596 = load i64, ptr @MOD, align 8, !tbaa !8
  %597 = srem i64 %595, %596
  %598 = load i64, ptr %45, align 8, !tbaa !8
  %599 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %598
  store i64 %597, ptr %599, align 8, !tbaa !8
  br label %600

600:                                              ; preds = %586, %581
  br label %601

601:                                              ; preds = %600, %573
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #7
  br label %602

602:                                              ; preds = %601
  %603 = load i64, ptr %46, align 8, !tbaa !8
  %604 = add nsw i64 %603, 1
  store i64 %604, ptr %46, align 8, !tbaa !8
  br label %531, !llvm.loop !26

605:                                              ; preds = %535
  %606 = load i64, ptr %39, align 8, !tbaa !8
  %607 = load i64, ptr %45, align 8, !tbaa !8
  %608 = getelementptr inbounds [200000 x i64], ptr @BZsfx, i64 0, i64 %607
  %609 = load i64, ptr %608, align 8, !tbaa !8
  %610 = add nsw i64 %609, %606
  store i64 %610, ptr %608, align 8, !tbaa !8
  %611 = load i64, ptr %45, align 8, !tbaa !8
  %612 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %611
  %613 = load i64, ptr %612, align 8, !tbaa !8
  %614 = load i64, ptr %37, align 8, !tbaa !8
  %615 = mul nsw i64 %613, %614
  %616 = load i64, ptr @MOD, align 8, !tbaa !8
  %617 = srem i64 %615, %616
  %618 = load i64, ptr %45, align 8, !tbaa !8
  %619 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %618
  store i64 %617, ptr %619, align 8, !tbaa !8
  br label %620

620:                                              ; preds = %605
  %621 = load i64, ptr %45, align 8, !tbaa !8
  %622 = add nsw i64 %621, 1
  store i64 %622, ptr %45, align 8, !tbaa !8
  br label %523, !llvm.loop !27

623:                                              ; preds = %528
  %624 = load i64, ptr @K, align 8, !tbaa !8
  %625 = getelementptr inbounds i64, ptr @I, i64 %624
  call void @"_ZSt4sortIPxZ4mainE3$_1EvT_S2_T0_"(ptr noundef @I, ptr noundef %625)
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #7
  store i64 0, ptr %50, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #7
  store i64 0, ptr %51, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #7
  store i64 0, ptr %52, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #7
  store i64 0, ptr %53, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #7
  store i64 0, ptr %54, align 8, !tbaa !8
  br label %626

626:                                              ; preds = %846, %623
  %627 = load i64, ptr %54, align 8, !tbaa !8
  %628 = load i64, ptr @K, align 8, !tbaa !8
  %629 = icmp slt i64 %627, %628
  br i1 %629, label %631, label %630

630:                                              ; preds = %626
  store i32 30, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  br label %849

631:                                              ; preds = %626
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #7
  %632 = load i64, ptr %54, align 8, !tbaa !8
  %633 = getelementptr inbounds [50000 x i64], ptr @I, i64 0, i64 %632
  %634 = load i64, ptr %633, align 8, !tbaa !8
  store i64 %634, ptr %55, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #7
  store i64 0, ptr %56, align 8, !tbaa !8
  br label %635

635:                                              ; preds = %670, %631
  %636 = load i64, ptr %56, align 8, !tbaa !8
  %637 = load i64, ptr %55, align 8, !tbaa !8
  %638 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %637
  %639 = load i64, ptr %638, align 8, !tbaa !8
  %640 = mul nsw i64 2, %639
  %641 = icmp slt i64 %636, %640
  br i1 %641, label %643, label %642

642:                                              ; preds = %635
  store i32 33, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #7
  br label %673

643:                                              ; preds = %635
  %644 = load i64, ptr %55, align 8, !tbaa !8
  %645 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %644
  %646 = load i64, ptr %56, align 8, !tbaa !8
  %647 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %645, i64 noundef %646) #7
  %648 = load i64, ptr %647, align 8, !tbaa !8
  %649 = icmp eq i64 %648, 0
  br i1 %649, label %650, label %655

650:                                              ; preds = %643
  %651 = load i64, ptr %56, align 8, !tbaa !8
  %652 = getelementptr inbounds [200000 x i64], ptr @Zsfx, i64 0, i64 %651
  %653 = load i64, ptr %652, align 8, !tbaa !8
  %654 = add nsw i64 %653, -1
  store i64 %654, ptr %652, align 8, !tbaa !8
  br label %670

655:                                              ; preds = %643
  %656 = load i64, ptr %56, align 8, !tbaa !8
  %657 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %656
  %658 = load i64, ptr %657, align 8, !tbaa !8
  %659 = load i64, ptr %55, align 8, !tbaa !8
  %660 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %659
  %661 = load i64, ptr %56, align 8, !tbaa !8
  %662 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %660, i64 noundef %661) #7
  %663 = load i64, ptr %662, align 8, !tbaa !8
  %664 = call noundef i64 @_Z3invx(i64 noundef %663)
  %665 = mul nsw i64 %658, %664
  %666 = load i64, ptr @MOD, align 8, !tbaa !8
  %667 = srem i64 %665, %666
  %668 = load i64, ptr %56, align 8, !tbaa !8
  %669 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %668
  store i64 %667, ptr %669, align 8, !tbaa !8
  br label %670

670:                                              ; preds = %655, %650
  %671 = load i64, ptr %56, align 8, !tbaa !8
  %672 = add nsw i64 %671, 1
  store i64 %672, ptr %56, align 8, !tbaa !8
  br label %635, !llvm.loop !28

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

674:                                              ; preds = %709, %673
  %675 = load i64, ptr %57, align 8, !tbaa !8
  %676 = load i64, ptr %55, align 8, !tbaa !8
  %677 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %676
  %678 = load i64, ptr %677, align 8, !tbaa !8
  %679 = mul nsw i64 2, %678
  %680 = icmp slt i64 %675, %679
  br i1 %680, label %682, label %681

681:                                              ; preds = %674
  store i32 36, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #7
  br label %712

682:                                              ; preds = %674
  %683 = load i64, ptr %55, align 8, !tbaa !8
  %684 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %683
  %685 = load i64, ptr %57, align 8, !tbaa !8
  %686 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %684, i64 noundef %685) #7
  %687 = load i64, ptr %686, align 8, !tbaa !8
  %688 = icmp eq i64 %687, 0
  br i1 %688, label %689, label %694

689:                                              ; preds = %682
  %690 = load i64, ptr %57, align 8, !tbaa !8
  %691 = getelementptr inbounds [200000 x i64], ptr @BZsfx, i64 0, i64 %690
  %692 = load i64, ptr %691, align 8, !tbaa !8
  %693 = add nsw i64 %692, -1
  store i64 %693, ptr %691, align 8, !tbaa !8
  br label %709

694:                                              ; preds = %682
  %695 = load i64, ptr %57, align 8, !tbaa !8
  %696 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %695
  %697 = load i64, ptr %696, align 8, !tbaa !8
  %698 = load i64, ptr %55, align 8, !tbaa !8
  %699 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %698
  %700 = load i64, ptr %57, align 8, !tbaa !8
  %701 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %699, i64 noundef %700) #7
  %702 = load i64, ptr %701, align 8, !tbaa !8
  %703 = call noundef i64 @_Z3invx(i64 noundef %702)
  %704 = mul nsw i64 %697, %703
  %705 = load i64, ptr @MOD, align 8, !tbaa !8
  %706 = srem i64 %704, %705
  %707 = load i64, ptr %57, align 8, !tbaa !8
  %708 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %707
  store i64 %706, ptr %708, align 8, !tbaa !8
  br label %709

709:                                              ; preds = %694, %689
  %710 = load i64, ptr %57, align 8, !tbaa !8
  %711 = add nsw i64 %710, 1
  store i64 %711, ptr %57, align 8, !tbaa !8
  br label %674, !llvm.loop !29

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

713:                                              ; preds = %766, %712
  %714 = load i64, ptr %58, align 8, !tbaa !8
  %715 = load i64, ptr %55, align 8, !tbaa !8
  %716 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %715
  %717 = load i64, ptr %716, align 8, !tbaa !8
  %718 = icmp slt i64 %714, %717
  br i1 %718, label %720, label %719

719:                                              ; preds = %713
  store i32 39, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #7
  br label %769

720:                                              ; preds = %713
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #7
  %721 = load i64, ptr %55, align 8, !tbaa !8
  %722 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @E, i64 0, i64 %721
  %723 = load i64, ptr %58, align 8, !tbaa !8
  %724 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %722, i64 noundef %723) #7
  %725 = load i64, ptr %724, align 8, !tbaa !8
  store i64 %725, ptr %59, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #7
  %726 = load i64, ptr %55, align 8, !tbaa !8
  %727 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @O, i64 0, i64 %726
  %728 = load i64, ptr %58, align 8, !tbaa !8
  %729 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %727, i64 noundef %728) #7
  %730 = load i64, ptr %729, align 8, !tbaa !8
  store i64 %730, ptr %60, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #7
  store i64 1, ptr %61, align 8, !tbaa !8
  %731 = load i64, ptr %59, align 8, !tbaa !8
  %732 = load i64, ptr %60, align 8, !tbaa !8
  %733 = icmp sgt i64 %731, %732
  br i1 %733, label %734, label %735

734:                                              ; preds = %720
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull align 8 dereferenceable(8) %60) #7
  br label %735

735:                                              ; preds = %734, %720
  %736 = load i64, ptr %59, align 8, !tbaa !8
  %737 = load i64, ptr %54, align 8, !tbaa !8
  %738 = load i64, ptr %59, align 8, !tbaa !8
  %739 = call noundef i64 @_Z4calcxxRA200000_xS0_S0_S0_x(i64 noundef %737, i64 noundef %738, ptr noundef nonnull align 8 dereferenceable(1600000) @Csfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Cpfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Zsfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Zpfx, i64 noundef 2)
  %740 = mul nsw i64 %736, %739
  %741 = load i64, ptr @MOD, align 8, !tbaa !8
  %742 = srem i64 %740, %741
  %743 = load i64, ptr %50, align 8, !tbaa !8
  %744 = add nsw i64 %743, %742
  store i64 %744, ptr %50, align 8, !tbaa !8
  %745 = load i64, ptr %60, align 8, !tbaa !8
  %746 = load i64, ptr %54, align 8, !tbaa !8
  %747 = load i64, ptr %60, align 8, !tbaa !8
  %748 = call noundef i64 @_Z4calcxxRA200000_xS0_S0_S0_x(i64 noundef %746, i64 noundef %747, ptr noundef nonnull align 8 dereferenceable(1600000) @Csfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Cpfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Zsfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Zpfx, i64 noundef 2)
  %749 = mul nsw i64 %745, %748
  %750 = load i64, ptr @MOD, align 8, !tbaa !8
  %751 = srem i64 %749, %750
  %752 = load i64, ptr %50, align 8, !tbaa !8
  %753 = add nsw i64 %752, %751
  store i64 %753, ptr %50, align 8, !tbaa !8
  %754 = load i64, ptr %60, align 8, !tbaa !8
  %755 = load i64, ptr %54, align 8, !tbaa !8
  %756 = load i64, ptr %60, align 8, !tbaa !8
  %757 = call noundef i64 @_Z4calcxxRA200000_xS0_S0_S0_x(i64 noundef %755, i64 noundef %756, ptr noundef nonnull align 8 dereferenceable(1600000) @Bsfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Bpfx, ptr noundef nonnull align 8 dereferenceable(1600000) @BZsfx, ptr noundef nonnull align 8 dereferenceable(1600000) @BZpfx, i64 noundef 1)
  %758 = mul nsw i64 %754, %757
  %759 = load i64, ptr @MOD, align 8, !tbaa !8
  %760 = srem i64 %758, %759
  %761 = load i64, ptr %50, align 8, !tbaa !8
  %762 = sub nsw i64 %761, %760
  store i64 %762, ptr %50, align 8, !tbaa !8
  %763 = load i64, ptr @MOD, align 8, !tbaa !8
  %764 = load i64, ptr %50, align 8, !tbaa !8
  %765 = srem i64 %764, %763
  store i64 %765, ptr %50, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #7
  br label %766

766:                                              ; preds = %735
  %767 = load i64, ptr %58, align 8, !tbaa !8
  %768 = add nsw i64 %767, 1
  store i64 %768, ptr %58, align 8, !tbaa !8
  br label %713, !llvm.loop !30

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

770:                                              ; preds = %804, %769
  %771 = load i64, ptr %62, align 8, !tbaa !8
  %772 = load i64, ptr %55, align 8, !tbaa !8
  %773 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %772
  %774 = load i64, ptr %773, align 8, !tbaa !8
  %775 = mul nsw i64 2, %774
  %776 = icmp slt i64 %771, %775
  br i1 %776, label %778, label %777

777:                                              ; preds = %770
  store i32 42, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #7
  br label %807

778:                                              ; preds = %770
  %779 = load i64, ptr %55, align 8, !tbaa !8
  %780 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %779
  %781 = load i64, ptr %62, align 8, !tbaa !8
  %782 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %780, i64 noundef %781) #7
  %783 = load i64, ptr %782, align 8, !tbaa !8
  %784 = icmp eq i64 %783, 0
  br i1 %784, label %785, label %790

785:                                              ; preds = %778
  %786 = load i64, ptr %62, align 8, !tbaa !8
  %787 = getelementptr inbounds [200000 x i64], ptr @Zpfx, i64 0, i64 %786
  %788 = load i64, ptr %787, align 8, !tbaa !8
  %789 = add nsw i64 %788, 1
  store i64 %789, ptr %787, align 8, !tbaa !8
  br label %804

790:                                              ; preds = %778
  %791 = load i64, ptr %62, align 8, !tbaa !8
  %792 = getelementptr inbounds [200000 x i64], ptr @Cpfx, i64 0, i64 %791
  %793 = load i64, ptr %792, align 8, !tbaa !8
  %794 = load i64, ptr %55, align 8, !tbaa !8
  %795 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %794
  %796 = load i64, ptr %62, align 8, !tbaa !8
  %797 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %795, i64 noundef %796) #7
  %798 = load i64, ptr %797, align 8, !tbaa !8
  %799 = mul nsw i64 %793, %798
  %800 = load i64, ptr @MOD, align 8, !tbaa !8
  %801 = srem i64 %799, %800
  %802 = load i64, ptr %62, align 8, !tbaa !8
  %803 = getelementptr inbounds [200000 x i64], ptr @Cpfx, i64 0, i64 %802
  store i64 %801, ptr %803, align 8, !tbaa !8
  br label %804

804:                                              ; preds = %790, %785
  %805 = load i64, ptr %62, align 8, !tbaa !8
  %806 = add nsw i64 %805, 1
  store i64 %806, ptr %62, align 8, !tbaa !8
  br label %770, !llvm.loop !31

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

808:                                              ; preds = %842, %807
  %809 = load i64, ptr %63, align 8, !tbaa !8
  %810 = load i64, ptr %55, align 8, !tbaa !8
  %811 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %810
  %812 = load i64, ptr %811, align 8, !tbaa !8
  %813 = mul nsw i64 2, %812
  %814 = icmp slt i64 %809, %813
  br i1 %814, label %816, label %815

815:                                              ; preds = %808
  store i32 45, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #7
  br label %845

816:                                              ; preds = %808
  %817 = load i64, ptr %55, align 8, !tbaa !8
  %818 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %817
  %819 = load i64, ptr %63, align 8, !tbaa !8
  %820 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %818, i64 noundef %819) #7
  %821 = load i64, ptr %820, align 8, !tbaa !8
  %822 = icmp eq i64 %821, 0
  br i1 %822, label %823, label %828

823:                                              ; preds = %816
  %824 = load i64, ptr %63, align 8, !tbaa !8
  %825 = getelementptr inbounds [200000 x i64], ptr @BZpfx, i64 0, i64 %824
  %826 = load i64, ptr %825, align 8, !tbaa !8
  %827 = add nsw i64 %826, 1
  store i64 %827, ptr %825, align 8, !tbaa !8
  br label %842

828:                                              ; preds = %816
  %829 = load i64, ptr %63, align 8, !tbaa !8
  %830 = getelementptr inbounds [200000 x i64], ptr @Bpfx, i64 0, i64 %829
  %831 = load i64, ptr %830, align 8, !tbaa !8
  %832 = load i64, ptr %55, align 8, !tbaa !8
  %833 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %832
  %834 = load i64, ptr %63, align 8, !tbaa !8
  %835 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %833, i64 noundef %834) #7
  %836 = load i64, ptr %835, align 8, !tbaa !8
  %837 = mul nsw i64 %831, %836
  %838 = load i64, ptr @MOD, align 8, !tbaa !8
  %839 = srem i64 %837, %838
  %840 = load i64, ptr %63, align 8, !tbaa !8
  %841 = getelementptr inbounds [200000 x i64], ptr @Bpfx, i64 0, i64 %840
  store i64 %839, ptr %841, align 8, !tbaa !8
  br label %842

842:                                              ; preds = %828, %823
  %843 = load i64, ptr %63, align 8, !tbaa !8
  %844 = add nsw i64 %843, 1
  store i64 %844, ptr %63, align 8, !tbaa !8
  br label %808, !llvm.loop !32

845:                                              ; preds = %815
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #7
  br label %846

846:                                              ; preds = %845
  %847 = load i64, ptr %54, align 8, !tbaa !8
  %848 = add nsw i64 %847, 1
  store i64 %848, ptr %54, align 8, !tbaa !8
  br label %626, !llvm.loop !33

849:                                              ; preds = %630
  %850 = load i64, ptr %50, align 8, !tbaa !8
  %851 = load i64, ptr @MOD, align 8, !tbaa !8
  %852 = srem i64 %850, %851
  %853 = load i64, ptr @MOD, align 8, !tbaa !8
  %854 = add nsw i64 %852, %853
  %855 = load i64, ptr @MOD, align 8, !tbaa !8
  %856 = srem i64 %854, %855
  %857 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %856)
  %858 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %857, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %859 = load i32, ptr %1, align 4
  ret i32 %859

860:                                              ; preds = %366
  %861 = load ptr, ptr %22, align 8
  %862 = load i32, ptr %23, align 4
  %863 = insertvalue { ptr, i32 } poison, ptr %861, 0
  %864 = insertvalue { ptr, i32 } %863, i32 %862, 1
  resume { ptr, i32 } %864

865:                                              ; preds = %274
  unreachable
}

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

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

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

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

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

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

; 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(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

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

; 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 void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !9, i64 0}
!16 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!17 = !{!16, !9, i64 8}
!18 = distinct !{!18, !14}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !10, i64 0}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}
!32 = distinct !{!32, !14}
!33 = distinct !{!33, !14}


; 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<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@MOD = external dso_local local_unnamed_addr global i64, align 8
@K = external dso_local global i64, align 8
@N = external dso_local global [50000 x i64], align 16
@M = external dso_local global [50000 x i64], align 16
@I = external dso_local global [50000 x i64], align 16
@G = external dso_local global [50000 x %"class.std::vector"], align 16
@E = external dso_local global [50000 x %"class.std::vector.0"], align 16
@O = external dso_local global [50000 x %"class.std::vector.0"], align 16
@occ = external dso_local global [50000 x %"class.std::vector.0"], align 16
@pfx = external dso_local global [50000 x %"class.std::vector.0"], align 16
@occB = external dso_local global [50000 x %"class.std::vector.0"], align 16
@pfxB = external dso_local global [50000 x %"class.std::vector.0"], align 16
@Cpfx = external dso_local global [200000 x i64], align 16
@Csfx = external dso_local global [200000 x i64], align 16
@Zpfx = external dso_local global [200000 x i64], align 16
@Zsfx = external dso_local global [200000 x i64], align 16
@Bpfx = external dso_local global [200000 x i64], align 16
@Bsfx = external dso_local global [200000 x i64], align 16
@BZpfx = external dso_local global [200000 x i64], align 16
@BZsfx = external dso_local global [200000 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3invx(i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4calcxxRA200000_xS0_S0_S0_x(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), ptr noundef nonnull align 8 dereferenceable(1600000), i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %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 %"class.std::queue", align 8
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca i64, align 8
  %21 = alloca %"struct.std::pair", align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %27
  %29 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %28, ptr noundef null)
  %30 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %31 = 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) @K)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store i64 0, ptr %1, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 1, ptr %2, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @Cpfx, ptr noundef nonnull getelementptr inbounds (i8, ptr @Cpfx, i64 1600000), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1, ptr %3, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @Csfx, ptr noundef nonnull getelementptr inbounds (i8, ptr @Csfx, i64 1600000), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 1, ptr %4, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @Bpfx, ptr noundef nonnull getelementptr inbounds (i8, ptr @Bpfx, i64 1600000), ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 1, ptr %5, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @Bsfx, ptr noundef nonnull getelementptr inbounds (i8, ptr @Bsfx, i64 1600000), ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %32 = load i64, ptr @K, align 8, !tbaa !8
  %33 = icmp sgt i64 %32, 0
  br i1 %33, label %.lr.ph275, label %._crit_edge276

._crit_edge276:                                   ; preds = %._crit_edge272, %0
  %.lcssa257 = phi i64 [ %32, %0 ], [ %150, %._crit_edge272 ]
  %34 = getelementptr inbounds i64, ptr @I, i64 %.lcssa257
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef nonnull @I, ptr noundef nonnull %34, i32 noundef 0)
  %35 = load i64, ptr @K, align 8, !tbaa !8
  %36 = getelementptr inbounds i64, ptr @I, i64 %35
  call void @"_ZSt4sortIPxZ4mainE3$_0EvT_S2_T0_"(ptr noundef nonnull @I, ptr noundef nonnull %36)
  %37 = load i64, ptr %1, align 8, !tbaa !8
  %38 = icmp sgt i64 %37, 0
  %.pre333.pre = load i64, ptr @K, align 8, !tbaa !8
  br i1 %38, label %.preheader255, label %._crit_edge309

.lr.ph275:                                        ; preds = %0, %._crit_edge272
  %.0198273 = phi i64 [ %149, %._crit_edge272 ], [ 0, %0 ]
  %39 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %.0198273
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %39)
  %41 = getelementptr inbounds [50000 x i64], ptr @M, i64 0, i64 %.0198273
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(8) %41)
  %43 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @G, i64 0, i64 %.0198273
  %44 = load i64, ptr %39, align 8, !tbaa !8
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %44)
  %45 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @E, i64 0, i64 %.0198273
  %46 = load i64, ptr %39, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 1000000000000000, ptr %6, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %46, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %47 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @O, i64 0, i64 %.0198273
  %48 = load i64, ptr %39, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 1000000000000000, ptr %7, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %48, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %49 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occ, i64 0, i64 %.0198273
  %50 = load i64, ptr %39, align 8, !tbaa !8
  %51 = shl nsw i64 %50, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store i64 0, ptr %8, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %51, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %52 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %.0198273
  %53 = load i64, ptr %39, align 8, !tbaa !8
  %54 = shl nsw i64 %53, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store i64 0, ptr %9, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %55 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @occB, i64 0, i64 %.0198273
  %56 = load i64, ptr %39, align 8, !tbaa !8
  %57 = shl nsw i64 %56, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  store i64 0, ptr %10, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  %58 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %.0198273
  %59 = load i64, ptr %39, align 8, !tbaa !8
  %60 = shl nsw i64 %59, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store i64 0, ptr %11, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE6resizeEmRKx(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %39)
  %62 = load i64, ptr %61, align 8, !tbaa !8
  store i64 %62, ptr %1, align 8, !tbaa !8
  %63 = load i64, ptr %41, align 8, !tbaa !8
  %64 = icmp sgt i64 %63, 0
  br i1 %64, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph275
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %14) #7
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 0, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  store i32 0, ptr %17, align 4, !tbaa !11
  call void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %14, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %77 unwind label %88

.lr.ph:                                           ; preds = %.lr.ph275, %.lr.ph
  %.0203260 = phi i64 [ %74, %.lr.ph ], [ 0, %.lr.ph275 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %67 = load i64, ptr %12, align 8, !tbaa !8
  %68 = add nsw i64 %67, -1
  store i64 %68, ptr %12, align 8, !tbaa !8
  %69 = load i64, ptr %13, align 8, !tbaa !8
  %70 = add nsw i64 %69, -1
  store i64 %70, ptr %13, align 8, !tbaa !8
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %68) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %72 = load i64, ptr %13, align 8, !tbaa !8
  %73 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %72) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %73, ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  %74 = add nuw nsw i64 %.0203260, 1
  %75 = load i64, ptr %41, align 8, !tbaa !8
  %76 = icmp slt i64 %74, %75
  br i1 %76, label %.lr.ph, label %._crit_edge, !llvm.loop !13

77:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  %78 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  br i1 %78, label %._crit_edge266, label %.lr.ph265

.lr.ph265:                                        ; preds = %77, %121
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  %80 = load i64, ptr %79, align 8, !tbaa !15
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = load i64, ptr %82, align 8, !tbaa !17
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  %84 = and i64 %83, 1
  %.not241 = icmp eq i64 %84, 0
  br i1 %.not241, label %90, label %85

85:                                               ; preds = %.lr.ph265
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %80) #7
  %87 = load i64, ptr %86, align 8, !tbaa !8
  %.not243 = icmp eq i64 %87, 1000000000000000
  br i1 %.not243, label %93, label %121, !llvm.loop !18

88:                                               ; preds = %._crit_edge
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  br label %165

90:                                               ; preds = %.lr.ph265
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %80) #7
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %.not242 = icmp eq i64 %92, 1000000000000000
  br i1 %.not242, label %93, label %121, !llvm.loop !18

93:                                               ; preds = %90, %85
  %.sink354 = phi ptr [ %47, %85 ], [ %45, %90 ]
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %.sink354, i64 noundef %80) #7
  store i64 %83, ptr %94, align 8, !tbaa !8
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %83) #7
  %96 = load i64, ptr %95, align 8, !tbaa !8
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %95, align 8, !tbaa !8
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %80) #7
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %.not244 = icmp eq i64 %99, 1000000000000000
  br i1 %.not244, label %107, label %100

100:                                              ; preds = %93
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %80) #7
  %102 = load i64, ptr %101, align 8, !tbaa !8
  %.not245 = icmp eq i64 %102, 1000000000000000
  br i1 %.not245, label %107, label %103

103:                                              ; preds = %100
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %83) #7
  %105 = load i64, ptr %104, align 8, !tbaa !8
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %104, align 8, !tbaa !8
  br label %107

107:                                              ; preds = %103, %100, %93
  %108 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %80) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  %109 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %108) #7
  store ptr %109, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %110 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %108) #7
  store ptr %110, ptr %19, align 8
  %111 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br i1 %111, label %.lr.ph262, label %._crit_edge263

.lr.ph262:                                        ; preds = %107
  %112 = add nsw i64 %83, 1
  br label %113

._crit_edge263:                                   ; preds = %116, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br label %121

113:                                              ; preds = %.lr.ph262, %116
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %115 = load i64, ptr %114, align 8, !tbaa !8
  store i64 %115, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  store i64 %112, ptr %22, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IRxxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %22)
  invoke void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %14, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %116 unwind label %119

116:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  %118 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br i1 %118, label %113, label %._crit_edge263

119:                                              ; preds = %113
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br label %165

121:                                              ; preds = %90, %85, %._crit_edge263
  %122 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
  br i1 %122, label %._crit_edge266, label %.lr.ph265

._crit_edge266:                                   ; preds = %121, %77
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef 0) #7
  %124 = load i64, ptr %123, align 8, !tbaa !8
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef 0) #7
  store i64 %124, ptr %125, align 8, !tbaa !8
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef 1) #7
  %127 = load i64, ptr %126, align 8, !tbaa !8
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef 1) #7
  store i64 %127, ptr %128, align 8, !tbaa !8
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef 0) #7
  %130 = load i64, ptr %129, align 8, !tbaa !8
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef 0) #7
  store i64 %130, ptr %131, align 8, !tbaa !8
  %132 = load i64, ptr %39, align 8, !tbaa !8
  %133 = icmp sgt i64 %132, 1
  br i1 %133, label %.lr.ph269, label %.preheader256

.preheader256:                                    ; preds = %.lr.ph269, %._crit_edge266
  %134 = phi i64 [ %132, %._crit_edge266 ], [ %146, %.lr.ph269 ]
  %135 = icmp sgt i64 %134, 0
  br i1 %135, label %.lr.ph271, label %._crit_edge272

.lr.ph269:                                        ; preds = %._crit_edge266, %.lr.ph269
  %.0207267 = phi i64 [ %145, %.lr.ph269 ], [ 2, %._crit_edge266 ]
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %.0207267) #7
  %137 = load i64, ptr %136, align 8, !tbaa !8
  %138 = add nsw i64 %.0207267, -2
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %138) #7
  %140 = load i64, ptr %139, align 8, !tbaa !8
  %141 = add nsw i64 %140, %137
  %142 = load i64, ptr @MOD, align 8, !tbaa !8
  %143 = srem i64 %141, %142
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %.0207267) #7
  store i64 %143, ptr %144, align 8, !tbaa !8
  %145 = add nuw nsw i64 %.0207267, 1
  %146 = load i64, ptr %39, align 8, !tbaa !8
  %147 = shl nsw i64 %146, 1
  %148 = icmp slt i64 %145, %147
  br i1 %148, label %.lr.ph269, label %.preheader256, !llvm.loop !19

._crit_edge272:                                   ; preds = %.lr.ph271, %.preheader256
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %14) #7
  %149 = add nuw nsw i64 %.0198273, 1
  %150 = load i64, ptr @K, align 8, !tbaa !8
  %151 = icmp slt i64 %149, %150
  br i1 %151, label %.lr.ph275, label %._crit_edge276, !llvm.loop !20

.lr.ph271:                                        ; preds = %.preheader256, %.lr.ph271
  %.0208270 = phi i64 [ %161, %.lr.ph271 ], [ 1, %.preheader256 ]
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %.0208270) #7
  %153 = load i64, ptr %152, align 8, !tbaa !8
  %154 = add nsw i64 %.0208270, -1
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %154) #7
  %156 = load i64, ptr %155, align 8, !tbaa !8
  %157 = add nsw i64 %156, %153
  %158 = load i64, ptr @MOD, align 8, !tbaa !8
  %159 = srem i64 %157, %158
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %.0208270) #7
  store i64 %159, ptr %160, align 8, !tbaa !8
  %161 = add nuw nsw i64 %.0208270, 1
  %162 = load i64, ptr %39, align 8, !tbaa !8
  %163 = shl nsw i64 %162, 1
  %164 = icmp slt i64 %161, %163
  br i1 %164, label %.lr.ph271, label %._crit_edge272, !llvm.loop !21

165:                                              ; preds = %119, %88
  %.pn = phi { ptr, i32 } [ %120, %119 ], [ %89, %88 ]
  call void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn

.preheader255:                                    ; preds = %._crit_edge276, %._crit_edge284
  %166 = phi i64 [ %171, %._crit_edge284 ], [ %.pre333.pre, %._crit_edge276 ]
  %.0211295 = phi i64 [ %.1212.lcssa, %._crit_edge284 ], [ 0, %._crit_edge276 ]
  %.0214294 = phi i64 [ %181, %._crit_edge284 ], [ 0, %._crit_edge276 ]
  %.0215293 = phi i64 [ %.1216.lcssa, %._crit_edge284 ], [ 0, %._crit_edge276 ]
  %.0221292 = phi i64 [ %.1222.lcssa, %._crit_edge284 ], [ 0, %._crit_edge276 ]
  %.0225291 = phi i64 [ %.1226.lcssa, %._crit_edge284 ], [ 1, %._crit_edge276 ]
  %.0233290 = phi i64 [ %.1234.lcssa, %._crit_edge284 ], [ 1, %._crit_edge276 ]
  %167 = icmp slt i64 %.0211295, %166
  br i1 %167, label %.lr.ph283, label %._crit_edge284

.lr.ph283:                                        ; preds = %.preheader255
  %168 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %.0214294
  %169 = getelementptr inbounds [200000 x i64], ptr @Zsfx, i64 0, i64 %.0214294
  br label %185

.preheader254:                                    ; preds = %._crit_edge284
  %170 = icmp sgt i64 %182, 0
  br i1 %170, label %.preheader253, label %._crit_edge309

._crit_edge284:                                   ; preds = %234, %.preheader255
  %171 = phi i64 [ %166, %.preheader255 ], [ %236, %234 ]
  %.1234.lcssa = phi i64 [ %.0233290, %.preheader255 ], [ %.3236, %234 ]
  %.1226.lcssa = phi i64 [ %.0225291, %.preheader255 ], [ %.3228, %234 ]
  %.1222.lcssa = phi i64 [ %.0221292, %.preheader255 ], [ %.3224, %234 ]
  %.1216.lcssa = phi i64 [ %.0215293, %.preheader255 ], [ %.3218, %234 ]
  %.1212.lcssa = phi i64 [ %.0211295, %.preheader255 ], [ %.2, %234 ]
  %172 = and i64 %.0214294, 1
  %.not239 = icmp eq i64 %172, 0
  %173 = getelementptr inbounds [200000 x i64], ptr @Zsfx, i64 0, i64 %.0214294
  %174 = load i64, ptr %173, align 8, !tbaa !8
  %175 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %.0214294
  %.1222.lcssa..1216.lcssa = select i1 %.not239, i64 %.1222.lcssa, i64 %.1216.lcssa
  %.1234.lcssa..1226.lcssa = select i1 %.not239, i64 %.1234.lcssa, i64 %.1226.lcssa
  %176 = add nsw i64 %174, %.1222.lcssa..1216.lcssa
  store i64 %176, ptr %173, align 8, !tbaa !8
  %177 = load i64, ptr %175, align 8, !tbaa !8
  %178 = mul nsw i64 %177, %.1234.lcssa..1226.lcssa
  %179 = load i64, ptr @MOD, align 8, !tbaa !8
  %180 = srem i64 %178, %179
  store i64 %180, ptr %175, align 8, !tbaa !8
  %181 = add nuw nsw i64 %.0214294, 1
  %182 = load i64, ptr %1, align 8, !tbaa !8
  %183 = shl nsw i64 %182, 1
  %184 = icmp slt i64 %181, %183
  br i1 %184, label %.preheader255, label %.preheader254, !llvm.loop !22

185:                                              ; preds = %.lr.ph283, %234
  %.1212282 = phi i64 [ %.0211295, %.lr.ph283 ], [ %.2, %234 ]
  %.0213281 = phi i64 [ %.0211295, %.lr.ph283 ], [ %235, %234 ]
  %.1216280 = phi i64 [ %.0215293, %.lr.ph283 ], [ %.3218, %234 ]
  %.1222279 = phi i64 [ %.0221292, %.lr.ph283 ], [ %.3224, %234 ]
  %.1226278 = phi i64 [ %.0225291, %.lr.ph283 ], [ %.3228, %234 ]
  %.1234277 = phi i64 [ %.0233290, %.lr.ph283 ], [ %.3236, %234 ]
  %186 = getelementptr inbounds [50000 x i64], ptr @I, i64 0, i64 %.0213281
  %187 = load i64, ptr %186, align 8, !tbaa !8
  %188 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !8
  %190 = shl nsw i64 %189, 1
  %.not240 = icmp sgt i64 %190, %.0214294
  br i1 %.not240, label %219, label %191

191:                                              ; preds = %185
  %192 = add nsw i64 %.1212282, 1
  %193 = add nsw i64 %190, -1
  %194 = add nsw i64 %190, -2
  %195 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %187
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %193) #7
  %197 = load i64, ptr %196, align 8, !tbaa !8
  %198 = icmp eq i64 %197, 0
  br i1 %198, label %199, label %201

199:                                              ; preds = %191
  %200 = add nsw i64 %.1216280, 1
  br label %207

201:                                              ; preds = %191
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %193) #7
  %203 = load i64, ptr %202, align 8, !tbaa !8
  %204 = mul nsw i64 %203, %.1226278
  %205 = load i64, ptr @MOD, align 8, !tbaa !8
  %206 = srem i64 %204, %205
  br label %207

207:                                              ; preds = %201, %199
  %.2227 = phi i64 [ %.1226278, %199 ], [ %206, %201 ]
  %.2217 = phi i64 [ %200, %199 ], [ %.1216280, %201 ]
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %194) #7
  %209 = load i64, ptr %208, align 8, !tbaa !8
  %210 = icmp eq i64 %209, 0
  br i1 %210, label %211, label %213

211:                                              ; preds = %207
  %212 = add nsw i64 %.1222279, 1
  br label %234

213:                                              ; preds = %207
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %194) #7
  %215 = load i64, ptr %214, align 8, !tbaa !8
  %216 = mul nsw i64 %215, %.1234277
  %217 = load i64, ptr @MOD, align 8, !tbaa !8
  %218 = srem i64 %216, %217
  br label %234

219:                                              ; preds = %185
  %220 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %187
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %220, i64 noundef %.0214294) #7
  %222 = load i64, ptr %221, align 8, !tbaa !8
  %223 = icmp eq i64 %222, 0
  br i1 %223, label %224, label %227

224:                                              ; preds = %219
  %225 = load i64, ptr %169, align 8, !tbaa !8
  %226 = add nsw i64 %225, 1
  store i64 %226, ptr %169, align 8, !tbaa !8
  br label %234

227:                                              ; preds = %219
  %228 = load i64, ptr %168, align 8, !tbaa !8
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %220, i64 noundef %.0214294) #7
  %230 = load i64, ptr %229, align 8, !tbaa !8
  %231 = mul nsw i64 %230, %228
  %232 = load i64, ptr @MOD, align 8, !tbaa !8
  %233 = srem i64 %231, %232
  store i64 %233, ptr %168, align 8, !tbaa !8
  br label %234

234:                                              ; preds = %211, %213, %224, %227
  %.3236 = phi i64 [ %.1234277, %224 ], [ %.1234277, %227 ], [ %.1234277, %211 ], [ %218, %213 ]
  %.3228 = phi i64 [ %.1226278, %224 ], [ %.1226278, %227 ], [ %.2227, %211 ], [ %.2227, %213 ]
  %.3224 = phi i64 [ %.1222279, %224 ], [ %.1222279, %227 ], [ %212, %211 ], [ %.1222279, %213 ]
  %.3218 = phi i64 [ %.1216280, %224 ], [ %.1216280, %227 ], [ %.2217, %211 ], [ %.2217, %213 ]
  %.2 = phi i64 [ %.1212282, %224 ], [ %.1212282, %227 ], [ %192, %211 ], [ %192, %213 ]
  %235 = add nsw i64 %.0213281, 1
  %236 = load i64, ptr @K, align 8, !tbaa !8
  %237 = icmp slt i64 %235, %236
  br i1 %237, label %185, label %._crit_edge284, !llvm.loop !23

.preheader253:                                    ; preds = %.preheader254, %._crit_edge301
  %238 = phi i64 [ %247, %._crit_edge301 ], [ %182, %.preheader254 ]
  %239 = phi i64 [ %248, %._crit_edge301 ], [ %171, %.preheader254 ]
  %.0210308 = phi i64 [ %257, %._crit_edge301 ], [ 0, %.preheader254 ]
  %.3307 = phi i64 [ %.4.lcssa, %._crit_edge301 ], [ 0, %.preheader254 ]
  %.4219306 = phi i64 [ %.5220.lcssa, %._crit_edge301 ], [ 0, %.preheader254 ]
  %.4229305 = phi i64 [ %.5230.lcssa, %._crit_edge301 ], [ 1, %.preheader254 ]
  %240 = icmp slt i64 %.3307, %239
  br i1 %240, label %.lr.ph300, label %._crit_edge301

.lr.ph300:                                        ; preds = %.preheader253
  %241 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %.0210308
  %242 = getelementptr inbounds [200000 x i64], ptr @BZsfx, i64 0, i64 %.0210308
  br label %260

._crit_edge309:                                   ; preds = %._crit_edge301, %._crit_edge276, %.preheader254
  %243 = phi i64 [ %171, %.preheader254 ], [ %.pre333.pre, %._crit_edge276 ], [ %248, %._crit_edge301 ]
  %244 = getelementptr inbounds i64, ptr @I, i64 %243
  call void @"_ZSt4sortIPxZ4mainE3$_1EvT_S2_T0_"(ptr noundef nonnull @I, ptr noundef nonnull %244)
  %245 = load i64, ptr @K, align 8, !tbaa !8
  %246 = icmp sgt i64 %245, 0
  br i1 %246, label %.lr.ph327, label %._crit_edge328

._crit_edge301.loopexit:                          ; preds = %296
  %.pre332 = load i64, ptr %1, align 8, !tbaa !8
  br label %._crit_edge301

._crit_edge301:                                   ; preds = %._crit_edge301.loopexit, %.preheader253
  %247 = phi i64 [ %238, %.preheader253 ], [ %.pre332, %._crit_edge301.loopexit ]
  %248 = phi i64 [ %239, %.preheader253 ], [ %298, %._crit_edge301.loopexit ]
  %.5230.lcssa = phi i64 [ %.4229305, %.preheader253 ], [ %.7232, %._crit_edge301.loopexit ]
  %.5220.lcssa = phi i64 [ %.4219306, %.preheader253 ], [ %.7, %._crit_edge301.loopexit ]
  %.4.lcssa = phi i64 [ %.3307, %.preheader253 ], [ %.5, %._crit_edge301.loopexit ]
  %249 = getelementptr inbounds [200000 x i64], ptr @BZsfx, i64 0, i64 %.0210308
  %250 = load i64, ptr %249, align 8, !tbaa !8
  %251 = add nsw i64 %250, %.5220.lcssa
  store i64 %251, ptr %249, align 8, !tbaa !8
  %252 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %.0210308
  %253 = load i64, ptr %252, align 8, !tbaa !8
  %254 = mul nsw i64 %253, %.5230.lcssa
  %255 = load i64, ptr @MOD, align 8, !tbaa !8
  %256 = srem i64 %254, %255
  store i64 %256, ptr %252, align 8, !tbaa !8
  %257 = add nuw nsw i64 %.0210308, 1
  %258 = shl nsw i64 %247, 1
  %259 = icmp slt i64 %257, %258
  br i1 %259, label %.preheader253, label %._crit_edge309, !llvm.loop !24

260:                                              ; preds = %.lr.ph300, %296
  %.0209299 = phi i64 [ %.3307, %.lr.ph300 ], [ %297, %296 ]
  %.4298 = phi i64 [ %.3307, %.lr.ph300 ], [ %.5, %296 ]
  %.5220297 = phi i64 [ %.4219306, %.lr.ph300 ], [ %.7, %296 ]
  %.5230296 = phi i64 [ %.4229305, %.lr.ph300 ], [ %.7232, %296 ]
  %261 = getelementptr inbounds [50000 x i64], ptr @I, i64 0, i64 %.0209299
  %262 = load i64, ptr %261, align 8, !tbaa !8
  %263 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %262
  %264 = load i64, ptr %263, align 8, !tbaa !8
  %265 = shl nsw i64 %264, 1
  %.not = icmp sgt i64 %265, %.0210308
  br i1 %.not, label %281, label %266

266:                                              ; preds = %260
  %267 = add nsw i64 %.4298, 1
  %268 = add nsw i64 %265, -1
  %269 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %262
  %270 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %269, i64 noundef %268) #7
  %271 = load i64, ptr %270, align 8, !tbaa !8
  %272 = icmp eq i64 %271, 0
  br i1 %272, label %273, label %275

273:                                              ; preds = %266
  %274 = add nsw i64 %.5220297, 1
  br label %296

275:                                              ; preds = %266
  %276 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %269, i64 noundef %268) #7
  %277 = load i64, ptr %276, align 8, !tbaa !8
  %278 = mul nsw i64 %277, %.5230296
  %279 = load i64, ptr @MOD, align 8, !tbaa !8
  %280 = srem i64 %278, %279
  br label %296

281:                                              ; preds = %260
  %282 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %262
  %283 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %282, i64 noundef %.0210308) #7
  %284 = load i64, ptr %283, align 8, !tbaa !8
  %285 = icmp eq i64 %284, 0
  br i1 %285, label %286, label %289

286:                                              ; preds = %281
  %287 = load i64, ptr %242, align 8, !tbaa !8
  %288 = add nsw i64 %287, 1
  store i64 %288, ptr %242, align 8, !tbaa !8
  br label %296

289:                                              ; preds = %281
  %290 = load i64, ptr %241, align 8, !tbaa !8
  %291 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %282, i64 noundef %.0210308) #7
  %292 = load i64, ptr %291, align 8, !tbaa !8
  %293 = mul nsw i64 %292, %290
  %294 = load i64, ptr @MOD, align 8, !tbaa !8
  %295 = srem i64 %293, %294
  store i64 %295, ptr %241, align 8, !tbaa !8
  br label %296

296:                                              ; preds = %273, %275, %286, %289
  %.7232 = phi i64 [ %.5230296, %286 ], [ %.5230296, %289 ], [ %.5230296, %273 ], [ %280, %275 ]
  %.7 = phi i64 [ %.5220297, %286 ], [ %.5220297, %289 ], [ %274, %273 ], [ %.5220297, %275 ]
  %.5 = phi i64 [ %.4298, %286 ], [ %.4298, %289 ], [ %267, %273 ], [ %267, %275 ]
  %297 = add nsw i64 %.0209299, 1
  %298 = load i64, ptr @K, align 8, !tbaa !8
  %299 = icmp slt i64 %297, %298
  br i1 %299, label %260, label %._crit_edge301.loopexit, !llvm.loop !25

._crit_edge328:                                   ; preds = %._crit_edge323, %._crit_edge309
  %.0206.lcssa = phi i64 [ 0, %._crit_edge309 ], [ %.1.lcssa339342, %._crit_edge323 ]
  %300 = load i64, ptr @MOD, align 8, !tbaa !8
  %301 = srem i64 %.0206.lcssa, %300
  %302 = add nsw i64 %301, %300
  %303 = srem i64 %302, %300
  %304 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %303)
  %305 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %304, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

.lr.ph327:                                        ; preds = %._crit_edge309, %._crit_edge323
  %.0202325 = phi i64 [ %417, %._crit_edge323 ], [ 0, %._crit_edge309 ]
  %.0206324 = phi i64 [ %.1.lcssa339342, %._crit_edge323 ], [ 0, %._crit_edge309 ]
  %306 = getelementptr inbounds [50000 x i64], ptr @I, i64 0, i64 %.0202325
  %307 = load i64, ptr %306, align 8, !tbaa !8
  %308 = getelementptr inbounds [50000 x i64], ptr @N, i64 0, i64 %307
  %309 = load i64, ptr %308, align 8, !tbaa !8
  %310 = icmp sgt i64 %309, 0
  br i1 %310, label %.lr.ph312, label %._crit_edge323

.lr.ph312:                                        ; preds = %.lr.ph327
  %311 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %307
  br label %314

.preheader252:                                    ; preds = %331
  %312 = icmp sgt i64 %333, 0
  br i1 %312, label %.lr.ph314, label %._crit_edge323

.lr.ph314:                                        ; preds = %.preheader252
  %313 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %307
  br label %339

314:                                              ; preds = %.lr.ph312, %331
  %.0201310 = phi i64 [ 0, %.lr.ph312 ], [ %332, %331 ]
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %311, i64 noundef %.0201310) #7
  %316 = load i64, ptr %315, align 8, !tbaa !8
  %317 = icmp eq i64 %316, 0
  br i1 %317, label %318, label %322

318:                                              ; preds = %314
  %319 = getelementptr inbounds [200000 x i64], ptr @Zsfx, i64 0, i64 %.0201310
  %320 = load i64, ptr %319, align 8, !tbaa !8
  %321 = add nsw i64 %320, -1
  store i64 %321, ptr %319, align 8, !tbaa !8
  br label %331

322:                                              ; preds = %314
  %323 = getelementptr inbounds [200000 x i64], ptr @Csfx, i64 0, i64 %.0201310
  %324 = load i64, ptr %323, align 8, !tbaa !8
  %325 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %311, i64 noundef %.0201310) #7
  %326 = load i64, ptr %325, align 8, !tbaa !8
  %327 = call noundef i64 @_Z3invx(i64 noundef %326)
  %328 = mul nsw i64 %327, %324
  %329 = load i64, ptr @MOD, align 8, !tbaa !8
  %330 = srem i64 %328, %329
  store i64 %330, ptr %323, align 8, !tbaa !8
  br label %331

331:                                              ; preds = %322, %318
  %332 = add nuw nsw i64 %.0201310, 1
  %333 = load i64, ptr %308, align 8, !tbaa !8
  %334 = shl nsw i64 %333, 1
  %335 = icmp slt i64 %332, %334
  br i1 %335, label %314, label %.preheader252, !llvm.loop !26

.preheader251:                                    ; preds = %356
  %336 = icmp sgt i64 %358, 0
  br i1 %336, label %.lr.ph317, label %._crit_edge323

.lr.ph317:                                        ; preds = %.preheader251
  %337 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @E, i64 0, i64 %307
  %338 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @O, i64 0, i64 %307
  br label %363

339:                                              ; preds = %.lr.ph314, %356
  %.0200313 = phi i64 [ 0, %.lr.ph314 ], [ %357, %356 ]
  %340 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %313, i64 noundef %.0200313) #7
  %341 = load i64, ptr %340, align 8, !tbaa !8
  %342 = icmp eq i64 %341, 0
  br i1 %342, label %343, label %347

343:                                              ; preds = %339
  %344 = getelementptr inbounds [200000 x i64], ptr @BZsfx, i64 0, i64 %.0200313
  %345 = load i64, ptr %344, align 8, !tbaa !8
  %346 = add nsw i64 %345, -1
  store i64 %346, ptr %344, align 8, !tbaa !8
  br label %356

347:                                              ; preds = %339
  %348 = getelementptr inbounds [200000 x i64], ptr @Bsfx, i64 0, i64 %.0200313
  %349 = load i64, ptr %348, align 8, !tbaa !8
  %350 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %313, i64 noundef %.0200313) #7
  %351 = load i64, ptr %350, align 8, !tbaa !8
  %352 = call noundef i64 @_Z3invx(i64 noundef %351)
  %353 = mul nsw i64 %352, %349
  %354 = load i64, ptr @MOD, align 8, !tbaa !8
  %355 = srem i64 %353, %354
  store i64 %355, ptr %348, align 8, !tbaa !8
  br label %356

356:                                              ; preds = %347, %343
  %357 = add nuw nsw i64 %.0200313, 1
  %358 = load i64, ptr %308, align 8, !tbaa !8
  %359 = shl nsw i64 %358, 1
  %360 = icmp slt i64 %357, %359
  br i1 %360, label %339, label %.preheader251, !llvm.loop !27

.preheader250:                                    ; preds = %371
  %361 = icmp sgt i64 %392, 0
  br i1 %361, label %.lr.ph320, label %._crit_edge323

.lr.ph320:                                        ; preds = %.preheader250
  %362 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfx, i64 0, i64 %307
  br label %396

363:                                              ; preds = %.lr.ph317, %371
  %.0199316 = phi i64 [ 0, %.lr.ph317 ], [ %391, %371 ]
  %.1315 = phi i64 [ %.0206324, %.lr.ph317 ], [ %390, %371 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  %364 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %337, i64 noundef %.0199316) #7
  %365 = load i64, ptr %364, align 8, !tbaa !8
  store i64 %365, ptr %23, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #7
  %366 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %338, i64 noundef %.0199316) #7
  %367 = load i64, ptr %366, align 8, !tbaa !8
  store i64 %367, ptr %24, align 8, !tbaa !8
  %368 = load i64, ptr %23, align 8, !tbaa !8
  %369 = icmp sgt i64 %368, %367
  br i1 %369, label %370, label %371

370:                                              ; preds = %363
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  %.pre334 = load i64, ptr %23, align 8, !tbaa !8
  br label %371

371:                                              ; preds = %370, %363
  %372 = phi i64 [ %.pre334, %370 ], [ %368, %363 ]
  %373 = call noundef i64 @_Z4calcxxRA200000_xS0_S0_S0_x(i64 noundef %.0202325, i64 noundef %372, ptr noundef nonnull align 8 dereferenceable(1600000) @Csfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Cpfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Zsfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Zpfx, i64 noundef 2)
  %374 = mul nsw i64 %373, %372
  %375 = load i64, ptr @MOD, align 8, !tbaa !8
  %376 = srem i64 %374, %375
  %377 = add nsw i64 %376, %.1315
  %378 = load i64, ptr %24, align 8, !tbaa !8
  %379 = call noundef i64 @_Z4calcxxRA200000_xS0_S0_S0_x(i64 noundef %.0202325, i64 noundef %378, ptr noundef nonnull align 8 dereferenceable(1600000) @Csfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Cpfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Zsfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Zpfx, i64 noundef 2)
  %380 = mul nsw i64 %379, %378
  %381 = load i64, ptr @MOD, align 8, !tbaa !8
  %382 = srem i64 %380, %381
  %383 = add nsw i64 %377, %382
  %384 = load i64, ptr %24, align 8, !tbaa !8
  %385 = call noundef i64 @_Z4calcxxRA200000_xS0_S0_S0_x(i64 noundef %.0202325, i64 noundef %384, ptr noundef nonnull align 8 dereferenceable(1600000) @Bsfx, ptr noundef nonnull align 8 dereferenceable(1600000) @Bpfx, ptr noundef nonnull align 8 dereferenceable(1600000) @BZsfx, ptr noundef nonnull align 8 dereferenceable(1600000) @BZpfx, i64 noundef 1)
  %386 = mul nsw i64 %385, %384
  %387 = load i64, ptr @MOD, align 8, !tbaa !8
  %388 = srem i64 %386, %387
  %389 = sub i64 %383, %388
  %390 = srem i64 %389, %387
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  %391 = add nuw nsw i64 %.0199316, 1
  %392 = load i64, ptr %308, align 8, !tbaa !8
  %393 = icmp slt i64 %391, %392
  br i1 %393, label %363, label %.preheader250, !llvm.loop !28

.preheader:                                       ; preds = %412
  %394 = icmp sgt i64 %414, 0
  br i1 %394, label %.lr.ph322, label %._crit_edge323

.lr.ph322:                                        ; preds = %.preheader
  %395 = getelementptr inbounds [50000 x %"class.std::vector.0"], ptr @pfxB, i64 0, i64 %307
  br label %420

396:                                              ; preds = %.lr.ph320, %412
  %.0197319 = phi i64 [ 0, %.lr.ph320 ], [ %413, %412 ]
  %397 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %362, i64 noundef %.0197319) #7
  %398 = load i64, ptr %397, align 8, !tbaa !8
  %399 = icmp eq i64 %398, 0
  br i1 %399, label %400, label %404

400:                                              ; preds = %396
  %401 = getelementptr inbounds [200000 x i64], ptr @Zpfx, i64 0, i64 %.0197319
  %402 = load i64, ptr %401, align 8, !tbaa !8
  %403 = add nsw i64 %402, 1
  store i64 %403, ptr %401, align 8, !tbaa !8
  br label %412

404:                                              ; preds = %396
  %405 = getelementptr inbounds [200000 x i64], ptr @Cpfx, i64 0, i64 %.0197319
  %406 = load i64, ptr %405, align 8, !tbaa !8
  %407 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %362, i64 noundef %.0197319) #7
  %408 = load i64, ptr %407, align 8, !tbaa !8
  %409 = mul nsw i64 %408, %406
  %410 = load i64, ptr @MOD, align 8, !tbaa !8
  %411 = srem i64 %409, %410
  store i64 %411, ptr %405, align 8, !tbaa !8
  br label %412

412:                                              ; preds = %404, %400
  %413 = add nuw nsw i64 %.0197319, 1
  %414 = load i64, ptr %308, align 8, !tbaa !8
  %415 = shl nsw i64 %414, 1
  %416 = icmp slt i64 %413, %415
  br i1 %416, label %396, label %.preheader, !llvm.loop !29

._crit_edge323:                                   ; preds = %436, %.lr.ph327, %.preheader252, %.preheader251, %.preheader250, %.preheader
  %.1.lcssa339342 = phi i64 [ %390, %.preheader ], [ %390, %.preheader250 ], [ %.0206324, %.preheader251 ], [ %.0206324, %.preheader252 ], [ %.0206324, %.lr.ph327 ], [ %390, %436 ]
  %417 = add nuw nsw i64 %.0202325, 1
  %418 = load i64, ptr @K, align 8, !tbaa !8
  %419 = icmp slt i64 %417, %418
  br i1 %419, label %.lr.ph327, label %._crit_edge328, !llvm.loop !30

420:                                              ; preds = %.lr.ph322, %436
  %.0321 = phi i64 [ 0, %.lr.ph322 ], [ %437, %436 ]
  %421 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %395, i64 noundef %.0321) #7
  %422 = load i64, ptr %421, align 8, !tbaa !8
  %423 = icmp eq i64 %422, 0
  br i1 %423, label %424, label %428

424:                                              ; preds = %420
  %425 = getelementptr inbounds [200000 x i64], ptr @BZpfx, i64 0, i64 %.0321
  %426 = load i64, ptr %425, align 8, !tbaa !8
  %427 = add nsw i64 %426, 1
  store i64 %427, ptr %425, align 8, !tbaa !8
  br label %436

428:                                              ; preds = %420
  %429 = getelementptr inbounds [200000 x i64], ptr @Bpfx, i64 0, i64 %.0321
  %430 = load i64, ptr %429, align 8, !tbaa !8
  %431 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %395, i64 noundef %.0321) #7
  %432 = load i64, ptr %431, align 8, !tbaa !8
  %433 = mul nsw i64 %432, %430
  %434 = load i64, ptr @MOD, align 8, !tbaa !8
  %435 = srem i64 %433, %434
  store i64 %435, ptr %429, align 8, !tbaa !8
  br label %436

436:                                              ; preds = %428, %424
  %437 = add nuw nsw i64 %.0321, 1
  %438 = load i64, ptr %308, align 8, !tbaa !8
  %439 = shl nsw i64 %438, 1
  %440 = icmp slt i64 %437, %439
  br i1 %440, label %420, label %._crit_edge323, !llvm.loop !31
}

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

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

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

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

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

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

; 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(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIxxESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

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

; 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 void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !9, i64 0}
!16 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!17 = !{!16, !9, i64 8}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}


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