; LLVM IR from eyangch/competitive-programming :: Codeforces/1504 (e)

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

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

@N = external dso_local global i64, align 8
@c = external dso_local global [100000 x %"struct.std::pair"], align 16
@nxt = external dso_local global [100000 x i64], align 16
@di = external dso_local global [1000000 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

36:                                               ; preds = %31
  %37 = load i64, ptr %2, align 8, !tbaa !8
  %38 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %37
  %39 = getelementptr inbounds %"struct.std::pair", ptr %38, i32 0, i32 0
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %39)
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %41
  %43 = getelementptr inbounds %"struct.std::pair", ptr %42, i32 0, i32 1
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(8) %43)
  br label %45

45:                                               ; preds = %36
  %46 = load i64, ptr %2, align 8, !tbaa !8
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %2, align 8, !tbaa !8
  br label %31, !llvm.loop !11

48:                                               ; preds = %35
  %49 = load i64, ptr @N, align 8, !tbaa !8
  %50 = getelementptr inbounds %"struct.std::pair", ptr @c, i64 %49
  call void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef @c, ptr noundef %50)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %51

51:                                               ; preds = %75, %48
  %52 = load i64, ptr %3, align 8, !tbaa !8
  %53 = load i64, ptr @N, align 8, !tbaa !8
  %54 = icmp slt i64 %52, %53
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %57 = load i64, ptr %3, align 8, !tbaa !8
  %58 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %57
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 0
  %60 = load i64, ptr %59, align 16, !tbaa !13
  %61 = load i64, ptr %3, align 8, !tbaa !8
  %62 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %61
  %63 = getelementptr inbounds %"struct.std::pair", ptr %62, i32 0, i32 1
  %64 = load i64, ptr %63, align 8, !tbaa !15
  %65 = add nsw i64 %60, %64
  store i64 %65, ptr %4, align 8, !tbaa !8
  %66 = load i64, ptr @N, align 8, !tbaa !8
  %67 = getelementptr inbounds %"struct.std::pair", ptr @c, i64 %66
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store double 1.000000e+09, ptr %6, align 8, !tbaa !16
  call void @_ZNSt4pairIxxEC2IRxdTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %68 = call noundef ptr @_ZSt11upper_boundIPSt4pairIxxES1_ET_S3_S3_RKT0_(ptr noundef @c, ptr noundef %67, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %69 = ptrtoint ptr %68 to i64
  %70 = sub i64 %69, ptrtoint (ptr @c to i64)
  %71 = sdiv exact i64 %70, 16
  %72 = sub nsw i64 %71, 1
  %73 = load i64, ptr %3, align 8, !tbaa !8
  %74 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %73
  store i64 %72, ptr %74, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %75

75:                                               ; preds = %56
  %76 = load i64, ptr %3, align 8, !tbaa !8
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %3, align 8, !tbaa !8
  br label %51, !llvm.loop !18

78:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !19
  invoke void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %79 unwind label %104

79:                                               ; preds = %78
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %80 unwind label %104

80:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  %81 = load i64, ptr @N, align 8, !tbaa !8
  %82 = getelementptr inbounds i64, ptr @di, i64 %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store double 1.000000e+09, ptr %13, align 8, !tbaa !16
  invoke void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef @di, ptr noundef %82, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %83 unwind label %108

83:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  store i64 0, ptr @di, align 16, !tbaa !8
  br label %84

84:                                               ; preds = %246, %244, %83
  %85 = invoke noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
          to label %86 unwind label %112

86:                                               ; preds = %84
  %87 = xor i1 %85, true
  br i1 %87, label %88, label %249

88:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %89 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
          to label %90 unwind label %116

90:                                               ; preds = %88
  %91 = getelementptr inbounds %"struct.std::pair", ptr %89, i32 0, i32 1
  %92 = load i64, ptr %91, align 8, !tbaa !15
  store i64 %92, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %93 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
          to label %94 unwind label %120

94:                                               ; preds = %90
  %95 = getelementptr inbounds %"struct.std::pair", ptr %93, i32 0, i32 0
  %96 = load i64, ptr %95, align 8, !tbaa !13
  store i64 %96, ptr %15, align 8, !tbaa !8
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
          to label %97 unwind label %120

97:                                               ; preds = %94
  %98 = load i64, ptr %14, align 8, !tbaa !8
  %99 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !8
  %101 = load i64, ptr %15, align 8, !tbaa !8
  %102 = icmp ne i64 %100, %101
  br i1 %102, label %103, label %124

103:                                              ; preds = %97
  store i32 8, ptr %16, align 4
  br label %244, !llvm.loop !21

104:                                              ; preds = %79, %78
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %11, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %280

108:                                              ; preds = %80
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %11, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %280

112:                                              ; preds = %84
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %11, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %12, align 4
  br label %280

116:                                              ; preds = %88
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  br label %248

120:                                              ; preds = %94, %90
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %11, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %12, align 4
  br label %247

124:                                              ; preds = %97
  %125 = load i64, ptr %14, align 8, !tbaa !8
  %126 = icmp sgt i64 %125, 0
  br i1 %126, label %127, label %147

127:                                              ; preds = %124
  %128 = load i64, ptr %14, align 8, !tbaa !8
  %129 = sub nsw i64 %128, 1
  %130 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %129
  %131 = load i64, ptr %130, align 8, !tbaa !8
  %132 = load i64, ptr %15, align 8, !tbaa !8
  %133 = icmp sgt i64 %131, %132
  br i1 %133, label %134, label %147

134:                                              ; preds = %127
  %135 = load i64, ptr %15, align 8, !tbaa !8
  %136 = load i64, ptr %14, align 8, !tbaa !8
  %137 = sub nsw i64 %136, 1
  %138 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %137
  store i64 %135, ptr %138, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %139 = load i64, ptr %14, align 8, !tbaa !8
  %140 = sub nsw i64 %139, 1
  store i64 %140, ptr %18, align 8, !tbaa !8
  invoke void @_ZNSt4pairIxxEC2IRxxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %141 unwind label %143

141:                                              ; preds = %134
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %142 unwind label %143

142:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %147

143:                                              ; preds = %141, %134
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %11, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %247

147:                                              ; preds = %142, %127, %124
  %148 = load i64, ptr %14, align 8, !tbaa !8
  %149 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %148
  %150 = load i64, ptr %149, align 8, !tbaa !8
  %151 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !8
  %153 = load i64, ptr %15, align 8, !tbaa !8
  %154 = icmp sgt i64 %152, %153
  br i1 %154, label %155, label %169

155:                                              ; preds = %147
  %156 = load i64, ptr %15, align 8, !tbaa !8
  %157 = load i64, ptr %14, align 8, !tbaa !8
  %158 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !8
  %160 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %159
  store i64 %156, ptr %160, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  %161 = load i64, ptr %14, align 8, !tbaa !8
  %162 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %161
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %162)
          to label %163 unwind label %165

163:                                              ; preds = %155
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %164 unwind label %165

164:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %169

165:                                              ; preds = %163, %155
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %11, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %247

169:                                              ; preds = %164, %147
  %170 = load i64, ptr %14, align 8, !tbaa !8
  %171 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !8
  %173 = load i64, ptr @N, align 8, !tbaa !8
  %174 = sub nsw i64 %173, 1
  %175 = icmp slt i64 %172, %174
  br i1 %175, label %176, label %243

176:                                              ; preds = %169
  %177 = load i64, ptr %14, align 8, !tbaa !8
  %178 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %177
  %179 = load i64, ptr %178, align 8, !tbaa !8
  %180 = add nsw i64 %179, 1
  %181 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %180
  %182 = load i64, ptr %181, align 8, !tbaa !8
  %183 = load i64, ptr %15, align 8, !tbaa !8
  %184 = load i64, ptr %14, align 8, !tbaa !8
  %185 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !8
  %187 = add nsw i64 %186, 1
  %188 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %187
  %189 = getelementptr inbounds %"struct.std::pair", ptr %188, i32 0, i32 0
  %190 = load i64, ptr %189, align 16, !tbaa !13
  %191 = add nsw i64 %183, %190
  %192 = load i64, ptr %14, align 8, !tbaa !8
  %193 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %192
  %194 = getelementptr inbounds %"struct.std::pair", ptr %193, i32 0, i32 0
  %195 = load i64, ptr %194, align 16, !tbaa !13
  %196 = sub nsw i64 %191, %195
  %197 = load i64, ptr %14, align 8, !tbaa !8
  %198 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %197
  %199 = getelementptr inbounds %"struct.std::pair", ptr %198, i32 0, i32 1
  %200 = load i64, ptr %199, align 8, !tbaa !15
  %201 = sub nsw i64 %196, %200
  %202 = icmp sgt i64 %182, %201
  br i1 %202, label %203, label %243

203:                                              ; preds = %176
  %204 = load i64, ptr %15, align 8, !tbaa !8
  %205 = load i64, ptr %14, align 8, !tbaa !8
  %206 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !8
  %208 = add nsw i64 %207, 1
  %209 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %208
  %210 = getelementptr inbounds %"struct.std::pair", ptr %209, i32 0, i32 0
  %211 = load i64, ptr %210, align 16, !tbaa !13
  %212 = add nsw i64 %204, %211
  %213 = load i64, ptr %14, align 8, !tbaa !8
  %214 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %213
  %215 = getelementptr inbounds %"struct.std::pair", ptr %214, i32 0, i32 0
  %216 = load i64, ptr %215, align 16, !tbaa !13
  %217 = sub nsw i64 %212, %216
  %218 = load i64, ptr %14, align 8, !tbaa !8
  %219 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %218
  %220 = getelementptr inbounds %"struct.std::pair", ptr %219, i32 0, i32 1
  %221 = load i64, ptr %220, align 8, !tbaa !15
  %222 = sub nsw i64 %217, %221
  %223 = load i64, ptr %14, align 8, !tbaa !8
  %224 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %223
  %225 = load i64, ptr %224, align 8, !tbaa !8
  %226 = add nsw i64 %225, 1
  %227 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %226
  store i64 %222, ptr %227, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  %228 = load i64, ptr %14, align 8, !tbaa !8
  %229 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %228
  %230 = load i64, ptr %229, align 8, !tbaa !8
  %231 = add nsw i64 %230, 1
  %232 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %231
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %233 = load i64, ptr %14, align 8, !tbaa !8
  %234 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %233
  %235 = load i64, ptr %234, align 8, !tbaa !8
  %236 = add nsw i64 %235, 1
  store i64 %236, ptr %21, align 8, !tbaa !8
  invoke void @_ZNSt4pairIxxEC2IRxxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %232, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %237 unwind label %239

237:                                              ; preds = %203
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %238 unwind label %239

238:                                              ; preds = %237
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  br label %243

239:                                              ; preds = %237, %203
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %11, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  br label %247

243:                                              ; preds = %238, %176, %169
  store i32 0, ptr %16, align 4
  br label %244

244:                                              ; preds = %243, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %245 = load i32, ptr %16, align 4
  switch i32 %245, label %286 [
    i32 0, label %246
    i32 8, label %84
  ]

246:                                              ; preds = %244
  br label %84, !llvm.loop !21

247:                                              ; preds = %239, %165, %143, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %248

248:                                              ; preds = %247, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %280

249:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %250 = load i64, ptr @N, align 8, !tbaa !8
  %251 = sub nsw i64 %250, 1
  %252 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %251
  %253 = load i64, ptr %252, align 8, !tbaa !8
  store i64 %253, ptr %22, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store i64 0, ptr %23, align 8, !tbaa !8
  br label %254

254:                                              ; preds = %266, %249
  %255 = load i64, ptr %23, align 8, !tbaa !8
  %256 = load i64, ptr @N, align 8, !tbaa !8
  %257 = icmp slt i64 %255, %256
  br i1 %257, label %259, label %258

258:                                              ; preds = %254
  store i32 10, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %269

259:                                              ; preds = %254
  %260 = load i64, ptr %23, align 8, !tbaa !8
  %261 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %260
  %262 = getelementptr inbounds %"struct.std::pair", ptr %261, i32 0, i32 1
  %263 = load i64, ptr %262, align 8, !tbaa !15
  %264 = load i64, ptr %22, align 8, !tbaa !8
  %265 = add nsw i64 %264, %263
  store i64 %265, ptr %22, align 8, !tbaa !8
  br label %266

266:                                              ; preds = %259
  %267 = load i64, ptr %23, align 8, !tbaa !8
  %268 = add nsw i64 %267, 1
  store i64 %268, ptr %23, align 8, !tbaa !8
  br label %254, !llvm.loop !22

269:                                              ; preds = %258
  %270 = load i64, ptr %22, align 8, !tbaa !8
  %271 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %270)
          to label %272 unwind label %276

272:                                              ; preds = %269
  %273 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %271, ptr noundef @.str)
          to label %274 unwind label %276

274:                                              ; preds = %272
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  %275 = load i32, ptr %1, align 4
  ret i32 %275

276:                                              ; preds = %272, %269
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %11, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %280

280:                                              ; preds = %276, %248, %112, %108, %104
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  br label %281

281:                                              ; preds = %280
  %282 = load ptr, ptr %11, align 8
  %283 = load i32, ptr %12, align 4
  %284 = insertvalue { ptr, i32 } poison, ptr %282, 0
  %285 = insertvalue { ptr, i32 } %284, i32 %283, 1
  resume { ptr, i32 } %285

286:                                              ; preds = %244
  unreachable
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11upper_boundIPSt4pairIxxES1_ET_S3_S3_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) #5

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !9, i64 0}
!14 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!15 = !{!14, !9, i64 8}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !10, i64 0}
!18 = distinct !{!18, !12}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !10, i64 0}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}


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

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

@N = external dso_local global i64, align 8
@c = external dso_local global [100000 x %"struct.std::pair"], align 16
@nxt = external dso_local global [100000 x i64], align 16
@di = external dso_local global [1000000 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa = phi i64 [ %22, %0 ], [ %32, %.lr.ph ]
  %24 = getelementptr inbounds %"struct.std::pair", ptr @c, i64 %.lcssa
  tail call void @_ZSt4sortIPSt4pairIxxEEvT_S3_(ptr noundef nonnull @c, ptr noundef nonnull %24)
  %25 = load i64, ptr @N, align 8, !tbaa !8
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph54, label %._crit_edge55

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.03651 = phi i64 [ %31, %.lr.ph ], [ 0, %0 ]
  %27 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %.03651
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %29 = getelementptr inbounds i8, ptr %27, i64 8
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %31 = add nuw nsw i64 %.03651, 1
  %32 = load i64, ptr @N, align 8, !tbaa !8
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge55:                                    ; preds = %.lr.ph54, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 0, ptr %7, align 4, !tbaa !13
  call void @_ZNSt4pairIxxEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %50 unwind label %64

.lr.ph54:                                         ; preds = %._crit_edge, %.lr.ph54
  %34 = phi i64 [ %48, %.lr.ph54 ], [ %25, %._crit_edge ]
  %.04052 = phi i64 [ %47, %.lr.ph54 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %35 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %.04052
  %36 = load i64, ptr %35, align 16, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %35, i64 8
  %38 = load i64, ptr %37, align 8, !tbaa !17
  %39 = add nsw i64 %38, %36
  store i64 %39, ptr %1, align 8, !tbaa !8
  %40 = getelementptr inbounds %"struct.std::pair", ptr @c, i64 %34
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store double 1.000000e+09, ptr %3, align 8, !tbaa !18
  call void @_ZNSt4pairIxxEC2IRxdTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %41 = call noundef ptr @_ZSt11upper_boundIPSt4pairIxxES1_ET_S3_S3_RKT0_(ptr noundef nonnull @c, ptr noundef nonnull %40, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %42 = ptrtoint ptr %41 to i64
  %43 = sub i64 %42, ptrtoint (ptr @c to i64)
  %44 = ashr exact i64 %43, 4
  %45 = add nsw i64 %44, -1
  %46 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %.04052
  store i64 %45, ptr %46, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %47 = add nuw nsw i64 %.04052, 1
  %48 = load i64, ptr @N, align 8, !tbaa !8
  %49 = icmp slt i64 %47, %48
  br i1 %49, label %.lr.ph54, label %._crit_edge55, !llvm.loop !20

50:                                               ; preds = %._crit_edge55
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  %51 = load i64, ptr @N, align 8, !tbaa !8
  %52 = getelementptr inbounds i64, ptr @di, i64 %51
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  store double 1.000000e+09, ptr %8, align 8, !tbaa !18
  invoke void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef nonnull @di, ptr noundef nonnull %52, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %53 unwind label %66

53:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  store i64 0, ptr @di, align 16, !tbaa !8
  %54 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  br i1 %54, label %._crit_edge58, label %.lr.ph57

.lr.ph57:                                         ; preds = %53, %115
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load i64, ptr %56, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  %59 = load i64, ptr %58, align 8, !tbaa !15
  store i64 %59, ptr %9, align 8, !tbaa !8
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %60 unwind label %68

60:                                               ; preds = %.lr.ph57
  %61 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %57
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = load i64, ptr %9, align 8, !tbaa !8
  %.not = icmp eq i64 %62, %63
  br i1 %.not, label %70, label %115, !llvm.loop !21

64:                                               ; preds = %._crit_edge55
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  br label %143

66:                                               ; preds = %50
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %143

68:                                               ; preds = %.lr.ph57
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %117

70:                                               ; preds = %60
  %71 = icmp sgt i64 %57, 0
  br i1 %71, label %72, label %81

72:                                               ; preds = %70
  %73 = add nsw i64 %57, -1
  %74 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !8
  %76 = icmp sgt i64 %75, %62
  br i1 %76, label %77, label %81

77:                                               ; preds = %72
  store i64 %62, ptr %74, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  store i64 %73, ptr %11, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IRxxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %11)
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %78 unwind label %79

78:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  %.pre = load i64, ptr %9, align 8, !tbaa !8
  br label %81

79:                                               ; preds = %77
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %117

81:                                               ; preds = %78, %72, %70
  %82 = phi i64 [ %.pre, %78 ], [ %62, %72 ], [ %62, %70 ]
  %83 = getelementptr inbounds [100000 x i64], ptr @nxt, i64 0, i64 %57
  %84 = load i64, ptr %83, align 8, !tbaa !8
  %85 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !8
  %87 = icmp sgt i64 %86, %82
  br i1 %87, label %88, label %92

88:                                               ; preds = %81
  store i64 %82, ptr %85, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %83)
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %89 unwind label %90

89:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  %.pre67 = load i64, ptr %83, align 8, !tbaa !8
  br label %92

90:                                               ; preds = %88
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  br label %117

92:                                               ; preds = %89, %81
  %93 = phi i64 [ %.pre67, %89 ], [ %84, %81 ]
  %94 = load i64, ptr @N, align 8, !tbaa !8
  %95 = add nsw i64 %94, -1
  %96 = icmp slt i64 %93, %95
  br i1 %96, label %97, label %115

97:                                               ; preds = %92
  %98 = add nsw i64 %93, 1
  %99 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !8
  %101 = load i64, ptr %9, align 8, !tbaa !8
  %102 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %98
  %103 = load i64, ptr %102, align 16, !tbaa !15
  %104 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %57
  %105 = load i64, ptr %104, align 16, !tbaa !15
  %106 = getelementptr inbounds i8, ptr %104, i64 8
  %107 = load i64, ptr %106, align 8, !tbaa !17
  %.neg50 = add i64 %103, %101
  %108 = add i64 %105, %107
  %109 = sub i64 %.neg50, %108
  %110 = icmp sgt i64 %100, %109
  br i1 %110, label %111, label %115

111:                                              ; preds = %97
  store i64 %109, ptr %99, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  store i64 %98, ptr %14, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IRxxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull align 8 dereferenceable(8) %14)
  invoke void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %112 unwind label %113

112:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %115

113:                                              ; preds = %111
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %117

115:                                              ; preds = %92, %97, %112, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %116 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  br i1 %116, label %._crit_edge58, label %.lr.ph57

117:                                              ; preds = %113, %90, %79, %68
  %.pn = phi { ptr, i32 } [ %114, %113 ], [ %91, %90 ], [ %80, %79 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %143

._crit_edge58:                                    ; preds = %115, %53
  %118 = load i64, ptr @N, align 8, !tbaa !8
  %119 = add nsw i64 %118, -1
  %120 = getelementptr inbounds [1000000 x i64], ptr @di, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !8
  %122 = icmp sgt i64 %118, 0
  br i1 %122, label %.lr.ph62.preheader, label %._crit_edge63

.lr.ph62.preheader:                               ; preds = %._crit_edge58
  %min.iters.check = icmp ult i64 %118, 5
  br i1 %min.iters.check, label %.lr.ph62.preheader75, label %vector.ph

.lr.ph62.preheader75:                             ; preds = %middle.block, %.lr.ph62.preheader
  %.060.ph = phi i64 [ 0, %.lr.ph62.preheader ], [ %n.vec, %middle.block ]
  %.03559.ph = phi i64 [ %121, %.lr.ph62.preheader ], [ %132, %middle.block ]
  br label %.lr.ph62

vector.ph:                                        ; preds = %.lr.ph62.preheader
  %n.mod.vf = and i64 %118, 3
  %123 = icmp eq i64 %n.mod.vf, 0
  %124 = select i1 %123, i64 4, i64 %n.mod.vf
  %n.vec = sub nsw i64 %118, %124
  %125 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %121, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ %125, %vector.ph ], [ %129, %vector.body ]
  %vec.phi72 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %130, %vector.body ]
  %126 = or disjoint i64 %index, 2
  %127 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %index, i32 1
  %128 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %126, i32 1
  %wide.vec = load <4 x i64>, ptr %127, align 8, !tbaa !17
  %wide.vec73 = load <4 x i64>, ptr %128, align 8, !tbaa !17
  %strided.vec = shufflevector <4 x i64> %wide.vec, <4 x i64> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec74 = shufflevector <4 x i64> %wide.vec73, <4 x i64> poison, <2 x i32> <i32 0, i32 2>
  %129 = add <2 x i64> %strided.vec, %vec.phi
  %130 = add <2 x i64> %strided.vec74, %vec.phi72
  %index.next = add nuw i64 %index, 4
  %131 = icmp eq i64 %index.next, %n.vec
  br i1 %131, label %middle.block, label %vector.body, !llvm.loop !22

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %130, %129
  %132 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  br label %.lr.ph62.preheader75

._crit_edge63:                                    ; preds = %.lr.ph62, %._crit_edge58
  %.035.lcssa = phi i64 [ %121, %._crit_edge58 ], [ %136, %.lr.ph62 ]
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.035.lcssa)
          to label %138 unwind label %141

.lr.ph62:                                         ; preds = %.lr.ph62.preheader75, %.lr.ph62
  %.060 = phi i64 [ %137, %.lr.ph62 ], [ %.060.ph, %.lr.ph62.preheader75 ]
  %.03559 = phi i64 [ %136, %.lr.ph62 ], [ %.03559.ph, %.lr.ph62.preheader75 ]
  %134 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @c, i64 0, i64 %.060, i32 1
  %135 = load i64, ptr %134, align 8, !tbaa !17
  %136 = add nsw i64 %135, %.03559
  %137 = add nuw nsw i64 %.060, 1
  %exitcond.not = icmp eq i64 %137, %118
  br i1 %exitcond.not, label %._crit_edge63, label %.lr.ph62, !llvm.loop !25

138:                                              ; preds = %._crit_edge63
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull @.str)
          to label %140 unwind label %141

140:                                              ; preds = %138
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  ret i32 0

141:                                              ; preds = %138, %._crit_edge63
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %143

143:                                              ; preds = %141, %117, %66, %64
  %.pn.pn = phi { ptr, i32 } [ %.pn, %117 ], [ %142, %141 ], [ %67, %66 ], [ %65, %64 ]
  call void @_ZNSt14priority_queueISt4pairIxxESt6vectorIS1_SaIS1_EESt7greaterIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11upper_boundIPSt4pairIxxES1_ET_S3_S3_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxdEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !10, i64 0}
!15 = !{!16, !9, i64 0}
!16 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!17 = !{!16, !9, i64 8}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !10, i64 0}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12, !23, !24}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = distinct !{!25, !12, !24, !23}


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