; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101955D.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
@lnk0 = external dso_local global [400001 x i32], align 16
@lnk1 = 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
@ban = external dso_local global [400001 x i8], 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 %262 [
    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
  %87 = load i32, ptr @n, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = mul i64 %88, 4
  call void @llvm.memset.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @lnk0, i64 1), i8 0, i64 %89, i1 false)
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = mul i64 %91, 4
  call void @llvm.memset.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @lnk1, i64 1), i8 0, i64 %92, i1 false)
  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
  %93 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %93, ptr %10, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %258, %86
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = icmp sle i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  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 %261

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

126:                                              ; preds = %252, %99
  %127 = 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 %127, label %129, label %128

128:                                              ; preds = %126
  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 %254

129:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %130 = 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 %130, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %131 = load ptr, ptr %18, align 8, !tbaa !9
  %132 = getelementptr inbounds %"struct.std::pair", ptr %131, i32 0, i32 0
  %133 = load i32, ptr %132, align 4, !tbaa !11
  store i32 %133, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %134 = load ptr, ptr %18, align 8, !tbaa !9
  %135 = getelementptr inbounds %"struct.std::pair", ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 4, !tbaa !15
  store i32 %136, ptr %20, align 4, !tbaa !5
  %137 = load i32, ptr %19, align 4, !tbaa !5
  %138 = load i32, ptr %11, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = icmp eq i32 %137, %141
  br i1 %142, label %143, label %144

143:                                              ; preds = %129
  store i32 11, ptr %2, align 4
  br label %246

144:                                              ; preds = %129
  %145 = load i32, ptr %13, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %13, align 4, !tbaa !5
  %147 = load i32, ptr %13, align 4, !tbaa !5
  %148 = icmp sgt i32 %147, 1
  br i1 %148, label %149, label %203

149:                                              ; preds = %144
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = load i32, ptr %14, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %153, label %203

153:                                              ; preds = %149
  %154 = load i32, ptr %10, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %10, align 4, !tbaa !5
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %157
  store i32 0, ptr %158, align 4, !tbaa !5
  %159 = load i32, ptr %10, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [400001 x i32], ptr @lnk0, i64 0, i64 %160
  store i32 0, ptr %161, align 4, !tbaa !5
  %162 = load i32, ptr @tot, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr @tot, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [400001 x i8], ptr @ban, i64 0, i64 %164
  store i8 0, ptr %165, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #5
  %166 = getelementptr inbounds %struct.Edge, ptr %21, i32 0, i32 0
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [400001 x i32], ptr @lnk0, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  store i32 %170, ptr %166, align 4, !tbaa !18
  %171 = getelementptr inbounds %struct.Edge, ptr %21, i32 0, i32 1
  %172 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %172, ptr %171, align 4, !tbaa !20
  %173 = getelementptr inbounds %struct.Edge, ptr %21, i32 0, i32 2
  store i32 0, ptr %173, align 4, !tbaa !21
  %174 = load i32, ptr @tot, align 4, !tbaa !5
  %175 = shl i32 %174, 1
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %176
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %177, ptr align 4 %21, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #5
  %178 = load i32, ptr @tot, align 4, !tbaa !5
  %179 = shl i32 %178, 1
  %180 = load i32, ptr %12, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [400001 x i32], ptr @lnk0, i64 0, i64 %181
  store i32 %179, ptr %182, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #5
  %183 = getelementptr inbounds %struct.Edge, ptr %22, i32 0, i32 0
  %184 = load i32, ptr %10, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [400001 x i32], ptr @lnk0, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  store i32 %187, ptr %183, align 4, !tbaa !18
  %188 = getelementptr inbounds %struct.Edge, ptr %22, i32 0, i32 1
  %189 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %189, ptr %188, align 4, !tbaa !20
  %190 = getelementptr inbounds %struct.Edge, ptr %22, i32 0, i32 2
  store i32 0, ptr %190, align 4, !tbaa !21
  %191 = load i32, ptr @tot, align 4, !tbaa !5
  %192 = shl i32 %191, 1
  %193 = or i32 %192, 1
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %194
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %195, ptr align 4 %22, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #5
  %196 = load i32, ptr @tot, align 4, !tbaa !5
  %197 = shl i32 %196, 1
  %198 = or i32 %197, 1
  %199 = load i32, ptr %10, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [400001 x i32], ptr @lnk0, i64 0, i64 %200
  store i32 %198, ptr %201, align 4, !tbaa !5
  %202 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %202, ptr %12, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %153, %149, %144
  %204 = load i32, ptr @tot, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr @tot, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [400001 x i8], ptr @ban, i64 0, i64 %206
  store i8 0, ptr %207, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #5
  %208 = getelementptr inbounds %struct.Edge, ptr %23, i32 0, i32 0
  %209 = load i32, ptr %12, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  store i32 %212, ptr %208, align 4, !tbaa !18
  %213 = getelementptr inbounds %struct.Edge, ptr %23, i32 0, i32 1
  %214 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %214, ptr %213, align 4, !tbaa !20
  %215 = getelementptr inbounds %struct.Edge, ptr %23, i32 0, i32 2
  %216 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %216, ptr %215, align 4, !tbaa !21
  %217 = load i32, ptr @tot, align 4, !tbaa !5
  %218 = shl i32 %217, 1
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %219
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %220, ptr align 4 %23, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #5
  %221 = load i32, ptr @tot, align 4, !tbaa !5
  %222 = shl i32 %221, 1
  %223 = load i32, ptr %12, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %224
  store i32 %222, ptr %225, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #5
  %226 = getelementptr inbounds %struct.Edge, ptr %24, i32 0, i32 0
  %227 = load i32, ptr %19, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !5
  store i32 %230, ptr %226, align 4, !tbaa !18
  %231 = getelementptr inbounds %struct.Edge, ptr %24, i32 0, i32 1
  %232 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %232, ptr %231, align 4, !tbaa !20
  %233 = getelementptr inbounds %struct.Edge, ptr %24, i32 0, i32 2
  %234 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %234, ptr %233, align 4, !tbaa !21
  %235 = load i32, ptr @tot, align 4, !tbaa !5
  %236 = shl i32 %235, 1
  %237 = or i32 %236, 1
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %238
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %239, ptr align 4 %24, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #5
  %240 = load i32, ptr @tot, align 4, !tbaa !5
  %241 = shl i32 %240, 1
  %242 = or i32 %241, 1
  %243 = load i32, ptr %19, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %244
  store i32 %242, ptr %245, align 4, !tbaa !5
  store i32 0, ptr %2, align 4
  br label %246

246:                                              ; preds = %203, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  %247 = load i32, ptr %2, align 4
  switch i32 %247, label %249 [
    i32 0, label %248
  ]

248:                                              ; preds = %246
  store i32 0, ptr %2, align 4
  br label %249

249:                                              ; preds = %248, %246
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %250 = load i32, ptr %2, align 4
  switch i32 %250, label %262 [
    i32 0, label %251
    i32 11, label %252
  ]

251:                                              ; preds = %249
  br label %252

252:                                              ; preds = %251, %249
  %253 = 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 %126

254:                                              ; preds = %128
  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
  %255 = load i32, ptr %11, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @ee, i64 0, i64 %256
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %257) #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 %258

258:                                              ; preds = %254
  %259 = load i32, ptr %9, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %9, align 4, !tbaa !5
  br label %94, !llvm.loop !23

261:                                              ; preds = %98
  ret void

262:                                              ; preds = %249, %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: 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 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) #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: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4, !6, i64 8}
!20 = !{!19, !6, i64 4}
!21 = !{!19, !6, i64 8}
!22 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!23 = distinct !{!23, !14}


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

%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
@lnk0 = external dso_local local_unnamed_addr global [400001 x i32], align 16
@lnk1 = 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
@ban = external dso_local local_unnamed_addr global [400001 x i8], 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.ph76.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.ph76

._crit_edge77:                                    ; preds = %._crit_edge
  store i32 0, ptr @tot, align 4, !tbaa !5
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  %7 = shl nsw i64 %6, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @lnk0, i64 4), i8 0, i64 %7, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @lnk1, i64 4), i8 0, i64 %7, i1 false)
  %.not7284 = icmp slt i32 %5, 1
  br i1 %.not7284, label %._crit_edge89, label %.lr.ph88

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

.lr.ph:                                           ; preds = %.lr.ph76
  %15 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %10
  br label %18

._crit_edge:                                      ; preds = %30, %.lr.ph76
  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
  %16 = load i32, ptr @tot, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %.not.not = icmp slt i64 %indvars.iv, %17
  br i1 %.not.not, label %.lr.ph76, label %._crit_edge77, !llvm.loop !9

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

23:                                               ; preds = %18
  %24 = sext i32 %20 to i64
  %25 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %24
  store i32 %9, ptr %25, 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 %20, ptr %29, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %18, %23
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #4
  %32 = 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 %32, label %18, label %._crit_edge

._crit_edge89:                                    ; preds = %._crit_edge83, %._crit_edge77
  ret void

.lr.ph88:                                         ; preds = %._crit_edge77, %._crit_edge83
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %._crit_edge83 ], [ 1, %._crit_edge77 ]
  %.06285 = phi i32 [ %.163.lcssa, %._crit_edge83 ], [ %5, %._crit_edge77 ]
  %33 = getelementptr inbounds [400001 x i32], ptr @ord, i64 0, i64 %indvars.iv91
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [400001 x %"class.std::vector"], ptr @ee, i64 0, i64 %35
  %37 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  %38 = getelementptr inbounds [400001 x i32], ptr @fa, i64 0, i64 %35
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = icmp ne i32 %39, 0
  %.neg = sext i1 %40 to i64
  %41 = add i64 %37, %.neg
  %42 = trunc i64 %41 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %43 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  store ptr %43, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %44 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  store ptr %44, ptr %3, align 8
  %45 = 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 %45, label %.lr.ph82, label %._crit_edge83

._crit_edge83:                                    ; preds = %92, %.lr.ph88
  %.163.lcssa = phi i32 [ %.06285, %.lr.ph88 ], [ %.3, %92 ]
  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) %36) #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.next92 = add nuw nsw i64 %indvars.iv91, 1
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %.not72.not = icmp slt i64 %indvars.iv91, %47
  br i1 %.not72.not, label %.lr.ph88, label %._crit_edge89, !llvm.loop !13

.lr.ph82:                                         ; preds = %.lr.ph88, %92
  %.16380 = phi i32 [ %.3, %92 ], [ %.06285, %.lr.ph88 ]
  %.06479 = phi i32 [ %.266, %92 ], [ %34, %.lr.ph88 ]
  %.06778 = phi i32 [ %.168, %92 ], [ 0, %.lr.ph88 ]
  %48 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = getelementptr inbounds i8, ptr %48, i64 4
  %51 = load i32, ptr %50, align 4, !tbaa !14
  %52 = load i32, ptr %38, align 4, !tbaa !5
  %53 = icmp eq i32 %49, %52
  br i1 %53, label %92, label %54

54:                                               ; preds = %.lr.ph82
  %55 = add nsw i32 %.06778, 1
  %56 = icmp sgt i32 %.06778, 0
  %57 = icmp slt i32 %55, %42
  %or.cond = select i1 %56, i1 %57, i1 false
  %.pre = load i32, ptr @tot, align 4, !tbaa !5
  br i1 %or.cond, label %58, label %._crit_edge94

._crit_edge94:                                    ; preds = %54
  %.phi.trans.insert = sext i32 %.06479 to i64
  %.phi.trans.insert95 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %.phi.trans.insert
  %.pre96 = load i32, ptr %.phi.trans.insert95, align 4, !tbaa !5
  br label %76

58:                                               ; preds = %54
  %59 = add nsw i32 %.16380, 1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %60
  store i32 0, ptr %61, align 4, !tbaa !5
  %62 = getelementptr inbounds [400001 x i32], ptr @lnk0, i64 0, i64 %60
  store i32 0, ptr %62, align 4, !tbaa !5
  %63 = add nsw i32 %.pre, 1
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [400001 x i8], ptr @ban, i64 0, i64 %64
  store i8 0, ptr %65, align 1, !tbaa !15
  %66 = sext i32 %.06479 to i64
  %67 = getelementptr inbounds [400001 x i32], ptr @lnk0, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = shl i32 %63, 1
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %70
  store i32 %68, ptr %71, align 8, !tbaa !5
  %.sroa.410.0..sroa_idx = getelementptr inbounds i8, ptr %71, i64 4
  store i32 %59, ptr %.sroa.410.0..sroa_idx, align 4, !tbaa !5
  %.sroa.511.0..sroa_idx = getelementptr inbounds i8, ptr %71, i64 8
  store i32 0, ptr %.sroa.511.0..sroa_idx, align 8, !tbaa !5
  store i32 %69, ptr %67, align 4, !tbaa !5
  %72 = load i32, ptr %62, align 4, !tbaa !5
  %73 = or disjoint i32 %69, 1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %74
  store i32 %72, ptr %75, align 4, !tbaa !5
  %.sroa.47.0..sroa_idx = getelementptr inbounds i8, ptr %75, i64 4
  store i32 %.06479, ptr %.sroa.47.0..sroa_idx, align 8, !tbaa !5
  %.sroa.58.0..sroa_idx = getelementptr inbounds i8, ptr %75, i64 8
  store i32 0, ptr %.sroa.58.0..sroa_idx, align 4, !tbaa !5
  store i32 %73, ptr %62, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %._crit_edge94, %58
  %.pre-phi = phi i64 [ %.phi.trans.insert, %._crit_edge94 ], [ %60, %58 ]
  %77 = phi i32 [ %.pre96, %._crit_edge94 ], [ 0, %58 ]
  %78 = phi i32 [ %.pre, %._crit_edge94 ], [ %63, %58 ]
  %.165 = phi i32 [ %.06479, %._crit_edge94 ], [ %59, %58 ]
  %.2 = phi i32 [ %.16380, %._crit_edge94 ], [ %59, %58 ]
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr @tot, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [400001 x i8], ptr @ban, i64 0, i64 %80
  store i8 0, ptr %81, align 1, !tbaa !15
  %82 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %.pre-phi
  %83 = shl i32 %79, 1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %84
  store i32 %77, ptr %85, align 8, !tbaa !5
  %.sroa.44.0..sroa_idx = getelementptr inbounds i8, ptr %85, i64 4
  store i32 %49, ptr %.sroa.44.0..sroa_idx, align 4, !tbaa !5
  %.sroa.55.0..sroa_idx = getelementptr inbounds i8, ptr %85, i64 8
  store i32 %51, ptr %.sroa.55.0..sroa_idx, align 8, !tbaa !5
  store i32 %83, ptr %82, align 4, !tbaa !5
  %86 = sext i32 %49 to i64
  %87 = getelementptr inbounds [400001 x i32], ptr @lnk1, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = or disjoint i32 %83, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [800003 x %struct.Edge], ptr @e, i64 0, i64 %90
  store i32 %88, ptr %91, align 4, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %91, i64 4
  store i32 %.165, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %91, i64 8
  store i32 %51, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  store i32 %89, ptr %87, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %.lr.ph82, %76
  %.168 = phi i32 [ %55, %76 ], [ %.06778, %.lr.ph82 ]
  %.266 = phi i32 [ %.165, %76 ], [ %.06479, %.lr.ph82 ]
  %.3 = phi i32 [ %.2, %76 ], [ %.16380, %.lr.ph82 ]
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  %94 = 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 %94, label %.lr.ph82, label %._crit_edge83
}

; 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 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 noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; 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}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}


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