; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 16. Heap/FibonacciHeap.ll (ZN13FibonacciHeap11ConsolidateEP4node)

; 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.FibonacciHeap = type { i32, ptr }
%struct.node = type { i32, i32, ptr, ptr, ptr, ptr, i8, i8 }

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

; 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
declare dso_local noundef i32 @_ZN13FibonacciHeap14Fibonnaci_linkEP4nodeS1_S1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN13FibonacciHeap11ConsolidateEP4node(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %17 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !9
  %19 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %18)
  %20 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %21 = fdiv double %19, %20
  %22 = fptrunc double %21 to float
  store float %22, ptr %7, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %23 = load float, ptr %7, align 4, !tbaa !12
  %24 = fptosi float %23 to i32
  store i32 %24, ptr %8, align 4, !tbaa !14
  %25 = load i32, ptr %8, align 4, !tbaa !14
  %26 = zext i32 %25 to i64
  %27 = call ptr @llvm.stacksave.p0()
  store ptr %27, ptr %9, align 8
  %28 = alloca ptr, i64 %26, align 16
  store i64 %26, ptr %10, align 8
  store i32 0, ptr %6, align 4, !tbaa !14
  br label %29

29:                                               ; preds = %37, %2
  %30 = load i32, ptr %6, align 4, !tbaa !14
  %31 = load i32, ptr %8, align 4, !tbaa !14
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %33, label %40

33:                                               ; preds = %29
  %34 = load i32, ptr %6, align 4, !tbaa !14
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds ptr, ptr %28, i64 %35
  store ptr null, ptr %36, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %33
  %38 = load i32, ptr %6, align 4, !tbaa !14
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %6, align 4, !tbaa !14
  br label %29, !llvm.loop !15

40:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %41, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %42, ptr %14, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %104, %40
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.node, ptr %44, i32 0, i32 5
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  store ptr %46, ptr %14, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.node, ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !19
  store i32 %49, ptr %5, align 4, !tbaa !14
  br label %50

50:                                               ; preds = %90, %43
  %51 = load i32, ptr %5, align 4, !tbaa !14
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds ptr, ptr %28, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %96

56:                                               ; preds = %50
  %57 = load i32, ptr %5, align 4, !tbaa !14
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds ptr, ptr %28, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  store ptr %60, ptr %12, align 8, !tbaa !5
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.node, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !20
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.node, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !20
  %67 = icmp sgt i32 %63, %66
  br i1 %67, label %68, label %72

68:                                               ; preds = %56
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %69, ptr %13, align 8, !tbaa !5
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %70, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %71, ptr %12, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %68, %56
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = icmp eq ptr %73, %74
  br i1 %75, label %76, label %78

76:                                               ; preds = %72
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %77, ptr %4, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %76, %72
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = call noundef i32 @_ZN13FibonacciHeap14Fibonnaci_linkEP4nodeS1_S1_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef %79, ptr noundef %80, ptr noundef %81)
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.node, ptr %83, i32 0, i32 5
  %85 = load ptr, ptr %84, align 8, !tbaa !17
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = icmp eq ptr %85, %86
  br i1 %87, label %88, label %90

88:                                               ; preds = %78
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %89, ptr %4, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %88, %78
  %91 = load i32, ptr %5, align 4, !tbaa !14
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds ptr, ptr %28, i64 %92
  store ptr null, ptr %93, align 8, !tbaa !5
  %94 = load i32, ptr %5, align 4, !tbaa !14
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %5, align 4, !tbaa !14
  br label %50, !llvm.loop !21

96:                                               ; preds = %50
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load i32, ptr %5, align 4, !tbaa !14
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds ptr, ptr %28, i64 %99
  store ptr %97, ptr %100, align 8, !tbaa !5
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.node, ptr %101, i32 0, i32 5
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  store ptr %103, ptr %11, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %96
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = icmp ne ptr %105, %106
  br i1 %107, label %43, label %108, !llvm.loop !22

108:                                              ; preds = %104
  %109 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  store ptr null, ptr %109, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !14
  br label %110

110:                                              ; preds = %231, %108
  %111 = load i32, ptr %15, align 4, !tbaa !14
  %112 = load i32, ptr %8, align 4, !tbaa !14
  %113 = icmp sle i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %234

115:                                              ; preds = %110
  %116 = load i32, ptr %15, align 4, !tbaa !14
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %28, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %230

121:                                              ; preds = %115
  %122 = load i32, ptr %15, align 4, !tbaa !14
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds ptr, ptr %28, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !5
  %126 = load i32, ptr %15, align 4, !tbaa !14
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %28, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.node, ptr %129, i32 0, i32 4
  store ptr %125, ptr %130, align 8, !tbaa !24
  %131 = load i32, ptr %15, align 4, !tbaa !14
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds ptr, ptr %28, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = load i32, ptr %15, align 4, !tbaa !14
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds ptr, ptr %28, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.node, ptr %138, i32 0, i32 5
  store ptr %134, ptr %139, align 8, !tbaa !17
  %140 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !23
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %194

143:                                              ; preds = %121
  %144 = load i32, ptr %15, align 4, !tbaa !14
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds ptr, ptr %28, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8, !tbaa !23
  %150 = getelementptr inbounds %struct.node, ptr %149, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !24
  %152 = getelementptr inbounds %struct.node, ptr %151, i32 0, i32 5
  store ptr %147, ptr %152, align 8, !tbaa !17
  %153 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  %154 = load ptr, ptr %153, align 8, !tbaa !23
  %155 = load i32, ptr %15, align 4, !tbaa !14
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds ptr, ptr %28, i64 %156
  %158 = load ptr, ptr %157, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.node, ptr %158, i32 0, i32 5
  store ptr %154, ptr %159, align 8, !tbaa !17
  %160 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !23
  %162 = getelementptr inbounds %struct.node, ptr %161, i32 0, i32 4
  %163 = load ptr, ptr %162, align 8, !tbaa !24
  %164 = load i32, ptr %15, align 4, !tbaa !14
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds ptr, ptr %28, i64 %165
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.node, ptr %167, i32 0, i32 4
  store ptr %163, ptr %168, align 8, !tbaa !24
  %169 = load i32, ptr %15, align 4, !tbaa !14
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds ptr, ptr %28, i64 %170
  %172 = load ptr, ptr %171, align 8, !tbaa !5
  %173 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !23
  %175 = getelementptr inbounds %struct.node, ptr %174, i32 0, i32 4
  store ptr %172, ptr %175, align 8, !tbaa !24
  %176 = load i32, ptr %15, align 4, !tbaa !14
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds ptr, ptr %28, i64 %177
  %179 = load ptr, ptr %178, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.node, ptr %179, i32 0, i32 0
  %181 = load i32, ptr %180, align 8, !tbaa !20
  %182 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  %183 = load ptr, ptr %182, align 8, !tbaa !23
  %184 = getelementptr inbounds %struct.node, ptr %183, i32 0, i32 0
  %185 = load i32, ptr %184, align 8, !tbaa !20
  %186 = icmp slt i32 %181, %185
  br i1 %186, label %187, label %193

187:                                              ; preds = %143
  %188 = load i32, ptr %15, align 4, !tbaa !14
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds ptr, ptr %28, i64 %189
  %191 = load ptr, ptr %190, align 8, !tbaa !5
  %192 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  store ptr %191, ptr %192, align 8, !tbaa !23
  br label %193

193:                                              ; preds = %187, %143
  br label %200

194:                                              ; preds = %121
  %195 = load i32, ptr %15, align 4, !tbaa !14
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds ptr, ptr %28, i64 %196
  %198 = load ptr, ptr %197, align 8, !tbaa !5
  %199 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  store ptr %198, ptr %199, align 8, !tbaa !23
  br label %200

200:                                              ; preds = %194, %193
  %201 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  %202 = load ptr, ptr %201, align 8, !tbaa !23
  %203 = icmp eq ptr %202, null
  br i1 %203, label %204, label %210

204:                                              ; preds = %200
  %205 = load i32, ptr %15, align 4, !tbaa !14
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds ptr, ptr %28, i64 %206
  %208 = load ptr, ptr %207, align 8, !tbaa !5
  %209 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  store ptr %208, ptr %209, align 8, !tbaa !23
  br label %229

210:                                              ; preds = %200
  %211 = load i32, ptr %15, align 4, !tbaa !14
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds ptr, ptr %28, i64 %212
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.node, ptr %214, i32 0, i32 0
  %216 = load i32, ptr %215, align 8, !tbaa !20
  %217 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  %218 = load ptr, ptr %217, align 8, !tbaa !23
  %219 = getelementptr inbounds %struct.node, ptr %218, i32 0, i32 0
  %220 = load i32, ptr %219, align 8, !tbaa !20
  %221 = icmp slt i32 %216, %220
  br i1 %221, label %222, label %228

222:                                              ; preds = %210
  %223 = load i32, ptr %15, align 4, !tbaa !14
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds ptr, ptr %28, i64 %224
  %226 = load ptr, ptr %225, align 8, !tbaa !5
  %227 = getelementptr inbounds %class.FibonacciHeap, ptr %16, i32 0, i32 1
  store ptr %226, ptr %227, align 8, !tbaa !23
  br label %228

228:                                              ; preds = %222, %210
  br label %229

229:                                              ; preds = %228, %204
  br label %230

230:                                              ; preds = %229, %115
  br label %231

231:                                              ; preds = %230
  %232 = load i32, ptr %15, align 4, !tbaa !14
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %15, align 4, !tbaa !14
  br label %110, !llvm.loop !25

234:                                              ; preds = %114
  unreachable
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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, !11, i64 0}
!10 = !{!"_ZTS13FibonacciHeap", !11, i64 0, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !6, i64 32}
!18 = !{!"_ZTS4node", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !7, i64 41}
!19 = !{!18, !11, i64 4}
!20 = !{!18, !11, i64 0}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = !{!10, !6, i64 8}
!24 = !{!18, !6, i64 24}
!25 = distinct !{!25, !16}


; 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"

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

; Function Attrs: mustprogress noreturn nounwind uwtable
define dso_local noundef i32 @_ZN13FibonacciHeap11ConsolidateEP4node(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %4 = tail call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %3)
  %5 = tail call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %6 = fdiv double %4, %5
  %7 = fptrunc double %6 to float
  %8 = fptosi float %7 to i32
  %9 = zext i32 %8 to i64
  %10 = alloca ptr, i64 %9, align 16
  %.not70 = icmp slt i32 %8, 0
  br i1 %.not70, label %.preheader.preheader, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %2
  %11 = add nuw i32 %8, 1
  %12 = zext i32 %11 to i64
  %13 = shl nuw nsw i64 %12, 3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %10, i8 0, i64 %13, i1 false), !tbaa !11
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %.lr.ph.preheader, %2
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %.054 = phi ptr [ %32, %._crit_edge ], [ %1, %.preheader.preheader ]
  %.052 = phi ptr [ %.1.lcssa, %._crit_edge ], [ %1, %.preheader.preheader ]
  %14 = getelementptr inbounds i8, ptr %.054, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !12
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds ptr, ptr %10, i64 %16
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %.not6572 = icmp eq ptr %18, null
  br i1 %.not6572, label %._crit_edge, label %.lr.ph76

.lr.ph76:                                         ; preds = %.preheader, %.lr.ph76
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph76 ], [ %16, %.preheader ]
  %19 = phi ptr [ %30, %.lr.ph76 ], [ %18, %.preheader ]
  %20 = phi ptr [ %29, %.lr.ph76 ], [ %17, %.preheader ]
  %.175 = phi ptr [ %.3, %.lr.ph76 ], [ %.052, %.preheader ]
  %.15574 = phi ptr [ %spec.select, %.lr.ph76 ], [ %.054, %.preheader ]
  %21 = load i32, ptr %.15574, align 8, !tbaa !14
  %22 = load i32, ptr %19, align 8, !tbaa !14
  %23 = icmp sgt i32 %21, %22
  %spec.select = select i1 %23, ptr %19, ptr %.15574
  %spec.select69 = select i1 %23, ptr %.15574, ptr %19
  %24 = icmp eq ptr %spec.select69, %.175
  %.2 = select i1 %24, ptr %spec.select, ptr %.175
  %25 = tail call noundef i32 @_ZN13FibonacciHeap14Fibonnaci_linkEP4nodeS1_S1_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %.2, ptr noundef nonnull %spec.select69, ptr noundef nonnull %spec.select)
  %26 = getelementptr inbounds i8, ptr %spec.select, i64 32
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = icmp eq ptr %27, %spec.select
  %.3 = select i1 %28, ptr %spec.select, ptr %.2
  store ptr null, ptr %20, align 8, !tbaa !11
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %29 = getelementptr inbounds ptr, ptr %10, i64 %indvars.iv.next
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %.not65 = icmp eq ptr %30, null
  br i1 %.not65, label %._crit_edge, label %.lr.ph76, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph76, %.preheader
  %.155.lcssa = phi ptr [ %.054, %.preheader ], [ %spec.select, %.lr.ph76 ]
  %.1.lcssa = phi ptr [ %.052, %.preheader ], [ %.3, %.lr.ph76 ]
  %.lcssa = phi ptr [ %17, %.preheader ], [ %29, %.lr.ph76 ]
  store ptr %.155.lcssa, ptr %.lcssa, align 8, !tbaa !11
  %31 = getelementptr inbounds i8, ptr %.155.lcssa, i64 32
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %.not66 = icmp eq ptr %32, %.1.lcssa
  br i1 %.not66, label %33, label %.preheader, !llvm.loop !18

33:                                               ; preds = %._crit_edge
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr null, ptr %34, align 8, !tbaa !19
  %35 = sext i32 %8 to i64
  br label %36

36:                                               ; preds = %.thread, %33
  %indvars.iv86 = phi i64 [ %indvars.iv.next87, %.thread ], [ 0, %33 ]
  %.pr81 = phi ptr [ %.pr80, %.thread ], [ null, %33 ]
  %37 = icmp sle i64 %indvars.iv86, %35
  tail call void @llvm.assume(i1 %37)
  %38 = getelementptr inbounds ptr, ptr %10, i64 %indvars.iv86
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %.not67 = icmp eq ptr %39, null
  br i1 %.not67, label %.thread, label %40

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %39, i64 24
  store ptr %39, ptr %41, align 8, !tbaa !20
  %42 = getelementptr inbounds i8, ptr %39, i64 32
  store ptr %39, ptr %42, align 8, !tbaa !15
  %.not68 = icmp eq ptr %.pr81, null
  br i1 %.not68, label %.thread, label %43

43:                                               ; preds = %40
  %.pre = load i32, ptr %39, align 8, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %.pr81, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !20
  %46 = getelementptr inbounds i8, ptr %45, i64 32
  store ptr %39, ptr %46, align 8, !tbaa !15
  store ptr %.pr81, ptr %42, align 8, !tbaa !15
  store ptr %45, ptr %41, align 8, !tbaa !20
  store ptr %39, ptr %44, align 8, !tbaa !20
  %47 = load i32, ptr %.pr81, align 8, !tbaa !14
  %48 = icmp slt i32 %.pre, %47
  %spec.select93 = select i1 %48, ptr %39, ptr %.pr81
  br label %.thread

.thread:                                          ; preds = %40, %43, %36
  %.pr80 = phi ptr [ %.pr81, %36 ], [ %39, %40 ], [ %spec.select93, %43 ]
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  br label %36, !llvm.loop !21
}

; 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 #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #3

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

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 = { mustprogress noreturn 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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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, !7, i64 0}
!6 = !{!"_ZTS13FibonacciHeap", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !7, i64 4}
!13 = !{!"_ZTS4node", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !8, i64 40, !8, i64 41}
!14 = !{!13, !7, i64 0}
!15 = !{!13, !10, i64 32}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!6, !10, i64 8}
!20 = !{!13, !10, i64 24}
!21 = distinct !{!21, !17}


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