	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_moea64_dev_direct_mapped       ## -- Begin function moea64_dev_direct_mapped
	.p2align	4, 0x90
_moea64_dev_direct_mapped:              ## @moea64_dev_direct_mapped
	.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
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	_hw_direct_map@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_mem_valid
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_PMAP_LOCK
	movq	_ADDR_POFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	%r14d, %ebx
	movq	_DMAP_BASE_ADDRESS@GOTPCREL(%rip), %rax
	movslq	%ebx, %r15
	movq	(%rax), %rax
	addq	%r15, %rax
	movq	%rax, -48(%rbp)
	movq	_pvo_tree@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-56(%rbp), %rdx
	callq	_RB_FIND
	addl	%r14d, %r12d
	xorl	%r14d, %r14d
	cmpl	%r12d, %r15d
	jge	LBB0_10
## %bb.4:
	movq	_LPTE_RPGN@GOTPCREL(%rip), %r14
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %ecx
	andl	(%rax), %ecx
	cmpl	%ebx, %ecx
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	addl	(%r15), %ebx
	movl	(%r13), %edi
	movq	_kernel_pmap@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movq	%rax, %rdx
	callq	_RB_NEXT
	cmpl	%r12d, %ebx
	jl	LBB0_5
## %bb.9:
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_7:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_10:
	movq	_kernel_pmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_PMAP_UNLOCK
	jmp	LBB0_11
LBB0_2:
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hw_direct_map,8,3              ## @hw_direct_map
	.comm	_kernel_pmap,8,3                ## @kernel_pmap
	.comm	_ADDR_POFF,4,2                  ## @ADDR_POFF
	.comm	_DMAP_BASE_ADDRESS,8,3          ## @DMAP_BASE_ADDRESS
	.comm	_pvo_tree,4,2                   ## @pvo_tree
	.comm	_LPTE_RPGN,4,2                  ## @LPTE_RPGN
	.comm	_EFAULT,4,2                     ## @EFAULT
	.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	_moea64_dev_direct_mapped       ; -- Begin function moea64_dev_direct_mapped
	.p2align	2
_moea64_dev_direct_mapped:              ; @moea64_dev_direct_mapped
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _hw_direct_map@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hw_direct_map@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_mem_valid
	cbz	x0, LBB0_8
LBB0_2:
Lloh3:
	adrp	x21, _kernel_pmap@GOTPAGE
Lloh4:
	ldr	x21, [x21, _kernel_pmap@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_PMAP_LOCK
Lloh5:
	adrp	x8, _ADDR_POFF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADDR_POFF@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w22, w20, w8
Lloh8:
	adrp	x8, _DMAP_BASE_ADDRESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMAP_BASE_ADDRESS@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x8, x8, w22, sxtw
	str	x8, [sp, #8]
Lloh11:
	adrp	x23, _pvo_tree@GOTPAGE
Lloh12:
	ldr	x23, [x23, _pvo_tree@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	x1, [x21]
	mov	x2, sp
	bl	_RB_FIND
	add	w19, w19, w20
	cmp	w22, w19
	b.ge	LBB0_7
; %bb.3:
	mov	x2, x0
Lloh13:
	adrp	x20, _LPTE_RPGN@GOTPAGE
Lloh14:
	ldr	x20, [x20, _LPTE_RPGN@GOTPAGEOFF]
Lloh15:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x2, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x2]
	ldr	w9, [x20]
	and	w8, w9, w8
	cmp	w8, w22
	b.ne	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	add	w22, w22, w8
	ldr	w0, [x23]
	ldr	x1, [x21]
	bl	_RB_NEXT
	mov	x2, x0
	cmp	w22, w19
	b.lt	LBB0_4
LBB0_7:
	mov	w19, #0
	b	LBB0_10
LBB0_8:
	mov	w19, #0
	b	LBB0_11
LBB0_9:
Lloh17:
	adrp	x8, _EFAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh19:
	ldr	w19, [x8]
LBB0_10:
	ldr	x0, [x21]
	bl	_PMAP_UNLOCK
LBB0_11:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_hw_direct_map,8,3              ; @hw_direct_map
	.comm	_kernel_pmap,8,3                ; @kernel_pmap
	.comm	_ADDR_POFF,4,2                  ; @ADDR_POFF
	.comm	_DMAP_BASE_ADDRESS,8,3          ; @DMAP_BASE_ADDRESS
	.comm	_pvo_tree,4,2                   ; @pvo_tree
	.comm	_LPTE_RPGN,4,2                  ; @LPTE_RPGN
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
