	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_md_bitmap_unplug               ## -- Begin function md_bitmap_unplug
	.p2align	4, 0x90
_md_bitmap_unplug:                      ## @md_bitmap_unplug
	.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
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.1:
	movq	%rdi, %r15
	cmpq	$0, 16(%rdi)
	je	LBB0_15
## %bb.2:
	movq	_BITMAP_STALE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	cmpq	$0, 8(%r15)
	je	LBB0_14
## %bb.4:
	xorl	%r13d, %r13d
	movq	_BITMAP_PAGE_NEEDWRITE@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_BITMAP_PAGE_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_clear_page_attr
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_write_page
	movl	$1, %r13d
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	cmpq	8(%r15), %rbx
	jae	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 16(%r15)
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_BITMAP_PAGE_DIRTY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_test_and_clear_page_attr
	movl	%eax, %r12d
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_test_and_clear_page_attr
	orl	%r12d, %eax
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%r13d, %r13d
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	callq	_md_bitmap_wait_writes
	movq	24(%r15), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str(%rip), %rsi
	callq	_blk_add_trace_msg
	jmp	LBB0_10
LBB0_12:
	testl	%r13d, %r13d
	je	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	callq	_md_bitmap_wait_writes
LBB0_14:
	movq	_BITMAP_WRITE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_md_bitmap_file_kick            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BITMAP_STALE,4,2               ## @BITMAP_STALE
	.comm	_BITMAP_PAGE_DIRTY,4,2          ## @BITMAP_PAGE_DIRTY
	.comm	_BITMAP_PAGE_NEEDWRITE,4,2      ## @BITMAP_PAGE_NEEDWRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"md bitmap_unplug"

	.comm	_BITMAP_PAGE_PENDING,4,2        ## @BITMAP_PAGE_PENDING
	.comm	_BITMAP_WRITE_ERROR,4,2         ## @BITMAP_WRITE_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_md_bitmap_unplug               ; -- Begin function md_bitmap_unplug
	.p2align	2
_md_bitmap_unplug:                      ; @md_bitmap_unplug
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _BITMAP_STALE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BITMAP_STALE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
; %bb.5:
	mov	w26, #0
	mov	x20, #0
Lloh3:
	adrp	x23, _BITMAP_PAGE_DIRTY@GOTPAGE
Lloh4:
	ldr	x23, [x23, _BITMAP_PAGE_DIRTY@GOTPAGEOFF]
Lloh5:
	adrp	x24, _BITMAP_PAGE_NEEDWRITE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _BITMAP_PAGE_NEEDWRITE@GOTPAGEOFF]
Lloh7:
	adrp	x25, _BITMAP_PAGE_PENDING@GOTPAGE
Lloh8:
	ldr	x25, [x25, _BITMAP_PAGE_PENDING@GOTPAGEOFF]
Lloh9:
	adrp	x21, l_.str@PAGE
Lloh10:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x20
	bl	_clear_page_attr
	ldr	x8, [x19, #16]
	ldr	w1, [x8, x20, lsl #2]
	mov	x0, x19
	mov	w2, #0
	bl	_write_page
	mov	w26, #1
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x20, x20, #1
	ldr	x8, [x19, #8]
	cmp	x20, x8
	b.hs	LBB0_13
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_test_and_clear_page_attr
	mov	x22, x0
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x20
	bl	_test_and_clear_page_attr
	orr	w8, w22, w0
	cbz	w8, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cbnz	w26, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_md_bitmap_wait_writes
	ldr	x8, [x19, #24]
	ldr	x0, [x8]
	cbz	x0, LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x1, x21
	bl	_blk_add_trace_msg
	b	LBB0_6
LBB0_13:
	cbz	w26, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_md_bitmap_wait_writes
LBB0_15:
Lloh11:
	adrp	x8, _BITMAP_WRITE_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BITMAP_WRITE_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.16:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_md_bitmap_file_kick
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_BITMAP_STALE,4,2               ; @BITMAP_STALE
	.comm	_BITMAP_PAGE_DIRTY,4,2          ; @BITMAP_PAGE_DIRTY
	.comm	_BITMAP_PAGE_NEEDWRITE,4,2      ; @BITMAP_PAGE_NEEDWRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"md bitmap_unplug"

	.comm	_BITMAP_PAGE_PENDING,4,2        ; @BITMAP_PAGE_PENDING
	.comm	_BITMAP_WRITE_ERROR,4,2         ; @BITMAP_WRITE_ERROR
.subsections_via_symbols
