; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2019-20/Feb/Plat (help_NKlogN+K^2)

; 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::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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.mi = type { i32 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.8" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::array" = type { [11 x %struct.mi] }
%"struct.std::pair" = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@v = external dso_local global %"class.std::vector", align 8
@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@lazy = external dso_local global [262144 x %struct.mi], align 16
@y = external dso_local global %"class.std::vector.3", align 8
@part = external dso_local global [11 x [11 x %struct.mi]], align 16
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Zpl2miS_(i32, i32) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Zml2miS_(i32, i32) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt5arrayI2miLm11EEC2Ev(ptr noundef nonnull align 4 dereferenceable(44)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm11EEixEm(ptr noundef nonnull align 4 dereferenceable(44), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3updiRKSt5arrayI2miLm11EEiii(i32 noundef, ptr noundef nonnull align 4 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5queryiiRSt5arrayI2miLm11EEiii(i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) #0

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #7 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.mi, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"struct.std::array", align 4
  %17 = alloca %struct.mi, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %21 = alloca %"struct.std::pair", align 4
  %22 = alloca %"struct.std::array", align 4
  %23 = alloca %struct.mi, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %struct.mi, align 4
  %28 = alloca %struct.mi, align 4
  %29 = alloca %struct.mi, align 4
  %30 = alloca %struct.mi, align 4
  %31 = alloca %struct.mi, align 4
  %32 = alloca %struct.mi, align 4
  %33 = alloca %struct.mi, align 4
  %34 = alloca %struct.mi, align 4
  %35 = alloca %struct.mi, align 4
  %36 = alloca i32, align 4
  %37 = alloca %struct.mi, align 4
  %38 = alloca %struct.mi, align 4
  %39 = alloca %struct.mi, align 4
  %40 = alloca %struct.mi, align 4
  %41 = alloca %struct.mi, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %42 unwind label %48

42:                                               ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %43 unwind label %52

43:                                               ; preds = %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %61, %43
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = icmp slt i32 %45, 262144
  br i1 %46, label %57, label %47

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

48:                                               ; preds = %0
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %4, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %5, align 4
  br label %56

52:                                               ; preds = %42
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %4, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #9
  br label %56

56:                                               ; preds = %52, %48
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #9
  br label %243

57:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %7, i64 noundef 1)
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [262144 x %struct.mi], ptr @lazy, i64 0, i64 %59
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %60, ptr align 4 %7, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %61

61:                                               ; preds = %57
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %6, align 4, !tbaa !5
  br label %44, !llvm.loop !10

64:                                               ; preds = %47
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %67 = load i32, ptr @N, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %68)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  store ptr @v, ptr %8, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %69 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #9
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %9, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %71 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #9
  %72 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %10, i32 0, i32 0
  store ptr %71, ptr %72, align 8
  br label %73

73:                                               ; preds = %86, %64
  %74 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  br i1 %74, label %76, label %75

75:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %88

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %77 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  store ptr %77, ptr %11, align 8, !tbaa !12
  %78 = load ptr, ptr %11, align 8, !tbaa !12
  %79 = getelementptr inbounds %"struct.std::pair", ptr %78, i32 0, i32 0
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %79)
  %81 = load ptr, ptr %11, align 8, !tbaa !12
  %82 = getelementptr inbounds %"struct.std::pair", ptr %81, i32 0, i32 1
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %80, ptr noundef nonnull align 4 dereferenceable(4) %82)
  %84 = load ptr, ptr %11, align 8, !tbaa !12
  %85 = getelementptr inbounds %"struct.std::pair", ptr %84, i32 0, i32 1
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @y, ptr noundef nonnull align 4 dereferenceable(4) %85)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %86

86:                                               ; preds = %76
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #9
  br label %73

88:                                               ; preds = %75
  %89 = call ptr @_ZSt5beginISt6vectorISt4pairIiiESaIS2_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) @v)
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %12, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  %91 = call ptr @_ZSt3endISt6vectorISt4pairIiiESaIS2_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) @v)
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %13, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %12, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %13, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %94, ptr %96)
  %97 = call ptr @_ZSt5beginISt6vectorIiSaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) @y)
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %97, ptr %98, align 8
  %99 = call ptr @_ZSt3endISt6vectorIiSaIiEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) @y)
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %102, ptr %104)
  call void @llvm.lifetime.start.p0(i64 44, ptr %16) #9
  call void @llvm.memset.p0.i64(ptr align 4 %16, i8 0, i64 44, i1 false)
  call void @_ZNSt5arrayI2miLm11EEC2Ev(ptr noundef nonnull align 4 dereferenceable(44) %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %17, i64 noundef 1)
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm11EEixEm(ptr noundef nonnull align 4 dereferenceable(44) %16, i64 noundef 0) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %105, ptr align 4 %17, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  %106 = load i32, ptr @N, align 4, !tbaa !5
  call void @_Z3updiRKSt5arrayI2miLm11EEiii(i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(44) %16, i32 noundef 1, i32 noundef 0, i32 noundef %106)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  store ptr @v, ptr %18, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %107 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #9
  %108 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %19, i32 0, i32 0
  store ptr %107, ptr %108, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %109 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #9
  %110 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %20, i32 0, i32 0
  store ptr %109, ptr %110, align 8
  br label %111

111:                                              ; preds = %120, %88
  %112 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  br i1 %112, label %114, label %113

113:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %122

114:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %115 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %115, i64 8, i1 false)
  %116 = getelementptr inbounds %"struct.std::pair", ptr %21, i32 0, i32 0
  %117 = load i32, ptr %116, align 4, !tbaa !14
  %118 = getelementptr inbounds %"struct.std::pair", ptr %21, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !16
  call void @_Z2adii(i32 noundef %117, i32 noundef %119)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %120

120:                                              ; preds = %114
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  br label %111

122:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 44, ptr %22) #9
  call void @llvm.memset.p0.i64(ptr align 4 %22, i8 0, i64 44, i1 false)
  call void @_ZNSt5arrayI2miLm11EEC2Ev(ptr noundef nonnull align 4 dereferenceable(44) %22)
  %123 = load i32, ptr @N, align 4, !tbaa !5
  %124 = load i32, ptr @N, align 4, !tbaa !5
  call void @_Z5queryiiRSt5arrayI2miLm11EEiii(i32 noundef 0, i32 noundef %123, ptr noundef nonnull align 4 dereferenceable(44) %22, i32 noundef 1, i32 noundef 0, i32 noundef %124)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %23, i64 noundef 1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @part, ptr align 4 %23, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %203, %122
  %126 = load i32, ptr %24, align 4, !tbaa !5
  %127 = load i32, ptr @K, align 4, !tbaa !5
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 9, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %206

130:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %199, %130
  %132 = load i32, ptr %26, align 4, !tbaa !5
  %133 = load i32, ptr %24, align 4, !tbaa !5
  %134 = icmp sle i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  store i32 12, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %202

136:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %137 = load i32, ptr %24, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %139
  %141 = load i32, ptr %26, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [11 x %struct.mi], ptr %140, i64 0, i64 %142
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %143, i64 4, i1 false), !tbaa.struct !9
  %144 = load i32, ptr %26, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %30, i64 noundef %145)
  %146 = load i32, ptr %24, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %147
  %149 = load i32, ptr %26, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [11 x %struct.mi], ptr %148, i64 0, i64 %150
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %151, i64 4, i1 false), !tbaa.struct !9
  %152 = getelementptr inbounds %struct.mi, ptr %30, i32 0, i32 0
  %153 = load i32, ptr %152, align 4
  %154 = getelementptr inbounds %struct.mi, ptr %31, i32 0, i32 0
  %155 = load i32, ptr %154, align 4
  %156 = call i32 @_Zml2miS_(i32 %153, i32 %155)
  %157 = getelementptr inbounds %struct.mi, ptr %29, i32 0, i32 0
  store i32 %156, ptr %157, align 4
  %158 = getelementptr inbounds %struct.mi, ptr %28, i32 0, i32 0
  %159 = load i32, ptr %158, align 4
  %160 = getelementptr inbounds %struct.mi, ptr %29, i32 0, i32 0
  %161 = load i32, ptr %160, align 4
  %162 = call i32 @_Zpl2miS_(i32 %159, i32 %161)
  %163 = getelementptr inbounds %struct.mi, ptr %27, i32 0, i32 0
  store i32 %162, ptr %163, align 4
  %164 = load i32, ptr %24, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %166
  %168 = load i32, ptr %26, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [11 x %struct.mi], ptr %167, i64 0, i64 %169
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %170, ptr align 4 %27, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %171 = load i32, ptr %24, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %173
  %175 = load i32, ptr %26, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [11 x %struct.mi], ptr %174, i64 0, i64 %177
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %178, i64 4, i1 false), !tbaa.struct !9
  %179 = load i32, ptr %24, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %180
  %182 = load i32, ptr %26, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [11 x %struct.mi], ptr %181, i64 0, i64 %183
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %184, i64 4, i1 false), !tbaa.struct !9
  %185 = getelementptr inbounds %struct.mi, ptr %33, i32 0, i32 0
  %186 = load i32, ptr %185, align 4
  %187 = getelementptr inbounds %struct.mi, ptr %34, i32 0, i32 0
  %188 = load i32, ptr %187, align 4
  %189 = call i32 @_Zpl2miS_(i32 %186, i32 %188)
  %190 = getelementptr inbounds %struct.mi, ptr %32, i32 0, i32 0
  store i32 %189, ptr %190, align 4
  %191 = load i32, ptr %24, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %193
  %195 = load i32, ptr %26, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [11 x %struct.mi], ptr %194, i64 0, i64 %197
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %198, ptr align 4 %32, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %199

199:                                              ; preds = %136
  %200 = load i32, ptr %26, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %26, align 4, !tbaa !5
  br label %131, !llvm.loop !17

202:                                              ; preds = %135
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %24, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %24, align 4, !tbaa !5
  br label %125, !llvm.loop !18

206:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %35, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  store i32 0, ptr %36, align 4, !tbaa !5
  br label %207

207:                                              ; preds = %234, %206
  %208 = load i32, ptr %36, align 4, !tbaa !5
  %209 = load i32, ptr @K, align 4, !tbaa !5
  %210 = icmp sle i32 %208, %209
  br i1 %210, label %212, label %211

211:                                              ; preds = %207
  store i32 15, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %237

212:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %35, i64 4, i1 false), !tbaa.struct !9
  %213 = load i32, ptr %36, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm11EEixEm(ptr noundef nonnull align 4 dereferenceable(44) %22, i64 noundef %214) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %215, i64 4, i1 false), !tbaa.struct !9
  %216 = load i32, ptr @K, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %217
  %219 = load i32, ptr %36, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [11 x %struct.mi], ptr %218, i64 0, i64 %220
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %221, i64 4, i1 false), !tbaa.struct !9
  %222 = getelementptr inbounds %struct.mi, ptr %40, i32 0, i32 0
  %223 = load i32, ptr %222, align 4
  %224 = getelementptr inbounds %struct.mi, ptr %41, i32 0, i32 0
  %225 = load i32, ptr %224, align 4
  %226 = call i32 @_Zml2miS_(i32 %223, i32 %225)
  %227 = getelementptr inbounds %struct.mi, ptr %39, i32 0, i32 0
  store i32 %226, ptr %227, align 4
  %228 = getelementptr inbounds %struct.mi, ptr %38, i32 0, i32 0
  %229 = load i32, ptr %228, align 4
  %230 = getelementptr inbounds %struct.mi, ptr %39, i32 0, i32 0
  %231 = load i32, ptr %230, align 4
  %232 = call i32 @_Zpl2miS_(i32 %229, i32 %231)
  %233 = getelementptr inbounds %struct.mi, ptr %37, i32 0, i32 0
  store i32 %232, ptr %233, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %37, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  br label %234

234:                                              ; preds = %212
  %235 = load i32, ptr %36, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %36, align 4, !tbaa !5
  br label %207, !llvm.loop !19

237:                                              ; preds = %211
  %238 = getelementptr inbounds %struct.mi, ptr %35, i32 0, i32 0
  %239 = load i32, ptr %238, align 4, !tbaa !20
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %239)
  %241 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %240, ptr noundef @.str.12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 44, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 44, ptr %16) #9
  %242 = load i32, ptr %1, align 4
  ret i32 %242

243:                                              ; preds = %56
  %244 = load ptr, ptr %4, align 8
  %245 = load i32, ptr %5, align 4
  %246 = insertvalue { ptr, i32 } poison, ptr %244, 0
  %247 = insertvalue { ptr, i32 } %246, i32 %245, 1
  resume { ptr, i32 } %247
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; 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::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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.mi = type { i32 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.8" = type { ptr }
%"struct.std::array" = type { [11 x %struct.mi] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@v = external dso_local global %"class.std::vector", align 8
@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@lazy = external dso_local local_unnamed_addr global [262144 x %struct.mi], align 16
@y = external dso_local global %"class.std::vector.3", align 8
@part = external dso_local local_unnamed_addr global [11 x [11 x %struct.mi]], align 16
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; 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 uwtable
declare dso_local i32 @_Zpl2miS_(i32, i32) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4), i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Zml2miS_(i32, i32) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt5arrayI2miLm11EEC2Ev(ptr noundef nonnull align 4 dereferenceable(44)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm11EEixEm(ptr noundef nonnull align 4 dereferenceable(44), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3updiRKSt5arrayI2miLm11EEiii(i32 noundef, ptr noundef nonnull align 4 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5queryiiRSt5arrayI2miLm11EEiii(i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(44), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @_ZSt5beginISt6vectorIiSaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @_ZSt3endISt6vectorIiSaIiEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca %struct.mi, align 4
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %6 = alloca %"struct.std::array", align 4
  %7 = alloca %struct.mi, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %10 = alloca %"struct.std::array", align 4
  %11 = alloca %struct.mi, align 4
  %12 = alloca %struct.mi, align 4
  %13 = alloca %struct.mi, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %14 unwind label %24

14:                                               ; preds = %0
  invoke void @_Z5setIONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %15 unwind label %26

15:                                               ; preds = %14
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8
  br label %29

16:                                               ; preds = %29
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %19 = load i32, ptr @N, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %21 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  store ptr %21, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %22 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  store ptr %22, ptr %5, align 8
  %23 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %23, label %.lr.ph, label %._crit_edge

24:                                               ; preds = %0
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %14
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn

29:                                               ; preds = %15, %29
  %indvars.iv = phi i64 [ 1, %15 ], [ %indvars.iv.next, %29 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %3, i64 noundef 1)
  %30 = getelementptr inbounds [262144 x %struct.mi], ptr @lazy, i64 0, i64 %indvars.iv
  %31 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %31, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 262144
  br i1 %exitcond.not, label %16, label %29, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %32 = call ptr @_ZSt5beginISt6vectorISt4pairIiiESaIS2_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) @v)
  %33 = call ptr @_ZSt3endISt6vectorISt4pairIiiESaIS2_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) @v)
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %32, ptr %33)
  %34 = call ptr @_ZSt5beginISt6vectorIiSaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) @y)
  %35 = call ptr @_ZSt3endISt6vectorIiSaIiEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) @y)
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %34, ptr %35)
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(44) %6, i8 0, i64 44, i1 false)
  call void @_ZNSt5arrayI2miLm11EEC2Ev(ptr noundef nonnull align 4 dereferenceable(44) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %7, i64 noundef 1)
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm11EEixEm(ptr noundef nonnull align 4 dereferenceable(44) %6, i64 noundef 0) #8
  %37 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %37, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %38 = load i32, ptr @N, align 4, !tbaa !5
  call void @_Z3updiRKSt5arrayI2miLm11EEiii(i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(44) %6, i32 noundef 1, i32 noundef 0, i32 noundef %38)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %39 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  store ptr %39, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %40 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  store ptr %40, ptr %9, align 8
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %41, label %.lr.ph55, label %._crit_edge56

.lr.ph:                                           ; preds = %16, %.lr.ph
  %42 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %44 = getelementptr inbounds i8, ptr %42, i64 4
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(4) %44)
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @y, ptr noundef nonnull align 4 dereferenceable(4) %44)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %47, label %.lr.ph, label %._crit_edge

._crit_edge56:                                    ; preds = %.lr.ph55, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %10) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(44) %10, i8 0, i64 44, i1 false)
  call void @_ZNSt5arrayI2miLm11EEC2Ev(ptr noundef nonnull align 4 dereferenceable(44) %10)
  %48 = load i32, ptr @N, align 4, !tbaa !5
  call void @_Z5queryiiRSt5arrayI2miLm11EEiii(i32 noundef 0, i32 noundef %48, ptr noundef nonnull align 4 dereferenceable(44) %10, i32 noundef 1, i32 noundef 0, i32 noundef %48)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %11, i64 noundef 1)
  %49 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %49, ptr @part, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %50 = load i32, ptr @K, align 4, !tbaa !5
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %.preheader, label %._crit_edge59

.lr.ph55:                                         ; preds = %._crit_edge, %.lr.ph55
  %52 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %.sroa.033.0.copyload = load i32, ptr %52, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 4
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 4
  call void @_Z2adii(i32 noundef %.sroa.033.0.copyload, i32 noundef %.sroa.4.0.copyload)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %54, label %.lr.ph55, label %._crit_edge56

.preheader:                                       ; preds = %._crit_edge56, %56
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %56 ], [ 0, %._crit_edge56 ]
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %56 ], [ 1, %._crit_edge56 ]
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %.phi.trans.insert = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %indvars.iv.next75, i64 0
  %.sroa.013.0.copyload.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br label %60

._crit_edge59:                                    ; preds = %56, %._crit_edge56
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %13, i64 noundef 0)
  %55 = load i32, ptr @K, align 4, !tbaa !5
  %.not60 = icmp slt i32 %55, 0
  %.pre = load i32, ptr %13, align 4, !tbaa !5
  br i1 %.not60, label %._crit_edge64, label %.lr.ph63

56:                                               ; preds = %60
  %57 = load i32, ptr @K, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = icmp slt i64 %indvars.iv.next75, %58
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  br i1 %59, label %.preheader, label %._crit_edge59, !llvm.loop !11

60:                                               ; preds = %.preheader, %60
  %.sroa.013.0.copyload = phi i32 [ %.sroa.013.0.copyload.pre, %.preheader ], [ %67, %60 ]
  %indvars.iv66 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next67, %60 ]
  %61 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %indvars.iv.next75, i64 %indvars.iv66
  call void @_ZN2miC2Ex(ptr noundef nonnull align 4 dereferenceable(4) %12, i64 noundef %indvars.iv66)
  %62 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %indvars.iv74, i64 %indvars.iv66
  %.sroa.011.0.copyload = load i32, ptr %62, align 4, !tbaa !5
  %63 = load i32, ptr %12, align 4
  %64 = call i32 @_Zml2miS_(i32 %63, i32 %.sroa.011.0.copyload)
  %65 = call i32 @_Zpl2miS_(i32 %.sroa.013.0.copyload, i32 %64)
  store i32 %65, ptr %61, align 4, !tbaa !5
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %66 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %indvars.iv.next75, i64 %indvars.iv.next67
  %.sroa.09.0.copyload = load i32, ptr %66, align 4, !tbaa !5
  %.sroa.08.0.copyload = load i32, ptr %62, align 4, !tbaa !5
  %67 = call i32 @_Zpl2miS_(i32 %.sroa.09.0.copyload, i32 %.sroa.08.0.copyload)
  store i32 %67, ptr %66, align 4, !tbaa !5
  %exitcond71.not = icmp eq i64 %indvars.iv.next67, %indvars.iv72
  br i1 %exitcond71.not, label %56, label %60, !llvm.loop !12

._crit_edge64:                                    ; preds = %.lr.ph63, %._crit_edge59
  %68 = phi i32 [ %.pre, %._crit_edge59 ], [ %76, %.lr.ph63 ]
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %68)
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @.str.12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %6) #8
  ret i32 0

.lr.ph63:                                         ; preds = %._crit_edge59, %.lr.ph63
  %.sroa.03.0.copyload = phi i32 [ %76, %.lr.ph63 ], [ %.pre, %._crit_edge59 ]
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph63 ], [ 0, %._crit_edge59 ]
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayI2miLm11EEixEm(ptr noundef nonnull align 4 dereferenceable(44) %10, i64 noundef %indvars.iv79) #8
  %.sroa.01.0.copyload = load i32, ptr %71, align 4, !tbaa !5
  %72 = load i32, ptr @K, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [11 x [11 x %struct.mi]], ptr @part, i64 0, i64 %73, i64 %indvars.iv79
  %.sroa.0.0.copyload = load i32, ptr %74, align 4, !tbaa !5
  %75 = call i32 @_Zml2miS_(i32 %.sroa.01.0.copyload, i32 %.sroa.0.0.copyload)
  %76 = call i32 @_Zpl2miS_(i32 %.sroa.03.0.copyload, i32 %75)
  store i32 %76, ptr %13, align 4, !tbaa !5
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %77 = load i32, ptr @K, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %.not.not = icmp slt i64 %indvars.iv79, %78
  br i1 %.not.not, label %.lr.ph63, label %._crit_edge64, !llvm.loop !13
}

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @_ZSt5beginISt6vectorISt4pairIiiESaIS2_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @_ZSt3endISt6vectorISt4pairIiiESaIS2_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

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

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

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

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

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

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

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


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