; LLVM IR from xirc/cp-algorithm :: atcoder/abc067/D/main.ll (Z5solvev)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.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 }
%"class.std::initializer_list" = type { ptr, i64 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@G = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i1, align 1
  %2 = alloca %"class.std::priority_queue", align 8
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.5", align 8
  %9 = alloca i8, align 1
  %10 = alloca %"class.std::allocator.9", align 1
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca %"class.std::initializer_list", align 8
  %13 = alloca [3 x i32], align 4
  %14 = alloca %"class.std::allocator.2", align 1
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca %"class.std::initializer_list", align 8
  %17 = alloca [3 x i32], align 4
  %18 = alloca %"class.std::allocator.2", align 1
  %19 = alloca %"class.std::vector.0", align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::_Bit_reference", align 8
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::_Bit_reference", align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::_Bit_reference", align 8
  %31 = alloca %"class.std::vector.0", align 8
  %32 = alloca %"class.std::initializer_list", align 8
  %33 = alloca [3 x i32], align 4
  %34 = alloca %"class.std::allocator.2", align 1
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca ptr, align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %40 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #4
  call void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  %41 = load i32, ptr @N, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %42, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %43 unwind label %94

43:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #4
  %44 = load i32, ptr @N, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  store i8 0, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %45, ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %46 unwind label %98

46:                                               ; preds = %43
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !5
  %47 = getelementptr inbounds i32, ptr %13, i64 1
  store i32 1, ptr %47, align 4, !tbaa !5
  %48 = getelementptr inbounds i32, ptr %13, i64 2
  store i32 0, ptr %48, align 4, !tbaa !5
  %49 = getelementptr inbounds %"class.std::initializer_list", ptr %12, i32 0, i32 0
  store ptr %13, ptr %49, align 8, !tbaa !11
  %50 = getelementptr inbounds %"class.std::initializer_list", ptr %12, i32 0, i32 1
  store i64 3, ptr %50, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  %51 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8
  %53 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %54 = load i64, ptr %53, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %52, i64 %54, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %55 unwind label %102

55:                                               ; preds = %46
  invoke void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %56 unwind label %106

56:                                               ; preds = %55
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !5
  %57 = getelementptr inbounds i32, ptr %17, i64 1
  store i32 2, ptr %57, align 4, !tbaa !5
  %58 = getelementptr inbounds i32, ptr %17, i64 2
  %59 = load i32, ptr @N, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  store i32 %60, ptr %58, align 4, !tbaa !5
  %61 = getelementptr inbounds %"class.std::initializer_list", ptr %16, i32 0, i32 0
  store ptr %17, ptr %61, align 8, !tbaa !11
  %62 = getelementptr inbounds %"class.std::initializer_list", ptr %16, i32 0, i32 1
  store i64 3, ptr %62, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  %63 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8
  %65 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %66 = load i64, ptr %65, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr %64, i64 %66, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %67 unwind label %111

67:                                               ; preds = %56
  invoke void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %68 unwind label %115

68:                                               ; preds = %67
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %69

69:                                               ; preds = %216, %214, %68
  %70 = invoke noundef i64 @_ZNKSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
          to label %71 unwind label %120

71:                                               ; preds = %69
  %72 = icmp ne i64 %70, 0
  br i1 %72, label %73, label %220

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #4
  %74 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
          to label %75 unwind label %124

75:                                               ; preds = %73
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %74)
          to label %76 unwind label %124

76:                                               ; preds = %75
  invoke void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
          to label %77 unwind label %128

77:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef 0) #4
  %79 = load i32, ptr %78, align 4, !tbaa !5
  store i32 %79, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef 1) #4
  %81 = load i32, ptr %80, align 4, !tbaa !5
  store i32 %81, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef 2) #4
  %83 = load i32, ptr %82, align 4, !tbaa !5
  store i32 %83, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #4
  %84 = load i32, ptr %22, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %85)
          to label %87 unwind label %132

87:                                               ; preds = %77
  %88 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %89 = extractvalue { ptr, i64 } %86, 0
  store ptr %89, ptr %88, align 8
  %90 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %91 = extractvalue { ptr, i64 } %86, 1
  store i64 %91, ptr %90, align 8
  %92 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %23) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  br i1 %92, label %93, label %136

93:                                               ; preds = %87
  store i32 2, ptr %24, align 4
  br label %214, !llvm.loop !16

94:                                               ; preds = %0
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %6, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %257

98:                                               ; preds = %43
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %6, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  br label %256

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

106:                                              ; preds = %55
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %6, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %7, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %110

110:                                              ; preds = %106, %102
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  br label %255

111:                                              ; preds = %56
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %6, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %7, align 4
  br label %119

115:                                              ; preds = %67
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %6, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %7, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  br label %119

119:                                              ; preds = %115, %111
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %255

120:                                              ; preds = %69
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %6, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %7, align 4
  br label %255

124:                                              ; preds = %75, %73
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %6, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %7, align 4
  br label %219

128:                                              ; preds = %76
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %6, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %7, align 4
  br label %218

132:                                              ; preds = %77
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %6, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  br label %217

136:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #4
  %137 = load i32, ptr %22, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %138)
          to label %140 unwind label %162

140:                                              ; preds = %136
  %141 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %142 = extractvalue { ptr, i64 } %139, 0
  store ptr %142, ptr %141, align 8
  %143 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %144 = extractvalue { ptr, i64 } %139, 1
  store i64 %144, ptr %143, align 8
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %25, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #4
  %146 = load i32, ptr %21, align 4, !tbaa !5
  %147 = load i32, ptr %22, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %148) #4
  store i32 %146, ptr %149, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %150 = load i32, ptr %22, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @G, i64 noundef %151) #4
  store ptr %152, ptr %26, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %153 = load ptr, ptr %26, align 8, !tbaa !18
  %154 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %153) #4
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %154, ptr %155, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %156 = load ptr, ptr %26, align 8, !tbaa !18
  %157 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %156) #4
  %158 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %157, ptr %158, align 8
  br label %159

159:                                              ; preds = %201, %140
  %160 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  br i1 %160, label %166, label %161

161:                                              ; preds = %159
  store i32 4, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  br label %213

162:                                              ; preds = %136
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %6, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #4
  br label %217

166:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #4
  %168 = load i32, ptr %167, align 4, !tbaa !5
  store i32 %168, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #4
  %169 = load i32, ptr %29, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %170)
          to label %172 unwind label %179

172:                                              ; preds = %166
  %173 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 0
  %174 = extractvalue { ptr, i64 } %171, 0
  store ptr %174, ptr %173, align 8
  %175 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 1
  %176 = extractvalue { ptr, i64 } %171, 1
  store i64 %176, ptr %175, align 8
  %177 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %30) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #4
  br i1 %177, label %178, label %183

178:                                              ; preds = %172
  store i32 5, ptr %24, align 4
  br label %198

179:                                              ; preds = %166
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %6, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #4
  br label %212

183:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #4
  %184 = load i32, ptr %20, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %33, align 4, !tbaa !5
  %186 = getelementptr inbounds i32, ptr %33, i64 1
  %187 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %187, ptr %186, align 4, !tbaa !5
  %188 = getelementptr inbounds i32, ptr %33, i64 2
  %189 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %189, ptr %188, align 4, !tbaa !5
  %190 = getelementptr inbounds %"class.std::initializer_list", ptr %32, i32 0, i32 0
  store ptr %33, ptr %190, align 8, !tbaa !11
  %191 = getelementptr inbounds %"class.std::initializer_list", ptr %32, i32 0, i32 1
  store i64 3, ptr %191, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #4
  %192 = getelementptr inbounds { ptr, i64 }, ptr %32, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8
  %194 = getelementptr inbounds { ptr, i64 }, ptr %32, i32 0, i32 1
  %195 = load i64, ptr %194, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr %193, i64 %195, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %196 unwind label %203

196:                                              ; preds = %183
  invoke void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %197 unwind label %207

197:                                              ; preds = %196
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #4
  store i32 0, ptr %24, align 4
  br label %198

198:                                              ; preds = %197, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  %199 = load i32, ptr %24, align 4
  switch i32 %199, label %263 [
    i32 0, label %200
    i32 5, label %201
  ]

200:                                              ; preds = %198
  br label %201

201:                                              ; preds = %200, %198
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #4
  br label %159

203:                                              ; preds = %183
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %6, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %7, align 4
  br label %211

207:                                              ; preds = %196
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %6, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %7, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  br label %211

211:                                              ; preds = %207, %203
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #4
  br label %212

212:                                              ; preds = %211, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  br label %217

213:                                              ; preds = %161
  store i32 0, ptr %24, align 4
  br label %214

214:                                              ; preds = %213, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  %215 = load i32, ptr %24, align 4
  switch i32 %215, label %263 [
    i32 0, label %216
    i32 2, label %69
  ]

216:                                              ; preds = %214
  br label %69, !llvm.loop !16

217:                                              ; preds = %212, %162, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %218

218:                                              ; preds = %217, %128
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  br label %219

219:                                              ; preds = %218, %124
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  br label %255

220:                                              ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  store i32 0, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #4
  store i32 0, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #4
  store ptr %3, ptr %37, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #4
  %221 = load ptr, ptr %37, align 8, !tbaa !18
  %222 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %221) #4
  %223 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %38, i32 0, i32 0
  store ptr %222, ptr %223, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #4
  %224 = load ptr, ptr %37, align 8, !tbaa !18
  %225 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %224) #4
  %226 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  store ptr %225, ptr %226, align 8
  br label %227

227:                                              ; preds = %245, %220
  %228 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %39) #4
  br i1 %228, label %230, label %229

229:                                              ; preds = %227
  store i32 6, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  br label %247

230:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #4
  %231 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #4
  %232 = load i32, ptr %231, align 4, !tbaa !5
  store i32 %232, ptr %40, align 4, !tbaa !5
  %233 = load i32, ptr %40, align 4, !tbaa !5
  %234 = icmp eq i32 %233, 1
  br i1 %234, label %235, label %238

235:                                              ; preds = %230
  %236 = load i32, ptr %35, align 4, !tbaa !5
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %35, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %235, %230
  %239 = load i32, ptr %40, align 4, !tbaa !5
  %240 = icmp eq i32 %239, 2
  br i1 %240, label %241, label %244

241:                                              ; preds = %238
  %242 = load i32, ptr %36, align 4, !tbaa !5
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %36, align 4, !tbaa !5
  br label %244

244:                                              ; preds = %241, %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #4
  br label %245

245:                                              ; preds = %244
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #4
  br label %227

247:                                              ; preds = %229
  %248 = load i32, ptr %35, align 4, !tbaa !5
  %249 = load i32, ptr %36, align 4, !tbaa !5
  %250 = icmp sgt i32 %248, %249
  br i1 %250, label %251, label %252

251:                                              ; preds = %247
  store i1 false, ptr %1, align 1
  store i32 1, ptr %24, align 4
  br label %253

252:                                              ; preds = %247
  store i1 true, ptr %1, align 1
  store i32 1, ptr %24, align 4
  br label %253

253:                                              ; preds = %252, %251
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  call void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #4
  %254 = load i1, ptr %1, align 1
  ret i1 %254

255:                                              ; preds = %219, %120, %119, %110
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  br label %256

256:                                              ; preds = %255, %98
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %257

257:                                              ; preds = %256, %94
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  call void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #4
  br label %258

258:                                              ; preds = %257
  %259 = load ptr, ptr %6, align 8
  %260 = load i32, ptr %7, align 4
  %261 = insertvalue { ptr, i32 } poison, ptr %259, 0
  %262 = insertvalue { ptr, i32 } %261, i32 %260, 1
  resume { ptr, i32 } %262

263:                                              ; preds = %214, %198
  unreachable
}

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #0 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) #2 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) 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 #2 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 = { 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSSt16initializer_listIiE", !13, i64 0, !14, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!12, !14, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!13, !13, i64 0}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@G = external dso_local global %"class.std::vector", align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::priority_queue", align 8
  %2 = alloca %"class.std::vector.0", align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::allocator.2", align 1
  %5 = alloca %"class.std::vector.5", align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::allocator.9", align 1
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca [3 x i32], align 4
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca %"class.std::vector.0", align 8
  %12 = alloca [3 x i32], align 4
  %13 = alloca %"class.std::allocator.2", align 1
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca %"class.std::vector.0", align 8
  %21 = alloca [3 x i32], align 4
  %22 = alloca %"class.std::allocator.2", align 1
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #4
  call void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  %25 = load i32, ptr @N, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %26, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %27 unwind label %63

27:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  %28 = load i32, ptr @N, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %29, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %30 unwind label %65

30:                                               ; preds = %27
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 1, ptr %31, align 4, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 0, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr nonnull %9, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %33 unwind label %67

33:                                               ; preds = %30
  invoke void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %34 unwind label %69

34:                                               ; preds = %33
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %12, i64 4
  store i32 2, ptr %35, align 4, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %12, i64 8
  %37 = load i32, ptr @N, align 4, !tbaa !5
  %38 = add nsw i32 %37, -1
  store i32 %38, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr nonnull %12, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %39 unwind label %72

39:                                               ; preds = %34
  invoke void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %40 unwind label %74

40:                                               ; preds = %39
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  %41 = call noundef i64 @_ZNKSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %.not52 = icmp eq i64 %41, 0
  br i1 %.not52, label %._crit_edge55, label %.lr.ph54

.lr.ph54:                                         ; preds = %40
  %42 = getelementptr inbounds i8, ptr %15, i64 8
  %43 = getelementptr inbounds i8, ptr %16, i64 8
  %44 = getelementptr inbounds i8, ptr %19, i64 8
  %45 = getelementptr inbounds i8, ptr %21, i64 4
  %46 = getelementptr inbounds i8, ptr %21, i64 8
  br label %47

47:                                               ; preds = %.lr.ph54, %120
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #4
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  invoke void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %48)
          to label %49 unwind label %77

49:                                               ; preds = %47
  invoke void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
          to label %50 unwind label %79

50:                                               ; preds = %49
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0) #4
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 1) #4
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 2) #4
  %56 = load i32, ptr %55, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #4
  %57 = sext i32 %56 to i64
  %58 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %57)
          to label %59 unwind label %81

59:                                               ; preds = %50
  %60 = extractvalue { ptr, i64 } %58, 0
  store ptr %60, ptr %15, align 8
  %61 = extractvalue { ptr, i64 } %58, 1
  store i64 %61, ptr %42, align 8
  %62 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #4
  br i1 %62, label %120, label %83, !llvm.loop !11

63:                                               ; preds = %0
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %138

65:                                               ; preds = %27
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  br label %137

67:                                               ; preds = %30
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %33
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %71

71:                                               ; preds = %69, %67
  %.pn = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  br label %136

72:                                               ; preds = %34
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %76

74:                                               ; preds = %39
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %76

76:                                               ; preds = %74, %72
  %.pn41 = phi { ptr, i32 } [ %75, %74 ], [ %73, %72 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %136

77:                                               ; preds = %47
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %123

79:                                               ; preds = %49
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %122

81:                                               ; preds = %50
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #4
  br label %122

83:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #4
  %84 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %57)
          to label %85 unwind label %95

85:                                               ; preds = %83
  %86 = extractvalue { ptr, i64 } %84, 0
  store ptr %86, ptr %16, align 8
  %87 = extractvalue { ptr, i64 } %84, 1
  store i64 %87, ptr %43, align 8
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %16, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #4
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %57) #4
  store i32 %54, ptr %89, align 4, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @G, i64 noundef %57) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  %91 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #4
  store ptr %91, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %92 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #4
  store ptr %92, ptr %18, align 8
  %93 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  br i1 %93, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %85
  %94 = add nsw i32 %52, 1
  br label %97

._crit_edge:                                      ; preds = %111, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  br label %120

95:                                               ; preds = %83
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #4
  br label %122

97:                                               ; preds = %.lr.ph, %111
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  %99 = load i32, ptr %98, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #4
  %100 = sext i32 %99 to i64
  %101 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %100)
          to label %102 unwind label %106

102:                                              ; preds = %97
  %103 = extractvalue { ptr, i64 } %101, 0
  store ptr %103, ptr %19, align 8
  %104 = extractvalue { ptr, i64 } %101, 1
  store i64 %104, ptr %44, align 8
  %105 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %19) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #4
  br i1 %105, label %111, label %108

106:                                              ; preds = %97
  %107 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #4
  br label %119

108:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #4
  store i32 %94, ptr %21, align 4, !tbaa !5
  store i32 %54, ptr %45, align 4, !tbaa !5
  store i32 %99, ptr %46, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr nonnull %21, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %109 unwind label %114

109:                                              ; preds = %108
  invoke void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %110 unwind label %116

110:                                              ; preds = %109
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #4
  br label %111

111:                                              ; preds = %102, %110
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  %113 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  br i1 %113, label %97, label %._crit_edge

114:                                              ; preds = %108
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %118

116:                                              ; preds = %109
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  br label %118

118:                                              ; preds = %116, %114
  %.pn43 = phi { ptr, i32 } [ %117, %116 ], [ %115, %114 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #4
  br label %119

119:                                              ; preds = %118, %106
  %.pn43.pn = phi { ptr, i32 } [ %.pn43, %118 ], [ %107, %106 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  br label %122

120:                                              ; preds = %59, %._crit_edge
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  %121 = call noundef i64 @_ZNKSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %.not = icmp eq i64 %121, 0
  br i1 %.not, label %._crit_edge55, label %47

122:                                              ; preds = %81, %95, %119, %79
  %.pn43.pn.pn.pn = phi { ptr, i32 } [ %80, %79 ], [ %.pn43.pn, %119 ], [ %96, %95 ], [ %82, %81 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  br label %123

123:                                              ; preds = %122, %77
  %.pn43.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn43.pn.pn.pn, %122 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  br label %136

._crit_edge55:                                    ; preds = %120, %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #4
  %124 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  store ptr %124, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #4
  %125 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  store ptr %125, ptr %24, align 8
  %126 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #4
  br i1 %126, label %.lr.ph59, label %._crit_edge60

._crit_edge60:                                    ; preds = %.lr.ph59, %._crit_edge55
  %.028.lcssa = phi i32 [ 0, %._crit_edge55 ], [ %spec.select, %.lr.ph59 ]
  %.026.lcssa = phi i32 [ 0, %._crit_edge55 ], [ %.127, %.lr.ph59 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #4
  %127 = icmp sle i32 %.028.lcssa, %.026.lcssa
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  call void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  ret i1 %127

.lr.ph59:                                         ; preds = %._crit_edge55, %.lr.ph59
  %.02657 = phi i32 [ %.127, %.lr.ph59 ], [ 0, %._crit_edge55 ]
  %.02856 = phi i32 [ %spec.select, %.lr.ph59 ], [ 0, %._crit_edge55 ]
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp eq i32 %129, 1
  %131 = zext i1 %130 to i32
  %spec.select = add nuw nsw i32 %.02856, %131
  %132 = icmp eq i32 %129, 2
  %133 = zext i1 %132 to i32
  %.127 = add nuw nsw i32 %.02657, %133
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  %135 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #4
  br i1 %135, label %.lr.ph59, label %._crit_edge60

136:                                              ; preds = %123, %76, %71
  %.pn43.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn43.pn.pn.pn.pn, %123 ], [ %.pn41, %76 ], [ %.pn, %71 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  br label %137

137:                                              ; preds = %136, %65
  %.pn43.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn43.pn.pn.pn.pn.pn, %136 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br label %138

138:                                              ; preds = %137, %63
  %.pn43.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn43.pn.pn.pn.pn.pn.pn, %137 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  call void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn43.pn.pn.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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #0 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 #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 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 #2 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 #2 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt6vectorIiSaIiEES0_IS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) 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 #2 align 2

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


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