	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_va_to_slbv              ## -- Begin function kernel_va_to_slbv
	.p2align	4, 0x90
_kernel_va_to_slbv:                     ## @kernel_va_to_slbv
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_ADDR_SR_SHFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rdi
	callq	_KERNEL_VSID
	movl	%eax, %r14d
	movq	_SLBV_VSID_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	movq	_hw_direct_map@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movq	_DMAP_BASE_ADDRESS@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jge	LBB0_5
## %bb.2:
	movq	_DMAP_MAX_ADDRESS@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jle	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_DMAP_TO_PHYS
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_mem_valid
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_SLBV_L@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADDR_SR_SHFT,8,3               ## @ADDR_SR_SHFT
	.comm	_SLBV_VSID_SHIFT,4,2            ## @SLBV_VSID_SHIFT
	.comm	_hw_direct_map,8,3              ## @hw_direct_map
	.comm	_DMAP_BASE_ADDRESS,8,3          ## @DMAP_BASE_ADDRESS
	.comm	_DMAP_MAX_ADDRESS,8,3           ## @DMAP_MAX_ADDRESS
	.comm	_SLBV_L,4,2                     ## @SLBV_L
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_va_to_slbv              ; -- Begin function kernel_va_to_slbv
	.p2align	2
_kernel_va_to_slbv:                     ; @kernel_va_to_slbv
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x8, _ADDR_SR_SHFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADDR_SR_SHFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	lsr	x0, x0, x8
	bl	_KERNEL_VSID
Lloh3:
	adrp	x8, _SLBV_VSID_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SLBV_VSID_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w19, w0, w8
Lloh6:
	adrp	x8, _hw_direct_map@GOTPAGE
Lloh7:
	ldr	x8, [x8, _hw_direct_map@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _DMAP_BASE_ADDRESS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DMAP_BASE_ADDRESS@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _DMAP_MAX_ADDRESS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DMAP_MAX_ADDRESS@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x8, #0
	ccmp	x9, x20, #0, ne
	ccmp	x10, x20, #4, lt
	b.le	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_DMAP_TO_PHYS
	mov	w1, #0
	bl	_mem_valid
	cbnz	x0, LBB0_3
; %bb.2:
Lloh15:
	adrp	x8, _SLBV_L@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SLBV_L@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w19, w8, w19
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ADDR_SR_SHFT,8,3               ; @ADDR_SR_SHFT
	.comm	_SLBV_VSID_SHIFT,4,2            ; @SLBV_VSID_SHIFT
	.comm	_hw_direct_map,8,3              ; @hw_direct_map
	.comm	_DMAP_BASE_ADDRESS,8,3          ; @DMAP_BASE_ADDRESS
	.comm	_DMAP_MAX_ADDRESS,8,3           ; @DMAP_MAX_ADDRESS
	.comm	_SLBV_L,4,2                     ; @SLBV_L
.subsections_via_symbols
