	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_kenter_device             ## -- Begin function pmap_kenter_device
	.p2align	4, 0x90
_pmap_kenter_device:                    ## @pmap_kenter_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	%edx, %r12d
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	_L3_OFFSET@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	movl	(%r14), %eax
	andl	%edx, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	movl	(%r14), %eax
	andl	%ebx, %eax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	(%rax), %eax
	andl	%r15d, %eax
	sete	%dil
	leaq	L_.str.2(%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	_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
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_pmap_l3
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	movslq	%ebx, %rbx
	movq	%rbx, %rsi
	callq	_KASSERT
	movl	%r12d, %eax
	cltd
	idivl	(%r14)
	movq	_PTE_PPN0_S@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	movq	_PTE_KERN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_pmap_store
	movl	(%r14), %eax
	addl	%eax, %ebx
	addl	%eax, %r12d
	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_kenter_device: Invalid physical address"

L_.str.1:                               ## @.str.1
	.asciz	"pmap_kenter_device: Invalid virtual address"

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

	.comm	_kernel_pmap,4,2                ## @kernel_pmap
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PTE_KERN,4,2                   ## @PTE_KERN
	.comm	_PTE_PPN0_S,4,2                 ## @PTE_PPN0_S
.subsections_via_symbols

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

l_.str.1:                               ; @.str.1
	.asciz	"pmap_kenter_device: Invalid virtual address"

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

	.comm	_kernel_pmap,4,2                ; @kernel_pmap
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PTE_KERN,4,2                   ; @PTE_KERN
	.comm	_PTE_PPN0_S,4,2                 ; @PTE_PPN0_S
.subsections_via_symbols
