	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_binaryheap_remove_first        ## -- Begin function binaryheap_remove_first
	.p2align	4, 0x90
_binaryheap_remove_first:               ## @binaryheap_remove_first
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_binaryheap_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	setne	%dil
LBB0_2:
	callq	_Assert
	movl	(%rbx), %edx
	cmpl	$1, %edx
	jne	LBB0_4
## %bb.3:
	movl	$0, (%rbx)
	movq	8(%rbx), %rax
	jmp	LBB0_5
LBB0_4:
	decl	%edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_swap_nodes
	decl	(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sift_down
	movslq	(%rbx), %rax
	shlq	$2, %rax
	addq	8(%rbx), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_binaryheap_remove_first        ; -- Begin function binaryheap_remove_first
	.p2align	2
_binaryheap_remove_first:               ; @binaryheap_remove_first
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_binaryheap_empty
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, ne
LBB0_3:
	bl	_Assert
	ldr	w8, [x19]
	subs	w2, w8, #1
	b.ne	LBB0_5
; %bb.4:
	str	wzr, [x19]
	ldr	x8, [x19, #8]
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	w1, #0
	bl	_swap_nodes
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_sift_down
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	x8, x8, x9, lsl #2
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
