	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btree_gc_rewrite_node
_btree_gc_rewrite_node:                 ## @btree_gc_rewrite_node
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_btree_check_reserve
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_btree_node_alloc_replacement
	movq	%rax, %r15
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_btree_check_reserve
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	callq	_btree_node_free
	movl	$1, %edi
	movq	%r15, %rsi
	callq	_rw_unlock
	jmp	LBB0_4
LBB0_3:
	callq	_bch_btree_node_write_sync
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	callq	_bch_keylist_init
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_bch_keylist_add
	movl	-48(%rbp), %esi
	movq	%r14, %rdi
	callq	_make_btree_freeing_key
	movq	%r13, %rdi
	callq	_bch_keylist_push
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_bch_btree_insert_node
	movq	%rbx, %rdi
	callq	_bch_keylist_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_BUG_ON
	movq	%r14, %rdi
	callq	_btree_node_free
	movl	$1, %edi
	movq	%r15, %rsi
	callq	_rw_unlock
	movq	_EINTR@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_4:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINTR,4,2                      ## @EINTR
	.no_dead_strip	_btree_gc_rewrite_node
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btree_gc_rewrite_node
_btree_gc_rewrite_node:                 ; @btree_gc_rewrite_node
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	x1, #0
	bl	_btree_check_reserve
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
	mov	x0, x19
	mov	x1, #0
	bl	_btree_node_alloc_replacement
	mov	x20, x0
	mov	x0, x22
	mov	x1, #0
	bl	_btree_check_reserve
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_btree_node_free
	mov	w0, #1
	mov	x1, x20
	bl	_rw_unlock
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	bl	_bch_btree_node_write_sync
	add	x0, sp, #8
	bl	_bch_keylist_init
	add	x0, sp, #8
	mov	x1, x20
	bl	_bch_keylist_add
	ldr	w1, [sp, #8]
	mov	x0, x19
	bl	_make_btree_freeing_key
	add	x0, sp, #8
	bl	_bch_keylist_push
	add	x2, sp, #8
	mov	x0, x22
	mov	x1, x21
	mov	x3, #0
	mov	x4, #0
	bl	_bch_btree_insert_node
	add	x0, sp, #8
	bl	_bch_keylist_empty
	cmp	w0, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, x19
	bl	_btree_node_free
	mov	w0, #1
	mov	x1, x20
	bl	_rw_unlock
Lloh0:
	adrp	x8, _EINTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINTR,4,2                      ; @EINTR
	.no_dead_strip	_btree_gc_rewrite_node
.subsections_via_symbols
