	.file	"extr_gfx_v9_0.c_gfx_v9_0_ring_test_ring.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gfx_v9_0_ring_test_ring, @function
gfx_v9_0_ring_test_ring:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rsi, 4[rsp]
	mov	rdi, rbp
	call	amdgpu_gfx_scratch_get@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L13
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rsp]
	mov	esi, -889266515
	call	WREG32@PLT
	mov	esi, 3
	mov	rdi, r13
	call	amdgpu_ring_alloc@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L3
	mov	edi, DWORD PTR PACKET3_SET_UCONFIG_REG[rip]
	mov	esi, 1
	call	PACKET3@PLT
	mov	rdi, r13
	mov	esi, eax
	call	amdgpu_ring_write@PLT
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, r13
	sub	esi, DWORD PTR PACKET3_SET_UCONFIG_REG_START[rip]
	call	amdgpu_ring_write@PLT
	mov	esi, -559038737
	mov	rdi, r13
	call	amdgpu_ring_write@PLT
	mov	rdi, r13
	call	amdgpu_ring_commit@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	je	.L7
	xor	ebx, ebx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, 1
	add	ebx, 1
	call	udelay@PLT
	cmp	DWORD PTR 0[rbp], ebx
	jbe	.L7
.L6:
	mov	edi, DWORD PTR 4[rsp]
	call	RREG32@PLT
	cmp	eax, -559038737
	jne	.L15
	cmp	DWORD PTR 0[rbp], ebx
	jbe	.L7
.L3:
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	call	amdgpu_gfx_scratch_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r12d, DWORD PTR ETIMEDOUT[rip]
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	neg	r12d
	call	amdgpu_gfx_scratch_free@PLT
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	gfx_v9_0_ring_test_ring, .-gfx_v9_0_ring_test_ring
	.comm	PACKET3_SET_UCONFIG_REG_START,4,4
	.comm	PACKET3_SET_UCONFIG_REG,4,4
	.comm	ETIMEDOUT,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_gfx_v9_0.c_gfx_v9_0_ring_test_ring.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gfx_v9_0_ring_test_ring, %function
gfx_v9_0_ring_test_ring:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r7, [r0]
	sub	sp, sp, #12
	ldr	r3, .L18
	mov	r4, r0
	mov	r1, sp
	mov	r0, r7
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	amdgpu_gfx_scratch_get
	subs	r5, r0, #0
	beq	.L15
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L15:
	ldr	r1, .L18+4
	ldr	r0, [sp]
	bl	WREG32
	mov	r1, #3
	mov	r0, r4
	bl	amdgpu_ring_alloc
	subs	r5, r0, #0
	bne	.L3
	ldr	r3, .L18+8
	mov	r1, #1
	ldr	r0, [r3]
	bl	PACKET3
	mov	r1, r0
	mov	r0, r4
	bl	amdgpu_ring_write
	ldr	r3, .L18+12
	ldr	r1, [sp]
	ldr	r3, [r3]
	mov	r0, r4
	sub	r1, r1, r3
	bl	amdgpu_ring_write
	ldr	r1, .L18+16
	mov	r0, r4
	bl	amdgpu_ring_write
	mov	r0, r4
	bl	amdgpu_ring_commit
	ldr	r3, [r7]
	cmp	r3, #0
	beq	.L7
	mov	r4, r5
	ldr	r6, .L18+16
	b	.L6
.L17:
	mov	r0, #1
	bl	udelay
	ldr	r3, [r7]
	add	r4, r4, #1
	cmp	r3, r4
	bls	.L7
.L6:
	ldr	r0, [sp]
	bl	RREG32
	cmp	r0, r6
	bne	.L17
	ldr	r3, [r7]
	cmp	r3, r4
	bls	.L7
.L3:
	mov	r0, r7
	ldr	r1, [sp]
	bl	amdgpu_gfx_scratch_free
	b	.L1
.L7:
	ldr	r3, .L18+20
	ldr	r1, [sp]
	ldr	r0, [r3]
	rsb	r5, r0, #0
	mov	r0, r7
	bl	amdgpu_gfx_scratch_free
	b	.L1
.L16:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	-889266515
	.word	PACKET3_SET_UCONFIG_REG
	.word	PACKET3_SET_UCONFIG_REG_START
	.word	-559038737
	.word	ETIMEDOUT
	.size	gfx_v9_0_ring_test_ring, .-gfx_v9_0_ring_test_ring
	.comm	PACKET3_SET_UCONFIG_REG_START,4,4
	.comm	PACKET3_SET_UCONFIG_REG,4,4
	.comm	ETIMEDOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
