	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _riscv_minidump_vatop
__riscv_minidump_vatop:                 ## @_riscv_minidump_vatop
	.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
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	_RISCV_PAGE_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movl	%esi, %r15d
	andl	%r13d, %r15d
	movq	(%rax), %rcx
	cmpq	%r13, %rcx
	jg	LBB0_5
## %bb.1:
	cmpq	%r13, 8(%rax)
	jle	LBB0_5
## %bb.2:
	movl	%r13d, %edx
	subl	%ecx, %edx
	addl	16(%rax), %edx
	notl	%esi
	andl	%edx, %esi
	movq	_RISCV_PAGE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	__kvm_pt_find
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	addl	%r15d, %eax
	movl	%eax, (%rbx)
	movl	(%r12), %ebx
	subl	%r15d, %ebx
	jmp	LBB0_17
LBB0_5:
	movq	24(%rax), %rcx
	cmpq	%r13, %rcx
	jle	LBB0_6
## %bb.13:
	movl	(%r14), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_14
LBB0_6:
	movq	%r13, %rsi
	subq	%rcx, %rsi
	movq	_RISCV_L3_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarq	%cl, %rsi
	movslq	32(%rax), %rax
	shrq	$3, %rax
	cmpq	%rax, %rsi
	jae	LBB0_16
## %bb.7:
	movq	%r14, %rdi
	callq	__riscv_pte_get
	movq	%rax, %r12
	movq	_RISCV_PTE_V@GOTPCREL(%rip), %rax
	testq	%r12, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_RISCV_PTE_RWX@GOTPCREL(%rip), %rax
	testq	%r12, (%rax)
	je	LBB0_9
## %bb.10:
	movq	_RISCV_PTE_PPN0_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %r12
	movq	_RISCV_L3_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %r12
	movq	_RISCV_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	__kvm_pt_find
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.12:
	addl	%r15d, %eax
	movl	%eax, (%rbx)
	movq	_RISCV_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	subl	%r15d, %ebx
	jmp	LBB0_17
LBB0_9:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	__kvm_err
	jmp	LBB0_16
LBB0_3:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdx
LBB0_14:
	movq	%r14, %rdi
	movl	%r13d, %ecx
LBB0_15:
	xorl	%eax, %eax
	callq	__kvm_err
LBB0_16:
	leaq	L_.str.4(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	__kvm_err
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	movl	%r12d, %ecx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_RISCV_PAGE_MASK,8,3            ## @RISCV_PAGE_MASK
	.comm	_RISCV_PAGE_SIZE,4,2            ## @RISCV_PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_riscv_minidump_vatop: direct map address 0x%jx not in minidump"

	.comm	_RISCV_L3_SHIFT,8,3             ## @RISCV_L3_SHIFT
	.comm	_RISCV_PTE_V,8,3                ## @RISCV_PTE_V
	.comm	_RISCV_PTE_RWX,8,3              ## @RISCV_PTE_RWX
L_.str.1:                               ## @.str.1
	.asciz	"_riscv_minidump_vatop: pte not valid"

	.comm	_RISCV_PTE_PPN0_S,8,3           ## @RISCV_PTE_PPN0_S
L_.str.2:                               ## @.str.2
	.asciz	"_riscv_minidump_vatop: physical address 0x%jx not in minidump"

L_.str.3:                               ## @.str.3
	.asciz	"_riscv_minidump_vatop: virtual address 0x%jx not minidumped"

L_.str.4:                               ## @.str.4
	.asciz	"invalid address (0x%jx)"

	.no_dead_strip	__riscv_minidump_vatop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _riscv_minidump_vatop
__riscv_minidump_vatop:                 ; @_riscv_minidump_vatop
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _RISCV_PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RISCV_PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	and	w23, w9, w20
	ldr	x10, [x8]
	cmp	x10, x1
	b.gt	LBB0_4
; %bb.1:
	ldr	x11, [x8, #8]
	cmp	x11, x20
	b.le	LBB0_4
; %bb.2:
	ldr	w8, [x8, #16]
	sub	w10, w20, w10
	add	w8, w10, w8
	bic	w1, w8, w9
Lloh3:
	adrp	x22, _RISCV_PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RISCV_PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	__kvm_pt_find
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.3:
	add	w8, w0, w23
	str	w8, [x21]
	ldr	w8, [x22]
	sub	w0, w8, w23
	b	LBB0_16
LBB0_4:
	ldr	x9, [x8, #24]
	cmp	x9, x20
	b.le	LBB0_6
; %bb.5:
	ldr	w1, [x19]
	str	x20, [sp]
Lloh5:
	adrp	x2, l_.str.3@PAGE
Lloh6:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_6:
	sub	x9, x20, x9
Lloh7:
	adrp	x22, _RISCV_L3_SHIFT@GOTPAGE
Lloh8:
	ldr	x22, [x22, _RISCV_L3_SHIFT@GOTPAGEOFF]
	ldr	x10, [x22]
	asr	x1, x9, x10
	ldrsw	x8, [x8, #32]
	cmp	x1, x8, lsr #3
	b.hs	LBB0_15
; %bb.7:
	mov	x0, x19
	bl	__riscv_pte_get
Lloh9:
	adrp	x8, _RISCV_PTE_V@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RISCV_PTE_V@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	tst	x8, x0
	b.eq	LBB0_11
; %bb.8:
Lloh12:
	adrp	x8, _RISCV_PTE_RWX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RISCV_PTE_RWX@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	tst	x8, x0
	b.eq	LBB0_11
; %bb.9:
Lloh15:
	adrp	x8, _RISCV_PTE_PPN0_S@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RISCV_PTE_PPN0_S@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	asr	x8, x0, x8
	ldr	x9, [x22]
	lsl	x22, x8, x9
Lloh18:
	adrp	x24, _RISCV_PAGE_SIZE@GOTPAGE
Lloh19:
	ldr	x24, [x24, _RISCV_PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x22
	bl	__kvm_pt_find
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.10:
	add	w8, w0, w23
	str	w8, [x21]
	ldr	w8, [x24]
	sub	w0, w8, w23
	b	LBB0_16
LBB0_11:
	ldr	w1, [x19]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_12:
	ldr	w1, [x19]
	str	x20, [sp]
Lloh22:
	adrp	x2, l_.str@PAGE
Lloh23:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_14
LBB0_13:
	ldr	w1, [x19]
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh24:
	adrp	x2, l_.str.2@PAGE
Lloh25:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	__kvm_err
LBB0_15:
	str	x20, [sp]
Lloh26:
	adrp	x2, l_.str.4@PAGE
Lloh27:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	__kvm_err
	mov	w0, #0
LBB0_16:
	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	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_RISCV_PAGE_MASK,8,3            ; @RISCV_PAGE_MASK
	.comm	_RISCV_PAGE_SIZE,4,2            ; @RISCV_PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_riscv_minidump_vatop: direct map address 0x%jx not in minidump"

	.comm	_RISCV_L3_SHIFT,8,3             ; @RISCV_L3_SHIFT
	.comm	_RISCV_PTE_V,8,3                ; @RISCV_PTE_V
	.comm	_RISCV_PTE_RWX,8,3              ; @RISCV_PTE_RWX
l_.str.1:                               ; @.str.1
	.asciz	"_riscv_minidump_vatop: pte not valid"

	.comm	_RISCV_PTE_PPN0_S,8,3           ; @RISCV_PTE_PPN0_S
l_.str.2:                               ; @.str.2
	.asciz	"_riscv_minidump_vatop: physical address 0x%jx not in minidump"

l_.str.3:                               ; @.str.3
	.asciz	"_riscv_minidump_vatop: virtual address 0x%jx not minidumped"

l_.str.4:                               ; @.str.4
	.asciz	"invalid address (0x%jx)"

	.no_dead_strip	__riscv_minidump_vatop
.subsections_via_symbols
