	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _sparc64_kvatop
__sparc64_kvatop:                       ## @_sparc64_kvatop
	.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
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_SPARC64_PAGE_MASK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r13d
	andl	%esi, %r13d
	movq	_SPARC64_MIN_DIRECT_ADDRESS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_1
## %bb.2:
	movq	_SPARC64_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r12d, %esi
	sarl	%cl, %esi
	movq	(%r15), %rax
	andl	4(%rax), %esi
	movq	_SPARC64_TTE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	addl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	movl	$16, %ecx
	callq	__sparc64_read_phys
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movq	-48(%rbp), %rdi
	callq	_be64toh
	movq	%rax, -48(%rbp)
	movq	-56(%rbp), %rdi
	callq	_be64toh
	movq	%rax, -56(%rbp)
	leaq	-56(%rbp), %rdi
	movl	%r12d, %esi
	callq	_sparc64_tte_match
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	leaq	-56(%rbp), %rdi
	callq	_SPARC64_TTE_GET_PA
	movl	%eax, %esi
	jmp	LBB0_5
LBB0_1:
	movl	%r12d, %edi
	callq	_SPARC64_DIRECT_TO_PHYS
	movl	(%rbx), %esi
	notl	%esi
	andl	%eax, %esi
LBB0_5:
	movq	_SPARC64_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	subl	%r13d, %ebx
	movq	(%r15), %rdi
	movl	%ebx, %edx
	callq	__sparc64_find_off
	movq	_KVM_OFF_NOTFOUND@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
LBB0_7:
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r12d, %ecx
	callq	__kvm_err
	jmp	LBB0_8
LBB0_6:
	addl	%r13d, %eax
	movl	%eax, (%r14)
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPARC64_PAGE_MASK,4,2          ## @SPARC64_PAGE_MASK
	.comm	_SPARC64_MIN_DIRECT_ADDRESS,4,2 ## @SPARC64_MIN_DIRECT_ADDRESS
	.comm	_SPARC64_PAGE_SHIFT,4,2         ## @SPARC64_PAGE_SHIFT
	.comm	_SPARC64_TTE_SHIFT,4,2          ## @SPARC64_TTE_SHIFT
	.comm	_SPARC64_PAGE_SIZE,4,2          ## @SPARC64_PAGE_SIZE
	.comm	_KVM_OFF_NOTFOUND,4,2           ## @KVM_OFF_NOTFOUND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid address (%jx)"

	.no_dead_strip	__sparc64_kvatop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _sparc64_kvatop
__sparc64_kvatop:                       ; @_sparc64_kvatop
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _SPARC64_PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SPARC64_PAGE_MASK@GOTPAGEOFF]
	ldr	w22, [x23]
Lloh2:
	adrp	x8, _SPARC64_MIN_DIRECT_ADDRESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPARC64_MIN_DIRECT_ADDRESS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w1
	b.le	LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _SPARC64_PAGE_SHIFT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPARC64_PAGE_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	asr	w8, w19, w8
	ldr	x9, [x21]
	ldp	w10, w9, [x9]
	and	w8, w9, w8
Lloh8:
	adrp	x9, _SPARC64_TTE_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SPARC64_TTE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	add	w1, w8, w10
	mov	x2, sp
	mov	x0, x21
	mov	w3, #16
	bl	__sparc64_read_phys
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x0, [sp, #8]
	bl	_be64toh
	str	x0, [sp, #8]
	ldr	x0, [sp]
	bl	_be64toh
	str	x0, [sp]
	mov	x0, sp
	mov	x1, x19
	bl	_sparc64_tte_match
	cbz	w0, LBB0_6
; %bb.3:
	mov	x0, sp
	bl	_SPARC64_TTE_GET_PA
	mov	x1, x0
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_SPARC64_DIRECT_TO_PHYS
	ldr	w8, [x23]
	bic	w1, w0, w8
LBB0_5:
	and	w23, w22, w19
Lloh11:
	adrp	x8, _SPARC64_PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SPARC64_PAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	sub	w22, w8, w23
	ldr	x0, [x21]
	mov	x2, x22
	bl	__sparc64_find_off
Lloh14:
	adrp	x8, _KVM_OFF_NOTFOUND@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KVM_OFF_NOTFOUND@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_7
LBB0_6:
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	mov	x3, x19
	bl	__kvm_err
	mov	w22, #0
	b	LBB0_8
LBB0_7:
	add	w8, w0, w23
	str	w8, [x20]
LBB0_8:
	mov	x0, x22
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SPARC64_PAGE_MASK,4,2          ; @SPARC64_PAGE_MASK
	.comm	_SPARC64_MIN_DIRECT_ADDRESS,4,2 ; @SPARC64_MIN_DIRECT_ADDRESS
	.comm	_SPARC64_PAGE_SHIFT,4,2         ; @SPARC64_PAGE_SHIFT
	.comm	_SPARC64_TTE_SHIFT,4,2          ; @SPARC64_TTE_SHIFT
	.comm	_SPARC64_PAGE_SIZE,4,2          ; @SPARC64_PAGE_SIZE
	.comm	_KVM_OFF_NOTFOUND,4,2           ; @KVM_OFF_NOTFOUND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid address (%jx)"

	.no_dead_strip	__sparc64_kvatop
.subsections_via_symbols
