	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_md_bitmap_daemon_work          ## -- Begin function md_bitmap_daemon_work
	.p2align	4, 0x90
_md_bitmap_daemon_work:                 ## @md_bitmap_daemon_work
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	32(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_39
## %bb.1:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rsi
	addq	88(%r14), %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_36
## %bb.2:
	movq	(%r15), %rax
	movq	%rax, 88(%r14)
	cmpl	$0, (%r14)
	je	LBB0_4
## %bb.3:
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rcx), %rcx
	movq	%rax, (%rcx)
LBB0_36:
	cmpl	$0, (%r14)
	jne	LBB0_38
## %bb.37:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rax
	movq	24(%rcx), %rcx
	movq	%rax, (%rcx)
LBB0_38:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_39:
	movq	%r15, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_4:
	movl	$1, (%r14)
	movq	80(%r14), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	callq	_blk_add_trace_msg
LBB0_6:
	cmpq	$0, 8(%r14)
	je	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	movq	_BITMAP_PAGE_PENDING@GOTPCREL(%rip), %r15
	movq	_BITMAP_PAGE_NEEDWRITE@GOTPCREL(%rip), %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	8(%r14), %rbx
	jae	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_test_and_clear_page_attr
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_set_page_attr
	jmp	LBB0_10
LBB0_11:
	cmpq	$0, 40(%r14)
	je	LBB0_15
## %bb.12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	jne	LBB0_15
## %bb.13:
	movq	$0, 40(%r14)
	cmpq	$0, 16(%r14)
	je	LBB0_15
## %bb.14:
	movl	24(%r14), %edi
	callq	_kmap_atomic
	movq	%rax, %rbx
	movl	72(%r14), %edi
	callq	_cpu_to_le64
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_kunmap_atomic
	movq	_BITMAP_PAGE_NEEDWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_set_page_attr
LBB0_15:
	leaq	60(%r14), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irq
	cmpq	$0, 48(%r14)
	je	LBB0_29
## %bb.16:
	leaq	48(%r14), %r13
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	_PAGE_COUNTER_MASK@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
LBB0_28:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	cmpq	(%r13), %rbx
	jae	LBB0_29
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movzbl	56(%r14), %ecx
	movl	%ebx, %r12d
	shll	%cl, %r12d
	cmpq	%r15, %rbx
	jne	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_PAGE_COUNTER_RATIO@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_PAGE_COUNTER_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	movq	%rbx, %rax
	shrq	%cl, %rax
	addq	%rbx, %r15
	movq	64(%r14), %rcx
	cmpq	$0, (%rcx,%rax,8)
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	$0, (%rcx,%rax,8)
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	%r13, %rdi
	movl	%r12d, %esi
	leaq	-68(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_md_bitmap_get_counter
	testq	%rax, %rax
	je	LBB0_19
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	(%rax), %ecx
	cmpl	$1, %ecx
	jne	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpq	$0, 40(%r14)
	je	LBB0_24
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=1
	testl	%ecx, %ecx
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$2, %ecx
	jg	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$1, (%rax)
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_md_bitmap_set_pending
	movl	$0, (%r14)
	jmp	LBB0_28
LBB0_24:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	$0, (%rax)
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	$-1, %edx
	callq	_md_bitmap_count_page
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_md_bitmap_file_clear_bit
	jmp	LBB0_28
LBB0_29:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irq
	movq	%r14, %rdi
	callq	_md_bitmap_wait_writes
	cmpq	$0, 8(%r14)
	je	LBB0_36
## %bb.30:
	leaq	32(%r14), %r12
	xorl	%ebx, %ebx
	movq	_BITMAP_STALE@GOTPCREL(%rip), %r15
	movq	_BITMAP_PAGE_DIRTY@GOTPCREL(%rip), %r13
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_31 Depth=1
	incq	%rbx
	cmpq	8(%r14), %rbx
	jae	LBB0_36
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_36
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	movl	(%r13), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_test_page_attr
	testq	%rax, %rax
	jne	LBB0_36
## %bb.33:                              ##   in Loop: Header=BB0_31 Depth=1
	movq	_BITMAP_PAGE_NEEDWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_test_and_clear_page_attr
	testq	%rax, %rax
	je	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_31 Depth=1
	movq	16(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_write_page
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ## @MAX_SCHEDULE_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"md bitmap_daemon_work"

	.comm	_BITMAP_PAGE_PENDING,4,2        ## @BITMAP_PAGE_PENDING
	.comm	_BITMAP_PAGE_NEEDWRITE,4,2      ## @BITMAP_PAGE_NEEDWRITE
	.comm	_PAGE_COUNTER_RATIO,8,3         ## @PAGE_COUNTER_RATIO
	.comm	_PAGE_COUNTER_SHIFT,8,3         ## @PAGE_COUNTER_SHIFT
	.comm	_PAGE_COUNTER_MASK,8,3          ## @PAGE_COUNTER_MASK
	.comm	_BITMAP_STALE,4,2               ## @BITMAP_STALE
	.comm	_BITMAP_PAGE_DIRTY,4,2          ## @BITMAP_PAGE_DIRTY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_md_bitmap_daemon_work          ; -- Begin function md_bitmap_daemon_work
	.p2align	2
_md_bitmap_daemon_work:                 ; @md_bitmap_daemon_work
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x21, [x20, #32]
	cbz	x21, LBB0_7
; %bb.1:
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x0, [x22]
	ldr	x8, [x21, #88]
	ldr	x9, [x20, #16]
	add	x1, x9, x8
	bl	_time_before
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x22]
	str	x8, [x21, #88]
	ldr	w8, [x21]
	cbz	w8, LBB0_8
; %bb.3:
Lloh2:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [x20, #24]
	str	x8, [x9]
LBB0_4:
	ldr	w8, [x21]
	cbnz	w8, LBB0_6
; %bb.5:
	ldp	x8, x9, [x20, #16]
	str	x8, [x9]
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_mutex_unlock
LBB0_8:
	mov	w8, #1
	str	w8, [x21]
	ldr	x8, [x21, #80]
	ldr	x0, [x8]
	cbz	x0, LBB0_10
; %bb.9:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_blk_add_trace_msg
LBB0_10:
	ldr	x8, [x21, #8]
Lloh7:
	adrp	x24, _BITMAP_PAGE_NEEDWRITE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _BITMAP_PAGE_NEEDWRITE@GOTPAGEOFF]
	cbz	x8, LBB0_15
; %bb.11:
	mov	x22, #0
Lloh9:
	adrp	x23, _BITMAP_PAGE_PENDING@GOTPAGE
Lloh10:
	ldr	x23, [x23, _BITMAP_PAGE_PENDING@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x22, x22, #1
	ldr	x8, [x21, #8]
	cmp	x22, x8
	b.hs	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x22
	bl	_test_and_clear_page_attr
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w2, [x24]
	mov	x0, x21
	mov	x1, x22
	bl	_set_page_attr
	b	LBB0_12
LBB0_15:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_19
; %bb.16:
	ldr	x8, [x20]
	cbnz	x8, LBB0_19
; %bb.17:
	str	xzr, [x21, #40]
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_19
; %bb.18:
	ldr	w0, [x21, #24]
	bl	_kmap_atomic
	mov	x22, x0
	ldr	w0, [x21, #72]
	bl	_cpu_to_le64
	str	w0, [x22]
	mov	x0, x22
	bl	_kunmap_atomic
	ldr	w2, [x24]
	mov	x0, x21
	mov	x1, #0
	bl	_set_page_attr
LBB0_19:
	add	x0, x21, #60
	str	x0, [sp]                        ; 8-byte Folded Spill
	bl	_spin_lock_irq
	mov	x23, x21
	ldr	x8, [x23, #48]!
	cbz	x8, LBB0_32
; %bb.20:
	mov	x26, #0
	mov	x27, #0
Lloh11:
	adrp	x28, _PAGE_COUNTER_RATIO@GOTPAGE
Lloh12:
	ldr	x28, [x28, _PAGE_COUNTER_RATIO@GOTPAGEOFF]
Lloh13:
	adrp	x22, _PAGE_COUNTER_SHIFT@GOTPAGE
Lloh14:
	ldr	x22, [x22, _PAGE_COUNTER_SHIFT@GOTPAGEOFF]
Lloh15:
	adrp	x25, _PAGE_COUNTER_MASK@GOTPAGE
Lloh16:
	ldr	x25, [x25, _PAGE_COUNTER_MASK@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_23 Depth=1
	ldr	x8, [x25]
	orr	x26, x8, x26
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x26, x26, #1
	ldr	x8, [x23]
	cmp	x26, x8
	b.hs	LBB0_32
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, #56]
	cmp	x26, x27
	b.ne	LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x9, [x28]
	add	x27, x9, x26
	ldr	x9, [x21, #64]
	ldr	x10, [x22]
	lsr	x10, x26, x10
	ldr	x11, [x9, x10, lsl #3]
	cbz	x11, LBB0_21
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	str	xzr, [x9, x10, lsl #3]
LBB0_26:                                ;   in Loop: Header=BB0_23 Depth=1
	lsl	w24, w26, w8
	add	x2, sp, #12
	mov	x0, x23
	mov	x1, x24
	mov	w3, #0
	bl	_md_bitmap_get_counter
	cbz	x0, LBB0_21
; %bb.27:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	w8, [x0]
	cmp	w8, #1
	b.ne	LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x9, [x21, #40]
	cbz	x9, LBB0_31
LBB0_29:                                ;   in Loop: Header=BB0_23 Depth=1
	cmp	w8, #0
	ccmp	w8, #2, #0, ne
	b.gt	LBB0_22
; %bb.30:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	w8, #1
	str	w8, [x0]
	mov	x0, x23
	mov	x1, x24
	bl	_md_bitmap_set_pending
	str	wzr, [x21]
	b	LBB0_22
LBB0_31:                                ;   in Loop: Header=BB0_23 Depth=1
	str	wzr, [x0]
	mov	x0, x23
	mov	x1, x24
	mov	w2, #-1
	bl	_md_bitmap_count_page
	mov	x0, x21
	mov	x1, x24
	bl	_md_bitmap_file_clear_bit
	b	LBB0_22
LBB0_32:
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_spin_unlock_irq
	mov	x0, x21
	bl	_md_bitmap_wait_writes
	ldr	x8, [x21, #8]
Lloh17:
	adrp	x26, _BITMAP_PAGE_NEEDWRITE@GOTPAGE
Lloh18:
	ldr	x26, [x26, _BITMAP_PAGE_NEEDWRITE@GOTPAGEOFF]
	cbz	x8, LBB0_4
; %bb.33:
	mov	x22, #0
	add	x23, x21, #32
Lloh19:
	adrp	x24, _BITMAP_STALE@GOTPAGE
Lloh20:
	ldr	x24, [x24, _BITMAP_STALE@GOTPAGEOFF]
Lloh21:
	adrp	x25, _BITMAP_PAGE_DIRTY@GOTPAGE
Lloh22:
	ldr	x25, [x25, _BITMAP_PAGE_DIRTY@GOTPAGEOFF]
	b	LBB0_35
LBB0_34:                                ;   in Loop: Header=BB0_35 Depth=1
	add	x22, x22, #1
	ldr	x8, [x21, #8]
	cmp	x22, x8
	b.hs	LBB0_4
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	mov	x1, x23
	bl	_test_bit
	cbnz	w0, LBB0_4
; %bb.36:                               ;   in Loop: Header=BB0_35 Depth=1
	ldr	w2, [x25]
	mov	x0, x21
	mov	x1, x22
	bl	_test_page_attr
	cbnz	x0, LBB0_4
; %bb.37:                               ;   in Loop: Header=BB0_35 Depth=1
	ldr	w2, [x26]
	mov	x0, x21
	mov	x1, x22
	bl	_test_and_clear_page_attr
	cbz	x0, LBB0_34
; %bb.38:                               ;   in Loop: Header=BB0_35 Depth=1
	ldr	x8, [x21, #16]
	ldr	w1, [x8, x22, lsl #2]
	mov	x0, x21
	mov	w2, #0
	bl	_write_page
	b	LBB0_34
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ; @MAX_SCHEDULE_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"md bitmap_daemon_work"

	.comm	_BITMAP_PAGE_PENDING,4,2        ; @BITMAP_PAGE_PENDING
	.comm	_BITMAP_PAGE_NEEDWRITE,4,2      ; @BITMAP_PAGE_NEEDWRITE
	.comm	_PAGE_COUNTER_RATIO,8,3         ; @PAGE_COUNTER_RATIO
	.comm	_PAGE_COUNTER_SHIFT,8,3         ; @PAGE_COUNTER_SHIFT
	.comm	_PAGE_COUNTER_MASK,8,3          ; @PAGE_COUNTER_MASK
	.comm	_BITMAP_STALE,4,2               ; @BITMAP_STALE
	.comm	_BITMAP_PAGE_DIRTY,4,2          ; @BITMAP_PAGE_DIRTY
.subsections_via_symbols
