; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2016-17/Open 2017/Plat (grass_recent)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::multiset<int>>, std::_Select1st<std::pair<const int, std::multiset<int>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::multiset<int>>, std::_Select1st<std::pair<const int, std::multiset<int>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::multiset" = type { %"class.std::_Rb_tree.11" }
%"class.std::_Rb_tree.11" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"struct.std::pair.20" = type { i32, %"struct.std::pair" }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator.22" = type { ptr }
%struct.DSU = type { %"class.std::vector.23" }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = 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.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::_Rb_tree_const_iterator.30" = type { ptr }
%"struct.std::pair.28" = type { i32, %"class.std::multiset" }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@Q = external dso_local global i32, align 4
@ed = external dso_local global %"class.std::vector", align 8
@vals = external dso_local global [200005 x %"class.std::set"], align 16
@child = external dso_local global [200005 x %"class.std::map"], align 16
@ans = external dso_local global %"class.std::multiset", align 8
@adj = external dso_local global [200005 x %"class.std::vector.15"], align 16
@par = external dso_local global [200005 x i32], align 16
@wei = external dso_local global [200005 x i32], align 16
@col = external dso_local global [200005 x i32], align 16
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [117 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z6getAnsi(i32 noundef) #2

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

46:                                               ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %47 unwind label %57

47:                                               ; preds = %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  call void @_ZN5input2reIiJiiiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @M, ptr noundef nonnull align 4 dereferenceable(4) @K, ptr noundef nonnull align 4 dereferenceable(4) @Q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %63, %47
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = load i32, ptr @M, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %62, label %52

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

53:                                               ; preds = %0
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %4, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %5, align 4
  br label %61

57:                                               ; preds = %46
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %4, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %61

61:                                               ; preds = %57, %53
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  br label %453

62:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @_ZN5input2reIiJiiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @_ZNSt4pairIiS_IiiEEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKiRKS0_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @ed, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %6, align 4, !tbaa !5
  br label %48, !llvm.loop !9

66:                                               ; preds = %52
  %67 = call ptr @_ZSt5beginISt6vectorISt4pairIiS1_IiiEESaIS3_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) @ed)
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %12, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  %69 = call ptr @_ZSt3endISt6vectorISt4pairIiS1_IiiEESaIS3_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) @ed)
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %13, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %12, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %13, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiS2_IiiEESt6vectorIS4_SaIS4_EEEEEvT_SA_(ptr %72, ptr %74)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  call void @_ZN3DSUC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %75 = load i32, ptr @N, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  invoke void @_ZN3DSU4initEi(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %76)
          to label %77 unwind label %85

77:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr @ed, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %78 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ed) #7
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %16, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %80 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ed) #7
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.22", ptr %17, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  br label %82

82:                                               ; preds = %141, %77
  %83 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br i1 %83, label %89, label %84

84:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %144

85:                                               ; preds = %144, %66
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %4, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %5, align 4
  br label %452

89:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %90 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  store ptr %90, ptr %18, align 8, !tbaa !11
  %91 = load ptr, ptr %18, align 8, !tbaa !11
  %92 = getelementptr inbounds %"struct.std::pair.20", ptr %91, i32 0, i32 1
  %93 = getelementptr inbounds %"struct.std::pair", ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 4, !tbaa !13
  %95 = load ptr, ptr %18, align 8, !tbaa !11
  %96 = getelementptr inbounds %"struct.std::pair.20", ptr %95, i32 0, i32 1
  %97 = getelementptr inbounds %"struct.std::pair", ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !16
  %99 = invoke noundef zeroext i1 @_ZN3DSU5uniteEii(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %94, i32 noundef %98)
          to label %100 unwind label %128

100:                                              ; preds = %89
  br i1 %99, label %101, label %140

101:                                              ; preds = %100
  %102 = load ptr, ptr %18, align 8, !tbaa !11
  %103 = getelementptr inbounds %"struct.std::pair.20", ptr %102, i32 0, i32 1
  %104 = getelementptr inbounds %"struct.std::pair", ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 4, !tbaa !13
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [200005 x %"class.std::vector.15"], ptr @adj, i64 0, i64 %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %108 = load ptr, ptr %18, align 8, !tbaa !11
  %109 = getelementptr inbounds %"struct.std::pair.20", ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds %"struct.std::pair", ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %18, align 8, !tbaa !11
  %112 = getelementptr inbounds %"struct.std::pair.20", ptr %111, i32 0, i32 0
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %110, ptr noundef nonnull align 4 dereferenceable(4) %112)
          to label %113 unwind label %132

113:                                              ; preds = %101
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %107, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %114 unwind label %132

114:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %115 = load ptr, ptr %18, align 8, !tbaa !11
  %116 = getelementptr inbounds %"struct.std::pair.20", ptr %115, i32 0, i32 1
  %117 = getelementptr inbounds %"struct.std::pair", ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !16
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [200005 x %"class.std::vector.15"], ptr @adj, i64 0, i64 %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %121 = load ptr, ptr %18, align 8, !tbaa !11
  %122 = getelementptr inbounds %"struct.std::pair.20", ptr %121, i32 0, i32 1
  %123 = getelementptr inbounds %"struct.std::pair", ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %18, align 8, !tbaa !11
  %125 = getelementptr inbounds %"struct.std::pair.20", ptr %124, i32 0, i32 0
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %123, ptr noundef nonnull align 4 dereferenceable(4) %125)
          to label %126 unwind label %136

126:                                              ; preds = %114
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %120, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %127 unwind label %136

127:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %140

128:                                              ; preds = %89
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %4, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %5, align 4
  br label %143

132:                                              ; preds = %113, %101
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %4, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %143

136:                                              ; preds = %126, %114
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %4, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %143

140:                                              ; preds = %127, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %141

141:                                              ; preds = %140
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %82

143:                                              ; preds = %136, %132, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %452

144:                                              ; preds = %84
  invoke void @_Z3dfsi(i32 noundef 1)
          to label %145 unwind label %85

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 1, ptr %21, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %157, %145
  %147 = load i32, ptr %21, align 4, !tbaa !5
  %148 = load i32, ptr @N, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  %150 = icmp slt i32 %147, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %164

152:                                              ; preds = %146
  %153 = load i32, ptr %21, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %154
  invoke void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %155)
          to label %156 unwind label %160

156:                                              ; preds = %152
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %21, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %21, align 4, !tbaa !5
  br label %146, !llvm.loop !17

160:                                              ; preds = %152
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %4, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %452

164:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %199, %164
  %166 = load i32, ptr %22, align 4, !tbaa !5
  %167 = load i32, ptr @N, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  %169 = icmp slt i32 %166, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %202

171:                                              ; preds = %165
  %172 = load i32, ptr %22, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [200005 x i32], ptr @par, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %198

177:                                              ; preds = %171
  %178 = load i32, ptr %22, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [200005 x i32], ptr @par, i64 0, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [200005 x %"class.std::map"], ptr @child, i64 0, i64 %182
  %184 = load i32, ptr %22, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %185
  %187 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %183, ptr noundef nonnull align 4 dereferenceable(4) %186)
          to label %188 unwind label %194

188:                                              ; preds = %177
  %189 = load i32, ptr %22, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [200005 x i32], ptr @wei, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !5
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %187, i32 noundef %192)
          to label %193 unwind label %194

193:                                              ; preds = %188
  br label %198

194:                                              ; preds = %188, %177
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %4, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %452

198:                                              ; preds = %193, %171
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %22, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %22, align 4, !tbaa !5
  br label %165, !llvm.loop !18

202:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %250, %202
  %204 = load i32, ptr %23, align 4, !tbaa !5
  %205 = load i32, ptr @N, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  %207 = icmp slt i32 %204, %206
  br i1 %207, label %209, label %208

208:                                              ; preds = %203
  store i32 13, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %258

209:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %210 = load i32, ptr %23, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [200005 x %"class.std::map"], ptr @child, i64 0, i64 %211
  store ptr %212, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %213 = load ptr, ptr %25, align 8, !tbaa !11
  %214 = call ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %213) #7
  %215 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %26, i32 0, i32 0
  store ptr %214, ptr %215, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %216 = load ptr, ptr %25, align 8, !tbaa !11
  %217 = call ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %216) #7
  %218 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %27, i32 0, i32 0
  store ptr %217, ptr %218, align 8
  br label %219

219:                                              ; preds = %239, %209
  %220 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt8multisetIiSt4lessIiESaIiEEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  br i1 %220, label %222, label %221

221:                                              ; preds = %219
  store i32 16, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %245

222:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %223 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt8multisetIiSt4lessIiESaIiEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  store ptr %223, ptr %28, align 8, !tbaa !11
  %224 = load i32, ptr %23, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [200005 x %"class.std::set"], ptr @vals, i64 0, i64 %225
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %227 = load ptr, ptr %28, align 8, !tbaa !11
  %228 = getelementptr inbounds %"struct.std::pair.28", ptr %227, i32 0, i32 1
  %229 = invoke ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %228)
          to label %230 unwind label %241

230:                                              ; preds = %222
  %231 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.30", ptr %30, i32 0, i32 0
  store ptr %229, ptr %231, align 8
  %232 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  %233 = load ptr, ptr %28, align 8, !tbaa !11
  %234 = getelementptr inbounds %"struct.std::pair.28", ptr %233, i32 0, i32 0
  %235 = invoke i64 @_ZSt9make_pairIRKiS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %232, ptr noundef nonnull align 4 dereferenceable(4) %234)
          to label %236 unwind label %241

236:                                              ; preds = %230
  store i64 %235, ptr %29, align 4
  %237 = load i64, ptr %29, align 4
  invoke void @_Z6insertISt3setISt4pairIiiESt4lessIS2_ESaIS2_EES2_EvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %226, i64 %237)
          to label %238 unwind label %241

238:                                              ; preds = %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %239

239:                                              ; preds = %238
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt8multisetIiSt4lessIiESaIiEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  br label %219

241:                                              ; preds = %236, %230, %222
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %4, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %257

245:                                              ; preds = %221
  %246 = load i32, ptr %23, align 4, !tbaa !5
  %247 = invoke noundef i32 @_Z6getAnsi(i32 noundef %246)
          to label %248 unwind label %253

248:                                              ; preds = %245
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %247)
          to label %249 unwind label %253

249:                                              ; preds = %248
  br label %250

250:                                              ; preds = %249
  %251 = load i32, ptr %23, align 4, !tbaa !5
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %23, align 4, !tbaa !5
  br label %203, !llvm.loop !19

253:                                              ; preds = %248, %245
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %4, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %5, align 4
  br label %257

257:                                              ; preds = %253, %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %452

258:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %259

259:                                              ; preds = %441, %258
  %260 = load i32, ptr %31, align 4, !tbaa !5
  %261 = load i32, ptr @Q, align 4, !tbaa !5
  %262 = icmp slt i32 %260, %261
  br i1 %262, label %264, label %263

263:                                              ; preds = %259
  store i32 18, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %450

264:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  invoke void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %265 unwind label %291

265:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %266 = load i32, ptr %32, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [200005 x i32], ptr @par, i64 0, i64 %267
  %269 = load i32, ptr %268, align 4, !tbaa !5
  store i32 %269, ptr %34, align 4, !tbaa !5
  %270 = load i32, ptr %34, align 4, !tbaa !5
  %271 = icmp ne i32 %270, 0
  br i1 %271, label %272, label %423

272:                                              ; preds = %265
  %273 = load i32, ptr %34, align 4, !tbaa !5
  %274 = invoke noundef i32 @_Z6getAnsi(i32 noundef %273)
          to label %275 unwind label %295

275:                                              ; preds = %272
  invoke void @_Z3remISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %274)
          to label %276 unwind label %295

276:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %277 = load i32, ptr %34, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [200005 x %"class.std::map"], ptr @child, i64 0, i64 %278
  %280 = load i32, ptr %32, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %281
  %283 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %279, ptr noundef nonnull align 4 dereferenceable(4) %282)
          to label %284 unwind label %299

284:                                              ; preds = %276
  store ptr %283, ptr %35, align 8, !tbaa !11
  %285 = load ptr, ptr %35, align 8, !tbaa !11
  %286 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %285) #7
  %287 = trunc i64 %286 to i32
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %289, label %290

289:                                              ; preds = %284
  br label %304

290:                                              ; preds = %284
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.20, i32 noundef 257, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

291:                                              ; preds = %264
  %292 = landingpad { ptr, i32 }
          cleanup
  %293 = extractvalue { ptr, i32 } %292, 0
  store ptr %293, ptr %4, align 8
  %294 = extractvalue { ptr, i32 } %292, 1
  store i32 %294, ptr %5, align 4
  br label %449

295:                                              ; preds = %434, %427, %426, %423, %416, %413, %275, %272
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %4, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %5, align 4
  br label %448

299:                                              ; preds = %330, %319, %276
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %4, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %5, align 4
  br label %386

303:                                              ; No predecessors!
  br label %304

304:                                              ; preds = %303, %289
  %305 = load i32, ptr %34, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [200005 x %"class.std::set"], ptr @vals, i64 0, i64 %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %308 = load ptr, ptr %35, align 8, !tbaa !11
  %309 = invoke ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %308)
          to label %310 unwind label %339

310:                                              ; preds = %304
  %311 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.30", ptr %37, i32 0, i32 0
  store ptr %309, ptr %311, align 8
  %312 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  %313 = load i32, ptr %32, align 4, !tbaa !5
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %314
  %316 = invoke i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %312, ptr noundef nonnull align 4 dereferenceable(4) %315)
          to label %317 unwind label %339

317:                                              ; preds = %310
  store i64 %316, ptr %36, align 4
  %318 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %307, ptr noundef nonnull align 4 dereferenceable(8) %36)
          to label %319 unwind label %339

319:                                              ; preds = %317
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  %320 = load ptr, ptr %35, align 8, !tbaa !11
  %321 = load i32, ptr %32, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [200005 x i32], ptr @wei, i64 0, i64 %322
  %324 = load i32, ptr %323, align 4, !tbaa !5
  invoke void @_Z3remISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %320, i32 noundef %324)
          to label %325 unwind label %299

325:                                              ; preds = %319
  %326 = load ptr, ptr %35, align 8, !tbaa !11
  %327 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %326) #7
  %328 = trunc i64 %327 to i32
  %329 = icmp ne i32 %328, 0
  br i1 %329, label %343, label %330

330:                                              ; preds = %325
  %331 = load i32, ptr %34, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds [200005 x %"class.std::map"], ptr @child, i64 0, i64 %332
  %334 = load i32, ptr %32, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %335
  %337 = invoke noundef i64 @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEE5eraseERS6_(ptr noundef nonnull align 8 dereferenceable(48) %333, ptr noundef nonnull align 4 dereferenceable(4) %336)
          to label %338 unwind label %299

338:                                              ; preds = %330
  br label %363

339:                                              ; preds = %317, %310, %304
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %4, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  br label %386

343:                                              ; preds = %325
  %344 = load i32, ptr %34, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [200005 x %"class.std::set"], ptr @vals, i64 0, i64 %345
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %347 = load ptr, ptr %35, align 8, !tbaa !11
  %348 = invoke ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %347)
          to label %349 unwind label %359

349:                                              ; preds = %343
  %350 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.30", ptr %39, i32 0, i32 0
  store ptr %348, ptr %350, align 8
  %351 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #7
  %352 = load i32, ptr %32, align 4, !tbaa !5
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %353
  %355 = invoke i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %351, ptr noundef nonnull align 4 dereferenceable(4) %354)
          to label %356 unwind label %359

356:                                              ; preds = %349
  store i64 %355, ptr %38, align 4
  %357 = load i64, ptr %38, align 4
  invoke void @_Z6insertISt3setISt4pairIiiESt4lessIS2_ESaIS2_EES2_EvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %346, i64 %357)
          to label %358 unwind label %359

358:                                              ; preds = %356
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %363

359:                                              ; preds = %356, %349, %343
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %4, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %386

363:                                              ; preds = %358, %338
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %364 = load i32, ptr %34, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [200005 x %"class.std::map"], ptr @child, i64 0, i64 %365
  %367 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %366, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %368 unwind label %387

368:                                              ; preds = %363
  store ptr %367, ptr %40, align 8, !tbaa !11
  %369 = load ptr, ptr %40, align 8, !tbaa !11
  %370 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %369) #7
  %371 = trunc i64 %370 to i32
  %372 = icmp ne i32 %371, 0
  br i1 %372, label %373, label %395

373:                                              ; preds = %368
  %374 = load i32, ptr %34, align 4, !tbaa !5
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds [200005 x %"class.std::set"], ptr @vals, i64 0, i64 %375
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  %377 = load ptr, ptr %40, align 8, !tbaa !11
  %378 = invoke ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %377)
          to label %379 unwind label %391

379:                                              ; preds = %373
  %380 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.30", ptr %42, i32 0, i32 0
  store ptr %378, ptr %380, align 8
  %381 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #7
  %382 = invoke i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %381, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %383 unwind label %391

383:                                              ; preds = %379
  store i64 %382, ptr %41, align 4
  %384 = load i64, ptr %41, align 4
  invoke void @_Z3remISt3setISt4pairIiiESt4lessIS2_ESaIS2_EES2_EvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %376, i64 %384)
          to label %385 unwind label %391

385:                                              ; preds = %383
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  br label %395

386:                                              ; preds = %359, %339, %299
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %448

387:                                              ; preds = %395, %363
  %388 = landingpad { ptr, i32 }
          cleanup
  %389 = extractvalue { ptr, i32 } %388, 0
  store ptr %389, ptr %4, align 8
  %390 = extractvalue { ptr, i32 } %388, 1
  store i32 %390, ptr %5, align 4
  br label %422

391:                                              ; preds = %383, %379, %373
  %392 = landingpad { ptr, i32 }
          cleanup
  %393 = extractvalue { ptr, i32 } %392, 0
  store ptr %393, ptr %4, align 8
  %394 = extractvalue { ptr, i32 } %392, 1
  store i32 %394, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  br label %422

395:                                              ; preds = %385, %368
  %396 = load ptr, ptr %40, align 8, !tbaa !11
  %397 = load i32, ptr %32, align 4, !tbaa !5
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds [200005 x i32], ptr @wei, i64 0, i64 %398
  %400 = load i32, ptr %399, align 4, !tbaa !5
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %396, i32 noundef %400)
          to label %401 unwind label %387

401:                                              ; preds = %395
  %402 = load i32, ptr %34, align 4, !tbaa !5
  %403 = sext i32 %402 to i64
  %404 = getelementptr inbounds [200005 x %"class.std::set"], ptr @vals, i64 0, i64 %403
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %405 = load ptr, ptr %40, align 8, !tbaa !11
  %406 = invoke ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %405)
          to label %407 unwind label %418

407:                                              ; preds = %401
  %408 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.30", ptr %44, i32 0, i32 0
  store ptr %406, ptr %408, align 8
  %409 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #7
  %410 = invoke i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %409, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %411 unwind label %418

411:                                              ; preds = %407
  store i64 %410, ptr %43, align 4
  %412 = load i64, ptr %43, align 4
  invoke void @_Z6insertISt3setISt4pairIiiESt4lessIS2_ESaIS2_EES2_EvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %404, i64 %412)
          to label %413 unwind label %418

413:                                              ; preds = %411
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  %414 = load i32, ptr %34, align 4, !tbaa !5
  %415 = invoke noundef i32 @_Z6getAnsi(i32 noundef %414)
          to label %416 unwind label %295

416:                                              ; preds = %413
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %415)
          to label %417 unwind label %295

417:                                              ; preds = %416
  br label %423

418:                                              ; preds = %411, %407, %401
  %419 = landingpad { ptr, i32 }
          cleanup
  %420 = extractvalue { ptr, i32 } %419, 0
  store ptr %420, ptr %4, align 8
  %421 = extractvalue { ptr, i32 } %419, 1
  store i32 %421, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  br label %422

422:                                              ; preds = %418, %391, %387
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %448

423:                                              ; preds = %417, %265
  %424 = load i32, ptr %32, align 4, !tbaa !5
  %425 = invoke noundef i32 @_Z6getAnsi(i32 noundef %424)
          to label %426 unwind label %295

426:                                              ; preds = %423
  invoke void @_Z3remISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %425)
          to label %427 unwind label %295

427:                                              ; preds = %426
  %428 = load i32, ptr %33, align 4, !tbaa !5
  %429 = load i32, ptr %32, align 4, !tbaa !5
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %430
  store i32 %428, ptr %431, align 4, !tbaa !5
  %432 = load i32, ptr %32, align 4, !tbaa !5
  %433 = invoke noundef i32 @_Z6getAnsi(i32 noundef %432)
          to label %434 unwind label %295

434:                                              ; preds = %427
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %433)
          to label %435 unwind label %295

435:                                              ; preds = %434
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %436 = invoke ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) @ans)
          to label %437 unwind label %444

437:                                              ; preds = %435
  %438 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.30", ptr %45, i32 0, i32 0
  store ptr %436, ptr %438, align 8
  %439 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %45) #7
  invoke void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %439)
          to label %440 unwind label %444

440:                                              ; preds = %437
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %441

441:                                              ; preds = %440
  %442 = load i32, ptr %31, align 4, !tbaa !5
  %443 = add nsw i32 %442, 1
  store i32 %443, ptr %31, align 4, !tbaa !5
  br label %259, !llvm.loop !20

444:                                              ; preds = %437, %435
  %445 = landingpad { ptr, i32 }
          cleanup
  %446 = extractvalue { ptr, i32 } %445, 0
  store ptr %446, ptr %4, align 8
  %447 = extractvalue { ptr, i32 } %445, 1
  store i32 %447, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  br label %448

448:                                              ; preds = %444, %422, %386, %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %449

449:                                              ; preds = %448, %291
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %452

450:                                              ; preds = %263
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  %451 = load i32, ptr %1, align 4
  ret i32 %451

452:                                              ; preds = %449, %257, %194, %160, %143, %85
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  br label %453

453:                                              ; preds = %452, %61
  %454 = load ptr, ptr %4, align 8
  %455 = load i32, ptr %5, align 4
  %456 = insertvalue { ptr, i32 } poison, ptr %454, 0
  %457 = insertvalue { ptr, i32 } %456, i32 %455, 1
  resume { ptr, i32 } %457
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3DSU5uniteEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

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

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

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

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

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

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, std::pair<int, int>>, std::allocator<std::pair<int, std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.6" }
%"class.std::_Rb_tree.6" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::multiset<int>>, std::_Select1st<std::pair<const int, std::multiset<int>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::multiset<int>>, std::_Select1st<std::pair<const int, std::multiset<int>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::multiset" = type { %"class.std::_Rb_tree.11" }
%"class.std::_Rb_tree.11" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"struct.std::pair.20" = type { i32, %"struct.std::pair" }
%"struct.std::pair" = type { i32, i32 }
%struct.DSU = type { %"class.std::vector.23" }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.22" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::_Rb_tree_const_iterator.30" = type { ptr }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@Q = external dso_local global i32, align 4
@ed = external dso_local global %"class.std::vector", align 8
@vals = external dso_local global [200005 x %"class.std::set"], align 16
@child = external dso_local global [200005 x %"class.std::map"], align 16
@ans = external dso_local global %"class.std::multiset", align 8
@adj = external dso_local global [200005 x %"class.std::vector.15"], align 16
@par = external dso_local local_unnamed_addr global [200005 x i32], align 16
@wei = external dso_local local_unnamed_addr global [200005 x i32], align 16
@col = external dso_local global [200005 x i32], align 16
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [117 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z6getAnsi(i32 noundef) local_unnamed_addr #2

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

24:                                               ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %25 unwind label %34

25:                                               ; preds = %24
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  call void @_ZN5input2reIiJiiiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @M, ptr noundef nonnull align 4 dereferenceable(4) @K, ptr noundef nonnull align 4 dereferenceable(4) @Q)
  %26 = load i32, ptr @M, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %25
  %28 = call ptr @_ZSt5beginISt6vectorISt4pairIiS1_IiiEESaIS3_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) @ed)
  %29 = call ptr @_ZSt3endISt6vectorISt4pairIiS1_IiiEESaIS3_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) @ed)
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIiS2_IiiEESt6vectorIS4_SaIS4_EEEEEvT_SA_(ptr %28, ptr %29)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @_ZN3DSUC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %30 = load i32, ptr @N, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  invoke void @_ZN3DSU4initEi(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %31)
          to label %40 unwind label %45

32:                                               ; preds = %0
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %36

34:                                               ; preds = %24
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  br label %36

36:                                               ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #7
  br label %236

.lr.ph:                                           ; preds = %25, %.lr.ph
  %.06596 = phi i32 [ %37, %.lr.ph ], [ 0, %25 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @_ZN5input2reIiJiiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @_ZNSt4pairIiS_IiiEEC2IiS0_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKiRKS0_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) @ed, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %37 = add nuw nsw i32 %.06596, 1
  %38 = load i32, ptr @M, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %.lr.ph, label %._crit_edge, !llvm.loop !9

40:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %41 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ed) #7
  store ptr %41, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %42 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ed) #7
  store ptr %42, ptr %10, align 8
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %43, label %.lr.ph98, label %._crit_edge99

._crit_edge99:                                    ; preds = %69, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  invoke void @_Z3dfsi(i32 noundef 1)
          to label %.preheader95 unwind label %45

.preheader95:                                     ; preds = %._crit_edge99
  %44 = load i32, ptr @N, align 4, !tbaa !5
  %.not100 = icmp slt i32 %44, 1
  br i1 %.not100, label %.preheader, label %.lr.ph102

45:                                               ; preds = %._crit_edge99, %._crit_edge
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %235

.lr.ph98:                                         ; preds = %40, %69
  %47 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %48 = getelementptr inbounds i8, ptr %47, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = getelementptr inbounds i8, ptr %47, i64 8
  %51 = load i32, ptr %50, align 4, !tbaa !14
  %52 = invoke noundef zeroext i1 @_ZN3DSU5uniteEii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef %49, i32 noundef %51)
          to label %53 unwind label %63

53:                                               ; preds = %.lr.ph98
  br i1 %52, label %54, label %69

54:                                               ; preds = %53
  %55 = load i32, ptr %48, align 4, !tbaa !11
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [200005 x %"class.std::vector.15"], ptr @adj, i64 0, i64 %56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %50, ptr noundef nonnull align 4 dereferenceable(4) %47)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %58 unwind label %65

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %59 = load i32, ptr %50, align 4, !tbaa !14
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200005 x %"class.std::vector.15"], ptr @adj, i64 0, i64 %60
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef nonnull align 4 dereferenceable(4) %47)
  invoke void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %62 unwind label %67

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %69

63:                                               ; preds = %.lr.ph98
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %72

65:                                               ; preds = %54
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %72

67:                                               ; preds = %58
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %72

69:                                               ; preds = %62, %53
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %71 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %71, label %.lr.ph98, label %._crit_edge99

72:                                               ; preds = %67, %65, %63
  %.pn89 = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %235

.preheader94:                                     ; preds = %74
  %.not73103 = icmp slt i32 %75, 1
  br i1 %.not73103, label %.preheader, label %.lr.ph105

.lr.ph102:                                        ; preds = %.preheader95, %74
  %indvars.iv = phi i64 [ %indvars.iv.next, %74 ], [ 1, %.preheader95 ]
  %73 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %indvars.iv
  invoke void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %73)
          to label %74 unwind label %77

74:                                               ; preds = %.lr.ph102
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %75 = load i32, ptr @N, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %.not.not = icmp slt i64 %indvars.iv, %76
  br i1 %.not.not, label %.lr.ph102, label %.preheader94, !llvm.loop !15

77:                                               ; preds = %.lr.ph102
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %235

.preheader93:                                     ; preds = %93
  %79 = icmp slt i32 %94, 1
  br i1 %79, label %.preheader, label %.lr.ph111

.lr.ph105:                                        ; preds = %.preheader94, %93
  %80 = phi i32 [ %94, %93 ], [ %75, %.preheader94 ]
  %indvars.iv116 = phi i64 [ %indvars.iv.next117, %93 ], [ 1, %.preheader94 ]
  %81 = getelementptr inbounds [200005 x i32], ptr @par, i64 0, i64 %indvars.iv116
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %.not88 = icmp eq i32 %82, 0
  br i1 %.not88, label %93, label %83

83:                                               ; preds = %.lr.ph105
  %84 = sext i32 %82 to i64
  %85 = getelementptr inbounds [200005 x %"class.std::map"], ptr @child, i64 0, i64 %84
  %86 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %indvars.iv116
  %87 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %85, ptr noundef nonnull align 4 dereferenceable(4) %86)
          to label %88 unwind label %91

88:                                               ; preds = %83
  %89 = getelementptr inbounds [200005 x i32], ptr @wei, i64 0, i64 %indvars.iv116
  %90 = load i32, ptr %89, align 4, !tbaa !5
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %87, i32 noundef %90)
          to label %._crit_edge122 unwind label %91

._crit_edge122:                                   ; preds = %88
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %93

91:                                               ; preds = %88, %83
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %235

93:                                               ; preds = %._crit_edge122, %.lr.ph105
  %94 = phi i32 [ %.pre, %._crit_edge122 ], [ %80, %.lr.ph105 ]
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %95 = sext i32 %94 to i64
  %.not73.not = icmp slt i64 %indvars.iv116, %95
  br i1 %.not73.not, label %.lr.ph105, label %.preheader93, !llvm.loop !16

.preheader:                                       ; preds = %118, %.preheader95, %.preheader94, %.preheader93
  %96 = load i32, ptr @Q, align 4, !tbaa !5
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.lr.ph113, label %._crit_edge114

.lr.ph111:                                        ; preds = %.preheader93, %118
  %indvars.iv119 = phi i64 [ %indvars.iv.next120, %118 ], [ 1, %.preheader93 ]
  %98 = getelementptr inbounds [200005 x %"class.std::map"], ptr @child, i64 0, i64 %indvars.iv119
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %99 = call ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %98) #7
  store ptr %99, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %100 = call ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %98) #7
  store ptr %100, ptr %14, align 8
  %101 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt8multisetIiSt4lessIiESaIiEEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br i1 %101, label %.lr.ph107, label %._crit_edge108

.lr.ph107:                                        ; preds = %.lr.ph111
  %102 = getelementptr inbounds [200005 x %"class.std::set"], ptr @vals, i64 0, i64 %indvars.iv119
  br label %105

._crit_edge108:                                   ; preds = %112, %.lr.ph111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %103 = trunc nuw nsw i64 %indvars.iv119 to i32
  %104 = invoke noundef i32 @_Z6getAnsi(i32 noundef %103)
          to label %117 unwind label %121

105:                                              ; preds = %.lr.ph107, %112
  %106 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt8multisetIiSt4lessIiESaIiEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %107 = getelementptr inbounds i8, ptr %106, i64 8
  %108 = call ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %107)
  store ptr %108, ptr %15, align 8
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %110 = invoke i64 @_ZSt9make_pairIRKiS1_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %109, ptr noundef nonnull align 4 dereferenceable(4) %106)
          to label %111 unwind label %115

111:                                              ; preds = %105
  invoke void @_Z6insertISt3setISt4pairIiiESt4lessIS2_ESaIS2_EES2_EvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %102, i64 %110)
          to label %112 unwind label %115

112:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt8multisetIiSt4lessIiESaIiEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %114 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt8multisetIiSt4lessIiESaIiEEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br i1 %114, label %105, label %._crit_edge108

115:                                              ; preds = %111, %105
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %235

117:                                              ; preds = %._crit_edge108
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %104)
          to label %118 unwind label %121

118:                                              ; preds = %117
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %119 = load i32, ptr @N, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %.not74.not = icmp slt i64 %indvars.iv119, %120
  br i1 %.not74.not, label %.lr.ph111, label %.preheader, !llvm.loop !17

121:                                              ; preds = %117, %._crit_edge108
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %235

._crit_edge114:                                   ; preds = %228, %.preheader
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  ret i32 0

.lr.ph113:                                        ; preds = %.preheader, %228
  %.069112 = phi i32 [ %229, %228 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  invoke void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %123 unwind label %142

123:                                              ; preds = %.lr.ph113
  %124 = load i32, ptr %16, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [200005 x i32], ptr @par, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %.not75 = icmp eq i32 %127, 0
  br i1 %.not75, label %214, label %128

128:                                              ; preds = %123
  %129 = invoke noundef i32 @_Z6getAnsi(i32 noundef %127)
          to label %130 unwind label %144

130:                                              ; preds = %128
  invoke void @_Z3remISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %129)
          to label %131 unwind label %144

131:                                              ; preds = %130
  %132 = sext i32 %127 to i64
  %133 = getelementptr inbounds [200005 x %"class.std::map"], ptr @child, i64 0, i64 %132
  %134 = load i32, ptr %16, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %135
  %137 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %133, ptr noundef nonnull align 4 dereferenceable(4) %136)
          to label %138 unwind label %146

138:                                              ; preds = %131
  %139 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %137) #7
  %140 = and i64 %139, 4294967295
  %.not76 = icmp eq i64 %140, 0
  br i1 %.not76, label %141, label %148

141:                                              ; preds = %138
  call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.20, i32 noundef 257, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

142:                                              ; preds = %.lr.ph113
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %234

144:                                              ; preds = %224, %218, %217, %214, %211, %209, %130, %128
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %234

146:                                              ; preds = %166, %158, %131
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %234

148:                                              ; preds = %138
  %149 = getelementptr inbounds [200005 x %"class.std::set"], ptr @vals, i64 0, i64 %132
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %150 = call ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %137)
  store ptr %150, ptr %19, align 8
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  %152 = load i32, ptr %16, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %153
  %155 = invoke i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %151, ptr noundef nonnull align 4 dereferenceable(4) %154)
          to label %156 unwind label %171

156:                                              ; preds = %148
  store i64 %155, ptr %18, align 8
  %157 = invoke noundef i64 @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE5eraseERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %149, ptr noundef nonnull align 4 dereferenceable(8) %18)
          to label %158 unwind label %171

158:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  %159 = load i32, ptr %16, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [200005 x i32], ptr @wei, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !5
  invoke void @_Z3remISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %137, i32 noundef %162)
          to label %163 unwind label %146

163:                                              ; preds = %158
  %164 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %137) #7
  %165 = and i64 %164, 4294967295
  %.not77 = icmp eq i64 %165, 0
  br i1 %.not77, label %166, label %173

166:                                              ; preds = %163
  %167 = load i32, ptr %16, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %168
  %170 = invoke noundef i64 @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEE5eraseERS6_(ptr noundef nonnull align 8 dereferenceable(48) %133, ptr noundef nonnull align 4 dereferenceable(4) %169)
          to label %184 unwind label %146

171:                                              ; preds = %156, %148
  %172 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br label %234

173:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  %174 = call ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %137)
  store ptr %174, ptr %20, align 8
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  %176 = load i32, ptr %16, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %177
  %179 = invoke i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %175, ptr noundef nonnull align 4 dereferenceable(4) %178)
          to label %180 unwind label %182

180:                                              ; preds = %173
  invoke void @_Z6insertISt3setISt4pairIiiESt4lessIS2_ESaIS2_EES2_EvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %149, i64 %179)
          to label %181 unwind label %182

181:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br label %184

182:                                              ; preds = %180, %173
  %183 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br label %234

184:                                              ; preds = %166, %181
  %185 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiSt8multisetIiSt4lessIiESaIiEES2_SaISt4pairIKiS4_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %133, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %186 unwind label %195

186:                                              ; preds = %184
  %187 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %185) #7
  %188 = and i64 %187, 4294967295
  %.not80 = icmp eq i64 %188, 0
  br i1 %.not80, label %199, label %189

189:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  %190 = call ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %185)
  store ptr %190, ptr %21, align 8
  %191 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %192 = invoke i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %191, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %193 unwind label %197

193:                                              ; preds = %189
  invoke void @_Z3remISt3setISt4pairIiiESt4lessIS2_ESaIS2_EES2_EvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %149, i64 %192)
          to label %194 unwind label %197

194:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  br label %199

195:                                              ; preds = %199, %184
  %196 = landingpad { ptr, i32 }
          cleanup
  br label %234

197:                                              ; preds = %193, %189
  %198 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  br label %234

199:                                              ; preds = %194, %186
  %200 = load i32, ptr %16, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [200005 x i32], ptr @wei, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !5
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %185, i32 noundef %203)
          to label %204 unwind label %195

204:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %205 = call ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) %185)
  store ptr %205, ptr %22, align 8
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %207 = invoke i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %206, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %208 unwind label %212

208:                                              ; preds = %204
  invoke void @_Z6insertISt3setISt4pairIiiESt4lessIS2_ESaIS2_EES2_EvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) %149, i64 %207)
          to label %209 unwind label %212

209:                                              ; preds = %208
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  %210 = invoke noundef i32 @_Z6getAnsi(i32 noundef %127)
          to label %211 unwind label %144

211:                                              ; preds = %209
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %210)
          to label %._crit_edge123 unwind label %144

._crit_edge123:                                   ; preds = %211
  %.pre124 = load i32, ptr %16, align 4, !tbaa !5
  br label %214

212:                                              ; preds = %208, %204
  %213 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %234

214:                                              ; preds = %._crit_edge123, %123
  %215 = phi i32 [ %.pre124, %._crit_edge123 ], [ %124, %123 ]
  %216 = invoke noundef i32 @_Z6getAnsi(i32 noundef %215)
          to label %217 unwind label %144

217:                                              ; preds = %214
  invoke void @_Z3remISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %216)
          to label %218 unwind label %144

218:                                              ; preds = %217
  %219 = load i32, ptr %17, align 4, !tbaa !5
  %220 = load i32, ptr %16, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [200005 x i32], ptr @col, i64 0, i64 %221
  store i32 %219, ptr %222, align 4, !tbaa !5
  %223 = invoke noundef i32 @_Z6getAnsi(i32 noundef %220)
          to label %224 unwind label %144

224:                                              ; preds = %218
  invoke void @_Z6insertISt8multisetIiSt4lessIiESaIiEEiEvRT_T0_(ptr noundef nonnull align 8 dereferenceable(48) @ans, i32 noundef %223)
          to label %225 unwind label %144

225:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  %226 = call ptr @_ZSt5beginISt8multisetIiSt4lessIiESaIiEEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(48) @ans)
  store ptr %226, ptr %23, align 8
  %227 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  invoke void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %227)
          to label %228 unwind label %232

228:                                              ; preds = %225
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  %229 = add nuw nsw i32 %.069112, 1
  %230 = load i32, ptr @Q, align 4, !tbaa !5
  %231 = icmp slt i32 %229, %230
  br i1 %231, label %.lr.ph113, label %._crit_edge114, !llvm.loop !18

232:                                              ; preds = %225
  %233 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  br label %234

234:                                              ; preds = %144, %232, %182, %171, %146, %212, %197, %195, %142
  %.pn83.pn = phi { ptr, i32 } [ %143, %142 ], [ %233, %232 ], [ %145, %144 ], [ %183, %182 ], [ %147, %146 ], [ %172, %171 ], [ %213, %212 ], [ %196, %195 ], [ %198, %197 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %235

235:                                              ; preds = %115, %121, %234, %91, %77, %72, %45
  %.pn89.pn = phi { ptr, i32 } [ %.pn89, %72 ], [ %78, %77 ], [ %92, %91 ], [ %.pn83.pn, %234 ], [ %46, %45 ], [ %116, %115 ], [ %122, %121 ]
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %236

236:                                              ; preds = %235, %36
  %.pn89.pn.pn = phi { ptr, i32 } [ %.pn89.pn, %235 ], [ %.pn, %36 ]
  resume { ptr, i32 } %.pn89.pn.pn
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3DSU5uniteEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

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

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

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

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

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

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

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

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

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

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


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