; LLVM IR from tangjz/acm-icpc :: 51nod (1815)

; 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 { i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@S = external dso_local global i32, align 4
@a = external dso_local global [400001 x i32], align 16
@tot = external dso_local global i32, align 4
@seq = external dso_local global [400001 x i32], align 16
@scc = external dso_local global [400001 x i32], align 16
@deg = external dso_local global [400001 x i32], align 16
@que = external dso_local global [400001 x i32], align 16
@L = external dso_local global i32, align 4
@R = external dso_local global i32, align 4
@out = external dso_local global [400001 x i32], align 16
@val = external dso_local global [400001 x %"struct.std::pair"], align 16
@ans = external dso_local global [400001 x %"struct.std::pair"], align 16
@e = external dso_local global [400001 x %"class.std::vector"], align 16
@g = external dso_local global [400001 x %"class.std::vector"], align 16
@vis = external dso_local global [400001 x i8], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4dfs1i(i32 noundef) #1

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4dfs2i(i32 noundef) #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %"struct.std::pair", align 4
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca i32, align 4
  %33 = alloca %"struct.std::pair", align 4
  %34 = alloca %"struct.std::pair", align 4
  %35 = alloca %"struct.std::pair", align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @q, ptr noundef @S)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %49, %0
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %52

44:                                               ; preds = %39
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr @a, i64 %46
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %47)
  br label %49

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

52:                                               ; preds = %43
  br label %53

53:                                               ; preds = %57, %52
  %54 = load i32, ptr @m, align 4, !tbaa !5
  %55 = add nsw i32 %54, -1
  store i32 %55, ptr @m, align 4, !tbaa !5
  %56 = icmp ne i32 %54, 0
  br i1 %56, label %57, label %65

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  %58 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %3, ptr noundef %4)
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @e, i64 0, i64 %60
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %63
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %53, !llvm.loop !11

65:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %80, %65
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = load i32, ptr @n, align 4, !tbaa !5
  %69 = icmp sle i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %83

71:                                               ; preds = %66
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [400001 x i8], ptr @vis, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !12, !range !14, !noundef !15
  %76 = trunc i8 %75 to i1
  br i1 %76, label %79, label %77

77:                                               ; preds = %71
  %78 = load i32, ptr %5, align 4, !tbaa !5
  call void @_Z4dfs1i(i32 noundef %78)
  br label %79

79:                                               ; preds = %77, %71
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %5, align 4, !tbaa !5
  br label %66, !llvm.loop !16

83:                                               ; preds = %70
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  %84 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %84, ptr %6, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %110, %83
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = icmp sge i32 %86, 1
  br i1 %87, label %89, label %88

88:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %113

89:                                               ; preds = %85
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [400001 x i32], ptr @seq, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %109, label %98

98:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 -1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 -1, ptr %9, align 4, !tbaa !5
  %99 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %99, ptr %7, align 4
  %100 = load i32, ptr @tot, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr @tot, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @val, i64 0, i64 %102
  %104 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %103, ptr noundef nonnull align 4 dereferenceable(8) %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [400001 x i32], ptr @seq, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  call void @_Z4dfs2i(i32 noundef %108)
  br label %109

109:                                              ; preds = %98, %89
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = add nsw i32 %111, -1
  store i32 %112, ptr %6, align 4, !tbaa !5
  br label %85, !llvm.loop !17

113:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %134, %113
  %115 = load i32, ptr %10, align 4, !tbaa !5
  %116 = load i32, ptr @tot, align 4, !tbaa !5
  %117 = icmp sle i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %137

119:                                              ; preds = %114
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [400001 x i8], ptr @vis, i64 0, i64 %121
  store i8 0, ptr %122, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #9
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %124
  call void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %125) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 -1, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 -1, ptr %14, align 4, !tbaa !5
  %126 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %126, ptr %12, align 4
  %127 = load i32, ptr %10, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %128
  %130 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %129, ptr noundef nonnull align 4 dereferenceable(8) %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %132
  store i32 -1, ptr %133, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %119
  %135 = load i32, ptr %10, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %10, align 4, !tbaa !5
  br label %114, !llvm.loop !18

137:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %183, %137
  %139 = load i32, ptr %15, align 4, !tbaa !5
  %140 = load i32, ptr @n, align 4, !tbaa !5
  %141 = icmp sle i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 16, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %186

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %144 = load i32, ptr %15, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @e, i64 0, i64 %145
  %147 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %146) #9
  %148 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %147, ptr %148, align 8
  br label %149

149:                                              ; preds = %180, %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %150 = load i32, ptr %15, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @e, i64 0, i64 %151
  %153 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %152) #9
  %154 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  %155 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br i1 %155, label %157, label %156

156:                                              ; preds = %149
  store i32 19, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %182

157:                                              ; preds = %149
  %158 = load i32, ptr %15, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = icmp ne i32 %161, %166
  br i1 %167, label %168, label %179

168:                                              ; preds = %157
  %169 = load i32, ptr %15, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %173
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %177
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %174, ptr noundef nonnull align 4 dereferenceable(4) %178)
  br label %179

179:                                              ; preds = %168, %157
  br label %180

180:                                              ; preds = %179
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  br label %149, !llvm.loop !19

182:                                              ; preds = %156
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %15, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %15, align 4, !tbaa !5
  br label %138, !llvm.loop !20

186:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %187

187:                                              ; preds = %246, %186
  %188 = load i32, ptr %19, align 4, !tbaa !5
  %189 = load i32, ptr @tot, align 4, !tbaa !5
  %190 = icmp sle i32 %188, %189
  br i1 %190, label %192, label %191

191:                                              ; preds = %187
  store i32 22, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %249

192:                                              ; preds = %187
  %193 = load i32, ptr %19, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %194
  %196 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %195) #9
  %197 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %196, ptr %197, align 8
  %198 = load i32, ptr %19, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %199
  %201 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %200) #9
  %202 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %201, ptr %202, align 8
  %203 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8
  %205 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %206 = load ptr, ptr %205, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %204, ptr %206)
  %207 = load i32, ptr %19, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %208
  %210 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %209) #9
  %211 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %210, ptr %211, align 8
  %212 = load i32, ptr %19, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %213
  %215 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %214) #9
  %216 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %215, ptr %216, align 8
  %217 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8
  %219 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8
  %221 = call ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %218, ptr %220)
  %222 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %221, ptr %222, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %223 = load i32, ptr %19, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %224
  %226 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %225) #9
  %227 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %226, ptr %227, align 8
  br label %228

228:                                              ; preds = %243, %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %229 = load i32, ptr %19, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %230
  %232 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %231) #9
  %233 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %232, ptr %233, align 8
  %234 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br i1 %234, label %236, label %235

235:                                              ; preds = %228
  store i32 25, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %245

236:                                              ; preds = %228
  %237 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [400001 x i32], ptr @deg, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %240, align 4, !tbaa !5
  br label %243

243:                                              ; preds = %236
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  br label %228, !llvm.loop !21

245:                                              ; preds = %235
  br label %246

246:                                              ; preds = %245
  %247 = load i32, ptr %19, align 4, !tbaa !5
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %19, align 4, !tbaa !5
  br label %187, !llvm.loop !22

249:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  store i32 1, ptr %27, align 4, !tbaa !5
  br label %250

250:                                              ; preds = %268, %249
  %251 = load i32, ptr %27, align 4, !tbaa !5
  %252 = load i32, ptr @tot, align 4, !tbaa !5
  %253 = icmp sle i32 %251, %252
  br i1 %253, label %255, label %254

254:                                              ; preds = %250
  store i32 28, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %271

255:                                              ; preds = %250
  %256 = load i32, ptr %27, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [400001 x i32], ptr @deg, i64 0, i64 %257
  %259 = load i32, ptr %258, align 4, !tbaa !5
  %260 = icmp ne i32 %259, 0
  br i1 %260, label %267, label %261

261:                                              ; preds = %255
  %262 = load i32, ptr %27, align 4, !tbaa !5
  %263 = load i32, ptr @R, align 4, !tbaa !5
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr @R, align 4, !tbaa !5
  %265 = sext i32 %263 to i64
  %266 = getelementptr inbounds [400001 x i32], ptr @que, i64 0, i64 %265
  store i32 %262, ptr %266, align 4, !tbaa !5
  br label %267

267:                                              ; preds = %261, %255
  br label %268

268:                                              ; preds = %267
  %269 = load i32, ptr %27, align 4, !tbaa !5
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %27, align 4, !tbaa !5
  br label %250, !llvm.loop !23

271:                                              ; preds = %254
  br label %272

272:                                              ; preds = %369, %271
  %273 = load i32, ptr @L, align 4, !tbaa !5
  %274 = load i32, ptr @R, align 4, !tbaa !5
  %275 = icmp slt i32 %273, %274
  br i1 %275, label %276, label %370

276:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  %277 = load i32, ptr @L, align 4, !tbaa !5
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr @L, align 4, !tbaa !5
  %279 = sext i32 %277 to i64
  %280 = getelementptr inbounds [400001 x i32], ptr @que, i64 0, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !5
  store i32 %281, ptr %28, align 4, !tbaa !5
  %282 = load i32, ptr %28, align 4, !tbaa !5
  %283 = load i32, ptr @S, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %284
  %286 = load i32, ptr %285, align 4, !tbaa !5
  %287 = icmp eq i32 %282, %286
  br i1 %287, label %295, label %288

288:                                              ; preds = %276
  %289 = load i32, ptr %28, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %290
  %292 = getelementptr inbounds %"struct.std::pair", ptr %291, i32 0, i32 0
  %293 = load i32, ptr %292, align 8, !tbaa !24
  %294 = icmp ne i32 %293, -1
  br i1 %294, label %295, label %311

295:                                              ; preds = %288, %276
  %296 = load i32, ptr %28, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %297
  %299 = load i32, ptr %28, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @val, i64 0, i64 %300
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 8 %301, i64 8, i1 false)
  %302 = load i64, ptr %29, align 4
  call void @_Z5mergeRSt4pairIiiES0_b(ptr noundef nonnull align 4 dereferenceable(8) %298, i64 %302, i1 noundef zeroext false)
  %303 = load i32, ptr %28, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %304
  %306 = load i32, ptr %28, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @val, i64 0, i64 %307
  %309 = getelementptr inbounds %"struct.std::pair", ptr %308, i32 0, i32 1
  %310 = load i32, ptr %309, align 4, !tbaa !26
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %305, i32 noundef %310)
  br label %311

311:                                              ; preds = %295, %288
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %312 = load i32, ptr %28, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %313
  %315 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %314) #9
  %316 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %315, ptr %316, align 8
  br label %317

317:                                              ; preds = %367, %311
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %318 = load i32, ptr %28, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %319
  %321 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %320) #9
  %322 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %321, ptr %322, align 8
  %323 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  br i1 %323, label %325, label %324

324:                                              ; preds = %317
  store i32 33, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  br label %369

325:                                              ; preds = %317
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %326 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  %327 = load i32, ptr %326, align 4, !tbaa !5
  store i32 %327, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  %328 = load i32, ptr %28, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %329
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 8 %330, i64 8, i1 false)
  %331 = load i32, ptr %32, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @val, i64 0, i64 %332
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %333, i64 8, i1 false)
  %334 = load i64, ptr %34, align 4
  call void @_Z5mergeRSt4pairIiiES0_b(ptr noundef nonnull align 4 dereferenceable(8) %33, i64 %334, i1 noundef zeroext true)
  %335 = load i32, ptr %32, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %336
  %338 = getelementptr inbounds %"struct.std::pair", ptr %33, i32 0, i32 1
  %339 = load i32, ptr %338, align 4, !tbaa !26
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %337, i32 noundef %339)
  %340 = load i32, ptr %32, align 4, !tbaa !5
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %341
  %343 = load i32, ptr %28, align 4, !tbaa !5
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %344
  %346 = load i32, ptr %345, align 4, !tbaa !5
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %342, i32 noundef %346)
  %347 = load i32, ptr %32, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %348
  %350 = load i32, ptr %28, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %351
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 8 %352, i64 8, i1 false)
  %353 = load i64, ptr %35, align 4
  call void @_Z5mergeRSt4pairIiiES0_b(ptr noundef nonnull align 4 dereferenceable(8) %349, i64 %353, i1 noundef zeroext false)
  %354 = load i32, ptr %32, align 4, !tbaa !5
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds [400001 x i32], ptr @deg, i64 0, i64 %355
  %357 = load i32, ptr %356, align 4, !tbaa !5
  %358 = add nsw i32 %357, -1
  store i32 %358, ptr %356, align 4, !tbaa !5
  %359 = icmp ne i32 %358, 0
  br i1 %359, label %366, label %360

360:                                              ; preds = %325
  %361 = load i32, ptr %32, align 4, !tbaa !5
  %362 = load i32, ptr @R, align 4, !tbaa !5
  %363 = add nsw i32 %362, 1
  store i32 %363, ptr @R, align 4, !tbaa !5
  %364 = sext i32 %362 to i64
  %365 = getelementptr inbounds [400001 x i32], ptr @que, i64 0, i64 %364
  store i32 %361, ptr %365, align 4, !tbaa !5
  br label %366

366:                                              ; preds = %360, %325
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %367

367:                                              ; preds = %366
  %368 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  br label %317, !llvm.loop !27

369:                                              ; preds = %324
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %272, !llvm.loop !28

370:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  store i32 1, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  br label %371

371:                                              ; preds = %393, %370
  %372 = load i32, ptr %36, align 4, !tbaa !5
  %373 = load i32, ptr @q, align 4, !tbaa !5
  %374 = icmp sle i32 %372, %373
  br i1 %374, label %376, label %375

375:                                              ; preds = %371
  store i32 36, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %396

376:                                              ; preds = %371
  %377 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %37)
  %378 = load i32, ptr %37, align 4, !tbaa !5
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %379
  %381 = load i32, ptr %380, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %382
  %384 = load i32, ptr %383, align 4, !tbaa !5
  %385 = load i32, ptr %36, align 4, !tbaa !5
  %386 = load i32, ptr @q, align 4, !tbaa !5
  %387 = icmp eq i32 %385, %386
  %388 = zext i1 %387 to i64
  %389 = getelementptr inbounds [3 x i8], ptr @.str.6, i64 0, i64 %388
  %390 = load i8, ptr %389, align 1, !tbaa !29
  %391 = sext i8 %390 to i32
  %392 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %384, i32 noundef %391)
  br label %393

393:                                              ; preds = %376
  %394 = load i32, ptr %36, align 4, !tbaa !5
  %395 = add nsw i32 %394, 1
  store i32 %395, ptr %36, align 4, !tbaa !5
  br label %371, !llvm.loop !30

396:                                              ; preds = %375
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr, ptr) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5mergeRSt4pairIiiES0_b(ptr noundef nonnull align 4 dereferenceable(8), i64, i1 noundef zeroext) #7

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

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

declare i32 @printf(ptr noundef, ...) #5

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

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

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


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

%"struct.std::pair" = type { i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@S = external dso_local global i32, align 4
@a = external dso_local global [400001 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@seq = external dso_local local_unnamed_addr global [400001 x i32], align 16
@scc = external dso_local global [400001 x i32], align 16
@deg = external dso_local local_unnamed_addr global [400001 x i32], align 16
@que = external dso_local local_unnamed_addr global [400001 x i32], align 16
@L = external dso_local local_unnamed_addr global i32, align 4
@R = external dso_local local_unnamed_addr global i32, align 4
@out = external dso_local global [400001 x i32], align 16
@val = external dso_local global [400001 x %"struct.std::pair"], align 16
@ans = external dso_local global [400001 x %"struct.std::pair"], align 16
@e = external dso_local global [400001 x %"class.std::vector"], align 16
@g = external dso_local global [400001 x %"class.std::vector"], align 16
@vis = external dso_local local_unnamed_addr global [400001 x i8], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4dfs1i(i32 noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4dfs2i(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca i32, align 4
  %18 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @q, ptr noundef nonnull @S)
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %.not90 = icmp slt i32 %19, 1
  br i1 %.not90, label %.preheader88, label %.lr.ph

.preheader88:                                     ; preds = %.lr.ph, %0
  %20 = phi i32 [ %19, %0 ], [ %25, %.lr.ph ]
  %21 = load i32, ptr @m, align 4, !tbaa !5
  %22 = add nsw i32 %21, -1
  store i32 %22, ptr @m, align 4, !tbaa !5
  %.not7192 = icmp eq i32 %21, 0
  br i1 %.not7192, label %.preheader87, label %.lr.ph93

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %23 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %24 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %23)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %.not.not = icmp slt i64 %indvars.iv, %26
  br i1 %.not.not, label %.lr.ph, label %.preheader88, !llvm.loop !9

.preheader87.loopexit:                            ; preds = %.lr.ph93
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader87

.preheader87:                                     ; preds = %.preheader87.loopexit, %.preheader88
  %27 = phi i32 [ %.pre, %.preheader87.loopexit ], [ %20, %.preheader88 ]
  %.not7294 = icmp slt i32 %27, 1
  br i1 %.not7294, label %._crit_edge.thread, label %.lr.ph96

._crit_edge.thread:                               ; preds = %.preheader87
  store i32 0, ptr @tot, align 4, !tbaa !5
  br label %.preheader85

.lr.ph93:                                         ; preds = %.preheader88, %.lr.ph93
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @e, i64 0, i64 %30
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %33
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %35 = load i32, ptr @m, align 4, !tbaa !5
  %36 = add nsw i32 %35, -1
  store i32 %36, ptr @m, align 4, !tbaa !5
  %.not71 = icmp eq i32 %35, 0
  br i1 %.not71, label %.preheader87.loopexit, label %.lr.ph93, !llvm.loop !11

._crit_edge:                                      ; preds = %45
  store i32 0, ptr @tot, align 4, !tbaa !5
  %37 = icmp sgt i32 %46, 0
  br i1 %37, label %.lr.ph99.preheader, label %.preheader85

.lr.ph99.preheader:                               ; preds = %._crit_edge
  %38 = zext nneg i32 %46 to i64
  br label %.lr.ph99

.lr.ph96:                                         ; preds = %.preheader87, %45
  %39 = phi i32 [ %46, %45 ], [ %27, %.preheader87 ]
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %45 ], [ 1, %.preheader87 ]
  %40 = getelementptr inbounds [400001 x i8], ptr @vis, i64 0, i64 %indvars.iv132
  %41 = load i8, ptr %40, align 1, !tbaa !12, !range !14, !noundef !15
  %42 = trunc nuw i8 %41 to i1
  br i1 %42, label %45, label %43

43:                                               ; preds = %.lr.ph96
  %44 = trunc nuw nsw i64 %indvars.iv132 to i32
  call void @_Z4dfs1i(i32 noundef %44)
  %.pre150 = load i32, ptr @n, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %.lr.ph96, %43
  %46 = phi i32 [ %39, %.lr.ph96 ], [ %.pre150, %43 ]
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %47 = sext i32 %46 to i64
  %.not72.not = icmp slt i64 %indvars.iv132, %47
  br i1 %.not72.not, label %.lr.ph96, label %._crit_edge, !llvm.loop !16

.preheader86:                                     ; preds = %61
  %.pre151 = load i32, ptr @tot, align 4, !tbaa !5
  %.not73100 = icmp slt i32 %.pre151, 1
  br i1 %.not73100, label %.preheader85, label %.lr.ph102

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %61
  %indvars.iv135 = phi i64 [ %38, %.lr.ph99.preheader ], [ %indvars.iv.next136, %61 ]
  %48 = getelementptr inbounds [400001 x i32], ptr @seq, i64 0, i64 %indvars.iv135
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %.not82 = icmp eq i32 %52, 0
  br i1 %.not82, label %53, label %61

53:                                               ; preds = %.lr.ph99
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 -1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 -1, ptr %5, align 4, !tbaa !5
  %54 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %54, ptr %3, align 8
  %55 = load i32, ptr @tot, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr @tot, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @val, i64 0, i64 %57
  %59 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %58, ptr noundef nonnull align 4 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %60 = load i32, ptr %48, align 4, !tbaa !5
  call void @_Z4dfs2i(i32 noundef %60)
  br label %61

61:                                               ; preds = %.lr.ph99, %53
  %indvars.iv.next136 = add nsw i64 %indvars.iv135, -1
  %62 = icmp sgt i64 %indvars.iv135, 1
  br i1 %62, label %.lr.ph99, label %.preheader86, !llvm.loop !17

.preheader85:                                     ; preds = %.lr.ph102, %._crit_edge.thread, %._crit_edge, %.preheader86
  %63 = phi i32 [ %.pre151, %.preheader86 ], [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %71, %.lr.ph102 ]
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %.not74106 = icmp slt i32 %64, 1
  br i1 %.not74106, label %.preheader84, label %.lr.ph108

.lr.ph102:                                        ; preds = %.preheader86, %.lr.ph102
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %.lr.ph102 ], [ 1, %.preheader86 ]
  %65 = getelementptr inbounds [400001 x i8], ptr @vis, i64 0, i64 %indvars.iv138
  store i8 0, ptr %65, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %66 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv138
  call void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %66) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 -1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 -1, ptr %9, align 4, !tbaa !5
  %67 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %67, ptr %7, align 8
  %68 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %indvars.iv138
  %69 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %68, ptr noundef nonnull align 4 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %70 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %indvars.iv138
  store i32 -1, ptr %70, align 4, !tbaa !5
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %71 = load i32, ptr @tot, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %.not73.not = icmp slt i64 %indvars.iv138, %72
  br i1 %.not73.not, label %.lr.ph102, label %.preheader85, !llvm.loop !18

.preheader84.loopexit:                            ; preds = %._crit_edge105
  %.pre152 = load i32, ptr @tot, align 4, !tbaa !5
  br label %.preheader84

.preheader84:                                     ; preds = %.preheader84.loopexit, %.preheader85
  %73 = phi i32 [ %.pre152, %.preheader84.loopexit ], [ %63, %.preheader85 ]
  %.not75112 = icmp slt i32 %73, 1
  br i1 %.not75112, label %.preheader83.thread, label %.lr.ph114

.preheader83.thread:                              ; preds = %.preheader84
  %R.promoted159 = load i32, ptr @R, align 4, !tbaa !5
  br label %.preheader

.lr.ph108:                                        ; preds = %.preheader85, %._crit_edge105
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %._crit_edge105 ], [ 1, %.preheader85 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %74 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv141
  %75 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #8
  store ptr %75, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %76 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #8
  store ptr %76, ptr %11, align 8
  %77 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br i1 %77, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %.lr.ph108
  %78 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %indvars.iv141
  br label %81

._crit_edge105:                                   ; preds = %96, %.lr.ph108
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %.not74.not = icmp slt i64 %indvars.iv141, %80
  br i1 %.not74.not, label %.lr.ph108, label %.preheader84.loopexit, !llvm.loop !19

81:                                               ; preds = %.lr.ph104, %96
  %82 = load i32, ptr %78, align 4, !tbaa !5
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %.not81 = icmp eq i32 %82, %87
  br i1 %.not81, label %96, label %88

88:                                               ; preds = %81
  %89 = load i32, ptr %78, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %90
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %94
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %91, ptr noundef nonnull align 4 dereferenceable(4) %95)
  br label %96

96:                                               ; preds = %81, %88
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %98 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %74) #8
  store ptr %98, ptr %11, align 8
  %99 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br i1 %99, label %81, label %._crit_edge105, !llvm.loop !20

.preheader83:                                     ; preds = %._crit_edge111
  %R.promoted = load i32, ptr @R, align 4, !tbaa !5
  %.not76116 = icmp slt i32 %111, 1
  br i1 %.not76116, label %.preheader, label %.lr.ph118.preheader

.lr.ph118.preheader:                              ; preds = %.preheader83
  %100 = zext nneg i32 %111 to i64
  %xtraiter = and i64 %100, 1
  %101 = icmp eq i32 %111, 1
  br i1 %101, label %.preheader.loopexit.unr-lcssa, label %.lr.ph118.preheader.new

.lr.ph118.preheader.new:                          ; preds = %.lr.ph118.preheader
  %unroll_iter = and i64 %100, 2147483646
  br label %.lr.ph118

.lr.ph114:                                        ; preds = %.preheader84, %._crit_edge111
  %indvars.iv144 = phi i64 [ %indvars.iv.next145, %._crit_edge111 ], [ 1, %.preheader84 ]
  %102 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv144
  %103 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  %104 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %103, ptr %104)
  %105 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  %106 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  %107 = call ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr %105, ptr %106)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %108 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  store ptr %108, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %109 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  store ptr %109, ptr %13, align 8
  %110 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br i1 %110, label %.lr.ph110, label %._crit_edge111

._crit_edge111:                                   ; preds = %.lr.ph110, %.lr.ph114
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %111 = load i32, ptr @tot, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %.not75.not = icmp slt i64 %indvars.iv144, %112
  br i1 %.not75.not, label %.lr.ph114, label %.preheader83, !llvm.loop !21

.lr.ph110:                                        ; preds = %.lr.ph114, %.lr.ph110
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [400001 x i32], ptr @deg, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %116, align 4, !tbaa !5
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %120 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  store ptr %120, ptr %13, align 8
  %121 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br i1 %121, label %.lr.ph110, label %._crit_edge111, !llvm.loop !22

.preheader.loopexit.unr-lcssa:                    ; preds = %149, %.lr.ph118.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph118.preheader ], [ %150, %149 ]
  %indvars.iv147.unr = phi i64 [ 1, %.lr.ph118.preheader ], [ %indvars.iv.next148.1, %149 ]
  %.unr = phi i32 [ %R.promoted, %.lr.ph118.preheader ], [ %150, %149 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph118.epil

.lr.ph118.epil:                                   ; preds = %.preheader.loopexit.unr-lcssa
  %122 = getelementptr inbounds [400001 x i32], ptr @deg, i64 0, i64 %indvars.iv147.unr
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %.not80.epil = icmp eq i32 %123, 0
  br i1 %.not80.epil, label %124, label %.preheader

124:                                              ; preds = %.lr.ph118.epil
  %125 = add nsw i32 %.unr, 1
  store i32 %125, ptr @R, align 4, !tbaa !5
  %126 = sext i32 %.unr to i64
  %127 = getelementptr inbounds [400001 x i32], ptr @que, i64 0, i64 %126
  %128 = trunc nuw nsw i64 %indvars.iv147.unr to i32
  store i32 %128, ptr %127, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %124, %.lr.ph118.epil, %.preheader83.thread, %.preheader83
  %129 = phi i32 [ %R.promoted, %.preheader83 ], [ %R.promoted159, %.preheader83.thread ], [ %.lcssa.ph, %.preheader.loopexit.unr-lcssa ], [ %.unr, %.lr.ph118.epil ], [ %125, %124 ]
  %130 = load i32, ptr @L, align 4, !tbaa !5
  %131 = icmp slt i32 %130, %129
  br i1 %131, label %.lr.ph122, label %._crit_edge123

.lr.ph122:                                        ; preds = %.preheader
  %132 = getelementptr inbounds i8, ptr %16, i64 4
  br label %151

.lr.ph118:                                        ; preds = %149, %.lr.ph118.preheader.new
  %indvars.iv147 = phi i64 [ 1, %.lr.ph118.preheader.new ], [ %indvars.iv.next148.1, %149 ]
  %133 = phi i32 [ %R.promoted, %.lr.ph118.preheader.new ], [ %150, %149 ]
  %niter = phi i64 [ 0, %.lr.ph118.preheader.new ], [ %niter.next.1, %149 ]
  %134 = getelementptr inbounds [400001 x i32], ptr @deg, i64 0, i64 %indvars.iv147
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %.not80 = icmp eq i32 %135, 0
  br i1 %.not80, label %136, label %.lr.ph118.1

136:                                              ; preds = %.lr.ph118
  %137 = add nsw i32 %133, 1
  store i32 %137, ptr @R, align 4, !tbaa !5
  %138 = sext i32 %133 to i64
  %139 = getelementptr inbounds [400001 x i32], ptr @que, i64 0, i64 %138
  %140 = trunc nuw nsw i64 %indvars.iv147 to i32
  store i32 %140, ptr %139, align 4, !tbaa !5
  br label %.lr.ph118.1

.lr.ph118.1:                                      ; preds = %.lr.ph118, %136
  %141 = phi i32 [ %133, %.lr.ph118 ], [ %137, %136 ]
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %142 = getelementptr inbounds [400001 x i32], ptr @deg, i64 0, i64 %indvars.iv.next148
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %.not80.1 = icmp eq i32 %143, 0
  br i1 %.not80.1, label %144, label %149

144:                                              ; preds = %.lr.ph118.1
  %145 = add nsw i32 %141, 1
  store i32 %145, ptr @R, align 4, !tbaa !5
  %146 = sext i32 %141 to i64
  %147 = getelementptr inbounds [400001 x i32], ptr @que, i64 0, i64 %146
  %148 = trunc nuw nsw i64 %indvars.iv.next148 to i32
  store i32 %148, ptr %147, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %144, %.lr.ph118.1
  %150 = phi i32 [ %141, %.lr.ph118.1 ], [ %145, %144 ]
  %indvars.iv.next148.1 = add nuw nsw i64 %indvars.iv147, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.loopexit.unr-lcssa, label %.lr.ph118, !llvm.loop !23

151:                                              ; preds = %.lr.ph122, %._crit_edge121
  %152 = phi i32 [ %130, %.lr.ph122 ], [ %177, %._crit_edge121 ]
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr @L, align 4, !tbaa !5
  %154 = sext i32 %152 to i64
  %155 = getelementptr inbounds [400001 x i32], ptr @que, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = load i32, ptr @S, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = icmp eq i32 %156, %160
  %.pre154 = sext i32 %156 to i64
  br i1 %161, label %._crit_edge153, label %162

162:                                              ; preds = %151
  %163 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %.pre154
  %164 = load i32, ptr %163, align 8, !tbaa !24
  %.not78 = icmp eq i32 %164, -1
  br i1 %.not78, label %170, label %._crit_edge153

._crit_edge153:                                   ; preds = %151, %162
  %165 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %.pre154
  %166 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @val, i64 0, i64 %.pre154
  %.sroa.010.0.copyload = load i64, ptr %166, align 8
  call void @_Z5mergeRSt4pairIiiES0_b(ptr noundef nonnull align 4 dereferenceable(8) %165, i64 %.sroa.010.0.copyload, i1 noundef zeroext false)
  %167 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %.pre154
  %168 = getelementptr inbounds i8, ptr %166, i64 4
  %169 = load i32, ptr %168, align 4, !tbaa !26
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %167, i32 noundef %169)
  br label %170

170:                                              ; preds = %._crit_edge153, %162
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %171 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @g, i64 0, i64 %.pre154
  %172 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %171) #8
  store ptr %172, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %173 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %171) #8
  store ptr %173, ptr %15, align 8
  %174 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br i1 %174, label %.lr.ph120, label %._crit_edge121

.lr.ph120:                                        ; preds = %170
  %175 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %.pre154
  %176 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %.pre154
  br label %180

._crit_edge121:                                   ; preds = %198, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  %177 = load i32, ptr @L, align 4, !tbaa !5
  %178 = load i32, ptr @R, align 4, !tbaa !5
  %179 = icmp slt i32 %177, %178
  br i1 %179, label %151, label %._crit_edge123, !llvm.loop !27

180:                                              ; preds = %.lr.ph120, %198
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  %182 = load i32, ptr %181, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %183 = load i64, ptr %175, align 8
  store i64 %183, ptr %16, align 8
  %184 = sext i32 %182 to i64
  %185 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @val, i64 0, i64 %184
  %.sroa.03.0.copyload = load i64, ptr %185, align 8
  call void @_Z5mergeRSt4pairIiiES0_b(ptr noundef nonnull align 4 dereferenceable(8) %16, i64 %.sroa.03.0.copyload, i1 noundef zeroext true)
  %186 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %184
  %187 = load i32, ptr %132, align 4, !tbaa !26
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %186, i32 noundef %187)
  %188 = load i32, ptr %176, align 4, !tbaa !5
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %186, i32 noundef %188)
  %189 = getelementptr inbounds [400001 x %"struct.std::pair"], ptr @ans, i64 0, i64 %184
  %.sroa.0.0.copyload = load i64, ptr %175, align 8
  call void @_Z5mergeRSt4pairIiiES0_b(ptr noundef nonnull align 4 dereferenceable(8) %189, i64 %.sroa.0.0.copyload, i1 noundef zeroext false)
  %190 = getelementptr inbounds [400001 x i32], ptr @deg, i64 0, i64 %184
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = add nsw i32 %191, -1
  store i32 %192, ptr %190, align 4, !tbaa !5
  %.not79 = icmp eq i32 %192, 0
  br i1 %.not79, label %193, label %198

193:                                              ; preds = %180
  %194 = load i32, ptr @R, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr @R, align 4, !tbaa !5
  %196 = sext i32 %194 to i64
  %197 = getelementptr inbounds [400001 x i32], ptr @que, i64 0, i64 %196
  store i32 %182, ptr %197, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %193, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %200 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %171) #8
  store ptr %200, ptr %15, align 8
  %201 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br i1 %201, label %180, label %._crit_edge121, !llvm.loop !28

._crit_edge123:                                   ; preds = %._crit_edge121, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #8
  %202 = load i32, ptr @q, align 4, !tbaa !5
  %.not77124 = icmp slt i32 %202, 1
  br i1 %.not77124, label %._crit_edge128, label %.lr.ph127

._crit_edge128:                                   ; preds = %.lr.ph127, %._crit_edge123
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  ret i32 0

.lr.ph127:                                        ; preds = %._crit_edge123, %.lr.ph127
  %.0125 = phi i32 [ %218, %.lr.ph127 ], [ 1, %._crit_edge123 ]
  %203 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %17)
  %204 = load i32, ptr %17, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [400001 x i32], ptr @scc, i64 0, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [400001 x i32], ptr @out, i64 0, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = load i32, ptr @q, align 4, !tbaa !5
  %212 = icmp eq i32 %.0125, %211
  %213 = zext i1 %212 to i64
  %214 = getelementptr inbounds [3 x i8], ptr @.str.6, i64 0, i64 %213
  %215 = load i8, ptr %214, align 1, !tbaa !29
  %216 = sext i8 %215 to i32
  %217 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %210, i32 noundef %216)
  %218 = add nuw nsw i32 %.0125, 1
  %219 = load i32, ptr @q, align 4, !tbaa !5
  %.not77.not = icmp slt i32 %.0125, %219
  br i1 %.not77.not, label %.lr.ph127, label %._crit_edge128, !llvm.loop !30
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6uniqueIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEET_S7_S7_(ptr, ptr) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5mergeRSt4pairIiiES0_b(ptr noundef nonnull align 4 dereferenceable(8), i64, i1 noundef zeroext) local_unnamed_addr #7

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

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

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


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