	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv770_mc_init
_rv770_mc_init:                         ## @rv770_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
	movl	$1, (%rdi)
	movq	_MC_ARB_RAMCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	%rax, %r14
	movq	_CHANSIZE_OVERRIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_CHANSIZE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_MC_SHARED_CHMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	_NOOFCHAN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_NOOFCHAN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	decl	%eax
	movl	$1, %ecx
	cmpl	$2, %eax
	ja	LBB0_2
## %bb.1:
	cltq
	leaq	l_switch.table.rv770_mc_init(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
LBB0_2:
	xorl	%eax, %eax
	testl	%r14d, %r12d
	setne	%al
	shll	$5, %eax
	addl	$32, %eax
	testl	%r14d, %r15d
	movl	$16, %edx
	cmovel	%eax, %edx
	imull	%ecx, %edx
	movl	%edx, 4(%rbx)
	movl	40(%rbx), %edi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, 32(%rbx)
	movl	40(%rbx), %edi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%eax, 8(%rbx)
	movq	_CONFIG_MEMSIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_RREG32
	movq	%rax, 24(%rbx)
	movl	(%r14), %edi
	callq	_RREG32
	movq	%rax, 16(%rbx)
	movl	8(%rbx), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_r700_vram_gtt_location
	movq	%rbx, %rdi
	callq	_radeon_update_bandwidth_info
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MC_ARB_RAMCFG,4,2              ## @MC_ARB_RAMCFG
	.comm	_CHANSIZE_OVERRIDE,4,2          ## @CHANSIZE_OVERRIDE
	.comm	_CHANSIZE_MASK,4,2              ## @CHANSIZE_MASK
	.comm	_MC_SHARED_CHMAP,4,2            ## @MC_SHARED_CHMAP
	.comm	_NOOFCHAN_MASK,4,2              ## @NOOFCHAN_MASK
	.comm	_NOOFCHAN_SHIFT,4,2             ## @NOOFCHAN_SHIFT
	.comm	_CONFIG_MEMSIZE,4,2             ## @CONFIG_MEMSIZE
	.no_dead_strip	_rv770_mc_init
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.rv770_mc_init
l_switch.table.rv770_mc_init:
	.long	2                               ## 0x2
	.long	4                               ## 0x4
	.long	8                               ## 0x8

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rv770_mc_init
_rv770_mc_init:                         ; @rv770_mc_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	mov	w21, #1
	str	w21, [x0]
Lloh0:
	adrp	x8, _MC_ARB_RAMCFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MC_ARB_RAMCFG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
	mov	x20, x0
Lloh3:
	adrp	x8, _CHANSIZE_OVERRIDE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHANSIZE_OVERRIDE@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _CHANSIZE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CHANSIZE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
Lloh9:
	adrp	x8, _MC_SHARED_CHMAP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MC_SHARED_CHMAP@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_RREG32
Lloh12:
	adrp	x8, _NOOFCHAN_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NOOFCHAN_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh15:
	adrp	x9, _NOOFCHAN_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NOOFCHAN_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	asr	w8, w8, w9
	sub	w8, w8, #1
	cmp	w8, #2
	b.hi	LBB0_2
; %bb.1:
Lloh18:
	adrp	x9, l_switch.table.rv770_mc_init@PAGE
Lloh19:
	add	x9, x9, l_switch.table.rv770_mc_init@PAGEOFF
	ldr	w21, [x9, w8, sxtw #2]
LBB0_2:
	tst	w23, w20
	mov	w8, #64
	mov	w9, #32
	csel	w8, w9, w8, eq
	tst	w22, w20
	mov	w9, #16
	csel	w8, w8, w9, eq
	mul	w8, w21, w8
	str	w8, [x19, #4]
	ldr	w0, [x19, #40]
	mov	w1, #0
	bl	_pci_resource_start
	str	w0, [x19, #32]
	ldr	w0, [x19, #40]
	mov	w1, #0
	bl	_pci_resource_len
	str	w0, [x19, #8]
Lloh20:
	adrp	x20, _CONFIG_MEMSIZE@GOTPAGE
Lloh21:
	ldr	x20, [x20, _CONFIG_MEMSIZE@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
	str	x0, [x19, #24]
	ldr	w0, [x20]
	bl	_RREG32
	str	x0, [x19, #16]
	ldr	w8, [x19, #8]
	str	w8, [x19, #12]
	mov	x0, x19
	mov	x1, x19
	bl	_r700_vram_gtt_location
	mov	x0, x19
	bl	_radeon_update_bandwidth_info
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MC_ARB_RAMCFG,4,2              ; @MC_ARB_RAMCFG
	.comm	_CHANSIZE_OVERRIDE,4,2          ; @CHANSIZE_OVERRIDE
	.comm	_CHANSIZE_MASK,4,2              ; @CHANSIZE_MASK
	.comm	_MC_SHARED_CHMAP,4,2            ; @MC_SHARED_CHMAP
	.comm	_NOOFCHAN_MASK,4,2              ; @NOOFCHAN_MASK
	.comm	_NOOFCHAN_SHIFT,4,2             ; @NOOFCHAN_SHIFT
	.comm	_CONFIG_MEMSIZE,4,2             ; @CONFIG_MEMSIZE
	.no_dead_strip	_rv770_mc_init
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.rv770_mc_init
l_switch.table.rv770_mc_init:
	.long	2                               ; 0x2
	.long	4                               ; 0x4
	.long	8                               ; 0x8

.subsections_via_symbols
