; LLVM IR from eyangch/competitive-programming :: Codeforces/544 (d)

; 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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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" }

@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@S1 = external dso_local global i64, align 8
@T1 = external dso_local global i64, align 8
@L1 = external dso_local global i64, align 8
@S2 = external dso_local global i64, align 8
@T2 = external dso_local global i64, align 8
@L2 = external dso_local global i64, align 8
@graph = external dso_local global [3000 x %"class.std::vector"], align 16
@D = external dso_local global [3000 x [3000 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsx(i64 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) @M)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %24

24:                                               ; preds = %42, %0
  %25 = load i64, ptr %2, align 8, !tbaa !8
  %26 = load i64, ptr @M, align 8, !tbaa !8
  %27 = icmp slt i64 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %45

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %32 = load i64, ptr %3, align 8, !tbaa !8
  %33 = sub nsw i64 %32, 1
  %34 = getelementptr inbounds [3000 x %"class.std::vector"], ptr @graph, i64 0, i64 %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %35 = load i64, ptr %4, align 8, !tbaa !8
  %36 = sub nsw i64 %35, 1
  store i64 %36, ptr %5, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %37 = load i64, ptr %4, align 8, !tbaa !8
  %38 = sub nsw i64 %37, 1
  %39 = getelementptr inbounds [3000 x %"class.std::vector"], ptr @graph, i64 0, i64 %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %40 = load i64, ptr %3, align 8, !tbaa !8
  %41 = sub nsw i64 %40, 1
  store i64 %41, ptr %6, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %42

42:                                               ; preds = %29
  %43 = load i64, ptr %2, align 8, !tbaa !8
  %44 = add nsw i64 %43, 1
  store i64 %44, ptr %2, align 8, !tbaa !8
  br label %24, !llvm.loop !11

45:                                               ; preds = %28
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @S1)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(8) @T1)
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(8) @L1)
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(8) @S2)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(8) @T2)
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(8) @L2)
  %52 = load i64, ptr @S1, align 8, !tbaa !8
  %53 = add nsw i64 %52, -1
  store i64 %53, ptr @S1, align 8, !tbaa !8
  %54 = load i64, ptr @T1, align 8, !tbaa !8
  %55 = add nsw i64 %54, -1
  store i64 %55, ptr @T1, align 8, !tbaa !8
  %56 = load i64, ptr @S2, align 8, !tbaa !8
  %57 = add nsw i64 %56, -1
  store i64 %57, ptr @S2, align 8, !tbaa !8
  %58 = load i64, ptr @T2, align 8, !tbaa !8
  %59 = add nsw i64 %58, -1
  store i64 %59, ptr @T2, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %60

60:                                               ; preds = %67, %45
  %61 = load i64, ptr %7, align 8, !tbaa !8
  %62 = load i64, ptr @N, align 8, !tbaa !8
  %63 = icmp slt i64 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %70

65:                                               ; preds = %60
  %66 = load i64, ptr %7, align 8, !tbaa !8
  call void @_Z3bfsx(i64 noundef %66)
  br label %67

67:                                               ; preds = %65
  %68 = load i64, ptr %7, align 8, !tbaa !8
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %7, align 8, !tbaa !8
  br label %60, !llvm.loop !13

70:                                               ; preds = %64
  %71 = load i64, ptr @S1, align 8, !tbaa !8
  %72 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %71
  %73 = load i64, ptr @T1, align 8, !tbaa !8
  %74 = getelementptr inbounds [3000 x i64], ptr %72, i64 0, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !8
  %76 = load i64, ptr @L1, align 8, !tbaa !8
  %77 = icmp sgt i64 %75, %76
  br i1 %77, label %86, label %78

78:                                               ; preds = %70
  %79 = load i64, ptr @S2, align 8, !tbaa !8
  %80 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %79
  %81 = load i64, ptr @T2, align 8, !tbaa !8
  %82 = getelementptr inbounds [3000 x i64], ptr %80, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !8
  %84 = load i64, ptr @L2, align 8, !tbaa !8
  %85 = icmp sgt i64 %83, %84
  br i1 %85, label %86, label %89

86:                                               ; preds = %78, %70
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %87, i8 noundef signext 10)
  store i32 0, ptr %1, align 4
  br label %209

89:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %90 = load i64, ptr @S1, align 8, !tbaa !8
  %91 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %90
  %92 = load i64, ptr @T1, align 8, !tbaa !8
  %93 = getelementptr inbounds [3000 x i64], ptr %91, i64 0, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !8
  %95 = load i64, ptr @S2, align 8, !tbaa !8
  %96 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %95
  %97 = load i64, ptr @T2, align 8, !tbaa !8
  %98 = getelementptr inbounds [3000 x i64], ptr %96, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = add nsw i64 %94, %99
  store i64 %100, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %101

101:                                              ; preds = %200, %89
  %102 = load i64, ptr %9, align 8, !tbaa !8
  %103 = load i64, ptr @N, align 8, !tbaa !8
  %104 = icmp slt i64 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %203

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %107

107:                                              ; preds = %196, %106
  %108 = load i64, ptr %11, align 8, !tbaa !8
  %109 = load i64, ptr @N, align 8, !tbaa !8
  %110 = icmp slt i64 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %199

112:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !8
  br label %113

113:                                              ; preds = %192, %112
  %114 = load i64, ptr %12, align 8, !tbaa !8
  %115 = icmp slt i64 %114, 2
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %195

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %118 = load i64, ptr @S1, align 8, !tbaa !8
  %119 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %118
  %120 = load i64, ptr %9, align 8, !tbaa !8
  %121 = getelementptr inbounds [3000 x i64], ptr %119, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !8
  %123 = load i64, ptr %9, align 8, !tbaa !8
  %124 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %123
  %125 = load i64, ptr %11, align 8, !tbaa !8
  %126 = getelementptr inbounds [3000 x i64], ptr %124, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !8
  %128 = add nsw i64 %122, %127
  %129 = load i64, ptr %11, align 8, !tbaa !8
  %130 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %129
  %131 = load i64, ptr @T1, align 8, !tbaa !8
  %132 = getelementptr inbounds [3000 x i64], ptr %130, i64 0, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !8
  %134 = add nsw i64 %128, %133
  store i64 %134, ptr %13, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %135 = load i64, ptr @S2, align 8, !tbaa !8
  %136 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %135
  %137 = load i64, ptr %9, align 8, !tbaa !8
  %138 = getelementptr inbounds [3000 x i64], ptr %136, i64 0, i64 %137
  %139 = load i64, ptr %138, align 8, !tbaa !8
  %140 = load i64, ptr %9, align 8, !tbaa !8
  %141 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %140
  %142 = load i64, ptr %11, align 8, !tbaa !8
  %143 = getelementptr inbounds [3000 x i64], ptr %141, i64 0, i64 %142
  %144 = load i64, ptr %143, align 8, !tbaa !8
  %145 = add nsw i64 %139, %144
  %146 = load i64, ptr %11, align 8, !tbaa !8
  %147 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %146
  %148 = load i64, ptr @T2, align 8, !tbaa !8
  %149 = getelementptr inbounds [3000 x i64], ptr %147, i64 0, i64 %148
  %150 = load i64, ptr %149, align 8, !tbaa !8
  %151 = add nsw i64 %145, %150
  store i64 %151, ptr %14, align 8, !tbaa !8
  %152 = load i64, ptr %13, align 8, !tbaa !8
  %153 = load i64, ptr @L1, align 8, !tbaa !8
  %154 = icmp sle i64 %152, %153
  br i1 %154, label %155, label %191

155:                                              ; preds = %117
  %156 = load i64, ptr %14, align 8, !tbaa !8
  %157 = load i64, ptr @L2, align 8, !tbaa !8
  %158 = icmp sle i64 %156, %157
  br i1 %158, label %159, label %191

159:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %160 = load i64, ptr @S1, align 8, !tbaa !8
  %161 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %160
  %162 = load i64, ptr %9, align 8, !tbaa !8
  %163 = getelementptr inbounds [3000 x i64], ptr %161, i64 0, i64 %162
  %164 = load i64, ptr %163, align 8, !tbaa !8
  %165 = load i64, ptr @S2, align 8, !tbaa !8
  %166 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %165
  %167 = load i64, ptr %9, align 8, !tbaa !8
  %168 = getelementptr inbounds [3000 x i64], ptr %166, i64 0, i64 %167
  %169 = load i64, ptr %168, align 8, !tbaa !8
  %170 = add nsw i64 %164, %169
  %171 = load i64, ptr %9, align 8, !tbaa !8
  %172 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %171
  %173 = load i64, ptr %11, align 8, !tbaa !8
  %174 = getelementptr inbounds [3000 x i64], ptr %172, i64 0, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !8
  %176 = add nsw i64 %170, %175
  %177 = load i64, ptr %11, align 8, !tbaa !8
  %178 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %177
  %179 = load i64, ptr @T1, align 8, !tbaa !8
  %180 = getelementptr inbounds [3000 x i64], ptr %178, i64 0, i64 %179
  %181 = load i64, ptr %180, align 8, !tbaa !8
  %182 = add nsw i64 %176, %181
  %183 = load i64, ptr %11, align 8, !tbaa !8
  %184 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %183
  %185 = load i64, ptr @T2, align 8, !tbaa !8
  %186 = getelementptr inbounds [3000 x i64], ptr %184, i64 0, i64 %185
  %187 = load i64, ptr %186, align 8, !tbaa !8
  %188 = add nsw i64 %182, %187
  store i64 %188, ptr %15, align 8, !tbaa !8
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %190 = load i64, ptr %189, align 8, !tbaa !8
  store i64 %190, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %191

191:                                              ; preds = %159, %155, %117
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) @S2, ptr noundef nonnull align 8 dereferenceable(8) @T2) #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 %192

192:                                              ; preds = %191
  %193 = load i64, ptr %12, align 8, !tbaa !8
  %194 = add nsw i64 %193, 1
  store i64 %194, ptr %12, align 8, !tbaa !8
  br label %113, !llvm.loop !14

195:                                              ; preds = %116
  br label %196

196:                                              ; preds = %195
  %197 = load i64, ptr %11, align 8, !tbaa !8
  %198 = add nsw i64 %197, 1
  store i64 %198, ptr %11, align 8, !tbaa !8
  br label %107, !llvm.loop !15

199:                                              ; preds = %111
  br label %200

200:                                              ; preds = %199
  %201 = load i64, ptr %9, align 8, !tbaa !8
  %202 = add nsw i64 %201, 1
  store i64 %202, ptr %9, align 8, !tbaa !8
  br label %101, !llvm.loop !16

203:                                              ; preds = %105
  %204 = load i64, ptr @M, align 8, !tbaa !8
  %205 = load i64, ptr %8, align 8, !tbaa !8
  %206 = sub nsw i64 %204, %205
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %206)
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %207, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %209

209:                                              ; preds = %203, %86
  %210 = load i32, ptr %1, align 4
  ret i32 %210
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

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

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

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

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

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

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


; 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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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" }

@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@S1 = external dso_local global i64, align 8
@T1 = external dso_local global i64, align 8
@L1 = external dso_local global i64, align 8
@S2 = external dso_local global i64, align 8
@T2 = external dso_local global i64, align 8
@L2 = external dso_local global i64, align 8
@graph = external dso_local global [3000 x %"class.std::vector"], align 16
@D = external dso_local local_unnamed_addr global [3000 x [3000 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsx(i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %15 = load i64, ptr @M, align 8, !tbaa !8
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @S1)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) @T1)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) @L1)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) @S2)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) @T2)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) @L2)
  %23 = load i64, ptr @S1, align 8, !tbaa !8
  %24 = add nsw i64 %23, -1
  store i64 %24, ptr @S1, align 8, !tbaa !8
  %25 = load i64, ptr @T1, align 8, !tbaa !8
  %26 = add nsw i64 %25, -1
  store i64 %26, ptr @T1, align 8, !tbaa !8
  %27 = load i64, ptr @S2, align 8, !tbaa !8
  %28 = add nsw i64 %27, -1
  store i64 %28, ptr @S2, align 8, !tbaa !8
  %29 = load i64, ptr @T2, align 8, !tbaa !8
  %30 = add nsw i64 %29, -1
  store i64 %30, ptr @T2, align 8, !tbaa !8
  %31 = load i64, ptr @N, align 8, !tbaa !8
  %32 = icmp sgt i64 %31, 0
  br i1 %32, label %.lr.ph38, label %._crit_edge39

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02835 = phi i64 [ %45, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %35 = load i64, ptr %1, align 8, !tbaa !8
  %36 = add nsw i64 %35, -1
  %37 = getelementptr inbounds [3000 x %"class.std::vector"], ptr @graph, i64 0, i64 %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %38 = load i64, ptr %2, align 8, !tbaa !8
  %39 = add nsw i64 %38, -1
  store i64 %39, ptr %3, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %40 = load i64, ptr %2, align 8, !tbaa !8
  %41 = add nsw i64 %40, -1
  %42 = getelementptr inbounds [3000 x %"class.std::vector"], ptr @graph, i64 0, i64 %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %43 = load i64, ptr %1, align 8, !tbaa !8
  %44 = add nsw i64 %43, -1
  store i64 %44, ptr %4, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %45 = add nuw nsw i64 %.02835, 1
  %46 = load i64, ptr @M, align 8, !tbaa !8
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge39.loopexit:                           ; preds = %.lr.ph38
  %.pre = load i64, ptr @S1, align 8, !tbaa !8
  %.pre46 = load i64, ptr @T1, align 8, !tbaa !8
  br label %._crit_edge39

._crit_edge39:                                    ; preds = %._crit_edge39.loopexit, %._crit_edge
  %48 = phi i64 [ %56, %._crit_edge39.loopexit ], [ %31, %._crit_edge ]
  %49 = phi i64 [ %.pre46, %._crit_edge39.loopexit ], [ %26, %._crit_edge ]
  %50 = phi i64 [ %.pre, %._crit_edge39.loopexit ], [ %24, %._crit_edge ]
  %51 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %50, i64 %49
  %52 = load i64, ptr %51, align 8, !tbaa !8
  %53 = load i64, ptr @L1, align 8, !tbaa !8
  %54 = icmp sgt i64 %52, %53
  br i1 %54, label %65, label %58

.lr.ph38:                                         ; preds = %._crit_edge, %.lr.ph38
  %.03236 = phi i64 [ %55, %.lr.ph38 ], [ 0, %._crit_edge ]
  call void @_Z3bfsx(i64 noundef %.03236)
  %55 = add nuw nsw i64 %.03236, 1
  %56 = load i64, ptr @N, align 8, !tbaa !8
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %.lr.ph38, label %._crit_edge39.loopexit, !llvm.loop !13

58:                                               ; preds = %._crit_edge39
  %59 = load i64, ptr @S2, align 8, !tbaa !8
  %60 = load i64, ptr @T2, align 8, !tbaa !8
  %61 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %59, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = load i64, ptr @L2, align 8, !tbaa !8
  %64 = icmp sgt i64 %62, %63
  br i1 %64, label %65, label %68

65:                                               ; preds = %58, %._crit_edge39
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %66, i8 noundef signext 10)
  br label %137

68:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %69 = add nsw i64 %62, %52
  store i64 %69, ptr %5, align 8, !tbaa !8
  %70 = icmp sgt i64 %48, 0
  br i1 %70, label %.preheader34, label %._crit_edge44

.preheader34:                                     ; preds = %68, %._crit_edge42
  %71 = phi i64 [ %89, %._crit_edge42 ], [ %48, %68 ]
  %.03143 = phi i64 [ %90, %._crit_edge42 ], [ 0, %68 ]
  %72 = icmp sgt i64 %71, 0
  br i1 %72, label %.preheader, label %._crit_edge42

._crit_edge44.loopexit:                           ; preds = %._crit_edge42
  %.pre47 = load i64, ptr %5, align 8, !tbaa !8
  br label %._crit_edge44

._crit_edge44:                                    ; preds = %._crit_edge44.loopexit, %68
  %73 = phi i64 [ %.pre47, %._crit_edge44.loopexit ], [ %69, %68 ]
  %74 = load i64, ptr @M, align 8, !tbaa !8
  %75 = sub nsw i64 %74, %73
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %75)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %76, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %137

.preheader:                                       ; preds = %.preheader34, %133
  %.03041 = phi i64 [ %134, %133 ], [ 0, %.preheader34 ]
  %78 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %.03143, i64 %.03041
  %79 = load i64, ptr @S1, align 8, !tbaa !8
  %80 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %79, i64 %.03143
  %81 = load i64, ptr %80, align 8, !tbaa !8
  %82 = load i64, ptr %78, align 8, !tbaa !8
  %83 = add i64 %82, %81
  %84 = load i64, ptr @T1, align 8, !tbaa !8
  %85 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %.03041, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !8
  %87 = add i64 %83, %86
  %88 = load i64, ptr @L1, align 8, !tbaa !8
  %.not = icmp sgt i64 %87, %88
  br i1 %.not, label %107, label %92

._crit_edge42:                                    ; preds = %133, %.preheader34
  %89 = phi i64 [ %71, %.preheader34 ], [ %135, %133 ]
  %90 = add nuw nsw i64 %.03143, 1
  %91 = icmp slt i64 %90, %89
  br i1 %91, label %.preheader34, label %._crit_edge44.loopexit, !llvm.loop !14

92:                                               ; preds = %.preheader
  %93 = load i64, ptr @S2, align 8, !tbaa !8
  %94 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %93, i64 %.03143
  %95 = load i64, ptr %94, align 8, !tbaa !8
  %96 = add nsw i64 %95, %82
  %97 = load i64, ptr @T2, align 8, !tbaa !8
  %98 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %.03041, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = add nsw i64 %96, %99
  %101 = load i64, ptr @L2, align 8, !tbaa !8
  %.not33 = icmp sgt i64 %100, %101
  br i1 %.not33, label %107, label %102

102:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %103 = add i64 %87, %95
  %104 = add nsw i64 %103, %99
  store i64 %104, ptr %6, align 8, !tbaa !8
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %106 = load i64, ptr %105, align 8, !tbaa !8
  store i64 %106, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %107

107:                                              ; preds = %102, %92, %.preheader
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) @S2, ptr noundef nonnull align 8 dereferenceable(8) @T2) #7
  %108 = load i64, ptr @S1, align 8, !tbaa !8
  %109 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %108, i64 %.03143
  %110 = load i64, ptr %109, align 8, !tbaa !8
  %111 = load i64, ptr %78, align 8, !tbaa !8
  %112 = add i64 %111, %110
  %113 = load i64, ptr @T1, align 8, !tbaa !8
  %114 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %.03041, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !8
  %116 = add i64 %112, %115
  %117 = load i64, ptr @L1, align 8, !tbaa !8
  %.not.1 = icmp sgt i64 %116, %117
  br i1 %.not.1, label %133, label %118

118:                                              ; preds = %107
  %119 = load i64, ptr @S2, align 8, !tbaa !8
  %120 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %119, i64 %.03143
  %121 = load i64, ptr %120, align 8, !tbaa !8
  %122 = add nsw i64 %121, %111
  %123 = load i64, ptr @T2, align 8, !tbaa !8
  %124 = getelementptr inbounds [3000 x [3000 x i64]], ptr @D, i64 0, i64 %.03041, i64 %123
  %125 = load i64, ptr %124, align 8, !tbaa !8
  %126 = add nsw i64 %122, %125
  %127 = load i64, ptr @L2, align 8, !tbaa !8
  %.not33.1 = icmp sgt i64 %126, %127
  br i1 %.not33.1, label %133, label %128

128:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %129 = add i64 %116, %121
  %130 = add nsw i64 %129, %125
  store i64 %130, ptr %6, align 8, !tbaa !8
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %132 = load i64, ptr %131, align 8, !tbaa !8
  store i64 %132, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %133

133:                                              ; preds = %128, %118, %107
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) @S2, ptr noundef nonnull align 8 dereferenceable(8) @T2) #7
  %134 = add nuw nsw i64 %.03041, 1
  %135 = load i64, ptr @N, align 8, !tbaa !8
  %136 = icmp slt i64 %134, %135
  br i1 %136, label %.preheader, label %._crit_edge42, !llvm.loop !16

137:                                              ; preds = %._crit_edge44, %65
  ret i32 0
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

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

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass