; LLVM IR from tangjz/acm-icpc :: projecteuler (615)

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

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

@tot = external dso_local global i32, align 4
@pr = external dso_local global [1000001 x i32], align 16
@d = external dso_local global [20000001 x i32], align 16
@sz = external dso_local global i32, align 4
@que = external dso_local global [8000001 x %struct.Node], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@_ZL4maxn = external hidden constant i32, align 4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5printi(i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %struct.Node, align 8
  %7 = alloca %struct.Ref, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Node, align 8
  %11 = alloca %struct.Ref, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.Node, align 8
  %15 = alloca %struct.Ref, align 4
  %16 = alloca %struct.Node, align 8
  %17 = alloca %struct.Ref, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.memset.p0.i64(ptr align 16 @d, i8 -1, i64 80000004, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %66, %0
  %19 = load i32, ptr @tot, align 4, !tbaa !5
  %20 = icmp sle i32 %19, 1000000
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %18
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [20000001 x i32], ptr @d, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = icmp eq i32 %26, -1
  br i1 %27, label %28, label %38

28:                                               ; preds = %22
  %29 = load i32, ptr @tot, align 4, !tbaa !5
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [20000001 x i32], ptr @d, i64 0, i64 %31
  store i32 %29, ptr %32, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = load i32, ptr @tot, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr @tot, align 4, !tbaa !5
  %36 = sext i32 %34 to i64
  %37 = getelementptr inbounds [1000001 x i32], ptr @pr, i64 0, i64 %36
  store i32 %33, ptr %37, align 4, !tbaa !5
  br label %38

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

39:                                               ; preds = %61, %38
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [1000001 x i32], ptr @pr, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = mul nsw i32 %40, %44
  store i32 %45, ptr %5, align 4, !tbaa !5
  %46 = icmp slt i32 %45, 20000000
  br i1 %46, label %48, label %47

47:                                               ; preds = %39
  store i32 5, ptr %3, align 4
  br label %64

48:                                               ; preds = %39
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [20000001 x i32], ptr @d, i64 0, i64 %51
  store i32 %49, ptr %52, align 4, !tbaa !5
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [20000001 x i32], ptr @d, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = icmp eq i32 %56, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %48
  store i32 5, ptr %3, align 4
  br label %64

60:                                               ; preds = %48
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %4, align 4, !tbaa !5
  br label %39, !llvm.loop !9

64:                                               ; preds = %59, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %2, align 4, !tbaa !5
  br label %18, !llvm.loop !11

69:                                               ; preds = %21
  %70 = load i32, ptr @tot, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1000001 x i32], ptr @pr, i64 0, i64 %71
  store i32 20000000, ptr %72, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  %73 = getelementptr inbounds %struct.Node, ptr %6, i32 0, i32 0
  store double 0.000000e+00, ptr %73, align 8, !tbaa !12
  %74 = getelementptr inbounds %struct.Node, ptr %6, i32 0, i32 1
  store i32 -1, ptr %74, align 8, !tbaa !15
  %75 = getelementptr inbounds %struct.Node, ptr %6, i32 0, i32 2
  store i32 0, ptr %75, align 4, !tbaa !16
  %76 = getelementptr inbounds %struct.Node, ptr %6, i32 0, i32 3
  %77 = load i32, ptr getelementptr inbounds ([1000001 x i32], ptr @pr, i64 0, i64 1000000), align 16, !tbaa !5
  store i32 %77, ptr %76, align 8, !tbaa !17
  %78 = getelementptr inbounds %struct.Node, ptr %6, i32 0, i32 4
  %79 = load i32, ptr getelementptr inbounds ([1000001 x i32], ptr @pr, i64 0, i64 1000000), align 16, !tbaa !5
  store i32 %79, ptr %78, align 4, !tbaa !18
  %80 = load i32, ptr @sz, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %81
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %82, ptr align 8 %6, i64 24, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %83 = getelementptr inbounds %struct.Ref, ptr %7, i32 0, i32 0
  %84 = load i32, ptr @sz, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr @sz, align 4, !tbaa !5
  store i32 %84, ptr %83, align 4, !tbaa !21
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %227, %69
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = icmp slt i32 %87, 1000000
  br i1 %88, label %90, label %89

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

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %92 = getelementptr inbounds %struct.Ref, ptr %91, i32 0, i32 0
  %93 = load i32, ptr %92, align 4, !tbaa !21
  store i32 %93, ptr %9, align 4, !tbaa !5
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  %94 = getelementptr inbounds %struct.Node, ptr %10, i32 0, i32 0
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %96
  %98 = getelementptr inbounds %struct.Node, ptr %97, i32 0, i32 0
  %99 = load double, ptr %98, align 8, !tbaa !12
  %100 = load i32, ptr @pr, align 16, !tbaa !5
  %101 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %100)
  %102 = fadd double %99, %101
  store double %102, ptr %94, align 8, !tbaa !12
  %103 = getelementptr inbounds %struct.Node, ptr %10, i32 0, i32 1
  %104 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %104, ptr %103, align 8, !tbaa !15
  %105 = getelementptr inbounds %struct.Node, ptr %10, i32 0, i32 2
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %107
  %109 = getelementptr inbounds %struct.Node, ptr %108, i32 0, i32 2
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL4maxn, ptr noundef nonnull align 4 dereferenceable(4) %109)
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %105, align 4, !tbaa !16
  %113 = getelementptr inbounds %struct.Node, ptr %10, i32 0, i32 3
  %114 = load i32, ptr @pr, align 16, !tbaa !5
  store i32 %114, ptr %113, align 8, !tbaa !17
  %115 = getelementptr inbounds %struct.Node, ptr %10, i32 0, i32 4
  %116 = load i32, ptr @pr, align 16, !tbaa !5
  store i32 %116, ptr %115, align 4, !tbaa !18
  %117 = load i32, ptr @sz, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %118
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %119, ptr align 8 %10, i64 24, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %120 = getelementptr inbounds %struct.Ref, ptr %11, i32 0, i32 0
  %121 = load i32, ptr @sz, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr @sz, align 4, !tbaa !5
  store i32 %121, ptr %120, align 4, !tbaa !21
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %124
  %126 = getelementptr inbounds %struct.Node, ptr %125, i32 0, i32 3
  %127 = load i32, ptr %126, align 8, !tbaa !17
  store i32 %127, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %128 = load i32, ptr %12, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [20000001 x i32], ptr @d, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1000001 x i32], ptr @pr, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  store i32 %135, ptr %13, align 4, !tbaa !5
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = load i32, ptr getelementptr inbounds ([1000001 x i32], ptr @pr, i64 0, i64 1), align 4, !tbaa !5
  %138 = icmp sge i32 %136, %137
  br i1 %138, label %139, label %182

139:                                              ; preds = %90
  %140 = load i32, ptr %13, align 4, !tbaa !5
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %142
  %144 = getelementptr inbounds %struct.Node, ptr %143, i32 0, i32 4
  %145 = load i32, ptr %144, align 4, !tbaa !18
  %146 = icmp sle i32 %140, %145
  br i1 %146, label %147, label %182

147:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  %148 = getelementptr inbounds %struct.Node, ptr %14, i32 0, i32 0
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %150
  %152 = getelementptr inbounds %struct.Node, ptr %151, i32 0, i32 0
  %153 = load double, ptr %152, align 8, !tbaa !12
  %154 = load i32, ptr %12, align 4, !tbaa !5
  %155 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %154)
  %156 = fsub double %153, %155
  %157 = load i32, ptr %13, align 4, !tbaa !5
  %158 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %157)
  %159 = fadd double %156, %158
  store double %159, ptr %148, align 8, !tbaa !12
  %160 = getelementptr inbounds %struct.Node, ptr %14, i32 0, i32 1
  %161 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %161, ptr %160, align 8, !tbaa !15
  %162 = getelementptr inbounds %struct.Node, ptr %14, i32 0, i32 2
  %163 = load i32, ptr %9, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %164
  %166 = getelementptr inbounds %struct.Node, ptr %165, i32 0, i32 2
  %167 = load i32, ptr %166, align 4, !tbaa !16
  store i32 %167, ptr %162, align 4, !tbaa !16
  %168 = getelementptr inbounds %struct.Node, ptr %14, i32 0, i32 3
  %169 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %169, ptr %168, align 8, !tbaa !17
  %170 = getelementptr inbounds %struct.Node, ptr %14, i32 0, i32 4
  %171 = load i32, ptr %9, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %172
  %174 = getelementptr inbounds %struct.Node, ptr %173, i32 0, i32 4
  %175 = load i32, ptr %174, align 4, !tbaa !18
  store i32 %175, ptr %170, align 4, !tbaa !18
  %176 = load i32, ptr @sz, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %177
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %178, ptr align 8 %14, i64 24, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %179 = getelementptr inbounds %struct.Ref, ptr %15, i32 0, i32 0
  %180 = load i32, ptr @sz, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr @sz, align 4, !tbaa !5
  store i32 %180, ptr %179, align 4, !tbaa !21
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %182

182:                                              ; preds = %147, %139, %90
  %183 = load i32, ptr getelementptr inbounds ([1000001 x i32], ptr @pr, i64 0, i64 1), align 4, !tbaa !5
  %184 = load i32, ptr %9, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %185
  %187 = getelementptr inbounds %struct.Node, ptr %186, i32 0, i32 3
  %188 = load i32, ptr %187, align 8, !tbaa !17
  %189 = icmp sle i32 %183, %188
  br i1 %189, label %190, label %226

190:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #7
  %191 = getelementptr inbounds %struct.Node, ptr %16, i32 0, i32 0
  %192 = load i32, ptr %9, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %193
  %195 = getelementptr inbounds %struct.Node, ptr %194, i32 0, i32 0
  %196 = load double, ptr %195, align 8, !tbaa !12
  %197 = load i32, ptr getelementptr inbounds ([1000001 x i32], ptr @pr, i64 0, i64 1), align 4, !tbaa !5
  %198 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %197)
  %199 = fadd double %196, %198
  %200 = load i32, ptr @pr, align 16, !tbaa !5
  %201 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %200)
  %202 = fsub double %199, %201
  store double %202, ptr %191, align 8, !tbaa !12
  %203 = getelementptr inbounds %struct.Node, ptr %16, i32 0, i32 1
  %204 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %204, ptr %203, align 8, !tbaa !15
  %205 = getelementptr inbounds %struct.Node, ptr %16, i32 0, i32 2
  %206 = load i32, ptr %9, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %207
  %209 = getelementptr inbounds %struct.Node, ptr %208, i32 0, i32 2
  %210 = load i32, ptr %209, align 4, !tbaa !16
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %205, align 4, !tbaa !16
  %212 = getelementptr inbounds %struct.Node, ptr %16, i32 0, i32 3
  %213 = load i32, ptr getelementptr inbounds ([1000001 x i32], ptr @pr, i64 0, i64 1), align 4, !tbaa !5
  store i32 %213, ptr %212, align 8, !tbaa !17
  %214 = getelementptr inbounds %struct.Node, ptr %16, i32 0, i32 4
  %215 = load i32, ptr %9, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %216
  %218 = getelementptr inbounds %struct.Node, ptr %217, i32 0, i32 3
  %219 = load i32, ptr %218, align 8, !tbaa !17
  store i32 %219, ptr %214, align 4, !tbaa !18
  %220 = load i32, ptr @sz, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %221
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %222, ptr align 8 %16, i64 24, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %223 = getelementptr inbounds %struct.Ref, ptr %17, i32 0, i32 0
  %224 = load i32, ptr @sz, align 4, !tbaa !5
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr @sz, align 4, !tbaa !5
  store i32 %224, ptr %223, align 4, !tbaa !21
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %226

226:                                              ; preds = %190, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %8, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %8, align 4, !tbaa !5
  br label %86, !llvm.loop !23

230:                                              ; preds = %89
  %231 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %232 = getelementptr inbounds %struct.Ref, ptr %231, i32 0, i32 0
  %233 = load i32, ptr %232, align 4, !tbaa !21
  call void @_Z5printi(i32 noundef %233)
  ret i32 0
}

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

; Function Attrs: 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) #4

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = distinct !{!11, !10}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ZTS4Node", !14, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20}
!14 = !{!"double", !7, i64 0}
!15 = !{!13, !6, i64 8}
!16 = !{!13, !6, i64 12}
!17 = !{!13, !6, i64 16}
!18 = !{!13, !6, i64 20}
!19 = !{i64 0, i64 8, !20, i64 8, i64 4, !5, i64 12, i64 4, !5, i64 16, i64 4, !5, i64 20, i64 4, !5}
!20 = !{!14, !14, i64 0}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTS3Ref", !6, i64 0}
!23 = distinct !{!23, !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"

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

@tot = external dso_local local_unnamed_addr global i32, align 4
@pr = external dso_local local_unnamed_addr global [1000001 x i32], align 16
@d = external dso_local local_unnamed_addr global [20000001 x i32], align 16
@sz = external dso_local local_unnamed_addr global i32, align 4
@que = external dso_local global [8000001 x %struct.Node], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@_ZL4maxn = external hidden constant i32, align 4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5printi(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca %struct.Ref, align 4
  %2 = alloca %struct.Ref, align 4
  %3 = alloca %struct.Ref, align 4
  %4 = alloca %struct.Ref, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80000004) @d, i8 -1, i64 80000004, i1 false)
  %tot.promoted = load i32, ptr @tot, align 4, !tbaa !5
  %5 = icmp slt i32 %tot.promoted, 1000001
  br i1 %5, label %.lr.ph61, label %._crit_edge62

._crit_edge62:                                    ; preds = %._crit_edge, %0
  %.lcssa = phi i32 [ %tot.promoted, %0 ], [ %23, %._crit_edge ]
  %6 = zext nneg i32 %.lcssa to i64
  %7 = getelementptr inbounds [1000001 x i32], ptr @pr, i64 0, i64 %6
  store i32 20000000, ptr %7, align 4, !tbaa !5
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @pr, i64 4000000), align 16, !tbaa !5
  %9 = load i32, ptr @sz, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %10
  store double 0.000000e+00, ptr %11, align 8, !tbaa !9
  %.sroa.433.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store i32 -1, ptr %.sroa.433.0..sroa_idx, align 8, !tbaa !5
  %.sroa.534.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 12
  store i32 0, ptr %.sroa.534.0..sroa_idx, align 4, !tbaa !5
  %.sroa.635.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 16
  store i32 %8, ptr %.sroa.635.0..sroa_idx, align 8, !tbaa !5
  %.sroa.736.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 20
  store i32 %8, ptr %.sroa.736.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %12 = add nsw i32 %9, 1
  store i32 %12, ptr @sz, align 4, !tbaa !5
  store i32 %9, ptr %1, align 4, !tbaa !11
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  br label %43

.lr.ph61:                                         ; preds = %0, %._crit_edge
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %._crit_edge ], [ 2, %0 ]
  %13 = phi i32 [ %23, %._crit_edge ], [ %tot.promoted, %0 ]
  %14 = getelementptr inbounds [20000001 x i32], ptr @d, i64 0, i64 %indvars.iv66
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = icmp eq i32 %15, -1
  br i1 %16, label %17, label %.lr.ph61._crit_edge

.lr.ph61._crit_edge:                              ; preds = %.lr.ph61
  %.pre70 = trunc nuw nsw i64 %indvars.iv66 to i32
  br label %22

17:                                               ; preds = %.lr.ph61
  store i32 %13, ptr %14, align 4, !tbaa !5
  %18 = add nsw i32 %13, 1
  store i32 %18, ptr @tot, align 4, !tbaa !5
  %19 = sext i32 %13 to i64
  %20 = getelementptr inbounds [1000001 x i32], ptr @pr, i64 0, i64 %19
  %21 = trunc nuw nsw i64 %indvars.iv66 to i32
  store i32 %21, ptr %20, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %.lr.ph61._crit_edge, %17
  %.pre-phi = phi i32 [ %.pre70, %.lr.ph61._crit_edge ], [ %21, %17 ]
  %23 = phi i32 [ %13, %.lr.ph61._crit_edge ], [ %18, %17 ]
  %24 = load i32, ptr @pr, align 16, !tbaa !5
  %25 = mul nsw i32 %24, %.pre-phi
  %26 = icmp slt i32 %25, 20000000
  br i1 %26, label %.lr.ph, label %._crit_edge

27:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = getelementptr inbounds [1000001 x i32], ptr @pr, i64 0, i64 %indvars.iv.next
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = mul nsw i32 %29, %.pre-phi
  %31 = icmp slt i32 %30, 20000000
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.lr.ph:                                           ; preds = %22, %27
  %indvars.iv = phi i64 [ %indvars.iv.next, %27 ], [ 0, %22 ]
  %32 = phi i32 [ %30, %27 ], [ %25, %22 ]
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [20000001 x i32], ptr @d, i64 0, i64 %33
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %35, ptr %34, align 4, !tbaa !5
  %36 = load i32, ptr %14, align 4, !tbaa !5
  %37 = zext i32 %36 to i64
  %38 = icmp eq i64 %indvars.iv, %37
  br i1 %38, label %._crit_edge, label %27

._crit_edge:                                      ; preds = %27, %.lr.ph, %22
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %39 = icmp slt i32 %23, 1000001
  br i1 %39, label %.lr.ph61, label %._crit_edge62, !llvm.loop !15

40:                                               ; preds = %104
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %42 = load i32, ptr %41, align 4, !tbaa !11
  call void @_Z5printi(i32 noundef %42)
  ret i32 0

43:                                               ; preds = %._crit_edge62, %104
  %.04963 = phi i32 [ 1, %._crit_edge62 ], [ %105, %104 ]
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %45 = load i32, ptr %44, align 4, !tbaa !11
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !16
  %49 = load i32, ptr @pr, align 16, !tbaa !5
  %50 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %49)
  %51 = fadd double %48, %50
  %52 = getelementptr inbounds i8, ptr %47, i64 12
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL4maxn, ptr noundef nonnull align 4 dereferenceable(4) %52)
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  %56 = load i32, ptr @pr, align 16, !tbaa !5
  %57 = load i32, ptr @sz, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %58
  store double %51, ptr %59, align 8, !tbaa !9
  %.sroa.412.0..sroa_idx = getelementptr inbounds i8, ptr %59, i64 8
  store i32 %45, ptr %.sroa.412.0..sroa_idx, align 8, !tbaa !5
  %.sroa.513.0..sroa_idx = getelementptr inbounds i8, ptr %59, i64 12
  store i32 %55, ptr %.sroa.513.0..sroa_idx, align 4, !tbaa !5
  %.sroa.614.0..sroa_idx = getelementptr inbounds i8, ptr %59, i64 16
  store i32 %56, ptr %.sroa.614.0..sroa_idx, align 8, !tbaa !5
  %.sroa.715.0..sroa_idx = getelementptr inbounds i8, ptr %59, i64 20
  store i32 %56, ptr %.sroa.715.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %60 = add nsw i32 %57, 1
  store i32 %60, ptr @sz, align 4, !tbaa !5
  store i32 %57, ptr %2, align 4, !tbaa !11
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %61 = getelementptr inbounds i8, ptr %47, i64 16
  %62 = load i32, ptr %61, align 8, !tbaa !18
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [20000001 x i32], ptr @d, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [1000001 x i32], ptr @pr, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @pr, i64 4), align 4, !tbaa !5
  %.not = icmp slt i32 %62, %70
  br i1 %.not, label %86, label %71

71:                                               ; preds = %43
  %72 = getelementptr inbounds i8, ptr %47, i64 20
  %73 = load i32, ptr %72, align 4, !tbaa !19
  %.not55 = icmp sgt i32 %69, %73
  br i1 %.not55, label %86, label %74

74:                                               ; preds = %71
  %75 = load double, ptr %47, align 8, !tbaa !16
  %76 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %62)
  %77 = fsub double %75, %76
  %78 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %69)
  %79 = fadd double %77, %78
  %80 = load i32, ptr %52, align 4, !tbaa !20
  %81 = load i32, ptr %72, align 4, !tbaa !19
  %82 = load i32, ptr @sz, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %83
  store double %79, ptr %84, align 8, !tbaa !9
  %.sroa.42.0..sroa_idx = getelementptr inbounds i8, ptr %84, i64 8
  store i32 %45, ptr %.sroa.42.0..sroa_idx, align 8, !tbaa !5
  %.sroa.53.0..sroa_idx = getelementptr inbounds i8, ptr %84, i64 12
  store i32 %80, ptr %.sroa.53.0..sroa_idx, align 4, !tbaa !5
  %.sroa.64.0..sroa_idx = getelementptr inbounds i8, ptr %84, i64 16
  store i32 %69, ptr %.sroa.64.0..sroa_idx, align 8, !tbaa !5
  %.sroa.75.0..sroa_idx = getelementptr inbounds i8, ptr %84, i64 20
  store i32 %81, ptr %.sroa.75.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %85 = add nsw i32 %82, 1
  store i32 %85, ptr @sz, align 4, !tbaa !5
  store i32 %82, ptr %3, align 4, !tbaa !11
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @pr, i64 4), align 4, !tbaa !5
  %.pre69 = load i32, ptr %61, align 8, !tbaa !18
  br label %86

86:                                               ; preds = %74, %71, %43
  %87 = phi i32 [ %.pre69, %74 ], [ %62, %71 ], [ %62, %43 ]
  %88 = phi i32 [ %.pre, %74 ], [ %70, %71 ], [ %70, %43 ]
  %.not56 = icmp sgt i32 %88, %87
  br i1 %.not56, label %104, label %89

89:                                               ; preds = %86
  %90 = load double, ptr %47, align 8, !tbaa !16
  %91 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %88)
  %92 = fadd double %90, %91
  %93 = load i32, ptr @pr, align 16, !tbaa !5
  %94 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %93)
  %95 = fsub double %92, %94
  %96 = load i32, ptr %52, align 4, !tbaa !20
  %97 = add nsw i32 %96, 1
  %98 = load i32, ptr getelementptr inbounds (i8, ptr @pr, i64 4), align 4, !tbaa !5
  %99 = load i32, ptr %61, align 8, !tbaa !18
  %100 = load i32, ptr @sz, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [8000001 x %struct.Node], ptr @que, i64 0, i64 %101
  store double %95, ptr %102, align 8, !tbaa !9
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %102, i64 8
  store i32 %45, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %102, i64 12
  store i32 %97, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %102, i64 16
  store i32 %98, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !5
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %102, i64 20
  store i32 %99, ptr %.sroa.7.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %103 = add nsw i32 %100, 1
  store i32 %103, ptr @sz, align 4, !tbaa !5
  store i32 %100, ptr %4, align 4, !tbaa !11
  call void @_ZNSt14priority_queueI3RefSt6vectorIS0_SaIS0_EESt4lessIS0_EE4pushEOS0_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %104

104:                                              ; preds = %89, %86
  %105 = add nuw nsw i32 %.04963, 1
  %exitcond.not = icmp eq i32 %105, 1000000
  br i1 %exitcond.not, label %40, label %43, !llvm.loop !21
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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


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