; LLVM IR from eyangch/competitive-programming :: FacebookHackercup/2022/round1/b2 (b2)

; 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::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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::priority_queue.0" = type <{ %"class.std::vector", [8 x i8] }>

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@A = external dso_local global [500000 x i64], align 16
@B = external dso_local global [500000 x i64], align 16
@Q = external dso_local global i64, align 8
@X = external dso_local global [500000 x i64], align 16
@Y = external dso_local global [500000 x i64], align 16
@MOD = external dso_local global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 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 i32, align 4
  %4 = alloca %"class.std::priority_queue", align 8
  %5 = alloca %"class.std::priority_queue", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::priority_queue", align 8
  %9 = alloca %"class.std::priority_queue", align 8
  %10 = alloca %"class.std::priority_queue.0", align 8
  %11 = alloca %"class.std::priority_queue.0", align 8
  %12 = alloca %"class.std::priority_queue.0", align 8
  %13 = alloca %"class.std::priority_queue.0", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %40 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %41 = getelementptr i8, ptr %40, i64 -24
  %42 = load i64, ptr %41, align 8
  %43 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %42
  %44 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %43, ptr noundef null)
  %45 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 1, ptr %2, align 8, !tbaa !8
  br label %47

47:                                               ; preds = %400, %0
  %48 = load i64, ptr %2, align 8, !tbaa !8
  %49 = load i64, ptr @T, align 8, !tbaa !8
  %50 = icmp sle i64 %48, %49
  br i1 %50, label %52, label %51

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

52:                                               ; preds = %47
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %54 = load i64, ptr %2, align 8, !tbaa !8
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %53, i64 noundef %54)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @.str.1)
  %57 = 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 32, ptr %4) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %5)
          to label %58 unwind label %70

58:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #7
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
          to label %59 unwind label %74

59:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
          to label %60 unwind label %78

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %61 unwind label %82

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
          to label %62 unwind label %86

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %12)
          to label %63 unwind label %90

63:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %13)
          to label %64 unwind label %94

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !8
  br label %65

65:                                               ; preds = %119, %64
  %66 = load i64, ptr %14, align 8, !tbaa !8
  %67 = load i64, ptr @N, align 8, !tbaa !8
  %68 = icmp slt i64 %66, %67
  br i1 %68, label %98, label %69

69:                                               ; preds = %65
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %126

70:                                               ; preds = %52
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %6, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %7, align 4
  br label %415

74:                                               ; preds = %58
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  br label %414

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

82:                                               ; preds = %60
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %6, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %7, align 4
  br label %412

86:                                               ; preds = %61
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %6, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %7, align 4
  br label %411

90:                                               ; preds = %62
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %6, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %7, align 4
  br label %410

94:                                               ; preds = %63
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %6, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %7, align 4
  br label %409

98:                                               ; preds = %65
  %99 = load i64, ptr %14, align 8, !tbaa !8
  %100 = getelementptr inbounds [500000 x i64], ptr @A, i64 0, i64 %99
  %101 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %100)
          to label %102 unwind label %122

102:                                              ; preds = %98
  %103 = load i64, ptr %14, align 8, !tbaa !8
  %104 = getelementptr inbounds [500000 x i64], ptr @B, i64 0, i64 %103
  %105 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull align 8 dereferenceable(8) %104)
          to label %106 unwind label %122

106:                                              ; preds = %102
  %107 = load i64, ptr %14, align 8, !tbaa !8
  %108 = getelementptr inbounds [500000 x i64], ptr @A, i64 0, i64 %107
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(8) %108)
          to label %109 unwind label %122

109:                                              ; preds = %106
  %110 = load i64, ptr %14, align 8, !tbaa !8
  %111 = getelementptr inbounds [500000 x i64], ptr @B, i64 0, i64 %110
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %8, ptr noundef nonnull align 8 dereferenceable(8) %111)
          to label %112 unwind label %122

112:                                              ; preds = %109
  %113 = load i64, ptr %14, align 8, !tbaa !8
  %114 = getelementptr inbounds [500000 x i64], ptr @A, i64 0, i64 %113
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %10, ptr noundef nonnull align 8 dereferenceable(8) %114)
          to label %115 unwind label %122

115:                                              ; preds = %112
  %116 = load i64, ptr %14, align 8, !tbaa !8
  %117 = getelementptr inbounds [500000 x i64], ptr @B, i64 0, i64 %116
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %12, ptr noundef nonnull align 8 dereferenceable(8) %117)
          to label %118 unwind label %122

118:                                              ; preds = %115
  br label %119

119:                                              ; preds = %118
  %120 = load i64, ptr %14, align 8, !tbaa !8
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %14, align 8, !tbaa !8
  br label %65, !llvm.loop !11

122:                                              ; preds = %115, %112, %109, %106, %102, %98
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %6, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %408

126:                                              ; preds = %69
  %127 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @Q)
          to label %128 unwind label %134

128:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !8
  br label %129

129:                                              ; preds = %159, %128
  %130 = load i64, ptr %15, align 8, !tbaa !8
  %131 = load i64, ptr @Q, align 8, !tbaa !8
  %132 = icmp slt i64 %130, %131
  br i1 %132, label %138, label %133

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

134:                                              ; preds = %126
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %6, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %7, align 4
  br label %408

138:                                              ; preds = %129
  %139 = load i64, ptr %15, align 8, !tbaa !8
  %140 = getelementptr inbounds [500000 x i64], ptr @X, i64 0, i64 %139
  %141 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %140)
          to label %142 unwind label %162

142:                                              ; preds = %138
  %143 = load i64, ptr %15, align 8, !tbaa !8
  %144 = getelementptr inbounds [500000 x i64], ptr @Y, i64 0, i64 %143
  %145 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %141, ptr noundef nonnull align 8 dereferenceable(8) %144)
          to label %146 unwind label %162

146:                                              ; preds = %142
  %147 = load i64, ptr %15, align 8, !tbaa !8
  %148 = getelementptr inbounds [500000 x i64], ptr @X, i64 0, i64 %147
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %5, ptr noundef nonnull align 8 dereferenceable(8) %148)
          to label %149 unwind label %162

149:                                              ; preds = %146
  %150 = load i64, ptr %15, align 8, !tbaa !8
  %151 = getelementptr inbounds [500000 x i64], ptr @Y, i64 0, i64 %150
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %9, ptr noundef nonnull align 8 dereferenceable(8) %151)
          to label %152 unwind label %162

152:                                              ; preds = %149
  %153 = load i64, ptr %15, align 8, !tbaa !8
  %154 = getelementptr inbounds [500000 x i64], ptr @X, i64 0, i64 %153
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %11, ptr noundef nonnull align 8 dereferenceable(8) %154)
          to label %155 unwind label %162

155:                                              ; preds = %152
  %156 = load i64, ptr %15, align 8, !tbaa !8
  %157 = getelementptr inbounds [500000 x i64], ptr @Y, i64 0, i64 %156
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %13, ptr noundef nonnull align 8 dereferenceable(8) %157)
          to label %158 unwind label %162

158:                                              ; preds = %155
  br label %159

159:                                              ; preds = %158
  %160 = load i64, ptr %15, align 8, !tbaa !8
  %161 = add nsw i64 %160, 1
  store i64 %161, ptr %15, align 8, !tbaa !8
  br label %129, !llvm.loop !13

162:                                              ; preds = %155, %152, %149, %146, %142, %138
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %6, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %408

166:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 0, ptr %17, align 8, !tbaa !8
  br label %167

167:                                              ; preds = %390, %166
  %168 = load i64, ptr %17, align 8, !tbaa !8
  %169 = icmp slt i64 %168, 2
  br i1 %169, label %171, label %170

170:                                              ; preds = %167
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %394

171:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store i64 0, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 -1, ptr %21, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !8
  br label %172

172:                                              ; preds = %277, %171
  %173 = load i64, ptr %22, align 8, !tbaa !8
  %174 = load i64, ptr @N, align 8, !tbaa !8
  %175 = load i64, ptr @Q, align 8, !tbaa !8
  %176 = add nsw i64 %174, %175
  %177 = icmp slt i64 %173, %176
  br i1 %177, label %179, label %178

178:                                              ; preds = %172
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %280

179:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store i64 1000000000000000, ptr %23, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store i64 1000000000000000, ptr %24, align 8, !tbaa !8
  %180 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %181 unwind label %186

181:                                              ; preds = %179
  br i1 %180, label %190, label %182

182:                                              ; preds = %181
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %184 unwind label %186

184:                                              ; preds = %182
  %185 = load i64, ptr %183, align 8, !tbaa !8
  store i64 %185, ptr %23, align 8, !tbaa !8
  br label %190

186:                                              ; preds = %238, %201, %193, %190, %182, %179
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %6, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %393

190:                                              ; preds = %184, %181
  %191 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %5)
          to label %192 unwind label %186

192:                                              ; preds = %190
  br i1 %191, label %197, label %193

193:                                              ; preds = %192
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %5)
          to label %195 unwind label %186

195:                                              ; preds = %193
  %196 = load i64, ptr %194, align 8, !tbaa !8
  store i64 %196, ptr %24, align 8, !tbaa !8
  br label %197

197:                                              ; preds = %195, %192
  %198 = load i64, ptr %23, align 8, !tbaa !8
  %199 = load i64, ptr %24, align 8, !tbaa !8
  %200 = icmp sle i64 %198, %199
  br i1 %200, label %201, label %238

201:                                              ; preds = %197
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %202 unwind label %186

202:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %203 = load i64, ptr %19, align 8, !tbaa !8
  %204 = load i64, ptr %20, align 8, !tbaa !8
  %205 = add nsw i64 %203, %204
  %206 = load i64, ptr @MOD, align 8, !tbaa !8
  %207 = srem i64 %205, %206
  store i64 %207, ptr %25, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %208 = load i64, ptr %19, align 8, !tbaa !8
  %209 = load i64, ptr %23, align 8, !tbaa !8
  %210 = load i64, ptr %21, align 8, !tbaa !8
  %211 = sub nsw i64 %209, %210
  %212 = load i64, ptr %20, align 8, !tbaa !8
  %213 = mul nsw i64 %211, %212
  %214 = add nsw i64 %208, %213
  %215 = load i64, ptr @MOD, align 8, !tbaa !8
  %216 = srem i64 %214, %215
  store i64 %216, ptr %26, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %217 = load i64, ptr %25, align 8, !tbaa !8
  %218 = load i64, ptr %26, align 8, !tbaa !8
  %219 = add nsw i64 %217, %218
  %220 = mul nsw i64 %219, 500000004
  %221 = load i64, ptr @MOD, align 8, !tbaa !8
  %222 = srem i64 %220, %221
  store i64 %222, ptr %27, align 8, !tbaa !8
  %223 = load i64, ptr %18, align 8, !tbaa !8
  %224 = load i64, ptr %27, align 8, !tbaa !8
  %225 = load i64, ptr %23, align 8, !tbaa !8
  %226 = load i64, ptr %21, align 8, !tbaa !8
  %227 = sub nsw i64 %225, %226
  %228 = mul nsw i64 %224, %227
  %229 = add nsw i64 %223, %228
  %230 = load i64, ptr @MOD, align 8, !tbaa !8
  %231 = srem i64 %229, %230
  store i64 %231, ptr %18, align 8, !tbaa !8
  %232 = load i64, ptr %26, align 8, !tbaa !8
  store i64 %232, ptr %19, align 8, !tbaa !8
  %233 = load i64, ptr %23, align 8, !tbaa !8
  store i64 %233, ptr %21, align 8, !tbaa !8
  %234 = load i64, ptr %19, align 8, !tbaa !8
  %235 = sub nsw i64 %234, 1
  store i64 %235, ptr %19, align 8, !tbaa !8
  %236 = load i64, ptr %20, align 8, !tbaa !8
  %237 = add nsw i64 %236, 2
  store i64 %237, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %276

238:                                              ; preds = %197
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %5)
          to label %239 unwind label %186

239:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %240 = load i64, ptr %19, align 8, !tbaa !8
  %241 = load i64, ptr %20, align 8, !tbaa !8
  %242 = add nsw i64 %240, %241
  %243 = load i64, ptr @MOD, align 8, !tbaa !8
  %244 = srem i64 %242, %243
  store i64 %244, ptr %28, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %245 = load i64, ptr %19, align 8, !tbaa !8
  %246 = load i64, ptr %24, align 8, !tbaa !8
  %247 = load i64, ptr %21, align 8, !tbaa !8
  %248 = sub nsw i64 %246, %247
  %249 = load i64, ptr %20, align 8, !tbaa !8
  %250 = mul nsw i64 %248, %249
  %251 = add nsw i64 %245, %250
  %252 = load i64, ptr @MOD, align 8, !tbaa !8
  %253 = srem i64 %251, %252
  store i64 %253, ptr %29, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %254 = load i64, ptr %28, align 8, !tbaa !8
  %255 = load i64, ptr %29, align 8, !tbaa !8
  %256 = add nsw i64 %254, %255
  %257 = mul nsw i64 %256, 500000004
  %258 = load i64, ptr @MOD, align 8, !tbaa !8
  %259 = srem i64 %257, %258
  store i64 %259, ptr %30, align 8, !tbaa !8
  %260 = load i64, ptr %18, align 8, !tbaa !8
  %261 = load i64, ptr %30, align 8, !tbaa !8
  %262 = load i64, ptr %24, align 8, !tbaa !8
  %263 = load i64, ptr %21, align 8, !tbaa !8
  %264 = sub nsw i64 %262, %263
  %265 = mul nsw i64 %261, %264
  %266 = add nsw i64 %260, %265
  %267 = load i64, ptr @MOD, align 8, !tbaa !8
  %268 = srem i64 %266, %267
  store i64 %268, ptr %18, align 8, !tbaa !8
  %269 = load i64, ptr %29, align 8, !tbaa !8
  store i64 %269, ptr %19, align 8, !tbaa !8
  %270 = load i64, ptr %24, align 8, !tbaa !8
  store i64 %270, ptr %21, align 8, !tbaa !8
  %271 = load i64, ptr %16, align 8, !tbaa !8
  %272 = load i64, ptr %18, align 8, !tbaa !8
  %273 = add nsw i64 %271, %272
  %274 = load i64, ptr @MOD, align 8, !tbaa !8
  %275 = srem i64 %273, %274
  store i64 %275, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %276

276:                                              ; preds = %239, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %277

277:                                              ; preds = %276
  %278 = load i64, ptr %22, align 8, !tbaa !8
  %279 = add nsw i64 %278, 1
  store i64 %279, ptr %22, align 8, !tbaa !8
  br label %172, !llvm.loop !14

280:                                              ; preds = %178
  store i64 0, ptr %18, align 8, !tbaa !8
  store i64 0, ptr %19, align 8, !tbaa !8
  store i64 0, ptr %20, align 8, !tbaa !8
  store i64 1000000000000000, ptr %21, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store i64 0, ptr %31, align 8, !tbaa !8
  br label %281

281:                                              ; preds = %386, %280
  %282 = load i64, ptr %31, align 8, !tbaa !8
  %283 = load i64, ptr @N, align 8, !tbaa !8
  %284 = load i64, ptr @Q, align 8, !tbaa !8
  %285 = add nsw i64 %283, %284
  %286 = icmp slt i64 %282, %285
  br i1 %286, label %288, label %287

287:                                              ; preds = %281
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %389

288:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  store i64 -1, ptr %32, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  store i64 -1, ptr %33, align 8, !tbaa !8
  %289 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %290 unwind label %295

290:                                              ; preds = %288
  br i1 %289, label %299, label %291

291:                                              ; preds = %290
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %293 unwind label %295

293:                                              ; preds = %291
  %294 = load i64, ptr %292, align 8, !tbaa !8
  store i64 %294, ptr %32, align 8, !tbaa !8
  br label %299

295:                                              ; preds = %347, %310, %302, %299, %291, %288
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %6, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %393

299:                                              ; preds = %293, %290
  %300 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
          to label %301 unwind label %295

301:                                              ; preds = %299
  br i1 %300, label %306, label %302

302:                                              ; preds = %301
  %303 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
          to label %304 unwind label %295

304:                                              ; preds = %302
  %305 = load i64, ptr %303, align 8, !tbaa !8
  store i64 %305, ptr %33, align 8, !tbaa !8
  br label %306

306:                                              ; preds = %304, %301
  %307 = load i64, ptr %32, align 8, !tbaa !8
  %308 = load i64, ptr %33, align 8, !tbaa !8
  %309 = icmp sge i64 %307, %308
  br i1 %309, label %310, label %347

310:                                              ; preds = %306
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %311 unwind label %295

311:                                              ; preds = %310
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %312 = load i64, ptr %19, align 8, !tbaa !8
  %313 = load i64, ptr %20, align 8, !tbaa !8
  %314 = add nsw i64 %312, %313
  %315 = load i64, ptr @MOD, align 8, !tbaa !8
  %316 = srem i64 %314, %315
  store i64 %316, ptr %34, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %317 = load i64, ptr %19, align 8, !tbaa !8
  %318 = load i64, ptr %21, align 8, !tbaa !8
  %319 = load i64, ptr %32, align 8, !tbaa !8
  %320 = sub nsw i64 %318, %319
  %321 = load i64, ptr %20, align 8, !tbaa !8
  %322 = mul nsw i64 %320, %321
  %323 = add nsw i64 %317, %322
  %324 = load i64, ptr @MOD, align 8, !tbaa !8
  %325 = srem i64 %323, %324
  store i64 %325, ptr %35, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %326 = load i64, ptr %34, align 8, !tbaa !8
  %327 = load i64, ptr %35, align 8, !tbaa !8
  %328 = add nsw i64 %326, %327
  %329 = mul nsw i64 %328, 500000004
  %330 = load i64, ptr @MOD, align 8, !tbaa !8
  %331 = srem i64 %329, %330
  store i64 %331, ptr %36, align 8, !tbaa !8
  %332 = load i64, ptr %18, align 8, !tbaa !8
  %333 = load i64, ptr %36, align 8, !tbaa !8
  %334 = load i64, ptr %21, align 8, !tbaa !8
  %335 = load i64, ptr %32, align 8, !tbaa !8
  %336 = sub nsw i64 %334, %335
  %337 = mul nsw i64 %333, %336
  %338 = add nsw i64 %332, %337
  %339 = load i64, ptr @MOD, align 8, !tbaa !8
  %340 = srem i64 %338, %339
  store i64 %340, ptr %18, align 8, !tbaa !8
  %341 = load i64, ptr %35, align 8, !tbaa !8
  store i64 %341, ptr %19, align 8, !tbaa !8
  %342 = load i64, ptr %32, align 8, !tbaa !8
  store i64 %342, ptr %21, align 8, !tbaa !8
  %343 = load i64, ptr %19, align 8, !tbaa !8
  %344 = sub nsw i64 %343, 1
  store i64 %344, ptr %19, align 8, !tbaa !8
  %345 = load i64, ptr %20, align 8, !tbaa !8
  %346 = add nsw i64 %345, 2
  store i64 %346, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %385

347:                                              ; preds = %306
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %11)
          to label %348 unwind label %295

348:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %349 = load i64, ptr %19, align 8, !tbaa !8
  %350 = load i64, ptr %20, align 8, !tbaa !8
  %351 = add nsw i64 %349, %350
  %352 = load i64, ptr @MOD, align 8, !tbaa !8
  %353 = srem i64 %351, %352
  store i64 %353, ptr %37, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %354 = load i64, ptr %19, align 8, !tbaa !8
  %355 = load i64, ptr %21, align 8, !tbaa !8
  %356 = load i64, ptr %33, align 8, !tbaa !8
  %357 = sub nsw i64 %355, %356
  %358 = load i64, ptr %20, align 8, !tbaa !8
  %359 = mul nsw i64 %357, %358
  %360 = add nsw i64 %354, %359
  %361 = load i64, ptr @MOD, align 8, !tbaa !8
  %362 = srem i64 %360, %361
  store i64 %362, ptr %38, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %363 = load i64, ptr %37, align 8, !tbaa !8
  %364 = load i64, ptr %38, align 8, !tbaa !8
  %365 = add nsw i64 %363, %364
  %366 = mul nsw i64 %365, 500000004
  %367 = load i64, ptr @MOD, align 8, !tbaa !8
  %368 = srem i64 %366, %367
  store i64 %368, ptr %39, align 8, !tbaa !8
  %369 = load i64, ptr %18, align 8, !tbaa !8
  %370 = load i64, ptr %39, align 8, !tbaa !8
  %371 = load i64, ptr %21, align 8, !tbaa !8
  %372 = load i64, ptr %33, align 8, !tbaa !8
  %373 = sub nsw i64 %371, %372
  %374 = mul nsw i64 %370, %373
  %375 = add nsw i64 %369, %374
  %376 = load i64, ptr @MOD, align 8, !tbaa !8
  %377 = srem i64 %375, %376
  store i64 %377, ptr %18, align 8, !tbaa !8
  %378 = load i64, ptr %38, align 8, !tbaa !8
  store i64 %378, ptr %19, align 8, !tbaa !8
  %379 = load i64, ptr %33, align 8, !tbaa !8
  store i64 %379, ptr %21, align 8, !tbaa !8
  %380 = load i64, ptr %16, align 8, !tbaa !8
  %381 = load i64, ptr %18, align 8, !tbaa !8
  %382 = add nsw i64 %380, %381
  %383 = load i64, ptr @MOD, align 8, !tbaa !8
  %384 = srem i64 %382, %383
  store i64 %384, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  br label %385

385:                                              ; preds = %348, %311
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %386

386:                                              ; preds = %385
  %387 = load i64, ptr %31, align 8, !tbaa !8
  %388 = add nsw i64 %387, 1
  store i64 %388, ptr %31, align 8, !tbaa !8
  br label %281, !llvm.loop !15

389:                                              ; preds = %287
  call void @_ZSt4swapIxSt6vectorIxSaIxEESt7greaterIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(25) %8) #7
  call void @_ZSt4swapIxSt6vectorIxSaIxEESt7greaterIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25) %5, ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  call void @_ZSt4swapIxSt6vectorIxSaIxEESt4lessIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25) %10, ptr noundef nonnull align 8 dereferenceable(25) %12) #7
  call void @_ZSt4swapIxSt6vectorIxSaIxEESt4lessIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25) %11, ptr noundef nonnull align 8 dereferenceable(25) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %390

390:                                              ; preds = %389
  %391 = load i64, ptr %17, align 8, !tbaa !8
  %392 = add nsw i64 %391, 1
  store i64 %392, ptr %17, align 8, !tbaa !8
  br label %167, !llvm.loop !16

393:                                              ; preds = %295, %186
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %407

394:                                              ; preds = %170
  %395 = load i64, ptr %16, align 8, !tbaa !8
  %396 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %395)
          to label %397 unwind label %403

397:                                              ; preds = %394
  %398 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %396, i8 noundef signext 10)
          to label %399 unwind label %403

399:                                              ; preds = %397
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  br label %400

400:                                              ; preds = %399
  %401 = load i64, ptr %2, align 8, !tbaa !8
  %402 = add nsw i64 %401, 1
  store i64 %402, ptr %2, align 8, !tbaa !8
  br label %47, !llvm.loop !17

403:                                              ; preds = %397, %394
  %404 = landingpad { ptr, i32 }
          cleanup
  %405 = extractvalue { ptr, i32 } %404, 0
  store ptr %405, ptr %6, align 8
  %406 = extractvalue { ptr, i32 } %404, 1
  store i32 %406, ptr %7, align 4
  br label %407

407:                                              ; preds = %403, %393
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %408

408:                                              ; preds = %407, %162, %134, %122
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %13) #7
  br label %409

409:                                              ; preds = %408, %94
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %12) #7
  br label %410

410:                                              ; preds = %409, %90
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %11) #7
  br label %411

411:                                              ; preds = %410, %86
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %10) #7
  br label %412

412:                                              ; preds = %411, %82
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  br label %413

413:                                              ; preds = %412, %78
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %8) #7
  br label %414

414:                                              ; preds = %413, %74
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #7
  br label %415

415:                                              ; preds = %414, %70
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %418

416:                                              ; preds = %51
  %417 = load i32, ptr %1, align 4
  ret i32 %417

418:                                              ; preds = %415
  %419 = load ptr, ptr %6, align 8
  %420 = load i32, ptr %7, align 4
  %421 = insertvalue { ptr, i32 } poison, ptr %419, 0
  %422 = insertvalue { ptr, i32 } %421, i32 %420, 1
  resume { ptr, i32 } %422
}

; 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: 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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::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<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::priority_queue.0" = type <{ %"class.std::vector", [8 x i8] }>

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@A = external dso_local global [500000 x i64], align 16
@B = external dso_local global [500000 x i64], align 16
@Q = external dso_local global i64, align 8
@X = external dso_local global [500000 x i64], align 16
@Y = external dso_local global [500000 x i64], align 16
@MOD = external dso_local local_unnamed_addr global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 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 %"class.std::priority_queue", align 8
  %2 = alloca %"class.std::priority_queue", align 8
  %3 = alloca %"class.std::priority_queue", align 8
  %4 = alloca %"class.std::priority_queue", align 8
  %5 = alloca %"class.std::priority_queue.0", align 8
  %6 = alloca %"class.std::priority_queue.0", align 8
  %7 = alloca %"class.std::priority_queue.0", align 8
  %8 = alloca %"class.std::priority_queue.0", align 8
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  %14 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %16 = load i64, ptr @T, align 8, !tbaa !8
  %.not162 = icmp slt i64 %16, 1
  br i1 %.not162, label %._crit_edge166, label %.lr.ph165

._crit_edge166:                                   ; preds = %172, %0
  ret i32 0

.lr.ph165:                                        ; preds = %0, %172
  %.0163 = phi i64 [ %173, %172 ], [ 1, %0 ]
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %17, i64 noundef %.0163)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.1)
  %20 = 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 32, ptr nonnull %1) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %5)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  %21 = load i64, ptr @N, align 8, !tbaa !8
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %35, %.lr.ph165
  %23 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @Q)
          to label %.preheader136 unwind label %41

.preheader136:                                    ; preds = %._crit_edge
  %24 = load i64, ptr @Q, align 8, !tbaa !8
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %.lr.ph143, label %.preheader134.preheader

.preheader134.preheader:                          ; preds = %52, %.preheader136
  br label %.preheader134

.lr.ph:                                           ; preds = %.lr.ph165, %35
  %.0100141 = phi i64 [ %36, %35 ], [ 0, %.lr.ph165 ]
  %26 = getelementptr inbounds [500000 x i64], ptr @A, i64 0, i64 %.0100141
  %27 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %28 unwind label %39

28:                                               ; preds = %.lr.ph
  %29 = getelementptr inbounds [500000 x i64], ptr @B, i64 0, i64 %.0100141
  %30 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %31 unwind label %39

31:                                               ; preds = %28
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %32 unwind label %39

32:                                               ; preds = %31
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %33 unwind label %39

33:                                               ; preds = %32
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %5, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %34 unwind label %39

34:                                               ; preds = %33
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %7, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %35 unwind label %39

35:                                               ; preds = %34
  %36 = add nuw nsw i64 %.0100141, 1
  %37 = load i64, ptr @N, align 8, !tbaa !8
  %38 = icmp slt i64 %36, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !11

39:                                               ; preds = %34, %33, %32, %31, %28, %.lr.ph
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %177

41:                                               ; preds = %._crit_edge
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %177

.lr.ph143:                                        ; preds = %.preheader136, %52
  %.0101142 = phi i64 [ %53, %52 ], [ 0, %.preheader136 ]
  %43 = getelementptr inbounds [500000 x i64], ptr @X, i64 0, i64 %.0101142
  %44 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %45 unwind label %56

45:                                               ; preds = %.lr.ph143
  %46 = getelementptr inbounds [500000 x i64], ptr @Y, i64 0, i64 %.0101142
  %47 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %48 unwind label %56

48:                                               ; preds = %45
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %49 unwind label %56

49:                                               ; preds = %48
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %50 unwind label %56

50:                                               ; preds = %49
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %51 unwind label %56

51:                                               ; preds = %50
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %8, ptr noundef nonnull align 8 dereferenceable(8) %46)
          to label %52 unwind label %56

52:                                               ; preds = %51
  %53 = add nuw nsw i64 %.0101142, 1
  %54 = load i64, ptr @Q, align 8, !tbaa !8
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %.lr.ph143, label %.preheader134.preheader, !llvm.loop !13

56:                                               ; preds = %51, %50, %49, %48, %45, %.lr.ph143
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %177

.preheader134:                                    ; preds = %.preheader134.preheader, %._crit_edge158
  %.0105161 = phi i64 [ %.3.lcssa, %._crit_edge158 ], [ 0, %.preheader134.preheader ]
  %58 = phi i1 [ false, %._crit_edge158 ], [ true, %.preheader134.preheader ]
  %59 = load i64, ptr @N, align 8, !tbaa !8
  %60 = load i64, ptr @Q, align 8, !tbaa !8
  %61 = add nsw i64 %60, %59
  %62 = icmp sgt i64 %61, 0
  br i1 %62, label %.lr.ph150, label %._crit_edge158

63:                                               ; preds = %._crit_edge158
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.3.lcssa)
          to label %170 unwind label %175

.preheader:                                       ; preds = %112
  %65 = icmp sgt i64 %116, 0
  br i1 %65, label %.lr.ph157, label %._crit_edge158

.lr.ph150:                                        ; preds = %.preheader134, %112
  %.1106149 = phi i64 [ %.2107, %112 ], [ %.0105161, %.preheader134 ]
  %.0109148 = phi i64 [ %.1110, %112 ], [ 0, %.preheader134 ]
  %.0113147 = phi i64 [ %.1114, %112 ], [ 0, %.preheader134 ]
  %.0117146 = phi i64 [ %.1118, %112 ], [ 0, %.preheader134 ]
  %.0121145 = phi i64 [ %.1122, %112 ], [ -1, %.preheader134 ]
  %.0127144 = phi i64 [ %113, %112 ], [ 0, %.preheader134 ]
  %66 = call noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  br i1 %66, label %72, label %67

67:                                               ; preds = %.lr.ph150
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %69 = load i64, ptr %68, align 8, !tbaa !8
  br label %72

70:                                               ; preds = %95, %78
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %177

72:                                               ; preds = %67, %.lr.ph150
  %.0126 = phi i64 [ 1000000000000000, %.lr.ph150 ], [ %69, %67 ]
  %73 = call noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  br i1 %73, label %77, label %74

74:                                               ; preds = %72
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %76 = load i64, ptr %75, align 8, !tbaa !8
  br label %77

77:                                               ; preds = %74, %72
  %.0125 = phi i64 [ 1000000000000000, %72 ], [ %76, %74 ]
  %.not129 = icmp sgt i64 %.0126, %.0125
  br i1 %.not129, label %95, label %78

78:                                               ; preds = %77
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
          to label %79 unwind label %70

79:                                               ; preds = %78
  %80 = add nsw i64 %.0113147, %.0117146
  %81 = load i64, ptr @MOD, align 8, !tbaa !8
  %82 = srem i64 %80, %81
  %83 = sub nsw i64 %.0126, %.0121145
  %84 = mul nsw i64 %83, %.0117146
  %85 = add nsw i64 %84, %.0113147
  %86 = srem i64 %85, %81
  %87 = add nsw i64 %86, %82
  %88 = mul nsw i64 %87, 500000004
  %89 = srem i64 %88, %81
  %90 = mul nsw i64 %89, %83
  %91 = add nsw i64 %90, %.0109148
  %92 = srem i64 %91, %81
  %93 = add nsw i64 %86, -1
  %94 = add nsw i64 %.0117146, 2
  br label %112

95:                                               ; preds = %77
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
          to label %96 unwind label %70

96:                                               ; preds = %95
  %97 = add nsw i64 %.0113147, %.0117146
  %98 = load i64, ptr @MOD, align 8, !tbaa !8
  %99 = srem i64 %97, %98
  %100 = sub nsw i64 %.0125, %.0121145
  %101 = mul nsw i64 %100, %.0117146
  %102 = add nsw i64 %101, %.0113147
  %103 = srem i64 %102, %98
  %104 = add nsw i64 %103, %99
  %105 = mul nsw i64 %104, 500000004
  %106 = srem i64 %105, %98
  %107 = mul nsw i64 %106, %100
  %108 = add nsw i64 %107, %.0109148
  %109 = srem i64 %108, %98
  %110 = add nsw i64 %109, %.1106149
  %111 = srem i64 %110, %98
  br label %112

112:                                              ; preds = %96, %79
  %.1122 = phi i64 [ %.0126, %79 ], [ %.0125, %96 ]
  %.1118 = phi i64 [ %94, %79 ], [ %.0117146, %96 ]
  %.1114 = phi i64 [ %93, %79 ], [ %103, %96 ]
  %.1110 = phi i64 [ %92, %79 ], [ %109, %96 ]
  %.2107 = phi i64 [ %.1106149, %79 ], [ %111, %96 ]
  %113 = add nuw nsw i64 %.0127144, 1
  %114 = load i64, ptr @N, align 8, !tbaa !8
  %115 = load i64, ptr @Q, align 8, !tbaa !8
  %116 = add nsw i64 %115, %114
  %117 = icmp slt i64 %113, %116
  br i1 %117, label %.lr.ph150, label %.preheader, !llvm.loop !14

._crit_edge158:                                   ; preds = %164, %.preheader134, %.preheader
  %.3.lcssa = phi i64 [ %.2107, %.preheader ], [ %.0105161, %.preheader134 ], [ %.4, %164 ]
  call void @_ZSt4swapIxSt6vectorIxSaIxEESt7greaterIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @_ZSt4swapIxSt6vectorIxSaIxEESt7greaterIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @_ZSt4swapIxSt6vectorIxSaIxEESt4lessIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25) %5, ptr noundef nonnull align 8 dereferenceable(25) %7) #7
  call void @_ZSt4swapIxSt6vectorIxSaIxEESt4lessIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 8 dereferenceable(25) %8) #7
  br i1 %58, label %.preheader134, label %63, !llvm.loop !15

.lr.ph157:                                        ; preds = %.preheader, %164
  %.0104156 = phi i64 [ %165, %164 ], [ 0, %.preheader ]
  %.3155 = phi i64 [ %.4, %164 ], [ %.2107, %.preheader ]
  %.2111154 = phi i64 [ %.3112, %164 ], [ 0, %.preheader ]
  %.2115153 = phi i64 [ %.3116, %164 ], [ 0, %.preheader ]
  %.2119152 = phi i64 [ %.3120, %164 ], [ 0, %.preheader ]
  %.2123151 = phi i64 [ %.3124, %164 ], [ 1000000000000000, %.preheader ]
  %118 = call noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %5)
  br i1 %118, label %124, label %119

119:                                              ; preds = %.lr.ph157
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %5)
  %121 = load i64, ptr %120, align 8, !tbaa !8
  br label %124

122:                                              ; preds = %147, %130
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %177

124:                                              ; preds = %119, %.lr.ph157
  %.0103 = phi i64 [ -1, %.lr.ph157 ], [ %121, %119 ]
  %125 = call noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  br i1 %125, label %129, label %126

126:                                              ; preds = %124
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  %128 = load i64, ptr %127, align 8, !tbaa !8
  br label %129

129:                                              ; preds = %126, %124
  %.0102 = phi i64 [ -1, %124 ], [ %128, %126 ]
  %.not128 = icmp slt i64 %.0103, %.0102
  br i1 %.not128, label %147, label %130

130:                                              ; preds = %129
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %5)
          to label %131 unwind label %122

131:                                              ; preds = %130
  %132 = add nsw i64 %.2115153, %.2119152
  %133 = load i64, ptr @MOD, align 8, !tbaa !8
  %134 = srem i64 %132, %133
  %135 = sub nsw i64 %.2123151, %.0103
  %136 = mul nsw i64 %135, %.2119152
  %137 = add nsw i64 %136, %.2115153
  %138 = srem i64 %137, %133
  %139 = add nsw i64 %138, %134
  %140 = mul nsw i64 %139, 500000004
  %141 = srem i64 %140, %133
  %142 = mul nsw i64 %141, %135
  %143 = add nsw i64 %142, %.2111154
  %144 = srem i64 %143, %133
  %145 = add nsw i64 %138, -1
  %146 = add nsw i64 %.2119152, 2
  br label %164

147:                                              ; preds = %129
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
          to label %148 unwind label %122

148:                                              ; preds = %147
  %149 = add nsw i64 %.2115153, %.2119152
  %150 = load i64, ptr @MOD, align 8, !tbaa !8
  %151 = srem i64 %149, %150
  %152 = sub nsw i64 %.2123151, %.0102
  %153 = mul nsw i64 %152, %.2119152
  %154 = add nsw i64 %153, %.2115153
  %155 = srem i64 %154, %150
  %156 = add nsw i64 %155, %151
  %157 = mul nsw i64 %156, 500000004
  %158 = srem i64 %157, %150
  %159 = mul nsw i64 %158, %152
  %160 = add nsw i64 %159, %.2111154
  %161 = srem i64 %160, %150
  %162 = add nsw i64 %161, %.3155
  %163 = srem i64 %162, %150
  br label %164

164:                                              ; preds = %148, %131
  %.3124 = phi i64 [ %.0103, %131 ], [ %.0102, %148 ]
  %.3120 = phi i64 [ %146, %131 ], [ %.2119152, %148 ]
  %.3116 = phi i64 [ %145, %131 ], [ %155, %148 ]
  %.3112 = phi i64 [ %144, %131 ], [ %161, %148 ]
  %.4 = phi i64 [ %.3155, %131 ], [ %163, %148 ]
  %165 = add nuw nsw i64 %.0104156, 1
  %166 = load i64, ptr @N, align 8, !tbaa !8
  %167 = load i64, ptr @Q, align 8, !tbaa !8
  %168 = add nsw i64 %167, %166
  %169 = icmp slt i64 %165, %168
  br i1 %169, label %.lr.ph157, label %._crit_edge158, !llvm.loop !16

170:                                              ; preds = %63
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %64, i8 noundef signext 10)
          to label %172 unwind label %175

172:                                              ; preds = %170
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  %173 = add nuw nsw i64 %.0163, 1
  %174 = load i64, ptr @T, align 8, !tbaa !8
  %.not.not = icmp slt i64 %.0163, %174
  br i1 %.not.not, label %.lr.ph165, label %._crit_edge166, !llvm.loop !17

175:                                              ; preds = %170, %63
  %176 = landingpad { ptr, i32 }
          cleanup
  br label %177

177:                                              ; preds = %175, %122, %70, %56, %41, %39
  %.pn132 = phi { ptr, i32 } [ %40, %39 ], [ %57, %56 ], [ %42, %41 ], [ %176, %175 ], [ %71, %70 ], [ %123, %122 ]
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn132
}

; 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: 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25), 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.end.p0(i64 immarg, ptr nocapture) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE5emptyEv(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(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE5emptyEv(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(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIxSt6vectorIxSaIxEESt7greaterIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIxSt6vectorIxSaIxEESt4lessIxEENSt9enable_ifIXsr6__and_ISt14__is_swappableIT0_ES6_IT1_EEE5valueEvE4typeERSt14priority_queueIT_S7_S9_ESG_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEED2Ev(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 = { 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 = { 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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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