; LLVM IR from eyangch/competitive-programming :: APIO/2015 (skyscraper)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<loc, std::allocator<loc>>::_Deque_impl" }
%"struct.std::_Deque_base<loc, std::allocator<loc>>::_Deque_impl" = type { %"struct.std::_Deque_base<loc, std::allocator<loc>>::_Deque_impl_data" }
%"struct.std::_Deque_base<loc, std::allocator<loc>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.loc = type { i32, i32, i32, i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@b = external dso_local global [30000 x i32], align 16
@p = external dso_local global [30000 x i32], align 16
@graph = external dso_local global [30000 x %"class.std::vector"], align 16
@dist = external dso_local global [30000 x i32], align 16
@vis = external dso_local global %"class.std::unordered_set", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 %"class.std::deque", align 8
  %5 = alloca %struct.loc, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.loc, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %struct.loc, align 4
  %18 = alloca %struct.loc, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %22 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair", align 8
  %25 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %26 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %27 = alloca %struct.loc, align 4
  store i32 0, ptr %1, align 4
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) @M)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %50, %0
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = load i32, ptr @M, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %53

35:                                               ; preds = %30
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [30000 x i32], ptr @b, i64 0, i64 %37
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [30000 x i32], ptr @p, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [30000 x i32], ptr @b, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [30000 x %"class.std::vector"], ptr @graph, i64 0, i64 %48
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %50

50:                                               ; preds = %35
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %2, align 4, !tbaa !5
  br label %30, !llvm.loop !9

53:                                               ; preds = %34
  %54 = load i32, ptr @N, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr @dist, i64 %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 -1, ptr %3, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @dist, ptr noundef %56, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr %4) #7
  call void @_ZNSt5dequeI3locSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  %57 = getelementptr inbounds %struct.loc, ptr %5, i32 0, i32 0
  %58 = load i32, ptr @b, align 16, !tbaa !5
  store i32 %58, ptr %57, align 4, !tbaa !11
  %59 = getelementptr inbounds %struct.loc, ptr %5, i32 0, i32 1
  store i32 0, ptr %59, align 4, !tbaa !14
  %60 = getelementptr inbounds %struct.loc, ptr %5, i32 0, i32 2
  store i32 0, ptr %60, align 4, !tbaa !15
  %61 = getelementptr inbounds %struct.loc, ptr %5, i32 0, i32 3
  store i8 1, ptr %61, align 4, !tbaa !16
  invoke void @_ZNSt5dequeI3locSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(16) %5)
          to label %62 unwind label %81

62:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %63 = getelementptr inbounds %struct.loc, ptr %8, i32 0, i32 0
  %64 = load i32, ptr @b, align 16, !tbaa !5
  store i32 %64, ptr %63, align 4, !tbaa !11
  %65 = getelementptr inbounds %struct.loc, ptr %8, i32 0, i32 1
  store i32 0, ptr %65, align 4, !tbaa !14
  %66 = getelementptr inbounds %struct.loc, ptr %8, i32 0, i32 2
  store i32 0, ptr %66, align 4, !tbaa !15
  %67 = getelementptr inbounds %struct.loc, ptr %8, i32 0, i32 3
  store i8 0, ptr %67, align 4, !tbaa !16
  invoke void @_ZNSt5dequeI3locSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %68 unwind label %85

68:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  invoke void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(56) @vis, i64 noundef 7000000)
          to label %69 unwind label %89

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %251, %249, %69
  %71 = call noundef zeroext i1 @_ZNKSt5dequeI3locSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  %72 = xor i1 %71, true
  br i1 %72, label %73, label %258

73:                                               ; preds = %70
  %74 = load i32, ptr getelementptr inbounds ([30000 x i32], ptr @b, i64 0, i64 1), align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [30000 x i32], ptr @dist, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = xor i32 %77, -1
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %93

80:                                               ; preds = %73
  br label %258

81:                                               ; preds = %53
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %6, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %268

85:                                               ; preds = %62
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %6, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %268

89:                                               ; preds = %264, %258, %68
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  br label %268

93:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %94 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5dequeI3locSaIS0_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  %95 = getelementptr inbounds %struct.loc, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 4, !tbaa !11
  store i32 %96, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %97 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5dequeI3locSaIS0_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  %98 = getelementptr inbounds %struct.loc, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !14
  store i32 %99, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %100 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5dequeI3locSaIS0_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  %101 = getelementptr inbounds %struct.loc, ptr %100, i32 0, i32 2
  %102 = load i32, ptr %101, align 4, !tbaa !15
  store i32 %102, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  %103 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5dequeI3locSaIS0_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  %104 = getelementptr inbounds %struct.loc, ptr %103, i32 0, i32 3
  %105 = load i8, ptr %104, align 4, !tbaa !16, !range !17, !noundef !18
  %106 = trunc i8 %105 to i1
  %107 = zext i1 %106 to i8
  store i8 %107, ptr %12, align 1, !tbaa !19
  call void @_ZNSt5dequeI3locSaIS0_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [30000 x i32], ptr @dist, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = xor i32 %111, -1
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %162, label %114

114:                                              ; preds = %93
  %115 = load i32, ptr %11, align 4, !tbaa !5
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [30000 x i32], ptr @dist, i64 0, i64 %117
  store i32 %115, ptr %118, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [30000 x %"class.std::vector"], ptr @graph, i64 0, i64 %120
  store ptr %121, ptr %13, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %122 = load ptr, ptr %13, align 8, !tbaa !20
  %123 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %122) #7
  %124 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %123, ptr %124, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %125 = load ptr, ptr %13, align 8, !tbaa !20
  %126 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #7
  %127 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %126, ptr %127, align 8
  br label %128

128:                                              ; preds = %150, %114
  %129 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %129, label %131, label %130

130:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %161

131:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %133 = load i32, ptr %132, align 4, !tbaa !5
  store i32 %133, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %134 = getelementptr inbounds %struct.loc, ptr %17, i32 0, i32 0
  %135 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %135, ptr %134, align 4, !tbaa !11
  %136 = getelementptr inbounds %struct.loc, ptr %17, i32 0, i32 1
  %137 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %137, ptr %136, align 4, !tbaa !14
  %138 = getelementptr inbounds %struct.loc, ptr %17, i32 0, i32 2
  %139 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %139, ptr %138, align 4, !tbaa !15
  %140 = getelementptr inbounds %struct.loc, ptr %17, i32 0, i32 3
  store i8 1, ptr %140, align 4, !tbaa !16
  invoke void @_ZNSt5dequeI3locSaIS0_EE10push_frontEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(16) %17)
          to label %141 unwind label %152

141:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %142 = getelementptr inbounds %struct.loc, ptr %18, i32 0, i32 0
  %143 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %143, ptr %142, align 4, !tbaa !11
  %144 = getelementptr inbounds %struct.loc, ptr %18, i32 0, i32 1
  %145 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %145, ptr %144, align 4, !tbaa !14
  %146 = getelementptr inbounds %struct.loc, ptr %18, i32 0, i32 2
  %147 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %147, ptr %146, align 4, !tbaa !15
  %148 = getelementptr inbounds %struct.loc, ptr %18, i32 0, i32 3
  store i8 0, ptr %148, align 4, !tbaa !16
  invoke void @_ZNSt5dequeI3locSaIS0_EE10push_frontEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(16) %18)
          to label %149 unwind label %156

149:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %150

150:                                              ; preds = %149
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %128

152:                                              ; preds = %131
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %6, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %160

156:                                              ; preds = %141
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %6, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  br label %160

160:                                              ; preds = %156, %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %257

161:                                              ; preds = %130
  br label %162

162:                                              ; preds = %161, %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %163 = load i32, ptr %10, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [30000 x i32], ptr @p, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  store i32 %166, ptr %19, align 4, !tbaa !5
  %167 = load i8, ptr %12, align 1, !tbaa !19, !range !17, !noundef !18
  %168 = trunc i8 %167 to i1
  br i1 %168, label %172, label %169

169:                                              ; preds = %162
  %170 = load i32, ptr %19, align 4, !tbaa !5
  %171 = sub nsw i32 0, %170
  store i32 %171, ptr %19, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %169, %162
  %173 = load i32, ptr %19, align 4, !tbaa !5
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = add nsw i32 %174, %173
  store i32 %175, ptr %9, align 4, !tbaa !5
  %176 = load i32, ptr %11, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %178 = load i32, ptr %9, align 4, !tbaa !5
  %179 = load i32, ptr %10, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [30000 x i32], ptr @p, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = mul nsw i32 30000, %182
  %184 = add nsw i32 %178, %183
  %185 = load i8, ptr %12, align 1, !tbaa !19, !range !17, !noundef !18
  %186 = trunc i8 %185 to i1
  %187 = zext i1 %186 to i32
  %188 = mul nsw i32 900000000, %187
  %189 = add nsw i32 %184, %188
  store i32 %189, ptr %20, align 4, !tbaa !5
  %190 = load i32, ptr %9, align 4, !tbaa !5
  %191 = icmp slt i32 %190, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  br i1 %191, label %205, label %192

192:                                              ; preds = %172
  %193 = load i32, ptr %9, align 4, !tbaa !5
  %194 = load i32, ptr @N, align 4, !tbaa !5
  %195 = icmp sge i32 %193, %194
  br i1 %195, label %205, label %196

196:                                              ; preds = %192
  %197 = invoke ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) @vis, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %198 unwind label %208

198:                                              ; preds = %196
  %199 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %21, i32 0, i32 0
  %200 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %199, i32 0, i32 0
  store ptr %197, ptr %200, align 8
  %201 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @vis) #7
  %202 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %22, i32 0, i32 0
  %203 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %202, i32 0, i32 0
  store ptr %201, ptr %203, align 8
  %204 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  br label %205

205:                                              ; preds = %198, %192, %172
  %206 = phi i1 [ true, %192 ], [ true, %172 ], [ %204, %198 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br i1 %206, label %207, label %212

207:                                              ; preds = %205
  store i32 5, ptr %23, align 4
  br label %249, !llvm.loop !22

208:                                              ; preds = %196
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %6, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %256

212:                                              ; preds = %205
  %213 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @vis, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %214 unwind label %233

214:                                              ; preds = %212
  %215 = getelementptr inbounds { ptr, i8 }, ptr %24, i32 0, i32 0
  %216 = extractvalue { ptr, i8 } %213, 0
  store ptr %216, ptr %215, align 8
  %217 = getelementptr inbounds { ptr, i8 }, ptr %24, i32 0, i32 1
  %218 = extractvalue { ptr, i8 } %213, 1
  store i8 %218, ptr %217, align 8
  %219 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) @vis) #7
  %220 = trunc i64 %219 to i32
  %221 = icmp sgt i32 %220, 6000000
  br i1 %221, label %222, label %237

222:                                              ; preds = %214
  %223 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) @vis) #7
  %224 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %25, i32 0, i32 0
  %225 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %224, i32 0, i32 0
  store ptr %223, ptr %225, align 8
  %226 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %25, i32 0, i32 0
  %227 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %226, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8
  %229 = invoke ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5eraseENSt8__detail14_Node_iteratorIiLb1ELb0EEE(ptr noundef nonnull align 8 dereferenceable(56) @vis, ptr %228)
          to label %230 unwind label %233

230:                                              ; preds = %222
  %231 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %26, i32 0, i32 0
  %232 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %231, i32 0, i32 0
  store ptr %229, ptr %232, align 8
  br label %237

233:                                              ; preds = %222, %212
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %6, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %7, align 4
  br label %256

237:                                              ; preds = %230, %214
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  %238 = getelementptr inbounds %struct.loc, ptr %27, i32 0, i32 0
  %239 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %239, ptr %238, align 4, !tbaa !11
  %240 = getelementptr inbounds %struct.loc, ptr %27, i32 0, i32 1
  %241 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %241, ptr %240, align 4, !tbaa !14
  %242 = getelementptr inbounds %struct.loc, ptr %27, i32 0, i32 2
  %243 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %243, ptr %242, align 4, !tbaa !15
  %244 = getelementptr inbounds %struct.loc, ptr %27, i32 0, i32 3
  %245 = load i8, ptr %12, align 1, !tbaa !19, !range !17, !noundef !18
  %246 = trunc i8 %245 to i1
  %247 = zext i1 %246 to i8
  store i8 %247, ptr %244, align 4, !tbaa !16
  invoke void @_ZNSt5dequeI3locSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(16) %27)
          to label %248 unwind label %252

248:                                              ; preds = %237
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  store i32 0, ptr %23, align 4
  br label %249

249:                                              ; preds = %248, %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  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
  %250 = load i32, ptr %23, align 4
  switch i32 %250, label %274 [
    i32 0, label %251
    i32 5, label %70
  ]

251:                                              ; preds = %249
  br label %70, !llvm.loop !22

252:                                              ; preds = %237
  %253 = landingpad { ptr, i32 }
          cleanup
  %254 = extractvalue { ptr, i32 } %253, 0
  store ptr %254, ptr %6, align 8
  %255 = extractvalue { ptr, i32 } %253, 1
  store i32 %255, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  br label %256

256:                                              ; preds = %252, %233, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %257

257:                                              ; preds = %256, %160
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  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 %268

258:                                              ; preds = %80, %70
  %259 = load i32, ptr getelementptr inbounds ([30000 x i32], ptr @b, i64 0, i64 1), align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [30000 x i32], ptr @dist, i64 0, i64 %260
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %262)
          to label %264 unwind label %89

264:                                              ; preds = %258
  %265 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %263, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %266 unwind label %89

266:                                              ; preds = %264
  call void @_ZNSt5dequeI3locSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #7
  %267 = load i32, ptr %1, align 4
  ret i32 %267

268:                                              ; preds = %257, %89, %85, %81
  call void @_ZNSt5dequeI3locSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %4) #7
  br label %269

269:                                              ; preds = %268
  %270 = load ptr, ptr %6, align 8
  %271 = load i32, ptr %7, align 4
  %272 = insertvalue { ptr, i32 } poison, ptr %270, 0
  %273 = insertvalue { ptr, i32 } %272, i32 %271, 1
  resume { ptr, i32 } %273

274:                                              ; preds = %249
  unreachable
}

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #3 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeI3locSaIS0_EE10push_frontEOS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(16)) #3 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)) #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5eraseENSt8__detail14_Node_iteratorIiLb1ELb0EEE(ptr noundef nonnull align 8 dereferenceable(56), ptr) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<loc, std::allocator<loc>>::_Deque_impl" }
%"struct.std::_Deque_base<loc, std::allocator<loc>>::_Deque_impl" = type { %"struct.std::_Deque_base<loc, std::allocator<loc>>::_Deque_impl_data" }
%"struct.std::_Deque_base<loc, std::allocator<loc>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.loc = type { i32, i32, i32, i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@b = external dso_local global [30000 x i32], align 16
@p = external dso_local global [30000 x i32], align 16
@graph = external dso_local global [30000 x %"class.std::vector"], align 16
@dist = external dso_local global [30000 x i32], align 16
@vis = external dso_local global %"class.std::unordered_set", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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::deque", align 8
  %4 = alloca %struct.loc, align 4
  %5 = alloca %struct.loc, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %struct.loc, align 4
  %9 = alloca %struct.loc, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca %struct.loc, align 4
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) @M)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 0, ptr %1, align 4, !tbaa !5
  %16 = load i32, ptr @M, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %18 = load i32, ptr @N, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds i32, ptr @dist, i64 %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store i32 -1, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @dist, ptr noundef nonnull %20, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #8
  call void @_ZNSt5dequeI3locSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %21 = load i32, ptr @b, align 16, !tbaa !5
  store i32 %21, ptr %4, align 4, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 0, ptr %22, align 4, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 0, ptr %23, align 4, !tbaa !13
  %24 = getelementptr inbounds i8, ptr %4, i64 12
  store i8 1, ptr %24, align 4, !tbaa !14
  invoke void @_ZNSt5dequeI3locSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(16) %4)
          to label %42 unwind label %61

.lr.ph:                                           ; preds = %0, %.lr.ph
  %storemerge46 = phi i32 [ %39, %.lr.ph ], [ 0, %0 ]
  %25 = sext i32 %storemerge46 to i64
  %26 = getelementptr inbounds [30000 x i32], ptr @b, i64 0, i64 %25
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [30000 x i32], ptr @p, i64 0, i64 %29
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [30000 x i32], ptr @b, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [30000 x %"class.std::vector"], ptr @graph, i64 0, i64 %36
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %38 = load i32, ptr %1, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %1, align 4, !tbaa !5
  %40 = load i32, ptr @M, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %.lr.ph, label %._crit_edge, !llvm.loop !15

42:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %43 = load i32, ptr @b, align 16, !tbaa !5
  store i32 %43, ptr %5, align 4, !tbaa !9
  %44 = getelementptr inbounds i8, ptr %5, i64 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(9) %44, i8 0, i64 9, i1 false)
  invoke void @_ZNSt5dequeI3locSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(16) %5)
          to label %45 unwind label %63

45:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  invoke void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(56) @vis, i64 noundef 7000000)
          to label %.preheader unwind label %65

.preheader:                                       ; preds = %45
  %46 = call noundef zeroext i1 @_ZNKSt5dequeI3locSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  br i1 %46, label %._crit_edge51, label %.lr.ph50

.lr.ph50:                                         ; preds = %.preheader
  %47 = getelementptr inbounds i8, ptr %8, i64 4
  %48 = getelementptr inbounds i8, ptr %8, i64 8
  %49 = getelementptr inbounds i8, ptr %8, i64 12
  %50 = getelementptr inbounds i8, ptr %9, i64 4
  %51 = getelementptr inbounds i8, ptr %9, i64 8
  %52 = getelementptr inbounds i8, ptr %9, i64 12
  %53 = getelementptr inbounds i8, ptr %13, i64 4
  %54 = getelementptr inbounds i8, ptr %13, i64 8
  %55 = getelementptr inbounds i8, ptr %13, i64 12
  br label %56

56:                                               ; preds = %.lr.ph50, %133
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [30000 x i32], ptr @dist, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %.not = icmp eq i32 %60, -1
  br i1 %.not, label %67, label %._crit_edge51

61:                                               ; preds = %._crit_edge
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %146

63:                                               ; preds = %42
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  br label %146

65:                                               ; preds = %143, %._crit_edge51, %45
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %146

67:                                               ; preds = %56
  %68 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5dequeI3locSaIS0_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5dequeI3locSaIS0_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  %71 = getelementptr inbounds i8, ptr %70, i64 4
  %72 = load i32, ptr %71, align 4, !tbaa !12
  %73 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5dequeI3locSaIS0_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  %74 = getelementptr inbounds i8, ptr %73, i64 8
  %75 = load i32, ptr %74, align 4, !tbaa !13
  %76 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt5dequeI3locSaIS0_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  %77 = getelementptr inbounds i8, ptr %76, i64 12
  %78 = load i8, ptr %77, align 4, !tbaa !14, !range !17, !noundef !18
  %79 = trunc nuw i8 %78 to i1
  call void @_ZNSt5dequeI3locSaIS0_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  %80 = sext i32 %69 to i64
  %81 = getelementptr inbounds [30000 x i32], ptr @dist, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %.not38 = icmp eq i32 %82, -1
  br i1 %.not38, label %83, label %99

83:                                               ; preds = %67
  store i32 %75, ptr %81, align 4, !tbaa !5
  %84 = getelementptr inbounds [30000 x %"class.std::vector"], ptr @graph, i64 0, i64 %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %85 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #8
  store ptr %85, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %86 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #8
  store ptr %86, ptr %7, align 8
  %87 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %87, label %.lr.ph48, label %._crit_edge49

._crit_edge49:                                    ; preds = %91, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %99

.lr.ph48:                                         ; preds = %83, %91
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %89 = load i32, ptr %88, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  store i32 %69, ptr %8, align 4, !tbaa !9
  store i32 %89, ptr %47, align 4, !tbaa !12
  store i32 %75, ptr %48, align 4, !tbaa !13
  store i8 1, ptr %49, align 4, !tbaa !14
  invoke void @_ZNSt5dequeI3locSaIS0_EE10push_frontEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(16) %8)
          to label %90 unwind label %94

90:                                               ; preds = %.lr.ph48
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  store i32 %69, ptr %9, align 4, !tbaa !9
  store i32 %89, ptr %50, align 4, !tbaa !12
  store i32 %75, ptr %51, align 4, !tbaa !13
  store i8 0, ptr %52, align 4, !tbaa !14
  invoke void @_ZNSt5dequeI3locSaIS0_EE10push_frontEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(16) %9)
          to label %91 unwind label %96

91:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %93 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %93, label %.lr.ph48, label %._crit_edge49

94:                                               ; preds = %.lr.ph48
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %98

96:                                               ; preds = %90
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br label %98

98:                                               ; preds = %96, %94
  %.pn = phi { ptr, i32 } [ %97, %96 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %146

99:                                               ; preds = %._crit_edge49, %67
  %100 = sext i32 %72 to i64
  %101 = getelementptr inbounds [30000 x i32], ptr @p, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = sub nsw i32 0, %102
  %spec.select = select i1 %79, i32 %102, i32 %103
  %104 = add nsw i32 %spec.select, %69
  %105 = add nsw i32 %75, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %106 = mul nsw i32 %102, 30000
  %107 = zext nneg i8 %78 to i32
  %108 = mul nuw nsw i32 %107, 900000000
  %109 = add i32 %106, %108
  %110 = add i32 %109, %104
  store i32 %110, ptr %10, align 4, !tbaa !5
  %111 = icmp sgt i32 %104, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %112 = load i32, ptr @N, align 4
  %.not40 = icmp slt i32 %104, %112
  %or.cond = select i1 %111, i1 %.not40, i1 false
  br i1 %or.cond, label %113, label %.critedge

113:                                              ; preds = %99
  %114 = invoke ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) @vis, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %115 unwind label %118

115:                                              ; preds = %113
  store ptr %114, ptr %11, align 8
  %116 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @vis) #8
  store ptr %116, ptr %12, align 8
  %117 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br i1 %117, label %133, label %120, !llvm.loop !19

.critedge:                                        ; preds = %99
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %133, !llvm.loop !19

118:                                              ; preds = %113
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %137

120:                                              ; preds = %115
  %121 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) @vis, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %122 unwind label %129

122:                                              ; preds = %120
  %123 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) @vis) #8
  %124 = trunc i64 %123 to i32
  %125 = icmp sgt i32 %124, 6000000
  br i1 %125, label %126, label %131

126:                                              ; preds = %122
  %127 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) @vis) #8
  %128 = invoke ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5eraseENSt8__detail14_Node_iteratorIiLb1ELb0EEE(ptr noundef nonnull align 8 dereferenceable(56) @vis, ptr %127)
          to label %131 unwind label %129

129:                                              ; preds = %126, %120
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %137

131:                                              ; preds = %126, %122
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  store i32 %104, ptr %13, align 4, !tbaa !9
  store i32 %72, ptr %53, align 4, !tbaa !12
  store i32 %105, ptr %54, align 4, !tbaa !13
  store i8 %78, ptr %55, align 4, !tbaa !14
  invoke void @_ZNSt5dequeI3locSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(16) %13)
          to label %132 unwind label %135

132:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %133

133:                                              ; preds = %115, %.critedge, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  %134 = call noundef zeroext i1 @_ZNKSt5dequeI3locSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  br i1 %134, label %._crit_edge51, label %56

135:                                              ; preds = %131
  %136 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %137

137:                                              ; preds = %135, %129, %118
  %.pn41 = phi { ptr, i32 } [ %136, %135 ], [ %130, %129 ], [ %119, %118 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %146

._crit_edge51:                                    ; preds = %133, %56, %.preheader
  %138 = load i32, ptr getelementptr inbounds (i8, ptr @b, i64 4), align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [30000 x i32], ptr @dist, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %141)
          to label %143 unwind label %65

143:                                              ; preds = %._crit_edge51
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %145 unwind label %65

145:                                              ; preds = %143
  call void @_ZNSt5dequeI3locSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #8
  ret i32 0

146:                                              ; preds = %98, %137, %65, %63, %61
  %.pn44 = phi { ptr, i32 } [ %66, %65 ], [ %64, %63 ], [ %62, %61 ], [ %.pn41, %137 ], [ %.pn, %98 ]
  call void @_ZNSt5dequeI3locSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn44
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeI3locSaIS0_EE10push_frontEOS0_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 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 #5 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5eraseENSt8__detail14_Node_iteratorIiLb1ELb0EEE(ptr noundef nonnull align 8 dereferenceable(56), ptr) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

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

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

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


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