; LLVM IR from tangjz/acm-icpc :: codeforces/complete/757G.ll (Z10edge_buildv)

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

@n = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@lnk = external dso_local global [400001 x i32], align 16
@ord = external dso_local global [400001 x i32], align 16
@fa = external dso_local global [400001 x i32], align 16
@e = external dso_local global [800003 x %struct.Edge], align 16
@ee = external dso_local global [400001 x %"class.std::vector"], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z10edge_buildv() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.Edge, align 4
  %22 = alloca %struct.Edge, align 4
  %23 = alloca %struct.Edge, align 4
  %24 = alloca %struct.Edge, align 4
  %25 = alloca %"class.std::vector", align 8
  store i32 0, ptr @tot, align 4, !tbaa !5
  %26 = load i32, ptr @tot, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr @tot, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [400001 x i32], ptr @ord, i64 0, i64 %28
  store i32 1, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %83, %0
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = load i32, ptr @tot, align 4, !tbaa !5
  %33 = icmp sle i32 %31, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [400001 x i32], ptr @ord, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %39, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @ee, i64 0, i64 %41
  store ptr %42, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %43 = load ptr, ptr %4, align 8, !tbaa !9
  %44 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #5
  %45 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %46 = load ptr, ptr %4, align 8, !tbaa !9
  %47 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #5
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  br label %49

49:                                               ; preds = %80, %35
  %50 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %50, label %52, label %51

51:                                               ; preds = %49
  store i32 5, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %82

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %53 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  store ptr %53, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %54 = load ptr, ptr %7, align 8, !tbaa !9
  %55 = getelementptr inbounds %"struct.std::pair", ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 4, !tbaa !11
  store i32 %56, ptr %8, align 4, !tbaa !5
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = icmp eq i32 %57, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %52
  store i32 6, ptr %2, align 4
  br label %74

64:                                               ; preds = %52
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %67
  store i32 %65, ptr %68, align 4, !tbaa !5
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = load i32, ptr @tot, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr @tot, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [400001 x i32], ptr @ord, i64 0, i64 %72
  store i32 %69, ptr %73, align 4, !tbaa !5
  store i32 0, ptr %2, align 4
  br label %74

74:                                               ; preds = %64, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %75 = load i32, ptr %2, align 4
  switch i32 %75, label %77 [
    i32 0, label %76
  ]

76:                                               ; preds = %74
  store i32 0, ptr %2, align 4
  br label %77

77:                                               ; preds = %76, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %78 = load i32, ptr %2, align 4
  switch i32 %78, label %246 [
    i32 0, label %79
    i32 6, label %80
  ]

79:                                               ; preds = %77
  br label %80

80:                                               ; preds = %79, %77
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br label %49

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

83:                                               ; preds = %82
  %84 = load i32, ptr %1, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %1, align 4, !tbaa !5
  br label %30, !llvm.loop !13

86:                                               ; preds = %34
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %87 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %87, ptr %10, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %242, %86
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = icmp sle i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 7, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %245

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [400001 x i32], ptr @ord, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %98 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %98, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %99 = load i32, ptr %11, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @ee, i64 0, i64 %100
  %102 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #5
  %103 = load i32, ptr %11, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = icmp ne i32 %106, 0
  %108 = zext i1 %107 to i64
  %109 = sub i64 %102, %108
  %110 = trunc i64 %109 to i32
  store i32 %110, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @ee, i64 0, i64 %112
  store ptr %113, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %114 = load ptr, ptr %15, align 8, !tbaa !9
  %115 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #5
  %116 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %115, ptr %116, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %117 = load ptr, ptr %15, align 8, !tbaa !9
  %118 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %117) #5
  %119 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %118, ptr %119, align 8
  br label %120

120:                                              ; preds = %236, %93
  %121 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  br i1 %121, label %123, label %122

122:                                              ; preds = %120
  store i32 10, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %238

123:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %124 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  store ptr %124, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %125 = load ptr, ptr %18, align 8, !tbaa !9
  %126 = getelementptr inbounds %"struct.std::pair", ptr %125, i32 0, i32 0
  %127 = load i32, ptr %126, align 4, !tbaa !11
  store i32 %127, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %128 = load ptr, ptr %18, align 8, !tbaa !9
  %129 = getelementptr inbounds %"struct.std::pair", ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !15
  store i32 %130, ptr %20, align 4, !tbaa !5
  %131 = load i32, ptr %19, align 4, !tbaa !5
  %132 = load i32, ptr %11, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = icmp eq i32 %131, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %123
  store i32 11, ptr %2, align 4
  br label %230

138:                                              ; preds = %123
  %139 = load i32, ptr %13, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %13, align 4, !tbaa !5
  %141 = load i32, ptr %13, align 4, !tbaa !5
  %142 = icmp sgt i32 %141, 1
  br i1 %142, label %143, label %189

143:                                              ; preds = %138
  %144 = load i32, ptr %13, align 4, !tbaa !5
  %145 = load i32, ptr %14, align 4, !tbaa !5
  %146 = icmp slt i32 %144, %145
  br i1 %146, label %147, label %189

147:                                              ; preds = %143
  %148 = load i32, ptr %10, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %10, align 4, !tbaa !5
  %150 = load i32, ptr @tot, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #5
  %152 = getelementptr inbounds %struct.Edge, ptr %21, i32 0, i32 0
  %153 = load i32, ptr %12, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  store i32 %156, ptr %152, align 4, !tbaa !16
  %157 = getelementptr inbounds %struct.Edge, ptr %21, i32 0, i32 1
  %158 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %158, ptr %157, align 4, !tbaa !18
  %159 = getelementptr inbounds %struct.Edge, ptr %21, i32 0, i32 2
  store i32 0, ptr %159, align 4, !tbaa !19
  %160 = load i32, ptr @tot, align 4, !tbaa !5
  %161 = shl i32 %160, 1
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %162
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %163, ptr align 4 %21, i64 12, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #5
  %164 = load i32, ptr @tot, align 4, !tbaa !5
  %165 = shl i32 %164, 1
  %166 = load i32, ptr %12, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %167
  store i32 %165, ptr %168, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #5
  %169 = getelementptr inbounds %struct.Edge, ptr %22, i32 0, i32 0
  %170 = load i32, ptr %10, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  store i32 %173, ptr %169, align 4, !tbaa !16
  %174 = getelementptr inbounds %struct.Edge, ptr %22, i32 0, i32 1
  %175 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %175, ptr %174, align 4, !tbaa !18
  %176 = getelementptr inbounds %struct.Edge, ptr %22, i32 0, i32 2
  store i32 0, ptr %176, align 4, !tbaa !19
  %177 = load i32, ptr @tot, align 4, !tbaa !5
  %178 = shl i32 %177, 1
  %179 = or i32 %178, 1
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %180
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %181, ptr align 4 %22, i64 12, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #5
  %182 = load i32, ptr @tot, align 4, !tbaa !5
  %183 = shl i32 %182, 1
  %184 = or i32 %183, 1
  %185 = load i32, ptr %10, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %186
  store i32 %184, ptr %187, align 4, !tbaa !5
  %188 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %188, ptr %12, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %147, %143, %138
  %190 = load i32, ptr @tot, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #5
  %192 = getelementptr inbounds %struct.Edge, ptr %23, i32 0, i32 0
  %193 = load i32, ptr %12, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !5
  store i32 %196, ptr %192, align 4, !tbaa !16
  %197 = getelementptr inbounds %struct.Edge, ptr %23, i32 0, i32 1
  %198 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %198, ptr %197, align 4, !tbaa !18
  %199 = getelementptr inbounds %struct.Edge, ptr %23, i32 0, i32 2
  %200 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %200, ptr %199, align 4, !tbaa !19
  %201 = load i32, ptr @tot, align 4, !tbaa !5
  %202 = shl i32 %201, 1
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %203
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %204, ptr align 4 %23, i64 12, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #5
  %205 = load i32, ptr @tot, align 4, !tbaa !5
  %206 = shl i32 %205, 1
  %207 = load i32, ptr %12, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %208
  store i32 %206, ptr %209, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #5
  %210 = getelementptr inbounds %struct.Edge, ptr %24, i32 0, i32 0
  %211 = load i32, ptr %19, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  store i32 %214, ptr %210, align 4, !tbaa !16
  %215 = getelementptr inbounds %struct.Edge, ptr %24, i32 0, i32 1
  %216 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %216, ptr %215, align 4, !tbaa !18
  %217 = getelementptr inbounds %struct.Edge, ptr %24, i32 0, i32 2
  %218 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %218, ptr %217, align 4, !tbaa !19
  %219 = load i32, ptr @tot, align 4, !tbaa !5
  %220 = shl i32 %219, 1
  %221 = or i32 %220, 1
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %222
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %223, ptr align 4 %24, i64 12, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #5
  %224 = load i32, ptr @tot, align 4, !tbaa !5
  %225 = shl i32 %224, 1
  %226 = or i32 %225, 1
  %227 = load i32, ptr %19, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %228
  store i32 %226, ptr %229, align 4, !tbaa !5
  store i32 0, ptr %2, align 4
  br label %230

230:                                              ; preds = %189, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  %231 = load i32, ptr %2, align 4
  switch i32 %231, label %233 [
    i32 0, label %232
  ]

232:                                              ; preds = %230
  store i32 0, ptr %2, align 4
  br label %233

233:                                              ; preds = %232, %230
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %234 = load i32, ptr %2, align 4
  switch i32 %234, label %246 [
    i32 0, label %235
    i32 11, label %236
  ]

235:                                              ; preds = %233
  br label %236

236:                                              ; preds = %235, %233
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  br label %120

238:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #5
  call void @llvm.memset.p0.i64(ptr align 8 %25, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %239 = load i32, ptr %11, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @ee, i64 0, i64 %240
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %241) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %242

242:                                              ; preds = %238
  %243 = load i32, ptr %9, align 4, !tbaa !5
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %9, align 4, !tbaa !5
  br label %88, !llvm.loop !21

245:                                              ; preds = %92
  ret void

246:                                              ; preds = %233, %77
  unreachable
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

@n = external dso_local local_unnamed_addr global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@lnk = external dso_local local_unnamed_addr global [400001 x i32], align 16
@ord = external dso_local local_unnamed_addr global [400001 x i32], align 16
@fa = external dso_local local_unnamed_addr global [400001 x i32], align 16
@e = external dso_local local_unnamed_addr global [800003 x %struct.Edge], align 16
@ee = external dso_local global [400001 x %"class.std::vector"], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z10edge_buildv() local_unnamed_addr #0 {
.lr.ph74.preheader:
  %0 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %1 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.std::vector", align 8
  store i32 1, ptr @tot, align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @ord, i64 4), align 4, !tbaa !5
  br label %.lr.ph74

._crit_edge75:                                    ; preds = %._crit_edge
  store i32 0, ptr @tot, align 4, !tbaa !5
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not7082 = icmp slt i32 %5, 1
  br i1 %.not7082, label %._crit_edge87, label %.lr.ph86

.lr.ph74:                                         ; preds = %.lr.ph74.preheader, %._crit_edge
  %indvars.iv = phi i64 [ 1, %.lr.ph74.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %6 = getelementptr inbounds [400001 x i32], ptr @ord, i64 0, i64 %indvars.iv
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @ee, i64 0, i64 %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #4
  %10 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  store ptr %10, ptr %0, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %11 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  store ptr %11, ptr %1, align 8
  %12 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph74
  %13 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %8
  br label %16

._crit_edge:                                      ; preds = %28, %.lr.ph74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr @tot, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %.not.not = icmp slt i64 %indvars.iv, %15
  br i1 %.not.not, label %.lr.ph74, label %._crit_edge75, !llvm.loop !9

16:                                               ; preds = %.lr.ph, %28
  %17 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #4
  %18 = load i32, ptr %17, align 4, !tbaa !11
  %19 = load i32, ptr %13, align 4, !tbaa !5
  %20 = icmp eq i32 %18, %19
  br i1 %20, label %28, label %21

21:                                               ; preds = %16
  %22 = sext i32 %18 to i64
  %23 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %22
  store i32 %7, ptr %23, align 4, !tbaa !5
  %24 = load i32, ptr @tot, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr @tot, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [400001 x i32], ptr @ord, i64 0, i64 %26
  store i32 %18, ptr %27, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %16, %21
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #4
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  br i1 %30, label %16, label %._crit_edge

._crit_edge87:                                    ; preds = %._crit_edge81, %._crit_edge75
  ret void

.lr.ph86:                                         ; preds = %._crit_edge75, %._crit_edge81
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %._crit_edge81 ], [ 1, %._crit_edge75 ]
  %.06083 = phi i32 [ %.161.lcssa, %._crit_edge81 ], [ %5, %._crit_edge75 ]
  %31 = getelementptr inbounds [400001 x i32], ptr @ord, i64 0, i64 %indvars.iv89
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @ee, i64 0, i64 %33
  %35 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #4
  %36 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %33
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = icmp ne i32 %37, 0
  %.neg = sext i1 %38 to i64
  %39 = add i64 %35, %.neg
  %40 = trunc i64 %39 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %41 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #4
  store ptr %41, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %42 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #4
  store ptr %42, ptr %3, align 8
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  br i1 %43, label %.lr.ph80, label %._crit_edge81

._crit_edge81:                                    ; preds = %85, %.lr.ph86
  %.161.lcssa = phi i32 [ %.06083, %.lr.ph86 ], [ %.3, %85 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %34) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %.not70.not = icmp slt i64 %indvars.iv89, %45
  br i1 %.not70.not, label %.lr.ph86, label %._crit_edge87, !llvm.loop !13

.lr.ph80:                                         ; preds = %.lr.ph86, %85
  %.16178 = phi i32 [ %.3, %85 ], [ %.06083, %.lr.ph86 ]
  %.06277 = phi i32 [ %.264, %85 ], [ %32, %.lr.ph86 ]
  %.06576 = phi i32 [ %.166, %85 ], [ 0, %.lr.ph86 ]
  %46 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  %47 = load i32, ptr %46, align 4, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %46, i64 4
  %49 = load i32, ptr %48, align 4, !tbaa !14
  %50 = load i32, ptr %36, align 4, !tbaa !5
  %51 = icmp eq i32 %47, %50
  br i1 %51, label %85, label %52

52:                                               ; preds = %.lr.ph80
  %53 = add nsw i32 %.06576, 1
  %54 = icmp sgt i32 %.06576, 0
  %55 = icmp slt i32 %53, %40
  %or.cond = select i1 %54, i1 %55, i1 false
  %.pre = load i32, ptr @tot, align 4, !tbaa !5
  br i1 %or.cond, label %56, label %._crit_edge92

._crit_edge92:                                    ; preds = %52
  %.phi.trans.insert = sext i32 %.06277 to i64
  %.phi.trans.insert93 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %.phi.trans.insert
  %.pre94 = load i32, ptr %.phi.trans.insert93, align 4, !tbaa !5
  br label %71

56:                                               ; preds = %52
  %57 = add nsw i32 %.16178, 1
  %58 = add nsw i32 %.pre, 1
  %59 = sext i32 %.06277 to i64
  %60 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = shl i32 %58, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %63
  store i32 %61, ptr %64, align 8, !tbaa !5
  %.sroa.410.0..sroa_idx = getelementptr inbounds i8, ptr %64, i64 4
  store i32 %57, ptr %.sroa.410.0..sroa_idx, align 4, !tbaa !5
  %.sroa.511.0..sroa_idx = getelementptr inbounds i8, ptr %64, i64 8
  store i32 0, ptr %.sroa.511.0..sroa_idx, align 8, !tbaa !5
  store i32 %62, ptr %60, align 4, !tbaa !5
  %65 = sext i32 %57 to i64
  %66 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = or disjoint i32 %62, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %69
  store i32 %67, ptr %70, align 4, !tbaa !5
  %.sroa.47.0..sroa_idx = getelementptr inbounds i8, ptr %70, i64 4
  store i32 %.06277, ptr %.sroa.47.0..sroa_idx, align 8, !tbaa !5
  %.sroa.58.0..sroa_idx = getelementptr inbounds i8, ptr %70, i64 8
  store i32 0, ptr %.sroa.58.0..sroa_idx, align 4, !tbaa !5
  store i32 %68, ptr %66, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %._crit_edge92, %56
  %.pre-phi = phi i64 [ %.phi.trans.insert, %._crit_edge92 ], [ %65, %56 ]
  %72 = phi i32 [ %.pre94, %._crit_edge92 ], [ %68, %56 ]
  %73 = phi i32 [ %.pre, %._crit_edge92 ], [ %58, %56 ]
  %.163 = phi i32 [ %.06277, %._crit_edge92 ], [ %57, %56 ]
  %.2 = phi i32 [ %.16178, %._crit_edge92 ], [ %57, %56 ]
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr @tot, align 4, !tbaa !5
  %75 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %.pre-phi
  %76 = shl i32 %74, 1
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %77
  store i32 %72, ptr %78, align 8, !tbaa !5
  %.sroa.44.0..sroa_idx = getelementptr inbounds i8, ptr %78, i64 4
  store i32 %47, ptr %.sroa.44.0..sroa_idx, align 4, !tbaa !5
  %.sroa.55.0..sroa_idx = getelementptr inbounds i8, ptr %78, i64 8
  store i32 %49, ptr %.sroa.55.0..sroa_idx, align 8, !tbaa !5
  store i32 %76, ptr %75, align 4, !tbaa !5
  %79 = sext i32 %47 to i64
  %80 = getelementptr inbounds [400001 x i32], ptr @lnk, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = or disjoint i32 %76, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %83
  store i32 %81, ptr %84, align 4, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %84, i64 4
  store i32 %.163, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %84, i64 8
  store i32 %49, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  store i32 %82, ptr %80, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %.lr.ph80, %71
  %.166 = phi i32 [ %53, %71 ], [ %.06576, %.lr.ph80 ]
  %.264 = phi i32 [ %.163, %71 ], [ %.06277, %.lr.ph80 ]
  %.3 = phi i32 [ %.2, %71 ], [ %.16178, %.lr.ph80 ]
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  %87 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  br i1 %87, label %.lr.ph80, label %._crit_edge81
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(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_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

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

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

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass