; LLVM IR from kazunetakahashi/atcoder :: 2017/0715_ARC078 (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::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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, 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.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.3", %"struct.std::_Head_base.6" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Tuple_impl.4", %"struct.std::_Head_base.5" }
%"struct.std::_Tuple_impl.4" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.5" = type { i32 }
%"struct.std::_Head_base.6" = type { i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@V = external dso_local global [100010 x %"class.std::vector"], align 16
@visited = external dso_local global [100010 x i8], align 16
@parents = external dso_local global [100010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1

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

44:                                               ; preds = %63, %0
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 1
  %48 = icmp slt i32 %45, %47
  br i1 %48, label %50, label %49

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

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = add nsw i32 %53, -1
  store i32 %54, ptr %4, align 4, !tbaa !5
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr %5, align 4, !tbaa !5
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %58
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %61
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %63

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

66:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 80, ptr %6) #7
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 -1, ptr %10, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiiEEC2IJiiiELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS3_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 4 dereferenceable(12) %7)
          to label %67 unwind label %109

67:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i8, ptr @visited, i64 %69
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 0, ptr %15, align 1, !tbaa !11
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @visited, ptr noundef %70, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %71 unwind label %113

71:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  br label %72

72:                                               ; preds = %169, %71
  %73 = invoke noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %74 unwind label %117

74:                                               ; preds = %72
  %75 = xor i1 %73, true
  br i1 %75, label %76, label %173

76:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %77 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %78 unwind label %121

78:                                               ; preds = %76
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %77) #7
  %80 = load i32, ptr %79, align 4, !tbaa !5
  store i32 %80, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %81 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %82 unwind label %125

82:                                               ; preds = %78
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %81) #7
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %85 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %86 unwind label %129

86:                                               ; preds = %82
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %85) #7
  %88 = load i32, ptr %87, align 4, !tbaa !5
  store i32 %88, ptr %18, align 4, !tbaa !5
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %89 unwind label %129

89:                                               ; preds = %86
  %90 = load i32, ptr %16, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !11, !range !13, !noundef !14
  %94 = trunc i8 %93 to i1
  br i1 %94, label %166, label %95

95:                                               ; preds = %89
  %96 = load i32, ptr %16, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %97
  store i8 1, ptr %98, align 1, !tbaa !11
  %99 = load i32, ptr %18, align 4, !tbaa !5
  %100 = load i32, ptr %16, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %101
  store i32 %99, ptr %102, align 4, !tbaa !5
  %103 = load i32, ptr %16, align 4, !tbaa !5
  %104 = load i32, ptr %2, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 1
  %106 = icmp eq i32 %103, %105
  br i1 %106, label %107, label %133

107:                                              ; preds = %95
  %108 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %108, ptr %14, align 4, !tbaa !5
  store i32 6, ptr %19, align 4
  br label %167

109:                                              ; preds = %66
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %11, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  br label %358

113:                                              ; preds = %67
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %11, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  br label %357

117:                                              ; preds = %72
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %11, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %12, align 4
  br label %357

121:                                              ; preds = %76
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %11, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %12, align 4
  br label %172

125:                                              ; preds = %78
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %11, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %12, align 4
  br label %171

129:                                              ; preds = %86, %82
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %11, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %12, align 4
  br label %170

133:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %134 = load i32, ptr %16, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %135
  store ptr %136, ptr %20, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %137 = load ptr, ptr %20, align 8, !tbaa !15
  %138 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #7
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %140 = load ptr, ptr %20, align 8, !tbaa !15
  %141 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %140) #7
  %142 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %141, ptr %142, align 8
  br label %143

143:                                              ; preds = %163, %133
  %144 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  br i1 %144, label %146, label %145

145:                                              ; preds = %143
  store i32 7, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %165

146:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  %148 = load i32, ptr %147, align 4, !tbaa !5
  store i32 %148, ptr %23, align 4, !tbaa !5
  %149 = load i32, ptr %23, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %150
  %152 = load i8, ptr %151, align 1, !tbaa !11, !range !13, !noundef !14
  %153 = trunc i8 %152 to i1
  br i1 %153, label %162, label %154

154:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %155 = load i32, ptr %17, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %25, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiiEEC2IJRiiS2_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %16) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 4 dereferenceable(12) %24)
          to label %157 unwind label %158

157:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #7
  br label %162

158:                                              ; preds = %154
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %11, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %170

162:                                              ; preds = %157, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %163

163:                                              ; preds = %162
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  br label %143

165:                                              ; preds = %145
  br label %166

166:                                              ; preds = %165, %89
  store i32 0, ptr %19, align 4
  br label %167

167:                                              ; preds = %166, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %168 = load i32, ptr %19, align 4
  switch i32 %168, label %364 [
    i32 0, label %169
    i32 6, label %173
  ]

169:                                              ; preds = %167
  br label %72, !llvm.loop !17

170:                                              ; preds = %158, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %171

171:                                              ; preds = %170, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %172

172:                                              ; preds = %171, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %357

173:                                              ; preds = %167, %74
  call void @llvm.lifetime.start.p0(i64 80, ptr %26) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
          to label %174 unwind label %191

174:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %175 = load i32, ptr %2, align 4, !tbaa !5
  %176 = sub nsw i32 %175, 1
  store i32 %176, 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
  %177 = load i32, ptr %2, align 4, !tbaa !5
  %178 = sub nsw i32 %177, 1
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %179
  call void @_ZNSt5tupleIJiiiEEC2IJiiRiELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12) %27, ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %180) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %26, ptr noundef nonnull align 4 dereferenceable(12) %27)
          to label %181 unwind label %195

181:                                              ; preds = %174
  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 12, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !5
  %182 = load i32, ptr %2, align 4, !tbaa !5
  %183 = sub nsw i32 %182, 1
  store i32 %183, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %184

184:                                              ; preds = %204, %181
  %185 = load i32, ptr %31, align 4, !tbaa !5
  %186 = load i32, ptr %14, align 4, !tbaa !5
  %187 = sub nsw i32 %186, 1
  %188 = sdiv i32 %187, 2
  %189 = icmp slt i32 %185, %188
  br i1 %189, label %199, label %190

190:                                              ; preds = %184
  store i32 9, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %207

191:                                              ; preds = %173
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %11, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %12, align 4
  br label %356

195:                                              ; preds = %174
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %11, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %12, align 4
  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 12, ptr %27) #7
  br label %355

199:                                              ; preds = %184
  %200 = load i32, ptr %13, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !5
  store i32 %203, ptr %13, align 4, !tbaa !5
  br label %204

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

207:                                              ; preds = %190
  %208 = load i32, ptr %2, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds i8, ptr @visited, i64 %209
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #7
  store i8 0, ptr %32, align 1, !tbaa !11
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @visited, ptr noundef %210, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %211 unwind label %249

211:                                              ; preds = %207
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  br label %212

212:                                              ; preds = %292, %211
  %213 = invoke noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
          to label %214 unwind label %253

214:                                              ; preds = %212
  %215 = xor i1 %213, true
  br i1 %215, label %216, label %295

216:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %217 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
          to label %218 unwind label %257

218:                                              ; preds = %216
  %219 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %217) #7
  %220 = load i32, ptr %219, align 4, !tbaa !5
  store i32 %220, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %221 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
          to label %222 unwind label %261

222:                                              ; preds = %218
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %221) #7
  %224 = load i32, ptr %223, align 4, !tbaa !5
  store i32 %224, ptr %34, align 4, !tbaa !5
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %26)
          to label %225 unwind label %261

225:                                              ; preds = %222
  %226 = load i32, ptr %33, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %227
  %229 = load i8, ptr %228, align 1, !tbaa !11, !range !13, !noundef !14
  %230 = trunc i8 %229 to i1
  br i1 %230, label %292, label %231

231:                                              ; preds = %225
  %232 = load i32, ptr %33, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %233
  store i8 1, ptr %234, align 1, !tbaa !11
  %235 = load i32, ptr %30, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %237 = load i32, ptr %33, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %238
  store ptr %239, ptr %35, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %240 = load ptr, ptr %35, align 8, !tbaa !15
  %241 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %240) #7
  %242 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %36, i32 0, i32 0
  store ptr %241, ptr %242, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %243 = load ptr, ptr %35, align 8, !tbaa !15
  %244 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %243) #7
  %245 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  store ptr %244, ptr %245, align 8
  br label %246

246:                                              ; preds = %289, %231
  %247 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  br i1 %247, label %265, label %248

248:                                              ; preds = %246
  store i32 14, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %291

249:                                              ; preds = %207
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %11, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  br label %354

253:                                              ; preds = %212
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %11, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %12, align 4
  br label %354

257:                                              ; preds = %216
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %11, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %12, align 4
  br label %294

261:                                              ; preds = %222, %218
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %11, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %12, align 4
  br label %293

265:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  %266 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  %267 = load i32, ptr %266, align 4, !tbaa !5
  store i32 %267, ptr %38, align 4, !tbaa !5
  %268 = load i32, ptr %38, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %269
  %271 = load i8, ptr %270, align 1, !tbaa !11, !range !13, !noundef !14
  %272 = trunc i8 %271 to i1
  br i1 %272, label %288, label %273

273:                                              ; preds = %265
  %274 = load i32, ptr %38, align 4, !tbaa !5
  %275 = load i32, ptr %13, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %276
  %278 = load i32, ptr %277, align 4, !tbaa !5
  %279 = icmp ne i32 %274, %278
  br i1 %279, label %280, label %288

280:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  %281 = load i32, ptr %34, align 4, !tbaa !5
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %40, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiiEEC2IJRiiS2_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 4 dereferenceable(4) %33) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %26, ptr noundef nonnull align 4 dereferenceable(12) %39)
          to label %283 unwind label %284

283:                                              ; preds = %280
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #7
  br label %288

284:                                              ; preds = %280
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %11, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %293

288:                                              ; preds = %283, %273, %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  br label %289

289:                                              ; preds = %288
  %290 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  br label %246

291:                                              ; preds = %248
  br label %292

292:                                              ; preds = %291, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %212, !llvm.loop !19

293:                                              ; preds = %284, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  br label %294

294:                                              ; preds = %293, %257
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %354

295:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  %296 = load i32, ptr %30, align 4, !tbaa !5
  %297 = sub nsw i32 %296, 1
  store i32 %297, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  %298 = load i32, ptr %2, align 4, !tbaa !5
  %299 = sub nsw i32 %298, 2
  %300 = load i32, ptr %41, align 4, !tbaa !5
  %301 = sub nsw i32 %299, %300
  store i32 %301, ptr %42, align 4, !tbaa !5
  %302 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
          to label %303 unwind label %343

303:                                              ; preds = %295
  %304 = load i32, ptr %14, align 4, !tbaa !5
  %305 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %302, i32 noundef %304)
          to label %306 unwind label %343

306:                                              ; preds = %303
  %307 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %305, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %308 unwind label %343

308:                                              ; preds = %306
  %309 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
          to label %310 unwind label %343

310:                                              ; preds = %308
  %311 = load i32, ptr %13, align 4, !tbaa !5
  %312 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %309, i32 noundef %311)
          to label %313 unwind label %343

313:                                              ; preds = %310
  %314 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %312, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %315 unwind label %343

315:                                              ; preds = %313
  %316 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
          to label %317 unwind label %343

317:                                              ; preds = %315
  %318 = load i32, ptr %30, align 4, !tbaa !5
  %319 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %316, i32 noundef %318)
          to label %320 unwind label %343

320:                                              ; preds = %317
  %321 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %319, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %322 unwind label %343

322:                                              ; preds = %320
  %323 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.4)
          to label %324 unwind label %343

324:                                              ; preds = %322
  %325 = load i32, ptr %41, align 4, !tbaa !5
  %326 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %323, i32 noundef %325)
          to label %327 unwind label %343

327:                                              ; preds = %324
  %328 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %326, ptr noundef @.str.5)
          to label %329 unwind label %343

329:                                              ; preds = %327
  %330 = load i32, ptr %42, align 4, !tbaa !5
  %331 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %328, i32 noundef %330)
          to label %332 unwind label %343

332:                                              ; preds = %329
  %333 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %331, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %334 unwind label %343

334:                                              ; preds = %332
  %335 = load i32, ptr %42, align 4, !tbaa !5
  %336 = load i32, ptr %41, align 4, !tbaa !5
  %337 = icmp sgt i32 %335, %336
  br i1 %337, label %338, label %347

338:                                              ; preds = %334
  %339 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
          to label %340 unwind label %343

340:                                              ; preds = %338
  %341 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %339, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %342 unwind label %343

342:                                              ; preds = %340
  br label %352

343:                                              ; preds = %349, %347, %340, %338, %332, %329, %327, %324, %322, %320, %317, %315, %313, %310, %308, %306, %303, %295
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %11, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  br label %354

347:                                              ; preds = %334
  %348 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
          to label %349 unwind label %343

349:                                              ; preds = %347
  %350 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %348, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %351 unwind label %343

351:                                              ; preds = %349
  br label %352

352:                                              ; preds = %351, %342
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %26) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %353 = load i32, ptr %1, align 4
  ret i32 %353

354:                                              ; preds = %343, %294, %253, %249
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %355

355:                                              ; preds = %354, %195
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %26) #7
  br label %356

356:                                              ; preds = %355, %191
  call void @llvm.lifetime.end.p0(i64 80, ptr %26) #7
  br label %357

357:                                              ; preds = %356, %172, %117, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %358

358:                                              ; preds = %357, %109
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %359

359:                                              ; preds = %358
  %360 = load ptr, ptr %11, align 8
  %361 = load i32, ptr %12, align 4
  %362 = insertvalue { ptr, i32 } poison, ptr %360, 0
  %363 = insertvalue { ptr, i32 } %362, i32 %361, 1
  resume { ptr, i32 } %363

364:                                              ; preds = %167
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #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)) #3 align 2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiiEEC2IJRiiS2_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4 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)) #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 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)) #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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::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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int, int>, std::allocator<std::tuple<int, int, 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.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.3", %"struct.std::_Head_base.6" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Tuple_impl.4", %"struct.std::_Head_base.5" }
%"struct.std::_Tuple_impl.4" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.5" = type { i32 }
%"struct.std::_Head_base.6" = type { i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@V = external dso_local global [100010 x %"class.std::vector"], align 16
@visited = external dso_local global [100010 x i8], align 16
@parents = external dso_local global [100010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::stack", align 8
  %5 = alloca %"class.std::tuple", align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::tuple", align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::stack", align 8
  %17 = alloca %"class.std::tuple", align 4
  %18 = alloca i32, align 4
  %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 i32, align 4
  %25 = alloca %"class.std::tuple", align 4
  %26 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 1
  br i1 %29, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #7
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 -1, ptr %8, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiiEEC2IJiiiELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS3_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(12) %5)
          to label %45 unwind label %70

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.054 = phi i32 [ %41, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr %2, align 4, !tbaa !5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = add nsw i32 %34, -1
  store i32 %35, ptr %3, align 4, !tbaa !5
  %36 = sext i32 %33 to i64
  %37 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %36
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %39
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %41 = add nuw nsw i32 %.054, 1
  %42 = load i32, ptr %1, align 4, !tbaa !5
  %43 = add nsw i32 %42, -1
  %44 = icmp slt i32 %41, %43
  br i1 %44, label %.lr.ph, label %._crit_edge, !llvm.loop !9

45:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr @visited, i64 %47
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  store i8 0, ptr %9, align 1, !tbaa !11
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @visited, ptr noundef nonnull %48, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %49 unwind label %72

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  %50 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  br i1 %50, label %.loopexit, label %.lr.ph59

.lr.ph59:                                         ; preds = %49, %94
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %51 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %51) #7
  %53 = load i32, ptr %52, align 4, !tbaa !5
  store i32 %53, ptr %10, align 4, !tbaa !5
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %54) #7
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %57) #7
  %59 = load i32, ptr %58, align 4, !tbaa !5
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !11, !range !13, !noundef !14
  %64 = trunc nuw i8 %63 to i1
  br i1 %64, label %94, label %65

65:                                               ; preds = %.lr.ph59
  store i8 1, ptr %62, align 1, !tbaa !11
  %66 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %61
  store i32 %59, ptr %66, align 4, !tbaa !5
  %67 = load i32, ptr %1, align 4, !tbaa !5
  %68 = add nsw i32 %67, -1
  %69 = icmp eq i32 %60, %68
  br i1 %69, label %.thread, label %74

.thread:                                          ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %.loopexit

70:                                               ; preds = %._crit_edge
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  br label %224

72:                                               ; preds = %45
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  br label %224

74:                                               ; preds = %65
  %75 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %76 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #7
  store ptr %76, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %77 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #7
  store ptr %77, ptr %12, align 8
  %78 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br i1 %78, label %.lr.ph56, label %._crit_edge57

.lr.ph56:                                         ; preds = %74
  %79 = add nsw i32 %56, 1
  br label %80

._crit_edge57:                                    ; preds = %91, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %94

80:                                               ; preds = %.lr.ph56, %91
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr %13, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !11, !range !13, !noundef !14
  %86 = trunc nuw i8 %85 to i1
  br i1 %86, label %91, label %87

87:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  store i32 %79, ptr %15, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiiEEC2IJRiiS2_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %10) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(12) %14)
          to label %88 unwind label %89

88:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #7
  br label %91

89:                                               ; preds = %87
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %224

91:                                               ; preds = %88, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %93 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br i1 %93, label %80, label %._crit_edge57

94:                                               ; preds = %.lr.ph59, %._crit_edge57
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  %95 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  br i1 %95, label %.loopexit, label %.lr.ph59

.loopexit:                                        ; preds = %94, %49, %.thread
  %.240 = phi i32 [ %56, %.thread ], [ undef, %49 ], [ undef, %94 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %16) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
          to label %96 unwind label %114

96:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  %97 = load i32, ptr %1, align 4, !tbaa !5
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %99
  call void @_ZNSt5tupleIJiiiEEC2IJiiRiELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %100) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %101 unwind label %116

101:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #7
  %102 = load i32, ptr %1, align 4, !tbaa !5
  %103 = add nsw i32 %102, -1
  %104 = icmp sgt i32 %.240, 2
  br i1 %104, label %.lr.ph63.preheader, label %._crit_edge64

.lr.ph63.preheader:                               ; preds = %101
  %105 = add nsw i32 %.240, -1
  %106 = lshr i32 %105, 1
  %107 = add nsw i32 %106, -1
  %xtraiter = and i32 %106, 7
  %108 = icmp ult i32 %107, 7
  br i1 %108, label %._crit_edge64.loopexit.unr-lcssa, label %.lr.ph63.preheader.new

.lr.ph63.preheader.new:                           ; preds = %.lr.ph63.preheader
  %unroll_iter = and i32 %106, 2147483640
  br label %.lr.ph63

._crit_edge64.loopexit.unr-lcssa:                 ; preds = %.lr.ph63, %.lr.ph63.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph63.preheader ], [ %141, %.lr.ph63 ]
  %.03461.unr = phi i32 [ %103, %.lr.ph63.preheader ], [ %141, %.lr.ph63 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge64, label %.lr.ph63.epil

.lr.ph63.epil:                                    ; preds = %._crit_edge64.loopexit.unr-lcssa, %.lr.ph63.epil
  %.03461.epil = phi i32 [ %111, %.lr.ph63.epil ], [ %.03461.unr, %._crit_edge64.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph63.epil ], [ 0, %._crit_edge64.loopexit.unr-lcssa ]
  %109 = sext i32 %.03461.epil to i64
  %110 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge64, label %.lr.ph63.epil, !llvm.loop !15

._crit_edge64:                                    ; preds = %._crit_edge64.loopexit.unr-lcssa, %.lr.ph63.epil, %101
  %.034.lcssa = phi i32 [ %103, %101 ], [ %.lcssa.ph, %._crit_edge64.loopexit.unr-lcssa ], [ %111, %.lr.ph63.epil ]
  %112 = sext i32 %102 to i64
  %113 = getelementptr inbounds i8, ptr @visited, i64 %112
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #7
  store i8 0, ptr %20, align 1, !tbaa !11
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @visited, ptr noundef nonnull %113, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %142 unwind label %165

114:                                              ; preds = %.loopexit
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %223

116:                                              ; preds = %96
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #7
  br label %222

.lr.ph63:                                         ; preds = %.lr.ph63, %.lr.ph63.preheader.new
  %.03461 = phi i32 [ %103, %.lr.ph63.preheader.new ], [ %141, %.lr.ph63 ]
  %niter = phi i32 [ 0, %.lr.ph63.preheader.new ], [ %niter.next.7, %.lr.ph63 ]
  %118 = sext i32 %.03461 to i64
  %119 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge64.loopexit.unr-lcssa, label %.lr.ph63, !llvm.loop !17

142:                                              ; preds = %._crit_edge64
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #7
  %143 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  br i1 %143, label %._crit_edge71, label %.lr.ph70

.lr.ph70:                                         ; preds = %142
  %144 = sext i32 %.034.lcssa to i64
  %145 = getelementptr inbounds [100010 x i32], ptr @parents, i64 0, i64 %144
  br label %146

146:                                              ; preds = %.lr.ph70, %183
  %.03668 = phi i32 [ 0, %.lr.ph70 ], [ %.137, %183 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #7
  %147 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %147) #7
  %149 = load i32, ptr %148, align 4, !tbaa !5
  store i32 %149, ptr %21, align 4, !tbaa !5
  %150 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %150) #7
  %152 = load i32, ptr %151, align 4, !tbaa !5
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  %153 = load i32, ptr %21, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %154
  %156 = load i8, ptr %155, align 1, !tbaa !11, !range !13, !noundef !14
  %157 = trunc nuw i8 %156 to i1
  br i1 %157, label %183, label %158

158:                                              ; preds = %146
  store i8 1, ptr %155, align 1, !tbaa !11
  %159 = add nsw i32 %.03668, 1
  %160 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @V, i64 0, i64 %154
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %161 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %160) #7
  store ptr %161, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  %162 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %160) #7
  store ptr %162, ptr %23, align 8
  %163 = 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) #7
  br i1 %163, label %.lr.ph66, label %._crit_edge67

.lr.ph66:                                         ; preds = %158
  %164 = add nsw i32 %152, 1
  br label %167

._crit_edge67:                                    ; preds = %180, %158
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br label %183

165:                                              ; preds = %._crit_edge64
  %166 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #7
  br label %222

167:                                              ; preds = %.lr.ph66, %180
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #7
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %169 = load i32, ptr %168, align 4, !tbaa !5
  store i32 %169, ptr %24, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [100010 x i8], ptr @visited, i64 0, i64 %170
  %172 = load i8, ptr %171, align 1, !tbaa !11, !range !13, !noundef !14
  %173 = trunc nuw i8 %172 to i1
  br i1 %173, label %180, label %174

174:                                              ; preds = %167
  %175 = load i32, ptr %145, align 4, !tbaa !5
  %.not43 = icmp eq i32 %169, %175
  br i1 %.not43, label %180, label %176

176:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #7
  store i32 %164, ptr %26, align 4, !tbaa !5
  call void @_ZNSt5tupleIJiiiEEC2IJRiiS2_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %21) #7
  invoke void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %16, ptr noundef nonnull align 4 dereferenceable(12) %25)
          to label %177 unwind label %178

177:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #7
  br label %180

178:                                              ; preds = %176
  %179 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  br label %222

180:                                              ; preds = %177, %174, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %182 = 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) #7
  br i1 %182, label %167, label %._crit_edge67

183:                                              ; preds = %._crit_edge67, %146
  %.137 = phi i32 [ %.03668, %146 ], [ %159, %._crit_edge67 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  %184 = call noundef zeroext i1 @_ZNKSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  br i1 %184, label %._crit_edge71, label %146, !llvm.loop !18

._crit_edge71:                                    ; preds = %183, %142
  %.036.lcssa = phi i32 [ 0, %142 ], [ %.137, %183 ]
  %185 = add nsw i32 %.036.lcssa, -1
  %186 = load i32, ptr %1, align 4, !tbaa !5
  %187 = xor i32 %.036.lcssa, -1
  %188 = add i32 %186, %187
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
          to label %190 unwind label %218

190:                                              ; preds = %._crit_edge71
  %191 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %189, i32 noundef %.240)
          to label %192 unwind label %218

192:                                              ; preds = %190
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %191, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %194 unwind label %218

194:                                              ; preds = %192
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
          to label %196 unwind label %218

196:                                              ; preds = %194
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %195, i32 noundef %.034.lcssa)
          to label %198 unwind label %218

198:                                              ; preds = %196
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %197, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %200 unwind label %218

200:                                              ; preds = %198
  %201 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.3)
          to label %202 unwind label %218

202:                                              ; preds = %200
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %201, i32 noundef %.036.lcssa)
          to label %204 unwind label %218

204:                                              ; preds = %202
  %205 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %203, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %206 unwind label %218

206:                                              ; preds = %204
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.4)
          to label %208 unwind label %218

208:                                              ; preds = %206
  %209 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %207, i32 noundef %185)
          to label %210 unwind label %218

210:                                              ; preds = %208
  %211 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %209, ptr noundef nonnull @.str.5)
          to label %212 unwind label %218

212:                                              ; preds = %210
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %211, i32 noundef %188)
          to label %214 unwind label %218

214:                                              ; preds = %212
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.invoke79 unwind label %218

.invoke79:                                        ; preds = %214
  %.not = icmp slt i32 %188, %.036.lcssa
  %216 = select i1 %.not, ptr @.str.7, ptr @.str.6
  %217 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %216)
          to label %.invoke unwind label %218

218:                                              ; preds = %.invoke79, %.invoke, %214, %212, %210, %208, %206, %204, %202, %200, %198, %196, %194, %192, %190, %._crit_edge71
  %219 = landingpad { ptr, i32 }
          cleanup
  br label %222

.invoke:                                          ; preds = %.invoke79
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %217, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %221 unwind label %218

221:                                              ; preds = %.invoke
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %16) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #7
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

222:                                              ; preds = %165, %178, %218, %116
  %.pn.pn = phi { ptr, i32 } [ %117, %116 ], [ %179, %178 ], [ %219, %218 ], [ %166, %165 ]
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %16) #7
  br label %223

223:                                              ; preds = %222, %114
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %222 ], [ %115, %114 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %16) #7
  br label %224

224:                                              ; preds = %72, %89, %223, %70
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %71, %70 ], [ %.pn.pn.pn, %223 ], [ %90, %89 ], [ %73, %72 ]
  call void @_ZNSt5stackISt5tupleIJiiiEESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

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 #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 #3 align 2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; 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 #5

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiiEEC2IJRiiS2_ELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4 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 #4 align 2

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

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

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

; 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 #3 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)) #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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