	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _mips_minidump_kvatop
__mips_minidump_kvatop:                 ## @_mips_minidump_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, %r12
	movl	%esi, %ebx
	movq	%rdi, %r13
	callq	_ISALIVE
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	__kvm_err
	jmp	LBB0_32
LBB0_2:
	movq	_MIPS_PAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %r14d
	notl	%r14d
	andl	%ebx, %r14d
	movq	8(%r13), %rcx
	movq	16(%r13), %rax
	movq	_EI_CLASS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	_ELFCLASS64@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_18
## %bb.3:
	movq	_MIPS_XKPHYS_START@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jl	LBB0_7
## %bb.4:
	movq	_MIPS_XKPHYS_END@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jge	LBB0_7
## %bb.5:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_MIPS_XKPHYS_PHYS_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_18:
	movq	_MIPS32_KSEG0_START@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jl	LBB0_20
## %bb.19:
	movq	_MIPS32_KSEG0_END@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jl	LBB0_9
LBB0_20:
	movq	_MIPS32_KSEG1_START@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jl	LBB0_13
## %bb.21:
	movq	_MIPS32_KSEG1_END@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jl	LBB0_9
	jmp	LBB0_13
LBB0_7:
	movq	_MIPS64_KSEG0_START@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jl	LBB0_10
## %bb.8:
	movq	_MIPS64_KSEG0_END@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jl	LBB0_9
LBB0_10:
	movq	_MIPS64_KSEG1_START@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jl	LBB0_13
## %bb.11:
	movq	_MIPS64_KSEG1_END@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	jge	LBB0_13
LBB0_9:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	_MIPS_KSEG0_PHYS_MASK@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
	andl	%r14d, %ebx
LBB0_26:
	movq	_MIPS_PAGE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	__kvm_pt_find
	cmpl	$-1, %eax
	je	LBB0_27
## %bb.28:
	andl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	addl	%r15d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	(%r12), %ebx
	subl	%r15d, %ebx
	jmp	LBB0_32
LBB0_27:
	movl	(%r13), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	__kvm_err
LBB0_30:
	leaq	L_.str.4(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
LBB0_31:
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	__kvm_err
LBB0_32:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	%r14d, %esi
	subl	4(%rax), %esi
	jge	LBB0_14
## %bb.33:
	movl	(%r13), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	jmp	LBB0_31
LBB0_14:
	movq	_MIPS_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %esi
	movslq	8(%rax), %rcx
	shrq	$2, %rcx
	cmpl	$64, (%rax)
	movslq	%esi, %rax
	jne	LBB0_22
## %bb.15:
	cmpq	%rax, %rcx
	jbe	LBB0_30
## %bb.16:
	movq	%r13, %rdi
	callq	__mips64_pte_get
	movq	_MIPS_PTE_V@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_29
## %bb.17:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %edi
	callq	_MIPS64_PTE_TO_PA
	jmp	LBB0_25
LBB0_22:
	cmpq	%rax, %rcx
	jbe	LBB0_30
## %bb.23:
	movq	%r13, %rdi
	callq	__mips32_pte_get
	movq	_MIPS_PTE_V@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_29
## %bb.24:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %edi
	callq	_MIPS32_PTE_TO_PA
LBB0_25:
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_29:
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	__kvm_err
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_mips_minidump_kvatop called in live kernel!"

	.comm	_MIPS_PAGE_MASK,4,2             ## @MIPS_PAGE_MASK
	.comm	_EI_CLASS,8,3                   ## @EI_CLASS
	.comm	_ELFCLASS64,8,3                 ## @ELFCLASS64
	.comm	_MIPS_XKPHYS_START,4,2          ## @MIPS_XKPHYS_START
	.comm	_MIPS_XKPHYS_END,4,2            ## @MIPS_XKPHYS_END
	.comm	_MIPS_XKPHYS_PHYS_MASK,4,2      ## @MIPS_XKPHYS_PHYS_MASK
	.comm	_MIPS64_KSEG0_START,4,2         ## @MIPS64_KSEG0_START
	.comm	_MIPS64_KSEG0_END,4,2           ## @MIPS64_KSEG0_END
	.comm	_MIPS_KSEG0_PHYS_MASK,4,2       ## @MIPS_KSEG0_PHYS_MASK
	.comm	_MIPS64_KSEG1_START,4,2         ## @MIPS64_KSEG1_START
	.comm	_MIPS64_KSEG1_END,4,2           ## @MIPS64_KSEG1_END
	.comm	_MIPS32_KSEG0_START,4,2         ## @MIPS32_KSEG0_START
	.comm	_MIPS32_KSEG0_END,4,2           ## @MIPS32_KSEG0_END
	.comm	_MIPS32_KSEG1_START,4,2         ## @MIPS32_KSEG1_START
	.comm	_MIPS32_KSEG1_END,4,2           ## @MIPS32_KSEG1_END
	.comm	_MIPS_PAGE_SHIFT,4,2            ## @MIPS_PAGE_SHIFT
	.comm	_MIPS_PTE_V,4,2                 ## @MIPS_PTE_V
L_.str.1:                               ## @.str.1
	.asciz	"_mips_minidump_kvatop: pte not valid"

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

	.comm	_MIPS_PAGE_SIZE,4,2             ## @MIPS_PAGE_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"_mips_minidump_kvatop: physical address 0x%jx not in minidump"

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

	.no_dead_strip	__mips_minidump_kvatop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _mips_minidump_kvatop
__mips_minidump_kvatop:                 ; @_mips_minidump_kvatop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_ISALIVE
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	mov	w1, #0
LBB0_3:
	bl	__kvm_err
	mov	w0, #0
LBB0_4:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
Lloh2:
	adrp	x8, _MIPS_PAGE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MIPS_PAGE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w24, [x8]
	bic	w23, w21, w24
	ldp	x9, x8, [x19, #8]
Lloh5:
	adrp	x10, _EI_CLASS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _EI_CLASS@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
Lloh8:
	adrp	x10, _ELFCLASS64@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ELFCLASS64@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.6:
Lloh11:
	adrp	x9, _MIPS_XKPHYS_START@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MIPS_XKPHYS_START@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _MIPS_XKPHYS_END@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MIPS_XKPHYS_END@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	cmp	w23, w9
	ccmp	w23, w10, #0, ge
	b.lt	LBB0_15
; %bb.7:
Lloh17:
	adrp	x9, _MIPS64_KSEG0_START@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MIPS64_KSEG0_START@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _MIPS64_KSEG0_END@GOTPAGE
Lloh21:
	ldr	x10, [x10, _MIPS64_KSEG0_END@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	cmp	w23, w9
	ccmp	w23, w10, #0, ge
	b.lt	LBB0_14
; %bb.8:
Lloh23:
	adrp	x9, _MIPS64_KSEG1_START@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MIPS64_KSEG1_START@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _MIPS64_KSEG1_END@GOTPAGE
Lloh27:
	ldr	x10, [x10, _MIPS64_KSEG1_END@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh28:
	adrp	x9, _MIPS32_KSEG0_START@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MIPS32_KSEG0_START@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
Lloh31:
	adrp	x10, _MIPS32_KSEG0_END@GOTPAGE
Lloh32:
	ldr	x10, [x10, _MIPS32_KSEG0_END@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	cmp	w23, w9
	ccmp	w23, w10, #0, ge
	b.lt	LBB0_14
; %bb.10:
Lloh34:
	adrp	x9, _MIPS32_KSEG1_START@GOTPAGE
Lloh35:
	ldr	x9, [x9, _MIPS32_KSEG1_START@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
Lloh37:
	adrp	x10, _MIPS32_KSEG1_END@GOTPAGE
Lloh38:
	ldr	x10, [x10, _MIPS32_KSEG1_END@GOTPAGEOFF]
LBB0_11:
	ldr	w10, [x10]
	cmp	w23, w9
	ccmp	w23, w10, #0, ge
	b.lt	LBB0_14
; %bb.12:
	ldr	w9, [x8, #4]
	subs	w9, w23, w9
	b.ge	LBB0_22
; %bb.13:
	ldr	w1, [x19]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	str	x23, [sp]
Lloh39:
	adrp	x2, l_.str.2@PAGE
Lloh40:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	b	LBB0_3
LBB0_14:
Lloh41:
	adrp	x8, _MIPS_KSEG0_PHYS_MASK@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MIPS_KSEG0_PHYS_MASK@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh43:
	adrp	x8, _MIPS_XKPHYS_PHYS_MASK@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MIPS_XKPHYS_PHYS_MASK@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	and	w22, w8, w23
LBB0_17:
Lloh45:
	adrp	x25, _MIPS_PAGE_SIZE@GOTPAGE
Lloh46:
	ldr	x25, [x25, _MIPS_PAGE_SIZE@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x22
	bl	__kvm_pt_find
	cmn	w0, #1
	b.eq	LBB0_19
; %bb.18:
	and	w8, w24, w21
	add	w9, w0, w8
	str	w9, [x20]
	ldr	w9, [x25]
	sub	w0, w9, w8
	b	LBB0_4
LBB0_19:
	ldr	w1, [x19]
	str	x22, [sp]
Lloh47:
	adrp	x2, l_.str.3@PAGE
Lloh48:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_20:
	mov	x0, x19
	bl	__kvm_err
LBB0_21:
	str	x23, [sp]
Lloh49:
	adrp	x2, l_.str.4@PAGE
Lloh50:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_2
LBB0_22:
Lloh51:
	adrp	x10, _MIPS_PAGE_SHIFT@GOTPAGE
Lloh52:
	ldr	x10, [x10, _MIPS_PAGE_SHIFT@GOTPAGEOFF]
Lloh53:
	ldr	w10, [x10]
	asr	w9, w9, w10
	ldr	w10, [x8]
	sxtw	x1, w9
	ldrsw	x8, [x8, #8]
	lsr	x8, x8, #2
	cmp	w10, #64
	b.ne	LBB0_26
; %bb.23:
	cmp	x8, x1
	b.ls	LBB0_21
; %bb.24:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	__mips64_pte_get
Lloh54:
	adrp	x8, _MIPS_PTE_V@GOTPAGE
Lloh55:
	ldr	x8, [x8, _MIPS_PTE_V@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_30
; %bb.25:
	bl	_MIPS64_PTE_TO_PA
	b	LBB0_29
LBB0_26:
	cmp	x8, x1
	b.ls	LBB0_21
; %bb.27:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	__mips32_pte_get
Lloh57:
	adrp	x8, _MIPS_PTE_V@GOTPAGE
Lloh58:
	ldr	x8, [x8, _MIPS_PTE_V@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_30
; %bb.28:
	bl	_MIPS32_PTE_TO_PA
LBB0_29:
	mov	x22, x0
	b	LBB0_17
LBB0_30:
	ldr	w1, [x19]
Lloh60:
	adrp	x2, l_.str.1@PAGE
Lloh61:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_20
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_mips_minidump_kvatop called in live kernel!"

	.comm	_MIPS_PAGE_MASK,4,2             ; @MIPS_PAGE_MASK
	.comm	_EI_CLASS,8,3                   ; @EI_CLASS
	.comm	_ELFCLASS64,8,3                 ; @ELFCLASS64
	.comm	_MIPS_XKPHYS_START,4,2          ; @MIPS_XKPHYS_START
	.comm	_MIPS_XKPHYS_END,4,2            ; @MIPS_XKPHYS_END
	.comm	_MIPS_XKPHYS_PHYS_MASK,4,2      ; @MIPS_XKPHYS_PHYS_MASK
	.comm	_MIPS64_KSEG0_START,4,2         ; @MIPS64_KSEG0_START
	.comm	_MIPS64_KSEG0_END,4,2           ; @MIPS64_KSEG0_END
	.comm	_MIPS_KSEG0_PHYS_MASK,4,2       ; @MIPS_KSEG0_PHYS_MASK
	.comm	_MIPS64_KSEG1_START,4,2         ; @MIPS64_KSEG1_START
	.comm	_MIPS64_KSEG1_END,4,2           ; @MIPS64_KSEG1_END
	.comm	_MIPS32_KSEG0_START,4,2         ; @MIPS32_KSEG0_START
	.comm	_MIPS32_KSEG0_END,4,2           ; @MIPS32_KSEG0_END
	.comm	_MIPS32_KSEG1_START,4,2         ; @MIPS32_KSEG1_START
	.comm	_MIPS32_KSEG1_END,4,2           ; @MIPS32_KSEG1_END
	.comm	_MIPS_PAGE_SHIFT,4,2            ; @MIPS_PAGE_SHIFT
	.comm	_MIPS_PTE_V,4,2                 ; @MIPS_PTE_V
l_.str.1:                               ; @.str.1
	.asciz	"_mips_minidump_kvatop: pte not valid"

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

	.comm	_MIPS_PAGE_SIZE,4,2             ; @MIPS_PAGE_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"_mips_minidump_kvatop: physical address 0x%jx not in minidump"

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

	.no_dead_strip	__mips_minidump_kvatop
.subsections_via_symbols
