	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btree_node_free
_btree_node_free:                       ## @btree_node_free
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_trace_bcache_btree_node_free
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	%r14, 8(%rax)
	sete	%dil
	callq	_BUG_ON
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_btree_node_journal_flush
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_pr_debug
	movl	$1, %edi
	callq	_udelay
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_btree_node_journal_flush
	testq	%rax, %rax
	jne	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_btree_node_dirty
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_btree_current_write
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_btree_complete_write
	movq	_BTREE_NODE_dirty@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	20(%r14), %rsi
	callq	_clear_bit
LBB0_5:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	leaq	12(%r14), %rdi
	callq	_cancel_delayed_work
	movq	(%r14), %rdi
	callq	_mutex_lock
	movq	(%r14), %rdi
	leaq	8(%r14), %rsi
	callq	_bch_bucket_free
	movq	%r14, %rdi
	callq	_mca_bucket_free
	movq	(%r14), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bnode %p journal_flush set, retry"

	.comm	_BTREE_NODE_dirty,4,2           ## @BTREE_NODE_dirty
	.no_dead_strip	_btree_node_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btree_node_free
_btree_node_free:                       ; @btree_node_free
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	bl	_trace_bcache_btree_node_free
	mov	x20, x19
	ldr	x8, [x20], #16
	ldr	x8, [x8, #8]
	cmp	x8, x19
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_btree_node_journal_flush
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x21, l_.str@PAGE
Lloh1:
	add	x21, x21, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x21
	mov	x1, x19
	bl	_pr_debug
	mov	w0, #1
	bl	_udelay
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_btree_node_journal_flush
	cbnz	x0, LBB0_2
LBB0_3:
	mov	x0, x19
	bl	_btree_node_dirty
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_btree_current_write
	mov	x1, x0
	mov	x0, x19
	bl	_btree_complete_write
Lloh2:
	adrp	x8, _BTREE_NODE_dirty@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BTREE_NODE_dirty@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, x19, #20
	bl	_clear_bit
LBB0_5:
	mov	x0, x20
	bl	_mutex_unlock
	add	x0, x19, #12
	bl	_cancel_delayed_work
	ldr	x0, [x19]
	bl	_mutex_lock
	ldr	x0, [x19]
	add	x1, x19, #8
	bl	_bch_bucket_free
	mov	x0, x19
	bl	_mca_bucket_free
	ldr	x0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bnode %p journal_flush set, retry"

	.comm	_BTREE_NODE_dirty,4,2           ; @BTREE_NODE_dirty
	.no_dead_strip	_btree_node_free
.subsections_via_symbols
