; LLVM IR from DionysiosB/CodeForces :: 0600-0699 (605B-LazyStudent)

; 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 { i64, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"struct.std::pair.5" = type { i32, i32 }
%"class.std::allocator.2" = type { i8 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11edgeCompare4edgeS_(ptr noundef byval(%struct.edge) align 8, ptr noundef byval(%struct.edge) align 8) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca %"class.std::vector.0", align 8
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca %"struct.std::pair.5", align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::allocator.2", align 1
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  %26 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  call void @_ZNSaI4edgeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorI4edgeSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %26, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %27 unwind label %33

27:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorI4edgeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %50, %27
  %29 = load i64, ptr %8, align 8, !tbaa !5
  %30 = load i64, ptr %3, align 8, !tbaa !5
  %31 = icmp slt i64 %29, %30
  br i1 %31, label %37, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %57

33:                                               ; preds = %0
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %6, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %7, align 4
  call void @_ZNSt15__new_allocatorI4edgeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  br label %180

37:                                               ; preds = %28
  %38 = load i64, ptr %8, align 8, !tbaa !5
  %39 = load i64, ptr %8, align 8, !tbaa !5
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %39) #6
  %41 = getelementptr inbounds %struct.edge, ptr %40, i32 0, i32 0
  store i64 %38, ptr %41, align 8, !tbaa !9
  %42 = load i64, ptr %8, align 8, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %42) #6
  %44 = getelementptr inbounds %struct.edge, ptr %43, i32 0, i32 1
  %45 = load i64, ptr %8, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %45) #6
  %47 = getelementptr inbounds %struct.edge, ptr %46, i32 0, i32 2
  %48 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %44, ptr noundef %47)
          to label %49 unwind label %53

49:                                               ; preds = %37
  br label %50

50:                                               ; preds = %49
  %51 = load i64, ptr %8, align 8, !tbaa !5
  %52 = add nsw i64 %51, 1
  store i64 %52, ptr %8, align 8, !tbaa !5
  br label %28, !llvm.loop !11

53:                                               ; preds = %37
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %6, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %179

57:                                               ; preds = %32
  %58 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %58, ptr %59, align 8
  %60 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr %63, ptr %65, ptr noundef @_Z11edgeCompare4edgeS_)
          to label %66 unwind label %77

66:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 1, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 2, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 2, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  store i8 1, ptr %15, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  %67 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 1, ptr %20, align 4, !tbaa !15
  %68 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %69 unwind label %81

69:                                               ; preds = %66
  store i64 %68, ptr %18, align 4
  invoke void @_ZNSt4pairIllEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(8) %18)
          to label %70 unwind label %81

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %67, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %71 unwind label %85

71:                                               ; preds = %70
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store i64 0, ptr %22, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %136, %71
  %73 = load i64, ptr %22, align 8, !tbaa !5
  %74 = load i64, ptr %3, align 8, !tbaa !5
  %75 = icmp slt i64 %73, %74
  br i1 %75, label %90, label %76

76:                                               ; preds = %72
  store i32 5, ptr %23, align 4
  br label %139

77:                                               ; preds = %57
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %6, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %7, align 4
  br label %179

81:                                               ; preds = %69, %66
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %6, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %7, align 4
  br label %89

85:                                               ; preds = %70
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %6, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %7, align 4
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  br label %89

89:                                               ; preds = %85, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br label %178

90:                                               ; preds = %72
  %91 = load i64, ptr %22, align 8, !tbaa !5
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %91) #6
  %93 = getelementptr inbounds %struct.edge, ptr %92, i32 0, i32 2
  %94 = load i64, ptr %93, align 8, !tbaa !17
  %95 = icmp ne i64 %94, 0
  br i1 %95, label %96, label %105

96:                                               ; preds = %90
  %97 = load i64, ptr %12, align 8, !tbaa !5
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %12, align 8, !tbaa !5
  %99 = load i64, ptr %22, align 8, !tbaa !5
  %100 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %99) #6
  %101 = getelementptr inbounds %struct.edge, ptr %100, i32 0, i32 0
  %102 = load i64, ptr %101, align 8, !tbaa !9
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %102) #6
  %104 = getelementptr inbounds %"struct.std::pair", ptr %103, i32 0, i32 1
  store i64 %98, ptr %104, align 8, !tbaa !18
  br label %135

105:                                              ; preds = %90
  %106 = load i64, ptr %13, align 8, !tbaa !5
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %13, align 8, !tbaa !5
  %108 = load i64, ptr %13, align 8, !tbaa !5
  %109 = load i64, ptr %14, align 8, !tbaa !5
  %110 = icmp sge i64 %108, %109
  br i1 %110, label %111, label %120

111:                                              ; preds = %105
  %112 = load i64, ptr %14, align 8, !tbaa !5
  %113 = load i64, ptr %12, align 8, !tbaa !5
  %114 = icmp sge i64 %112, %113
  br i1 %114, label %115, label %116

115:                                              ; preds = %111
  store i8 0, ptr %15, align 1, !tbaa !13
  store i32 5, ptr %23, align 4
  br label %139

116:                                              ; preds = %111
  store i64 2, ptr %13, align 8, !tbaa !5
  %117 = load i64, ptr %14, align 8, !tbaa !5
  %118 = add nsw i64 %117, 1
  store i64 %118, ptr %14, align 8, !tbaa !5
  br label %119

119:                                              ; preds = %116
  br label %120

120:                                              ; preds = %119, %105
  %121 = load i64, ptr %13, align 8, !tbaa !5
  %122 = load i64, ptr %22, align 8, !tbaa !5
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %122) #6
  %124 = getelementptr inbounds %struct.edge, ptr %123, i32 0, i32 0
  %125 = load i64, ptr %124, align 8, !tbaa !9
  %126 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %125) #6
  %127 = getelementptr inbounds %"struct.std::pair", ptr %126, i32 0, i32 0
  store i64 %121, ptr %127, align 8, !tbaa !20
  %128 = load i64, ptr %14, align 8, !tbaa !5
  %129 = load i64, ptr %22, align 8, !tbaa !5
  %130 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %129) #6
  %131 = getelementptr inbounds %struct.edge, ptr %130, i32 0, i32 0
  %132 = load i64, ptr %131, align 8, !tbaa !9
  %133 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %132) #6
  %134 = getelementptr inbounds %"struct.std::pair", ptr %133, i32 0, i32 1
  store i64 %128, ptr %134, align 8, !tbaa !18
  br label %135

135:                                              ; preds = %120, %96
  br label %136

136:                                              ; preds = %135
  %137 = load i64, ptr %22, align 8, !tbaa !5
  %138 = add nsw i64 %137, 1
  store i64 %138, ptr %22, align 8, !tbaa !5
  br label %72, !llvm.loop !21

139:                                              ; preds = %115, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %140

140:                                              ; preds = %139
  %141 = load i8, ptr %15, align 1, !tbaa !13, !range !22, !noundef !23
  %142 = trunc i8 %141 to i1
  br i1 %142, label %143, label %168

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store i64 0, ptr %24, align 8, !tbaa !5
  br label %144

144:                                              ; preds = %160, %143
  %145 = load i64, ptr %24, align 8, !tbaa !5
  %146 = load i64, ptr %3, align 8, !tbaa !5
  %147 = icmp slt i64 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %167

149:                                              ; preds = %144
  %150 = load i64, ptr %24, align 8, !tbaa !5
  %151 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %150) #6
  %152 = getelementptr inbounds %"struct.std::pair", ptr %151, i32 0, i32 0
  %153 = load i64, ptr %152, align 8, !tbaa !20
  %154 = load i64, ptr %24, align 8, !tbaa !5
  %155 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %154) #6
  %156 = getelementptr inbounds %"struct.std::pair", ptr %155, i32 0, i32 1
  %157 = load i64, ptr %156, align 8, !tbaa !18
  %158 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %153, i64 noundef %157)
          to label %159 unwind label %163

159:                                              ; preds = %149
  br label %160

160:                                              ; preds = %159
  %161 = load i64, ptr %24, align 8, !tbaa !5
  %162 = add nsw i64 %161, 1
  store i64 %162, ptr %24, align 8, !tbaa !5
  br label %144, !llvm.loop !24

163:                                              ; preds = %149
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %6, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %177

167:                                              ; preds = %148
  br label %175

168:                                              ; preds = %140
  %169 = invoke i32 @puts(ptr noundef @.str.2)
          to label %170 unwind label %171

170:                                              ; preds = %168
  br label %175

171:                                              ; preds = %168
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %6, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %7, align 4
  br label %177

175:                                              ; preds = %170, %167
  store i32 0, ptr %1, align 4
  store i32 1, ptr %23, align 4
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZNSt6vectorI4edgeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %176 = load i32, ptr %1, align 4
  ret i32 %176

177:                                              ; preds = %171, %163
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %178

178:                                              ; preds = %177, %89
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %179

179:                                              ; preds = %178, %77, %53
  call void @_ZNSt6vectorI4edgeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %180

180:                                              ; preds = %179, %33
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %181

181:                                              ; preds = %180
  %182 = load ptr, ptr %6, align 8
  %183 = load i32, ptr %7, align 4
  %184 = insertvalue { ptr, i32 } poison, ptr %182, 0
  %185 = insertvalue { ptr, i32 } %184, i32 %183, 1
  resume { ptr, i32 } %185
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr, ptr, ptr noundef) #5

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

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

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

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

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

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

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

declare i32 @puts(ptr noundef) #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4edge", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!10, !6, i64 16}
!18 = !{!19, !6, i64 8}
!19 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!20 = !{!19, !6, i64 0}
!21 = distinct !{!21, !12}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !12}


; 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 { i64, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<edge, std::allocator<edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"struct.std::pair.5" = type { i32, i32 }
%"class.std::allocator.2" = type { i8 }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11edgeCompare4edgeS_(ptr noundef byval(%struct.edge) align 8, ptr noundef byval(%struct.edge) align 8) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::vector.0", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair.5", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::allocator.2", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %12 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaI4edgeEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorI4edgeSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %13 unwind label %18

13:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorI4edgeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %13
  %16 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  %17 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr %16, ptr %17, ptr noundef nonnull @_Z11edgeCompare4edgeS_)
          to label %29 unwind label %36

18:                                               ; preds = %0
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI4edgeED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %76

.lr.ph:                                           ; preds = %13, %.lr.ph
  %.04351 = phi i64 [ %26, %.lr.ph ], [ 0, %13 ]
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04351) #6
  store i64 %.04351, ptr %20, align 8, !tbaa !9
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04351) #6
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04351) #6
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %22, ptr noundef nonnull %24)
  %26 = add nuw nsw i64 %.04351, 1
  %27 = load i64, ptr %2, align 8, !tbaa !5
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !11

29:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %30 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 1, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  store i32 1, ptr %9, align 4, !tbaa !13
  %31 = invoke 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)
          to label %32 unwind label %38

32:                                               ; preds = %29
  store i64 %31, ptr %7, align 8
  call void @_ZNSt4pairIllEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @_ZNSaISt4pairIllEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %30, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %33 unwind label %40

33:                                               ; preds = %32
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  %34 = load i64, ptr %2, align 8, !tbaa !5
  %.not5052 = icmp sgt i64 %34, 0
  br i1 %.not5052, label %.lr.ph58, label %.loopexit

.critedge.preheader:                              ; preds = %57
  %35 = icmp sgt i64 %63, 0
  br i1 %35, label %.critedge, label %.loopexit

36:                                               ; preds = %._crit_edge
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %75

38:                                               ; preds = %29
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %32
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %75

.lr.ph58:                                         ; preds = %33, %57
  %.02956 = phi i64 [ %62, %57 ], [ 0, %33 ]
  %.03155 = phi i64 [ %.2, %57 ], [ 2, %33 ]
  %.03254 = phi i64 [ %.234, %57 ], [ 2, %33 ]
  %.03553 = phi i64 [ %.136, %57 ], [ 1, %33 ]
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02956) #6
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %45 = load i64, ptr %44, align 8, !tbaa !15
  %.not = icmp eq i64 %45, 0
  br i1 %.not, label %48, label %46

46:                                               ; preds = %.lr.ph58
  %47 = add nsw i64 %.03553, 1
  br label %57

48:                                               ; preds = %.lr.ph58
  %49 = add nsw i64 %.03254, 1
  %.not48 = icmp slt i64 %49, %.03155
  br i1 %.not48, label %53, label %50

50:                                               ; preds = %48
  %.not49 = icmp slt i64 %.03155, %.03553
  br i1 %.not49, label %51, label %73

51:                                               ; preds = %50
  %52 = add nsw i64 %.03155, 1
  br label %53

53:                                               ; preds = %51, %48
  %.133 = phi i64 [ 2, %51 ], [ %49, %48 ]
  %.1 = phi i64 [ %52, %51 ], [ %.03155, %48 ]
  %54 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02956) #6
  %55 = load i64, ptr %54, align 8, !tbaa !9
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %55) #6
  store i64 %.133, ptr %56, align 8, !tbaa !16
  br label %57

57:                                               ; preds = %46, %53
  %.sink = phi i64 [ %47, %46 ], [ %.1, %53 ]
  %.136 = phi i64 [ %47, %46 ], [ %.03553, %53 ]
  %.234 = phi i64 [ %.03254, %46 ], [ %.133, %53 ]
  %.2 = phi i64 [ %.03155, %46 ], [ %.1, %53 ]
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI4edgeSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.02956) #6
  %59 = load i64, ptr %58, align 8, !tbaa !9
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %59) #6
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  store i64 %.sink, ptr %61, align 8, !tbaa !18
  %62 = add nuw nsw i64 %.02956, 1
  %63 = load i64, ptr %2, align 8, !tbaa !5
  %.not50 = icmp slt i64 %62, %63
  br i1 %.not50, label %.lr.ph58, label %.critedge.preheader, !llvm.loop !19

.critedge:                                        ; preds = %.critedge.preheader, %.critedge
  %.059 = phi i64 [ %70, %.critedge ], [ 0, %.critedge.preheader ]
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.059) #6
  %65 = load i64, ptr %64, align 8, !tbaa !16
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.059) #6
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  %68 = load i64, ptr %67, align 8, !tbaa !18
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %65, i64 noundef %68)
  %70 = add nuw nsw i64 %.059, 1
  %71 = load i64, ptr %2, align 8, !tbaa !5
  %72 = icmp slt i64 %70, %71
  br i1 %72, label %.critedge, label %.loopexit, !llvm.loop !20

73:                                               ; preds = %50
  %74 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %.loopexit

.loopexit:                                        ; preds = %.critedge, %33, %.critedge.preheader, %73
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorI4edgeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

75:                                               ; preds = %42, %36
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %37, %36 ]
  call void @_ZNSt6vectorI4edgeSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %76

76:                                               ; preds = %75, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %75 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #5

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4pairIllEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4edge", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!10, !6, i64 16}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!18 = !{!17, !6, i64 8}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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