; LLVM IR from tangjz/acm-icpc :: lydsy (4061)

; 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<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>
%"struct.std::pair.0" = type { i32, i32 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 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 [2 x [100010 x i64]], align 16
@x = external dso_local global [100010 x i64], align 16
@y = external dso_local global [100010 x i64], align 16
@ans = external dso_local global i64, align 8
@e = external dso_local global [100010 x %"class.std::vector"], align 16
@vis = external dso_local global [2 x [100010 x i8]], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %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 %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair.0", align 4
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::pair.0", align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::priority_queue", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca { i64, i32 }, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca { i64, i32 }, align 8
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) @t)
  br label %28

28:                                               ; preds = %289, %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 %297

32:                                               ; preds = %28
  store i64 0, ptr @ans, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 16 @dis, i8 63, i64 1600160, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 200020, i1 false)
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %33

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

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %45

38:                                               ; preds = %33
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %40
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #9
  br label %42

42:                                               ; preds = %38
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %2, align 4, !tbaa !5
  br label %33, !llvm.loop !11

45:                                               ; preds = %37
  br label %46

46:                                               ; preds = %50, %45
  %47 = load i32, ptr @m, align 4, !tbaa !5
  %48 = add nsw i32 %47, -1
  store i32 %48, ptr @m, align 4, !tbaa !5
  %49 = icmp ne i32 %47, 0
  br i1 %49, label %50, label %63

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) %5)
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = add nsw i32 %51, -1
  store i32 %52, ptr %3, align 4, !tbaa !5
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = add nsw i32 %53, -1
  store i32 %54, ptr %4, align 4, !tbaa !5
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %56
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %58 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i64 %58, ptr %7, align 4
  call void @_ZNSt4pairIxiEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 8 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #9
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %60
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %62 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %62, ptr %9, align 4
  call void @_ZNSt4pairIxiEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 8 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %46, !llvm.loop !13

63:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %208, %63
  %65 = load i32, ptr %10, align 4, !tbaa !5
  %66 = icmp slt i32 %65, 2
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 9, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %212

68:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #9
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
  br label %69

69:                                               ; preds = %74, %68
  %70 = invoke noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %71 unwind label %75

71:                                               ; preds = %69
  %72 = xor i1 %70, true
  br i1 %72, label %73, label %79

73:                                               ; preds = %71
  invoke void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %74 unwind label %75

74:                                               ; preds = %73
  br label %69, !llvm.loop !14

75:                                               ; preds = %95, %73, %69
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %13, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %14, align 4
  br label %211

79:                                               ; preds = %71
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %81
  %83 = load i32, ptr %10, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100010 x i64], ptr %82, i64 0, i64 %84
  store i64 0, ptr %85, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #9
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %87
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100010 x i64], ptr %88, i64 0, i64 %90
  %92 = invoke { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %93 unwind label %114

93:                                               ; preds = %79
  store { i64, i32 } %92, ptr %16, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %16, i64 12, i1 false)
  invoke void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef nonnull align 8 dereferenceable(12) %15)
          to label %94 unwind label %114

94:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #9
  br label %95

95:                                               ; preds = %205, %203, %94
  %96 = invoke noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %97 unwind label %75

97:                                               ; preds = %95
  %98 = xor i1 %96, true
  br i1 %98, label %99, label %207

99:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %100 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %101 unwind label %118

101:                                              ; preds = %99
  %102 = getelementptr inbounds %"struct.std::pair", ptr %100, i32 0, i32 1
  %103 = load i32, ptr %102, align 8, !tbaa !15
  store i32 %103, ptr %17, align 4, !tbaa !5
  invoke void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %104 unwind label %118

104:                                              ; preds = %101
  %105 = load i32, ptr %10, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [2 x [100010 x i8]], ptr @vis, i64 0, i64 %106
  %108 = load i32, ptr %17, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100010 x i8], ptr %107, i64 0, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !17, !range !19, !noundef !20
  %112 = trunc i8 %111 to i1
  br i1 %112, label %113, label %122

113:                                              ; preds = %104
  store i32 14, ptr %11, align 4
  br label %203, !llvm.loop !21

114:                                              ; preds = %93, %79
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %13, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #9
  br label %211

118:                                              ; preds = %101, %99
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %13, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %14, align 4
  br label %206

122:                                              ; preds = %104
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [2 x [100010 x i8]], ptr @vis, i64 0, i64 %124
  %126 = load i32, ptr %17, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100010 x i8], ptr %125, i64 0, i64 %127
  store i8 1, ptr %128, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %129 = load i32, ptr %17, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %130
  %132 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %131) #9
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  br label %134

134:                                              ; preds = %200, %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %135 = load i32, ptr %17, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %136
  %138 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #9
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  %140 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br i1 %140, label %142, label %141

141:                                              ; preds = %134
  store i32 16, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %202

142:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %143 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  %144 = getelementptr inbounds %"struct.std::pair", ptr %143, i32 0, i32 1
  store ptr %144, ptr %20, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %145 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  %146 = getelementptr inbounds %"struct.std::pair", ptr %145, i32 0, i32 0
  store ptr %146, ptr %21, align 8, !tbaa !22
  %147 = load i32, ptr %10, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %148
  %150 = load ptr, ptr %20, align 8, !tbaa !22
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [100010 x i64], ptr %149, i64 0, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !9
  %155 = load i32, ptr %10, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %156
  %158 = load i32, ptr %17, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [100010 x i64], ptr %157, i64 0, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !9
  %162 = load ptr, ptr %21, align 8, !tbaa !22
  %163 = load i64, ptr %162, align 8, !tbaa !9
  %164 = add nsw i64 %161, %163
  %165 = icmp sgt i64 %154, %164
  br i1 %165, label %166, label %199

166:                                              ; preds = %142
  %167 = load i32, ptr %10, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %168
  %170 = load i32, ptr %17, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [100010 x i64], ptr %169, i64 0, i64 %171
  %173 = load i64, ptr %172, align 8, !tbaa !9
  %174 = load ptr, ptr %21, align 8, !tbaa !22
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = add nsw i64 %173, %175
  %177 = load i32, ptr %10, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %178
  %180 = load ptr, ptr %20, align 8, !tbaa !22
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [100010 x i64], ptr %179, i64 0, i64 %182
  store i64 %176, ptr %183, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #9
  %184 = load i32, ptr %10, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %185
  %187 = load ptr, ptr %20, align 8, !tbaa !22
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [100010 x i64], ptr %186, i64 0, i64 %189
  %191 = load ptr, ptr %20, align 8, !tbaa !22
  %192 = invoke { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %190, ptr noundef nonnull align 4 dereferenceable(4) %191)
          to label %193 unwind label %195

193:                                              ; preds = %166
  store { i64, i32 } %192, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %23, i64 12, i1 false)
  invoke void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef nonnull align 8 dereferenceable(12) %22)
          to label %194 unwind label %195

194:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  br label %199

195:                                              ; preds = %193, %166
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %13, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %206

199:                                              ; preds = %194, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %200

200:                                              ; preds = %199
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br label %134, !llvm.loop !24

202:                                              ; preds = %141
  store i32 0, ptr %11, align 4
  br label %203

203:                                              ; preds = %202, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  %204 = load i32, ptr %11, align 4
  switch i32 %204, label %303 [
    i32 0, label %205
    i32 14, label %95
  ]

205:                                              ; preds = %203
  br label %95, !llvm.loop !21

206:                                              ; preds = %195, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %211

207:                                              ; preds = %97
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %10, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %10, align 4, !tbaa !5
  br label %64, !llvm.loop !25

211:                                              ; preds = %206, %114, %75
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %298

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

213:                                              ; preds = %243, %212
  %214 = load i32, ptr %24, align 4, !tbaa !5
  %215 = load i32, ptr @n, align 4, !tbaa !5
  %216 = icmp slt i32 %214, %215
  br i1 %216, label %218, label %217

217:                                              ; preds = %213
  store i32 19, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %246

218:                                              ; preds = %213
  %219 = load i32, ptr %24, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [100010 x i64], ptr @dis, i64 0, i64 %220
  %222 = load i64, ptr %221, align 8, !tbaa !9
  %223 = load i32, ptr %24, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([2 x [100010 x i64]], ptr @dis, i64 0, i64 1), i64 0, i64 %224
  %226 = load i64, ptr %225, align 8, !tbaa !9
  %227 = add nsw i64 %222, %226
  %228 = load i32, ptr %24, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [100010 x i64], ptr @x, i64 0, i64 %229
  store i64 %227, ptr %230, align 8, !tbaa !9
  %231 = load i32, ptr %24, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [100010 x i64], ptr @dis, i64 0, i64 %232
  %234 = load i64, ptr %233, align 8, !tbaa !9
  %235 = load i32, ptr %24, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds ([2 x [100010 x i64]], ptr @dis, i64 0, i64 1), i64 0, i64 %236
  %238 = load i64, ptr %237, align 8, !tbaa !9
  %239 = sub nsw i64 %234, %238
  %240 = load i32, ptr %24, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [100010 x i64], ptr @y, i64 0, i64 %241
  store i64 %239, ptr %242, align 8, !tbaa !9
  br label %243

243:                                              ; preds = %218
  %244 = load i32, ptr %24, align 4, !tbaa !5
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %24, align 4, !tbaa !5
  br label %213, !llvm.loop !26

246:                                              ; preds = %217
  %247 = load i32, ptr @n, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds i64, ptr @x, i64 %248
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef @x, ptr noundef %249)
  %250 = load i32, ptr @n, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds i64, ptr @y, i64 %251
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef @y, ptr noundef %252)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %253 = load i32, ptr @n, align 4, !tbaa !5
  %254 = ashr i32 %253, 1
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [100010 x i64], ptr @x, i64 0, i64 %255
  %257 = load i64, ptr %256, align 8, !tbaa !9
  store i64 %257, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %258 = load i32, ptr @n, align 4, !tbaa !5
  %259 = ashr i32 %258, 1
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [100010 x i64], ptr @y, i64 0, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !9
  store i64 %262, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %263

263:                                              ; preds = %286, %246
  %264 = load i32, ptr %27, align 4, !tbaa !5
  %265 = load i32, ptr @n, align 4, !tbaa !5
  %266 = icmp slt i32 %264, %265
  br i1 %266, label %268, label %267

267:                                              ; preds = %263
  store i32 22, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %289

268:                                              ; preds = %263
  %269 = load i32, ptr %27, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [100010 x i64], ptr @x, i64 0, i64 %270
  %272 = load i64, ptr %271, align 8, !tbaa !9
  %273 = load i64, ptr %25, align 8, !tbaa !9
  %274 = sub nsw i64 %272, %273
  %275 = call noundef i64 @_ZSt3absx(i64 noundef %274)
  %276 = load i32, ptr %27, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [100010 x i64], ptr @y, i64 0, i64 %277
  %279 = load i64, ptr %278, align 8, !tbaa !9
  %280 = load i64, ptr %26, align 8, !tbaa !9
  %281 = sub nsw i64 %279, %280
  %282 = call noundef i64 @_ZSt3absx(i64 noundef %281)
  %283 = add nsw i64 %275, %282
  %284 = load i64, ptr @ans, align 8, !tbaa !9
  %285 = add nsw i64 %284, %283
  store i64 %285, ptr @ans, align 8, !tbaa !9
  br label %286

286:                                              ; preds = %268
  %287 = load i32, ptr %27, align 4, !tbaa !5
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %27, align 4, !tbaa !5
  br label %263, !llvm.loop !27

289:                                              ; preds = %267
  %290 = load i64, ptr @ans, align 8, !tbaa !9
  %291 = sitofp i64 %290 to double
  %292 = load i32, ptr @n, align 4, !tbaa !5
  %293 = sitofp i32 %292 to double
  %294 = fmul double 2.000000e+00, %293
  %295 = fdiv double %291, %294
  %296 = call i32 (ptr, ...) @printf(ptr noundef @.str, double noundef %295)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %28, !llvm.loop !28

297:                                              ; preds = %28
  ret i32 0

298:                                              ; preds = %211
  %299 = load ptr, ptr %13, align 8
  %300 = load i32, ptr %14, align 4
  %301 = insertvalue { ptr, i32 } poison, ptr %299, 0
  %302 = insertvalue { ptr, i32 } %301, i32 %300, 1
  resume { ptr, i32 } %302

303:                                              ; preds = %203
  unreachable
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) #6

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #8 = { "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 #9 = { 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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTSSt4pairIxiE", !10, i64 0, !6, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !12}
!22 = !{!23, !23, i64 0}
!23 = !{!"any pointer", !7, i64 0}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !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<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, int>, std::allocator<std::pair<long long, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>
%"struct.std::pair.0" = type { i32, i32 }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 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 [2 x [100010 x i64]], align 16
@x = external dso_local global [100010 x i64], align 16
@y = external dso_local global [100010 x i64], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@e = external dso_local global [100010 x %"class.std::vector"], align 16
@vis = external dso_local local_unnamed_addr global [2 x [100010 x i8]], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair.0", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair.0", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::priority_queue", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"struct.std::pair", align 8
  tail call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) @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
  %.not65 = icmp eq i32 %14, 0
  br i1 %.not65, label %._crit_edge68, label %.lr.ph67

.lr.ph67:                                         ; preds = %0
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  br label %16

16:                                               ; preds = %.lr.ph67, %._crit_edge63
  store i64 0, ptr @ans, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1600160) @dis, i8 63, i64 1600160, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(200020) @vis, i8 0, i64 200020, i1 false)
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) @m)
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %.lr.ph, %16
  %19 = load i32, ptr @m, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr @m, align 4, !tbaa !5
  %.not4248 = icmp eq i32 %19, 0
  br i1 %.not4248, label %._crit_edge, label %.lr.ph49

.lr.ph:                                           ; preds = %16, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %16 ]
  %21 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %.preheader, !llvm.loop !11

.lr.ph49:                                         ; preds = %.preheader, %.lr.ph49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @_Z4scanRi(ptr noundef nonnull align 4 dereferenceable(4) %3)
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = add nsw i32 %25, -1
  store i32 %26, ptr %1, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %26 to i64
  %30 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %29
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %31 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %31, ptr %5, align 8
  call void @_ZNSt4pairIxiEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %35 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %1)
  store i64 %35, ptr %7, align 8
  call void @_ZNSt4pairIxiEC2IiiTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @_ZNSt6vectorISt4pairIxiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %36 = load i32, ptr @m, align 4, !tbaa !5
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr @m, align 4, !tbaa !5
  %.not42 = icmp eq i32 %36, 0
  br i1 %.not42, label %._crit_edge, label %.lr.ph49, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph49, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %54

38:                                               ; preds = %._crit_edge55
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %.lr.ph58.preheader, label %._crit_edge59

.lr.ph58.preheader:                               ; preds = %38
  %wide.trip.count = zext nneg i32 %39 to i64
  %min.iters.check = icmp ult i32 %39, 4
  br i1 %min.iters.check, label %.lr.ph58.preheader81, label %vector.ph

.lr.ph58.preheader81:                             ; preds = %middle.block, %.lr.ph58.preheader
  %indvars.iv70.ph = phi i64 [ 0, %.lr.ph58.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph58

vector.ph:                                        ; preds = %.lr.ph58.preheader
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %41 = getelementptr inbounds [100010 x i64], ptr @dis, i64 0, i64 %index
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %wide.load = load <2 x i64>, ptr %41, align 16, !tbaa !9
  %wide.load78 = load <2 x i64>, ptr %42, align 16, !tbaa !9
  %43 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds (i8, ptr @dis, i64 800080), i64 0, i64 %index
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %wide.load79 = load <2 x i64>, ptr %43, align 16, !tbaa !9
  %wide.load80 = load <2 x i64>, ptr %44, align 16, !tbaa !9
  %45 = add nsw <2 x i64> %wide.load79, %wide.load
  %46 = add nsw <2 x i64> %wide.load80, %wide.load78
  %47 = getelementptr inbounds [100010 x i64], ptr @x, i64 0, i64 %index
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  store <2 x i64> %45, ptr %47, align 16, !tbaa !9
  store <2 x i64> %46, ptr %48, align 16, !tbaa !9
  %49 = sub nsw <2 x i64> %wide.load, %wide.load79
  %50 = sub nsw <2 x i64> %wide.load78, %wide.load80
  %51 = getelementptr inbounds [100010 x i64], ptr @y, i64 0, i64 %index
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  store <2 x i64> %49, ptr %51, align 16, !tbaa !9
  store <2 x i64> %50, ptr %52, align 16, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %53 = icmp eq i64 %index.next, %n.vec
  br i1 %53, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge59, label %.lr.ph58.preheader81

54:                                               ; preds = %._crit_edge, %._crit_edge55
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  br label %55

55:                                               ; preds = %57, %54
  %56 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  br i1 %56, label %60, label %57

57:                                               ; preds = %55
  invoke void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
          to label %55 unwind label %58, !llvm.loop !17

58:                                               ; preds = %57
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %116

60:                                               ; preds = %55
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %62, i64 %62
  store i64 0, ptr %63, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %64 = invoke { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %65 unwind label %78

65:                                               ; preds = %60
  %.fca.0.extract25 = extractvalue { i64, i32 } %64, 0
  %.fca.1.extract26 = extractvalue { i64, i32 } %64, 1
  store i64 %.fca.0.extract25, ptr %10, align 8
  store i32 %.fca.1.extract26, ptr %.sroa.228.0..sroa_idx, align 8
  invoke void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %9, ptr noundef nonnull align 8 dereferenceable(12) %10)
          to label %66 unwind label %78

66:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  %67 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  br i1 %67, label %._crit_edge55, label %.lr.ph54

.lr.ph54:                                         ; preds = %66, %111
  %68 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  %70 = load i32, ptr %69, align 8, !tbaa !18
  invoke void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
          to label %71 unwind label %80

71:                                               ; preds = %.lr.ph54
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = sext i32 %70 to i64
  %75 = getelementptr inbounds [2 x [100010 x i8]], ptr @vis, i64 0, i64 %73, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !20, !range !22, !noundef !23
  %77 = trunc nuw i8 %76 to i1
  br i1 %77, label %111, label %82, !llvm.loop !24

78:                                               ; preds = %65, %60
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %116

80:                                               ; preds = %.lr.ph54
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %116

82:                                               ; preds = %71
  store i8 1, ptr %75, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %83 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @e, i64 0, i64 %74
  %84 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %83) #8
  store ptr %84, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %85 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %83) #8
  store ptr %85, ptr %12, align 8
  %86 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br i1 %86, label %.lr.ph51, label %._crit_edge52

._crit_edge52:                                    ; preds = %107, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %111

.lr.ph51:                                         ; preds = %82, %107
  %87 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %89 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = load i32, ptr %88, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %91, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds [2 x [100010 x i64]], ptr @dis, i64 0, i64 %91, i64 %74
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = load i64, ptr %89, align 8, !tbaa !9
  %99 = add nsw i64 %98, %97
  %100 = icmp sgt i64 %95, %99
  br i1 %100, label %101, label %107

101:                                              ; preds = %.lr.ph51
  store i64 %99, ptr %94, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  %102 = invoke { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull align 4 dereferenceable(4) %88)
          to label %103 unwind label %105

103:                                              ; preds = %101
  %.fca.0.extract = extractvalue { i64, i32 } %102, 0
  %.fca.1.extract = extractvalue { i64, i32 } %102, 1
  store i64 %.fca.0.extract, ptr %13, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  invoke void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %9, ptr noundef nonnull align 8 dereferenceable(12) %13)
          to label %104 unwind label %105

104:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %107

105:                                              ; preds = %103, %101
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %116

107:                                              ; preds = %104, %.lr.ph51
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %109 = call ptr @_ZNSt6vectorISt4pairIxiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %83) #8
  store ptr %109, ptr %12, align 8
  %110 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br i1 %110, label %.lr.ph51, label %._crit_edge52, !llvm.loop !25

111:                                              ; preds = %71, %._crit_edge52
  %112 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
  br i1 %112, label %._crit_edge55, label %.lr.ph54

._crit_edge55:                                    ; preds = %111, %66
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %8, align 4, !tbaa !5
  %115 = icmp slt i32 %113, 1
  br i1 %115, label %54, label %38, !llvm.loop !26

116:                                              ; preds = %80, %105, %78, %58
  %.pn44 = phi { ptr, i32 } [ %59, %58 ], [ %79, %78 ], [ %106, %105 ], [ %81, %80 ]
  call void @_ZNSt14priority_queueISt4pairIxiESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  resume { ptr, i32 } %.pn44

._crit_edge59:                                    ; preds = %.lr.ph58, %middle.block, %38
  %117 = sext i32 %39 to i64
  %118 = getelementptr inbounds i64, ptr @x, i64 %117
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull @x, ptr noundef nonnull %118)
  %119 = load i32, ptr @n, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i64, ptr @y, i64 %120
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull @y, ptr noundef nonnull %121)
  %122 = load i32, ptr @n, align 4, !tbaa !5
  %123 = ashr i32 %122, 1
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100010 x i64], ptr @x, i64 0, i64 %124
  %126 = load i64, ptr %125, align 8, !tbaa !9
  %127 = getelementptr inbounds [100010 x i64], ptr @y, i64 0, i64 %124
  %128 = load i64, ptr %127, align 8, !tbaa !9
  %129 = icmp sgt i32 %122, 0
  br i1 %129, label %.lr.ph62, label %._crit_edge59.._crit_edge63_crit_edge

._crit_edge59.._crit_edge63_crit_edge:            ; preds = %._crit_edge59
  %.pre = load i64, ptr @ans, align 8, !tbaa !9
  br label %._crit_edge63

.lr.ph58:                                         ; preds = %.lr.ph58.preheader81, %.lr.ph58
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph58 ], [ %indvars.iv70.ph, %.lr.ph58.preheader81 ]
  %130 = getelementptr inbounds [100010 x i64], ptr @dis, i64 0, i64 %indvars.iv70
  %131 = load i64, ptr %130, align 8, !tbaa !9
  %132 = getelementptr inbounds [100010 x i64], ptr getelementptr inbounds (i8, ptr @dis, i64 800080), i64 0, i64 %indvars.iv70
  %133 = load i64, ptr %132, align 8, !tbaa !9
  %134 = add nsw i64 %133, %131
  %135 = getelementptr inbounds [100010 x i64], ptr @x, i64 0, i64 %indvars.iv70
  store i64 %134, ptr %135, align 8, !tbaa !9
  %136 = sub nsw i64 %131, %133
  %137 = getelementptr inbounds [100010 x i64], ptr @y, i64 0, i64 %indvars.iv70
  store i64 %136, ptr %137, align 8, !tbaa !9
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge59, label %.lr.ph58, !llvm.loop !27

._crit_edge63:                                    ; preds = %.lr.ph62, %._crit_edge59.._crit_edge63_crit_edge
  %138 = phi i64 [ %.pre, %._crit_edge59.._crit_edge63_crit_edge ], [ %156, %.lr.ph62 ]
  %.lcssa46 = phi i32 [ %122, %._crit_edge59.._crit_edge63_crit_edge ], [ %157, %.lr.ph62 ]
  %139 = sitofp i64 %138 to double
  %140 = sitofp i32 %.lcssa46 to double
  %141 = fmul double %140, 2.000000e+00
  %142 = fdiv double %139, %141
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, double noundef %142)
  %144 = load i32, ptr @t, align 4, !tbaa !5
  %145 = add nsw i32 %144, -1
  store i32 %145, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %144, 0
  br i1 %.not, label %._crit_edge68, label %16, !llvm.loop !28

.lr.ph62:                                         ; preds = %._crit_edge59, %.lr.ph62
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph62 ], [ 0, %._crit_edge59 ]
  %146 = getelementptr inbounds [100010 x i64], ptr @x, i64 0, i64 %indvars.iv73
  %147 = load i64, ptr %146, align 8, !tbaa !9
  %148 = sub nsw i64 %147, %126
  %149 = call noundef i64 @_ZSt3absx(i64 noundef %148)
  %150 = getelementptr inbounds [100010 x i64], ptr @y, i64 0, i64 %indvars.iv73
  %151 = load i64, ptr %150, align 8, !tbaa !9
  %152 = sub nsw i64 %151, %128
  %153 = call noundef i64 @_ZSt3absx(i64 noundef %152)
  %154 = add nsw i64 %153, %149
  %155 = load i64, ptr @ans, align 8, !tbaa !9
  %156 = add nsw i64 %154, %155
  store i64 %156, ptr @ans, align 8, !tbaa !9
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %157 = load i32, ptr @n, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = icmp slt i64 %indvars.iv.next74, %158
  br i1 %159, label %.lr.ph62, label %._crit_edge63, !llvm.loop !29

._crit_edge68:                                    ; preds = %._crit_edge63, %0
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairIRxRiESt4pairINSt25__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 #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt14priority_queueISt4pairIxiESt6vectorIS1_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 @_ZNSt6vectorISt4pairIxiESaIS1_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_cxxneIPSt4pairIxiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt3absx(i64 noundef) local_unnamed_addr #5

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #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 = { 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 #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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !12}
!18 = !{!19, !6, i64 8}
!19 = !{!"_ZTSSt4pairIxiE", !10, i64 0, !6, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12, !16, !15}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}


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