	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ffs_backgroundwritedone
_ffs_backgroundwritedone:               ## @ffs_backgroundwritedone
	.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	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_BO_LOCK
	movq	24(%rbx), %rdi
	movl	20(%rbx), %esi
	callq	_gbincore
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_2:
	movq	_BIO_ERROR@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	_BV_BKGRDERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r15)
LBB0_4:
	movq	%r14, %rdi
	callq	_BO_UNLOCK
	leaq	16(%rbx), %rdi
	callq	_LIST_EMPTY
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movl	(%r12), %eax
	testl	%eax, (%rbx)
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_buf_complete
LBB0_7:
	movq	_B_NOCACHE@GOTPCREL(%rip), %rax
	movl	12(%rbx), %ecx
	orl	(%rax), %ecx
	movq	_B_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_pbrelvp
	movl	(%r12), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.8:
	movq	_B_INVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%rbx)
LBB0_9:
	movq	%rbx, %rdi
	callq	_bufdone
	movq	%r14, %rdi
	callq	_BO_LOCK
	movq	_BV_BKGRDINPROG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	andl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movl	(%rbx), %eax
	notl	%eax
	andl	4(%r15), %eax
	movl	%eax, 4(%r15)
	movq	_BV_BKGRDWAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_11
## %bb.10:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%r15)
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_wakeup
LBB0_11:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BO_UNLOCK                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"backgroundwritedone: lost buffer"

	.comm	_BIO_ERROR,4,2                  ## @BIO_ERROR
	.comm	_BV_BKGRDERR,4,2                ## @BV_BKGRDERR
	.comm	_B_NOCACHE,4,2                  ## @B_NOCACHE
	.comm	_B_CACHE,4,2                    ## @B_CACHE
	.comm	_B_INVAL,4,2                    ## @B_INVAL
	.comm	_BV_BKGRDINPROG,4,2             ## @BV_BKGRDINPROG
L_.str.1:                               ## @.str.1
	.asciz	"backgroundwritedone: lost buffer2"

	.comm	_BV_BKGRDWAIT,4,2               ## @BV_BKGRDWAIT
	.no_dead_strip	_ffs_backgroundwritedone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ffs_backgroundwritedone
_ffs_backgroundwritedone:               ; @ffs_backgroundwritedone
	.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, x0
	ldr	x19, [x0, #24]
	mov	x0, x19
	bl	_BO_LOCK
	ldr	x0, [x21, #24]
	ldr	w1, [x21, #20]
	bl	_gbincore
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
	ldr	w8, [x21]
Lloh2:
	adrp	x22, _BIO_ERROR@GOTPAGE
Lloh3:
	ldr	x22, [x22, _BIO_ERROR@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _BV_BKGRDERR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BV_BKGRDERR@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #4]
LBB0_4:
	mov	x0, x19
	bl	_BO_UNLOCK
	add	x0, x21, #16
	bl	_LIST_EMPTY
	cbnz	w0, LBB0_7
; %bb.5:
	ldr	w8, [x21]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_buf_complete
LBB0_7:
Lloh7:
	adrp	x8, _B_NOCACHE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _B_NOCACHE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x21, #12]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _B_CACHE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _B_CACHE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x21, #12]
	mov	x0, x21
	bl	_pbrelvp
	ldr	w8, [x21]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh13:
	adrp	x8, _B_INVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _B_INVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x21, #12]
	orr	w8, w9, w8
	str	w8, [x21, #12]
LBB0_9:
	mov	x0, x21
	bl	_bufdone
	mov	x0, x19
	bl	_BO_LOCK
	ldr	w8, [x20, #4]
Lloh16:
	adrp	x21, _BV_BKGRDINPROG@GOTPAGE
Lloh17:
	ldr	x21, [x21, _BV_BKGRDINPROG@GOTPAGEOFF]
	ldr	w9, [x21]
	and	w0, w9, w8
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x21]
	ldr	w9, [x20, #4]
	bic	w8, w9, w8
	str	w8, [x20, #4]
Lloh20:
	adrp	x9, _BV_BKGRDWAIT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _BV_BKGRDWAIT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	bic	w8, w8, w9
	str	w8, [x20, #4]
	add	x0, x20, #8
	bl	_wakeup
LBB0_11:
	mov	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	_BO_UNLOCK
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"backgroundwritedone: lost buffer"

	.comm	_BIO_ERROR,4,2                  ; @BIO_ERROR
	.comm	_BV_BKGRDERR,4,2                ; @BV_BKGRDERR
	.comm	_B_NOCACHE,4,2                  ; @B_NOCACHE
	.comm	_B_CACHE,4,2                    ; @B_CACHE
	.comm	_B_INVAL,4,2                    ; @B_INVAL
	.comm	_BV_BKGRDINPROG,4,2             ; @BV_BKGRDINPROG
l_.str.1:                               ; @.str.1
	.asciz	"backgroundwritedone: lost buffer2"

	.comm	_BV_BKGRDWAIT,4,2               ; @BV_BKGRDWAIT
	.no_dead_strip	_ffs_backgroundwritedone
.subsections_via_symbols
