; LLVM IR from eyangch/competitive-programming :: Codeforces/1399 (e1)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.edge = type { i64, i64, i64, i64 }
%"class.std::priority_queue" = type <{ %"class.std::vector.0", [8 x 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, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i64, i64 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@S = external dso_local global i64, align 8
@graph = external dso_local global [100000 x %"class.std::vector"], align 16
@e = external dso_local global [100000 x %struct.edge], align 16
@lc = external dso_local global [100000 x i64], align 16
@pq = external dso_local global %"class.std::priority_queue", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dfsxx(i64 noundef, i64 noundef) #2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::priority_queue", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %23

23:                                               ; preds = %183, %0
  %24 = load i64, ptr @T, align 8, !tbaa !8
  %25 = add nsw i64 %24, -1
  store i64 %25, ptr @T, align 8, !tbaa !8
  %26 = icmp ne i64 %24, 0
  br i1 %26, label %27, label %187

27:                                               ; preds = %23
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) @S)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %30

30:                                               ; preds = %38, %27
  %31 = load i64, ptr %2, align 8, !tbaa !8
  %32 = load i64, ptr @N, align 8, !tbaa !8
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %30
  %36 = load i64, ptr %2, align 8, !tbaa !8
  %37 = getelementptr inbounds [100000 x %"class.std::vector"], ptr @graph, i64 0, i64 %36
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #7
  br label %38

38:                                               ; preds = %35
  %39 = load i64, ptr %2, align 8, !tbaa !8
  %40 = add nsw i64 %39, 1
  store i64 %40, ptr %2, align 8, !tbaa !8
  br label %30, !llvm.loop !11

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

42:                                               ; preds = %87, %41
  %43 = load i64, ptr %3, align 8, !tbaa !8
  %44 = load i64, ptr @N, align 8, !tbaa !8
  %45 = sub nsw i64 %44, 1
  %46 = icmp slt i64 %43, %45
  br i1 %46, label %48, label %47

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

48:                                               ; preds = %42
  %49 = load i64, ptr %3, align 8, !tbaa !8
  %50 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %49
  %51 = getelementptr inbounds %struct.edge, ptr %50, i32 0, i32 0
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %51)
  %53 = load i64, ptr %3, align 8, !tbaa !8
  %54 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %53
  %55 = getelementptr inbounds %struct.edge, ptr %54, i32 0, i32 1
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 8 dereferenceable(8) %55)
  %57 = load i64, ptr %3, align 8, !tbaa !8
  %58 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %57
  %59 = getelementptr inbounds %struct.edge, ptr %58, i32 0, i32 2
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(8) %59)
  %61 = load i64, ptr %3, align 8, !tbaa !8
  %62 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %61
  %63 = getelementptr inbounds %struct.edge, ptr %62, i32 0, i32 0
  %64 = load i64, ptr %63, align 16, !tbaa !13
  %65 = add nsw i64 %64, -1
  store i64 %65, ptr %63, align 16, !tbaa !13
  %66 = load i64, ptr %3, align 8, !tbaa !8
  %67 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %66
  %68 = getelementptr inbounds %struct.edge, ptr %67, i32 0, i32 1
  %69 = load i64, ptr %68, align 8, !tbaa !15
  %70 = add nsw i64 %69, -1
  store i64 %70, ptr %68, align 8, !tbaa !15
  %71 = load i64, ptr %3, align 8, !tbaa !8
  %72 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %71
  %73 = getelementptr inbounds %struct.edge, ptr %72, i32 0, i32 0
  %74 = load i64, ptr %73, align 16, !tbaa !13
  %75 = getelementptr inbounds [100000 x %"class.std::vector"], ptr @graph, i64 0, i64 %74
  %76 = load i64, ptr %3, align 8, !tbaa !8
  %77 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %76
  %78 = getelementptr inbounds %struct.edge, ptr %77, i32 0, i32 1
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 8 dereferenceable(8) %78)
  %79 = load i64, ptr %3, align 8, !tbaa !8
  %80 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %79
  %81 = getelementptr inbounds %struct.edge, ptr %80, i32 0, i32 1
  %82 = load i64, ptr %81, align 8, !tbaa !15
  %83 = getelementptr inbounds [100000 x %"class.std::vector"], ptr @graph, i64 0, i64 %82
  %84 = load i64, ptr %3, align 8, !tbaa !8
  %85 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %84
  %86 = getelementptr inbounds %struct.edge, ptr %85, i32 0, i32 0
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %83, ptr noundef nonnull align 8 dereferenceable(8) %86)
  br label %87

87:                                               ; preds = %48
  %88 = load i64, ptr %3, align 8, !tbaa !8
  %89 = add nsw i64 %88, 1
  store i64 %89, ptr %3, align 8, !tbaa !8
  br label %42, !llvm.loop !16

90:                                               ; preds = %47
  %91 = call noundef i64 @_Z3dfsxx(i64 noundef 0, i64 noundef -1)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #7
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %92 = call noundef nonnull align 8 dereferenceable(25) ptr @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEaSEOS7_(ptr noundef nonnull align 8 dereferenceable(25) @pq, ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !8
  br label %93

93:                                               ; preds = %142, %90
  %94 = load i64, ptr %6, align 8, !tbaa !8
  %95 = load i64, ptr @N, align 8, !tbaa !8
  %96 = sub nsw i64 %95, 1
  %97 = icmp slt i64 %94, %96
  br i1 %97, label %99, label %98

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

99:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %100 = load i64, ptr %6, align 8, !tbaa !8
  %101 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %100
  %102 = getelementptr inbounds %struct.edge, ptr %101, i32 0, i32 2
  %103 = load i64, ptr %102, align 16, !tbaa !17
  %104 = load i64, ptr %6, align 8, !tbaa !8
  %105 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %104
  %106 = getelementptr inbounds %struct.edge, ptr %105, i32 0, i32 2
  %107 = load i64, ptr %106, align 16, !tbaa !17
  %108 = sdiv i64 %107, 2
  %109 = sub nsw i64 %103, %108
  store i64 %109, ptr %7, align 8, !tbaa !8
  %110 = load i64, ptr %6, align 8, !tbaa !8
  %111 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %110
  %112 = getelementptr inbounds %struct.edge, ptr %111, i32 0, i32 0
  %113 = load i64, ptr %112, align 16, !tbaa !13
  %114 = getelementptr inbounds [100000 x i64], ptr @lc, i64 0, i64 %113
  %115 = load i64, ptr %6, align 8, !tbaa !8
  %116 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %115
  %117 = getelementptr inbounds %struct.edge, ptr %116, i32 0, i32 1
  %118 = load i64, ptr %117, align 8, !tbaa !15
  %119 = getelementptr inbounds [100000 x i64], ptr @lc, i64 0, i64 %118
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef nonnull align 8 dereferenceable(8) %119)
  %121 = load i64, ptr %120, align 8, !tbaa !8
  %122 = load i64, ptr %6, align 8, !tbaa !8
  %123 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %122
  %124 = getelementptr inbounds %struct.edge, ptr %123, i32 0, i32 3
  store i64 %121, ptr %124, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %125 = load i64, ptr %7, align 8, !tbaa !8
  %126 = load i64, ptr %6, align 8, !tbaa !8
  %127 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %126
  %128 = getelementptr inbounds %struct.edge, ptr %127, i32 0, i32 3
  %129 = load i64, ptr %128, align 8, !tbaa !18
  %130 = mul nsw i64 %125, %129
  store i64 %130, ptr %9, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @pq, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  %131 = load i64, ptr %6, align 8, !tbaa !8
  %132 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %131
  %133 = getelementptr inbounds %struct.edge, ptr %132, i32 0, i32 2
  %134 = load i64, ptr %133, align 16, !tbaa !17
  %135 = load i64, ptr %6, align 8, !tbaa !8
  %136 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %135
  %137 = getelementptr inbounds %struct.edge, ptr %136, i32 0, i32 3
  %138 = load i64, ptr %137, align 8, !tbaa !18
  %139 = mul nsw i64 %134, %138
  %140 = load i64, ptr %5, align 8, !tbaa !8
  %141 = add nsw i64 %140, %139
  store i64 %141, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %142

142:                                              ; preds = %99
  %143 = load i64, ptr %6, align 8, !tbaa !8
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %6, align 8, !tbaa !8
  br label %93, !llvm.loop !19

145:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !8
  br label %146

146:                                              ; preds = %150, %145
  %147 = load i64, ptr %5, align 8, !tbaa !8
  %148 = load i64, ptr @S, align 8, !tbaa !8
  %149 = icmp sgt i64 %147, %148
  br i1 %149, label %150, label %183

150:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %151 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @pq)
  %152 = getelementptr inbounds %"struct.std::pair", ptr %151, i32 0, i32 0
  %153 = load i64, ptr %152, align 8, !tbaa !20
  store i64 %153, ptr %11, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %154 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @pq)
  %155 = getelementptr inbounds %"struct.std::pair", ptr %154, i32 0, i32 1
  %156 = load i64, ptr %155, align 8, !tbaa !22
  store i64 %156, ptr %12, align 8, !tbaa !8
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @pq)
  %157 = load i64, ptr %11, align 8, !tbaa !8
  %158 = load i64, ptr %5, align 8, !tbaa !8
  %159 = sub nsw i64 %158, %157
  store i64 %159, ptr %5, align 8, !tbaa !8
  %160 = load i64, ptr %10, align 8, !tbaa !8
  %161 = add nsw i64 %160, 1
  store i64 %161, ptr %10, align 8, !tbaa !8
  %162 = load i64, ptr %12, align 8, !tbaa !8
  %163 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %162
  %164 = getelementptr inbounds %struct.edge, ptr %163, i32 0, i32 2
  %165 = load i64, ptr %164, align 16, !tbaa !17
  %166 = sdiv i64 %165, 2
  store i64 %166, ptr %164, align 16, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %167 = load i64, ptr %12, align 8, !tbaa !8
  %168 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %167
  %169 = getelementptr inbounds %struct.edge, ptr %168, i32 0, i32 2
  %170 = load i64, ptr %169, align 16, !tbaa !17
  %171 = load i64, ptr %12, align 8, !tbaa !8
  %172 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %171
  %173 = getelementptr inbounds %struct.edge, ptr %172, i32 0, i32 2
  %174 = load i64, ptr %173, align 16, !tbaa !17
  %175 = sdiv i64 %174, 2
  %176 = sub nsw i64 %170, %175
  store i64 %176, ptr %13, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %177 = load i64, ptr %13, align 8, !tbaa !8
  %178 = load i64, ptr %12, align 8, !tbaa !8
  %179 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %178
  %180 = getelementptr inbounds %struct.edge, ptr %179, i32 0, i32 3
  %181 = load i64, ptr %180, align 8, !tbaa !18
  %182 = mul nsw i64 %177, %181
  store i64 %182, ptr %15, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @pq, ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %146, !llvm.loop !23

183:                                              ; preds = %146
  %184 = load i64, ptr %10, align 8, !tbaa !8
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %184)
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %185, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %23, !llvm.loop !24

187:                                              ; preds = %23
  %188 = load i32, ptr %1, align 4
  ret i32 %188
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(25) ptr @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEaSEOS7_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(25)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 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 = { 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !9, i64 0}
!14 = !{!"_ZTS4edge", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!15 = !{!14, !9, i64 8}
!16 = distinct !{!16, !12}
!17 = !{!14, !9, i64 16}
!18 = !{!14, !9, i64 24}
!19 = distinct !{!19, !12}
!20 = !{!21, !9, i64 0}
!21 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!22 = !{!21, !9, i64 8}
!23 = distinct !{!23, !12}
!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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.edge = type { i64, i64, i64, i64 }
%"class.std::priority_queue" = type <{ %"class.std::vector.0", [8 x 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, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i64, i64 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@S = external dso_local global i64, align 8
@graph = external dso_local global [100000 x %"class.std::vector"], align 16
@e = external dso_local global [100000 x %struct.edge], align 16
@lc = external dso_local global [100000 x i64], align 16
@pq = external dso_local global %"class.std::priority_queue", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dfsxx(i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca %"class.std::priority_queue", align 8
  %2 = alloca i64, align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i64, align 8
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %15 = load i64, ptr @T, align 8, !tbaa !8
  %16 = add nsw i64 %15, -1
  store i64 %16, ptr @T, align 8, !tbaa !8
  %.not42 = icmp eq i64 %15, 0
  br i1 %.not42, label %._crit_edge45, label %.lr.ph44

.lr.ph44:                                         ; preds = %0, %._crit_edge40
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) @S)
  %19 = load i64, ptr @N, align 8, !tbaa !8
  %20 = icmp sgt i64 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.preheader:                                       ; preds = %.lr.ph
  %21 = icmp sgt i64 %24, 1
  br i1 %21, label %.lr.ph30, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph44, %.lr.ph
  %.028 = phi i64 [ %23, %.lr.ph ], [ 0, %.lr.ph44 ]
  %22 = getelementptr inbounds [100000 x %"class.std::vector"], ptr @graph, i64 0, i64 %.028
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  %23 = add nuw nsw i64 %.028, 1
  %24 = load i64, ptr @N, align 8, !tbaa !8
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %.lr.ph, label %.preheader, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph30, %.lr.ph44, %.preheader
  %26 = call noundef i64 @_Z3dfsxx(i64 noundef 0, i64 noundef -1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %27 = call noundef nonnull align 8 dereferenceable(25) ptr @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEaSEOS7_(ptr noundef nonnull align 8 dereferenceable(25) @pq, ptr noundef nonnull align 8 dereferenceable(25) %1) #7
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 0, ptr %2, align 8, !tbaa !8
  %28 = load i64, ptr @N, align 8, !tbaa !8
  %29 = icmp sgt i64 %28, 1
  br i1 %29, label %.lr.ph34, label %._crit_edge35

.lr.ph30:                                         ; preds = %.preheader, %.lr.ph30
  %.02329 = phi i64 [ %42, %.lr.ph30 ], [ 0, %.preheader ]
  %30 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %.02329
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %32 = getelementptr inbounds i8, ptr %30, i64 8
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(8) %32)
  %34 = getelementptr inbounds i8, ptr %30, i64 16
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %36 = load <2 x i64>, ptr %30, align 16, !tbaa !8
  %37 = add nsw <2 x i64> %36, <i64 -1, i64 -1>
  store <2 x i64> %37, ptr %30, align 16, !tbaa !8
  %38 = extractelement <2 x i64> %37, i64 0
  %39 = getelementptr inbounds [100000 x %"class.std::vector"], ptr @graph, i64 0, i64 %38
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(8) %32)
  %40 = load i64, ptr %32, align 8, !tbaa !13
  %41 = getelementptr inbounds [100000 x %"class.std::vector"], ptr @graph, i64 0, i64 %40
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %42 = add nuw nsw i64 %.02329, 1
  %43 = load i64, ptr @N, align 8, !tbaa !8
  %44 = add nsw i64 %43, -1
  %45 = icmp slt i64 %42, %44
  br i1 %45, label %.lr.ph30, label %._crit_edge, !llvm.loop !15

._crit_edge35:                                    ; preds = %.lr.ph34, %._crit_edge
  %.025.lcssa = phi i64 [ 0, %._crit_edge ], [ %69, %.lr.ph34 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %46 = load i64, ptr @S, align 8, !tbaa !8
  %47 = icmp sgt i64 %.025.lcssa, %46
  br i1 %47, label %.lr.ph39, label %._crit_edge40

.lr.ph34:                                         ; preds = %._crit_edge, %.lr.ph34
  %.02532 = phi i64 [ %69, %.lr.ph34 ], [ 0, %._crit_edge ]
  %storemerge31 = phi i64 [ %70, %.lr.ph34 ], [ 0, %._crit_edge ]
  %48 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %storemerge31
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load i64, ptr %49, align 16, !tbaa !16
  %.neg27 = sdiv i64 %50, -2
  %51 = add i64 %.neg27, %50
  %52 = load i64, ptr %48, align 16, !tbaa !17
  %53 = getelementptr inbounds [100000 x i64], ptr @lc, i64 0, i64 %52
  %54 = getelementptr inbounds i8, ptr %48, i64 8
  %55 = load i64, ptr %54, align 8, !tbaa !13
  %56 = getelementptr inbounds [100000 x i64], ptr @lc, i64 0, i64 %55
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %56)
  %58 = load i64, ptr %57, align 8, !tbaa !8
  %59 = load i64, ptr %2, align 8, !tbaa !8
  %60 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %59, i32 3
  store i64 %58, ptr %60, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %61 = mul nsw i64 %58, %51
  store i64 %61, ptr %4, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @pq, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %62 = load i64, ptr %2, align 8, !tbaa !8
  %63 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %62
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %65 = load i64, ptr %64, align 16, !tbaa !16
  %66 = getelementptr inbounds i8, ptr %63, i64 24
  %67 = load i64, ptr %66, align 8, !tbaa !18
  %68 = mul nsw i64 %67, %65
  %69 = add nsw i64 %68, %.02532
  %70 = add nsw i64 %62, 1
  store i64 %70, ptr %2, align 8, !tbaa !8
  %71 = load i64, ptr @N, align 8, !tbaa !8
  %72 = add nsw i64 %71, -1
  %73 = icmp slt i64 %70, %72
  br i1 %73, label %.lr.ph34, label %._crit_edge35, !llvm.loop !19

.lr.ph39:                                         ; preds = %._crit_edge35, %.lr.ph39
  %.02437 = phi i64 [ %80, %.lr.ph39 ], [ 0, %._crit_edge35 ]
  %.136 = phi i64 [ %79, %.lr.ph39 ], [ %.025.lcssa, %._crit_edge35 ]
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @pq)
  %75 = load i64, ptr %74, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @pq)
  %77 = getelementptr inbounds i8, ptr %76, i64 8
  %78 = load i64, ptr %77, align 8, !tbaa !22
  store i64 %78, ptr %5, align 8, !tbaa !8
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @pq)
  %79 = sub nsw i64 %.136, %75
  %80 = add nuw nsw i64 %.02437, 1
  %81 = load i64, ptr %5, align 8, !tbaa !8
  %82 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %81, i32 2
  %83 = load i64, ptr %82, align 16, !tbaa !16
  %84 = sdiv i64 %83, 2
  store i64 %84, ptr %82, align 16, !tbaa !16
  %.neg = sdiv i64 %83, -4
  %85 = add nsw i64 %.neg, %84
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %86 = getelementptr inbounds [100000 x %struct.edge], ptr @e, i64 0, i64 %81, i32 3
  %87 = load i64, ptr %86, align 8, !tbaa !18
  %88 = mul nsw i64 %87, %85
  store i64 %88, ptr %7, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @pq, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %89 = load i64, ptr @S, align 8, !tbaa !8
  %90 = icmp sgt i64 %79, %89
  br i1 %90, label %.lr.ph39, label %._crit_edge40, !llvm.loop !23

._crit_edge40:                                    ; preds = %.lr.ph39, %._crit_edge35
  %.024.lcssa = phi i64 [ 0, %._crit_edge35 ], [ %80, %.lr.ph39 ]
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.024.lcssa)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull @.str)
  %93 = load i64, ptr @T, align 8, !tbaa !8
  %94 = add nsw i64 %93, -1
  store i64 %94, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %93, 0
  br i1 %.not, label %._crit_edge45, label %.lr.ph44, !llvm.loop !24

._crit_edge45:                                    ; preds = %._crit_edge40, %0
  ret i32 0
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(25) ptr @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EEaSEOS7_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 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 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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