	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___bch_btree_node_write         ## -- Begin function __bch_btree_node_write
	.p2align	4, 0x90
___bch_btree_node_write:                ## @__bch_btree_node_write
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_btree_bset_last
	movq	%rax, %r14
	leaq	40(%r12), %rdi
	callq	_lockdep_assert_held
	movq	%r12, %rdi
	callq	_trace_bcache_btree_write
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_BUG_ON
	movq	(%r12), %rbx
	movq	%r12, %rdi
	callq	_btree_blocks
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	setge	%dil
	callq	_BUG_ON
	cmpq	$0, (%r12)
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpl	$0, 8(%r14)
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	callq	_BUG_ON
	movq	%r12, %rdi
	callq	_btree_bset_first
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	setne	%dil
	callq	_BUG_ON
	leaq	36(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_bch_check_keys
	leaq	32(%r12), %rdi
	callq	_cancel_delayed_work
	leaq	28(%r12), %rdi
	callq	_down
	testq	%r15, %r15
	jne	LBB0_5
## %bb.4:
	movq	8(%r12), %r15
	addq	$4, %r15
LBB0_5:
	leaq	24(%r12), %rdi
	movq	%r15, %rsi
	callq	_closure_init
	movq	_BTREE_NODE_dirty@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	20(%r12), %r15
	movq	%r15, %rsi
	callq	_clear_bit
	movq	_BTREE_NODE_write_idx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_change_bit
	movq	%r12, %rdi
	callq	_do_btree_node_write
	movq	8(%r12), %rdi
	callq	_block_bytes
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_set_blocks
	movl	%eax, %ebx
	movq	8(%r12), %rdi
	imull	(%rdi), %ebx
	leaq	16(%r12), %rsi
	xorl	%edx, %edx
	callq	_PTR_CACHE
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_atomic_long_add
	movq	8(%r12), %rdi
	callq	_block_bytes
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_set_blocks
	cltq
	addq	%rax, (%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"writing"

	.comm	_BTREE_NODE_dirty,4,2           ## @BTREE_NODE_dirty
	.comm	_BTREE_NODE_write_idx,4,2       ## @BTREE_NODE_write_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___bch_btree_node_write         ; -- Begin function __bch_btree_node_write
	.p2align	2
___bch_btree_node_write:                ; @__bch_btree_node_write
	.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	x21, x1
	mov	x19, x0
	bl	_btree_bset_last
	mov	x20, x0
	add	x0, x19, #40
	bl	_lockdep_assert_held
	mov	x0, x19
	bl	_trace_bcache_btree_write
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_BUG_ON
	ldr	x22, [x19]
	mov	x0, x19
	bl	_btree_blocks
	cmp	x22, x0
	cset	w0, ge
	bl	_BUG_ON
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x20, #8]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_BUG_ON
	mov	x0, x19
	bl	_btree_bset_first
	ldr	x8, [x0]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, ne
	bl	_BUG_ON
	add	x0, x19, #36
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_bch_check_keys
	add	x0, x19, #32
	bl	_cancel_delayed_work
	add	x0, x19, #28
	bl	_down
	cbnz	x21, LBB0_5
; %bb.4:
	ldr	x8, [x19, #8]
	add	x21, x8, #4
LBB0_5:
	add	x0, x19, #24
	mov	x1, x21
	bl	_closure_init
Lloh5:
	adrp	x8, _BTREE_NODE_dirty@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BTREE_NODE_dirty@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x21, x19, #20
	mov	x1, x21
	bl	_clear_bit
Lloh8:
	adrp	x8, _BTREE_NODE_write_idx@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BTREE_NODE_write_idx@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_change_bit
	mov	x0, x19
	bl	_do_btree_node_write
	ldr	x0, [x19, #8]
	bl	_block_bytes
	mov	x1, x0
	mov	x0, x20
	bl	_set_blocks
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	mul	w21, w9, w0
	add	x1, x19, #16
	mov	x0, x8
	mov	w2, #0
	bl	_PTR_CACHE
	mov	x1, x0
	mov	x0, x21
	bl	_atomic_long_add
	ldr	x0, [x19, #8]
	bl	_block_bytes
	mov	x1, x0
	mov	x0, x20
	bl	_set_blocks
	ldr	x8, [x19]
	add	x8, x8, w0, sxtw
	str	x8, [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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"writing"

	.comm	_BTREE_NODE_dirty,4,2           ; @BTREE_NODE_dirty
	.comm	_BTREE_NODE_write_idx,4,2       ; @BTREE_NODE_write_idx
.subsections_via_symbols
