	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moea_pvo_to_pte
_moea_pvo_to_pte:                       ## @moea_pvo_to_pte
	.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, %ebx
	movq	%rdi, %r14
	cmpl	$-1, %esi
	jne	LBB0_2
## %bb.1:
	movq	16(%r14), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
	callq	_va_to_sr
	movl	8(%r14), %esi
	movl	%eax, %edi
	callq	_va_to_pteg
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_moea_pvo_pte_index
	movl	%eax, %ebx
LBB0_2:
	movq	_moea_pteg_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rcx
	movq	(%rax,%rcx,8), %r12
	andl	$7, %ebx
	movq	_moea_table_mutex@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	_PTE_VALID@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_PVO_PTEGIDX_ISSET
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_panic
LBB0_5:
	leaq	(%r12,%rbx,8), %r15
	movl	(%r13), %eax
	testl	%eax, (%r14)
	jne	LBB0_8
## %bb.6:
	movq	%r14, %rdi
	callq	_PVO_PTEGIDX_ISSET
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_panic
LBB0_8:
	movl	(%r15), %r8d
	movl	(%r14), %ecx
	movl	(%r13), %eax
	movl	%eax, %edx
	notl	%edx
	andl	%ecx, %edx
	xorl	%r8d, %edx
	cmpl	%eax, %edx
	jne	LBB0_14
## %bb.9:
	testl	%ecx, %eax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_panic
LBB0_11:
	movl	4(%r14), %eax
	xorl	4(%r12,%rbx,8), %eax
	movq	_PTE_CHG@GOTPCREL(%rip), %rcx
	movq	_PTE_REF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	testl	%edx, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_panic
LBB0_13:
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_moea_table_mutex@GOTPCREL(%rip), %rdi
	callq	_mtx_assert
	jmp	LBB0_17
LBB0_14:
	testl	%ecx, %eax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.4(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_panic
LBB0_16:
	movq	_moea_table_mutex@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	xorl	%r15d, %r15d
LBB0_17:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_moea_pteg_table,8,3            ## @moea_pteg_table
	.comm	_moea_table_mutex,4,2           ## @moea_table_mutex
	.comm	_PTE_VALID,4,2                  ## @PTE_VALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"moea_pvo_to_pte: pvo %p has valid pte in pvo but no valid pte index"

L_.str.1:                               ## @.str.1
	.asciz	"moea_pvo_to_pte: pvo %p has valid pte index in pvo pvo but no valid pte"

L_.str.2:                               ## @.str.2
	.asciz	"moea_pvo_to_pte: pvo %p has valid pte in moea_pteg_table %p but invalid in pvo"

	.comm	_PTE_CHG,4,2                    ## @PTE_CHG
	.comm	_PTE_REF,4,2                    ## @PTE_REF
L_.str.3:                               ## @.str.3
	.asciz	"moea_pvo_to_pte: pvo %p pte does not match pte %p in moea_pteg_table"

	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
L_.str.4:                               ## @.str.4
	.asciz	"moea_pvo_to_pte: pvo %p has invalid pte %p in moea_pteg_table but valid in pvo: %8x, %8x"

	.no_dead_strip	_moea_pvo_to_pte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moea_pvo_to_pte
_moea_pvo_to_pte:                       ; @moea_pvo_to_pte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	cmn	w1, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_va_to_sr
	ldr	w1, [x19, #8]
	bl	_va_to_pteg
	mov	x1, x0
	mov	x0, x19
	bl	_moea_pvo_pte_index
	mov	x1, x0
LBB0_2:
Lloh0:
	adrp	x8, _moea_pteg_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _moea_pteg_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	asr	w9, w1, #3
	ldr	x21, [x8, w9, sxtw #3]
	and	w22, w1, #0x7
	add	x20, x21, w22, uxtw #3
Lloh3:
	adrp	x0, _moea_table_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _moea_table_mutex@GOTPAGEOFF]
	bl	_mtx_lock
	ldr	w8, [x19]
Lloh5:
	adrp	x23, _PTE_VALID@GOTPAGE
Lloh6:
	ldr	x23, [x23, _PTE_VALID@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_PVO_PTEGIDX_ISSET
	cbnz	x0, LBB0_5
; %bb.4:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_5:
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_PVO_PTEGIDX_ISSET
	cbz	x0, LBB0_8
; %bb.7:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_8:
	ldr	w9, [x20]
	ldr	w8, [x19]
	ldr	w11, [x23]
	bic	w10, w8, w11
	eor	w12, w10, w9
	and	w10, w11, w8
	cmp	w12, w11
	b.ne	LBB0_14
; %bb.9:
	cbnz	w10, LBB0_11
; %bb.10:
	str	x20, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_11:
	add	x8, x21, x22, lsl #3
	ldr	w8, [x8, #4]
	ldr	w9, [x19, #4]
	eor	w8, w9, w8
Lloh13:
	adrp	x9, _PTE_CHG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PTE_CHG@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _PTE_REF@GOTPAGE
Lloh17:
	ldr	x10, [x10, _PTE_REF@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bics	wzr, w8, w9
	b.eq	LBB0_13
; %bb.12:
	str	x20, [sp]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_13:
Lloh21:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x0, _moea_table_mutex@GOTPAGE
Lloh25:
	ldr	x0, [x0, _moea_table_mutex@GOTPAGEOFF]
	bl	_mtx_assert
	b	LBB0_17
LBB0_14:
	cbz	w10, LBB0_16
; %bb.15:
	stp	x8, x9, [sp, #8]
	str	x20, [sp]
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
	bl	_panic
LBB0_16:
Lloh28:
	adrp	x0, _moea_table_mutex@GOTPAGE
Lloh29:
	ldr	x0, [x0, _moea_table_mutex@GOTPAGEOFF]
	bl	_mtx_unlock
	mov	x20, #0
LBB0_17:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_moea_pteg_table,8,3            ; @moea_pteg_table
	.comm	_moea_table_mutex,4,2           ; @moea_table_mutex
	.comm	_PTE_VALID,4,2                  ; @PTE_VALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"moea_pvo_to_pte: pvo %p has valid pte in pvo but no valid pte index"

l_.str.1:                               ; @.str.1
	.asciz	"moea_pvo_to_pte: pvo %p has valid pte index in pvo pvo but no valid pte"

l_.str.2:                               ; @.str.2
	.asciz	"moea_pvo_to_pte: pvo %p has valid pte in moea_pteg_table %p but invalid in pvo"

	.comm	_PTE_CHG,4,2                    ; @PTE_CHG
	.comm	_PTE_REF,4,2                    ; @PTE_REF
l_.str.3:                               ; @.str.3
	.asciz	"moea_pvo_to_pte: pvo %p pte does not match pte %p in moea_pteg_table"

	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
l_.str.4:                               ; @.str.4
	.asciz	"moea_pvo_to_pte: pvo %p has invalid pte %p in moea_pteg_table but valid in pvo: %8x, %8x"

	.no_dead_strip	_moea_pvo_to_pte
.subsections_via_symbols
