	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r600_mc_init
_r600_mc_init:                          ## @r600_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	24(%rdi), %r14
	movl	$1, 24(%rdi)
	movq	_RAMCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	_CHANSIZE_OVERRIDE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_CHANSIZE_MASK@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	andl	(%rdx), %eax
	setne	%sil
	shll	$5, %esi
	addl	$32, %esi
	testl	%ecx, %ecx
	movl	$16, %r15d
	cmovel	%esi, %r15d
	movq	_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.r600_mc_init(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
LBB0_2:
	imull	%r15d, %ecx
	movl	%ecx, 28(%rbx)
	movl	80(%rbx), %edi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movq	%rax, 56(%rbx)
	movl	80(%rbx), %edi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movq	%rax, 32(%rbx)
	movq	_CONFIG_MEMSIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32
	movq	%rax, 72(%rbx)
	movl	(%r15), %edi
	callq	_RREG32
	movq	%rax, 64(%rbx)
	movq	32(%rbx), %rax
	movq	%rax, 40(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_r600_vram_gtt_location
	movq	_RADEON_IS_IGP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	callq	_rs690_pm_info
	movq	%rbx, %rdi
	callq	_radeon_atombios_sideport_present
	movl	%eax, 48(%rbx)
	movq	8(%rbx), %rax
	movq	_CHIP_RS780@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_CHIP_RS880@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_5:
	movl	$0, 16(%rbx)
	movq	_R_000012_MC_MISC_UMA_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_MC
	movq	%rax, %rdi
	callq	_G_000012_K8_ADDR_EXT
	movq	%rax, %r15
	movq	_R_000011_K8_FB_LOCATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_MC
	cmpl	$0, 48(%rbx)
	jne	LBB0_8
## %bb.6:
	movq	%rax, %r14
	movq	_radeon_fastfb@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_8
## %bb.7:
	shlq	$32, %r15
	orq	%r15, %r14
	movq	56(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rdx
	callq	_DRM_INFO
	movq	%r14, 56(%rbx)
	movl	$1, 16(%rbx)
LBB0_8:
	movq	%rbx, %rdi
	callq	_radeon_update_bandwidth_info
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RAMCFG,4,2                     ## @RAMCFG
	.comm	_CHANSIZE_OVERRIDE,4,2          ## @CHANSIZE_OVERRIDE
	.comm	_CHANSIZE_MASK,4,2              ## @CHANSIZE_MASK
	.comm	_CHMAP,4,2                      ## @CHMAP
	.comm	_NOOFCHAN_MASK,4,2              ## @NOOFCHAN_MASK
	.comm	_NOOFCHAN_SHIFT,4,2             ## @NOOFCHAN_SHIFT
	.comm	_CONFIG_MEMSIZE,4,2             ## @CONFIG_MEMSIZE
	.comm	_RADEON_IS_IGP,4,2              ## @RADEON_IS_IGP
	.comm	_CHIP_RS780,8,3                 ## @CHIP_RS780
	.comm	_CHIP_RS880,8,3                 ## @CHIP_RS880
	.comm	_R_000012_MC_MISC_UMA_CNTL,4,2  ## @R_000012_MC_MISC_UMA_CNTL
	.comm	_R_000011_K8_FB_LOCATION,4,2    ## @R_000011_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	_r600_mc_init
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.r600_mc_init
l_switch.table.r600_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 r600_mc_init
_r600_mc_init:                          ; @r600_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
	mov	w21, #1
	mov	x20, x0
	str	w21, [x20, #24]!
Lloh0:
	adrp	x8, _RAMCFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RAMCFG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
Lloh3:
	adrp	x8, _CHANSIZE_OVERRIDE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHANSIZE_OVERRIDE@GOTPAGEOFF]
Lloh5:
	adrp	x9, _CHANSIZE_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CHANSIZE_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w0
	mov	w9, #64
	mov	w10, #32
	csel	w9, w10, w9, eq
	tst	w8, w0
	mov	w8, #16
	csel	w22, w9, w8, eq
Lloh9:
	adrp	x8, _CHMAP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _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.r600_mc_init@PAGE
Lloh19:
	add	x9, x9, l_switch.table.r600_mc_init@PAGEOFF
	ldr	w21, [x9, w8, sxtw #2]
LBB0_2:
	mul	w8, w21, w22
	str	w8, [x19, #28]
	ldr	w0, [x19, #80]
	mov	w1, #0
	bl	_pci_resource_start
	str	x0, [x19, #56]
	ldr	w0, [x19, #80]
	mov	w1, #0
	bl	_pci_resource_len
	str	x0, [x19, #32]
Lloh20:
	adrp	x21, _CONFIG_MEMSIZE@GOTPAGE
Lloh21:
	ldr	x21, [x21, _CONFIG_MEMSIZE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32
	str	x0, [x19, #72]
	ldr	w0, [x21]
	bl	_RREG32
	str	x0, [x19, #64]
	ldr	x8, [x19, #32]
	str	x8, [x19, #40]
	mov	x0, x19
	mov	x1, x20
	bl	_r600_vram_gtt_location
	ldr	w8, [x19]
Lloh22:
	adrp	x9, _RADEON_IS_IGP@GOTPAGE
Lloh23:
	ldr	x9, [x9, _RADEON_IS_IGP@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_rs690_pm_info
	mov	x0, x19
	bl	_radeon_atombios_sideport_present
	str	w0, [x19, #48]
	ldr	x8, [x19, #8]
Lloh25:
	adrp	x9, _CHIP_RS780@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CHIP_RS780@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
Lloh28:
	adrp	x9, _CHIP_RS880@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CHIP_RS880@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_5:
	str	wzr, [x19, #16]
Lloh31:
	adrp	x8, _R_000012_MC_MISC_UMA_CNTL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _R_000012_MC_MISC_UMA_CNTL@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_RREG32_MC
	bl	_G_000012_K8_ADDR_EXT
	mov	x20, x0
Lloh34:
	adrp	x8, _R_000011_K8_FB_LOCATION@GOTPAGE
Lloh35:
	ldr	x8, [x8, _R_000011_K8_FB_LOCATION@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_RREG32_MC
	ldr	w8, [x19, #48]
	cbnz	w8, LBB0_8
; %bb.6:
Lloh37:
	adrp	x8, _radeon_fastfb@GOTPAGE
Lloh38:
	ldr	x8, [x8, _radeon_fastfb@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.7:
	orr	x20, x0, x20, lsl #32
	ldr	x1, [x19, #56]
Lloh40:
	adrp	x0, l_.str@PAGE
Lloh41:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_DRM_INFO
	str	x20, [x19, #56]
	mov	w8, #1
	str	w8, [x19, #16]
LBB0_8:
	mov	x0, x19
	bl	_radeon_update_bandwidth_info
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_RAMCFG,4,2                     ; @RAMCFG
	.comm	_CHANSIZE_OVERRIDE,4,2          ; @CHANSIZE_OVERRIDE
	.comm	_CHANSIZE_MASK,4,2              ; @CHANSIZE_MASK
	.comm	_CHMAP,4,2                      ; @CHMAP
	.comm	_NOOFCHAN_MASK,4,2              ; @NOOFCHAN_MASK
	.comm	_NOOFCHAN_SHIFT,4,2             ; @NOOFCHAN_SHIFT
	.comm	_CONFIG_MEMSIZE,4,2             ; @CONFIG_MEMSIZE
	.comm	_RADEON_IS_IGP,4,2              ; @RADEON_IS_IGP
	.comm	_CHIP_RS780,8,3                 ; @CHIP_RS780
	.comm	_CHIP_RS880,8,3                 ; @CHIP_RS880
	.comm	_R_000012_MC_MISC_UMA_CNTL,4,2  ; @R_000012_MC_MISC_UMA_CNTL
	.comm	_R_000011_K8_FB_LOCATION,4,2    ; @R_000011_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	_r600_mc_init
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.r600_mc_init
l_switch.table.r600_mc_init:
	.long	2                               ; 0x2
	.long	4                               ; 0x4
	.long	8                               ; 0x8

.subsections_via_symbols
