; LLVM IR from xirc/cp-algorithm :: codeforces/1131D/main.ll (Z5solvev)

; 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.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"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<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 }
%struct.DSU = type { i32, %"class.std::vector", %"class.std::vector" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.22" = type { i8 }
%"class.std::allocator.15" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.25" = type { ptr }
%class.anon = type { ptr, ptr }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@_Z1RB5cxx11 = external dso_local global %"class.std::vector.5", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5tsortRKSt6vectorIS_IiSaIiEESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #0

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

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

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

declare i32 @__gxx_personality_v0(...)

; 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 nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #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 void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.DSU, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.0", align 8
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca %"class.std::vector.13", align 8
  %10 = alloca %"class.std::vector.18", align 8
  %11 = alloca %"class.std::allocator.22", align 1
  %12 = alloca %"class.std::allocator.15", align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"class.std::vector", align 8
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca %"class.std::allocator", align 1
  %22 = alloca %"class.std::vector", align 8
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca i32, align 4
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %27 = alloca %class.anon, align 8
  %28 = alloca %"class.std::vector", align 8
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::allocator", align 1
  %31 = alloca ptr, align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca %"struct.std::_Bit_reference", align 8
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 56, ptr %1) #6
  %42 = load i32, ptr @N, align 4, !tbaa !5
  %43 = load i32, ptr @M, align 4, !tbaa !5
  %44 = add nsw i32 %42, %43
  call void @_ZN3DSUC2Ei(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %44)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %82, %0
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = load i32, ptr @N, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %85

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %78, %50
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = load i32, ptr @M, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %81

56:                                               ; preds = %51
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1RB5cxx11, i64 noundef %58) #6
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %59, i64 noundef %61)
          to label %63 unwind label %73

63:                                               ; preds = %56
  %64 = load i8, ptr %62, align 1, !tbaa !9
  %65 = sext i8 %64 to i32
  %66 = icmp eq i32 %65, 61
  br i1 %66, label %67, label %77

67:                                               ; preds = %63
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = load i32, ptr @N, align 4, !tbaa !5
  %71 = add nsw i32 %69, %70
  invoke void @_ZN3DSU5uniteEii(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %68, i32 noundef %71)
          to label %72 unwind label %73

72:                                               ; preds = %67
  br label %77

73:                                               ; preds = %67, %56
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %5, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %464

77:                                               ; preds = %72, %63
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %4, align 4, !tbaa !5
  br label %51, !llvm.loop !10

81:                                               ; preds = %55
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %2, align 4, !tbaa !5
  br label %45, !llvm.loop !12

85:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  %86 = load i32, ptr @N, align 4, !tbaa !5
  %87 = load i32, ptr @M, align 4, !tbaa !5
  %88 = add nsw i32 %86, %87
  %89 = sext i32 %88 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %89, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %90 unwind label %106

90:                                               ; preds = %85
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  %91 = load i32, ptr @N, align 4, !tbaa !5
  %92 = load i32, ptr @M, align 4, !tbaa !5
  %93 = add nsw i32 %91, %92
  %94 = sext i32 %93 to i64
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #6
  %95 = load i32, ptr @N, align 4, !tbaa !5
  %96 = load i32, ptr @M, align 4, !tbaa !5
  %97 = add nsw i32 %95, %96
  %98 = sext i32 %97 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %98, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %99 unwind label %110

99:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaISt6vectorIbSaIbEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIS_IbSaIbEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %94, ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %100 unwind label %114

100:                                              ; preds = %99
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #6
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %212, %100
  %102 = load i32, ptr %13, align 4, !tbaa !5
  %103 = load i32, ptr @N, align 4, !tbaa !5
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %119, label %105

105:                                              ; preds = %101
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %215

106:                                              ; preds = %85
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %5, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %6, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %463

110:                                              ; preds = %90
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %5, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %6, align 4
  br label %118

114:                                              ; preds = %99
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %5, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %6, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #6
  br label %118

118:                                              ; preds = %114, %110
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #6
  br label %462

119:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %206, %119
  %121 = load i32, ptr %14, align 4, !tbaa !5
  %122 = load i32, ptr @M, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %211

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %126 = load i32, ptr %13, align 4, !tbaa !5
  %127 = invoke noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %126)
          to label %128 unwind label %161

128:                                              ; preds = %125
  store i32 %127, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %129 = load i32, ptr %14, align 4, !tbaa !5
  %130 = load i32, ptr @N, align 4, !tbaa !5
  %131 = add nsw i32 %129, %130
  %132 = invoke noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %131)
          to label %133 unwind label %165

133:                                              ; preds = %128
  store i32 %132, ptr %16, align 4, !tbaa !5
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1RB5cxx11, i64 noundef %135) #6
  %137 = load i32, ptr %14, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %136, i64 noundef %138)
          to label %140 unwind label %165

140:                                              ; preds = %133
  %141 = load i8, ptr %139, align 1, !tbaa !9
  %142 = sext i8 %141 to i32
  %143 = icmp eq i32 %142, 60
  br i1 %143, label %144, label %173

144:                                              ; preds = %140
  %145 = load i32, ptr %15, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %146) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %147, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %148 unwind label %165

148:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %149 = load i32, ptr %15, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %150) #6
  %152 = load i32, ptr %16, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %151, i64 noundef %153)
          to label %155 unwind label %169

155:                                              ; preds = %148
  %156 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %157 = extractvalue { ptr, i64 } %154, 0
  store ptr %157, ptr %156, align 8
  %158 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %159 = extractvalue { ptr, i64 } %154, 1
  store i64 %159, ptr %158, align 8
  %160 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %17, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br label %173

161:                                              ; preds = %125
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %5, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %6, align 4
  br label %210

165:                                              ; preds = %184, %173, %144, %133, %128
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %5, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %6, align 4
  br label %209

169:                                              ; preds = %148
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %5, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br label %209

173:                                              ; preds = %155, %140
  %174 = load i32, ptr %13, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1RB5cxx11, i64 noundef %175) #6
  %177 = load i32, ptr %14, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %176, i64 noundef %178)
          to label %180 unwind label %165

180:                                              ; preds = %173
  %181 = load i8, ptr %179, align 1, !tbaa !9
  %182 = sext i8 %181 to i32
  %183 = icmp eq i32 %182, 62
  br i1 %183, label %184, label %205

184:                                              ; preds = %180
  %185 = load i32, ptr %16, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %186) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %187, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %188 unwind label %165

188:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %189 = load i32, ptr %16, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %190) #6
  %192 = load i32, ptr %15, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %191, i64 noundef %193)
          to label %195 unwind label %201

195:                                              ; preds = %188
  %196 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %197 = extractvalue { ptr, i64 } %194, 0
  store ptr %197, ptr %196, align 8
  %198 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %199 = extractvalue { ptr, i64 } %194, 1
  store i64 %199, ptr %198, align 8
  %200 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %18, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  br label %205

201:                                              ; preds = %188
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %5, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  br label %209

205:                                              ; preds = %195, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %14, align 4, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %14, align 4, !tbaa !5
  br label %120, !llvm.loop !13

209:                                              ; preds = %201, %169, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %210

210:                                              ; preds = %209, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %461

211:                                              ; preds = %124
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %13, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %13, align 4, !tbaa !5
  br label %101, !llvm.loop !14

215:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  invoke void @_Z5tsortRKSt6vectorIS_IiSaIiEESaIS1_EE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %19, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %216 unwind label %228

216:                                              ; preds = %215
  %217 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  %218 = load i32, ptr @N, align 4, !tbaa !5
  %219 = load i32, ptr @M, align 4, !tbaa !5
  %220 = add nsw i32 %218, %219
  %221 = sext i32 %220 to i64
  %222 = icmp ne i64 %217, %221
  br i1 %222, label %223, label %236

223:                                              ; preds = %216
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %225 unwind label %232

225:                                              ; preds = %223
  %226 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %224, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %227 unwind label %232

227:                                              ; preds = %225
  store i32 1, ptr %3, align 4
  br label %451

228:                                              ; preds = %215
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %5, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %6, align 4
  br label %460

232:                                              ; preds = %225, %223
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %5, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %6, align 4
  br label %459

236:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  %237 = load i32, ptr @N, align 4, !tbaa !5
  %238 = load i32, ptr @M, align 4, !tbaa !5
  %239 = add nsw i32 %237, %238
  %240 = sext i32 %239 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %240, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %241 unwind label %254

241:                                              ; preds = %236
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %242 = load i32, ptr @N, align 4, !tbaa !5
  %243 = load i32, ptr @M, align 4, !tbaa !5
  %244 = add nsw i32 %242, %243
  %245 = sext i32 %244 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %245, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %246 unwind label %258

246:                                              ; preds = %241
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %247

247:                                              ; preds = %274, %246
  %248 = load i32, ptr %24, align 4, !tbaa !5
  %249 = load i32, ptr @N, align 4, !tbaa !5
  %250 = load i32, ptr @M, align 4, !tbaa !5
  %251 = add nsw i32 %249, %250
  %252 = icmp slt i32 %248, %251
  br i1 %252, label %262, label %253

253:                                              ; preds = %247
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %277

254:                                              ; preds = %236
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %5, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  br label %458

258:                                              ; preds = %241
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %5, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  br label %457

262:                                              ; preds = %247
  %263 = load i32, ptr %24, align 4, !tbaa !5
  %264 = load i32, ptr %24, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %265) #6
  store i32 %263, ptr %266, align 4, !tbaa !5
  %267 = load i32, ptr %24, align 4, !tbaa !5
  %268 = load i32, ptr %24, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %269) #6
  %271 = load i32, ptr %270, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %272) #6
  store i32 %267, ptr %273, align 4, !tbaa !5
  br label %274

274:                                              ; preds = %262
  %275 = load i32, ptr %24, align 4, !tbaa !5
  %276 = add nsw i32 %275, 1
  store i32 %276, ptr %24, align 4, !tbaa !5
  br label %247, !llvm.loop !15

277:                                              ; preds = %253
  %278 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %279 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %25, i32 0, i32 0
  store ptr %278, ptr %279, align 8
  %280 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %281 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %26, i32 0, i32 0
  store ptr %280, ptr %281, align 8
  %282 = getelementptr inbounds %class.anon, ptr %27, i32 0, i32 0
  store ptr %1, ptr %282, align 8, !tbaa !16
  %283 = getelementptr inbounds %class.anon, ptr %27, i32 0, i32 1
  store ptr %22, ptr %283, align 8, !tbaa !16
  %284 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %25, i32 0, i32 0
  %285 = load ptr, ptr %284, align 8
  %286 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %26, i32 0, i32 0
  %287 = load ptr, ptr %286, align 8
  %288 = getelementptr inbounds { ptr, ptr }, ptr %27, i32 0, i32 0
  %289 = load ptr, ptr %288, align 8
  %290 = getelementptr inbounds { ptr, ptr }, ptr %27, i32 0, i32 1
  %291 = load ptr, ptr %290, align 8
  invoke void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEZ5solvevE3$_0EvT_S8_T0_"(ptr %285, ptr %287, ptr %289, ptr %291)
          to label %292 unwind label %307

292:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #6
  %293 = load i32, ptr @N, align 4, !tbaa !5
  %294 = load i32, ptr @M, align 4, !tbaa !5
  %295 = add nsw i32 %293, %294
  %296 = sext i32 %295 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 1, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %296, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %297 unwind label %311

297:                                              ; preds = %292
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  store ptr %20, ptr %31, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %298 = load ptr, ptr %31, align 8, !tbaa !16
  %299 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %298) #6
  %300 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %32, i32 0, i32 0
  store ptr %299, ptr %300, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %301 = load ptr, ptr %31, align 8, !tbaa !16
  %302 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %301) #6
  %303 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %33, i32 0, i32 0
  store ptr %302, ptr %303, align 8
  br label %304

304:                                              ; preds = %382, %297
  %305 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  br i1 %305, label %315, label %306

306:                                              ; preds = %304
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %384

307:                                              ; preds = %277
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %5, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %6, align 4
  br label %456

311:                                              ; preds = %292
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %5, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %455

315:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %316 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #6
  %317 = load i32, ptr %316, align 4, !tbaa !5
  store i32 %317, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  store i32 0, ptr %35, align 4, !tbaa !5
  br label %318

318:                                              ; preds = %376, %315
  %319 = load i32, ptr %35, align 4, !tbaa !5
  %320 = load i32, ptr @N, align 4, !tbaa !5
  %321 = load i32, ptr @M, align 4, !tbaa !5
  %322 = add nsw i32 %320, %321
  %323 = icmp slt i32 %319, %322
  br i1 %323, label %325, label %324

324:                                              ; preds = %318
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %381

325:                                              ; preds = %318
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  %326 = load i32, ptr %35, align 4, !tbaa !5
  %327 = invoke noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %326)
          to label %328 unwind label %359

328:                                              ; preds = %325
  store i32 %327, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  %329 = load i32, ptr %34, align 4, !tbaa !5
  %330 = invoke noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %329)
          to label %331 unwind label %363

331:                                              ; preds = %328
  store i32 %330, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #6
  %332 = load i32, ptr %37, align 4, !tbaa !5
  %333 = sext i32 %332 to i64
  %334 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %333) #6
  %335 = load i32, ptr %36, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %334, i64 noundef %336)
          to label %338 unwind label %367

338:                                              ; preds = %331
  %339 = getelementptr inbounds { ptr, i64 }, ptr %38, i32 0, i32 0
  %340 = extractvalue { ptr, i64 } %337, 0
  store ptr %340, ptr %339, align 8
  %341 = getelementptr inbounds { ptr, i64 }, ptr %38, i32 0, i32 1
  %342 = extractvalue { ptr, i64 } %337, 1
  store i64 %342, ptr %341, align 8
  %343 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %38) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #6
  br i1 %343, label %344, label %375

344:                                              ; preds = %338
  %345 = load i32, ptr %35, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %346) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  %348 = load i32, ptr %34, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %349) #6
  %351 = load i32, ptr %350, align 4, !tbaa !5
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %39, align 4, !tbaa !5
  %353 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %347, ptr noundef nonnull align 4 dereferenceable(4) %39)
          to label %354 unwind label %371

354:                                              ; preds = %344
  %355 = load i32, ptr %353, align 4, !tbaa !5
  %356 = load i32, ptr %35, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %357) #6
  store i32 %355, ptr %358, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %375

359:                                              ; preds = %325
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %5, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %6, align 4
  br label %380

363:                                              ; preds = %328
  %364 = landingpad { ptr, i32 }
          cleanup
  %365 = extractvalue { ptr, i32 } %364, 0
  store ptr %365, ptr %5, align 8
  %366 = extractvalue { ptr, i32 } %364, 1
  store i32 %366, ptr %6, align 4
  br label %379

367:                                              ; preds = %331
  %368 = landingpad { ptr, i32 }
          cleanup
  %369 = extractvalue { ptr, i32 } %368, 0
  store ptr %369, ptr %5, align 8
  %370 = extractvalue { ptr, i32 } %368, 1
  store i32 %370, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #6
  br label %379

371:                                              ; preds = %344
  %372 = landingpad { ptr, i32 }
          cleanup
  %373 = extractvalue { ptr, i32 } %372, 0
  store ptr %373, ptr %5, align 8
  %374 = extractvalue { ptr, i32 } %372, 1
  store i32 %374, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %379

375:                                              ; preds = %354, %338
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %376

376:                                              ; preds = %375
  %377 = load i32, ptr %35, align 4, !tbaa !5
  %378 = add nsw i32 %377, 1
  store i32 %378, ptr %35, align 4, !tbaa !5
  br label %318, !llvm.loop !18

379:                                              ; preds = %371, %367, %363
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  br label %380

380:                                              ; preds = %379, %359
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %454

381:                                              ; preds = %324
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %382

382:                                              ; preds = %381
  %383 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #6
  br label %304

384:                                              ; preds = %306
  %385 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %386 unwind label %394

386:                                              ; preds = %384
  %387 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %385, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %388 unwind label %394

388:                                              ; preds = %386
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #6
  store i32 0, ptr %40, align 4, !tbaa !5
  br label %389

389:                                              ; preds = %415, %388
  %390 = load i32, ptr %40, align 4, !tbaa !5
  %391 = load i32, ptr @N, align 4, !tbaa !5
  %392 = icmp slt i32 %390, %391
  br i1 %392, label %398, label %393

393:                                              ; preds = %389
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  br label %418

394:                                              ; preds = %448, %418, %386, %384
  %395 = landingpad { ptr, i32 }
          cleanup
  %396 = extractvalue { ptr, i32 } %395, 0
  store ptr %396, ptr %5, align 8
  %397 = extractvalue { ptr, i32 } %395, 1
  store i32 %397, ptr %6, align 4
  br label %454

398:                                              ; preds = %389
  %399 = load i32, ptr %40, align 4, !tbaa !5
  %400 = icmp sgt i32 %399, 0
  br i1 %400, label %401, label %408

401:                                              ; preds = %398
  %402 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %403 unwind label %404

403:                                              ; preds = %401
  br label %408

404:                                              ; preds = %408, %401
  %405 = landingpad { ptr, i32 }
          cleanup
  %406 = extractvalue { ptr, i32 } %405, 0
  store ptr %406, ptr %5, align 8
  %407 = extractvalue { ptr, i32 } %405, 1
  store i32 %407, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  br label %454

408:                                              ; preds = %403, %398
  %409 = load i32, ptr %40, align 4, !tbaa !5
  %410 = sext i32 %409 to i64
  %411 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %410) #6
  %412 = load i32, ptr %411, align 4, !tbaa !5
  %413 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %412)
          to label %414 unwind label %404

414:                                              ; preds = %408
  br label %415

415:                                              ; preds = %414
  %416 = load i32, ptr %40, align 4, !tbaa !5
  %417 = add nsw i32 %416, 1
  store i32 %417, ptr %40, align 4, !tbaa !5
  br label %389, !llvm.loop !19

418:                                              ; preds = %393
  %419 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %420 unwind label %394

420:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #6
  store i32 0, ptr %41, align 4, !tbaa !5
  br label %421

421:                                              ; preds = %445, %420
  %422 = load i32, ptr %41, align 4, !tbaa !5
  %423 = load i32, ptr @M, align 4, !tbaa !5
  %424 = icmp slt i32 %422, %423
  br i1 %424, label %426, label %425

425:                                              ; preds = %421
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  br label %448

426:                                              ; preds = %421
  %427 = load i32, ptr %41, align 4, !tbaa !5
  %428 = icmp sgt i32 %427, 0
  br i1 %428, label %429, label %436

429:                                              ; preds = %426
  %430 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %431 unwind label %432

431:                                              ; preds = %429
  br label %436

432:                                              ; preds = %436, %429
  %433 = landingpad { ptr, i32 }
          cleanup
  %434 = extractvalue { ptr, i32 } %433, 0
  store ptr %434, ptr %5, align 8
  %435 = extractvalue { ptr, i32 } %433, 1
  store i32 %435, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  br label %454

436:                                              ; preds = %431, %426
  %437 = load i32, ptr @N, align 4, !tbaa !5
  %438 = load i32, ptr %41, align 4, !tbaa !5
  %439 = add nsw i32 %437, %438
  %440 = sext i32 %439 to i64
  %441 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %440) #6
  %442 = load i32, ptr %441, align 4, !tbaa !5
  %443 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %442)
          to label %444 unwind label %432

444:                                              ; preds = %436
  br label %445

445:                                              ; preds = %444
  %446 = load i32, ptr %41, align 4, !tbaa !5
  %447 = add nsw i32 %446, 1
  store i32 %447, ptr %41, align 4, !tbaa !5
  br label %421, !llvm.loop !20

448:                                              ; preds = %425
  %449 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %450 unwind label %394

450:                                              ; preds = %448
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  store i32 0, ptr %3, align 4
  br label %451

451:                                              ; preds = %450, %227
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %1) #6
  %452 = load i32, ptr %3, align 4
  switch i32 %452, label %470 [
    i32 0, label %453
    i32 1, label %453
  ]

453:                                              ; preds = %451, %451
  ret void

454:                                              ; preds = %432, %404, %394, %380
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  br label %455

455:                                              ; preds = %454, %311
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #6
  br label %456

456:                                              ; preds = %455, %307
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  br label %457

457:                                              ; preds = %456, %258
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  br label %458

458:                                              ; preds = %457, %254
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br label %459

459:                                              ; preds = %458, %232
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  br label %460

460:                                              ; preds = %459, %228
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  br label %461

461:                                              ; preds = %460, %210
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %462

462:                                              ; preds = %461, %118
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %463

463:                                              ; preds = %462, %106
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %464

464:                                              ; preds = %463, %73
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %1) #6
  br label %465

465:                                              ; preds = %464
  %466 = load ptr, ptr %5, align 8
  %467 = load i32, ptr %6, align 4
  %468 = insertvalue { ptr, i32 } poison, ptr %466, 0
  %469 = insertvalue { ptr, i32 } %468, i32 %467, 1
  resume { ptr, i32 } %469

470:                                              ; preds = %451
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3DSUC2Ei(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

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

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

; 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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEZ5solvevE3$_0EvT_S8_T0_"(ptr, ptr, ptr, ptr) #3

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


; 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.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_ostream" = type { ptr, %"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<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 }
%struct.DSU = type { i32, %"class.std::vector", %"class.std::vector" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<bool>, std::allocator<std::vector<bool>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.22" = type { i8 }
%"class.std::allocator.15" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator.25" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@M = external dso_local local_unnamed_addr global i32, align 4
@_Z1RB5cxx11 = external dso_local global %"class.std::vector.5", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5tsortRKSt6vectorIS_IiSaIiEESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) 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 nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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 nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) 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 void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.DSU, align 8
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca %"class.std::allocator.2", align 1
  %4 = alloca %"class.std::vector.13", align 8
  %5 = alloca %"class.std::vector.18", align 8
  %6 = alloca %"class.std::allocator.22", align 1
  %7 = alloca %"class.std::allocator.15", align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %22 = alloca %"struct.std::_Bit_reference", align 8
  %23 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %1) #6
  %24 = load i32, ptr @N, align 4, !tbaa !5
  %25 = load i32, ptr @M, align 4, !tbaa !5
  %26 = add nsw i32 %25, %24
  call void @_ZN3DSUC2Ei(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %26)
  %27 = load i32, ptr @N, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  %.pre150 = load i32, ptr @M, align 4, !tbaa !5
  %29 = icmp sgt i32 %.pre150, 0
  %or.cond = select i1 %28, i1 %29, i1 false
  br i1 %or.cond, label %.preheader94, label %._crit_edge98

.preheader94:                                     ; preds = %0, %._crit_edge
  %30 = phi i32 [ %37, %._crit_edge ], [ %27, %0 ]
  %31 = phi i32 [ %38, %._crit_edge ], [ %.pre150, %0 ]
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %._crit_edge ], [ 0, %0 ]
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader94
  %33 = trunc nuw nsw i64 %indvars.iv125 to i32
  br label %41

._crit_edge98:                                    ; preds = %._crit_edge, %0
  %34 = phi i32 [ %.pre150, %0 ], [ %38, %._crit_edge ]
  %.lcssa = phi i32 [ %27, %0 ], [ %37, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  %35 = add nsw i32 %34, %.lcssa
  %36 = sext i32 %35 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %36, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %56 unwind label %73

._crit_edge.loopexit:                             ; preds = %52
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader94
  %37 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %30, %.preheader94 ]
  %38 = phi i32 [ %53, %._crit_edge.loopexit ], [ %31, %.preheader94 ]
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %39 = sext i32 %37 to i64
  %40 = icmp slt i64 %indvars.iv.next126, %39
  br i1 %40, label %.preheader94, label %._crit_edge98, !llvm.loop !9

41:                                               ; preds = %.lr.ph, %52
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %52 ]
  %42 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1RB5cxx11, i64 noundef %indvars.iv125) #6
  %43 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %42, i64 noundef %indvars.iv)
  %44 = load i8, ptr %43, align 1, !tbaa !12
  %45 = icmp eq i8 %44, 61
  br i1 %45, label %46, label %52

46:                                               ; preds = %41
  %47 = load i32, ptr @N, align 4, !tbaa !5
  %48 = trunc nuw nsw i64 %indvars.iv to i32
  %49 = add nsw i32 %47, %48
  invoke void @_ZN3DSU5uniteEii(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %33, i32 noundef %49)
          to label %52 unwind label %50

50:                                               ; preds = %46
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %303

52:                                               ; preds = %41, %46
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %53 = load i32, ptr @M, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = icmp slt i64 %indvars.iv.next, %54
  br i1 %55, label %41, label %._crit_edge.loopexit, !llvm.loop !13

56:                                               ; preds = %._crit_edge98
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %57 = load i32, ptr @N, align 4, !tbaa !5
  %58 = load i32, ptr @M, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #6
  %59 = add nsw i32 %58, %57
  %60 = sext i32 %59 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %60, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %61 unwind label %75

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaISt6vectorIbSaIbEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorIS_IbSaIbEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %60, ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %62 unwind label %77

62:                                               ; preds = %61
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #6
  %63 = load i32, ptr @N, align 4, !tbaa !5
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.preheader93.lr.ph, label %._crit_edge103

.preheader93.lr.ph:                               ; preds = %62
  %65 = getelementptr inbounds i8, ptr %10, i64 8
  %66 = getelementptr inbounds i8, ptr %11, i64 8
  %67 = load i32, ptr @M, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %.preheader93, label %._crit_edge103

.preheader93:                                     ; preds = %.preheader93.lr.ph, %._crit_edge101
  %69 = phi i32 [ %80, %._crit_edge101 ], [ %63, %.preheader93.lr.ph ]
  %70 = phi i32 [ %81, %._crit_edge101 ], [ %67, %.preheader93.lr.ph ]
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %._crit_edge101 ], [ 0, %.preheader93.lr.ph ]
  %71 = icmp sgt i32 %70, 0
  br i1 %71, label %.lr.ph100, label %._crit_edge101

.lr.ph100:                                        ; preds = %.preheader93
  %72 = trunc nuw nsw i64 %indvars.iv131 to i32
  br label %84

._crit_edge103:                                   ; preds = %._crit_edge101, %.preheader93.lr.ph, %62
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  invoke void @_Z5tsortRKSt6vectorIS_IiSaIiEESaIS1_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %145 unwind label %155

73:                                               ; preds = %._crit_edge98
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %302

75:                                               ; preds = %56
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %79

77:                                               ; preds = %61
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  br label %79

79:                                               ; preds = %77, %75
  %.pn = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ]
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #6
  br label %301

._crit_edge101.loopexit:                          ; preds = %139
  %.pre151 = load i32, ptr @N, align 4, !tbaa !5
  br label %._crit_edge101

._crit_edge101:                                   ; preds = %._crit_edge101.loopexit, %.preheader93
  %80 = phi i32 [ %.pre151, %._crit_edge101.loopexit ], [ %69, %.preheader93 ]
  %81 = phi i32 [ %140, %._crit_edge101.loopexit ], [ %70, %.preheader93 ]
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %82 = sext i32 %80 to i64
  %83 = icmp slt i64 %indvars.iv.next132, %82
  br i1 %83, label %.preheader93, label %._crit_edge103, !llvm.loop !14

84:                                               ; preds = %.lr.ph100, %139
  %indvars.iv128 = phi i64 [ 0, %.lr.ph100 ], [ %indvars.iv.next129, %139 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %85 = invoke noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %72)
          to label %86 unwind label %111

86:                                               ; preds = %84
  store i32 %85, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %87 = load i32, ptr @N, align 4, !tbaa !5
  %88 = trunc nuw nsw i64 %indvars.iv128 to i32
  %89 = add nsw i32 %87, %88
  %90 = invoke noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %89)
          to label %91 unwind label %113

91:                                               ; preds = %86
  store i32 %90, ptr %9, align 4, !tbaa !5
  %92 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1RB5cxx11, i64 noundef %indvars.iv131) #6
  %93 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %92, i64 noundef %indvars.iv128)
  %94 = load i8, ptr %93, align 1, !tbaa !12
  %95 = icmp eq i8 %94, 60
  br i1 %95, label %96, label %117

96:                                               ; preds = %91
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %98) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %99, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %100 unwind label %113

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %102) #6
  %104 = load i32, ptr %9, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %103, i64 noundef %105)
          to label %107 unwind label %115

107:                                              ; preds = %100
  %108 = extractvalue { ptr, i64 } %106, 0
  store ptr %108, ptr %10, align 8
  %109 = extractvalue { ptr, i64 } %106, 1
  store i64 %109, ptr %65, align 8
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  br label %117

111:                                              ; preds = %84
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %144

113:                                              ; preds = %122, %96, %86
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %143

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

117:                                              ; preds = %107, %91
  %118 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @_Z1RB5cxx11, i64 noundef %indvars.iv131) #6
  %119 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %118, i64 noundef %indvars.iv128)
  %120 = load i8, ptr %119, align 1, !tbaa !12
  %121 = icmp eq i8 %120, 62
  br i1 %121, label %122, label %139

122:                                              ; preds = %117
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %124) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %125, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %126 unwind label %113

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  %127 = load i32, ptr %9, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %128) #6
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %129, i64 noundef %131)
          to label %133 unwind label %137

133:                                              ; preds = %126
  %134 = extractvalue { ptr, i64 } %132, 0
  store ptr %134, ptr %11, align 8
  %135 = extractvalue { ptr, i64 } %132, 1
  store i64 %135, ptr %66, align 8
  %136 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  br label %139

137:                                              ; preds = %126
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  br label %143

139:                                              ; preds = %133, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %140 = load i32, ptr @M, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = icmp slt i64 %indvars.iv.next129, %141
  br i1 %142, label %84, label %._crit_edge101.loopexit, !llvm.loop !15

143:                                              ; preds = %137, %115, %113
  %.pn84 = phi { ptr, i32 } [ %138, %137 ], [ %114, %113 ], [ %116, %115 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  br label %144

144:                                              ; preds = %143, %111
  %.pn84.pn = phi { ptr, i32 } [ %.pn84, %143 ], [ %112, %111 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %300

145:                                              ; preds = %._crit_edge103
  %146 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %147 = load i32, ptr @N, align 4, !tbaa !5
  %148 = load i32, ptr @M, align 4, !tbaa !5
  %149 = add nsw i32 %148, %147
  %150 = sext i32 %149 to i64
  %.not = icmp eq i64 %146, %150
  br i1 %.not, label %159, label %151

151:                                              ; preds = %145
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %153 unwind label %157

153:                                              ; preds = %151
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %292 unwind label %157

155:                                              ; preds = %._crit_edge103
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %299

157:                                              ; preds = %153, %151
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %298

159:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %146, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %160 unwind label %172

160:                                              ; preds = %159
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  %161 = load i32, ptr @N, align 4, !tbaa !5
  %162 = load i32, ptr @M, align 4, !tbaa !5
  %163 = add nsw i32 %162, %161
  %164 = sext i32 %163 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %164, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %165 unwind label %174

165:                                              ; preds = %160
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  %166 = load i32, ptr @N, align 4, !tbaa !5
  %167 = load i32, ptr @M, align 4, !tbaa !5
  %168 = add nsw i32 %167, %166
  %169 = icmp sgt i32 %168, 0
  br i1 %169, label %.lr.ph106, label %._crit_edge107

._crit_edge107:                                   ; preds = %.lr.ph106, %165
  %170 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  %171 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  invoke void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEZ5solvevE3$_0EvT_S8_T0_"(ptr %170, ptr %171, ptr nonnull %1, ptr nonnull %15)
          to label %187 unwind label %198

172:                                              ; preds = %159
  %173 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  br label %297

174:                                              ; preds = %160
  %175 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  br label %296

.lr.ph106:                                        ; preds = %165, %.lr.ph106
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %.lr.ph106 ], [ 0, %165 ]
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %indvars.iv134) #6
  %177 = trunc nuw nsw i64 %indvars.iv134 to i32
  store i32 %177, ptr %176, align 4, !tbaa !5
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv134) #6
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %180) #6
  store i32 %177, ptr %181, align 4, !tbaa !5
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %182 = load i32, ptr @N, align 4, !tbaa !5
  %183 = load i32, ptr @M, align 4, !tbaa !5
  %184 = add nsw i32 %183, %182
  %185 = sext i32 %184 to i64
  %186 = icmp slt i64 %indvars.iv.next135, %185
  br i1 %186, label %.lr.ph106, label %._crit_edge107, !llvm.loop !16

187:                                              ; preds = %._crit_edge107
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #6
  %188 = load i32, ptr @N, align 4, !tbaa !5
  %189 = load i32, ptr @M, align 4, !tbaa !5
  %190 = add nsw i32 %189, %188
  %191 = sext i32 %190 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  store i32 1, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %191, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %192 unwind label %200

192:                                              ; preds = %187
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %193 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  store ptr %193, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #6
  %194 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  store ptr %194, ptr %21, align 8
  %195 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br i1 %195, label %.lr.ph113, label %._crit_edge114

.lr.ph113:                                        ; preds = %192
  %196 = getelementptr inbounds i8, ptr %22, i64 8
  br label %202

._crit_edge114:                                   ; preds = %._crit_edge111, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %247 unwind label %267

198:                                              ; preds = %._crit_edge107
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %295

200:                                              ; preds = %187
  %201 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  br label %294

202:                                              ; preds = %.lr.ph113, %._crit_edge111
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = load i32, ptr @N, align 4, !tbaa !5
  %206 = load i32, ptr @M, align 4, !tbaa !5
  %207 = add nsw i32 %206, %205
  %208 = icmp sgt i32 %207, 0
  br i1 %208, label %.lr.ph110, label %._crit_edge111

.lr.ph110:                                        ; preds = %202
  %209 = sext i32 %204 to i64
  br label %212

._crit_edge111:                                   ; preds = %240, %202
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %211 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br i1 %211, label %202, label %._crit_edge114

212:                                              ; preds = %.lr.ph110, %240
  %indvars.iv137 = phi i64 [ 0, %.lr.ph110 ], [ %indvars.iv.next138, %240 ]
  %213 = trunc nuw nsw i64 %indvars.iv137 to i32
  %214 = invoke noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %213)
          to label %215 unwind label %234

215:                                              ; preds = %212
  %216 = invoke noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef %204)
          to label %217 unwind label %236

217:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #6
  %218 = sext i32 %216 to i64
  %219 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIS_IbSaIbEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %218) #6
  %220 = sext i32 %214 to i64
  %221 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %219, i64 noundef %220)
          to label %222 unwind label %238

222:                                              ; preds = %217
  %223 = extractvalue { ptr, i64 } %221, 0
  store ptr %223, ptr %22, align 8
  %224 = extractvalue { ptr, i64 } %221, 1
  store i64 %224, ptr %196, align 8
  %225 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  br i1 %225, label %226, label %240

226:                                              ; preds = %222
  %227 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv137) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #6
  %228 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %209) #6
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %23, align 4, !tbaa !5
  %231 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %227, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv137) #6
  store i32 %232, ptr %233, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #6
  br label %240

234:                                              ; preds = %212
  %235 = landingpad { ptr, i32 }
          cleanup
  br label %246

236:                                              ; preds = %215
  %237 = landingpad { ptr, i32 }
          cleanup
  br label %246

238:                                              ; preds = %217
  %239 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  br label %246

240:                                              ; preds = %226, %222
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %241 = load i32, ptr @N, align 4, !tbaa !5
  %242 = load i32, ptr @M, align 4, !tbaa !5
  %243 = add nsw i32 %242, %241
  %244 = sext i32 %243 to i64
  %245 = icmp slt i64 %indvars.iv.next138, %244
  br i1 %245, label %212, label %._crit_edge111, !llvm.loop !17

246:                                              ; preds = %236, %238, %234
  %.pn73.pn = phi { ptr, i32 } [ %235, %234 ], [ %239, %238 ], [ %237, %236 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br label %293

247:                                              ; preds = %._crit_edge114
  %248 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %197, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader92 unwind label %267

.preheader92:                                     ; preds = %247
  %249 = load i32, ptr @N, align 4, !tbaa !5
  %250 = icmp sgt i32 %249, 0
  br i1 %250, label %.lr.ph116.preheader, label %._crit_edge117

.lr.ph116.preheader:                              ; preds = %.preheader92
  %251 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef 0) #6
  %252 = load i32, ptr %251, align 4, !tbaa !5
  %253 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %252)
          to label %254 unwind label %.loopexit.split-lp

254:                                              ; preds = %.lr.ph116.preheader
  %255 = load i32, ptr @N, align 4, !tbaa !5
  %256 = icmp sgt i32 %255, 1
  br i1 %256, label %.lr.ph116.peel.next, label %._crit_edge117

._crit_edge117:                                   ; preds = %274, %254, %.preheader92
  %257 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %267

.preheader:                                       ; preds = %._crit_edge117
  %258 = load i32, ptr @M, align 4, !tbaa !5
  %259 = icmp sgt i32 %258, 0
  br i1 %259, label %.lr.ph119.preheader._crit_edge, label %._crit_edge120

.lr.ph119.preheader._crit_edge:                   ; preds = %.preheader
  %.pre154 = load i32, ptr @N, align 4, !tbaa !5
  %260 = sext i32 %.pre154 to i64
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %260) #6
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %262)
          to label %264 unwind label %.loopexit.split-lp146

264:                                              ; preds = %.lr.ph119.preheader._crit_edge
  %265 = load i32, ptr @M, align 4, !tbaa !5
  %266 = icmp sgt i32 %265, 1
  br i1 %266, label %.lr.ph119.peel.next, label %._crit_edge120

267:                                              ; preds = %._crit_edge120, %._crit_edge117, %247, %._crit_edge114
  %268 = landingpad { ptr, i32 }
          cleanup
  br label %293

.lr.ph116.peel.next:                              ; preds = %254, %274
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %274 ], [ 1, %254 ]
  %269 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
          to label %270 unwind label %.loopexit

.loopexit:                                        ; preds = %.lr.ph116.peel.next, %270
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %293

.loopexit.split-lp:                               ; preds = %.lr.ph116.preheader
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %293

270:                                              ; preds = %.lr.ph116.peel.next
  %271 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv140) #6
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %272)
          to label %274 unwind label %.loopexit

274:                                              ; preds = %270
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %275 = load i32, ptr @N, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = icmp slt i64 %indvars.iv.next141, %276
  br i1 %277, label %.lr.ph116.peel.next, label %._crit_edge117, !llvm.loop !18

._crit_edge120:                                   ; preds = %287, %264, %.preheader
  %278 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %291 unwind label %267

.lr.ph119.peel.next:                              ; preds = %264, %287
  %.0118 = phi i32 [ %288, %287 ], [ 1, %264 ]
  %279 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
          to label %280 unwind label %.loopexit145

.loopexit145:                                     ; preds = %.lr.ph119.peel.next, %280
  %lpad.loopexit147 = landingpad { ptr, i32 }
          cleanup
  br label %293

.loopexit.split-lp146:                            ; preds = %.lr.ph119.preheader._crit_edge
  %lpad.loopexit.split-lp148 = landingpad { ptr, i32 }
          cleanup
  br label %293

280:                                              ; preds = %.lr.ph119.peel.next
  %281 = load i32, ptr @N, align 4, !tbaa !5
  %282 = add nsw i32 %281, %.0118
  %283 = sext i32 %282 to i64
  %284 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %283) #6
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %285)
          to label %287 unwind label %.loopexit145

287:                                              ; preds = %280
  %288 = add nuw nsw i32 %.0118, 1
  %289 = load i32, ptr @M, align 4, !tbaa !5
  %290 = icmp slt i32 %288, %289
  br i1 %290, label %.lr.ph119.peel.next, label %._crit_edge120, !llvm.loop !20

291:                                              ; preds = %._crit_edge120
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  br label %292

292:                                              ; preds = %153, %291
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #6
  ret void

293:                                              ; preds = %.loopexit145, %.loopexit.split-lp146, %.loopexit, %.loopexit.split-lp, %267, %246
  %.pn73.pn.pn = phi { ptr, i32 } [ %.pn73.pn, %246 ], [ %268, %267 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit147, %.loopexit145 ], [ %lpad.loopexit.split-lp148, %.loopexit.split-lp146 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  br label %294

294:                                              ; preds = %293, %200
  %.pn73.pn.pn.pn = phi { ptr, i32 } [ %.pn73.pn.pn, %293 ], [ %201, %200 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #6
  br label %295

295:                                              ; preds = %294, %198
  %.pn73.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn73.pn.pn.pn, %294 ], [ %199, %198 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %296

296:                                              ; preds = %295, %174
  %.pn73.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn73.pn.pn.pn.pn, %295 ], [ %175, %174 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %297

297:                                              ; preds = %296, %172
  %.pn73.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn73.pn.pn.pn.pn.pn, %296 ], [ %173, %172 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  br label %298

298:                                              ; preds = %297, %157
  %.pn81 = phi { ptr, i32 } [ %158, %157 ], [ %.pn73.pn.pn.pn.pn.pn.pn, %297 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %299

299:                                              ; preds = %298, %155
  %.pn81.pn = phi { ptr, i32 } [ %.pn81, %298 ], [ %156, %155 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br label %300

300:                                              ; preds = %299, %144
  %.pn84.pn.pn = phi { ptr, i32 } [ %.pn84.pn, %144 ], [ %.pn81.pn, %299 ]
  call void @_ZNSt6vectorIS_IbSaIbEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %301

301:                                              ; preds = %300, %79
  %.pn84.pn.pn.pn = phi { ptr, i32 } [ %.pn84.pn.pn, %300 ], [ %.pn, %79 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  br label %302

302:                                              ; preds = %301, %73
  %.pn84.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn84.pn.pn.pn, %301 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  br label %303

303:                                              ; preds = %302, %50
  %.pn90 = phi { ptr, i32 } [ %51, %50 ], [ %.pn84.pn.pn.pn.pn, %302 ]
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn90
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3DSUC2Ei(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3DSU5uniteEii(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3DSU4findEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

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

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

; 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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEZ5solvevE3$_0EvT_S8_T0_"(ptr, ptr, ptr, ptr) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(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_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(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(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIbSaIbEEED2Ev(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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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