; LLVM IR from kazunetakahashi/atcoder :: 2017/1115_ABC062 (D)

; 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] }>

@N = external dso_local global i32, align 4
@a = external dso_local global [300010 x i64], align 16
@plusscore = external dso_local global [300010 x i64], align 16
@minusscore = external dso_local global [300010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL5infty = external hidden constant i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::priority_queue", align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::priority_queue.0", align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %26, %0
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr @N, align 4, !tbaa !5
  %18 = mul nsw i32 3, %17
  %19 = icmp slt i32 %16, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %29

21:                                               ; preds = %15
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [300010 x i64], ptr @a, i64 0, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  br label %26

26:                                               ; preds = %21
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %2, align 4, !tbaa !5
  br label %15, !llvm.loop !9

29:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store i64 -10000000000000007, ptr %3, align 8, !tbaa !11
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @plusscore, ptr noundef getelementptr inbounds (i64, ptr @plusscore, i64 300010), ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef @minusscore, ptr noundef getelementptr inbounds (i64, ptr @minusscore, i64 300010), ptr noundef nonnull align 8 dereferenceable(8) @_ZL5infty)
  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 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %69, %29
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = load i32, ptr @N, align 4, !tbaa !5
  %33 = mul nsw i32 2, %32
  %34 = icmp slt i32 %31, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %72

36:                                               ; preds = %30
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [300010 x i64], ptr @a, i64 0, i64 %38
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %40 unwind label %60

40:                                               ; preds = %36
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [300010 x i64], ptr @a, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !11
  %45 = load i64, ptr %5, align 8, !tbaa !11
  %46 = add nsw i64 %45, %44
  store i64 %46, ptr %5, align 8, !tbaa !11
  br label %47

47:                                               ; preds = %59, %40
  %48 = invoke noundef i64 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %49 unwind label %60

49:                                               ; preds = %47
  %50 = trunc i64 %48 to i32
  %51 = load i32, ptr @N, align 4, !tbaa !5
  %52 = icmp sgt i32 %50, %51
  br i1 %52, label %53, label %64

53:                                               ; preds = %49
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %55 unwind label %60

55:                                               ; preds = %53
  %56 = load i64, ptr %54, align 8, !tbaa !11
  %57 = load i64, ptr %5, align 8, !tbaa !11
  %58 = sub nsw i64 %57, %56
  store i64 %58, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %4)
          to label %59 unwind label %60

59:                                               ; preds = %55
  br label %47, !llvm.loop !13

60:                                               ; preds = %55, %53, %47, %36
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %166

64:                                               ; preds = %49
  %65 = load i64, ptr %5, align 8, !tbaa !11
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [300010 x i64], ptr @plusscore, i64 0, i64 %67
  store i64 %65, ptr %68, align 8, !tbaa !11
  br label %69

69:                                               ; preds = %64
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %6, align 4, !tbaa !5
  br label %30, !llvm.loop !14

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

73:                                               ; preds = %72
  store i64 0, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %74 = load i32, ptr @N, align 4, !tbaa !5
  %75 = mul nsw i32 3, %74
  %76 = sub nsw i32 %75, 1
  store i32 %76, ptr %10, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %119, %73
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = load i32, ptr @N, align 4, !tbaa !5
  %80 = icmp sge i32 %78, %79
  br i1 %80, label %86, label %81

81:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %122

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

86:                                               ; preds = %77
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [300010 x i64], ptr @a, i64 0, i64 %88
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %9, ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %90 unwind label %110

90:                                               ; preds = %86
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [300010 x i64], ptr @a, i64 0, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = load i64, ptr %5, align 8, !tbaa !11
  %96 = add nsw i64 %95, %94
  store i64 %96, ptr %5, align 8, !tbaa !11
  br label %97

97:                                               ; preds = %109, %90
  %98 = invoke noundef i64 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
          to label %99 unwind label %110

99:                                               ; preds = %97
  %100 = trunc i64 %98 to i32
  %101 = load i32, ptr @N, align 4, !tbaa !5
  %102 = icmp sgt i32 %100, %101
  br i1 %102, label %103, label %114

103:                                              ; preds = %99
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
          to label %105 unwind label %110

105:                                              ; preds = %103
  %106 = load i64, ptr %104, align 8, !tbaa !11
  %107 = load i64, ptr %5, align 8, !tbaa !11
  %108 = sub nsw i64 %107, %106
  store i64 %108, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %9)
          to label %109 unwind label %110

109:                                              ; preds = %105
  br label %97, !llvm.loop !15

110:                                              ; preds = %105, %103, %97, %86
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %7, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %164

114:                                              ; preds = %99
  %115 = load i64, ptr %5, align 8, !tbaa !11
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [300010 x i64], ptr @minusscore, i64 0, i64 %117
  store i64 %115, ptr %118, align 8, !tbaa !11
  br label %119

119:                                              ; preds = %114
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = add nsw i32 %120, -1
  store i32 %121, ptr %10, align 4, !tbaa !5
  br label %77, !llvm.loop !16

122:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 -30000000000000021, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %123 = load i32, ptr @N, align 4, !tbaa !5
  %124 = sub nsw i32 %123, 1
  store i32 %124, ptr %12, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %145, %122
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = load i32, ptr @N, align 4, !tbaa !5
  %128 = mul nsw i32 2, %127
  %129 = icmp slt i32 %126, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %152

131:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [300010 x i64], ptr @plusscore, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !11
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [300010 x i64], ptr @minusscore, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !11
  %141 = sub nsw i64 %135, %140
  store i64 %141, ptr %13, align 8, !tbaa !11
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %143 unwind label %148

143:                                              ; preds = %131
  %144 = load i64, ptr %142, align 8, !tbaa !11
  store i64 %144, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %145

145:                                              ; preds = %143
  %146 = load i32, ptr %12, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %12, align 4, !tbaa !5
  br label %125, !llvm.loop !17

148:                                              ; preds = %131
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %7, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %163

152:                                              ; preds = %130
  %153 = load i64, ptr %11, align 8, !tbaa !11
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %153)
          to label %155 unwind label %159

155:                                              ; preds = %152
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %157 unwind label %159

157:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, 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
  %158 = load i32, ptr %1, align 4
  ret i32 %158

159:                                              ; preds = %155, %152
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %7, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %8, align 4
  br label %163

163:                                              ; preds = %159, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %164

164:                                              ; preds = %163, %110
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  br label %165

165:                                              ; preds = %164, %82
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  br label %166

166:                                              ; preds = %165, %60
  call void @llvm.lifetime.end.p0(i64 8, 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 %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %7, align 8
  %169 = load i32, ptr %8, align 4
  %170 = insertvalue { ptr, i32 } poison, ptr %168, 0
  %171 = insertvalue { ptr, i32 } %170, i32 %169, 1
  resume { ptr, i32 } %171
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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.end.p0(i64 immarg, ptr nocapture) #2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) #5 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)) #5 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 void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #5 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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) #5 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)) #5 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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


; 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] }>

@N = external dso_local global i32, align 4
@a = external dso_local global [300010 x i64], align 16
@plusscore = external dso_local global [300010 x i64], align 16
@minusscore = external dso_local global [300010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL5infty = external hidden constant i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 %"class.std::priority_queue", align 8
  %3 = alloca %"class.std::priority_queue.0", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %7 = load i32, ptr @N, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store i64 -10000000000000007, ptr %1, align 8, !tbaa !9
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @plusscore, ptr noundef nonnull getelementptr inbounds (i8, ptr @plusscore, i64 2400080), ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull @minusscore, ptr noundef nonnull getelementptr inbounds (i8, ptr @minusscore, i64 2400080), ptr noundef nonnull align 8 dereferenceable(8) @_ZL5infty)
  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)
  %9 = load i32, ptr @N, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph49, label %._crit_edge50

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %11 = getelementptr inbounds [300010 x i64], ptr @a, i64 0, i64 %indvars.iv
  %12 = 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) %11)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %13 = load i32, ptr @N, align 4, !tbaa !5
  %14 = mul nsw i32 %13, 3
  %15 = sext i32 %14 to i64
  %16 = icmp slt i64 %indvars.iv.next, %15
  br i1 %16, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge50:                                    ; preds = %33, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  %17 = load i32, ptr @N, align 4, !tbaa !5
  %18 = mul nsw i32 %17, 3
  %.not.not52 = icmp sgt i32 %18, %17
  br i1 %.not.not52, label %.lr.ph56.preheader, label %._crit_edge57

.lr.ph56.preheader:                               ; preds = %._crit_edge50
  %19 = sext i32 %18 to i64
  br label %.lr.ph56

.lr.ph49:                                         ; preds = %._crit_edge, %33
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %33 ], [ 0, %._crit_edge ]
  %.03046 = phi i64 [ %.131, %33 ], [ 0, %._crit_edge ]
  %20 = getelementptr inbounds [300010 x i64], ptr @a, i64 0, i64 %indvars.iv66
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %21 unwind label %.loopexit.split-lp37

21:                                               ; preds = %.lr.ph49
  %22 = load i64, ptr %20, align 8, !tbaa !9
  %23 = add nsw i64 %22, %.03046
  br label %24

24:                                               ; preds = %29, %21
  %.131 = phi i64 [ %23, %21 ], [ %32, %29 ]
  %25 = call noundef i64 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %26 = trunc i64 %25 to i32
  %27 = load i32, ptr @N, align 4, !tbaa !5
  %28 = icmp slt i32 %27, %26
  br i1 %28, label %29, label %33

29:                                               ; preds = %24
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %31 = load i64, ptr %30, align 8, !tbaa !9
  %32 = sub nsw i64 %.131, %31
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
          to label %24 unwind label %.loopexit36, !llvm.loop !13

.loopexit36:                                      ; preds = %29
  %lpad.loopexit38 = landingpad { ptr, i32 }
          cleanup
  br label %77

.loopexit.split-lp37:                             ; preds = %.lr.ph49
  %lpad.loopexit.split-lp39 = landingpad { ptr, i32 }
          cleanup
  br label %77

33:                                               ; preds = %24
  %34 = getelementptr inbounds [300010 x i64], ptr @plusscore, i64 0, i64 %indvars.iv66
  store i64 %.131, ptr %34, align 8, !tbaa !9
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %35 = shl nsw i32 %27, 1
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next67, %36
  br i1 %37, label %.lr.ph49, label %._crit_edge50, !llvm.loop !14

._crit_edge57:                                    ; preds = %55, %._crit_edge50
  %38 = phi i32 [ %17, %._crit_edge50 ], [ %49, %55 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i64 -30000000000000021, ptr %4, align 8, !tbaa !9
  %39 = shl nsw i32 %38, 1
  %.not = icmp sgt i32 %38, %39
  br i1 %.not, label %._crit_edge61, label %.lr.ph60.preheader

.lr.ph60.preheader:                               ; preds = %._crit_edge57
  %40 = add i32 %38, -1
  %41 = sext i32 %40 to i64
  br label %.lr.ph60

.lr.ph56:                                         ; preds = %.lr.ph56.preheader, %55
  %indvars.iv69 = phi i64 [ %19, %.lr.ph56.preheader ], [ %indvars.iv.next70, %55 ]
  %.253 = phi i64 [ 0, %.lr.ph56.preheader ], [ %.3, %55 ]
  %indvars.iv.next70 = add nsw i64 %indvars.iv69, -1
  %42 = getelementptr inbounds [300010 x i64], ptr @a, i64 0, i64 %indvars.iv.next70
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %43 unwind label %.loopexit.split-lp

43:                                               ; preds = %.lr.ph56
  %44 = load i64, ptr %42, align 8, !tbaa !9
  %45 = add nsw i64 %44, %.253
  br label %46

46:                                               ; preds = %51, %43
  %.3 = phi i64 [ %45, %43 ], [ %54, %51 ]
  %47 = call noundef i64 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  %48 = trunc i64 %47 to i32
  %49 = load i32, ptr @N, align 4, !tbaa !5
  %50 = icmp slt i32 %49, %48
  br i1 %50, label %51, label %55

51:                                               ; preds = %46
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = sub nsw i64 %.3, %53
  invoke void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %46 unwind label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %51
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %76

.loopexit.split-lp:                               ; preds = %.lr.ph56
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %76

55:                                               ; preds = %46
  %56 = getelementptr inbounds [300010 x i64], ptr @minusscore, i64 0, i64 %indvars.iv.next70
  store i64 %.3, ptr %56, align 8, !tbaa !9
  %57 = sext i32 %49 to i64
  %.not.not = icmp sgt i64 %indvars.iv.next70, %57
  br i1 %.not.not, label %.lr.ph56, label %._crit_edge57, !llvm.loop !16

._crit_edge61:                                    ; preds = %.lr.ph60, %._crit_edge57
  %58 = phi i64 [ -30000000000000021, %._crit_edge57 ], [ %66, %.lr.ph60 ]
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %58)
          to label %71 unwind label %74

.lr.ph60:                                         ; preds = %.lr.ph60.preheader, %.lr.ph60
  %indvars.iv72 = phi i64 [ %41, %.lr.ph60.preheader ], [ %indvars.iv.next73, %.lr.ph60 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %60 = getelementptr inbounds [300010 x i64], ptr @plusscore, i64 0, i64 %indvars.iv72
  %61 = load i64, ptr %60, align 8, !tbaa !9
  %indvars.iv.next73 = add nsw i64 %indvars.iv72, 1
  %62 = getelementptr inbounds [300010 x i64], ptr @minusscore, i64 0, i64 %indvars.iv.next73
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = sub nsw i64 %61, %63
  store i64 %64, ptr %5, align 8, !tbaa !9
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %66 = load i64, ptr %65, align 8, !tbaa !9
  store i64 %66, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %67 = load i32, ptr @N, align 4, !tbaa !5
  %68 = shl nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next73, %69
  br i1 %70, label %.lr.ph60, label %._crit_edge61, !llvm.loop !17

71:                                               ; preds = %._crit_edge61
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %73 unwind label %74

73:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(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
  ret i32 0

74:                                               ; preds = %71, %._crit_edge61
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %76

76:                                               ; preds = %.loopexit, %.loopexit.split-lp, %74
  %.pn = phi { ptr, i32 } [ %75, %74 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %77

77:                                               ; preds = %.loopexit36, %.loopexit.split-lp37, %76
  %.pn34 = phi { ptr, i32 } [ %.pn, %76 ], [ %lpad.loopexit38, %.loopexit36 ], [ %lpad.loopexit.split-lp39, %.loopexit.split-lp37 ]
  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
  resume { ptr, i32 } %.pn34
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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.end.p0(i64 immarg, ptr nocapture) #2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt7greaterIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #5 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 #5 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 void @_ZNSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #5 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 nounwind uwtable
declare dso_local noundef i64 @_ZNKSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #5 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 #5 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !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: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass