; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2018.03/milkorder.ll (Z5solvei)

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

@N = external dso_local global i32, align 4
@obs = external dso_local global [50000 x %"class.std::vector"], align 16

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvei(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i32 noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [100000 x %"class.std::vector"], align 16
  %6 = alloca [100000 x i32], align 16
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i1, align 1
  %14 = alloca %"class.std::priority_queue", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2400000, ptr %5) #5
  %21 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %5, i32 0, i32 0
  %22 = getelementptr inbounds %"class.std::vector", ptr %21, i64 100000
  br label %23

23:                                               ; preds = %23, %2
  %24 = phi ptr [ %21, %2 ], [ %25, %23 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  %25 = getelementptr inbounds %"class.std::vector", ptr %24, i64 1
  %26 = icmp eq ptr %25, %22
  br i1 %26, label %27, label %23

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 400000, ptr %6) #5
  %28 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 0
  %29 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 0
  %30 = load i32, ptr @N, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i32, ptr %29, i64 %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %28, ptr noundef %32, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %33 unwind label %39

33:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %90, %33
  %35 = load i32, ptr %10, align 4, !tbaa !5
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %43, label %38

38:                                               ; preds = %34
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %93

39:                                               ; preds = %27
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %8, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %179

43:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %82, %43
  %45 = load i32, ptr %12, align 4, !tbaa !5
  %46 = load i32, ptr %10, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @obs, i64 0, i64 %47
  %49 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #5
  %50 = trunc i64 %49 to i32
  %51 = icmp slt i32 %45, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %44
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %89

53:                                               ; preds = %44
  %54 = load i32, ptr %10, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @obs, i64 0, i64 %55
  %57 = load i32, ptr %12, align 4, !tbaa !5
  %58 = sub nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %59) #5
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %5, i64 0, i64 %62
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @obs, i64 0, i64 %65
  %67 = load i32, ptr %12, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %68) #5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %63, ptr noundef nonnull align 4 dereferenceable(4) %69)
          to label %70 unwind label %85

70:                                               ; preds = %53
  %71 = load i32, ptr %10, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @obs, i64 0, i64 %72
  %74 = load i32, ptr %12, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #5
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %79, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %70
  %83 = load i32, ptr %12, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %12, align 4, !tbaa !5
  br label %44, !llvm.loop !9

85:                                               ; preds = %53
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %8, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %179

89:                                               ; preds = %52
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %10, align 4, !tbaa !5
  br label %34, !llvm.loop !11

93:                                               ; preds = %38
  store i1 false, ptr %13, align 1
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  invoke void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %14)
          to label %94 unwind label %100

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

95:                                               ; preds = %117, %94
  %96 = load i32, ptr %15, align 4, !tbaa !5
  %97 = load i32, ptr @N, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %104, label %99

99:                                               ; preds = %95
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %120

100:                                              ; preds = %93
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %8, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %9, align 4
  br label %174

104:                                              ; preds = %95
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %116, label %110

110:                                              ; preds = %104
  invoke void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(25) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %111 unwind label %112

111:                                              ; preds = %110
  br label %116

112:                                              ; preds = %110
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %8, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %173

116:                                              ; preds = %111, %104
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %15, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %15, align 4, !tbaa !5
  br label %95, !llvm.loop !12

120:                                              ; preds = %99
  br label %121

121:                                              ; preds = %169, %120
  %122 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %14)
          to label %123 unwind label %143

123:                                              ; preds = %121
  %124 = xor i1 %122, true
  br i1 %124, label %125, label %171

125:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %126 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %14)
          to label %127 unwind label %147

127:                                              ; preds = %125
  %128 = load i32, ptr %126, align 4, !tbaa !5
  store i32 %128, ptr %16, align 4, !tbaa !5
  invoke void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %14)
          to label %129 unwind label %147

129:                                              ; preds = %127
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %130 unwind label %147

130:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %131 = load i32, ptr %16, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %5, i64 0, i64 %132
  store ptr %133, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %134 = load ptr, ptr %17, align 8, !tbaa !13
  %135 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %134) #5
  %136 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %135, ptr %136, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %137 = load ptr, ptr %17, align 8, !tbaa !13
  %138 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #5
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  br label %140

140:                                              ; preds = %167, %130
  %141 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  br i1 %141, label %151, label %142

142:                                              ; preds = %140
  store i32 13, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %169

143:                                              ; preds = %121
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %8, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %9, align 4
  br label %173

147:                                              ; preds = %129, %127, %125
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %8, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %9, align 4
  br label %170

151:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  %153 = load i32, ptr %152, align 4, !tbaa !5
  store i32 %153, ptr %20, align 4, !tbaa !5
  %154 = load i32, ptr %20, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = add nsw i32 %157, -1
  store i32 %158, ptr %156, align 4, !tbaa !5
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %166, label %160

160:                                              ; preds = %151
  invoke void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(25) %14, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %161 unwind label %162

161:                                              ; preds = %160
  br label %166

162:                                              ; preds = %160
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %8, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %170

166:                                              ; preds = %161, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %167

167:                                              ; preds = %166
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br label %140

169:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %121, !llvm.loop !15

170:                                              ; preds = %162, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %173

171:                                              ; preds = %123
  store i1 true, ptr %13, align 1
  store i32 1, ptr %11, align 4
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  %172 = load i1, ptr %13, align 1
  br i1 %172, label %176, label %175

173:                                              ; preds = %170, %143, %112
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %14) #5
  br label %174

174:                                              ; preds = %173, %100
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %179

175:                                              ; preds = %171
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %176

176:                                              ; preds = %175, %171
  call void @llvm.lifetime.end.p0(i64 400000, ptr %6) #5
  %177 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %5, i32 0, i32 0
  %178 = getelementptr inbounds %"class.std::vector", ptr %177, i64 100000
  br label %182

179:                                              ; preds = %174, %85, %39
  call void @llvm.lifetime.end.p0(i64 400000, ptr %6) #5
  %180 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %5, i32 0, i32 0
  %181 = getelementptr inbounds %"class.std::vector", ptr %180, i64 100000
  br label %187

182:                                              ; preds = %182, %176
  %183 = phi ptr [ %178, %176 ], [ %184, %182 ]
  %184 = getelementptr inbounds %"class.std::vector", ptr %183, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %184) #5
  %185 = icmp eq ptr %184, %177
  br i1 %185, label %186, label %182

186:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 2400000, ptr %5) #5
  ret void

187:                                              ; preds = %187, %179
  %188 = phi ptr [ %181, %179 ], [ %189, %187 ]
  %189 = getelementptr inbounds %"class.std::vector", ptr %188, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %189) #5
  %190 = icmp eq ptr %189, %180
  br i1 %190, label %191, label %187

191:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 2400000, ptr %5) #5
  br label %192

192:                                              ; preds = %191
  %193 = load ptr, ptr %8, align 8
  %194 = load i32, ptr %9, align 4
  %195 = insertvalue { ptr, i32 } poison, ptr %193, 0
  %196 = insertvalue { ptr, i32 } %195, i32 %194, 1
  resume { ptr, i32 } %196
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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)) #3

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #0 align 2

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local local_unnamed_addr global i32, align 4
@obs = external dso_local global [50000 x %"class.std::vector"], align 16

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvei(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i32 noundef %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca [100000 x %"class.std::vector"], align 16
  %4 = alloca [100000 x i32], align 16
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::priority_queue", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 2400000, ptr nonnull %3) #5
  br label %12

12:                                               ; preds = %12, %2
  %.idx = phi i64 [ 0, %2 ], [ %.add, %12 ]
  %.ptr = getelementptr inbounds i8, ptr %3, i64 %.idx
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr) #5
  %.add = add nuw nsw i64 %.idx, 24
  %13 = icmp eq i64 %.add, 2400000
  br i1 %13, label %14, label %12

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %3, i64 2400000
  call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %4) #5
  %16 = load i32, ptr @N, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i32, ptr %4, i64 %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %4, ptr noundef nonnull %18, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %19 unwind label %27

19:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %20 = icmp sgt i32 %1, 0
  br i1 %20, label %.preheader.preheader, label %._crit_edge34

.preheader.preheader:                             ; preds = %19
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv46 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next47, %._crit_edge ]
  %21 = getelementptr inbounds [50000 x %"class.std::vector"], ptr @obs, i64 0, i64 %indvars.iv46
  %22 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  %23 = trunc i64 %22 to i32
  %24 = icmp sgt i32 %23, 1
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge34:                                    ; preds = %._crit_edge, %19
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  %25 = load i32, ptr @N, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph37, label %._crit_edge38

27:                                               ; preds = %14
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %87

._crit_edge:                                      ; preds = %35, %.preheader
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge34, label %.preheader, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader, %35
  %indvars.iv = phi i64 [ %indvars.iv.next, %35 ], [ 1, %.preheader ]
  %29 = add nsw i64 %indvars.iv, -1
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %29) #5
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %3, i64 0, i64 %32
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv) #5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %35 unwind label %45

35:                                               ; preds = %.lr.ph
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv) #5
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %39, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #5
  %sext = shl i64 %42, 32
  %43 = ashr exact i64 %sext, 32
  %44 = icmp slt i64 %indvars.iv.next, %43
  br i1 %44, label %.lr.ph, label %._crit_edge, !llvm.loop !11

45:                                               ; preds = %.lr.ph
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %87

._crit_edge38:                                    ; preds = %55, %._crit_edge34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  %47 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  br i1 %47, label %._crit_edge44, label %.lr.ph43

.lr.ph37:                                         ; preds = %._crit_edge34, %55
  %48 = phi i32 [ %56, %55 ], [ %25, %._crit_edge34 ]
  %storemerge35 = phi i32 [ %58, %55 ], [ 0, %._crit_edge34 ]
  %49 = sext i32 %storemerge35 to i64
  %50 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %.not27 = icmp eq i32 %51, 0
  br i1 %.not27, label %52, label %55

52:                                               ; preds = %.lr.ph37
  invoke void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %._crit_edge49 unwind label %53

._crit_edge49:                                    ; preds = %52
  %.pre = load i32, ptr %7, align 4, !tbaa !5
  %.pre50 = load i32, ptr @N, align 4, !tbaa !5
  br label %55

53:                                               ; preds = %52
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %86

55:                                               ; preds = %._crit_edge49, %.lr.ph37
  %56 = phi i32 [ %.pre50, %._crit_edge49 ], [ %48, %.lr.ph37 ]
  %57 = phi i32 [ %.pre, %._crit_edge49 ], [ %storemerge35, %.lr.ph37 ]
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %7, align 4, !tbaa !5
  %59 = icmp slt i32 %58, %56
  br i1 %59, label %.lr.ph37, label %._crit_edge38, !llvm.loop !12

.lr.ph43:                                         ; preds = %._crit_edge38, %._crit_edge41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  store i32 %61, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
          to label %62 unwind label %71

62:                                               ; preds = %.lr.ph43
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %63 unwind label %71

63:                                               ; preds = %62
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %3, i64 0, i64 %65
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %67 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #5
  store ptr %67, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %68 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #5
  store ptr %68, ptr %10, align 8
  %69 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %69, label %.lr.ph40, label %._crit_edge41

._crit_edge41:                                    ; preds = %82, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  %70 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  br i1 %70, label %._crit_edge44, label %.lr.ph43, !llvm.loop !13

71:                                               ; preds = %62, %.lr.ph43
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %85

.lr.ph40:                                         ; preds = %63, %82
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %74 = load i32, ptr %73, align 4, !tbaa !5
  store i32 %74, ptr %11, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %77, -1
  store i32 %78, ptr %76, align 4, !tbaa !5
  %.not = icmp eq i32 %78, 0
  br i1 %.not, label %79, label %82

79:                                               ; preds = %.lr.ph40
  invoke void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %82 unwind label %80

80:                                               ; preds = %79
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %85

82:                                               ; preds = %79, %.lr.ph40
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %84 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %84, label %.lr.ph40, label %._crit_edge41

85:                                               ; preds = %80, %71
  %.pn = phi { ptr, i32 } [ %81, %80 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %86

._crit_edge44:                                    ; preds = %._crit_edge41, %._crit_edge38
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %4) #5
  br label %88

86:                                               ; preds = %85, %53
  %.pn28 = phi { ptr, i32 } [ %54, %53 ], [ %.pn, %85 ]
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %87

87:                                               ; preds = %86, %45, %27
  %.pn30 = phi { ptr, i32 } [ %46, %45 ], [ %.pn28, %86 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %4) #5
  br label %93

88:                                               ; preds = %88, %._crit_edge44
  %89 = phi ptr [ %15, %._crit_edge44 ], [ %90, %88 ]
  %90 = getelementptr inbounds i8, ptr %89, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %90) #5
  %91 = icmp eq ptr %90, %3
  br i1 %91, label %92, label %88

92:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 2400000, ptr nonnull %3) #5
  ret void

93:                                               ; preds = %93, %87
  %94 = phi ptr [ %15, %87 ], [ %95, %93 ]
  %95 = getelementptr inbounds i8, ptr %94, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %95) #5
  %96 = icmp eq ptr %95, %3
  br i1 %96, label %97, label %93

97:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 2400000, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn30
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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 #3

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #0 align 2

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass