	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs690_mc_init
_rs690_mc_init:                         ## @rs690_mc_init
	.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	%rdi, %rbx
	callq	_rs400_gart_adjust_size
	movabsq	$549755813889, %rax             ## imm = 0x8000000001
	movq	%rax, 8(%rbx)
	movq	_RADEON_CONFIG_MEMSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, 16(%rbx)
	movl	%eax, 20(%rbx)
	movl	72(%rbx), %edi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movq	%rax, 64(%rbx)
	movl	72(%rbx), %edi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movq	%rax, 24(%rbx)
	movq	%rax, 32(%rbx)
	movq	_R_000100_MCCFG_FB_LOCATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_MC
	movl	%eax, %edi
	callq	_G_000100_MC_FB_START
	movl	%eax, %r14d
	shll	$16, %r14d
	movq	%rbx, %rdi
	callq	_radeon_atombios_sideport_present
	movl	%eax, 40(%rbx)
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$402653184, 16(%rbx)            ## imm = 0x18000000
	jne	LBB0_3
## %bb.2:
	addl	$134217728, %r14d               ## imm = 0x8000000
	movabsq	$1152921504875282432, %rax      ## imm = 0x1000000010000000
	movq	%rax, 16(%rbx)
LBB0_3:
	leaq	8(%rbx), %r15
	movl	$0, (%rbx)
	movq	_R_00005F_MC_MISC_UMA_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_MC
	movq	%rax, %rdi
	callq	_G_00005F_K8_ADDR_EXT
	movq	%rax, %r12
	movq	_R_00001E_K8_FB_LOCATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_MC
	cmpl	$0, 40(%rbx)
	jne	LBB0_6
## %bb.4:
	movq	_radeon_fastfb@GOTPCREL(%rip), %rcx
	cmpl	$1, (%rcx)
	jne	LBB0_6
## %bb.5:
	shlq	$32, %r12
	orq	%rax, %r12
	movq	64(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rdx
	callq	_DRM_INFO
	movq	%r12, 64(%rbx)
	movl	$1, (%rbx)
LBB0_6:
	movq	%rbx, %rdi
	callq	_rs690_pm_info
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_radeon_vram_location
	movq	48(%rbx), %rax
	decq	%rax
	movq	%rax, 56(%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_radeon_gtt_location
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_radeon_update_bandwidth_info   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_CONFIG_MEMSIZE,4,2      ## @RADEON_CONFIG_MEMSIZE
	.comm	_R_000100_MCCFG_FB_LOCATION,4,2 ## @R_000100_MCCFG_FB_LOCATION
	.comm	_R_00005F_MC_MISC_UMA_CNTL,4,2  ## @R_00005F_MC_MISC_UMA_CNTL
	.comm	_R_00001E_K8_FB_LOCATION,4,2    ## @R_00001E_K8_FB_LOCATION
	.comm	_radeon_fastfb,4,2              ## @radeon_fastfb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Direct mapping: aper base at 0x%llx, replaced by direct mapping base 0x%llx.\n"

	.no_dead_strip	_rs690_mc_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function rs690_mc_init
lCPI0_0:
	.long	1                               ; 0x1
	.long	128                             ; 0x80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_rs690_mc_init:                         ; @rs690_mc_init
	.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, x0
	bl	_rs400_gart_adjust_size
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	mov	x20, x19
	str	d0, [x20, #8]!
Lloh2:
	adrp	x8, _RADEON_CONFIG_MEMSIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RADEON_CONFIG_MEMSIZE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_RREG32
	stp	w0, w0, [x19, #16]
	ldr	w0, [x19, #72]
	mov	w1, #0
	bl	_pci_resource_start
	str	x0, [x19, #64]
	ldr	w0, [x19, #72]
	mov	w1, #0
	bl	_pci_resource_len
	stp	x0, x0, [x19, #24]
Lloh5:
	adrp	x8, _R_000100_MCCFG_FB_LOCATION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R_000100_MCCFG_FB_LOCATION@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_RREG32_MC
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_G_000100_MC_FB_START
	lsl	w21, w0, #16
	mov	x0, x19
	bl	_radeon_atombios_sideport_present
	str	w0, [x19, #40]
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x19, #16]
	mov	w9, #402653184
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	mov	w8, #134217728
	add	w21, w21, w8
	movi.2s	v0, #16, lsl #24
	str	d0, [x19, #16]
LBB0_3:
	str	wzr, [x19]
Lloh8:
	adrp	x8, _R_00005F_MC_MISC_UMA_CNTL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R_00005F_MC_MISC_UMA_CNTL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_RREG32_MC
	bl	_G_00005F_K8_ADDR_EXT
	mov	x22, x0
Lloh11:
	adrp	x8, _R_00001E_K8_FB_LOCATION@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R_00001E_K8_FB_LOCATION@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_RREG32_MC
	ldr	w8, [x19, #40]
	cbnz	w8, LBB0_6
; %bb.4:
Lloh14:
	adrp	x8, _radeon_fastfb@GOTPAGE
Lloh15:
	ldr	x8, [x8, _radeon_fastfb@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.5:
	orr	x22, x0, x22, lsl #32
	ldr	x1, [x19, #64]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_DRM_INFO
	str	x22, [x19, #64]
	mov	w8, #1
	str	w8, [x19]
LBB0_6:
	mov	x0, x19
	bl	_rs690_pm_info
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_radeon_vram_location
	ldr	x8, [x19, #48]
	sub	x8, x8, #1
	str	x8, [x19, #56]
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_gtt_location
	mov	x0, 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_update_bandwidth_info
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_CONFIG_MEMSIZE,4,2      ; @RADEON_CONFIG_MEMSIZE
	.comm	_R_000100_MCCFG_FB_LOCATION,4,2 ; @R_000100_MCCFG_FB_LOCATION
	.comm	_R_00005F_MC_MISC_UMA_CNTL,4,2  ; @R_00005F_MC_MISC_UMA_CNTL
	.comm	_R_00001E_K8_FB_LOCATION,4,2    ; @R_00001E_K8_FB_LOCATION
	.comm	_radeon_fastfb,4,2              ; @radeon_fastfb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Direct mapping: aper base at 0x%llx, replaced by direct mapping base 0x%llx.\n"

	.no_dead_strip	_rs690_mc_init
.subsections_via_symbols
