; LLVM IR from tangjz/acm-icpc :: buaa/oj3rd (743)

; 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<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::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<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.edge = type { i32, i32, i32 }
%"struct.std::pair" = type <{ double, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@dis = external dso_local global [54289 x double], align 16
@e = external dso_local global [233 x %"class.std::vector"], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@vis = external dso_local global [54289 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.edge, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca i32, align 4
  %13 = alloca { double, i32 }, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca { double, i32 }, align 8
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %28

28:                                               ; preds = %218, %0
  %29 = load i32, ptr @t, align 4, !tbaa !5
  %30 = add nsw i32 %29, -1
  store i32 %30, ptr @t, align 4, !tbaa !5
  %31 = icmp ne i32 %29, 0
  br i1 %31, label %32, label %221

32:                                               ; preds = %28
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @n, ptr noundef @m)
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 54289, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %58, %32
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 4, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %61

39:                                               ; preds = %34
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [233 x %"class.std::vector"], ptr @e, i64 0, i64 %41
  call void @_ZNSt6vectorI4edgeSaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %54, %39
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = icmp slt i32 %44, 233
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  store i32 7, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %57

47:                                               ; preds = %43
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = mul nsw i32 %48, 233
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = add nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %52
  store double 1.000000e+10, ptr %53, align 8, !tbaa !9
  br label %54

54:                                               ; preds = %47
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %4, align 4, !tbaa !5
  br label %43, !llvm.loop !11

57:                                               ; preds = %46
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %2, align 4, !tbaa !5
  br label %34, !llvm.loop !13

61:                                               ; preds = %38
  br label %62

62:                                               ; preds = %65, %61
  %63 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %64 = xor i1 %63, true
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br label %62, !llvm.loop !14

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %85, %66
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = load i32, ptr @m, align 4, !tbaa !5
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 12, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %88

72:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %73 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9)
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = add nsw i32 %74, -1
  store i32 %75, ptr %6, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [233 x %"class.std::vector"], ptr @e, i64 0, i64 %76
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #8
  %78 = getelementptr inbounds %struct.edge, ptr %10, i32 0, i32 0
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, -1
  store i32 %80, ptr %7, align 4, !tbaa !5
  store i32 %80, ptr %78, align 4, !tbaa !15
  %81 = getelementptr inbounds %struct.edge, ptr %10, i32 0, i32 1
  %82 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %82, ptr %81, align 4, !tbaa !17
  %83 = getelementptr inbounds %struct.edge, ptr %10, i32 0, i32 2
  %84 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %84, ptr %83, align 4, !tbaa !18
  call void @_ZNSt6vectorI4edgeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %85

85:                                               ; preds = %72
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %5, align 4, !tbaa !5
  br label %67, !llvm.loop !19

88:                                               ; preds = %71
  store double 0.000000e+00, ptr getelementptr inbounds ([54289 x double], ptr @dis, i64 0, i64 61), align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 61, ptr %12, align 4, !tbaa !5
  %89 = call { double, i32 } @_ZSt9make_pairIRdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds ([54289 x double], ptr @dis, i64 0, i64 61), ptr noundef nonnull align 4 dereferenceable(4) %12)
  store { double, i32 } %89, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %13, i64 12, i1 false)
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  br label %90

90:                                               ; preds = %188, %186, %88
  %91 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %92 = xor i1 %91, true
  br i1 %92, label %93, label %189

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %94 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %95 = getelementptr inbounds %"struct.std::pair", ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 8, !tbaa !20
  store i32 %96, ptr %14, align 4, !tbaa !5
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %97 = load i32, ptr %14, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [54289 x i8], ptr @vis, i64 0, i64 %98
  %100 = load i8, ptr %99, align 1, !tbaa !22, !range !24, !noundef !25
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %103

102:                                              ; preds = %93
  store i32 15, ptr %3, align 4
  br label %186, !llvm.loop !26

103:                                              ; preds = %93
  %104 = load i32, ptr %14, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [54289 x i8], ptr @vis, i64 0, i64 %105
  store i8 1, ptr %106, align 1, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %107 = load i32, ptr %14, align 4, !tbaa !5
  %108 = sdiv i32 %107, 233
  store i32 %108, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %109 = load i32, ptr %14, align 4, !tbaa !5
  %110 = srem i32 %109, 233
  store i32 %110, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %111 = load i32, ptr %15, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [233 x %"class.std::vector"], ptr @e, i64 0, i64 %112
  %114 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #8
  %115 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %114, ptr %115, align 8
  br label %116

116:                                              ; preds = %183, %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [233 x %"class.std::vector"], ptr @e, i64 0, i64 %118
  %120 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %119) #8
  %121 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %120, ptr %121, align 8
  %122 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br i1 %122, label %124, label %123

123:                                              ; preds = %116
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %185

124:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %125 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %126 = getelementptr inbounds %struct.edge, ptr %125, i32 0, i32 0
  store ptr %126, ptr %19, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %127 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %128 = getelementptr inbounds %struct.edge, ptr %127, i32 0, i32 1
  store ptr %128, ptr %20, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %129 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %130 = getelementptr inbounds %struct.edge, ptr %129, i32 0, i32 2
  %131 = load i32, ptr %130, align 4, !tbaa !18
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %134, label %133

133:                                              ; preds = %124
  br label %137

134:                                              ; preds = %124
  %135 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %136 = getelementptr inbounds %struct.edge, ptr %135, i32 0, i32 2
  br label %137

137:                                              ; preds = %134, %133
  %138 = phi ptr [ %16, %133 ], [ %136, %134 ]
  store ptr %138, ptr %21, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %139 = load ptr, ptr %19, align 8, !tbaa !27
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = mul nsw i32 %140, 233
  %142 = load ptr, ptr %21, align 8, !tbaa !27
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = add nsw i32 %141, %143
  store i32 %144, ptr %22, align 4, !tbaa !5
  %145 = load i32, ptr %22, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !9
  %149 = load i32, ptr %14, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !9
  %153 = load ptr, ptr %20, align 8, !tbaa !27
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = sitofp i32 %154 to double
  %156 = load ptr, ptr %21, align 8, !tbaa !27
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = sitofp i32 %157 to double
  %159 = fdiv double %155, %158
  %160 = fadd double %152, %159
  %161 = fcmp ogt double %148, %160
  br i1 %161, label %162, label %182

162:                                              ; preds = %137
  %163 = load i32, ptr %14, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !9
  %167 = load ptr, ptr %20, align 8, !tbaa !27
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = sitofp i32 %168 to double
  %170 = load ptr, ptr %21, align 8, !tbaa !27
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = sitofp i32 %171 to double
  %173 = fdiv double %169, %172
  %174 = fadd double %166, %173
  %175 = load i32, ptr %22, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %176
  store double %174, ptr %177, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  %178 = load i32, ptr %22, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %179
  %181 = call { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %180, ptr noundef nonnull align 4 dereferenceable(4) %22)
  store { double, i32 } %181, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %24, i64 12, i1 false)
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %23)
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  br label %182

182:                                              ; preds = %162, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %183

183:                                              ; preds = %182
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br label %116, !llvm.loop !29

185:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  store i32 0, ptr %3, align 4
  br label %186

186:                                              ; preds = %185, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  %187 = load i32, ptr %3, align 4
  switch i32 %187, label %222 [
    i32 0, label %188
    i32 15, label %90
  ]

188:                                              ; preds = %186
  br label %90, !llvm.loop !26

189:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  store double 1.000000e+10, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %190

190:                                              ; preds = %215, %189
  %191 = load i32, ptr %26, align 4, !tbaa !5
  %192 = icmp slt i32 %191, 233
  br i1 %192, label %194, label %193

193:                                              ; preds = %190
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %218

194:                                              ; preds = %190
  %195 = load double, ptr %25, align 8, !tbaa !9
  %196 = load i32, ptr @n, align 4, !tbaa !5
  %197 = sub nsw i32 %196, 1
  %198 = mul nsw i32 %197, 233
  %199 = load i32, ptr %26, align 4, !tbaa !5
  %200 = add nsw i32 %198, %199
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !9
  %204 = fcmp ogt double %195, %203
  br i1 %204, label %205, label %214

205:                                              ; preds = %194
  %206 = load i32, ptr @n, align 4, !tbaa !5
  %207 = sub nsw i32 %206, 1
  %208 = mul nsw i32 %207, 233
  %209 = load i32, ptr %26, align 4, !tbaa !5
  %210 = add nsw i32 %208, %209
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %211
  %213 = load double, ptr %212, align 8, !tbaa !9
  store double %213, ptr %25, align 8, !tbaa !9
  br label %214

214:                                              ; preds = %205, %194
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %26, align 4, !tbaa !5
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %26, align 4, !tbaa !5
  br label %190, !llvm.loop !30

218:                                              ; preds = %193
  %219 = load double, ptr %25, align 8, !tbaa !9
  %220 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %219)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %28, !llvm.loop !31

221:                                              ; preds = %28
  ret i32 0

222:                                              ; preds = %186
  unreachable
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIRdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

attributes #0 = { 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 #1 = { "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 nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!17 = !{!16, !6, i64 4}
!18 = !{!16, !6, i64 8}
!19 = distinct !{!19, !12}
!20 = !{!21, !6, i64 8}
!21 = !{!"_ZTSSt4pairIdiE", !10, i64 0, !6, i64 8}
!22 = !{!23, !23, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = distinct !{!26, !12}
!27 = !{!28, !28, i64 0}
!28 = !{!"any pointer", !7, i64 0}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !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<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::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<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.edge = type { i32, i32, i32 }
%"struct.std::pair" = type <{ double, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@dis = external dso_local global [54289 x double], align 16
@e = external dso_local global [233 x %"class.std::vector"], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@vis = external dso_local local_unnamed_addr global [54289 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.edge, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %14 = load i32, ptr @t, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr @t, align 4, !tbaa !5
  %.not53 = icmp eq i32 %14, 0
  br i1 %.not53, label %._crit_edge56, label %.lr.ph55

.lr.ph55:                                         ; preds = %0
  %16 = getelementptr inbounds i8, ptr %5, i64 4
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  %.sroa.222.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  br label %18

18:                                               ; preds = %.lr.ph55, %272
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @n, ptr noundef nonnull @m)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(54289) @vis, i8 0, i64 54289, i1 false)
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %.preheader40

.preheader40:                                     ; preds = %.lr.ph, %18
  %22 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %22, label %.preheader39, label %.lr.ph43

.lr.ph:                                           ; preds = %18, %.lr.ph
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %.lr.ph ], [ 0, %18 ]
  %23 = getelementptr inbounds [233 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv58
  call void @_ZNSt6vectorI4edgeSaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  %24 = mul nuw nsw i64 %indvars.iv58, 233
  %25 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %24
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %25, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %26, align 8, !tbaa !9
  %27 = add nuw nsw i64 %24, 4
  %28 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %27
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %28, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %29, align 8, !tbaa !9
  %30 = add nuw nsw i64 %24, 8
  %31 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %30
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %31, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %32, align 8, !tbaa !9
  %33 = add nuw nsw i64 %24, 12
  %34 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %33
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %34, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %35, align 8, !tbaa !9
  %36 = add nuw nsw i64 %24, 16
  %37 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %36
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %37, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %38, align 8, !tbaa !9
  %39 = add nuw nsw i64 %24, 20
  %40 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %39
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %40, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %41, align 8, !tbaa !9
  %42 = add nuw nsw i64 %24, 24
  %43 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %42
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %43, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %44, align 8, !tbaa !9
  %45 = add nuw nsw i64 %24, 28
  %46 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %45
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %46, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %47, align 8, !tbaa !9
  %48 = add nuw nsw i64 %24, 32
  %49 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %48
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %49, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %50, align 8, !tbaa !9
  %51 = add nuw nsw i64 %24, 36
  %52 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %51
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %52, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %53, align 8, !tbaa !9
  %54 = add nuw nsw i64 %24, 40
  %55 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %54
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %55, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %56, align 8, !tbaa !9
  %57 = add nuw nsw i64 %24, 44
  %58 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %57
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %58, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %59, align 8, !tbaa !9
  %60 = add nuw nsw i64 %24, 48
  %61 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %60
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %61, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %62, align 8, !tbaa !9
  %63 = add nuw nsw i64 %24, 52
  %64 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %63
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %64, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %65, align 8, !tbaa !9
  %66 = add nuw nsw i64 %24, 56
  %67 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %66
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %67, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %68, align 8, !tbaa !9
  %69 = add nuw nsw i64 %24, 60
  %70 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %69
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %70, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %71, align 8, !tbaa !9
  %72 = add nuw nsw i64 %24, 64
  %73 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %72
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %73, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %74, align 8, !tbaa !9
  %75 = add nuw nsw i64 %24, 68
  %76 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %75
  %77 = getelementptr inbounds i8, ptr %76, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %76, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %77, align 8, !tbaa !9
  %78 = add nuw nsw i64 %24, 72
  %79 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %78
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %79, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %80, align 8, !tbaa !9
  %81 = add nuw nsw i64 %24, 76
  %82 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %81
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %82, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %83, align 8, !tbaa !9
  %84 = add nuw nsw i64 %24, 80
  %85 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %84
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %85, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %86, align 8, !tbaa !9
  %87 = add nuw nsw i64 %24, 84
  %88 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %87
  %89 = getelementptr inbounds i8, ptr %88, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %88, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %89, align 8, !tbaa !9
  %90 = add nuw nsw i64 %24, 88
  %91 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %90
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %91, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %92, align 8, !tbaa !9
  %93 = add nuw nsw i64 %24, 92
  %94 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %93
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %94, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %95, align 8, !tbaa !9
  %96 = add nuw nsw i64 %24, 96
  %97 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %96
  %98 = getelementptr inbounds i8, ptr %97, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %97, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %98, align 8, !tbaa !9
  %99 = add nuw nsw i64 %24, 100
  %100 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %99
  %101 = getelementptr inbounds i8, ptr %100, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %100, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %101, align 8, !tbaa !9
  %102 = add nuw nsw i64 %24, 104
  %103 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %102
  %104 = getelementptr inbounds i8, ptr %103, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %103, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %104, align 8, !tbaa !9
  %105 = add nuw nsw i64 %24, 108
  %106 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %105
  %107 = getelementptr inbounds i8, ptr %106, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %106, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %107, align 8, !tbaa !9
  %108 = add nuw nsw i64 %24, 112
  %109 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %108
  %110 = getelementptr inbounds i8, ptr %109, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %109, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %110, align 8, !tbaa !9
  %111 = add nuw nsw i64 %24, 116
  %112 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %111
  %113 = getelementptr inbounds i8, ptr %112, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %112, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %113, align 8, !tbaa !9
  %114 = add nuw nsw i64 %24, 120
  %115 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %114
  %116 = getelementptr inbounds i8, ptr %115, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %115, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %116, align 8, !tbaa !9
  %117 = add nuw nsw i64 %24, 124
  %118 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %117
  %119 = getelementptr inbounds i8, ptr %118, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %118, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %119, align 8, !tbaa !9
  %120 = add nuw nsw i64 %24, 128
  %121 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %120
  %122 = getelementptr inbounds i8, ptr %121, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %121, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %122, align 8, !tbaa !9
  %123 = add nuw nsw i64 %24, 132
  %124 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %123
  %125 = getelementptr inbounds i8, ptr %124, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %124, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %125, align 8, !tbaa !9
  %126 = add nuw nsw i64 %24, 136
  %127 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %126
  %128 = getelementptr inbounds i8, ptr %127, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %127, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %128, align 8, !tbaa !9
  %129 = add nuw nsw i64 %24, 140
  %130 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %129
  %131 = getelementptr inbounds i8, ptr %130, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %130, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %131, align 8, !tbaa !9
  %132 = add nuw nsw i64 %24, 144
  %133 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %132
  %134 = getelementptr inbounds i8, ptr %133, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %133, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %134, align 8, !tbaa !9
  %135 = add nuw nsw i64 %24, 148
  %136 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %135
  %137 = getelementptr inbounds i8, ptr %136, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %136, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %137, align 8, !tbaa !9
  %138 = add nuw nsw i64 %24, 152
  %139 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %138
  %140 = getelementptr inbounds i8, ptr %139, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %139, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %140, align 8, !tbaa !9
  %141 = add nuw nsw i64 %24, 156
  %142 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %141
  %143 = getelementptr inbounds i8, ptr %142, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %142, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %143, align 8, !tbaa !9
  %144 = add nuw nsw i64 %24, 160
  %145 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %144
  %146 = getelementptr inbounds i8, ptr %145, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %145, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %146, align 8, !tbaa !9
  %147 = add nuw nsw i64 %24, 164
  %148 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %147
  %149 = getelementptr inbounds i8, ptr %148, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %148, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %149, align 8, !tbaa !9
  %150 = add nuw nsw i64 %24, 168
  %151 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %150
  %152 = getelementptr inbounds i8, ptr %151, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %151, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %152, align 8, !tbaa !9
  %153 = add nuw nsw i64 %24, 172
  %154 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %153
  %155 = getelementptr inbounds i8, ptr %154, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %154, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %155, align 8, !tbaa !9
  %156 = add nuw nsw i64 %24, 176
  %157 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %156
  %158 = getelementptr inbounds i8, ptr %157, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %157, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %158, align 8, !tbaa !9
  %159 = add nuw nsw i64 %24, 180
  %160 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %159
  %161 = getelementptr inbounds i8, ptr %160, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %160, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %161, align 8, !tbaa !9
  %162 = add nuw nsw i64 %24, 184
  %163 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %162
  %164 = getelementptr inbounds i8, ptr %163, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %163, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %164, align 8, !tbaa !9
  %165 = add nuw nsw i64 %24, 188
  %166 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %165
  %167 = getelementptr inbounds i8, ptr %166, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %166, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %167, align 8, !tbaa !9
  %168 = add nuw nsw i64 %24, 192
  %169 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %168
  %170 = getelementptr inbounds i8, ptr %169, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %169, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %170, align 8, !tbaa !9
  %171 = add nuw nsw i64 %24, 196
  %172 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %171
  %173 = getelementptr inbounds i8, ptr %172, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %172, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %173, align 8, !tbaa !9
  %174 = add nuw nsw i64 %24, 200
  %175 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %174
  %176 = getelementptr inbounds i8, ptr %175, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %175, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %176, align 8, !tbaa !9
  %177 = add nuw nsw i64 %24, 204
  %178 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %177
  %179 = getelementptr inbounds i8, ptr %178, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %178, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %179, align 8, !tbaa !9
  %180 = add nuw nsw i64 %24, 208
  %181 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %180
  %182 = getelementptr inbounds i8, ptr %181, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %181, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %182, align 8, !tbaa !9
  %183 = add nuw nsw i64 %24, 212
  %184 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %183
  %185 = getelementptr inbounds i8, ptr %184, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %184, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %185, align 8, !tbaa !9
  %186 = add nuw nsw i64 %24, 216
  %187 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %186
  %188 = getelementptr inbounds i8, ptr %187, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %187, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %188, align 8, !tbaa !9
  %189 = add nuw nsw i64 %24, 220
  %190 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %189
  %191 = getelementptr inbounds i8, ptr %190, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %190, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %191, align 8, !tbaa !9
  %192 = add nuw nsw i64 %24, 224
  %193 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %192
  %194 = getelementptr inbounds i8, ptr %193, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %193, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %194, align 8, !tbaa !9
  %195 = add nuw nsw i64 %24, 228
  %196 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %195
  %197 = getelementptr inbounds i8, ptr %196, i64 16
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %196, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+10, double 1.000000e+10>, ptr %197, align 8, !tbaa !9
  %198 = add nuw nsw i64 %24, 232
  %199 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %198
  store double 1.000000e+10, ptr %199, align 8, !tbaa !9
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %200 = load i32, ptr @n, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = icmp slt i64 %indvars.iv.next59, %201
  br i1 %202, label %.lr.ph, label %.preheader40, !llvm.loop !11

.preheader39:                                     ; preds = %.lr.ph43, %.preheader40
  %203 = load i32, ptr @m, align 4, !tbaa !5
  %204 = icmp sgt i32 %203, 0
  br i1 %204, label %.lr.ph45, label %._crit_edge

.lr.ph43:                                         ; preds = %.preheader40, %.lr.ph43
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %205 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %205, label %.preheader39, label %.lr.ph43, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph45, %.preheader39
  store double 0.000000e+00, ptr getelementptr inbounds (i8, ptr @dis, i64 488), align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 61, ptr %7, align 4, !tbaa !5
  %206 = call { double, i32 } @_ZSt9make_pairIRdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) getelementptr inbounds (i8, ptr @dis, i64 488), ptr noundef nonnull align 4 dereferenceable(4) %7)
  %.fca.0.extract19 = extractvalue { double, i32 } %206, 0
  %.fca.1.extract20 = extractvalue { double, i32 } %206, 1
  store double %.fca.0.extract19, ptr %6, align 8
  store i32 %.fca.1.extract20, ptr %.sroa.222.0..sroa_idx, align 8
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %207 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %207, label %.preheader, label %.lr.ph50

.lr.ph45:                                         ; preds = %.preheader39, %.lr.ph45
  %.03544 = phi i32 [ %217, %.lr.ph45 ], [ 0, %.preheader39 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %208 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %209 = load i32, ptr %1, align 4, !tbaa !5
  %210 = add nsw i32 %209, -1
  store i32 %210, ptr %1, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [233 x %"class.std::vector"], ptr @e, i64 0, i64 %211
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  %213 = load i32, ptr %2, align 4, !tbaa !5
  %214 = add nsw i32 %213, -1
  store i32 %214, ptr %2, align 4, !tbaa !5
  store i32 %214, ptr %5, align 4, !tbaa !14
  %215 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %215, ptr %16, align 4, !tbaa !16
  %216 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %216, ptr %17, align 4, !tbaa !17
  call void @_ZNSt6vectorI4edgeSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %212, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %217 = add nuw nsw i32 %.03544, 1
  %218 = load i32, ptr @m, align 4, !tbaa !5
  %219 = icmp slt i32 %217, %218
  br i1 %219, label %.lr.ph45, label %._crit_edge, !llvm.loop !18

.preheader:                                       ; preds = %270, %._crit_edge
  %220 = load i32, ptr @n, align 4, !tbaa !5
  %221 = mul i32 %220, 233
  br label %276

.lr.ph50:                                         ; preds = %._crit_edge, %270
  %222 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %223 = getelementptr inbounds i8, ptr %222, i64 8
  %224 = load i32, ptr %223, align 8, !tbaa !19
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [54289 x i8], ptr @vis, i64 0, i64 %225
  %227 = load i8, ptr %226, align 1, !tbaa !21, !range !23, !noundef !24
  %228 = trunc nuw i8 %227 to i1
  br i1 %228, label %270, label %229, !llvm.loop !25

229:                                              ; preds = %.lr.ph50
  store i8 1, ptr %226, align 1, !tbaa !21
  %230 = sdiv i32 %224, 233
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8)
  %231 = srem i32 %224, 233
  store i32 %231, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %232 = sext i32 %230 to i64
  %233 = getelementptr inbounds [233 x %"class.std::vector"], ptr @e, i64 0, i64 %232
  %234 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %233) #7
  store ptr %234, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %235 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %233) #7
  store ptr %235, ptr %10, align 8
  %236 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %236, label %.lr.ph47, label %._crit_edge48

.lr.ph47:                                         ; preds = %229
  %237 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %225
  br label %238

._crit_edge48:                                    ; preds = %266, %229
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8)
  br label %270

238:                                              ; preds = %.lr.ph47, %266
  %239 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %240 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %241 = getelementptr inbounds i8, ptr %240, i64 4
  %242 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %243 = getelementptr inbounds i8, ptr %242, i64 8
  %244 = load i32, ptr %243, align 4, !tbaa !17
  %.not38 = icmp eq i32 %244, 0
  br i1 %.not38, label %248, label %245

245:                                              ; preds = %238
  %246 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %247 = getelementptr inbounds i8, ptr %246, i64 8
  br label %248

248:                                              ; preds = %238, %245
  %249 = phi ptr [ %247, %245 ], [ %8, %238 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %250 = load i32, ptr %239, align 4, !tbaa !5
  %251 = mul nsw i32 %250, 233
  %252 = load i32, ptr %249, align 4, !tbaa !5
  %253 = add nsw i32 %251, %252
  store i32 %253, ptr %11, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %254
  %256 = load double, ptr %255, align 8, !tbaa !9
  %257 = load double, ptr %237, align 8, !tbaa !9
  %258 = load i32, ptr %241, align 4, !tbaa !5
  %259 = sitofp i32 %258 to double
  %260 = sitofp i32 %252 to double
  %261 = fdiv double %259, %260
  %262 = fadd double %257, %261
  %263 = fcmp ogt double %256, %262
  br i1 %263, label %264, label %266

264:                                              ; preds = %248
  store double %262, ptr %255, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %265 = call { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %255, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %.fca.0.extract = extractvalue { double, i32 } %265, 0
  %.fca.1.extract = extractvalue { double, i32 } %265, 1
  store double %.fca.0.extract, ptr %12, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 8 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  br label %266

266:                                              ; preds = %264, %248
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  %267 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP4edgeSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %268 = call ptr @_ZNSt6vectorI4edgeSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %233) #7
  store ptr %268, ptr %10, align 8
  %269 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP4edgeSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %269, label %238, label %._crit_edge48, !llvm.loop !26

270:                                              ; preds = %.lr.ph50, %._crit_edge48
  %271 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %271, label %.preheader, label %.lr.ph50

272:                                              ; preds = %276
  %273 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %.1)
  %274 = load i32, ptr @t, align 4, !tbaa !5
  %275 = add nsw i32 %274, -1
  store i32 %275, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %274, 0
  br i1 %.not, label %._crit_edge56, label %18, !llvm.loop !27

276:                                              ; preds = %284, %.preheader
  %indvars.iv61 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next62.1, %284 ]
  %.03251 = phi double [ 1.000000e+10, %.preheader ], [ %.1.1, %284 ]
  %277 = trunc i64 %indvars.iv61 to i32
  %278 = add nuw nsw i32 %277, -233
  %279 = add i32 %278, %221
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %280
  %282 = load double, ptr %281, align 8, !tbaa !9
  %283 = fcmp ogt double %.03251, %282
  %.1 = select i1 %283, double %282, double %.03251
  %exitcond64.not = icmp eq i64 %indvars.iv61, 232
  br i1 %exitcond64.not, label %272, label %284, !llvm.loop !28

284:                                              ; preds = %276
  %285 = trunc i64 %indvars.iv61 to i32
  %286 = add nsw i32 %285, -232
  %287 = add i32 %286, %221
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [54289 x double], ptr @dis, i64 0, i64 %288
  %290 = load double, ptr %289, align 8, !tbaa !9
  %291 = fcmp ogt double %.1, %290
  %.1.1 = select i1 %291, double %290, double %.1
  %indvars.iv.next62.1 = add nuw nsw i64 %indvars.iv61, 2
  br label %276

._crit_edge56:                                    ; preds = %272, %0
  ret i32 0
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 nounwind uwtable
declare dso_local void @_ZNSt6vectorI4edgeSaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIdiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIRdiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!16 = !{!15, !6, i64 4}
!17 = !{!15, !6, i64 8}
!18 = distinct !{!18, !12}
!19 = !{!20, !6, i64 8}
!20 = !{!"_ZTSSt4pairIdiE", !10, i64 0, !6, i64 8}
!21 = !{!22, !22, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}


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