	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r600_vram_gtt_location
_r600_vram_gtt_location:                ## @r600_vram_gtt_location
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %edx
	cmpl	$-536870911, %edx               ## imm = 0xE0000001
	jb	LBB0_2
## %bb.1:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movabsq	$-2305843005455597568, %rax     ## imm = 0xE0000000E0000000
	movq	%rax, (%r15)
	movl	$-536870912, %edx               ## imm = 0xE0000000
LBB0_2:
	movl	(%r14), %eax
	movq	_RADEON_IS_AGP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.3:
	movq	8(%r15), %r12
	movq	16(%r15), %rbx
	movq	24(%r15), %rcx
	subq	%rcx, %rbx
	movslq	%edx, %rax
	cmpq	%rbx, %r12
	jle	LBB0_7
## %bb.4:
	cmpq	%rax, %r12
	jge	LBB0_6
## %bb.5:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movl	%r12d, 4(%r15)
	movl	%r12d, (%r15)
	movslq	%r12d, %rax
	movl	%r12d, %edx
	movq	8(%r15), %r12
LBB0_6:
	subq	%rax, %r12
	jmp	LBB0_10
LBB0_11:
	movq	_RADEON_IS_IGP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.13:
	movq	_MC_VM_FB_LOCATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movzwl	%ax, %edx
	shlq	$24, %rdx
	jmp	LBB0_14
LBB0_7:
	cmpq	%rax, %rbx
	jge	LBB0_9
## %bb.8:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movl	%ebx, 4(%r15)
	movl	%ebx, (%r15)
	movq	24(%r15), %rcx
	movslq	%ebx, %rax
	movl	%ebx, %edx
LBB0_9:
	incq	%rcx
	movq	%rcx, %r12
LBB0_10:
	movq	%r12, 32(%r15)
	leaq	(%r12,%rax), %r8
	decq	%r8
	movq	%r8, 40(%r15)
	movl	16(%r14), %edi
	sarl	$20, %edx
	movl	4(%r15), %r9d
	sarl	$20, %r9d
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rcx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_info                       ## TAILCALL
LBB0_12:
	xorl	%edx, %edx
LBB0_14:
	leaq	8(%r14), %rsi
	movq	%r14, %rdi
	callq	_radeon_vram_location
	movq	$0, 8(%r14)
	movq	%r14, %rdi
	movq	%r15, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_gtt_location            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"limiting VRAM\n"

	.comm	_RADEON_IS_AGP,4,2              ## @RADEON_IS_AGP
L_.str.1:                               ## @.str.1
	.asciz	"VRAM: %lluM 0x%08llX - 0x%08llX (%lluM used)\n"

	.comm	_RADEON_IS_IGP,4,2              ## @RADEON_IS_IGP
	.comm	_MC_VM_FB_LOCATION,4,2          ## @MC_VM_FB_LOCATION
	.no_dead_strip	_r600_vram_gtt_location
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r600_vram_gtt_location
_r600_vram_gtt_location:                ; @r600_vram_gtt_location
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x1]
	mov	w9, #-536870911
	cmp	w8, w9
	b.lo	LBB0_2
; %bb.1:
	ldr	w0, [x20, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	movi.2s	v0, #224, lsl #24
	str	d0, [x19]
	mov	w8, #-536870912
LBB0_2:
	ldr	w9, [x20]
Lloh2:
	adrp	x10, _RADEON_IS_AGP@GOTPAGE
Lloh3:
	ldr	x10, [x10, _RADEON_IS_AGP@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_7
; %bb.3:
	ldp	x21, x11, [x19, #8]
	ldr	x10, [x19, #24]
	sxtw	x9, w8
	sub	x22, x11, x10
	cmp	x21, x22
	b.le	LBB0_9
; %bb.4:
	cmp	x21, x9
	b.ge	LBB0_6
; %bb.5:
	ldr	w0, [x20, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	stp	w21, w21, [x19]
	sxtw	x9, w21
	mov	x8, x21
	ldr	x21, [x19, #8]
LBB0_6:
	sub	x3, x21, x9
	b	LBB0_12
LBB0_7:
Lloh7:
	adrp	x8, _RADEON_IS_IGP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RADEON_IS_IGP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_13
; %bb.8:
Lloh10:
	adrp	x8, _MC_VM_FB_LOCATION@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MC_VM_FB_LOCATION@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_RREG32
	and	w8, w0, #0xffff
	lsl	x2, x8, #24
	b	LBB0_14
LBB0_9:
	cmp	x22, x9
	b.ge	LBB0_11
; %bb.10:
	ldr	w0, [x20, #16]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	stp	w22, w22, [x19]
	sxtw	x9, w22
	mov	x8, x22
	ldr	x10, [x19, #24]
LBB0_11:
	add	x3, x10, #1
LBB0_12:
	add	x9, x3, x9
	sub	x4, x9, #1
	stp	x3, x4, [x19, #32]
	ldr	w0, [x20, #16]
	asr	w2, w8, #20
	ldr	w8, [x19, #4]
	asr	w5, w8, #20
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_dev_info
LBB0_13:
	mov	x2, #0
LBB0_14:
	add	x1, x20, #8
	mov	x0, x20
	bl	_radeon_vram_location
	str	xzr, [x20, #8]
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_radeon_gtt_location
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"limiting VRAM\n"

	.comm	_RADEON_IS_AGP,4,2              ; @RADEON_IS_AGP
l_.str.1:                               ; @.str.1
	.asciz	"VRAM: %lluM 0x%08llX - 0x%08llX (%lluM used)\n"

	.comm	_RADEON_IS_IGP,4,2              ; @RADEON_IS_IGP
	.comm	_MC_VM_FB_LOCATION,4,2          ; @MC_VM_FB_LOCATION
	.no_dead_strip	_r600_vram_gtt_location
.subsections_via_symbols
