; LLVM IR from upupming/algorithm :: AdvancedLevel_C++/1014. Waiting in Line (30) (main)

; 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::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl" = type { %"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::vector.5" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.9" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%struct.node = type { i32, i32, %"class.std::queue" }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 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 i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca %"class.std::allocator.2", align 1
  %16 = alloca %"class.std::vector.5", align 8
  %17 = alloca i8, align 1
  %18 = alloca %"class.std::allocator.9", align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::_Bit_reference", align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"struct.std::_Bit_reference", align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::_Bit_reference", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !5
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  %34 = sext i32 %33 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %34, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %35 unwind label %45

35:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %38, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %39 unwind label %49

39:                                               ; preds = %35
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %59, %39
  %41 = load i32, ptr %13, align 4, !tbaa !5
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %53, label %44

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

45:                                               ; preds = %0
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %9, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  br label %336

49:                                               ; preds = %35
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %9, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %335

53:                                               ; preds = %40
  %54 = load i32, ptr %13, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %55) #5
  %57 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %56)
          to label %58 unwind label %62

58:                                               ; preds = %53
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %13, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %13, align 4, !tbaa !5
  br label %40, !llvm.loop !9

62:                                               ; preds = %53
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %9, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %334

66:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  call void @_ZNSaI4nodeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt6vectorI4nodeSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %69, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %70 unwind label %80

70:                                               ; preds = %66
  call void @_ZNSt15__new_allocatorI4nodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #5
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  store i8 0, ptr %17, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef %73, ptr noundef nonnull align 1 dereferenceable(1) %17, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %74 unwind label %84

74:                                               ; preds = %70
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %171, %74
  %76 = load i32, ptr %19, align 4, !tbaa !5
  %77 = load i32, ptr %3, align 4, !tbaa !5
  %78 = icmp sle i32 %76, %77
  br i1 %78, label %88, label %79

79:                                               ; preds = %75
  store i32 5, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %174

80:                                               ; preds = %66
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  call void @_ZNSt15__new_allocatorI4nodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %333

84:                                               ; preds = %70
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %9, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %332

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

89:                                               ; preds = %166, %88
  %90 = load i32, ptr %21, align 4, !tbaa !5
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = icmp sle i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  store i32 8, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %170

94:                                               ; preds = %89
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = load i32, ptr %4, align 4, !tbaa !5
  %97 = icmp sle i32 %95, %96
  br i1 %97, label %98, label %165

98:                                               ; preds = %94
  %99 = load i32, ptr %21, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %100) #5
  %102 = getelementptr inbounds %struct.node, ptr %101, i32 0, i32 2
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %104) #5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %102, ptr noundef nonnull align 4 dereferenceable(4) %105)
          to label %106 unwind label %123

106:                                              ; preds = %98
  %107 = load i32, ptr %21, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %108) #5
  %110 = getelementptr inbounds %struct.node, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !13
  %112 = icmp sge i32 %111, 540
  br i1 %112, label %113, label %131

113:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %114 = load i32, ptr %6, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef %115)
          to label %117 unwind label %127

117:                                              ; preds = %113
  %118 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %119 = extractvalue { ptr, i64 } %116, 0
  store ptr %119, ptr %118, align 8
  %120 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %121 = extractvalue { ptr, i64 } %116, 1
  store i64 %121, ptr %120, align 8
  %122 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %22, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %131

123:                                              ; preds = %98
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %9, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %10, align 4
  br label %169

127:                                              ; preds = %113
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %9, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %169

131:                                              ; preds = %117, %106
  %132 = load i32, ptr %6, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %133) #5
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = load i32, ptr %21, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %137) #5
  %139 = getelementptr inbounds %struct.node, ptr %138, i32 0, i32 1
  %140 = load i32, ptr %139, align 4, !tbaa !13
  %141 = add nsw i32 %140, %135
  store i32 %141, ptr %139, align 4, !tbaa !13
  %142 = load i32, ptr %19, align 4, !tbaa !5
  %143 = icmp eq i32 %142, 1
  br i1 %143, label %144, label %154

144:                                              ; preds = %131
  %145 = load i32, ptr %21, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %146) #5
  %148 = getelementptr inbounds %struct.node, ptr %147, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !13
  %150 = load i32, ptr %21, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %151) #5
  %153 = getelementptr inbounds %struct.node, ptr %152, i32 0, i32 0
  store i32 %149, ptr %153, align 8, !tbaa !23
  br label %154

154:                                              ; preds = %144, %131
  %155 = load i32, ptr %21, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %156) #5
  %158 = getelementptr inbounds %struct.node, ptr %157, i32 0, i32 1
  %159 = load i32, ptr %158, align 4, !tbaa !13
  %160 = load i32, ptr %6, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %161) #5
  store i32 %159, ptr %162, align 4, !tbaa !5
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %6, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %154, %94
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %21, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %21, align 4, !tbaa !5
  br label %89, !llvm.loop !24

169:                                              ; preds = %127, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %331

170:                                              ; preds = %93
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %19, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %19, align 4, !tbaa !5
  br label %75, !llvm.loop !25

174:                                              ; preds = %79
  br label %175

175:                                              ; preds = %258, %174
  %176 = load i32, ptr %6, align 4, !tbaa !5
  %177 = load i32, ptr %4, align 4, !tbaa !5
  %178 = icmp sle i32 %176, %177
  br i1 %178, label %179, label %280

179:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %180 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 1) #5
  %181 = getelementptr inbounds %struct.node, ptr %180, i32 0, i32 0
  %182 = load i32, ptr %181, align 8, !tbaa !23
  store i32 %182, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 1, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 2, ptr %25, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %204, %179
  %184 = load i32, ptr %25, align 4, !tbaa !5
  %185 = load i32, ptr %2, align 4, !tbaa !5
  %186 = icmp sle i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 13, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %207

188:                                              ; preds = %183
  %189 = load i32, ptr %25, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %190) #5
  %192 = getelementptr inbounds %struct.node, ptr %191, i32 0, i32 0
  %193 = load i32, ptr %192, align 8, !tbaa !23
  %194 = load i32, ptr %23, align 4, !tbaa !5
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %196, label %203

196:                                              ; preds = %188
  %197 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %197, ptr %24, align 4, !tbaa !5
  %198 = load i32, ptr %25, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %199) #5
  %201 = getelementptr inbounds %struct.node, ptr %200, i32 0, i32 0
  %202 = load i32, ptr %201, align 8, !tbaa !23
  store i32 %202, ptr %23, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %196, %188
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %25, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %25, align 4, !tbaa !5
  br label %183, !llvm.loop !26

207:                                              ; preds = %187
  %208 = load i32, ptr %24, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %209) #5
  %211 = getelementptr inbounds %struct.node, ptr %210, i32 0, i32 2
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %211)
          to label %212 unwind label %250

212:                                              ; preds = %207
  %213 = load i32, ptr %24, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %214) #5
  %216 = getelementptr inbounds %struct.node, ptr %215, i32 0, i32 2
  %217 = load i32, ptr %6, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %218) #5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %216, ptr noundef nonnull align 4 dereferenceable(4) %219)
          to label %220 unwind label %250

220:                                              ; preds = %212
  %221 = load i32, ptr %24, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %222) #5
  %224 = getelementptr inbounds %struct.node, ptr %223, i32 0, i32 2
  %225 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %224)
          to label %226 unwind label %250

226:                                              ; preds = %220
  %227 = load i32, ptr %225, align 4, !tbaa !5
  %228 = load i32, ptr %24, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %229) #5
  %231 = getelementptr inbounds %struct.node, ptr %230, i32 0, i32 0
  %232 = load i32, ptr %231, align 8, !tbaa !23
  %233 = add nsw i32 %232, %227
  store i32 %233, ptr %231, align 8, !tbaa !23
  %234 = load i32, ptr %24, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %235) #5
  %237 = getelementptr inbounds %struct.node, ptr %236, i32 0, i32 1
  %238 = load i32, ptr %237, align 4, !tbaa !13
  %239 = icmp sge i32 %238, 540
  br i1 %239, label %240, label %258

240:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %241 = load i32, ptr %6, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef %242)
          to label %244 unwind label %254

244:                                              ; preds = %240
  %245 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %246 = extractvalue { ptr, i64 } %243, 0
  store ptr %246, ptr %245, align 8
  %247 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %248 = extractvalue { ptr, i64 } %243, 1
  store i64 %248, ptr %247, align 8
  %249 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %26, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  br label %258

250:                                              ; preds = %220, %212, %207
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %9, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %10, align 4
  br label %279

254:                                              ; preds = %240
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %9, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  br label %279

258:                                              ; preds = %244, %226
  %259 = load i32, ptr %6, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %260) #5
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = load i32, ptr %24, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %264) #5
  %266 = getelementptr inbounds %struct.node, ptr %265, i32 0, i32 1
  %267 = load i32, ptr %266, align 4, !tbaa !13
  %268 = add nsw i32 %267, %262
  store i32 %268, ptr %266, align 4, !tbaa !13
  %269 = load i32, ptr %24, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %270) #5
  %272 = getelementptr inbounds %struct.node, ptr %271, i32 0, i32 1
  %273 = load i32, ptr %272, align 4, !tbaa !13
  %274 = load i32, ptr %6, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %275) #5
  store i32 %273, ptr %276, align 4, !tbaa !5
  %277 = load i32, ptr %6, align 4, !tbaa !5
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %175, !llvm.loop !27

279:                                              ; preds = %254, %250
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %331

280:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  store i32 1, ptr %27, align 4, !tbaa !5
  br label %281

281:                                              ; preds = %325, %280
  %282 = load i32, ptr %27, align 4, !tbaa !5
  %283 = load i32, ptr %5, align 4, !tbaa !5
  %284 = icmp sle i32 %282, %283
  br i1 %284, label %286, label %285

285:                                              ; preds = %281
  store i32 16, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %329

286:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %287 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %28)
          to label %288 unwind label %307

288:                                              ; preds = %286
  %289 = load i32, ptr %28, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %290) #5
  %292 = load i32, ptr %291, align 4, !tbaa !5
  store i32 %292, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #5
  %293 = load i32, ptr %28, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %16, i64 noundef %294)
          to label %296 unwind label %311

296:                                              ; preds = %288
  %297 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 0
  %298 = extractvalue { ptr, i64 } %295, 0
  store ptr %298, ptr %297, align 8
  %299 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 1
  %300 = extractvalue { ptr, i64 } %295, 1
  store i64 %300, ptr %299, align 8
  %301 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %30) #5
  %302 = zext i1 %301 to i32
  %303 = icmp eq i32 %302, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #5
  br i1 %303, label %304, label %315

304:                                              ; preds = %296
  %305 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %306 unwind label %307

306:                                              ; preds = %304
  br label %324

307:                                              ; preds = %315, %304, %286
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %9, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %10, align 4
  br label %328

311:                                              ; preds = %288
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %9, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #5
  br label %328

315:                                              ; preds = %296
  %316 = load i32, ptr %29, align 4, !tbaa !5
  %317 = add nsw i32 %316, 480
  %318 = sdiv i32 %317, 60
  %319 = load i32, ptr %29, align 4, !tbaa !5
  %320 = add nsw i32 %319, 480
  %321 = srem i32 %320, 60
  %322 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %318, i32 noundef %321)
          to label %323 unwind label %307

323:                                              ; preds = %315
  br label %324

324:                                              ; preds = %323, %306
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %325

325:                                              ; preds = %324
  %326 = load i32, ptr %27, align 4, !tbaa !5
  %327 = add nsw i32 %326, 1
  store i32 %327, ptr %27, align 4, !tbaa !5
  br label %281, !llvm.loop !28

328:                                              ; preds = %311, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %331

329:                                              ; preds = %285
  store i32 0, ptr %1, align 4
  store i32 1, ptr %20, align 4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #5
  call void @_ZNSt6vectorI4nodeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %330 = load i32, ptr %1, align 4
  ret i32 %330

331:                                              ; preds = %328, %279, %169
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %16) #5
  br label %332

332:                                              ; preds = %331, %84
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #5
  call void @_ZNSt6vectorI4nodeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  br label %333

333:                                              ; preds = %332, %80
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  br label %334

334:                                              ; preds = %333, %62
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br label %335

335:                                              ; preds = %334, %49
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %336

336:                                              ; preds = %335, %45
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %337

337:                                              ; preds = %336
  %338 = load ptr, ptr %9, align 8
  %339 = load i32, ptr %10, align 4
  %340 = insertvalue { ptr, i32 } poison, ptr %338, 0
  %341 = insertvalue { ptr, i32 } %340, i32 %339, 1
  resume { ptr, i32 } %341
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!14, !6, i64 4}
!14 = !{!"_ZTS4node", !6, i64 0, !6, i64 4, !15, i64 8}
!15 = !{!"_ZTSSt5queueIiSt5dequeIiSaIiEEE", !16, i64 0}
!16 = !{!"_ZTSSt5dequeIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSSt11_Deque_baseIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE11_Deque_implE", !19, i64 0}
!19 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE16_Deque_impl_dataE", !20, i64 0, !21, i64 8, !22, i64 16, !22, i64 48}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt15_Deque_iteratorIiRiPiE", !20, i64 0, !20, i64 8, !20, i64 16, !20, i64 24}
!23 = !{!14, !6, i64 0}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !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::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl" = type { %"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<node, std::allocator<node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::vector.5" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.9" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 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 i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca %"class.std::vector.5", align 8
  %12 = alloca i8, align 1
  %13 = alloca %"class.std::allocator.9", align 1
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  %21 = sext i32 %20 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %22 unwind label %31

22:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  %25 = sext i32 %24 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %26 unwind label %33

26:                                               ; preds = %22
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %.not85 = icmp slt i32 %27, 1
  br i1 %.not85, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %26
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  %30 = sext i32 %29 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #5
  call void @_ZNSaI4nodeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt6vectorI4nodeSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %30, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %39 unwind label %55

31:                                               ; preds = %0
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  br label %193

33:                                               ; preds = %22
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  br label %192

.lr.ph:                                           ; preds = %26, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %26 ]
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #5
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %35)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %.not.not = icmp slt i64 %indvars.iv, %38
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

39:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorI4nodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #5
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  %42 = sext i32 %41 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  store i8 0, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %42, ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %43 unwind label %57

43:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %.not6592 = icmp slt i32 %44, 1
  br i1 %.not6592, label %.preheader79, label %.preheader80.lr.ph

.preheader80.lr.ph:                               ; preds = %43
  %45 = getelementptr inbounds i8, ptr %14, i64 8
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = icmp slt i32 %46, 1
  br i1 %47, label %.preheader79, label %.preheader80

.preheader80:                                     ; preds = %.preheader80.lr.ph, %._crit_edge91
  %48 = phi i32 [ %59, %._crit_edge91 ], [ %44, %.preheader80.lr.ph ]
  %49 = phi i32 [ %60, %._crit_edge91 ], [ %46, %.preheader80.lr.ph ]
  %50 = phi i32 [ %61, %._crit_edge91 ], [ %46, %.preheader80.lr.ph ]
  %.05094 = phi i32 [ %62, %._crit_edge91 ], [ 1, %.preheader80.lr.ph ]
  %.06193 = phi i32 [ %.162.lcssa, %._crit_edge91 ], [ 1, %.preheader80.lr.ph ]
  %.not7087 = icmp slt i32 %50, 1
  br i1 %.not7087, label %._crit_edge91, label %.lr.ph90

.lr.ph90:                                         ; preds = %.preheader80
  %51 = icmp eq i32 %.05094, 1
  br label %63

.preheader79:                                     ; preds = %._crit_edge91, %.preheader80.lr.ph, %43
  %.061.lcssa = phi i32 [ 1, %43 ], [ 1, %.preheader80.lr.ph ], [ %.162.lcssa, %._crit_edge91 ]
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %.not66104 = icmp sgt i32 %.061.lcssa, %52
  br i1 %.not66104, label %.preheader, label %.lr.ph106

.lr.ph106:                                        ; preds = %.preheader79
  %53 = getelementptr inbounds i8, ptr %15, i64 8
  %54 = sext i32 %.061.lcssa to i64
  br label %109

55:                                               ; preds = %._crit_edge
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI4nodeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  br label %191

57:                                               ; preds = %39
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %190

._crit_edge91.loopexit:                           ; preds = %104
  %.pre122 = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge91

._crit_edge91:                                    ; preds = %._crit_edge91.loopexit, %.preheader80
  %59 = phi i32 [ %48, %.preheader80 ], [ %.pre122, %._crit_edge91.loopexit ]
  %60 = phi i32 [ %49, %.preheader80 ], [ %105, %._crit_edge91.loopexit ]
  %61 = phi i32 [ %50, %.preheader80 ], [ %105, %._crit_edge91.loopexit ]
  %.162.lcssa = phi i32 [ %.06193, %.preheader80 ], [ %.263, %._crit_edge91.loopexit ]
  %62 = add nuw nsw i32 %.05094, 1
  %.not65.not = icmp slt i32 %.05094, %59
  br i1 %.not65.not, label %.preheader80, label %.preheader79, !llvm.loop !13

63:                                               ; preds = %.lr.ph90, %104
  %64 = phi i32 [ %49, %.lr.ph90 ], [ %105, %104 ]
  %indvars.iv113 = phi i64 [ 1, %.lr.ph90 ], [ %indvars.iv.next114, %104 ]
  %.16288 = phi i32 [ %.06193, %.lr.ph90 ], [ %.263, %104 ]
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %.not71 = icmp sgt i32 %.16288, %65
  br i1 %.not71, label %104, label %66

66:                                               ; preds = %63
  %67 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv113) #5
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = sext i32 %.16288 to i64
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %69) #5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %68, ptr noundef nonnull align 4 dereferenceable(4) %70)
          to label %71 unwind label %82

71:                                               ; preds = %66
  %72 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv113) #5
  %73 = getelementptr inbounds i8, ptr %72, i64 4
  %74 = load i32, ptr %73, align 4, !tbaa !15
  %75 = icmp sgt i32 %74, 539
  br i1 %75, label %76, label %86

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  %77 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %69)
          to label %78 unwind label %84

78:                                               ; preds = %76
  %79 = extractvalue { ptr, i64 } %77, 0
  store ptr %79, ptr %14, align 8
  %80 = extractvalue { ptr, i64 } %77, 1
  store i64 %80, ptr %45, align 8
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %14, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br label %86

82:                                               ; preds = %66
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %189

84:                                               ; preds = %76
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  br label %189

86:                                               ; preds = %78, %71
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %69) #5
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv113) #5
  %90 = getelementptr inbounds i8, ptr %89, i64 4
  %91 = load i32, ptr %90, align 4, !tbaa !15
  %92 = add nsw i32 %91, %88
  store i32 %92, ptr %90, align 4, !tbaa !15
  br i1 %51, label %93, label %98

93:                                               ; preds = %86
  %94 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv113) #5
  %95 = getelementptr inbounds i8, ptr %94, i64 4
  %96 = load i32, ptr %95, align 4, !tbaa !15
  %97 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv113) #5
  store i32 %96, ptr %97, align 8, !tbaa !25
  br label %98

98:                                               ; preds = %93, %86
  %99 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv113) #5
  %100 = getelementptr inbounds i8, ptr %99, i64 4
  %101 = load i32, ptr %100, align 4, !tbaa !15
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %69) #5
  store i32 %101, ptr %102, align 4, !tbaa !5
  %103 = add nsw i32 %.16288, 1
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %63, %98
  %105 = phi i32 [ %.pre, %98 ], [ %64, %63 ]
  %.263 = phi i32 [ %103, %98 ], [ %.16288, %63 ]
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %106 = sext i32 %105 to i64
  %.not70.not = icmp slt i64 %indvars.iv113, %106
  br i1 %.not70.not, label %63, label %._crit_edge91.loopexit, !llvm.loop !26

.preheader:                                       ; preds = %151, %.preheader79
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %.not67107 = icmp slt i32 %107, 1
  br i1 %.not67107, label %._crit_edge110, label %.lr.ph109

.lr.ph109:                                        ; preds = %.preheader
  %108 = getelementptr inbounds i8, ptr %17, i64 8
  br label %164

109:                                              ; preds = %.lr.ph106, %151
  %indvars.iv119 = phi i64 [ %54, %.lr.ph106 ], [ %indvars.iv.next120, %151 ]
  %110 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 1) #5
  %111 = load i32, ptr %1, align 4, !tbaa !5
  %.not6896 = icmp slt i32 %111, 2
  br i1 %.not6896, label %._crit_edge102, label %.lr.ph101.preheader

.lr.ph101.preheader:                              ; preds = %109
  %112 = load i32, ptr %110, align 8, !tbaa !25
  br label %.lr.ph101

._crit_edge102:                                   ; preds = %126, %109
  %.046.lcssa = phi i32 [ 1, %109 ], [ %.1, %126 ]
  %113 = sext i32 %.046.lcssa to i64
  %114 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %113) #5
  %115 = getelementptr inbounds i8, ptr %114, i64 8
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %115)
  %116 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %113) #5
  %117 = getelementptr inbounds i8, ptr %116, i64 8
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv119) #5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %117, ptr noundef nonnull align 4 dereferenceable(4) %118)
          to label %129 unwind label %147

.lr.ph101:                                        ; preds = %.lr.ph101.preheader, %126
  %indvars.iv116 = phi i64 [ 2, %.lr.ph101.preheader ], [ %indvars.iv.next117, %126 ]
  %.04698 = phi i32 [ 1, %.lr.ph101.preheader ], [ %.1, %126 ]
  %.04797 = phi i32 [ %112, %.lr.ph101.preheader ], [ %.148, %126 ]
  %119 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv116) #5
  %120 = load i32, ptr %119, align 8, !tbaa !25
  %121 = icmp slt i32 %120, %.04797
  br i1 %121, label %122, label %126

122:                                              ; preds = %.lr.ph101
  %123 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv116) #5
  %124 = load i32, ptr %123, align 8, !tbaa !25
  %125 = trunc nuw nsw i64 %indvars.iv116 to i32
  br label %126

126:                                              ; preds = %.lr.ph101, %122
  %.148 = phi i32 [ %124, %122 ], [ %.04797, %.lr.ph101 ]
  %.1 = phi i32 [ %125, %122 ], [ %.04698, %.lr.ph101 ]
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %127 = load i32, ptr %1, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %.not68.not = icmp slt i64 %indvars.iv116, %128
  br i1 %.not68.not, label %.lr.ph101, label %._crit_edge102, !llvm.loop !27

129:                                              ; preds = %._crit_edge102
  %130 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %113) #5
  %131 = getelementptr inbounds i8, ptr %130, i64 8
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %131)
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %113) #5
  %135 = load i32, ptr %134, align 8, !tbaa !25
  %136 = add nsw i32 %135, %133
  store i32 %136, ptr %134, align 8, !tbaa !25
  %137 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %113) #5
  %138 = getelementptr inbounds i8, ptr %137, i64 4
  %139 = load i32, ptr %138, align 4, !tbaa !15
  %140 = icmp sgt i32 %139, 539
  br i1 %140, label %141, label %151

141:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  %142 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %indvars.iv119)
          to label %143 unwind label %149

143:                                              ; preds = %141
  %144 = extractvalue { ptr, i64 } %142, 0
  store ptr %144, ptr %15, align 8
  %145 = extractvalue { ptr, i64 } %142, 1
  store i64 %145, ptr %53, align 8
  %146 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %151

147:                                              ; preds = %._crit_edge102
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %189

149:                                              ; preds = %141
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %189

151:                                              ; preds = %143, %129
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv119) #5
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %113) #5
  %155 = getelementptr inbounds i8, ptr %154, i64 4
  %156 = load i32, ptr %155, align 4, !tbaa !15
  %157 = add nsw i32 %156, %153
  store i32 %157, ptr %155, align 4, !tbaa !15
  %158 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNSt6vectorI4nodeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %113) #5
  %159 = getelementptr inbounds i8, ptr %158, i64 4
  %160 = load i32, ptr %159, align 4, !tbaa !15
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv119) #5
  store i32 %160, ptr %161, align 4, !tbaa !5
  %indvars.iv.next120 = add nsw i64 %indvars.iv119, 1
  %162 = load i32, ptr %3, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %.not66.not = icmp slt i64 %indvars.iv119, %163
  br i1 %.not66.not, label %109, label %.preheader, !llvm.loop !28

._crit_edge110:                                   ; preds = %186, %.preheader
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #5
  call void @_ZNSt6vectorI4nodeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

164:                                              ; preds = %.lr.ph109, %186
  %.0108 = phi i32 [ 1, %.lr.ph109 ], [ %187, %186 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  %165 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %16)
  %166 = load i32, ptr %16, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %167) #5
  %169 = load i32, ptr %168, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #5
  %170 = load i32, ptr %16, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %171)
          to label %173 unwind label %179

173:                                              ; preds = %164
  %174 = extractvalue { ptr, i64 } %172, 0
  store ptr %174, ptr %17, align 8
  %175 = extractvalue { ptr, i64 } %172, 1
  store i64 %175, ptr %108, align 8
  %176 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  br i1 %176, label %177, label %181

177:                                              ; preds = %173
  %178 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %186

179:                                              ; preds = %164
  %180 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  br label %189

181:                                              ; preds = %173
  %182 = add nsw i32 %169, 480
  %183 = sdiv i32 %182, 60
  %184 = srem i32 %182, 60
  %185 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %183, i32 noundef %184)
  br label %186

186:                                              ; preds = %181, %177
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  %187 = add nuw nsw i32 %.0108, 1
  %188 = load i32, ptr %4, align 4, !tbaa !5
  %.not67.not = icmp slt i32 %.0108, %188
  br i1 %.not67.not, label %164, label %._crit_edge110, !llvm.loop !29

189:                                              ; preds = %147, %149, %82, %84, %179
  %.pn72.pn = phi { ptr, i32 } [ %180, %179 ], [ %85, %84 ], [ %83, %82 ], [ %150, %149 ], [ %148, %147 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  br label %190

190:                                              ; preds = %189, %57
  %.pn72.pn.pn = phi { ptr, i32 } [ %.pn72.pn, %189 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #5
  call void @_ZNSt6vectorI4nodeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  br label %191

191:                                              ; preds = %190, %55
  %.pn72.pn.pn.pn = phi { ptr, i32 } [ %.pn72.pn.pn, %190 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %192

192:                                              ; preds = %191, %33
  %.pn72.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn72.pn.pn.pn, %191 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %193

193:                                              ; preds = %192, %31
  %.pn72.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn72.pn.pn.pn.pn, %192 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn72.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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = distinct !{!13, !10, !14}
!14 = !{!"llvm.loop.unswitch.partial.disable"}
!15 = !{!16, !6, i64 4}
!16 = !{!"_ZTS4node", !6, i64 0, !6, i64 4, !17, i64 8}
!17 = !{!"_ZTSSt5queueIiSt5dequeIiSaIiEEE", !18, i64 0}
!18 = !{!"_ZTSSt5dequeIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt11_Deque_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE11_Deque_implE", !21, i64 0}
!21 = !{!"_ZTSNSt11_Deque_baseIiSaIiEE16_Deque_impl_dataE", !22, i64 0, !23, i64 8, !24, i64 16, !24, i64 48}
!22 = !{!"any pointer", !7, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSSt15_Deque_iteratorIiRiPiE", !22, i64 0, !22, i64 8, !22, i64 16, !22, i64 24}
!25 = !{!16, !6, i64 0}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}


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