	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_kremove_device            ## -- Begin function pmap_kremove_device
	.p2align	4, 0x90
_pmap_kremove_device:                   ## @pmap_kremove_device
	.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
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	_L3_OFFSET@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	(%rax), %eax
	andl	%ebx, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	(%rax), %eax
	andl	%r15d, %eax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
                                        ## kill: def $ebx killed $ebx def $rbx
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	movq	_kernel_pmap@GOTPCREL(%rip), %r13
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_pmap_l3
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	movslq	%ebx, %rbx
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	%r12, %rdi
	callq	_pmap_clear
	movl	(%r14), %eax
	addl	%eax, %ebx
	subl	%eax, %r15d
	jne	LBB0_2
LBB0_3:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pmap_invalidate_range          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_L3_OFFSET,4,2                  ## @L3_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pmap_kremove_device: Invalid virtual address"

	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
L_.str.1:                               ## @.str.1
	.asciz	"pmap_kremove_device: Mapping is not page-sized"

	.comm	_kernel_pmap,4,2                ## @kernel_pmap
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_kremove_device            ; -- Begin function pmap_kremove_device
	.p2align	2
_pmap_kremove_device:                   ; @pmap_kremove_device
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _L3_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _L3_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh5:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w0, eq
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
Lloh10:
	adrp	x23, _kernel_pmap@GOTPAGE
Lloh11:
	ldr	x23, [x23, _kernel_pmap@GOTPAGEOFF]
	mov	x21, x19
	cbz	w20, LBB0_3
; %bb.1:
Lloh12:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	mov	x21, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	mov	x1, x21
	bl	_pmap_l3
	mov	x22, x0
	cmp	x0, #0
	cset	w0, ne
	sxtw	x1, w21
	bl	_KASSERT
	mov	x0, x22
	bl	_pmap_clear
	ldr	w8, [x24]
	add	w21, w21, w8
	subs	w20, w20, w8
	b.ne	LBB0_2
LBB0_3:
	ldr	w0, [x23]
	mov	x1, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_pmap_invalidate_range
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_L3_OFFSET,4,2                  ; @L3_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pmap_kremove_device: Invalid virtual address"

	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
l_.str.1:                               ; @.str.1
	.asciz	"pmap_kremove_device: Mapping is not page-sized"

	.comm	_kernel_pmap,4,2                ; @kernel_pmap
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
