	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cik_mc_program
_cik_mc_program:                        ## @cik_mc_program
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	$11284, %ebx                    ## imm = 0x2C14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_WREG32
	leal	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_WREG32
	leal	8(%rbx), %edi
	xorl	%esi, %esi
	callq	_WREG32
	leal	12(%rbx), %edi
	xorl	%esi, %esi
	callq	_WREG32
	leal	16(%rbx), %edi
	xorl	%esi, %esi
	callq	_WREG32
	addl	$24, %ebx
	cmpl	$12052, %ebx                    ## imm = 0x2F14
	jne	LBB0_1
## %bb.2:
	movq	_HDP_REG_COHERENCY_FLUSH_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_evergreen_mc_stop
	movq	%r14, %rdi
	callq	_radeon_mc_wait_for_idle
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_4:
	movq	_VGA_HDP_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VGA_MEMORY_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WREG32
	movq	_MC_VM_SYSTEM_APERTURE_LOW_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %esi
	sarl	$12, %esi
	callq	_WREG32
	movq	_MC_VM_SYSTEM_APERTURE_HIGH_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
	sarl	$12, %esi
	callq	_WREG32
	movq	_MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r14), %esi
	sarl	$12, %esi
	callq	_WREG32
	movl	8(%r14), %eax
	sarl	$8, %eax
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	movsbl	7(%r14), %ecx
	movzwl	%cx, %esi
	orl	%eax, %esi
	movq	_MC_VM_FB_LOCATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_WREG32
	movq	_HDP_NONSURFACE_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r14), %esi
	sarl	$8, %esi
	callq	_WREG32
	movq	_HDP_NONSURFACE_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1073742080, %esi               ## imm = 0x40000100
	callq	_WREG32
	movq	_HDP_NONSURFACE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1073741823, %esi               ## imm = 0x3FFFFFFF
	callq	_WREG32
	movq	_MC_VM_AGP_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	_MC_VM_AGP_TOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$268435455, %esi                ## imm = 0xFFFFFFF
	callq	_WREG32
	movq	_MC_VM_AGP_BOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$268435455, %esi                ## imm = 0xFFFFFFF
	callq	_WREG32
	movq	%r14, %rdi
	callq	_radeon_mc_wait_for_idle
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_6:
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_evergreen_mc_resume
	movq	%r14, %rdi
	callq	_rv515_vga_render_disable
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDP_REG_COHERENCY_FLUSH_CNTL,4,2 ## @HDP_REG_COHERENCY_FLUSH_CNTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait for MC idle timedout !\n"

	.comm	_VGA_HDP_CONTROL,4,2            ## @VGA_HDP_CONTROL
	.comm	_VGA_MEMORY_DISABLE,4,2         ## @VGA_MEMORY_DISABLE
	.comm	_MC_VM_SYSTEM_APERTURE_LOW_ADDR,4,2 ## @MC_VM_SYSTEM_APERTURE_LOW_ADDR
	.comm	_MC_VM_SYSTEM_APERTURE_HIGH_ADDR,4,2 ## @MC_VM_SYSTEM_APERTURE_HIGH_ADDR
	.comm	_MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR,4,2 ## @MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR
	.comm	_MC_VM_FB_LOCATION,4,2          ## @MC_VM_FB_LOCATION
	.comm	_HDP_NONSURFACE_BASE,4,2        ## @HDP_NONSURFACE_BASE
	.comm	_HDP_NONSURFACE_INFO,4,2        ## @HDP_NONSURFACE_INFO
	.comm	_HDP_NONSURFACE_SIZE,4,2        ## @HDP_NONSURFACE_SIZE
	.comm	_MC_VM_AGP_BASE,4,2             ## @MC_VM_AGP_BASE
	.comm	_MC_VM_AGP_TOP,4,2              ## @MC_VM_AGP_TOP
	.comm	_MC_VM_AGP_BOT,4,2              ## @MC_VM_AGP_BOT
	.no_dead_strip	_cik_mc_program
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cik_mc_program
_cik_mc_program:                        ; @cik_mc_program
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	w21, #0
	mov	w22, #11292
	mov	w23, #11284
	mov	w24, #11288
	mov	w25, #11296
	mov	w26, #11300
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	w20, w21, w22
	add	w0, w21, w23
	mov	w1, #0
	bl	_WREG32
	add	w0, w21, w24
	mov	w1, #0
	bl	_WREG32
	mov	x0, x20
	mov	w1, #0
	bl	_WREG32
	add	w0, w21, w25
	mov	w1, #0
	bl	_WREG32
	add	w0, w21, w26
	mov	w1, #0
	bl	_WREG32
	add	w21, w21, #24
	cmp	w21, #768
	b.ne	LBB0_1
; %bb.2:
Lloh0:
	adrp	x8, _HDP_REG_COHERENCY_FLUSH_CNTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDP_REG_COHERENCY_FLUSH_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
	add	x1, sp, #8
	mov	x0, x19
	bl	_evergreen_mc_stop
	mov	x0, x19
	bl	_radeon_mc_wait_for_idle
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_4:
Lloh5:
	adrp	x8, _VGA_HDP_CONTROL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VGA_HDP_CONTROL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _VGA_MEMORY_DISABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VGA_MEMORY_DISABLE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_WREG32
Lloh11:
	adrp	x8, _MC_VM_SYSTEM_APERTURE_LOW_ADDR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MC_VM_SYSTEM_APERTURE_LOW_ADDR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w8, [x19, #4]
	asr	w1, w8, #12
	bl	_WREG32
Lloh14:
	adrp	x8, _MC_VM_SYSTEM_APERTURE_HIGH_ADDR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MC_VM_SYSTEM_APERTURE_HIGH_ADDR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w8, [x19, #8]
	asr	w1, w8, #12
	bl	_WREG32
Lloh17:
	adrp	x8, _MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w8, [x19, #12]
	asr	w1, w8, #12
	bl	_WREG32
	ldr	w8, [x19, #8]
	asr	w1, w8, #8
	ldrsb	w8, [x19, #7]
	bfxil	w1, w8, #0, #16
Lloh20:
	adrp	x8, _MC_VM_FB_LOCATION@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MC_VM_FB_LOCATION@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_WREG32
Lloh23:
	adrp	x8, _HDP_NONSURFACE_BASE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HDP_NONSURFACE_BASE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	w8, [x19, #4]
	asr	w1, w8, #8
	bl	_WREG32
Lloh26:
	adrp	x8, _HDP_NONSURFACE_INFO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HDP_NONSURFACE_INFO@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	w1, #256
	movk	w1, #16384, lsl #16
	bl	_WREG32
Lloh29:
	adrp	x8, _HDP_NONSURFACE_SIZE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _HDP_NONSURFACE_SIZE@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	w1, #1073741823
	bl	_WREG32
Lloh32:
	adrp	x8, _MC_VM_AGP_BASE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MC_VM_AGP_BASE@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
Lloh35:
	adrp	x8, _MC_VM_AGP_TOP@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MC_VM_AGP_TOP@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	mov	w1, #268435455
	bl	_WREG32
Lloh38:
	adrp	x8, _MC_VM_AGP_BOT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MC_VM_AGP_BOT@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	mov	w1, #268435455
	bl	_WREG32
	mov	x0, x19
	bl	_radeon_mc_wait_for_idle
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w0, [x19]
Lloh41:
	adrp	x1, l_.str@PAGE
Lloh42:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_6:
	add	x1, sp, #8
	mov	x0, x19
	bl	_evergreen_mc_resume
	mov	x0, x19
	bl	_rv515_vga_render_disable
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_HDP_REG_COHERENCY_FLUSH_CNTL,4,2 ; @HDP_REG_COHERENCY_FLUSH_CNTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait for MC idle timedout !\n"

	.comm	_VGA_HDP_CONTROL,4,2            ; @VGA_HDP_CONTROL
	.comm	_VGA_MEMORY_DISABLE,4,2         ; @VGA_MEMORY_DISABLE
	.comm	_MC_VM_SYSTEM_APERTURE_LOW_ADDR,4,2 ; @MC_VM_SYSTEM_APERTURE_LOW_ADDR
	.comm	_MC_VM_SYSTEM_APERTURE_HIGH_ADDR,4,2 ; @MC_VM_SYSTEM_APERTURE_HIGH_ADDR
	.comm	_MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR,4,2 ; @MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR
	.comm	_MC_VM_FB_LOCATION,4,2          ; @MC_VM_FB_LOCATION
	.comm	_HDP_NONSURFACE_BASE,4,2        ; @HDP_NONSURFACE_BASE
	.comm	_HDP_NONSURFACE_INFO,4,2        ; @HDP_NONSURFACE_INFO
	.comm	_HDP_NONSURFACE_SIZE,4,2        ; @HDP_NONSURFACE_SIZE
	.comm	_MC_VM_AGP_BASE,4,2             ; @MC_VM_AGP_BASE
	.comm	_MC_VM_AGP_TOP,4,2              ; @MC_VM_AGP_TOP
	.comm	_MC_VM_AGP_BOT,4,2              ; @MC_VM_AGP_BOT
	.no_dead_strip	_cik_mc_program
.subsections_via_symbols
