	.file	"extr_r600_cp.c_r600_do_wait_for_idle.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"wait idle failed status : 0x%08X 0x%08X\n"
	.text
	.p2align 4
	.type	r600_do_wait_for_idle, @function
r600_do_wait_for_idle:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR RADEON_BOX_WAIT_IDLE[rip]
	or	DWORD PTR 8[rdi], eax
	mov	eax, DWORD PTR [rdi]
	and	eax, DWORD PTR RADEON_FAMILY_MASK[rip]
	cmp	eax, DWORD PTR CHIP_RV770[rip]
	jl	.L2
	mov	esi, 8
	call	r600_do_wait_for_fifo@PLT
	mov	r12d, eax
.L3:
	test	r12d, r12d
	jne	.L1
	mov	eax, DWORD PTR 4[rbx]
	test	eax, eax
	jg	.L6
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, 1
	add	r12d, 1
	call	DRM_UDELAY@PLT
	cmp	DWORD PTR 4[rbx], r12d
	jle	.L5
.L6:
	mov	edi, DWORD PTR R600_GRBM_STATUS[rip]
	call	RADEON_READ@PLT
	test	DWORD PTR R600_GUI_ACTIVE[rip], eax
	jne	.L11
	xor	r12d, r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, 16
	call	r600_do_wait_for_fifo@PLT
	mov	r12d, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR R600_GRBM_STATUS2[rip]
	call	RADEON_READ@PLT
	mov	edi, DWORD PTR R600_GRBM_STATUS[rip]
	mov	r12d, eax
	call	RADEON_READ@PLT
	mov	edx, r12d
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	DRM_INFO@PLT
	mov	r12d, DWORD PTR EBUSY[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	r600_do_wait_for_idle, .-r600_do_wait_for_idle
	.comm	RADEON_FAMILY_MASK,4,4
	.comm	RADEON_BOX_WAIT_IDLE,4,4
	.comm	R600_GUI_ACTIVE,4,4
	.comm	R600_GRBM_STATUS2,4,4
	.comm	R600_GRBM_STATUS,4,4
	.comm	EBUSY,4,4
	.comm	CHIP_RV770,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_r600_cp.c_r600_do_wait_for_idle.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"wait idle failed status : 0x%08X 0x%08X\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	r600_do_wait_for_idle, %function
r600_do_wait_for_idle:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L14
	ldr	r1, .L14+4
	ldr	r2, .L14+8
	push	{r4, r5, r6, r7, r8, lr}
	ldr	ip, [r3]
	ldr	lr, [r1]
	ldr	r1, [r2]
	ldr	r2, [r0]
	ldr	r3, [r0, #8]
	and	r2, r2, ip
	cmp	r2, r1
	orr	r3, r3, lr
	movge	r1, #8
	movlt	r1, #16
	str	r3, [r0, #8]
	mov	r5, r0
	bl	r600_do_wait_for_fifo
	cmp	r0, #0
	mov	r4, r0
	bne	.L1
	ldr	r3, [r5, #4]
	ldr	r6, .L14+12
	cmp	r3, #0
	ldrgt	r7, .L14+16
	bgt	.L6
	b	.L5
.L13:
	mov	r0, #1
	bl	DRM_UDELAY
	ldr	r3, [r5, #4]
	cmp	r3, r4
	ble	.L5
.L6:
	ldr	r0, [r6]
	bl	RADEON_READ
	ldr	r3, [r7]
	add	r4, r4, #1
	ands	r0, r0, r3
	bne	.L13
	mov	r4, r0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	ldr	r0, [r6]
	bl	RADEON_READ
	ldr	r3, .L14+20
	mov	r4, r0
	ldr	r0, [r3]
	bl	RADEON_READ
	mov	r1, r4
	mov	r2, r0
	ldr	r0, .L14+24
	bl	DRM_INFO
	ldr	r3, .L14+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	RADEON_FAMILY_MASK
	.word	RADEON_BOX_WAIT_IDLE
	.word	CHIP_RV770
	.word	R600_GRBM_STATUS
	.word	R600_GUI_ACTIVE
	.word	R600_GRBM_STATUS2
	.word	.LC0
	.word	EBUSY
	.size	r600_do_wait_for_idle, .-r600_do_wait_for_idle
	.comm	RADEON_FAMILY_MASK,4,4
	.comm	RADEON_BOX_WAIT_IDLE,4,4
	.comm	R600_GUI_ACTIVE,4,4
	.comm	R600_GRBM_STATUS2,4,4
	.comm	R600_GRBM_STATUS,4,4
	.comm	EBUSY,4,4
	.comm	CHIP_RV770,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
