	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _kmem_unback
__kmem_unback:                          ## @_kmem_unback
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	_kernel_object@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rbx, (%rax)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	(%r15,%r13), %rdx
	movq	%r13, %rsi
	callq	_pmap_remove
	movq	_VM_MIN_KERNEL_ADDRESS@GOTPCREL(%rip), %rax
	subq	(%rax), %r13
	movq	%rbx, %rdi
	callq	_VM_OBJECT_WLOCK
	movq	%r13, %rdi
	callq	_atop
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_vm_page_lookup
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_vm_phys_domain
	movq	_vm_dom@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	shlq	$4, %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	jle	LBB0_5
## %bb.3:
	addq	%r13, %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_vm_page_next
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_vm_page_unwire_noq
	movq	%rbx, %rdi
	callq	_vm_page_free
	addq	(%r14), %r13
	movq	%r12, %rbx
	cmpq	%r15, %r13
	jl	LBB0_4
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_VM_OBJECT_WUNLOCK
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kernel_object,8,3              ## @kernel_object
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kmem_unback: only supports kernel object."

	.comm	_kernel_pmap,4,2                ## @kernel_pmap
	.comm	_VM_MIN_KERNEL_ADDRESS,8,3      ## @VM_MIN_KERNEL_ADDRESS
	.comm	_vm_dom,8,3                     ## @vm_dom
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_VPO_KMEM_EXEC,4,2              ## @VPO_KMEM_EXEC
	.no_dead_strip	__kmem_unback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _kmem_unback
__kmem_unback:                          ; @_kmem_unback
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _kernel_object@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kernel_object@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	cbz	x21, LBB0_5
; %bb.1:
Lloh5:
	adrp	x8, _kernel_pmap@GOTPAGE
Lloh6:
	ldr	x8, [x8, _kernel_pmap@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x2, x21, x20
	mov	x1, x20
	bl	_pmap_remove
Lloh8:
	adrp	x8, _VM_MIN_KERNEL_ADDRESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VM_MIN_KERNEL_ADDRESS@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	sub	x20, x20, x8
	mov	x0, x19
	bl	_VM_OBJECT_WLOCK
	mov	x0, x20
	bl	_atop
	mov	x1, x0
	mov	x0, x19
	bl	_vm_page_lookup
	mov	x23, x0
	bl	_vm_phys_domain
                                        ; kill: def $w0 killed $w0 def $x0
Lloh11:
	adrp	x8, _vm_dom@GOTPAGE
Lloh12:
	ldr	x8, [x8, _vm_dom@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	sbfiz	x9, x0, #4, #32
	ldr	x22, [x8, x9]
	cmp	x21, #1
	b.lt	LBB0_4
; %bb.2:
	add	x24, x20, x21
Lloh14:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh15:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_vm_page_next
	mov	x21, x0
	mov	x0, x23
	bl	_vm_page_unwire_noq
	mov	x0, x23
	bl	_vm_page_free
	ldr	x8, [x25]
	add	x20, x8, x20
	cmp	x20, x24
	mov	x23, x21
	b.lt	LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_VM_OBJECT_WUNLOCK
	b	LBB0_6
LBB0_5:
	mov	x22, #0
LBB0_6:
	mov	x0, x22
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_kernel_object,8,3              ; @kernel_object
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kmem_unback: only supports kernel object."

	.comm	_kernel_pmap,4,2                ; @kernel_pmap
	.comm	_VM_MIN_KERNEL_ADDRESS,8,3      ; @VM_MIN_KERNEL_ADDRESS
	.comm	_vm_dom,8,3                     ; @vm_dom
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_VPO_KMEM_EXEC,4,2              ; @VPO_KMEM_EXEC
	.no_dead_strip	__kmem_unback
.subsections_via_symbols
