	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r100_mc_program
_r100_mc_program:                       ## @r100_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	-32(%rbp), %rsi
	callq	_r100_mc_stop
	movq	_RADEON_IS_AGP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_R_00014C_MC_AGP_LOCATION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	testl	%eax, (%r15)
	je	LBB0_3
## %bb.1:
	movswl	18(%r15), %edi
	callq	_S_00014C_MC_AGP_START
	movl	%eax, %ebx
	movswl	22(%r15), %edi
	callq	_S_00014C_MC_AGP_TOP
	orl	%eax, %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_WREG32
	movq	_R_000170_AGP_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	32(%r15), %edi
	callq	_lower_32_bits
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	8(%r15), %rax
	movq	_CHIP_RV200@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_6
## %bb.2:
	movq	_R_00015C_AGP_BASE_2@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	32(%r15), %edi
	callq	_upper_32_bits
	movzbl	%al, %esi
	movl	%ebx, %edi
	jmp	LBB0_5
LBB0_3:
	movl	%r14d, %edi
	movl	$268435455, %esi                ## imm = 0xFFFFFFF
	callq	_WREG32
	movq	_R_000170_AGP_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	8(%r15), %rax
	movq	_CHIP_RV200@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_6
## %bb.4:
	movq	_R_00015C_AGP_BASE_2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
LBB0_5:
	callq	_WREG32
LBB0_6:
	movq	%r15, %rdi
	callq	_r100_mc_wait_for_idle
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	36(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_8:
	movq	_R_000148_MC_FB_LOCATION@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movswl	26(%r15), %edi
	callq	_S_000148_MC_FB_START
	movl	%eax, %ebx
	movswl	30(%r15), %edi
	callq	_S_000148_MC_FB_TOP
	orl	%eax, %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_WREG32
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_r100_mc_resume
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_IS_AGP,4,2              ## @RADEON_IS_AGP
	.comm	_R_00014C_MC_AGP_LOCATION,4,2   ## @R_00014C_MC_AGP_LOCATION
	.comm	_R_000170_AGP_BASE,4,2          ## @R_000170_AGP_BASE
	.comm	_CHIP_RV200,8,3                 ## @CHIP_RV200
	.comm	_R_00015C_AGP_BASE_2,4,2        ## @R_00015C_AGP_BASE_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait for MC idle timeout.\n"

	.comm	_R_000148_MC_FB_LOCATION,4,2    ## @R_000148_MC_FB_LOCATION
	.no_dead_strip	_r100_mc_program
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r100_mc_program
_r100_mc_program:                       ; @r100_mc_program
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	add	x1, sp, #8
	bl	_r100_mc_stop
Lloh0:
	adrp	x8, _RADEON_IS_AGP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADEON_IS_AGP@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x10, _R_00014C_MC_AGP_LOCATION@GOTPAGE
Lloh4:
	ldr	x10, [x10, _R_00014C_MC_AGP_LOCATION@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x10]
	tst	w8, w9
	b.eq	LBB0_3
; %bb.1:
	ldrsh	w0, [x19, #18]
	bl	_S_00014C_MC_AGP_START
	mov	x21, x0
	ldrsh	w0, [x19, #22]
	bl	_S_00014C_MC_AGP_TOP
	orr	w1, w0, w21
	mov	x0, x20
	bl	_WREG32
Lloh6:
	adrp	x8, _R_000170_AGP_BASE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R_000170_AGP_BASE@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	ldr	w0, [x19, #32]
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x20
	bl	_WREG32
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _CHIP_RV200@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CHIP_RV200@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_6
; %bb.2:
Lloh12:
	adrp	x8, _R_00015C_AGP_BASE_2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _R_00015C_AGP_BASE_2@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	ldr	w0, [x19, #32]
	bl	_upper_32_bits
	and	w1, w0, #0xff
	mov	x0, x20
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	mov	w1, #268435455
	bl	_WREG32
Lloh15:
	adrp	x8, _R_000170_AGP_BASE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _R_000170_AGP_BASE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
	ldr	x8, [x19, #8]
Lloh18:
	adrp	x9, _CHIP_RV200@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CHIP_RV200@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_6
; %bb.4:
Lloh21:
	adrp	x8, _R_00015C_AGP_BASE_2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _R_00015C_AGP_BASE_2@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	mov	w1, #0
LBB0_5:
	bl	_WREG32
LBB0_6:
	mov	x0, x19
	bl	_r100_mc_wait_for_idle
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19, #36]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_8:
Lloh26:
	adrp	x8, _R_000148_MC_FB_LOCATION@GOTPAGE
Lloh27:
	ldr	x8, [x8, _R_000148_MC_FB_LOCATION@GOTPAGEOFF]
Lloh28:
	ldr	w20, [x8]
	ldrsh	w0, [x19, #26]
	bl	_S_000148_MC_FB_START
	mov	x21, x0
	ldrsh	w0, [x19, #30]
	bl	_S_000148_MC_FB_TOP
	orr	w1, w0, w21
	mov	x0, x20
	bl	_WREG32
	add	x1, sp, #8
	mov	x0, x19
	bl	_r100_mc_resume
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_IS_AGP,4,2              ; @RADEON_IS_AGP
	.comm	_R_00014C_MC_AGP_LOCATION,4,2   ; @R_00014C_MC_AGP_LOCATION
	.comm	_R_000170_AGP_BASE,4,2          ; @R_000170_AGP_BASE
	.comm	_CHIP_RV200,8,3                 ; @CHIP_RV200
	.comm	_R_00015C_AGP_BASE_2,4,2        ; @R_00015C_AGP_BASE_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait for MC idle timeout.\n"

	.comm	_R_000148_MC_FB_LOCATION,4,2    ; @R_000148_MC_FB_LOCATION
	.no_dead_strip	_r100_mc_program
.subsections_via_symbols
