	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_vmm_valid                 ## -- Begin function nv50_vmm_valid
	.p2align	4, 0x90
_nv50_vmm_valid:                        ## @nv50_vmm_valid
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rsi, %rbx
	movq	%rsi, -72(%rbp)
	movl	%edx, -56(%rbp)
	movq	32(%rcx), %r14
	movq	40(%rcx), %rcx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	movq	$0, (%r13)
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movb	(%rcx), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movl	%eax, 8(%r13)
	movq	(%rsi), %rcx
	movq	8(%rsi), %r8
	leaq	-72(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	callq	_nvif_unpack
	addq	$16, %rsp
	movl	(%rbx), %r12d
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	leaq	-72(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movl	%eax, %edi
	movl	%r12d, %ecx
	callq	_nvif_unvers
	movl	$0, %r12d
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_VMM_DEBUG
	jmp	LBB0_18
LBB0_3:
	andl	$127, %r12d
	movl	4(%rbx), %eax
	andl	$3, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
LBB0_4:
	movq	%r14, %rbx
	movq	%r14, %rdi
	callq	_nvkm_memory_target
	cmpl	$130, %eax
	je	LBB0_10
## %bb.5:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.6:
	cmpl	$128, %eax
	jne	LBB0_16
## %bb.7:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_26
## %bb.8:
	orl	%eax, (%r13)
LBB0_9:
	movl	$3, %r15d
	jmp	LBB0_11
LBB0_10:
	movl	$2, %r15d
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	leaq	-60(%rbp), %rsi
	callq	*(%rax)
	cmpl	-60(%rbp), %r12d
	jge	LBB0_14
## %bb.13:
	movl	%r12d, %ecx
	movl	(%rax,%rcx,4), %ecx
	cmpl	$127, %ecx
	jne	LBB0_19
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_VMM_DEBUG
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movl	$1, %edi
	callq	_WARN_ON
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_17:
	subl	(%rax), %r15d
LBB0_18:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	24(%r13), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movl	(%rax), %r8d
	cmpl	%ecx, %r8d
	jne	LBB0_27
LBB0_21:
	movl	%r15d, %r12d
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, %r15d
	je	LBB0_31
## %bb.22:
	movq	%rbx, %rdi
	callq	_nvkm_memory_size
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %ecx
	testb	%r14b, %r14b
	je	LBB0_28
## %bb.23:
	movq	_NVKM_VMM_PAGE_COMP@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_28
## %bb.24:
	sarl	$16, %eax
	imull	%r15d, %eax
	leaq	16(%r13), %r12
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%ecx, %ecx
	movq	%r12, %r8
	callq	_nvkm_memory_tags_get
	testl	%eax, %eax
	je	LBB0_29
## %bb.25:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_VMM_DEBUG
	jmp	LBB0_18
LBB0_26:
	xorl	%r15d, %r15d
	movb	$1, %r14b
	jmp	LBB0_12
LBB0_27:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_VMM_DEBUG
	jmp	LBB0_15
LBB0_28:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_VMM_DEBUG
	jmp	LBB0_15
LBB0_29:
	movq	(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_31
## %bb.30:
	movl	4(%r13), %eax
	orl	%eax, 8(%r13)
LBB0_31:
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	_BIT
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"args"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"kind %02x"

L_.str.2:                               ## @.str.2
	.asciz	"kind %02x bankswz: %d %d"

	.comm	_NVKM_VMM_PAGE_COMP,4,2         ## @NVKM_VMM_PAGE_COMP
L_.str.3:                               ## @.str.3
	.asciz	"comp %d %02x"

L_.str.4:                               ## @.str.4
	.asciz	"comp %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv50_vmm_valid                 ; -- Begin function nv50_vmm_valid
	.p2align	2
_nv50_vmm_valid:                        ; @nv50_vmm_valid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x23, x1
	mov	x19, x0
	str	x1, [sp, #40]
	str	w2, [sp, #36]
	ldr	x8, [x0]
	ldr	x21, [x8, #8]
	ldr	x8, [x21]
	ldr	x26, [x8]
	ldp	x22, x24, [x3, #32]
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	str	xzr, [x3]
	ldr	w8, [x24]
	mov	w9, #1
	lsl	w8, w9, w8
	str	w8, [x3, #8]
	ldp	x3, x4, [x1]
	add	x1, sp, #40
	add	x2, sp, #36
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_nvif_unpack
	ldr	w3, [x23]
	cbz	w0, LBB0_4
; %bb.1:
	add	x1, sp, #40
	add	x2, sp, #36
	bl	_nvif_unvers
	mov	x23, x0
	cbz	w0, LBB0_5
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_VMM_DEBUG
	b	LBB0_20
LBB0_4:
	and	w25, w3, #0x7f
	ldr	w8, [x23, #4]
	and	w23, w8, #0x3
	b	LBB0_6
LBB0_5:
	mov	w25, #0
LBB0_6:
	mov	x0, x22
	bl	_nvkm_memory_target
	cmp	w0, #130
	b.eq	LBB0_11
; %bb.7:
	cmp	w0, #129
	b.eq	LBB0_12
; %bb.8:
	cmp	w0, #128
	b.ne	LBB0_18
; %bb.9:
	ldr	w8, [x26]
	cbz	w8, LBB0_28
; %bb.10:
	mov	w27, #0
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	b	LBB0_13
LBB0_11:
	mov	w27, #0
	mov	w26, #2
	b	LBB0_14
LBB0_12:
	mov	w27, #0
LBB0_13:
	mov	w26, #3
LBB0_14:
	ldr	x0, [x19]
	ldr	x8, [x0]
	ldr	x8, [x8]
	add	x1, sp, #32
	blr	x8
	ldr	w8, [sp, #32]
	cmp	w25, w8
	b.ge	LBB0_16
; %bb.15:
	ldr	w8, [x0, w25, uxtw #2]
	cmp	w8, #127
	b.ne	LBB0_21
LBB0_16:
	str	x25, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_17:
	mov	x0, x19
	bl	_VMM_DEBUG
	b	LBB0_19
LBB0_18:
	mov	w0, #1
	bl	_WARN_ON
LBB0_19:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_20:
	mov	x0, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_21:
	ldr	x9, [x20, #24]
	cbz	x9, LBB0_23
; %bb.22:
	ldr	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_29
LBB0_23:
	cbz	w23, LBB0_33
; %bb.24:
	mov	x0, x22
	bl	_nvkm_memory_size
	ldr	w8, [x24, #4]
	cbz	w27, LBB0_30
; %bb.25:
Lloh10:
	adrp	x9, _NVKM_VMM_PAGE_COMP@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NVKM_VMM_PAGE_COMP@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_30
; %bb.26:
	asr	w8, w0, #16
	mul	w2, w8, w23
	add	x24, x20, #16
	mov	x0, x22
	mov	x1, x21
	mov	x3, #0
	mov	x4, x24
	bl	_nvkm_memory_tags_get
	cbz	w0, LBB0_31
; %bb.27:
	mov	x23, x0
	str	x23, [sp]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_3
LBB0_28:
	mov	w26, #0
	mov	w27, #1
	b	LBB0_14
LBB0_29:
	stp	x8, x9, [sp, #8]
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	str	x25, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_30:
	stp	x26, x8, [sp]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_31:
	ldr	x8, [x24]
	ldr	x8, [x8]
	cbz	x8, LBB0_33
; %bb.32:
	ldp	w8, w9, [x20, #4]
	orr	w8, w9, w8
	str	w8, [x20, #8]
LBB0_33:
	mov	w0, #0
	bl	_BIT
	mov	w23, #0
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"args"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"kind %02x"

l_.str.2:                               ; @.str.2
	.asciz	"kind %02x bankswz: %d %d"

	.comm	_NVKM_VMM_PAGE_COMP,4,2         ; @NVKM_VMM_PAGE_COMP
l_.str.3:                               ; @.str.3
	.asciz	"comp %d %02x"

l_.str.4:                               ; @.str.4
	.asciz	"comp %d"

.subsections_via_symbols
