; LLVM IR from kazunetakahashi/atcoder :: 201510_201609/1016_ARC045 (D)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::vector<int>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::vector<int>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::vector<int>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::vector<int>>>, std::less<std::__cxx11::basic_string<char>>>::_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::set" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__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] }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type { %"class.std::__cxx11::basic_string", %"class.std::vector" }
%"struct.std::pair.11" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::back_insert_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@graph_pass = external dso_local global [200010 x %"class.std::vector"], align 16
@root = external dso_local global i32, align 4
@depth = external dso_local global [200010 x i32], align 16
@parent = external dso_local global [200010 x i32], align 16
@lowest = external dso_local global [200010 x i32], align 16
@odd_renketsu = external dso_local global %"class.std::vector", align 8
@kansetsu_v = external dso_local global %"class.std::vector", align 8
@graph_tree = external dso_local global [200010 x %"class.std::vector"], align 16
@_Z5XYsetB5cxx11 = external dso_local global %"class.std::map", align 8
@settree = external dso_local global [200010 x %"class.std::set"], align 16
@visited = external dso_local global [200010 x i8], align 16
@finalans = external dso_local global [200010 x i8], align 16
@child_memo = external dso_local global [200010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11calc_lowestv() #1

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z13calc_kansetsuv() #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15make_graph_treev() #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z10calc_childi(i32 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair.11", align 8
  %17 = alloca %"struct.std::pair.11", align 8
  %18 = alloca %"struct.std::pair.11", align 8
  %19 = alloca %"struct.std::pair.11", align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %24 = alloca i32, align 4
  %25 = alloca i8, align 1
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::vector", align 8
  %31 = alloca i32, align 4
  %32 = alloca %"class.std::stack", align 8
  %33 = alloca ptr, align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %36 = alloca i32, align 4
  %37 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %39 = alloca %"class.std::back_insert_iterator", align 8
  %40 = alloca %"class.std::back_insert_iterator", align 8
  %41 = alloca i32, align 4
  %42 = alloca i8, align 1
  %43 = alloca i32, align 4
  %44 = alloca ptr, align 8
  %45 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %46 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %47 = alloca i32, align 4
  %48 = alloca ptr, align 8
  %49 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %50 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %51 = alloca i32, align 4
  %52 = alloca ptr, align 8
  %53 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %54 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %58 = load i32, ptr @N, align 4, !tbaa !5
  %59 = mul nsw i32 2, %58
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr @N, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %79, %0
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = load i32, ptr @N, align 4, !tbaa !5
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %105

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %68 unwind label %82

68:                                               ; preds = %66
  %69 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %70 unwind label %82

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str)
          to label %71 unwind label %86

71:                                               ; preds = %70
  %72 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @_Z5XYsetB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %73 unwind label %90

73:                                               ; preds = %71
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %74 unwind label %90

74:                                               ; preds = %73
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.10)
          to label %75 unwind label %95

75:                                               ; preds = %74
  %76 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @_Z5XYsetB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %77 unwind label %99

77:                                               ; preds = %75
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %76, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %78 unwind label %99

78:                                               ; preds = %77
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %2, align 4, !tbaa !5
  br label %61, !llvm.loop !9

82:                                               ; preds = %68, %66
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %5, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %6, align 4
  br label %104

86:                                               ; preds = %70
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %5, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %6, align 4
  br label %94

90:                                               ; preds = %73, %71
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %5, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %94

94:                                               ; preds = %90, %86
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  br label %104

95:                                               ; preds = %74
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %5, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %6, align 4
  br label %103

99:                                               ; preds = %77, %75
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %5, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %103

103:                                              ; preds = %99, %95
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  br label %104

104:                                              ; preds = %103, %94, %82
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %517

105:                                              ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr @_Z5XYsetB5cxx11, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %106 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z5XYsetB5cxx11) #7
  %107 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %10, i32 0, i32 0
  store ptr %106, ptr %107, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %108 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z5XYsetB5cxx11) #7
  %109 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %11, i32 0, i32 0
  store ptr %108, ptr %109, align 8
  br label %110

110:                                              ; preds = %212, %105
  %111 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEESE_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %111, label %113, label %112

112:                                              ; preds = %110
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %214

113:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #7
  %114 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEC2ERKSA_(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 8 dereferenceable(56) %114)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %115 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %116 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %115) #7
  %117 = trunc i64 %116 to i32
  store i32 %117, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %204, %113
  %119 = load i32, ptr %15, align 4, !tbaa !5
  %120 = load i32, ptr %14, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %211

123:                                              ; preds = %118
  %124 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %125 = load i32, ptr %15, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %126) #7
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %129
  %131 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %132 = load i32, ptr %15, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  %134 = load i32, ptr %14, align 4, !tbaa !5
  %135 = srem i32 %133, %134
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %136) #7
  %138 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %130, ptr noundef nonnull align 4 dereferenceable(4) %137)
          to label %139 unwind label %207

139:                                              ; preds = %123
  %140 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 0
  %141 = extractvalue { ptr, i8 } %138, 0
  store ptr %141, ptr %140, align 8
  %142 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 1
  %143 = extractvalue { ptr, i8 } %138, 1
  store i8 %143, ptr %142, align 8
  %144 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %145 = load i32, ptr %15, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  %147 = load i32, ptr %14, align 4, !tbaa !5
  %148 = srem i32 %146, %147
  %149 = sext i32 %148 to i64
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %149) #7
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %152
  %154 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %155 = load i32, ptr %15, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %156) #7
  %158 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %153, ptr noundef nonnull align 4 dereferenceable(4) %157)
          to label %159 unwind label %207

159:                                              ; preds = %139
  %160 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 0
  %161 = extractvalue { ptr, i8 } %158, 0
  store ptr %161, ptr %160, align 8
  %162 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 1
  %163 = extractvalue { ptr, i8 } %158, 1
  store i8 %163, ptr %162, align 8
  %164 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %165 = load i32, ptr %15, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %164, i64 noundef %166) #7
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %169
  %171 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %172 = load i32, ptr %15, align 4, !tbaa !5
  %173 = add nsw i32 %172, 2
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = srem i32 %173, %174
  %176 = sext i32 %175 to i64
  %177 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef %176) #7
  %178 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %170, ptr noundef nonnull align 4 dereferenceable(4) %177)
          to label %179 unwind label %207

179:                                              ; preds = %159
  %180 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %181 = extractvalue { ptr, i8 } %178, 0
  store ptr %181, ptr %180, align 8
  %182 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %183 = extractvalue { ptr, i8 } %178, 1
  store i8 %183, ptr %182, align 8
  %184 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %185 = load i32, ptr %15, align 4, !tbaa !5
  %186 = add nsw i32 %185, 2
  %187 = load i32, ptr %14, align 4, !tbaa !5
  %188 = srem i32 %186, %187
  %189 = sext i32 %188 to i64
  %190 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %189) #7
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %192
  %194 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %195 = load i32, ptr %15, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %194, i64 noundef %196) #7
  %198 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %193, ptr noundef nonnull align 4 dereferenceable(4) %197)
          to label %199 unwind label %207

199:                                              ; preds = %179
  %200 = getelementptr inbounds { ptr, i8 }, ptr %19, i32 0, i32 0
  %201 = extractvalue { ptr, i8 } %198, 0
  store ptr %201, ptr %200, align 8
  %202 = getelementptr inbounds { ptr, i8 }, ptr %19, i32 0, i32 1
  %203 = extractvalue { ptr, i8 } %198, 1
  store i8 %203, ptr %202, align 8
  br label %204

204:                                              ; preds = %199
  %205 = load i32, ptr %15, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %15, align 4, !tbaa !5
  br label %118, !llvm.loop !13

207:                                              ; preds = %179, %159, %139, %123
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %5, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %517

211:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #7
  br label %212

212:                                              ; preds = %211
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %110

214:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %247, %214
  %216 = load i32, ptr %20, align 4, !tbaa !5
  %217 = load i32, ptr @N, align 4, !tbaa !5
  %218 = icmp slt i32 %216, %217
  br i1 %218, label %220, label %219

219:                                              ; preds = %215
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %250

220:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %221 = load i32, ptr %20, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %222
  store ptr %223, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %224 = load ptr, ptr %21, align 8, !tbaa !11
  %225 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %224) #7
  %226 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  store ptr %225, ptr %226, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %227 = load ptr, ptr %21, align 8, !tbaa !11
  %228 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %227) #7
  %229 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %23, i32 0, i32 0
  store ptr %228, ptr %229, align 8
  br label %230

230:                                              ; preds = %244, %220
  %231 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  br i1 %231, label %233, label %232

232:                                              ; preds = %230
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %246

233:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %234 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %235 = load i32, ptr %234, align 4, !tbaa !5
  store i32 %235, ptr %24, align 4, !tbaa !5
  %236 = load i32, ptr %20, align 4, !tbaa !5
  %237 = load i32, ptr %24, align 4, !tbaa !5
  %238 = icmp ne i32 %236, %237
  br i1 %238, label %239, label %243

239:                                              ; preds = %233
  %240 = load i32, ptr %20, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @graph_pass, i64 0, i64 %241
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %242, ptr noundef nonnull align 4 dereferenceable(4) %24)
  br label %243

243:                                              ; preds = %239, %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %244

244:                                              ; preds = %243
  %245 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  br label %230

246:                                              ; preds = %232
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %20, align 4, !tbaa !5
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %20, align 4, !tbaa !5
  br label %215, !llvm.loop !14

250:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #7
  store i8 0, ptr %25, align 1, !tbaa !15
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @visited, ptr noundef getelementptr inbounds (i8, ptr @visited, i64 200010), ptr noundef nonnull align 1 dereferenceable(1) %25)
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %251

251:                                              ; preds = %358, %250
  %252 = load i32, ptr %31, align 4, !tbaa !5
  %253 = load i32, ptr @N, align 4, !tbaa !5
  %254 = icmp slt i32 %252, %253
  br i1 %254, label %256, label %255

255:                                              ; preds = %251
  store i32 15, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %361

256:                                              ; preds = %251
  %257 = load i32, ptr %31, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [200010 x i8], ptr @visited, i64 0, i64 %258
  %260 = load i8, ptr %259, align 1, !tbaa !15, !range !17, !noundef !18
  %261 = trunc i8 %260 to i1
  br i1 %261, label %357, label %262

262:                                              ; preds = %256
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  %263 = load i32, ptr %31, align 4, !tbaa !5
  store i32 %263, ptr %26, align 4, !tbaa !5
  store i32 0, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %32) #7
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %32)
          to label %264 unwind label %299

264:                                              ; preds = %262
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %32, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %265 unwind label %303

265:                                              ; preds = %264
  br label %266

266:                                              ; preds = %325, %265
  %267 = invoke noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %32)
          to label %268 unwind label %303

268:                                              ; preds = %266
  %269 = xor i1 %267, true
  br i1 %269, label %270, label %326

270:                                              ; preds = %268
  %271 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %32)
          to label %272 unwind label %303

272:                                              ; preds = %270
  %273 = load i32, ptr %271, align 4, !tbaa !5
  store i32 %273, ptr %27, align 4, !tbaa !5
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %32)
          to label %274 unwind label %303

274:                                              ; preds = %272
  %275 = load i32, ptr %27, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [200010 x i8], ptr @visited, i64 0, i64 %276
  %278 = load i8, ptr %277, align 1, !tbaa !15, !range !17, !noundef !18
  %279 = trunc i8 %278 to i1
  br i1 %279, label %325, label %280

280:                                              ; preds = %274
  %281 = load i32, ptr %27, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [200010 x i8], ptr @visited, i64 0, i64 %282
  store i8 1, ptr %283, align 1, !tbaa !15
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %284 unwind label %303

284:                                              ; preds = %280
  %285 = load i32, ptr %28, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %287 = load i32, ptr %27, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @graph_pass, i64 0, i64 %288
  store ptr %289, ptr %33, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %290 = load ptr, ptr %33, align 8, !tbaa !11
  %291 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %290) #7
  %292 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %291, ptr %292, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %293 = load ptr, ptr %33, align 8, !tbaa !11
  %294 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %293) #7
  %295 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %35, i32 0, i32 0
  store ptr %294, ptr %295, align 8
  br label %296

296:                                              ; preds = %322, %284
  %297 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  br i1 %297, label %307, label %298

298:                                              ; preds = %296
  store i32 20, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %324

299:                                              ; preds = %262
  %300 = landingpad { ptr, i32 }
          cleanup
  %301 = extractvalue { ptr, i32 } %300, 0
  store ptr %301, ptr %5, align 8
  %302 = extractvalue { ptr, i32 } %300, 1
  store i32 %302, ptr %6, align 4
  br label %356

303:                                              ; preds = %341, %335, %280, %272, %270, %266, %264
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %5, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %6, align 4
  br label %355

307:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %308 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #7
  %309 = load i32, ptr %308, align 4, !tbaa !5
  store i32 %309, ptr %36, align 4, !tbaa !5
  %310 = load i32, ptr %36, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [200010 x i8], ptr @visited, i64 0, i64 %311
  %313 = load i8, ptr %312, align 1, !tbaa !15, !range !17, !noundef !18
  %314 = trunc i8 %313 to i1
  br i1 %314, label %321, label %315

315:                                              ; preds = %307
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %32, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %316 unwind label %317

316:                                              ; preds = %315
  br label %321

317:                                              ; preds = %315
  %318 = landingpad { ptr, i32 }
          cleanup
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %5, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %355

321:                                              ; preds = %316, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %322

322:                                              ; preds = %321
  %323 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #7
  br label %296

324:                                              ; preds = %298
  br label %325

325:                                              ; preds = %324, %274
  br label %266, !llvm.loop !19

326:                                              ; preds = %268
  %327 = load i32, ptr %28, align 4, !tbaa !5
  %328 = srem i32 %327, 2
  %329 = icmp eq i32 %328, 1
  br i1 %329, label %330, label %354

330:                                              ; preds = %326
  %331 = load i32, ptr %29, align 4, !tbaa !5
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %29, align 4, !tbaa !5
  %333 = load i32, ptr %29, align 4, !tbaa !5
  %334 = icmp eq i32 %333, 1
  br i1 %334, label %335, label %353

335:                                              ; preds = %330
  %336 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  %337 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  store ptr %336, ptr %337, align 8
  %338 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  %339 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %38, i32 0, i32 0
  store ptr %338, ptr %339, align 8
  %340 = invoke ptr @_ZSt13back_inserterISt6vectorIiSaIiEEESt20back_insert_iteratorIT_ERS4_(ptr noundef nonnull align 8 dereferenceable(24) @odd_renketsu)
          to label %341 unwind label %303

341:                                              ; preds = %335
  %342 = getelementptr inbounds %"class.std::back_insert_iterator", ptr %39, i32 0, i32 0
  store ptr %340, ptr %342, align 8
  %343 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  %344 = load ptr, ptr %343, align 8
  %345 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %38, i32 0, i32 0
  %346 = load ptr, ptr %345, align 8
  %347 = getelementptr inbounds %"class.std::back_insert_iterator", ptr %39, i32 0, i32 0
  %348 = load ptr, ptr %347, align 8
  %349 = invoke ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEESt20back_insert_iteratorIS5_EET0_T_SA_S9_(ptr %344, ptr %346, ptr %348)
          to label %350 unwind label %303

350:                                              ; preds = %341
  %351 = getelementptr inbounds %"class.std::back_insert_iterator", ptr %40, i32 0, i32 0
  store ptr %349, ptr %351, align 8
  %352 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %352, ptr @root, align 4, !tbaa !5
  br label %353

353:                                              ; preds = %350, %330
  br label %354

354:                                              ; preds = %353, %326
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %32) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %32) #7
  br label %357

355:                                              ; preds = %317, %303
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %32) #7
  br label %356

356:                                              ; preds = %355, %299
  call void @llvm.lifetime.end.p0(i64 80, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %516

357:                                              ; preds = %354, %256
  br label %358

358:                                              ; preds = %357
  %359 = load i32, ptr %31, align 4, !tbaa !5
  %360 = add nsw i32 %359, 1
  store i32 %360, ptr %31, align 4, !tbaa !5
  br label %251, !llvm.loop !20

361:                                              ; preds = %255
  %362 = load i32, ptr %29, align 4, !tbaa !5
  %363 = icmp sgt i32 %362, 1
  br i1 %363, label %364, label %383

364:                                              ; preds = %361
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  store i32 0, ptr %41, align 4, !tbaa !5
  br label %365

365:                                              ; preds = %375, %364
  %366 = load i32, ptr %41, align 4, !tbaa !5
  %367 = load i32, ptr @N, align 4, !tbaa !5
  %368 = icmp slt i32 %366, %367
  br i1 %368, label %370, label %369

369:                                              ; preds = %365
  store i32 22, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  br label %382

370:                                              ; preds = %365
  %371 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
          to label %372 unwind label %378

372:                                              ; preds = %370
  %373 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %371, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %374 unwind label %378

374:                                              ; preds = %372
  br label %375

375:                                              ; preds = %374
  %376 = load i32, ptr %41, align 4, !tbaa !5
  %377 = add nsw i32 %376, 1
  store i32 %377, ptr %41, align 4, !tbaa !5
  br label %365, !llvm.loop !21

378:                                              ; preds = %372, %370
  %379 = landingpad { ptr, i32 }
          cleanup
  %380 = extractvalue { ptr, i32 } %379, 0
  store ptr %380, ptr %5, align 8
  %381 = extractvalue { ptr, i32 } %379, 1
  store i32 %381, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  br label %516

382:                                              ; preds = %369
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %512

383:                                              ; preds = %361
  call void @llvm.lifetime.start.p0(i64 1, ptr %42) #7
  store i8 0, ptr %42, align 1, !tbaa !15
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @finalans, ptr noundef getelementptr inbounds (i8, ptr @finalans, i64 200010), ptr noundef nonnull align 1 dereferenceable(1) %42)
          to label %384 unwind label %397

384:                                              ; preds = %383
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #7
  invoke void @_Z11calc_lowestv()
          to label %385 unwind label %401

385:                                              ; preds = %384
  %386 = invoke noundef i32 @_Z13calc_kansetsuv()
          to label %387 unwind label %401

387:                                              ; preds = %385
  invoke void @_Z15make_graph_treev()
          to label %388 unwind label %401

388:                                              ; preds = %387
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  store i32 -1, ptr %43, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @child_memo, ptr noundef getelementptr inbounds (i32, ptr @child_memo, i64 200010), ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %389 unwind label %405

389:                                              ; preds = %388
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  store ptr @odd_renketsu, ptr %44, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %390 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @odd_renketsu) #7
  %391 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %45, i32 0, i32 0
  store ptr %390, ptr %391, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #7
  %392 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @odd_renketsu) #7
  %393 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %46, i32 0, i32 0
  store ptr %392, ptr %393, align 8
  br label %394

394:                                              ; preds = %415, %389
  %395 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %46) #7
  br i1 %395, label %409, label %396

396:                                              ; preds = %394
  store i32 25, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  br label %417

397:                                              ; preds = %383
  %398 = landingpad { ptr, i32 }
          cleanup
  %399 = extractvalue { ptr, i32 } %398, 0
  store ptr %399, ptr %5, align 8
  %400 = extractvalue { ptr, i32 } %398, 1
  store i32 %400, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #7
  br label %516

401:                                              ; preds = %387, %385, %384
  %402 = landingpad { ptr, i32 }
          cleanup
  %403 = extractvalue { ptr, i32 } %402, 0
  store ptr %403, ptr %5, align 8
  %404 = extractvalue { ptr, i32 } %402, 1
  store i32 %404, ptr %6, align 4
  br label %516

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

409:                                              ; preds = %394
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  %410 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %45) #7
  %411 = load i32, ptr %410, align 4, !tbaa !5
  store i32 %411, ptr %47, align 4, !tbaa !5
  %412 = load i32, ptr %47, align 4, !tbaa !5
  %413 = sext i32 %412 to i64
  %414 = getelementptr inbounds [200010 x i8], ptr @finalans, i64 0, i64 %413
  store i8 1, ptr %414, align 1, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  br label %415

415:                                              ; preds = %409
  %416 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %45) #7
  br label %394

417:                                              ; preds = %396
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #7
  store ptr @kansetsu_v, ptr %48, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #7
  %418 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @kansetsu_v) #7
  %419 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %49, i32 0, i32 0
  store ptr %418, ptr %419, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #7
  %420 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @kansetsu_v) #7
  %421 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %50, i32 0, i32 0
  store ptr %420, ptr %421, align 8
  br label %422

422:                                              ; preds = %481, %417
  %423 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  br i1 %423, label %425, label %424

424:                                              ; preds = %422
  store i32 27, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  br label %483

425:                                              ; preds = %422
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #7
  %426 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %49) #7
  %427 = load i32, ptr %426, align 4, !tbaa !5
  store i32 %427, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #7
  %428 = load i32, ptr %51, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @graph_tree, i64 0, i64 %429
  store ptr %430, ptr %52, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #7
  %431 = load ptr, ptr %52, align 8, !tbaa !11
  %432 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %431) #7
  %433 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %53, i32 0, i32 0
  store ptr %432, ptr %433, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #7
  %434 = load ptr, ptr %52, align 8, !tbaa !11
  %435 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %434) #7
  %436 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %54, i32 0, i32 0
  store ptr %435, ptr %436, align 8
  br label %437

437:                                              ; preds = %477, %425
  %438 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %54) #7
  br i1 %438, label %440, label %439

439:                                              ; preds = %437
  store i32 29, ptr %12, align 4
  br label %479

440:                                              ; preds = %437
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #7
  %441 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %53) #7
  %442 = load i32, ptr %441, align 4, !tbaa !5
  store i32 %442, ptr %55, align 4, !tbaa !5
  %443 = load i32, ptr %51, align 4, !tbaa !5
  %444 = load i32, ptr %55, align 4, !tbaa !5
  %445 = sext i32 %444 to i64
  %446 = getelementptr inbounds [200010 x i32], ptr @parent, i64 0, i64 %445
  %447 = load i32, ptr %446, align 4, !tbaa !5
  %448 = icmp eq i32 %443, %447
  br i1 %448, label %449, label %473

449:                                              ; preds = %440
  %450 = load i32, ptr %51, align 4, !tbaa !5
  %451 = sext i32 %450 to i64
  %452 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %451
  %453 = load i32, ptr %452, align 4, !tbaa !5
  %454 = load i32, ptr %55, align 4, !tbaa !5
  %455 = sext i32 %454 to i64
  %456 = getelementptr inbounds [200010 x i32], ptr @lowest, i64 0, i64 %455
  %457 = load i32, ptr %456, align 4, !tbaa !5
  %458 = icmp sle i32 %453, %457
  br i1 %458, label %459, label %473

459:                                              ; preds = %449
  %460 = load i32, ptr %55, align 4, !tbaa !5
  %461 = invoke noundef i32 @_Z10calc_childi(i32 noundef %460)
          to label %462 unwind label %469

462:                                              ; preds = %459
  %463 = srem i32 %461, 2
  %464 = icmp eq i32 %463, 1
  br i1 %464, label %465, label %473

465:                                              ; preds = %462
  %466 = load i32, ptr %51, align 4, !tbaa !5
  %467 = sext i32 %466 to i64
  %468 = getelementptr inbounds [200010 x i8], ptr @finalans, i64 0, i64 %467
  store i8 0, ptr %468, align 1, !tbaa !15
  store i32 29, ptr %12, align 4
  br label %474

469:                                              ; preds = %459
  %470 = landingpad { ptr, i32 }
          cleanup
  %471 = extractvalue { ptr, i32 } %470, 0
  store ptr %471, ptr %5, align 8
  %472 = extractvalue { ptr, i32 } %470, 1
  store i32 %472, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  br label %516

473:                                              ; preds = %462, %449, %440
  store i32 0, ptr %12, align 4
  br label %474

474:                                              ; preds = %473, %465
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #7
  %475 = load i32, ptr %12, align 4
  switch i32 %475, label %479 [
    i32 0, label %476
  ]

476:                                              ; preds = %474
  br label %477

477:                                              ; preds = %476
  %478 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %53) #7
  br label %437

479:                                              ; preds = %474, %439
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #7
  br label %480

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

481:                                              ; preds = %480
  %482 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %49) #7
  br label %422

483:                                              ; preds = %424
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #7
  store i32 0, ptr %56, align 4, !tbaa !5
  br label %484

484:                                              ; preds = %504, %483
  %485 = load i32, ptr %56, align 4, !tbaa !5
  %486 = load i32, ptr @N, align 4, !tbaa !5
  %487 = icmp slt i32 %485, %486
  br i1 %487, label %489, label %488

488:                                              ; preds = %484
  store i32 31, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  br label %511

489:                                              ; preds = %484
  %490 = load i32, ptr %56, align 4, !tbaa !5
  %491 = sext i32 %490 to i64
  %492 = getelementptr inbounds [200010 x i8], ptr @finalans, i64 0, i64 %491
  %493 = load i8, ptr %492, align 1, !tbaa !15, !range !17, !noundef !18
  %494 = trunc i8 %493 to i1
  br i1 %494, label %495, label %496

495:                                              ; preds = %489
  br label %497

496:                                              ; preds = %489
  br label %497

497:                                              ; preds = %496, %495
  %498 = phi ptr [ @.str.12, %495 ], [ @.str.11, %496 ]
  %499 = getelementptr inbounds [3 x i8], ptr %498, i64 0, i64 0
  %500 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %499)
          to label %501 unwind label %507

501:                                              ; preds = %497
  %502 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %500, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %503 unwind label %507

503:                                              ; preds = %501
  br label %504

504:                                              ; preds = %503
  %505 = load i32, ptr %56, align 4, !tbaa !5
  %506 = add nsw i32 %505, 1
  store i32 %506, ptr %56, align 4, !tbaa !5
  br label %484, !llvm.loop !22

507:                                              ; preds = %501, %497
  %508 = landingpad { ptr, i32 }
          cleanup
  %509 = extractvalue { ptr, i32 } %508, 0
  store ptr %509, ptr %5, align 8
  %510 = extractvalue { ptr, i32 } %508, 1
  store i32 %510, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  br label %516

511:                                              ; preds = %488
  store i32 0, ptr %12, align 4
  br label %512

512:                                              ; preds = %511, %382
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  %513 = load i32, ptr %12, align 4
  switch i32 %513, label %522 [
    i32 0, label %514
    i32 1, label %514
  ]

514:                                              ; preds = %512, %512
  %515 = load i32, ptr %1, align 4
  ret i32 %515

516:                                              ; preds = %507, %469, %405, %401, %397, %378, %356
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %517

517:                                              ; preds = %516, %207, %104
  %518 = load ptr, ptr %5, align 8
  %519 = load i32, ptr %6, align 4
  %520 = insertvalue { ptr, i32 } poison, ptr %518, 0
  %521 = insertvalue { ptr, i32 } %520, i32 %519, 1
  resume { ptr, i32 } %521

522:                                              ; preds = %512
  unreachable
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #6

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::vector<int>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::vector<int>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::vector<int>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::vector<int>>>, std::less<std::__cxx11::basic_string<char>>>::_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::set" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__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] }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type { %"class.std::__cxx11::basic_string", %"class.std::vector" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@graph_pass = external dso_local global [200010 x %"class.std::vector"], align 16
@root = external dso_local local_unnamed_addr global i32, align 4
@depth = external dso_local local_unnamed_addr global [200010 x i32], align 16
@parent = external dso_local local_unnamed_addr global [200010 x i32], align 16
@lowest = external dso_local local_unnamed_addr global [200010 x i32], align 16
@odd_renketsu = external dso_local global %"class.std::vector", align 8
@kansetsu_v = external dso_local global %"class.std::vector", align 8
@graph_tree = external dso_local global [200010 x %"class.std::vector"], align 16
@_Z5XYsetB5cxx11 = external dso_local global %"class.std::map", align 8
@settree = external dso_local global [200010 x %"class.std::set"], align 16
@visited = external dso_local global [200010 x i8], align 16
@finalans = external dso_local global [200010 x i8], align 16
@child_memo = external dso_local global [200010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11calc_lowestv() local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z13calc_kansetsuv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15make_graph_treev() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z10calc_childi(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::stack", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i32, align 4
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %29 = load i32, ptr @N, align 4, !tbaa !5
  %30 = shl nsw i32 %29, 1
  %31 = or disjoint i32 %30, 1
  store i32 %31, ptr @N, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 0, ptr %1, align 4, !tbaa !5
  %32 = icmp sgt i32 %29, -1
  br i1 %32, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %48, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %33 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z5XYsetB5cxx11) #8
  store ptr %33, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %34 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @_Z5XYsetB5cxx11) #8
  store ptr %34, ptr %7, align 8
  %35 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %35, label %.lr.ph102, label %._crit_edge103

.lr.ph102:                                        ; preds = %._crit_edge
  %36 = getelementptr inbounds i8, ptr %8, i64 32
  br label %68

.lr.ph:                                           ; preds = %0, %48
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  %37 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %38 unwind label %53

38:                                               ; preds = %.lr.ph
  %39 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %40 unwind label %53

40:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str)
          to label %41 unwind label %55

41:                                               ; preds = %40
  %42 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @_Z5XYsetB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %43 unwind label %57

43:                                               ; preds = %41
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %44 unwind label %57

44:                                               ; preds = %43
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.10)
          to label %45 unwind label %60

45:                                               ; preds = %44
  %46 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @_Z5XYsetB5cxx11, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %47 unwind label %62

47:                                               ; preds = %45
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %48 unwind label %62

48:                                               ; preds = %47
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %1, align 4, !tbaa !5
  %51 = load i32, ptr @N, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %.lr.ph, label %._crit_edge, !llvm.loop !9

53:                                               ; preds = %38, %.lr.ph
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %65

55:                                               ; preds = %40
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %43, %41
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %59

59:                                               ; preds = %57, %55
  %.pn85 = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %65

60:                                               ; preds = %44
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %64

62:                                               ; preds = %47, %45
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %64

64:                                               ; preds = %62, %60
  %.pn87 = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  br label %65

65:                                               ; preds = %64, %59, %53
  %.pn87.pn = phi { ptr, i32 } [ %.pn87, %64 ], [ %.pn85, %59 ], [ %54, %53 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  br label %274

._crit_edge103:                                   ; preds = %73, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %66 = load i32, ptr @N, align 4, !tbaa !5
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.lr.ph109, label %._crit_edge110

68:                                               ; preds = %.lr.ph102, %73
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %8) #8
  %69 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEC2ERKSA_(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(56) %69)
  %70 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  %71 = trunc i64 %70 to i32
  %smax = call i32 @llvm.smax.i32(i32 %71, i32 0)
  %wide.trip.count = zext nneg i32 %smax to i64
  br label %72

72:                                               ; preds = %104, %68
  %indvars.iv = phi i64 [ %indvars.iv.next, %104 ], [ 0, %68 ]
  %exitcond.not = icmp eq i64 %indvars.iv, %wide.trip.count
  br i1 %exitcond.not, label %73, label %76

73:                                               ; preds = %72
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #8
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %75 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEEESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %75, label %68, label %._crit_edge103

76:                                               ; preds = %72
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %indvars.iv) #8
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %79
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %81 = trunc nuw i64 %indvars.iv.next to i32
  %82 = srem i32 %81, %71
  %83 = zext nneg i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %83) #8
  %85 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %80, ptr noundef nonnull align 4 dereferenceable(4) %84)
          to label %86 unwind label %111

86:                                               ; preds = %76
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %83) #8
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %89
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %indvars.iv) #8
  %92 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %90, ptr noundef nonnull align 4 dereferenceable(4) %91)
          to label %93 unwind label %111

93:                                               ; preds = %86
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %indvars.iv) #8
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %96
  %98 = trunc i64 %indvars.iv to i32
  %99 = add i32 %98, 2
  %100 = srem i32 %99, %71
  %101 = zext nneg i32 %100 to i64
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %101) #8
  %103 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %97, ptr noundef nonnull align 4 dereferenceable(4) %102)
          to label %104 unwind label %111

104:                                              ; preds = %93
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %101) #8
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %107
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %indvars.iv) #8
  %110 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %108, ptr noundef nonnull align 4 dereferenceable(4) %109)
          to label %72 unwind label %111, !llvm.loop !11

111:                                              ; preds = %104, %93, %86, %76
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %274

._crit_edge110:                                   ; preds = %._crit_edge106, %._crit_edge103
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  store i8 0, ptr %12, align 1, !tbaa !12
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @visited, ptr noundef nonnull getelementptr inbounds (i8, ptr @visited, i64 200010), ptr noundef nonnull align 1 dereferenceable(1) %12)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  store i32 0, ptr %15, align 4, !tbaa !5
  %113 = load i32, ptr @N, align 4, !tbaa !5
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %.lr.ph120, label %._crit_edge121.thread

._crit_edge121.thread:                            ; preds = %._crit_edge110
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %202

.lr.ph109:                                        ; preds = %._crit_edge103, %._crit_edge106
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %._crit_edge106 ], [ 0, %._crit_edge103 ]
  %115 = getelementptr inbounds [200010 x %"class.std::set"], ptr @settree, i64 0, i64 %indvars.iv138
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %116 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %115) #8
  store ptr %116, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %117 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %115) #8
  store ptr %117, ptr %10, align 8
  %118 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br i1 %118, label %.lr.ph105, label %._crit_edge106

.lr.ph105:                                        ; preds = %.lr.ph109
  %119 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @graph_pass, i64 0, i64 %indvars.iv138
  br label %123

._crit_edge106:                                   ; preds = %128, %.lr.ph109
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %120 = load i32, ptr @N, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = icmp slt i64 %indvars.iv.next139, %121
  br i1 %122, label %.lr.ph109, label %._crit_edge110, !llvm.loop !14

123:                                              ; preds = %.lr.ph105, %128
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %125 = load i32, ptr %124, align 4, !tbaa !5
  store i32 %125, ptr %11, align 4, !tbaa !5
  %126 = zext i32 %125 to i64
  %.not84 = icmp eq i64 %indvars.iv138, %126
  br i1 %.not84, label %128, label %127

127:                                              ; preds = %123
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %119, ptr noundef nonnull align 4 dereferenceable(4) %11)
  br label %128

128:                                              ; preds = %127, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %130 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br i1 %130, label %123, label %._crit_edge106

._crit_edge121:                                   ; preds = %188
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  %131 = icmp sgt i32 %.275, 1
  br i1 %131, label %.preheader, label %202

.preheader:                                       ; preds = %._crit_edge121
  %132 = icmp sgt i32 %189, 0
  br i1 %132, label %.lr.ph135, label %.loopexit

.lr.ph120:                                        ; preds = %._crit_edge110, %188
  %133 = phi i32 [ %189, %188 ], [ %113, %._crit_edge110 ]
  %.073118 = phi i32 [ %.275, %188 ], [ 0, %._crit_edge110 ]
  %storemerge80117 = phi i32 [ %191, %188 ], [ 0, %._crit_edge110 ]
  %134 = sext i32 %storemerge80117 to i64
  %135 = getelementptr inbounds [200010 x i8], ptr @visited, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !12, !range !15, !noundef !16
  %137 = trunc nuw i8 %136 to i1
  br i1 %137, label %188, label %138

138:                                              ; preds = %.lr.ph120
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %139 = load i32, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %16) #8
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %140 unwind label %158

140:                                              ; preds = %138
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %.preheader93 unwind label %.loopexit.split-lp

.preheader93:                                     ; preds = %140
  %141 = call noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  br i1 %141, label %._crit_edge116.thread, label %.lr.ph115

.lr.ph115:                                        ; preds = %.preheader93, %172
  %.071114 = phi i32 [ %.172, %172 ], [ 0, %.preheader93 ]
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5stackIiSt5dequeIiSaIiEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  %143 = load i32, ptr %142, align 4, !tbaa !5
  store i32 %143, ptr %13, align 4, !tbaa !5
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  %144 = load i32, ptr %13, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [200010 x i8], ptr @visited, i64 0, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !12, !range !15, !noundef !16
  %148 = trunc nuw i8 %147 to i1
  br i1 %148, label %172, label %149

149:                                              ; preds = %.lr.ph115
  store i8 1, ptr %146, align 1, !tbaa !12
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %150 unwind label %.loopexit94

150:                                              ; preds = %149
  %151 = add nsw i32 %.071114, 1
  %152 = load i32, ptr %13, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @graph_pass, i64 0, i64 %153
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %155 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %154) #8
  store ptr %155, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %156 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %154) #8
  store ptr %156, ptr %18, align 8
  %157 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br i1 %157, label %.lr.ph112, label %._crit_edge113

._crit_edge113:                                   ; preds = %169, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %172

158:                                              ; preds = %138
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %187

.loopexit94:                                      ; preds = %149
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %186

.loopexit.split-lp:                               ; preds = %140, %179, %183
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %186

.lr.ph112:                                        ; preds = %150, %169
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #8
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %161 = load i32, ptr %160, align 4, !tbaa !5
  store i32 %161, ptr %19, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [200010 x i8], ptr @visited, i64 0, i64 %162
  %164 = load i8, ptr %163, align 1, !tbaa !12, !range !15, !noundef !16
  %165 = trunc nuw i8 %164 to i1
  br i1 %165, label %169, label %166

166:                                              ; preds = %.lr.ph112
  invoke void @_ZNSt5stackIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %169 unwind label %167

167:                                              ; preds = %166
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %186

169:                                              ; preds = %166, %.lr.ph112
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %171 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br i1 %171, label %.lr.ph112, label %._crit_edge113

172:                                              ; preds = %._crit_edge113, %.lr.ph115
  %.172 = phi i32 [ %.071114, %.lr.ph115 ], [ %151, %._crit_edge113 ]
  %173 = call noundef zeroext i1 @_ZNKSt5stackIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  br i1 %173, label %._crit_edge116, label %.lr.ph115, !llvm.loop !17

._crit_edge116:                                   ; preds = %172
  %174 = and i32 %.172, -2147483647
  %175 = icmp eq i32 %174, 1
  br i1 %175, label %176, label %._crit_edge116.thread

176:                                              ; preds = %._crit_edge116
  %177 = add nsw i32 %.073118, 1
  %178 = icmp eq i32 %.073118, 0
  br i1 %178, label %179, label %._crit_edge116.thread

179:                                              ; preds = %176
  %180 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %181 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %182 = invoke ptr @_ZSt13back_inserterISt6vectorIiSaIiEEESt20back_insert_iteratorIT_ERS4_(ptr noundef nonnull align 8 dereferenceable(24) @odd_renketsu)
          to label %183 unwind label %.loopexit.split-lp

183:                                              ; preds = %179
  %184 = invoke ptr @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEESt20back_insert_iteratorIS5_EET0_T_SA_S9_(ptr %180, ptr %181, ptr %182)
          to label %185 unwind label %.loopexit.split-lp

185:                                              ; preds = %183
  store i32 %139, ptr @root, align 4, !tbaa !5
  br label %._crit_edge116.thread

._crit_edge116.thread:                            ; preds = %.preheader93, %176, %185, %._crit_edge116
  %.174 = phi i32 [ 1, %185 ], [ %177, %176 ], [ %.073118, %._crit_edge116 ], [ %.073118, %.preheader93 ]
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %16) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #8
  %.pre = load i32, ptr %15, align 4, !tbaa !5
  %.pre144 = load i32, ptr @N, align 4, !tbaa !5
  br label %188

186:                                              ; preds = %.loopexit94, %.loopexit.split-lp, %167
  %.pn = phi { ptr, i32 } [ %168, %167 ], [ %lpad.loopexit, %.loopexit94 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt5stackIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %16) #8
  br label %187

187:                                              ; preds = %186, %158
  %.pn.pn = phi { ptr, i32 } [ %.pn, %186 ], [ %159, %158 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %273

188:                                              ; preds = %.lr.ph120, %._crit_edge116.thread
  %189 = phi i32 [ %133, %.lr.ph120 ], [ %.pre144, %._crit_edge116.thread ]
  %190 = phi i32 [ %storemerge80117, %.lr.ph120 ], [ %.pre, %._crit_edge116.thread ]
  %.275 = phi i32 [ %.073118, %.lr.ph120 ], [ %.174, %._crit_edge116.thread ]
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %15, align 4, !tbaa !5
  %192 = icmp slt i32 %191, %189
  br i1 %192, label %.lr.ph120, label %._crit_edge121, !llvm.loop !18

.lr.ph135:                                        ; preds = %.preheader, %196
  %.070134 = phi i32 [ %197, %196 ], [ 0, %.preheader ]
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
          to label %194 unwind label %200

194:                                              ; preds = %.lr.ph135
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %196 unwind label %200

196:                                              ; preds = %194
  %197 = add nuw nsw i32 %.070134, 1
  %198 = load i32, ptr @N, align 4, !tbaa !5
  %199 = icmp slt i32 %197, %198
  br i1 %199, label %.lr.ph135, label %.loopexit, !llvm.loop !19

200:                                              ; preds = %194, %.lr.ph135
  %201 = landingpad { ptr, i32 }
          cleanup
  br label %273

202:                                              ; preds = %._crit_edge121.thread, %._crit_edge121
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #8
  store i8 0, ptr %20, align 1, !tbaa !12
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @finalans, ptr noundef nonnull getelementptr inbounds (i8, ptr @finalans, i64 200010), ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %203 unwind label %215

203:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #8
  invoke void @_Z11calc_lowestv()
          to label %204 unwind label %217

204:                                              ; preds = %203
  %205 = invoke noundef i32 @_Z13calc_kansetsuv()
          to label %206 unwind label %217

206:                                              ; preds = %204
  invoke void @_Z15make_graph_treev()
          to label %207 unwind label %217

207:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #8
  store i32 -1, ptr %21, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @child_memo, ptr noundef nonnull getelementptr inbounds (i8, ptr @child_memo, i64 800040), ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %208 unwind label %219

208:                                              ; preds = %207
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  %209 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @odd_renketsu) #8
  store ptr %209, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #8
  %210 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @odd_renketsu) #8
  store ptr %210, ptr %23, align 8
  %211 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  br i1 %211, label %.lr.ph124, label %._crit_edge125

._crit_edge125:                                   ; preds = %.lr.ph124, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #8
  %212 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @kansetsu_v) #8
  store ptr %212, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #8
  %213 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @kansetsu_v) #8
  store ptr %213, ptr %25, align 8
  %214 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  br i1 %214, label %.lr.ph129, label %._crit_edge130

215:                                              ; preds = %202
  %216 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #8
  br label %273

217:                                              ; preds = %206, %204, %203
  %218 = landingpad { ptr, i32 }
          cleanup
  br label %273

219:                                              ; preds = %207
  %220 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #8
  br label %273

.lr.ph124:                                        ; preds = %208, %.lr.ph124
  %221 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [200010 x i8], ptr @finalans, i64 0, i64 %223
  store i8 1, ptr %224, align 1, !tbaa !12
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  %226 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  br i1 %226, label %.lr.ph124, label %._crit_edge125

._crit_edge130:                                   ; preds = %.loopexit92, %._crit_edge125
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  %227 = load i32, ptr @N, align 4, !tbaa !5
  %228 = icmp sgt i32 %227, 0
  br i1 %228, label %.lr.ph133, label %.loopexit

.lr.ph129:                                        ; preds = %._crit_edge125, %.loopexit92
  %229 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %230 = load i32, ptr %229, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [200010 x %"class.std::vector"], ptr @graph_tree, i64 0, i64 %231
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #8
  %233 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %232) #8
  store ptr %233, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #8
  %234 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %232) #8
  store ptr %234, ptr %27, align 8
  %235 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  br i1 %235, label %.lr.ph127, label %.loopexit92

.lr.ph127:                                        ; preds = %.lr.ph129
  %236 = getelementptr inbounds [200010 x i32], ptr @depth, i64 0, i64 %231
  br label %237

237:                                              ; preds = %.lr.ph127, %256
  %238 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #8
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [200010 x i32], ptr @parent, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = icmp eq i32 %230, %242
  br i1 %243, label %244, label %256

244:                                              ; preds = %237
  %245 = load i32, ptr %236, align 4, !tbaa !5
  %246 = getelementptr inbounds [200010 x i32], ptr @lowest, i64 0, i64 %240
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %.not = icmp sgt i32 %245, %247
  br i1 %.not, label %256, label %248

248:                                              ; preds = %244
  %249 = invoke noundef i32 @_Z10calc_childi(i32 noundef %239)
          to label %250 unwind label %254

250:                                              ; preds = %248
  %251 = and i32 %249, -2147483647
  %252 = icmp eq i32 %251, 1
  br i1 %252, label %.critedge, label %256

.critedge:                                        ; preds = %250
  %253 = getelementptr inbounds [200010 x i8], ptr @finalans, i64 0, i64 %231
  store i8 0, ptr %253, align 1, !tbaa !12
  br label %.loopexit92

254:                                              ; preds = %248
  %255 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  br label %273

256:                                              ; preds = %250, %244, %237
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #8
  %258 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  br i1 %258, label %237, label %.loopexit92

.loopexit92:                                      ; preds = %256, %.lr.ph129, %.critedge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #8
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %260 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  br i1 %260, label %.lr.ph129, label %._crit_edge130

.lr.ph133:                                        ; preds = %._crit_edge130, %267
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %267 ], [ 0, %._crit_edge130 ]
  %261 = getelementptr inbounds [200010 x i8], ptr @finalans, i64 0, i64 %indvars.iv141
  %262 = load i8, ptr %261, align 1, !tbaa !12, !range !15, !noundef !16
  %263 = trunc nuw i8 %262 to i1
  %.str.12..str.11 = select i1 %263, ptr @.str.12, ptr @.str.11
  %264 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.12..str.11)
          to label %265 unwind label %271

265:                                              ; preds = %.lr.ph133
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %267 unwind label %271

267:                                              ; preds = %265
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %268 = load i32, ptr @N, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = icmp slt i64 %indvars.iv.next142, %269
  br i1 %270, label %.lr.ph133, label %.loopexit, !llvm.loop !20

271:                                              ; preds = %265, %.lr.ph133
  %272 = landingpad { ptr, i32 }
          cleanup
  br label %273

.loopexit:                                        ; preds = %267, %196, %._crit_edge130, %.preheader
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  ret i32 0

273:                                              ; preds = %271, %254, %219, %217, %215, %200, %187
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %187 ], [ %201, %200 ], [ %255, %254 ], [ %272, %271 ], [ %220, %219 ], [ %218, %217 ], [ %216, %215 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  br label %274

274:                                              ; preds = %273, %111, %65
  %.pn87.pn.pn = phi { ptr, i32 } [ %.pn87.pn, %65 ], [ %112, %111 ], [ %.pn.pn.pn, %273 ]
  resume { ptr, i32 } %.pn87.pn.pn
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIiSaIiEESt4lessIS5_ESaISt4pairIKS5_S8_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #7

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

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

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


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