; LLVM IR from eyangch/competitive-programming :: Codeforces/1615 (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<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, 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" }
%"struct.std::pair" = type { i64, i64 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@X = external dso_local global [200000 x i64], align 16
@Y = external dso_local global [200000 x i64], align 16
@V = external dso_local global [200000 x i64], align 16
@aV = external dso_local global [200000 x i64], align 16
@A = external dso_local global [200000 x i64], align 16
@B = external dso_local global [200000 x i64], align 16
@P = external dso_local global [200000 x i64], align 16
@r = external dso_local global [200000 x i64], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@sad = 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.2 = 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 %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %12 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %14
  %16 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  %17 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %18 = 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 %19

19:                                               ; preds = %214, %0
  %20 = load i64, ptr @T, align 8, !tbaa !8
  %21 = add nsw i64 %20, -1
  store i64 %21, ptr @T, align 8, !tbaa !8
  %22 = icmp ne i64 %20, 0
  br i1 %22, label %23, label %215

23:                                               ; preds = %19
  %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) @N)
  %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) @M)
  store i8 0, ptr @sad, 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 %26

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

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

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

34:                                               ; preds = %31
  %35 = load i64, ptr %2, align 8, !tbaa !8
  %36 = add nsw i64 %35, 1
  store i64 %36, ptr %2, align 8, !tbaa !8
  br label %26, !llvm.loop !13

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

38:                                               ; preds = %93, %37
  %39 = load i64, ptr %3, align 8, !tbaa !8
  %40 = load i64, ptr @N, align 8, !tbaa !8
  %41 = sub nsw i64 %40, 1
  %42 = icmp slt i64 %39, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %38
  %45 = load i64, ptr %3, align 8, !tbaa !8
  %46 = getelementptr inbounds [200000 x i64], ptr @X, i64 0, i64 %45
  %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) %46)
  %48 = load i64, ptr %3, align 8, !tbaa !8
  %49 = getelementptr inbounds [200000 x i64], ptr @Y, i64 0, i64 %48
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(8) %49)
  %51 = load i64, ptr %3, align 8, !tbaa !8
  %52 = getelementptr inbounds [200000 x i64], ptr @V, i64 0, i64 %51
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(8) %52)
  %54 = load i64, ptr %3, align 8, !tbaa !8
  %55 = getelementptr inbounds [200000 x i64], ptr @X, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !8
  %57 = add nsw i64 %56, -1
  store i64 %57, ptr %55, align 8, !tbaa !8
  %58 = load i64, ptr %3, align 8, !tbaa !8
  %59 = getelementptr inbounds [200000 x i64], ptr @Y, i64 0, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !8
  %61 = add nsw i64 %60, -1
  store i64 %61, ptr %59, align 8, !tbaa !8
  %62 = load i64, ptr %3, align 8, !tbaa !8
  %63 = getelementptr inbounds [200000 x i64], ptr @V, i64 0, i64 %62
  %64 = load i64, ptr %63, align 8, !tbaa !8
  %65 = icmp ne i64 %64, -1
  br i1 %65, label %66, label %92

66:                                               ; preds = %44
  %67 = load i64, ptr %3, align 8, !tbaa !8
  %68 = getelementptr inbounds [200000 x i64], ptr @V, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !8
  %70 = trunc i64 %69 to i32
  %71 = call i32 @llvm.ctpop.i32(i32 %70)
  %72 = srem i32 %71, 2
  %73 = sext i32 %72 to i64
  %74 = load i64, ptr %3, align 8, !tbaa !8
  %75 = getelementptr inbounds [200000 x i64], ptr @aV, i64 0, i64 %74
  store i64 %73, ptr %75, align 8, !tbaa !8
  %76 = load i64, ptr %3, align 8, !tbaa !8
  %77 = getelementptr inbounds [200000 x i64], ptr @X, i64 0, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !8
  %79 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %78
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #7
  %80 = load i64, ptr %3, align 8, !tbaa !8
  %81 = getelementptr inbounds [200000 x i64], ptr @Y, i64 0, i64 %80
  %82 = load i64, ptr %3, align 8, !tbaa !8
  %83 = getelementptr inbounds [200000 x i64], ptr @aV, i64 0, i64 %82
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %83)
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %79, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  %84 = load i64, ptr %3, align 8, !tbaa !8
  %85 = getelementptr inbounds [200000 x i64], ptr @Y, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !8
  %87 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %86
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  %88 = load i64, ptr %3, align 8, !tbaa !8
  %89 = getelementptr inbounds [200000 x i64], ptr @X, i64 0, i64 %88
  %90 = load i64, ptr %3, align 8, !tbaa !8
  %91 = getelementptr inbounds [200000 x i64], ptr @aV, i64 0, i64 %90
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull align 8 dereferenceable(8) %91)
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %92

92:                                               ; preds = %66, %44
  br label %93

93:                                               ; preds = %92
  %94 = load i64, ptr %3, align 8, !tbaa !8
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %3, align 8, !tbaa !8
  br label %38, !llvm.loop !15

96:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !8
  br label %97

97:                                               ; preds = %136, %96
  %98 = load i64, ptr %6, align 8, !tbaa !8
  %99 = load i64, ptr @M, align 8, !tbaa !8
  %100 = icmp slt i64 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %139

102:                                              ; preds = %97
  %103 = load i64, ptr %6, align 8, !tbaa !8
  %104 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %103
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %104)
  %106 = load i64, ptr %6, align 8, !tbaa !8
  %107 = getelementptr inbounds [200000 x i64], ptr @B, i64 0, i64 %106
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %105, ptr noundef nonnull align 8 dereferenceable(8) %107)
  %109 = load i64, ptr %6, align 8, !tbaa !8
  %110 = getelementptr inbounds [200000 x i64], ptr @P, i64 0, i64 %109
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %108, ptr noundef nonnull align 8 dereferenceable(8) %110)
  %112 = load i64, ptr %6, align 8, !tbaa !8
  %113 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !8
  %115 = add nsw i64 %114, -1
  store i64 %115, ptr %113, align 8, !tbaa !8
  %116 = load i64, ptr %6, align 8, !tbaa !8
  %117 = getelementptr inbounds [200000 x i64], ptr @B, i64 0, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !8
  %119 = add nsw i64 %118, -1
  store i64 %119, ptr %117, align 8, !tbaa !8
  %120 = load i64, ptr %6, align 8, !tbaa !8
  %121 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !8
  %123 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %122
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  %124 = load i64, ptr %6, align 8, !tbaa !8
  %125 = getelementptr inbounds [200000 x i64], ptr @B, i64 0, i64 %124
  %126 = load i64, ptr %6, align 8, !tbaa !8
  %127 = getelementptr inbounds [200000 x i64], ptr @P, i64 0, i64 %126
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull align 8 dereferenceable(8) %127)
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %123, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  %128 = load i64, ptr %6, align 8, !tbaa !8
  %129 = getelementptr inbounds [200000 x i64], ptr @B, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !8
  %131 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %130
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %132 = load i64, ptr %6, align 8, !tbaa !8
  %133 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %132
  %134 = load i64, ptr %6, align 8, !tbaa !8
  %135 = getelementptr inbounds [200000 x i64], ptr @P, i64 0, i64 %134
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull align 8 dereferenceable(8) %135)
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %131, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %136

136:                                              ; preds = %102
  %137 = load i64, ptr %6, align 8, !tbaa !8
  %138 = add nsw i64 %137, 1
  store i64 %138, ptr %6, align 8, !tbaa !8
  br label %97, !llvm.loop !16

139:                                              ; preds = %101
  %140 = load i64, ptr @N, align 8, !tbaa !8
  %141 = getelementptr inbounds i64, ptr @r, i64 %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 -1, ptr %9, align 4, !tbaa !17
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @r, ptr noundef %141, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !8
  br label %142

142:                                              ; preds = %155, %139
  %143 = load i64, ptr %10, align 8, !tbaa !8
  %144 = load i64, ptr @N, align 8, !tbaa !8
  %145 = icmp slt i64 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %158

147:                                              ; preds = %142
  %148 = load i64, ptr %10, align 8, !tbaa !8
  %149 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %148
  %150 = load i64, ptr %149, align 8, !tbaa !8
  %151 = icmp eq i64 %150, -1
  br i1 %151, label %152, label %154

152:                                              ; preds = %147
  %153 = load i64, ptr %10, align 8, !tbaa !8
  call void @_Z3dfsxx(i64 noundef %153, i64 noundef 0)
  br label %154

154:                                              ; preds = %152, %147
  br label %155

155:                                              ; preds = %154
  %156 = load i64, ptr %10, align 8, !tbaa !8
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %10, align 8, !tbaa !8
  br label %142, !llvm.loop !19

158:                                              ; preds = %146
  %159 = load i8, ptr @sad, align 1, !tbaa !11, !range !20, !noundef !21
  %160 = trunc i8 %159 to i1
  br i1 %160, label %161, label %164

161:                                              ; preds = %158
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %162, i8 noundef signext 10)
  br label %214

164:                                              ; preds = %158
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %165, i8 noundef signext 10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %167

167:                                              ; preds = %210, %164
  %168 = load i64, ptr %11, align 8, !tbaa !8
  %169 = load i64, ptr @N, align 8, !tbaa !8
  %170 = sub nsw i64 %169, 1
  %171 = icmp slt i64 %168, %170
  br i1 %171, label %173, label %172

172:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %213

173:                                              ; preds = %167
  %174 = load i64, ptr %11, align 8, !tbaa !8
  %175 = getelementptr inbounds [200000 x i64], ptr @X, i64 0, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !8
  %177 = add nsw i64 %176, 1
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %177)
  %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 32)
  %180 = load i64, ptr %11, align 8, !tbaa !8
  %181 = getelementptr inbounds [200000 x i64], ptr @Y, i64 0, i64 %180
  %182 = load i64, ptr %181, align 8, !tbaa !8
  %183 = add nsw i64 %182, 1
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %179, i64 noundef %183)
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %184, i8 noundef signext 32)
  %186 = load i64, ptr %11, align 8, !tbaa !8
  %187 = getelementptr inbounds [200000 x i64], ptr @V, i64 0, i64 %186
  %188 = load i64, ptr %187, align 8, !tbaa !8
  %189 = icmp eq i64 %188, -1
  br i1 %189, label %190, label %202

190:                                              ; preds = %173
  %191 = load i64, ptr %11, align 8, !tbaa !8
  %192 = getelementptr inbounds [200000 x i64], ptr @X, i64 0, i64 %191
  %193 = load i64, ptr %192, align 8, !tbaa !8
  %194 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !8
  %196 = load i64, ptr %11, align 8, !tbaa !8
  %197 = getelementptr inbounds [200000 x i64], ptr @Y, i64 0, i64 %196
  %198 = load i64, ptr %197, align 8, !tbaa !8
  %199 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !8
  %201 = xor i64 %195, %200
  br label %206

202:                                              ; preds = %173
  %203 = load i64, ptr %11, align 8, !tbaa !8
  %204 = getelementptr inbounds [200000 x i64], ptr @V, i64 0, i64 %203
  %205 = load i64, ptr %204, align 8, !tbaa !8
  br label %206

206:                                              ; preds = %202, %190
  %207 = phi i64 [ %201, %190 ], [ %205, %202 ]
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %185, i64 noundef %207)
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %208, i8 noundef signext 10)
  br label %210

210:                                              ; preds = %206
  %211 = load i64, ptr %11, align 8, !tbaa !8
  %212 = add nsw i64 %211, 1
  store i64 %212, ptr %11, align 8, !tbaa !8
  br label %167, !llvm.loop !22

213:                                              ; preds = %172
  br label %214

214:                                              ; preds = %213, %161
  br label %19, !llvm.loop !23

215:                                              ; preds = %19
  %216 = load i32, ptr %1, align 4
  ret i32 %216
}

; 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 @_ZNSt6vectorISt4pairIxxESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctpop.i32(i32) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

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

; 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) #6

; 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) #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #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 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !10, i64 0}
!19 = distinct !{!19, !14}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !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"

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

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@X = external dso_local global [200000 x i64], align 16
@Y = external dso_local global [200000 x i64], align 16
@V = external dso_local global [200000 x i64], align 16
@aV = external dso_local global [200000 x i64], align 16
@A = external dso_local global [200000 x i64], align 16
@B = external dso_local global [200000 x i64], align 16
@P = external dso_local global [200000 x i64], align 16
@r = external dso_local global [200000 x i64], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@sad = 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.2 = 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 %"struct.std::pair", align 8
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %12 = 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)
  %13 = load i64, ptr @T, align 8, !tbaa !8
  %14 = add nsw i64 %13, -1
  store i64 %14, ptr @T, align 8, !tbaa !8
  %.not65 = icmp eq i64 %13, 0
  br i1 %.not65, label %._crit_edge68, label %.lr.ph67

.lr.ph67:                                         ; preds = %0, %.loopexit
  %15 = 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)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) @M)
  store i8 0, ptr @sad, align 1, !tbaa !11
  %17 = load i64, ptr @N, align 8, !tbaa !8
  %18 = icmp sgt i64 %17, 0
  br i1 %18, label %.lr.ph, label %.preheader

.preheader52:                                     ; preds = %.lr.ph
  %19 = icmp sgt i64 %22, 1
  br i1 %19, label %.lr.ph55, label %.preheader

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

.preheader:                                       ; preds = %47, %.lr.ph67, %.preheader52
  %24 = phi i64 [ %22, %.preheader52 ], [ %17, %.lr.ph67 ], [ %49, %47 ]
  %25 = load i64, ptr @M, align 8, !tbaa !8
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph57, label %._crit_edge

.lr.ph55:                                         ; preds = %.preheader52, %47
  %.04754 = phi i64 [ %48, %47 ], [ 0, %.preheader52 ]
  %27 = getelementptr inbounds [200000 x i64], ptr @X, i64 0, i64 %.04754
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %29 = getelementptr inbounds [200000 x i64], ptr @Y, i64 0, i64 %.04754
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %31 = getelementptr inbounds [200000 x i64], ptr @V, i64 0, i64 %.04754
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(8) %31)
  %33 = load i64, ptr %27, align 8, !tbaa !8
  %34 = add nsw i64 %33, -1
  store i64 %34, ptr %27, align 8, !tbaa !8
  %35 = load i64, ptr %29, align 8, !tbaa !8
  %36 = add nsw i64 %35, -1
  store i64 %36, ptr %29, align 8, !tbaa !8
  %37 = load i64, ptr %31, align 8, !tbaa !8
  %.not51 = icmp eq i64 %37, -1
  br i1 %.not51, label %47, label %38

38:                                               ; preds = %.lr.ph55
  %39 = trunc i64 %37 to i32
  %40 = call range(i32 0, 33) i32 @llvm.ctpop.i32(i32 %39)
  %41 = and i32 %40, 1
  %42 = zext nneg i32 %41 to i64
  %43 = getelementptr inbounds [200000 x i64], ptr @aV, i64 0, i64 %.04754
  store i64 %42, ptr %43, align 8, !tbaa !8
  %44 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %34
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %43)
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #7
  %45 = load i64, ptr %29, align 8, !tbaa !8
  %46 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %45
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %43)
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(16) %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  br label %47

47:                                               ; preds = %.lr.ph55, %38
  %48 = add nuw nsw i64 %.04754, 1
  %49 = load i64, ptr @N, align 8, !tbaa !8
  %50 = add nsw i64 %49, -1
  %51 = icmp slt i64 %48, %50
  br i1 %51, label %.lr.ph55, label %.preheader, !llvm.loop !15

._crit_edge.loopexit:                             ; preds = %.lr.ph57
  %.pre = load i64, ptr @N, align 8, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %52 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %24, %.preheader ]
  %53 = getelementptr inbounds i64, ptr @r, i64 %52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 -1, ptr %5, align 4, !tbaa !16
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @r, ptr noundef nonnull %53, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %54 = load i64, ptr @N, align 8, !tbaa !8
  %55 = icmp sgt i64 %54, 0
  br i1 %55, label %.lr.ph60, label %._crit_edge61

.lr.ph57:                                         ; preds = %.preheader, %.lr.ph57
  %.04656 = phi i64 [ %69, %.lr.ph57 ], [ 0, %.preheader ]
  %56 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %.04656
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %56)
  %58 = getelementptr inbounds [200000 x i64], ptr @B, i64 0, i64 %.04656
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 8 dereferenceable(8) %58)
  %60 = getelementptr inbounds [200000 x i64], ptr @P, i64 0, i64 %.04656
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 8 dereferenceable(8) %60)
  %62 = load i64, ptr %56, align 8, !tbaa !8
  %63 = add nsw i64 %62, -1
  store i64 %63, ptr %56, align 8, !tbaa !8
  %64 = load i64, ptr %58, align 8, !tbaa !8
  %65 = add nsw i64 %64, -1
  store i64 %65, ptr %58, align 8, !tbaa !8
  %66 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %63
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 8 dereferenceable(8) %60)
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %67 = load i64, ptr %58, align 8, !tbaa !8
  %68 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %67
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(8) %60)
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  %69 = add nuw nsw i64 %.04656, 1
  %70 = load i64, ptr @M, align 8, !tbaa !8
  %71 = icmp slt i64 %69, %70
  br i1 %71, label %.lr.ph57, label %._crit_edge.loopexit, !llvm.loop !18

._crit_edge61:                                    ; preds = %79, %._crit_edge
  %72 = load i8, ptr @sad, align 1, !tbaa !11, !range !19, !noundef !20
  %73 = trunc nuw i8 %72 to i1
  br i1 %73, label %83, label %86

.lr.ph60:                                         ; preds = %._crit_edge, %79
  %74 = phi i64 [ %80, %79 ], [ %54, %._crit_edge ]
  %.04558 = phi i64 [ %81, %79 ], [ 0, %._crit_edge ]
  %75 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %.04558
  %76 = load i64, ptr %75, align 8, !tbaa !8
  %77 = icmp eq i64 %76, -1
  br i1 %77, label %78, label %79

78:                                               ; preds = %.lr.ph60
  call void @_Z3dfsxx(i64 noundef %.04558, i64 noundef 0)
  %.pre69 = load i64, ptr @N, align 8, !tbaa !8
  br label %79

79:                                               ; preds = %.lr.ph60, %78
  %80 = phi i64 [ %74, %.lr.ph60 ], [ %.pre69, %78 ]
  %81 = add nuw nsw i64 %.04558, 1
  %82 = icmp slt i64 %81, %80
  br i1 %82, label %.lr.ph60, label %._crit_edge61, !llvm.loop !21

83:                                               ; preds = %._crit_edge61
  %84 = 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)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %84, i8 noundef signext 10)
  br label %.loopexit

86:                                               ; preds = %._crit_edge61
  %87 = 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.2)
  %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)
  %89 = load i64, ptr @N, align 8, !tbaa !8
  %90 = icmp sgt i64 %89, 1
  br i1 %90, label %.lr.ph64, label %.loopexit

.lr.ph64:                                         ; preds = %86, %112
  %.062 = phi i64 [ %116, %112 ], [ 0, %86 ]
  %91 = getelementptr inbounds [200000 x i64], ptr @X, i64 0, i64 %.062
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = add nsw i64 %92, 1
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %93)
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %94, i8 noundef signext 32)
  %96 = getelementptr inbounds [200000 x i64], ptr @Y, i64 0, i64 %.062
  %97 = load i64, ptr %96, align 8, !tbaa !8
  %98 = add nsw i64 %97, 1
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %95, i64 noundef %98)
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %99, i8 noundef signext 32)
  %101 = getelementptr inbounds [200000 x i64], ptr @V, i64 0, i64 %.062
  %102 = load i64, ptr %101, align 8, !tbaa !8
  %103 = icmp eq i64 %102, -1
  br i1 %103, label %104, label %112

104:                                              ; preds = %.lr.ph64
  %105 = load i64, ptr %91, align 8, !tbaa !8
  %106 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !8
  %108 = load i64, ptr %96, align 8, !tbaa !8
  %109 = getelementptr inbounds [200000 x i64], ptr @r, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !8
  %111 = xor i64 %110, %107
  br label %112

112:                                              ; preds = %.lr.ph64, %104
  %113 = phi i64 [ %111, %104 ], [ %102, %.lr.ph64 ]
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %100, i64 noundef %113)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %114, i8 noundef signext 10)
  %116 = add nuw nsw i64 %.062, 1
  %117 = load i64, ptr @N, align 8, !tbaa !8
  %118 = add nsw i64 %117, -1
  %119 = icmp slt i64 %116, %118
  br i1 %119, label %.lr.ph64, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %112, %86, %83
  %120 = load i64, ptr @T, align 8, !tbaa !8
  %121 = add nsw i64 %120, -1
  store i64 %121, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %120, 0
  br i1 %.not, label %._crit_edge68, label %.lr.ph67, !llvm.loop !23

._crit_edge68:                                    ; 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 @_ZNSt6vectorISt4pairIxxESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctpop.i32(i32) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; 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 #6

; 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 #6

; 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #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 = distinct !{!15, !14}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !10, i64 0}
!18 = distinct !{!18, !14}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


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