	.file	"extr_radeon_state.c_radeon_apply_surface_regs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	radeon_apply_surface_regs, @function
radeon_apply_surface_regs:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR 8[rsi]
	test	eax, eax
	jne	.L7
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edi
	mov	rdi, rsi
	call	radeon_do_cp_idle@PLT
	movsx	rax, ebx
	mov	rdi, QWORD PTR RADEON_SURFACE0_INFO[rip]
	sal	ebx, 4
	lea	r12, [rax+rax*2]
	mov	rax, QWORD PTR 0[rbp]
	movsx	rbx, ebx
	sal	r12, 2
	add	rdi, rbx
	mov	esi, DWORD PTR 8[rax+r12]
	call	RADEON_WRITE@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, QWORD PTR RADEON_SURFACE0_LOWER_BOUND[rip]
	mov	esi, DWORD PTR 4[rax+r12]
	add	rdi, rbx
	call	RADEON_WRITE@PLT
	mov	rax, QWORD PTR 0[rbp]
	add	rbx, QWORD PTR RADEON_SURFACE0_UPPER_BOUND[rip]
	mov	rdi, rbx
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	mov	esi, DWORD PTR [rax+r12]
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	RADEON_WRITE@PLT
	.cfi_endproc
.LFE0:
	.size	radeon_apply_surface_regs, .-radeon_apply_surface_regs
	.comm	RADEON_SURFACE0_UPPER_BOUND,8,8
	.comm	RADEON_SURFACE0_LOWER_BOUND,8,8
	.comm	RADEON_SURFACE0_INFO,8,8
	.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_radeon_state.c_radeon_apply_surface_regs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	radeon_apply_surface_regs, %function
radeon_apply_surface_regs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r1, #4]
	cmp	r3, #0
	bxeq	lr
	push	{r4, r5, r6, lr}
	mov	r5, r1
	mov	r4, r0
	mov	r0, r1
	bl	radeon_do_cp_idle
	ldr	r2, .L7
	ldr	r3, [r5]
	ldr	r0, [r2]
	add	r6, r4, r4, lsl #1
	add	r3, r3, r6, lsl #2
	ldr	r1, [r3, #8]
	add	r0, r0, r4, lsl #4
	bl	RADEON_WRITE
	ldr	r2, .L7+4
	ldr	r3, [r5]
	ldr	r0, [r2]
	lsl	r6, r6, #2
	add	r3, r3, r6
	lsl	r4, r4, #4
	ldr	r1, [r3, #4]
	add	r0, r4, r0
	bl	RADEON_WRITE
	ldr	r2, .L7+8
	ldr	r3, [r5]
	ldr	r0, [r2]
	ldr	r1, [r3, r6]
	add	r0, r4, r0
	pop	{r4, r5, r6, lr}
	b	RADEON_WRITE
.L8:
	.align	2
.L7:
	.word	RADEON_SURFACE0_INFO
	.word	RADEON_SURFACE0_LOWER_BOUND
	.word	RADEON_SURFACE0_UPPER_BOUND
	.size	radeon_apply_surface_regs, .-radeon_apply_surface_regs
	.comm	RADEON_SURFACE0_UPPER_BOUND,4,4
	.comm	RADEON_SURFACE0_LOWER_BOUND,4,4
	.comm	RADEON_SURFACE0_INFO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
