	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bch_writeback_add
_bch_writeback_add:                     ## @bch_writeback_add
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	4(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_atomic_read
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_atomic_xchg
	testl	%eax, %eax
	je	LBB0_2
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	%r14, %rdi
	callq	_BDEV_STATE
	movq	_BDEV_STATE_DIRTY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_SET_BDEV_STATE
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_bch_write_bdev_super
LBB0_4:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_bch_writeback_queue            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BDEV_STATE_DIRTY,8,3           ## @BDEV_STATE_DIRTY
	.no_dead_strip	_bch_writeback_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bch_writeback_add
_bch_writeback_add:                     ; @bch_writeback_add
	.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
	add	x20, x0, #4
	mov	x0, x20
	bl	_atomic_read
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #1
	bl	_atomic_xchg
	cbz	w0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x19
	bl	_BDEV_STATE
Lloh0:
	adrp	x8, _BDEV_STATE_DIRTY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BDEV_STATE_DIRTY@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	cmp	x0, x1
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_SET_BDEV_STATE
	mov	x0, x19
	mov	x1, #0
	bl	_bch_write_bdev_super
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bch_writeback_queue
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BDEV_STATE_DIRTY,8,3           ; @BDEV_STATE_DIRTY
	.no_dead_strip	_bch_writeback_add
.subsections_via_symbols
