; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x17-二叉堆/146. 序列 (main)

; 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<Node, std::allocator<Node>>::_Vector_impl" }
%"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Node = type { i32, i32, i32 }

@m = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [1010 x [2010 x i32]], align 16
@t = external dso_local global i32, align 4
@b = external dso_local global [2010 x i32], align 16
@k = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

16:                                               ; preds = %192, %0
  %17 = load i32, ptr @t, align 4, !tbaa !5
  %18 = add nsw i32 %17, -1
  store i32 %18, ptr @t, align 4, !tbaa !5
  %19 = icmp ne i32 %17, 0
  br i1 %19, label %20, label %194

20:                                               ; preds = %16
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %57, %20
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = load i32, ptr @m, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

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

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

29:                                               ; preds = %42, %28
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %29
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %36
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [2010 x i32], ptr %37, i64 0, i64 %39
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %40)
  br label %42

42:                                               ; preds = %34
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %4, align 4, !tbaa !5
  br label %29, !llvm.loop !9

45:                                               ; preds = %33
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %47
  %49 = getelementptr inbounds [2010 x i32], ptr %48, i64 0, i64 0
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %51
  %53 = getelementptr inbounds [2010 x i32], ptr %52, i64 0, i64 0
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr %53, i64 %55
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef %49, ptr noundef %56)
  br label %57

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

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

61:                                               ; preds = %168, %60
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = load i32, ptr @m, align 4, !tbaa !5
  %64 = sub nsw i32 %63, 1
  %65 = icmp slt i32 %62, %64
  br i1 %65, label %67, label %66

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

67:                                               ; preds = %61
  %68 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %68, ptr @k, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #8
  call void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #8
  %69 = getelementptr inbounds %struct.Node, ptr %7, i32 0, i32 1
  store i32 0, ptr %69, align 4, !tbaa !12
  %70 = getelementptr inbounds %struct.Node, ptr %7, i32 0, i32 0
  store i32 0, ptr %70, align 4, !tbaa !14
  %71 = getelementptr inbounds %struct.Node, ptr %7, i32 0, i32 2
  store i32 0, ptr %71, align 4, !tbaa !15
  invoke void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(12) %7)
          to label %72 unwind label %78

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

73:                                               ; preds = %138, %72
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = load i32, ptr @n, align 4, !tbaa !5
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %82, label %77

77:                                               ; preds = %73
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %142

78:                                               ; preds = %142, %67
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %8, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %9, align 4
  br label %171

82:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #8
  %83 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
          to label %84 unwind label %129

84:                                               ; preds = %82
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %83, i64 12, i1 false), !tbaa.struct !16
  invoke void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %6)
          to label %85 unwind label %129

85:                                               ; preds = %84
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 0
  %90 = load i32, ptr %89, align 4, !tbaa !14
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [2010 x i32], ptr %88, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %96
  %98 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !12
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [2010 x i32], ptr %97, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = add nsw i32 %93, %102
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [2010 x i32], ptr @b, i64 0, i64 %105
  store i32 %103, ptr %106, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #8
  %107 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 0
  %108 = load i32, ptr %107, align 4, !tbaa !14
  %109 = getelementptr inbounds %struct.Node, ptr %12, i32 0, i32 0
  store i32 %108, ptr %109, align 4, !tbaa !14
  %110 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !12
  %112 = add nsw i32 %111, 1
  %113 = getelementptr inbounds %struct.Node, ptr %12, i32 0, i32 1
  store i32 %112, ptr %113, align 4, !tbaa !12
  %114 = getelementptr inbounds %struct.Node, ptr %12, i32 0, i32 2
  store i32 1, ptr %114, align 4, !tbaa !15
  invoke void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %115 unwind label %133

115:                                              ; preds = %85
  %116 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 2
  %117 = load i32, ptr %116, align 4, !tbaa !15
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %137, label %119

119:                                              ; preds = %115
  %120 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 0
  %121 = load i32, ptr %120, align 4, !tbaa !14
  %122 = add nsw i32 %121, 1
  %123 = getelementptr inbounds %struct.Node, ptr %12, i32 0, i32 0
  store i32 %122, ptr %123, align 4, !tbaa !14
  %124 = getelementptr inbounds %struct.Node, ptr %11, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !12
  %126 = getelementptr inbounds %struct.Node, ptr %12, i32 0, i32 1
  store i32 %125, ptr %126, align 4, !tbaa !12
  %127 = getelementptr inbounds %struct.Node, ptr %12, i32 0, i32 2
  store i32 0, ptr %127, align 4, !tbaa !15
  invoke void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %6, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %128 unwind label %133

128:                                              ; preds = %119
  br label %137

129:                                              ; preds = %84, %82
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %8, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %9, align 4
  br label %141

133:                                              ; preds = %119, %85
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %8, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #8
  br label %141

137:                                              ; preds = %128, %115
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #8
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %10, align 4, !tbaa !5
  br label %73, !llvm.loop !17

141:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %171

142:                                              ; preds = %77
  %143 = load i32, ptr @n, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i32, ptr @b, i64 %144
  invoke void @_ZSt4sortIPiEvT_S1_(ptr noundef @b, ptr noundef %145)
          to label %146 unwind label %78

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

147:                                              ; preds = %164, %146
  %148 = load i32, ptr %13, align 4, !tbaa !5
  %149 = load i32, ptr @n, align 4, !tbaa !5
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %167

152:                                              ; preds = %147
  %153 = load i32, ptr %13, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [2010 x i32], ptr @b, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = load i32, ptr %5, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %159
  %161 = load i32, ptr %13, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [2010 x i32], ptr %160, i64 0, i64 %162
  store i32 %156, ptr %163, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %152
  %165 = load i32, ptr %13, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %13, align 4, !tbaa !5
  br label %147, !llvm.loop !18

167:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #8
  call void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %5, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %5, align 4, !tbaa !5
  br label %61, !llvm.loop !19

171:                                              ; preds = %141, %78
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #8
  call void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %195

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

173:                                              ; preds = %189, %172
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = load i32, ptr @n, align 4, !tbaa !5
  %176 = icmp slt i32 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %192

178:                                              ; preds = %173
  %179 = load i32, ptr @m, align 4, !tbaa !5
  %180 = sub nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %181
  %183 = load i32, ptr %14, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [2010 x i32], ptr %182, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %186)
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %187, ptr noundef @.str)
  br label %189

189:                                              ; preds = %178
  %190 = load i32, ptr %14, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %14, align 4, !tbaa !5
  br label %173, !llvm.loop !20

192:                                              ; preds = %177
  %193 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %16, !llvm.loop !21

194:                                              ; preds = %16
  ret i32 0

195:                                              ; preds = %171
  %196 = load ptr, ptr %8, align 8
  %197 = load i32, ptr %9, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199
}

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: 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 @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #3

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 4}
!13 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8}
!14 = !{!13, !6, i64 0}
!15 = !{!13, !6, i64 8}
!16 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !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<Node, std::allocator<Node>>::_Vector_impl" }
%"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Node, std::allocator<Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Node = type { i32, i32, i32 }

@m = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [1010 x [2010 x i32]], align 16
@t = external dso_local global i32, align 4
@b = external dso_local global [2010 x i32], align 16
@k = external dso_local local_unnamed_addr global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::priority_queue", align 8
  %2 = alloca %struct.Node, align 4
  %3 = alloca %struct.Node, align 4
  %4 = 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) @t)
  %5 = load i32, ptr @t, align 4, !tbaa !5
  %6 = add nsw i32 %5, -1
  store i32 %6, ptr @t, align 4, !tbaa !5
  %.not63 = icmp eq i32 %5, 0
  br i1 %.not63, label %._crit_edge66, label %.lr.ph65

.lr.ph65:                                         ; preds = %0
  %7 = getelementptr inbounds i8, ptr %2, i64 4
  %8 = getelementptr inbounds i8, ptr %2, i64 8
  %9 = getelementptr inbounds i8, ptr %3, i64 4
  %10 = getelementptr inbounds i8, ptr %3, i64 8
  br label %11

11:                                               ; preds = %.lr.ph65, %._crit_edge62
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %14 = load i32, ptr @m, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.preheader43, label %.preheader44

.preheader45:                                     ; preds = %._crit_edge
  %16 = icmp sgt i32 %21, 1
  br i1 %16, label %.lr.ph59, label %.preheader44

.preheader43:                                     ; preds = %11, %._crit_edge
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %._crit_edge ], [ 0, %11 ]
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %.preheader43.._crit_edge_crit_edge

.preheader43.._crit_edge_crit_edge:               ; preds = %.preheader43
  %.pre = sext i32 %17 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader43.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader43.._crit_edge_crit_edge ], [ %27, %.lr.ph ]
  %19 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %indvars.iv70
  %20 = getelementptr inbounds i32, ptr %19, i64 %.pre-phi
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull %19, ptr noundef nonnull %20)
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %21 = load i32, ptr @m, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next71, %22
  br i1 %23, label %.preheader43, label %.preheader45, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader43, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader43 ]
  %24 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %indvars.iv70, i64 %indvars.iv
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader44:                                     ; preds = %._crit_edge57, %11, %.preheader45
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph61, label %._crit_edge62

.lr.ph59:                                         ; preds = %.preheader45, %._crit_edge57
  %indvar = phi i64 [ %indvar.next, %._crit_edge57 ], [ 0, %.preheader45 ]
  %31 = mul nuw nsw i64 %indvar, 8040
  %gep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @a, i64 8040), i64 %31
  %32 = trunc nuw nsw i64 %indvar to i32
  store i32 %32, ptr @k, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #8
  call void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #8
  store i32 0, ptr %7, align 4, !tbaa !12
  store i32 0, ptr %2, align 4, !tbaa !14
  store i32 0, ptr %8, align 4, !tbaa !15
  invoke void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %.preheader42 unwind label %41

.preheader42:                                     ; preds = %.lr.ph59
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph52, label %.preheader42.._crit_edge53_crit_edge

.preheader42.._crit_edge53_crit_edge:             ; preds = %.preheader42
  %.pre83 = sext i32 %33 to i64
  br label %._crit_edge53

.lr.ph52:                                         ; preds = %.preheader42
  %35 = add nuw nsw i64 %indvar, 1
  br label %43

._crit_edge53:                                    ; preds = %62, %.preheader42.._crit_edge53_crit_edge
  %.pre-phi84 = phi i64 [ %.pre83, %.preheader42.._crit_edge53_crit_edge ], [ %64, %62 ]
  %36 = getelementptr inbounds i32, ptr @b, i64 %.pre-phi84
  invoke void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @b, ptr noundef nonnull %36)
          to label %.preheader unwind label %41

.preheader:                                       ; preds = %._crit_edge53
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph56, label %._crit_edge57

.lr.ph56:                                         ; preds = %.preheader
  %39 = zext nneg i32 %37 to i64
  %40 = shl nuw nsw i64 %39, 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %gep, ptr nonnull align 16 @b, i64 %40, i1 false), !tbaa !5
  br label %._crit_edge57

41:                                               ; preds = %._crit_edge53, %.lr.ph59
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %70

43:                                               ; preds = %.lr.ph52, %62
  %indvars.iv73 = phi i64 [ 0, %.lr.ph52 ], [ %indvars.iv.next74, %62 ]
  %44 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %.sroa.0.0.copyload = load i32, ptr %44, align 4, !tbaa !5
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %44, i64 4
  %.sroa.7.0.copyload = load i32, ptr %.sroa.7.0..sroa_idx, align 4, !tbaa !5
  %.sroa.10.0..sroa_idx = getelementptr inbounds i8, ptr %44, i64 8
  %.sroa.10.0.copyload = load i32, ptr %.sroa.10.0..sroa_idx, align 4, !tbaa !5
  invoke void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
          to label %45 unwind label %58

45:                                               ; preds = %43
  %46 = sext i32 %.sroa.0.0.copyload to i64
  %47 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %indvar, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = sext i32 %.sroa.7.0.copyload to i64
  %50 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %35, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add nsw i32 %51, %48
  %53 = getelementptr inbounds [2010 x i32], ptr @b, i64 0, i64 %indvars.iv73
  store i32 %52, ptr %53, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #8
  store i32 %.sroa.0.0.copyload, ptr %3, align 4, !tbaa !14
  %54 = add nsw i32 %.sroa.7.0.copyload, 1
  store i32 %54, ptr %9, align 4, !tbaa !12
  store i32 1, ptr %10, align 4, !tbaa !15
  invoke void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 4 dereferenceable(12) %3)
          to label %55 unwind label %60

55:                                               ; preds = %45
  %.not39 = icmp eq i32 %.sroa.10.0.copyload, 0
  br i1 %.not39, label %56, label %62

56:                                               ; preds = %55
  %57 = add nsw i32 %.sroa.0.0.copyload, 1
  store i32 %57, ptr %3, align 4, !tbaa !14
  store i32 %.sroa.7.0.copyload, ptr %9, align 4, !tbaa !12
  store i32 0, ptr %10, align 4, !tbaa !15
  invoke void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 4 dereferenceable(12) %3)
          to label %62 unwind label %60

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

60:                                               ; preds = %56, %45
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #8
  br label %70

62:                                               ; preds = %56, %55
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #8
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next74, %64
  br i1 %65, label %43, label %._crit_edge53, !llvm.loop !16

._crit_edge57:                                    ; preds = %.lr.ph56, %.preheader
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #8
  call void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  %indvar.next = add nuw nsw i64 %indvar, 1
  %66 = load i32, ptr @m, align 4, !tbaa !5
  %67 = add nsw i32 %66, -1
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvar.next, %68
  br i1 %69, label %.lr.ph59, label %.preheader44, !llvm.loop !17

70:                                               ; preds = %58, %60, %41
  %.pn.pn = phi { ptr, i32 } [ %42, %41 ], [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #8
  call void @_ZNSt14priority_queueI4NodeSt6vectorIS0_SaIS0_EESt4lessIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn.pn

._crit_edge62:                                    ; preds = %.lr.ph61, %.preheader44
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %72 = load i32, ptr @t, align 4, !tbaa !5
  %73 = add nsw i32 %72, -1
  store i32 %73, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %72, 0
  br i1 %.not, label %._crit_edge66, label %11, !llvm.loop !18

.lr.ph61:                                         ; preds = %.preheader44, %.lr.ph61
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.lr.ph61 ], [ 0, %.preheader44 ]
  %74 = load i32, ptr @m, align 4, !tbaa !5
  %75 = add nsw i32 %74, -1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1010 x [2010 x i32]], ptr @a, i64 0, i64 %76, i64 %indvars.iv80
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %78)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef nonnull @.str)
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %81 = load i32, ptr @n, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = icmp slt i64 %indvars.iv.next81, %82
  br i1 %83, label %.lr.ph61, label %._crit_edge62, !llvm.loop !19

._crit_edge66:                                    ; preds = %._crit_edge62, %0
  ret i32 0
}

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 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 @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

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

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

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

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


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