; LLVM IR from upupming/algorithm :: CCCC-GPLT (L2-026 小字辈)

; 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::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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<peo, std::allocator<peo>>::_Deque_impl" }
%"struct.std::_Deque_base<peo, std::allocator<peo>>::_Deque_impl" = type { %"struct.std::_Deque_base<peo, std::allocator<peo>>::_Deque_impl_data" }
%"struct.std::_Deque_base<peo, std::allocator<peo>>::_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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<peo, std::allocator<peo>>::_Vector_impl" }
%"struct.std::_Vector_base<peo, std::allocator<peo>>::_Vector_impl" = type { %"struct.std::_Vector_base<peo, std::allocator<peo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<peo, std::allocator<peo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%struct.peo = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 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 %"class.std::queue", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca i32, align 4
  %12 = alloca %struct.peo, align 4
  %13 = alloca %struct.peo, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.peo, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 -1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #8
  call void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #8
  call void @_ZNSt6vectorI3peoSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %20 unwind label %30

20:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  %23 = sext i32 %22 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %23, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %24 unwind label %34

24:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %53, %24
  %26 = load i32, ptr %11, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %38, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %56

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %7, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %8, align 4
  br label %178

34:                                               ; preds = %20
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %7, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %8, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  br label %177

38:                                               ; preds = %25
  %39 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %40 unwind label %44

40:                                               ; preds = %38
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = icmp eq i32 %41, -1
  br i1 %42, label %43, label %48

43:                                               ; preds = %40
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %48

44:                                               ; preds = %48, %38
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %176

48:                                               ; preds = %43, %40
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %50) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %52 unwind label %44

52:                                               ; preds = %48
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %11, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %11, align 4, !tbaa !5
  br label %25, !llvm.loop !9

56:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %57 = getelementptr inbounds %struct.peo, ptr %12, i32 0, i32 0
  store i32 0, ptr %57, align 4, !tbaa !11
  %58 = getelementptr inbounds %struct.peo, ptr %12, i32 0, i32 1
  store i32 0, ptr %58, align 4, !tbaa !13
  invoke void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %59 unwind label %78

59:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %60

60:                                               ; preds = %126, %59
  %61 = invoke noundef zeroext i1 @_ZNKSt5queueI3peoSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %62 unwind label %82

62:                                               ; preds = %60
  %63 = xor i1 %61, true
  br i1 %63, label %64, label %129

64:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %65 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %66 unwind label %86

66:                                               ; preds = %64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %65, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %67 = getelementptr inbounds %struct.peo, ptr %13, i32 0, i32 0
  %68 = load i32, ptr %67, align 4, !tbaa !11
  store i32 %68, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %69 = getelementptr inbounds %struct.peo, ptr %13, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !13
  store i32 %70, ptr %15, align 4, !tbaa !5
  %71 = getelementptr inbounds %struct.peo, ptr %13, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !13
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = icmp sgt i32 %72, %73
  br i1 %74, label %75, label %90

75:                                               ; preds = %66
  %76 = getelementptr inbounds %struct.peo, ptr %13, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !13
  store i32 %77, ptr %4, align 4, !tbaa !5
  br label %90

78:                                               ; preds = %56
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %7, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %176

82:                                               ; preds = %132, %129, %60
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %7, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %8, align 4
  br label %176

86:                                               ; preds = %64
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %7, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %8, align 4
  br label %128

90:                                               ; preds = %75, %66
  invoke void @_ZNSt6vectorI3peoSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %91 unwind label %102

91:                                               ; preds = %90
  invoke void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %92 unwind label %102

92:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %119, %92
  %94 = load i32, ptr %16, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = load i32, ptr %14, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %97) #8
  %99 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %98) #8
  %100 = icmp ult i64 %95, %99
  br i1 %100, label %106, label %101

101:                                              ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %126

102:                                              ; preds = %91, %90
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %7, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %8, align 4
  br label %127

106:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %107 = getelementptr inbounds %struct.peo, ptr %17, i32 0, i32 0
  %108 = load i32, ptr %14, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %109) #8
  %111 = load i32, ptr %16, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %112) #8
  %114 = load i32, ptr %113, align 4, !tbaa !5
  store i32 %114, ptr %107, align 4, !tbaa !11
  %115 = getelementptr inbounds %struct.peo, ptr %17, i32 0, i32 1
  %116 = load i32, ptr %15, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %115, align 4, !tbaa !13
  invoke void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %118 unwind label %122

118:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %16, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %16, align 4, !tbaa !5
  br label %93, !llvm.loop !15

122:                                              ; preds = %106
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %7, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %127

126:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %60, !llvm.loop !16

127:                                              ; preds = %122, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %128

128:                                              ; preds = %127, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %176

129:                                              ; preds = %62
  %130 = load i32, ptr %4, align 4, !tbaa !5
  %131 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %130)
          to label %132 unwind label %82

132:                                              ; preds = %129
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %134 unwind label %82

134:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %171, %134
  %136 = load i32, ptr %18, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = call noundef i64 @_ZNKSt6vectorI3peoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %139 = icmp ult i64 %137, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %174

141:                                              ; preds = %135
  %142 = load i32, ptr %18, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI3peoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %143) #8
  %145 = getelementptr inbounds %struct.peo, ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !13
  %147 = load i32, ptr %4, align 4, !tbaa !5
  %148 = icmp eq i32 %146, %147
  br i1 %148, label %149, label %170

149:                                              ; preds = %141
  %150 = load i32, ptr %18, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI3peoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %151) #8
  %153 = getelementptr inbounds %struct.peo, ptr %152, i32 0, i32 0
  %154 = load i32, ptr %153, align 4, !tbaa !11
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %154)
          to label %156 unwind label %165

156:                                              ; preds = %149
  %157 = load i32, ptr %18, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = call noundef i64 @_ZNKSt6vectorI3peoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %160 = sub i64 %159, 1
  %161 = icmp ne i64 %158, %160
  br i1 %161, label %162, label %169

162:                                              ; preds = %156
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %164 unwind label %165

164:                                              ; preds = %162
  br label %169

165:                                              ; preds = %162, %149
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %7, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %176

169:                                              ; preds = %164, %156
  br label %170

170:                                              ; preds = %169, %141
  br label %171

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

174:                                              ; preds = %140
  store i32 0, ptr %1, align 4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @_ZNSt6vectorI3peoSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #8
  call void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %175 = load i32, ptr %1, align 4
  ret i32 %175

176:                                              ; preds = %165, %128, %82, %78, %44
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br label %177

177:                                              ; preds = %176, %34
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  br label %178

178:                                              ; preds = %177, %30
  call void @_ZNSt6vectorI3peoSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #8
  call void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %7, align 8
  %181 = load i32, ptr %8, align 4
  %182 = insertvalue { ptr, i32 } poison, ptr %180, 0
  %183 = insertvalue { ptr, i32 } %182, i32 %181, 1
  resume { ptr, i32 } %183
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS3peo", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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::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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<peo, std::allocator<peo>>::_Deque_impl" }
%"struct.std::_Deque_base<peo, std::allocator<peo>>::_Deque_impl" = type { %"struct.std::_Deque_base<peo, std::allocator<peo>>::_Deque_impl_data" }
%"struct.std::_Deque_base<peo, std::allocator<peo>>::_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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<peo, std::allocator<peo>>::_Vector_impl" }
%"struct.std::_Vector_base<peo, std::allocator<peo>>::_Vector_impl" = type { %"struct.std::_Vector_base<peo, std::allocator<peo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<peo, std::allocator<peo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%struct.peo = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 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 %"class.std::queue", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca i32, align 4
  %8 = alloca %struct.peo, align 4
  %9 = alloca %struct.peo, align 8
  %10 = alloca %struct.peo, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #8
  call void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorI3peoSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %11 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %12 unwind label %19

12:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = add nsw i32 %13, 1
  %15 = sext i32 %14 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %15, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %16 unwind label %21

16:                                               ; preds = %12
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 1, ptr %7, align 4, !tbaa !5
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %.not35 = icmp slt i32 %17, 1
  br i1 %.not35, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %34, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 0, ptr %18, align 4, !tbaa !11
  invoke void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %38 unwind label %46

19:                                               ; preds = %0
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %93

21:                                               ; preds = %12
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  br label %92

.lr.ph:                                           ; preds = %16, %34
  %23 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %24 unwind label %28

24:                                               ; preds = %.lr.ph
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = icmp eq i32 %25, -1
  br i1 %26, label %27, label %30

27:                                               ; preds = %24
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %30

28:                                               ; preds = %30, %.lr.ph
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %91

30:                                               ; preds = %27, %24
  %31 = phi i32 [ 0, %27 ], [ %25, %24 ]
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %32) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %34 unwind label %28

34:                                               ; preds = %30
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %7, align 4, !tbaa !5
  %37 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %35, %37
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !12

38:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  %39 = call noundef zeroext i1 @_ZNKSt5queueI3peoSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %39, label %._crit_edge43, label %.lr.ph42

.lr.ph42:                                         ; preds = %38
  %40 = getelementptr inbounds i8, ptr %10, i64 4
  br label %41

41:                                               ; preds = %.lr.ph42, %._crit_edge39
  %.01740 = phi i32 [ -1, %.lr.ph42 ], [ %spec.select, %._crit_edge39 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %42 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %43 = load i64, ptr %42, align 4
  store i64 %43, ptr %9, align 8
  %44 = lshr i64 %43, 32
  %45 = trunc nuw i64 %44 to i32
  %spec.select = call i32 @llvm.smax.i32(i32 %45, i32 %.01740)
  invoke void @_ZNSt6vectorI3peoSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %50 unwind label %56

46:                                               ; preds = %._crit_edge
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %91

48:                                               ; preds = %70, %._crit_edge43
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %91

50:                                               ; preds = %41
  call void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %sext = shl i64 %43, 32
  %51 = ashr exact i64 %sext, 32
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %51) #8
  %53 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #8
  %.not = icmp eq i64 %53, 0
  br i1 %.not, label %._crit_edge39, label %.lr.ph38

.lr.ph38:                                         ; preds = %50
  %54 = add nsw i32 %45, 1
  br label %58

._crit_edge39:                                    ; preds = %62, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %55 = call noundef zeroext i1 @_ZNKSt5queueI3peoSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %55, label %._crit_edge43, label %41, !llvm.loop !14

56:                                               ; preds = %41
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %68

58:                                               ; preds = %.lr.ph38, %62
  %indvars.iv = phi i64 [ 0, %.lr.ph38 ], [ %indvars.iv.next, %62 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %51) #8
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %indvars.iv) #8
  %61 = load i32, ptr %60, align 4, !tbaa !5
  store i32 %61, ptr %10, align 4, !tbaa !9
  store i32 %54, ptr %40, align 4, !tbaa !11
  invoke void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %62 unwind label %66

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %63 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %51) #8
  %64 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %63) #8
  %65 = icmp ugt i64 %64, %indvars.iv.next
  br i1 %65, label %58, label %._crit_edge39, !llvm.loop !15

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

68:                                               ; preds = %66, %56
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %91

._crit_edge43:                                    ; preds = %._crit_edge39, %38
  %.017.lcssa = phi i32 [ -1, %38 ], [ %spec.select, %._crit_edge39 ]
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.017.lcssa)
          to label %70 unwind label %48

70:                                               ; preds = %._crit_edge43
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %48

.preheader:                                       ; preds = %70
  %72 = call noundef i64 @_ZNKSt6vectorI3peoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %.not47 = icmp eq i64 %72, 0
  br i1 %.not47, label %._crit_edge46, label %.lr.ph45

._crit_edge46:                                    ; preds = %88, %.preheader
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorI3peoSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

.lr.ph45:                                         ; preds = %.preheader, %88
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %88 ], [ 0, %.preheader ]
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI3peoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv51) #8
  %74 = getelementptr inbounds i8, ptr %73, i64 4
  %75 = load i32, ptr %74, align 4, !tbaa !11
  %76 = icmp eq i32 %75, %.017.lcssa
  br i1 %76, label %77, label %88

77:                                               ; preds = %.lr.ph45
  %78 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI3peoSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv51) #8
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %79)
          to label %81 unwind label %86

81:                                               ; preds = %77
  %82 = call noundef i64 @_ZNKSt6vectorI3peoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %83 = add i64 %82, -1
  %.not27 = icmp eq i64 %83, %indvars.iv51
  br i1 %.not27, label %88, label %84

84:                                               ; preds = %81
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %88 unwind label %86

86:                                               ; preds = %84, %77
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %91

88:                                               ; preds = %.lr.ph45, %84, %81
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %89 = call noundef i64 @_ZNKSt6vectorI3peoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %90 = icmp ugt i64 %89, %indvars.iv.next52
  br i1 %90, label %.lr.ph45, label %._crit_edge46, !llvm.loop !16

91:                                               ; preds = %86, %68, %48, %46, %28
  %.pn29 = phi { ptr, i32 } [ %29, %28 ], [ %.pn, %68 ], [ %87, %86 ], [ %49, %48 ], [ %47, %46 ]
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  br label %92

92:                                               ; preds = %91, %21
  %.pn29.pn = phi { ptr, i32 } [ %.pn29, %91 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %93

93:                                               ; preds = %92, %19
  %.pn29.pn.pn = phi { ptr, i32 } [ %.pn29.pn, %92 ], [ %20, %19 ]
  call void @_ZNSt6vectorI3peoSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn29.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: mustprogress uwtable
declare dso_local void @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #2 align 2

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

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 #4

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueI3peoSt5dequeIS0_SaIS0_EEE5emptyEv(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(8) ptr @_ZNSt5queueI3peoSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

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

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

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

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

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

; 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 #2 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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI3peoSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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


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