; LLVM IR from mickypaganini/SSI2016-jet-clustering :: spartyjet-4.0.2_mac/External/fastjet-3.0.0/src/MinHeap.ll (ZN7fastjet7MinHeap6updateEjd)

; 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.fastjet::MinHeap" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<fastjet::MinHeap::ValueLoc, std::allocator<fastjet::MinHeap::ValueLoc>>::_Vector_impl" }
%"struct.std::_Vector_base<fastjet::MinHeap::ValueLoc, std::allocator<fastjet::MinHeap::ValueLoc>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastjet::MinHeap::ValueLoc, std::allocator<fastjet::MinHeap::ValueLoc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastjet::MinHeap::ValueLoc, std::allocator<fastjet::MinHeap::ValueLoc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.fastjet::MinHeap::ValueLoc" = type { double, ptr }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [128 x i8], align 1
@__PRETTY_FUNCTION__._ZN7fastjet7MinHeap6updateEjd = external hidden unnamed_addr constant [52 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN7fastjet7MinHeap6updateEjd(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, double noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store double %2, ptr %6, align 8, !tbaa !11
  %13 = load ptr, ptr %4, align 8
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = zext i32 %14 to i64
  %16 = getelementptr inbounds %"class.fastjet::MinHeap", ptr %13, i32 0, i32 0
  %17 = call noundef i64 @_ZNKSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #3
  %18 = icmp ult i64 %15, %17
  br i1 %18, label %19, label %20

19:                                               ; preds = %3
  br label %22

20:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 80, ptr noundef @__PRETTY_FUNCTION__._ZN7fastjet7MinHeap6updateEjd) #4
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %23 = getelementptr inbounds %"class.fastjet::MinHeap", ptr %13, i32 0, i32 0
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %25) #3
  store ptr %26, ptr %7, align 8, !tbaa !5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = icmp ne ptr %29, %30
  br i1 %31, label %32, label %44

32:                                               ; preds = %22
  %33 = load double, ptr %6, align 8, !tbaa !11
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !13
  %37 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %36, i32 0, i32 0
  %38 = load double, ptr %37, align 8, !tbaa !15
  %39 = fcmp olt double %33, %38
  br i1 %39, label %44, label %40

40:                                               ; preds = %32
  %41 = load double, ptr %6, align 8, !tbaa !11
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %42, i32 0, i32 0
  store double %41, ptr %43, align 8, !tbaa !15
  store i32 1, ptr %8, align 4
  br label %137

44:                                               ; preds = %32, %22
  %45 = load double, ptr %6, align 8, !tbaa !11
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %46, i32 0, i32 0
  store double %45, ptr %47, align 8, !tbaa !15
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %49, i32 0, i32 1
  store ptr %48, ptr %50, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  store i8 1, ptr %9, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %51 = getelementptr inbounds %"class.fastjet::MinHeap", ptr %13, i32 0, i32 0
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef 0) #3
  %53 = getelementptr inbounds %"class.fastjet::MinHeap", ptr %13, i32 0, i32 0
  %54 = call noundef i64 @_ZNKSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #3
  %55 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %52, i64 %54
  store ptr %55, ptr %10, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %135, %44
  %57 = load i8, ptr %9, align 1, !tbaa !16, !range !18, !noundef !19
  %58 = trunc i8 %57 to i1
  br i1 %58, label %59, label %136

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %60 = getelementptr inbounds %"class.fastjet::MinHeap", ptr %13, i32 0, i32 0
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %62) #3
  store ptr %63, ptr %11, align 8, !tbaa !5
  store i8 0, ptr %9, align 1, !tbaa !16
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = icmp eq ptr %66, %67
  br i1 %68, label %69, label %73

69:                                               ; preds = %59
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %71, i32 0, i32 1
  store ptr %70, ptr %72, align 8, !tbaa !13
  store i8 1, ptr %9, align 1, !tbaa !16
  br label %73

73:                                               ; preds = %69, %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %74 = getelementptr inbounds %"class.fastjet::MinHeap", ptr %13, i32 0, i32 0
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = mul i32 2, %75
  %77 = add i32 %76, 1
  %78 = zext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %78) #3
  store ptr %79, ptr %12, align 8, !tbaa !5
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = icmp ult ptr %80, %81
  br i1 %82, label %83, label %101

83:                                               ; preds = %73
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  %87 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %86, i32 0, i32 0
  %88 = load double, ptr %87, align 8, !tbaa !15
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %91, i32 0, i32 0
  %93 = load double, ptr %92, align 8, !tbaa !15
  %94 = fcmp olt double %88, %93
  br i1 %94, label %95, label %101

95:                                               ; preds = %83
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %99, i32 0, i32 1
  store ptr %98, ptr %100, align 8, !tbaa !13
  store i8 1, ptr %9, align 1, !tbaa !16
  br label %101

101:                                              ; preds = %95, %83, %73
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %102, i32 1
  store ptr %103, ptr %12, align 8, !tbaa !5
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = icmp ult ptr %104, %105
  br i1 %106, label %107, label %125

107:                                              ; preds = %101
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %108, i32 0, i32 1
  %110 = load ptr, ptr %109, align 8, !tbaa !13
  %111 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %110, i32 0, i32 0
  %112 = load double, ptr %111, align 8, !tbaa !15
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %113, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8, !tbaa !13
  %116 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %115, i32 0, i32 0
  %117 = load double, ptr %116, align 8, !tbaa !15
  %118 = fcmp olt double %112, %117
  br i1 %118, label %119, label %125

119:                                              ; preds = %107
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %120, i32 0, i32 1
  %122 = load ptr, ptr %121, align 8, !tbaa !13
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %123, i32 0, i32 1
  store ptr %122, ptr %124, align 8, !tbaa !13
  store i8 1, ptr %9, align 1, !tbaa !16
  br label %125

125:                                              ; preds = %119, %107, %101
  %126 = load i32, ptr %5, align 4, !tbaa !9
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %129

128:                                              ; preds = %125
  store i32 3, ptr %8, align 4
  br label %133

129:                                              ; preds = %125
  %130 = load i32, ptr %5, align 4, !tbaa !9
  %131 = sub i32 %130, 1
  %132 = udiv i32 %131, 2
  store i32 %132, ptr %5, align 4, !tbaa !9
  store i32 0, ptr %8, align 4
  br label %133

133:                                              ; preds = %129, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %134 = load i32, ptr %8, align 4
  switch i32 %134, label %140 [
    i32 0, label %135
    i32 3, label %136
  ]

135:                                              ; preds = %133
  br label %56, !llvm.loop !20

136:                                              ; preds = %133, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  store i32 0, ptr %8, align 4
  br label %137

137:                                              ; preds = %136, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  %138 = load i32, ptr %8, align 4
  switch i32 %138, label %140 [
    i32 0, label %139
    i32 1, label %139
  ]

139:                                              ; preds = %137, %137
  ret void

140:                                              ; preds = %137, %133
  unreachable
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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


; 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.fastjet::MinHeap::ValueLoc" = type { double, ptr }

@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [128 x i8], align 1
@__PRETTY_FUNCTION__._ZN7fastjet7MinHeap6updateEjd = external hidden unnamed_addr constant [52 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN7fastjet7MinHeap6updateEjd(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, double noundef %2) local_unnamed_addr #0 align 2 {
  %4 = zext i32 %1 to i64
  %5 = tail call noundef i64 @_ZNKSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #2
  %6 = icmp ugt i64 %5, %4
  br i1 %6, label %8, label %7

7:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 80, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7fastjet7MinHeap6updateEjd) #3
  unreachable

8:                                                ; preds = %3
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %4) #2
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %.not = icmp eq ptr %11, %9
  br i1 %.not, label %16, label %12

12:                                               ; preds = %8
  %13 = load double, ptr %11, align 8, !tbaa !11
  %14 = fcmp ogt double %13, %2
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  store double %2, ptr %9, align 8, !tbaa !11
  br label %.loopexit

16:                                               ; preds = %12, %8
  store double %2, ptr %9, align 8, !tbaa !11
  store ptr %9, ptr %10, align 8, !tbaa !5
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #2
  %18 = tail call noundef i64 @_ZNKSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #2
  %19 = getelementptr inbounds %"struct.fastjet::MinHeap::ValueLoc", ptr %17, i64 %18
  br label %20

20:                                               ; preds = %53, %16
  %.036 = phi i1 [ true, %16 ], [ %.3, %53 ]
  %.0 = phi i32 [ %1, %16 ], [ %56, %53 ]
  br i1 %.036, label %21, label %.loopexit

21:                                               ; preds = %20
  %22 = zext i32 %.0 to i64
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %22) #2
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = icmp eq ptr %25, %9
  br i1 %26, label %27, label %28

27:                                               ; preds = %21
  store ptr %23, ptr %24, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %27, %21
  %29 = shl i32 %.0, 1
  %30 = or disjoint i32 %29, 1
  %31 = zext i32 %30 to i64
  %32 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN7fastjet7MinHeap8ValueLocESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %31) #2
  %33 = icmp ult ptr %32, %19
  br i1 %33, label %34, label %42

34:                                               ; preds = %28
  %35 = getelementptr inbounds i8, ptr %32, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = load double, ptr %36, align 8, !tbaa !11
  %38 = load ptr, ptr %24, align 8, !tbaa !5
  %39 = load double, ptr %38, align 8, !tbaa !11
  %40 = fcmp olt double %37, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %34
  store ptr %36, ptr %24, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %41, %34, %28
  %.2 = phi i1 [ true, %41 ], [ %26, %34 ], [ %26, %28 ]
  %43 = getelementptr inbounds i8, ptr %32, i64 16
  %44 = icmp ult ptr %43, %19
  br i1 %44, label %45, label %53

45:                                               ; preds = %42
  %46 = getelementptr inbounds i8, ptr %32, i64 24
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = load double, ptr %47, align 8, !tbaa !11
  %49 = load ptr, ptr %24, align 8, !tbaa !5
  %50 = load double, ptr %49, align 8, !tbaa !11
  %51 = fcmp olt double %48, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %45
  store ptr %47, ptr %24, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %52, %45, %42
  %.3 = phi i1 [ true, %52 ], [ %.2, %45 ], [ %.2, %42 ]
  %54 = icmp eq i32 %.0, 0
  %55 = add i32 %.0, -1
  %56 = lshr i32 %55, 1
  br i1 %54, label %.loopexit, label %20

.loopexit:                                        ; preds = %53, %20, %15
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { noreturn nounwind "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 = { nounwind }
attributes #3 = { noreturn 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, !10, i64 8}
!6 = !{!"_ZTSN7fastjet7MinHeap8ValueLocE", !7, i64 0, !10, i64 8}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass