; LLVM IR from the-hyp0cr1t3/CC :: CSES/Graph Algorithms (Flight Discount)

; 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.anon = type { i8 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"struct.std::array" = type { [2 x %"class.std::vector.5"] }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.std::priority_queue" = type <{ %"class.std::vector.10", [8 x i8] }>
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl" }
%"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl" = type { %"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl_data" }
%"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.state = type { i32, i32, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL4k_II = external hidden constant i64, align 8
@chmin = external hidden global %class.anon, align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::array", align 8
  %13 = alloca %"class.std::vector.5", align 8
  %14 = alloca %"class.std::allocator.7", align 1
  %15 = alloca %"class.std::priority_queue", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.state, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %29 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %30 = getelementptr i8, ptr %29, i64 -24
  %31 = load i64, ptr %30, align 8
  %32 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %31
  %33 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %32, ptr noundef null)
  %34 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #7
  %37 = load i32, ptr %3, align 4, !tbaa !8
  %38 = sext i32 %37 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  call void @_ZNSaISt6vectorISt4pairIiiESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %38, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %39 unwind label %62

39:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt6vectorISt4pairIiiESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %40

40:                                               ; preds = %59, %39
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = load i32, ptr %4, align 4, !tbaa !8
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %44, label %70

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %46 unwind label %66

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %48 unwind label %66

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %50 unwind label %66

50:                                               ; preds = %48
  %51 = load i32, ptr %9, align 4, !tbaa !8
  %52 = add nsw i32 %51, -1
  store i32 %52, ptr %9, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %53) #7
  %55 = load i32, ptr %10, align 4, !tbaa !8
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr %10, align 4, !tbaa !8
  %57 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %58 unwind label %66

58:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %59

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

62:                                               ; preds = %0
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %7, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %8, align 4
  call void @_ZNSt15__new_allocatorISt6vectorISt4pairIiiESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %246

66:                                               ; preds = %50, %48, %46, %44
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %7, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %245

70:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #7
  call void @_ZNSt5arrayISt6vectorIlSaIlEELm2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #7
  %71 = load i32, ptr %3, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %72, ptr noundef nonnull align 8 dereferenceable(8) @_ZL4k_II, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %73 unwind label %104

73:                                               ; preds = %70
  %74 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef 1) #7
  %75 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIlSaIlEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %74, ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  %76 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef 0) #7
  %77 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIlSaIlEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %76, ptr noundef nonnull align 8 dereferenceable(24) %75)
          to label %78 unwind label %108

78:                                               ; preds = %73
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %15)
          to label %79 unwind label %113

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !8
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef 0) #7
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef 0) #7
  store i64 0, ptr %81, align 8, !tbaa !13
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJiiRlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 8 dereferenceable(8) %81)
          to label %82 unwind label %117

82:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %83

83:                                               ; preds = %229, %227, %82
  %84 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %15)
          to label %85 unwind label %121

85:                                               ; preds = %83
  %86 = xor i1 %84, true
  br i1 %86, label %87, label %231

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %88 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %15)
          to label %89 unwind label %125

89:                                               ; preds = %87
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %88, i64 16, i1 false), !tbaa.struct !15
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %15)
          to label %90 unwind label %125

90:                                               ; preds = %89
  %91 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 2
  %92 = load i64, ptr %91, align 8, !tbaa !16
  %93 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 1
  %94 = load i32, ptr %93, align 4, !tbaa !18
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef %95) #7
  %97 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !19
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %99) #7
  %101 = load i64, ptr %100, align 8, !tbaa !13
  %102 = icmp sgt i64 %92, %101
  br i1 %102, label %103, label %129

103:                                              ; preds = %90
  store i32 5, ptr %19, align 4
  br label %227, !llvm.loop !20

104:                                              ; preds = %70
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %7, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %8, align 4
  br label %112

108:                                              ; preds = %73
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %7, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %8, align 4
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br label %112

112:                                              ; preds = %108, %104
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  br label %244

113:                                              ; preds = %78
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  br label %243

117:                                              ; preds = %79
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %7, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %242

121:                                              ; preds = %237, %231, %83
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %7, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %8, align 4
  br label %242

125:                                              ; preds = %89, %87
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %7, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %8, align 4
  br label %230

129:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %130 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 0
  %131 = load i32, ptr %130, align 8, !tbaa !19
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %132) #7
  store ptr %133, ptr %20, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %134 = load ptr, ptr %20, align 8, !tbaa !21
  %135 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %134) #7
  %136 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %135, ptr %136, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %137 = load ptr, ptr %20, align 8, !tbaa !21
  %138 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #7
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  br label %140

140:                                              ; preds = %223, %129
  %141 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  br i1 %141, label %143, label %142

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

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %144 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  store ptr %144, ptr %23, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %145 = load ptr, ptr %23, align 8, !tbaa !21
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %145) #7
  store ptr %146, ptr %24, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %147 = load ptr, ptr %23, align 8, !tbaa !21
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %147) #7
  store ptr %148, ptr %25, align 8, !tbaa !21
  %149 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 1
  %150 = load i32, ptr %149, align 4, !tbaa !18
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef %151) #7
  %153 = load ptr, ptr %24, align 8, !tbaa !21
  %154 = load i32, ptr %153, align 4, !tbaa !8
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %152, i64 noundef %155) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %157 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 2
  %158 = load i64, ptr %157, align 8, !tbaa !16
  %159 = load ptr, ptr %25, align 8, !tbaa !21
  %160 = load i32, ptr %159, align 4, !tbaa !8
  %161 = sext i32 %160 to i64
  %162 = add nsw i64 %158, %161
  store i64 %162, ptr %26, align 8, !tbaa !13
  %163 = invoke noundef zeroext i1 @"_ZNK3$_0clIllEEDaRT_OT0_"(ptr noundef nonnull align 1 dereferenceable(1) @chmin, ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %164 unwind label %177

164:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br i1 %163, label %165, label %185

165:                                              ; preds = %164
  %166 = load ptr, ptr %24, align 8, !tbaa !21
  %167 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 1
  %168 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 1
  %169 = load i32, ptr %168, align 4, !tbaa !18
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef %170) #7
  %172 = load ptr, ptr %24, align 8, !tbaa !21
  %173 = load i32, ptr %172, align 4, !tbaa !8
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef %174) #7
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJRiS8_RlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25) %15, ptr noundef nonnull align 4 dereferenceable(4) %166, ptr noundef nonnull align 4 dereferenceable(4) %167, ptr noundef nonnull align 8 dereferenceable(8) %175)
          to label %176 unwind label %181

176:                                              ; preds = %165
  br label %185

177:                                              ; preds = %143
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %7, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %225

181:                                              ; preds = %165
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %7, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %8, align 4
  br label %225

185:                                              ; preds = %176, %164
  %186 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 1
  %187 = load i32, ptr %186, align 4, !tbaa !18
  %188 = icmp ne i32 %187, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  br i1 %188, label %204, label %189

189:                                              ; preds = %185
  %190 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef 1) #7
  %191 = load ptr, ptr %24, align 8, !tbaa !21
  %192 = load i32, ptr %191, align 4, !tbaa !8
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef %193) #7
  %195 = getelementptr inbounds %struct.state, ptr %18, i32 0, i32 2
  %196 = load i64, ptr %195, align 8, !tbaa !16
  %197 = load ptr, ptr %25, align 8, !tbaa !21
  %198 = load i32, ptr %197, align 4, !tbaa !8
  %199 = sdiv i32 %198, 2
  %200 = sext i32 %199 to i64
  %201 = add nsw i64 %196, %200
  store i64 %201, ptr %27, align 8, !tbaa !13
  %202 = invoke noundef zeroext i1 @"_ZNK3$_0clIllEEDaRT_OT0_"(ptr noundef nonnull align 1 dereferenceable(1) @chmin, ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %203 unwind label %214

203:                                              ; preds = %189
  br label %204

204:                                              ; preds = %203, %185
  %205 = phi i1 [ false, %185 ], [ %202, %203 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br i1 %205, label %206, label %222

206:                                              ; preds = %204
  %207 = load ptr, ptr %24, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 1, ptr %28, align 4, !tbaa !8
  %208 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef 1) #7
  %209 = load ptr, ptr %24, align 8, !tbaa !21
  %210 = load i32, ptr %209, align 4, !tbaa !8
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %208, i64 noundef %211) #7
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJRiiRlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25) %15, ptr noundef nonnull align 4 dereferenceable(4) %207, ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 8 dereferenceable(8) %212)
          to label %213 unwind label %218

213:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %222

214:                                              ; preds = %189
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %7, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %225

218:                                              ; preds = %206
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %7, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %225

222:                                              ; preds = %213, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %223

223:                                              ; preds = %222
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  br label %140

225:                                              ; preds = %218, %214, %181, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %230

226:                                              ; preds = %142
  store i32 0, ptr %19, align 4
  br label %227

227:                                              ; preds = %226, %103
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  %228 = load i32, ptr %19, align 4
  switch i32 %228, label %252 [
    i32 0, label %229
    i32 5, label %83
  ]

229:                                              ; preds = %227
  br label %83, !llvm.loop !20

230:                                              ; preds = %225, %125
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  br label %242

231:                                              ; preds = %85
  %232 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef 0) #7
  %233 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %232) #7
  %234 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef 1) #7
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %234) #7
  %236 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %233, ptr noundef nonnull align 8 dereferenceable(8) %235)
          to label %237 unwind label %121

237:                                              ; preds = %231
  %238 = load i64, ptr %236, align 8, !tbaa !13
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %238)
          to label %240 unwind label %121

240:                                              ; preds = %237
  call void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  call void @_ZNSt5arrayISt6vectorIlSaIlEELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %241 = load i32, ptr %1, align 4
  ret i32 %241

242:                                              ; preds = %230, %121, %117
  call void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %15) #7
  br label %243

243:                                              ; preds = %242, %113
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %244

244:                                              ; preds = %243, %112
  call void @_ZNSt5arrayISt6vectorIlSaIlEELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  br label %245

245:                                              ; preds = %244, %66
  call void @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %246

246:                                              ; preds = %245, %62
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %247

247:                                              ; preds = %246
  %248 = load ptr, ptr %7, align 8
  %249 = load i32, ptr %8, align 4
  %250 = insertvalue { ptr, i32 } poison, ptr %248, 0
  %251 = insertvalue { ptr, i32 } %250, i32 %249, 1
  resume { ptr, i32 } %251

252:                                              ; preds = %227
  unreachable
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJiiRlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #1 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) #6

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #4 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZNK3$_0clIllEEDaRT_OT0_"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJRiS8_RlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJRiiRlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #5 align 2

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !10, i64 0}
!15 = !{i64 0, i64 4, !8, i64 4, i64 4, !8, i64 8, i64 8, !13}
!16 = !{!17, !14, i64 8}
!17 = !{!"_ZTSZ4mainE5state", !9, i64 0, !9, i64 4, !14, i64 8}
!18 = !{!17, !9, i64 4}
!19 = !{!17, !9, i64 0}
!20 = distinct !{!20, !12}
!21 = !{!22, !22, i64 0}
!22 = !{!"any pointer", !10, 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::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.anon = type { i8 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::pair<int, int>>, std::allocator<std::vector<std::pair<int, int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"struct.std::array" = type { [2 x %"class.std::vector.5"] }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.std::priority_queue" = type <{ %"class.std::vector.10", [8 x i8] }>
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl" }
%"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl" = type { %"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl_data" }
%"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.state = type { i32, i32, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL4k_II = external hidden constant i64, align 8
@chmin = external hidden global %class.anon, align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::array", align 8
  %9 = alloca %"class.std::vector.5", align 8
  %10 = alloca %"class.std::allocator.7", align 1
  %11 = alloca %"class.std::priority_queue", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.state, align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  %25 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %28 = load i32, ptr %1, align 4, !tbaa !8
  %29 = sext i32 %28 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaISt6vectorISt4pairIiiESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EEC2EmRKS4_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %29, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %30 unwind label %50

30:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt6vectorISt4pairIiiESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %30, %46
  %.033 = phi i32 [ %47, %46 ], [ 0, %30 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %34 unwind label %52

34:                                               ; preds = %.lr.ph
  %35 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %36 unwind label %52

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %38 unwind label %52

38:                                               ; preds = %36
  %39 = load i32, ptr %5, align 4, !tbaa !8
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr %5, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %41) #7
  %43 = load i32, ptr %6, align 4, !tbaa !8
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr %6, align 4, !tbaa !8
  %45 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %46 unwind label %52

46:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %47 = add nuw nsw i32 %.033, 1
  %48 = load i32, ptr %2, align 4, !tbaa !8
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %.lr.ph, label %._crit_edge, !llvm.loop !11

50:                                               ; preds = %0
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorISt4pairIiiESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  br label %160

52:                                               ; preds = %38, %36, %34, %.lr.ph
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  br label %159

._crit_edge:                                      ; preds = %46, %30
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #7
  call void @_ZNSt5arrayISt6vectorIlSaIlEELm2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  %54 = load i32, ptr %1, align 4, !tbaa !8
  %55 = sext i32 %54 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %55, ptr noundef nonnull align 8 dereferenceable(8) @_ZL4k_II, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %56 unwind label %80

56:                                               ; preds = %._crit_edge
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef 1) #7
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIlSaIlEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef 0) #7
  %60 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIlSaIlEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(24) %58)
          to label %61 unwind label %82

61:                                               ; preds = %56
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  call void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef 0) #7
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef 0) #7
  store i64 0, ptr %63, align 8, !tbaa !13
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJiiRlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 8 dereferenceable(8) %63)
          to label %64 unwind label %85

64:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  %65 = call noundef zeroext i1 @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
  br i1 %65, label %._crit_edge39, label %.lr.ph38

.lr.ph38:                                         ; preds = %64
  %66 = getelementptr inbounds i8, ptr %14, i64 8
  %67 = getelementptr inbounds i8, ptr %14, i64 4
  br label %68

68:                                               ; preds = %.lr.ph38, %146
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #7
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %69, i64 16, i1 false), !tbaa.struct !15
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
          to label %70 unwind label %89

70:                                               ; preds = %68
  %71 = load i64, ptr %66, align 8, !tbaa !16
  %72 = load i32, ptr %67, align 4, !tbaa !18
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef %73) #7
  %75 = load i32, ptr %14, align 8, !tbaa !19
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #7
  %78 = load i64, ptr %77, align 8, !tbaa !13
  %79 = icmp sgt i64 %71, %78
  br i1 %79, label %146, label %91, !llvm.loop !20

80:                                               ; preds = %._crit_edge
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %56
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %84

84:                                               ; preds = %82, %80
  %.pn = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %158

85:                                               ; preds = %61
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %157

87:                                               ; preds = %._crit_edge39
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %157

89:                                               ; preds = %68
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %148

91:                                               ; preds = %70
  %92 = load i32, ptr %14, align 8, !tbaa !19
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %93) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %95 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #7
  store ptr %95, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %96 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #7
  store ptr %96, ptr %16, align 8
  %97 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br i1 %97, label %.lr.ph35, label %._crit_edge36

._crit_edge36:                                    ; preds = %142, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %146

.lr.ph35:                                         ; preds = %91, %142
  %98 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %98) #7
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %98) #7
  %101 = load i32, ptr %67, align 4, !tbaa !18
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef %102) #7
  %104 = load i32, ptr %99, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %105) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %107 = load i64, ptr %66, align 8, !tbaa !16
  %108 = load i32, ptr %100, align 4, !tbaa !8
  %109 = sext i32 %108 to i64
  %110 = add nsw i64 %107, %109
  store i64 %110, ptr %17, align 8, !tbaa !13
  %111 = call noundef zeroext i1 @"_ZNK3$_0clIllEEDaRT_OT0_"(ptr noundef nonnull align 1 dereferenceable(1) @chmin, ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br i1 %111, label %112, label %121

112:                                              ; preds = %.lr.ph35
  %113 = load i32, ptr %67, align 4, !tbaa !18
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef %114) #7
  %116 = load i32, ptr %99, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %117) #7
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJRiS8_RlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25) %11, ptr noundef nonnull align 4 dereferenceable(4) %99, ptr noundef nonnull align 4 dereferenceable(4) %67, ptr noundef nonnull align 8 dereferenceable(8) %118)
          to label %121 unwind label %119

119:                                              ; preds = %112
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %145

121:                                              ; preds = %112, %.lr.ph35
  %122 = load i32, ptr %67, align 4, !tbaa !18
  %.not = icmp eq i32 %122, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  br i1 %.not, label %123, label %.critedge

123:                                              ; preds = %121
  %124 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef 1) #7
  %125 = load i32, ptr %99, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %126) #7
  %128 = load i64, ptr %66, align 8, !tbaa !16
  %129 = load i32, ptr %100, align 4, !tbaa !8
  %130 = sdiv i32 %129, 2
  %131 = sext i32 %130 to i64
  %132 = add nsw i64 %128, %131
  store i64 %132, ptr %18, align 8, !tbaa !13
  %133 = call noundef zeroext i1 @"_ZNK3$_0clIllEEDaRT_OT0_"(ptr noundef nonnull align 1 dereferenceable(1) @chmin, ptr noundef nonnull align 8 dereferenceable(8) %127, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br i1 %133, label %134, label %142

134:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  store i32 1, ptr %19, align 4, !tbaa !8
  %135 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef 1) #7
  %136 = load i32, ptr %99, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %135, i64 noundef %137) #7
  invoke void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJRiiRlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25) %11, ptr noundef nonnull align 4 dereferenceable(4) %99, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 8 dereferenceable(8) %138)
          to label %139 unwind label %140

139:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  br label %142

140:                                              ; preds = %134
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  br label %145

.critedge:                                        ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br label %142

142:                                              ; preds = %.critedge, %139, %123
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %144 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br i1 %144, label %.lr.ph35, label %._crit_edge36

145:                                              ; preds = %140, %119
  %.pn25 = phi { ptr, i32 } [ %141, %140 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %148

146:                                              ; preds = %70, %._crit_edge36
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  %147 = call noundef zeroext i1 @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
  br i1 %147, label %._crit_edge39, label %68

148:                                              ; preds = %145, %89
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %145 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #7
  br label %157

._crit_edge39:                                    ; preds = %146, %64
  %149 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef 0) #7
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %149) #7
  %151 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIlSaIlEELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %8, i64 noundef 1) #7
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %151) #7
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef nonnull align 8 dereferenceable(8) %152)
  %154 = load i64, ptr %153, align 8, !tbaa !13
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %154)
          to label %156 unwind label %87

156:                                              ; preds = %._crit_edge39
  call void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  call void @_ZNSt5arrayISt6vectorIlSaIlEELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  call void @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

157:                                              ; preds = %148, %87, %85
  %.pn25.pn.pn = phi { ptr, i32 } [ %.pn25.pn, %148 ], [ %88, %87 ], [ %86, %85 ]
  call void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %158

158:                                              ; preds = %157, %84
  %.pn25.pn.pn.pn = phi { ptr, i32 } [ %.pn25.pn.pn, %157 ], [ %.pn, %84 ]
  call void @_ZNSt5arrayISt6vectorIlSaIlEELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  br label %159

159:                                              ; preds = %158, %52
  %.pn30 = phi { ptr, i32 } [ %53, %52 ], [ %.pn25.pn.pn.pn, %158 ]
  call void @_ZNSt6vectorIS_ISt4pairIiiESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %160

160:                                              ; preds = %159, %50
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %159 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn30.pn
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJiiRlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress 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) #6

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZNK3$_0clIllEEDaRT_OT0_"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJRiS8_RlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EE7emplaceIJRiiRlEEEvDpOT_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZNSt14priority_queueIZ4mainE5stateSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #5 align 2

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

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

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

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

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

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

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


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