	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scatterwalk_pagedone
_scatterwalk_pagedone:                  ## @scatterwalk_pagedone
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rdi
	callq	_sg_page
	movl	(%rbx), %edx
	decl	%edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	movslq	%edx, %rcx
	leaq	(%rax,%rcx,4), %r15
	movq	%r15, %rdi
	callq	_PageSlab
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	testl	%r14d, %r14d
	je	LBB0_5
LBB0_4:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rbx), %ecx
	addl	%ecx, %eax
	decl	%eax
	movl	%eax, (%rbx)
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	8(%rbx), %rdi
	movl	4(%rdi), %ecx
	addl	(%rdi), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_5
## %bb.6:
	callq	_scatterwalk_sg_next
	movq	%rbx, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scatterwalk_start              ## TAILCALL
LBB0_2:
	movq	%r15, %rdi
	callq	_flush_dcache_page
	testl	%r14d, %r14d
	jne	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.no_dead_strip	_scatterwalk_pagedone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scatterwalk_pagedone
_scatterwalk_pagedone:                  ; @scatterwalk_pagedone
	.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	x20, x2
	mov	x19, x0
	cbz	w1, LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_sg_page
	ldr	w8, [x19]
	sub	w8, w8, #1
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	asr	w8, w8, w9
	add	x21, x0, w8, sxtw #2
	mov	x0, x21
	bl	_PageSlab
	cbz	w0, LBB0_5
LBB0_2:
	cbz	w20, LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19]
	add	w8, w8, w9
	sub	w8, w8, #1
	str	w8, [x19]
Lloh6:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x19]
	ldr	x0, [x19, #8]
	ldp	w9, w10, [x0]
	add	w9, w10, w9
	cmp	w8, w9
	b.lt	LBB0_6
; %bb.4:
	bl	_scatterwalk_sg_next
	mov	x1, x0
	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	_scatterwalk_start
LBB0_5:
	mov	x0, x21
	bl	_flush_dcache_page
	cbnz	w20, LBB0_3
LBB0_6:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.no_dead_strip	_scatterwalk_pagedone
.subsections_via_symbols
