	.file	"extr_r300.c_r300_mc_program.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to create r100_mc debugfs file.\n"
	.align 8
.LC1:
	.string	"Failed to wait MC idle before programming MC.\n"
	.text
	.p2align 4
	.globl	r300_mc_program
	.type	r300_mc_program, @function
r300_mc_program:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	r100_debugfs_mc_info_init@PLT
	test	eax, eax
	jne	.L15
.L2:
	lea	r12, 4[rsp]
	mov	rdi, rbp
	mov	rsi, r12
	call	r100_mc_stop@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR RADEON_IS_AGP[rip], eax
	je	.L3
	movsx	edi, WORD PTR 6[rbp]
	call	S_00014C_MC_AGP_START@PLT
	movsx	edi, WORD PTR 10[rbp]
	mov	ebx, eax
	call	S_00014C_MC_AGP_TOP@PLT
	mov	edi, DWORD PTR R_00014C_MC_AGP_LOCATION[rip]
	or	ebx, eax
	mov	esi, ebx
	call	WREG32@PLT
	mov	edi, DWORD PTR 20[rbp]
	call	lower_32_bits@PLT
	mov	edi, DWORD PTR R_000170_AGP_BASE[rip]
	mov	esi, eax
	call	WREG32@PLT
	mov	edi, DWORD PTR 20[rbp]
	call	upper_32_bits@PLT
	mov	edi, DWORD PTR R_00015C_AGP_BASE_2[rip]
	movzx	esi, al
	call	WREG32@PLT
	mov	rdi, rbp
	call	r300_mc_wait_for_idle@PLT
	test	rax, rax
	jne	.L16
.L5:
	movsx	edi, WORD PTR 14[rbp]
	call	S_000148_MC_FB_START@PLT
	movsx	edi, WORD PTR 18[rbp]
	mov	ebx, eax
	call	S_000148_MC_FB_TOP@PLT
	mov	edi, DWORD PTR R_000148_MC_FB_LOCATION[rip]
	or	ebx, eax
	mov	esi, ebx
	call	WREG32@PLT
	mov	rsi, r12
	mov	rdi, rbp
	call	r100_mc_resume@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	edi, DWORD PTR R_00014C_MC_AGP_LOCATION[rip]
	mov	esi, 268435455
	call	WREG32@PLT
	mov	edi, DWORD PTR R_000170_AGP_BASE[rip]
	xor	esi, esi
	call	WREG32@PLT
	mov	edi, DWORD PTR R_00015C_AGP_BASE_2[rip]
	xor	esi, esi
	call	WREG32@PLT
	mov	rdi, rbp
	call	r300_mc_wait_for_idle@PLT
	test	rax, rax
	je	.L5
.L16:
	lea	rdi, .LC1[rip]
	call	DRM_INFO@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR 24[rbp]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	r300_mc_program, .-r300_mc_program
	.comm	R_000170_AGP_BASE,4,4
	.comm	R_00015C_AGP_BASE_2,4,4
	.comm	R_00014C_MC_AGP_LOCATION,4,4
	.comm	R_000148_MC_FB_LOCATION,4,4
	.comm	RADEON_IS_AGP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_r300.c_r300_mc_program.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to create r100_mc debugfs file.\012\000"
	.align	2
.LC1:
	.ascii	"Failed to wait MC idle before programming MC.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	r300_mc_program
	.syntax unified
	.arm
	.fpu softvfp
	.type	r300_mc_program, %function
r300_mc_program:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L18
	sub	sp, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r4, r0
	bl	r100_debugfs_mc_info_init
	cmp	r0, #0
	bne	.L15
.L2:
	mov	r1, sp
	mov	r0, r4
	bl	r100_mc_stop
	ldr	r2, .L18+4
	ldr	r3, [r4]
	ldr	r5, [r2]
	ands	r5, r3, r5
	ldr	r3, .L18+8
	beq	.L3
	ldrsh	r0, [r4, #6]
	ldr	r6, [r3]
	bl	S_00014C_MC_AGP_START
	mov	r5, r0
	ldrsh	r0, [r4, #10]
	bl	S_00014C_MC_AGP_TOP
	mov	r1, r0
	mov	r0, r6
	orr	r1, r5, r1
	bl	WREG32
	ldr	r3, .L18+12
	ldr	r0, [r4, #20]
	ldr	r5, [r3]
	bl	lower_32_bits
	mov	r1, r0
	mov	r0, r5
	bl	WREG32
	ldr	r3, .L18+16
	ldr	r0, [r4, #20]
	ldr	r5, [r3]
	bl	upper_32_bits
	mov	r1, r0
	mov	r0, r5
	and	r1, r1, #255
	bl	WREG32
	mov	r0, r4
	bl	r300_mc_wait_for_idle
	cmp	r0, #0
	bne	.L16
.L5:
	ldr	r3, .L18+20
	ldrsh	r0, [r4, #14]
	ldr	r6, [r3]
	bl	S_000148_MC_FB_START
	mov	r5, r0
	ldrsh	r0, [r4, #18]
	bl	S_000148_MC_FB_TOP
	mov	r1, r0
	mov	r0, r6
	orr	r1, r5, r1
	bl	WREG32
	mov	r1, sp
	mov	r0, r4
	bl	r100_mc_resume
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L3:
	mvn	r1, #-268435456
	ldr	r0, [r3]
	bl	WREG32
	ldr	r3, .L18+12
	mov	r1, r5
	ldr	r0, [r3]
	bl	WREG32
	ldr	r3, .L18+16
	mov	r1, r5
	ldr	r0, [r3]
	bl	WREG32
	mov	r0, r4
	bl	r300_mc_wait_for_idle
	cmp	r0, #0
	beq	.L5
.L16:
	ldr	r0, .L18+24
	bl	DRM_INFO
	b	.L5
.L15:
	ldr	r1, .L18+28
	ldr	r0, [r4, #24]
	bl	dev_err
	b	.L2
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC2
	.word	RADEON_IS_AGP
	.word	R_00014C_MC_AGP_LOCATION
	.word	R_000170_AGP_BASE
	.word	R_00015C_AGP_BASE_2
	.word	R_000148_MC_FB_LOCATION
	.word	.LC1
	.word	.LC0
	.size	r300_mc_program, .-r300_mc_program
	.comm	R_000170_AGP_BASE,4,4
	.comm	R_00015C_AGP_BASE_2,4,4
	.comm	R_00014C_MC_AGP_LOCATION,4,4
	.comm	R_000148_MC_FB_LOCATION,4,4
	.comm	RADEON_IS_AGP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
