; LLVM IR from eyangch/competitive-programming :: Codeforces/1702 (e)

; 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"

%"struct.std::pair" = type { i64, i64 }
%"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" }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@C = external dso_local global [200000 x i64], align 16
@X = external dso_local global [200000 x %"struct.std::pair"], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@nb = external dso_local global [200000 x %"class.std::vector"], align 16
@good = external dso_local global i8, align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsxx(i64 noundef, 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 i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  %19 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %21

21:                                               ; preds = %183, %181, %0
  %22 = load i64, ptr @T, align 8, !tbaa !8
  %23 = add nsw i64 %22, -1
  store i64 %23, ptr @T, align 8, !tbaa !8
  %24 = icmp ne i64 %22, 0
  br i1 %24, label %25, label %184

25:                                               ; preds = %21
  %26 = 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)
  store i8 1, ptr @good, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %27

27:                                               ; preds = %37, %25
  %28 = load i64, ptr %2, align 8, !tbaa !8
  %29 = load i64, ptr @N, align 8, !tbaa !8
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i64, ptr %2, align 8, !tbaa !8
  %34 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %33
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #7
  %35 = load i64, ptr %2, align 8, !tbaa !8
  %36 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %35
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  br label %37

37:                                               ; preds = %32
  %38 = load i64, ptr %2, align 8, !tbaa !8
  %39 = add nsw i64 %38, 1
  store i64 %39, ptr %2, align 8, !tbaa !8
  br label %27, !llvm.loop !13

40:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %41

41:                                               ; preds = %65, %40
  %42 = load i64, ptr %3, align 8, !tbaa !8
  %43 = load i64, ptr @N, align 8, !tbaa !8
  %44 = icmp slt i64 %42, %43
  br i1 %44, label %46, label %45

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

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %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) %5)
  %49 = load i64, ptr %4, align 8, !tbaa !8
  %50 = add nsw i64 %49, -1
  store i64 %50, ptr %4, align 8, !tbaa !8
  %51 = load i64, ptr %5, align 8, !tbaa !8
  %52 = add nsw i64 %51, -1
  store i64 %52, ptr %5, align 8, !tbaa !8
  %53 = load i64, ptr %4, align 8, !tbaa !8
  %54 = load i64, ptr %3, align 8, !tbaa !8
  %55 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @X, i64 0, i64 %54
  %56 = getelementptr inbounds %"struct.std::pair", ptr %55, i32 0, i32 0
  store i64 %53, ptr %56, align 16, !tbaa !15
  %57 = load i64, ptr %5, align 8, !tbaa !8
  %58 = load i64, ptr %3, align 8, !tbaa !8
  %59 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @X, i64 0, i64 %58
  %60 = getelementptr inbounds %"struct.std::pair", ptr %59, i32 0, i32 1
  store i64 %57, ptr %60, align 8, !tbaa !17
  %61 = load i64, ptr %4, align 8, !tbaa !8
  %62 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %61
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %63 = load i64, ptr %5, align 8, !tbaa !8
  %64 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %63
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %65

65:                                               ; preds = %46
  %66 = load i64, ptr %3, align 8, !tbaa !8
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %3, align 8, !tbaa !8
  br label %41, !llvm.loop !18

68:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  store i8 0, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !8
  br label %69

69:                                               ; preds = %81, %68
  %70 = load i64, ptr %7, align 8, !tbaa !8
  %71 = load i64, ptr @N, align 8, !tbaa !8
  %72 = icmp slt i64 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 10, ptr %8, align 4
  br label %84

74:                                               ; preds = %69
  %75 = load i64, ptr %7, align 8, !tbaa !8
  %76 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %75
  %77 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #7
  %78 = icmp ne i64 %77, 2
  br i1 %78, label %79, label %80

79:                                               ; preds = %74
  store i8 1, ptr %6, align 1, !tbaa !11
  store i32 10, ptr %8, align 4
  br label %84

80:                                               ; preds = %74
  br label %81

81:                                               ; preds = %80
  %82 = load i64, ptr %7, align 8, !tbaa !8
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %7, align 8, !tbaa !8
  br label %69, !llvm.loop !19

84:                                               ; preds = %79, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %85

85:                                               ; preds = %84
  %86 = load i8, ptr %6, align 1, !tbaa !11, !range !20, !noundef !21
  %87 = trunc i8 %86 to i1
  br i1 %87, label %88, label %91

88:                                               ; preds = %85
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %89, i8 noundef signext 10)
  store i32 2, ptr %8, align 4
  br label %181, !llvm.loop !22

91:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %92

92:                                               ; preds = %144, %91
  %93 = load i64, ptr %9, align 8, !tbaa !8
  %94 = load i64, ptr @N, align 8, !tbaa !8
  %95 = icmp slt i64 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %147

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %98 = load i64, ptr %9, align 8, !tbaa !8
  %99 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @X, i64 0, i64 %98
  %100 = getelementptr inbounds %"struct.std::pair", ptr %99, i32 0, i32 0
  %101 = load i64, ptr %100, align 16, !tbaa !15
  store i64 %101, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %102 = load i64, ptr %9, align 8, !tbaa !8
  %103 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @X, i64 0, i64 %102
  %104 = getelementptr inbounds %"struct.std::pair", ptr %103, i32 0, i32 1
  %105 = load i64, ptr %104, align 8, !tbaa !17
  store i64 %105, ptr %11, align 8, !tbaa !8
  %106 = load i64, ptr %10, align 8, !tbaa !8
  %107 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %106
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef 0) #7
  %109 = load i64, ptr %108, align 8, !tbaa !8
  %110 = load i64, ptr %9, align 8, !tbaa !8
  %111 = icmp eq i64 %109, %110
  br i1 %111, label %112, label %119

112:                                              ; preds = %97
  %113 = load i64, ptr %10, align 8, !tbaa !8
  %114 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %113
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef 0) #7
  %116 = load i64, ptr %10, align 8, !tbaa !8
  %117 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %116
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef 1) #7
  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) %115, ptr noundef nonnull align 8 dereferenceable(8) %118) #7
  br label %119

119:                                              ; preds = %112, %97
  %120 = load i64, ptr %11, align 8, !tbaa !8
  %121 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %120
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef 0) #7
  %123 = load i64, ptr %122, align 8, !tbaa !8
  %124 = load i64, ptr %9, align 8, !tbaa !8
  %125 = icmp eq i64 %123, %124
  br i1 %125, label %126, label %133

126:                                              ; preds = %119
  %127 = load i64, ptr %11, align 8, !tbaa !8
  %128 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %127
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef 0) #7
  %130 = load i64, ptr %11, align 8, !tbaa !8
  %131 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %130
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef 1) #7
  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) %129, ptr noundef nonnull align 8 dereferenceable(8) %132) #7
  br label %133

133:                                              ; preds = %126, %119
  %134 = load i64, ptr %9, align 8, !tbaa !8
  %135 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %134
  %136 = load i64, ptr %10, align 8, !tbaa !8
  %137 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %136
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef 0) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %135, ptr noundef nonnull align 8 dereferenceable(8) %138)
  %139 = load i64, ptr %9, align 8, !tbaa !8
  %140 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %139
  %141 = load i64, ptr %11, align 8, !tbaa !8
  %142 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %141
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %142, i64 noundef 0) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %140, ptr noundef nonnull align 8 dereferenceable(8) %143)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %144

144:                                              ; preds = %133
  %145 = load i64, ptr %9, align 8, !tbaa !8
  %146 = add nsw i64 %145, 1
  store i64 %146, ptr %9, align 8, !tbaa !8
  br label %92, !llvm.loop !23

147:                                              ; preds = %96
  %148 = load i64, ptr @N, align 8, !tbaa !8
  %149 = getelementptr inbounds i64, ptr @C, i64 %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 -1, ptr %12, align 4, !tbaa !24
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @C, ptr noundef %149, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !8
  br label %150

150:                                              ; preds = %167, %147
  %151 = load i64, ptr %13, align 8, !tbaa !8
  %152 = load i64, ptr @N, align 8, !tbaa !8
  %153 = icmp slt i64 %151, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %150
  store i32 16, ptr %8, align 4
  br label %170

155:                                              ; preds = %150
  %156 = load i8, ptr @good, align 1, !tbaa !11, !range !20, !noundef !21
  %157 = trunc i8 %156 to i1
  br i1 %157, label %159, label %158

158:                                              ; preds = %155
  store i32 16, ptr %8, align 4
  br label %170

159:                                              ; preds = %155
  %160 = load i64, ptr %13, align 8, !tbaa !8
  %161 = getelementptr inbounds [200000 x i64], ptr @C, i64 0, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !8
  %163 = icmp eq i64 %162, -1
  br i1 %163, label %164, label %166

164:                                              ; preds = %159
  %165 = load i64, ptr %13, align 8, !tbaa !8
  call void @_Z3dfsxx(i64 noundef %165, i64 noundef 0)
  br label %166

166:                                              ; preds = %164, %159
  br label %167

167:                                              ; preds = %166
  %168 = load i64, ptr %13, align 8, !tbaa !8
  %169 = add nsw i64 %168, 1
  store i64 %169, ptr %13, align 8, !tbaa !8
  br label %150, !llvm.loop !26

170:                                              ; preds = %158, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %171

171:                                              ; preds = %170
  %172 = load i8, ptr @good, align 1, !tbaa !11, !range !20, !noundef !21
  %173 = trunc i8 %172 to i1
  br i1 %173, label %174, label %177

174:                                              ; preds = %171
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %175, i8 noundef signext 10)
  br label %180

177:                                              ; preds = %171
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %178, i8 noundef signext 10)
  br label %180

180:                                              ; preds = %177, %174
  store i32 0, ptr %8, align 4
  br label %181

181:                                              ; preds = %180, %88
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  %182 = load i32, ptr %8, align 4
  switch i32 %182, label %186 [
    i32 0, label %183
    i32 2, label %21
  ]

183:                                              ; preds = %181
  br label %21, !llvm.loop !22

184:                                              ; preds = %21
  %185 = load i32, ptr %1, align 4
  ret i32 %185

186:                                              ; preds = %181
  unreachable
}

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

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

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #5

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 = !{!12, !12, i64 0}
!12 = !{!"bool", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !9, i64 0}
!16 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!17 = !{!16, !9, i64 8}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = !{!25, !25, i64 0}
!25 = !{!"int", !10, i64 0}
!26 = distinct !{!26, !14}


; 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"

%"struct.std::pair" = type { i64, i64 }
%"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" }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@C = external dso_local global [200000 x i64], align 16
@X = external dso_local local_unnamed_addr global [200000 x %"struct.std::pair"], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@nb = external dso_local global [200000 x %"class.std::vector"], align 16
@good = external dso_local local_unnamed_addr global i8, align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsxx(i64 noundef, 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 i32, align 4
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = 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) @T)
  %12 = load i64, ptr @T, align 8, !tbaa !8
  %13 = add nsw i64 %12, -1
  store i64 %13, ptr @T, align 8, !tbaa !8
  %.not49 = icmp eq i64 %12, 0
  br i1 %.not49, label %._crit_edge52, label %.lr.ph51

.lr.ph51:                                         ; preds = %0, %.loopexit
  %14 = 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)
  store i8 1, ptr @good, align 1, !tbaa !11
  %15 = load i64, ptr @N, align 8, !tbaa !8
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.lr.ph51
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  br label %._crit_edge38.thread

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store i64 0, ptr %1, align 8, !tbaa !8
  %17 = icmp sgt i64 %21, 0
  br i1 %17, label %.lr.ph37, label %._crit_edge38.thread

.lr.ph:                                           ; preds = %.lr.ph51, %.lr.ph
  %.02935 = phi i64 [ %20, %.lr.ph ], [ 0, %.lr.ph51 ]
  %18 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %.02935
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  %19 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %.02935
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %20 = add nuw nsw i64 %.02935, 1
  %21 = load i64, ptr @N, align 8, !tbaa !8
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge38.thread:                             ; preds = %._crit_edge, %._crit_edge.thread
  %.ph = phi i64 [ %15, %._crit_edge.thread ], [ %21, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  br label %.critedge._crit_edge

._crit_edge38:                                    ; preds = %.lr.ph37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %23 = icmp sgt i64 %38, 0
  br i1 %23, label %.lr.ph41, label %.critedge._crit_edge

.lr.ph37:                                         ; preds = %._crit_edge, %.lr.ph37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %26 = load i64, ptr %2, align 8, !tbaa !8
  %27 = add nsw i64 %26, -1
  store i64 %27, ptr %2, align 8, !tbaa !8
  %28 = load i64, ptr %3, align 8, !tbaa !8
  %29 = add nsw i64 %28, -1
  store i64 %29, ptr %3, align 8, !tbaa !8
  %30 = load i64, ptr %1, align 8, !tbaa !8
  %31 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @X, i64 0, i64 %30
  store i64 %27, ptr %31, align 16, !tbaa !15
  %32 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @X, i64 0, i64 %30, i32 1
  store i64 %29, ptr %32, align 8, !tbaa !17
  %33 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %27
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %34 = load i64, ptr %3, align 8, !tbaa !8
  %35 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %34
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %36 = load i64, ptr %1, align 8, !tbaa !8
  %37 = add nsw i64 %36, 1
  store i64 %37, ptr %1, align 8, !tbaa !8
  %38 = load i64, ptr @N, align 8, !tbaa !8
  %39 = icmp slt i64 %37, %38
  br i1 %39, label %.lr.ph37, label %._crit_edge38, !llvm.loop !18

40:                                               ; preds = %.lr.ph41
  %41 = add nuw nsw i64 %.03239, 1
  %42 = load i64, ptr @N, align 8, !tbaa !8
  %43 = icmp slt i64 %41, %42
  br i1 %43, label %.lr.ph41, label %.critedge.preheader, !llvm.loop !19

.critedge.preheader:                              ; preds = %40
  %44 = icmp sgt i64 %42, 0
  br i1 %44, label %.lr.ph43, label %.critedge._crit_edge

.lr.ph41:                                         ; preds = %._crit_edge38, %40
  %.03239 = phi i64 [ %41, %40 ], [ 0, %._crit_edge38 ]
  %45 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %.03239
  %46 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %.not34 = icmp eq i64 %46, 2
  br i1 %.not34, label %40, label %.loopexit, !llvm.loop !20

.critedge._crit_edge:                             ; preds = %.critedge, %._crit_edge38.thread, %._crit_edge38, %.critedge.preheader
  %.lcssa = phi i64 [ %42, %.critedge.preheader ], [ %.ph, %._crit_edge38.thread ], [ %38, %._crit_edge38 ], [ %73, %.critedge ]
  %47 = getelementptr inbounds i64, ptr @C, i64 %.lcssa
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 -1, ptr %4, align 4, !tbaa !21
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @C, ptr noundef nonnull %47, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %48 = load i64, ptr @N, align 8, !tbaa !8
  %49 = icmp sgt i64 %48, 0
  %.pre56 = load i8, ptr @good, align 1, !tbaa !11, !range !23
  br i1 %49, label %.lr.ph46, label %._crit_edge47

.lr.ph43:                                         ; preds = %.critedge.preheader, %.critedge
  %.03142 = phi i64 [ %72, %.critedge ], [ 0, %.critedge.preheader ]
  %50 = getelementptr inbounds [200000 x %"struct.std::pair"], ptr @X, i64 0, i64 %.03142
  %51 = load i64, ptr %50, align 16, !tbaa !15
  %52 = getelementptr inbounds i8, ptr %50, i64 8
  %53 = load i64, ptr %52, align 8, !tbaa !17
  %54 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %51
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef 0) #7
  %56 = load i64, ptr %55, align 8, !tbaa !8
  %57 = icmp eq i64 %56, %.03142
  br i1 %57, label %58, label %61

58:                                               ; preds = %.lr.ph43
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef 0) #7
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef 1) #7
  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) %59, ptr noundef nonnull align 8 dereferenceable(8) %60) #7
  br label %61

61:                                               ; preds = %58, %.lr.ph43
  %62 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @nb, i64 0, i64 %53
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef 0) #7
  %64 = load i64, ptr %63, align 8, !tbaa !8
  %65 = icmp eq i64 %64, %.03142
  br i1 %65, label %66, label %.critedge

66:                                               ; preds = %61
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef 0) #7
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef 1) #7
  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) %67, ptr noundef nonnull align 8 dereferenceable(8) %68) #7
  br label %.critedge

.critedge:                                        ; preds = %66, %61
  %69 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %.03142
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef 0) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 8 dereferenceable(8) %70)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef 0) #7
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 8 dereferenceable(8) %71)
  %72 = add nuw nsw i64 %.03142, 1
  %73 = load i64, ptr @N, align 8, !tbaa !8
  %74 = icmp slt i64 %72, %73
  br i1 %74, label %.lr.ph43, label %.critedge._crit_edge, !llvm.loop !24

.lr.ph46:                                         ; preds = %.critedge._crit_edge, %83
  %75 = phi i64 [ %84, %83 ], [ %48, %.critedge._crit_edge ]
  %76 = phi i8 [ %85, %83 ], [ %.pre56, %.critedge._crit_edge ]
  %.044 = phi i64 [ %86, %83 ], [ 0, %.critedge._crit_edge ]
  %77 = trunc nuw i8 %76 to i1
  br i1 %77, label %78, label %._crit_edge47

78:                                               ; preds = %.lr.ph46
  %79 = getelementptr inbounds [200000 x i64], ptr @C, i64 0, i64 %.044
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = icmp eq i64 %80, -1
  br i1 %81, label %82, label %83

82:                                               ; preds = %78
  call void @_Z3dfsxx(i64 noundef %.044, i64 noundef 0)
  %.pre = load i8, ptr @good, align 1, !tbaa !11, !range !23
  %.pre55 = load i64, ptr @N, align 8, !tbaa !8
  br label %83

83:                                               ; preds = %78, %82
  %84 = phi i64 [ %75, %78 ], [ %.pre55, %82 ]
  %85 = phi i8 [ %76, %78 ], [ %.pre, %82 ]
  %86 = add nuw nsw i64 %.044, 1
  %87 = icmp slt i64 %86, %84
  br i1 %87, label %.lr.ph46, label %._crit_edge47, !llvm.loop !25

._crit_edge47:                                    ; preds = %83, %.lr.ph46, %.critedge._crit_edge
  %88 = phi i8 [ %.pre56, %.critedge._crit_edge ], [ %85, %83 ], [ %76, %.lr.ph46 ]
  %89 = trunc nuw i8 %88 to i1
  %.str.4..str = select i1 %89, ptr @.str.4, ptr @.str
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph41, %._crit_edge47
  %.str.4.sink = phi ptr [ %.str.4..str, %._crit_edge47 ], [ @.str, %.lr.ph41 ]
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.4.sink)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %90, i8 noundef signext 10)
  %92 = load i64, ptr @T, align 8, !tbaa !8
  %93 = add nsw i64 %92, -1
  store i64 %93, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %92, 0
  br i1 %.not, label %._crit_edge52, label %.lr.ph51

._crit_edge52:                                    ; preds = %.loopexit, %0
  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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

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

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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 = !{!12, !12, i64 0}
!12 = !{!"bool", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !9, i64 0}
!16 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!17 = !{!16, !9, i64 8}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = !{!22, !22, i64 0}
!22 = !{!"int", !10, i64 0}
!23 = !{i8 0, i8 2}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass