	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_fb_vram_rblock
_nv50_fb_vram_rblock:                   ## @nv50_fb_vram_rblock
	.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	%rdi, %r13
	movq	8(%rdi), %rbx
	movq	(%rbx), %r15
	movq	%r15, %rdi
	movl	$1049088, %esi                  ## imm = 0x100200
	callq	_nvkm_rd32
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	$1049092, %esi                  ## imm = 0x100204
	callq	_nvkm_rd32
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	$1049168, %esi                  ## imm = 0x100250
	callq	_nvkm_rd32
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	$5440, %esi                     ## imm = 0x1540
	callq	_nvkm_rd32
	leaq	L_.str(%rip), %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%r12d, %r8d
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_nvkm_debug
	movl	%r14d, %ecx
	shrl	$24, %ecx
	andb	$3, %cl
	movl	$4, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	movl	%r14d, %ecx
	shrl	$12, %ecx
	movl	%r14d, %eax
	imull	(%r13), %ebx
	andb	$15, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	shrl	$16, %eax
	shll	$3, %ebx
	andb	$15, %al
	addb	$8, %al
	movl	%ebx, %esi
	movl	%eax, %ecx
	shll	%cl, %esi
	testb	$4, %r15b
	je	LBB0_2
## %bb.1:
	shrl	$20, %r14d
	andb	$15, %r14b
	addb	$8, %r14b
	movl	%ebx, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	addl	%eax, %esi
LBB0_2:
	movl	4(%r13), %edx
	cmpl	%edx, %esi
	je	LBB0_4
## %bb.3:
	sarl	$20, %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvkm_warn
LBB0_4:
	testb	$1, -48(%rbp)                   ## 1-byte Folded Reload
	leal	(%rbx,%rbx,2), %r14d
	cmovel	%ebx, %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_nvkm_debug
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"memcfg %08x %08x %08x %08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"memory controller reports %d MiB VRAM\n"

L_.str.2:                               ## @.str.2
	.asciz	"rblock %d bytes\n"

	.no_dead_strip	_nv50_fb_vram_rblock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv50_fb_vram_rblock
_nv50_fb_vram_rblock:                   ; @nv50_fb_vram_rblock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	x22, [x19]
	mov	w21, #512
	movk	w21, #16, lsl #16
	mov	x0, x22
	mov	w1, #512
	movk	w1, #16, lsl #16
	bl	_nvkm_rd32
	mov	x23, x0
	orr	w1, w21, #0x4
	mov	x0, x22
	bl	_nvkm_rd32
	mov	x24, x0
	mov	w8, #80
	orr	w1, w21, w8
	mov	x0, x22
	bl	_nvkm_rd32
	mov	x21, x0
	mov	x0, x22
	mov	w1, #5440
	bl	_nvkm_rd32
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp, #8]
	str	x24, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_nvkm_debug
	ubfx	w9, w24, #12, #4
	ubfx	w8, w24, #16, #4
	add	w10, w8, #8
	ubfx	w8, w24, #24, #2
	mov	w11, #4
	lsl	w11, w11, w8
	ldp	w12, w8, [x20]
	mul	w11, w12, w11
	lsl	w22, w11, w9
	lsl	w20, w22, #3
	lsl	w9, w20, w10
	ubfx	w10, w24, #20, #4
	add	w10, w10, #8
	lsl	w10, w20, w10
	add	w10, w9, w10
	tst	w23, #0x4
	csel	w9, w9, w10, eq
	cmp	w9, w8
	b.eq	LBB0_2
; %bb.1:
	asr	w2, w8, #20
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_nvkm_warn
LBB0_2:
	add	w8, w22, w22, lsl #1
	lsl	w8, w8, #3
	tst	w21, #0x1
	csel	w20, w20, w8, eq
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_nvkm_debug
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"memcfg %08x %08x %08x %08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"memory controller reports %d MiB VRAM\n"

l_.str.2:                               ; @.str.2
	.asciz	"rblock %d bytes\n"

	.no_dead_strip	_nv50_fb_vram_rblock
.subsections_via_symbols
