	.file	"extr_gfx_v9_0.c_gfx_v9_0_ring_emit_reg_write_reg_wait.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gfx_v9_0_ring_emit_reg_write_reg_wait, @function
gfx_v9_0_ring_emit_reg_write_reg_wait:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR [rdi]
	mov	r9, QWORD PTR 8[rdi]
	mov	r10, QWORD PTR AMDGPU_RING_TYPE_GFX[rip]
	mov	r11, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[r9]
	cmp	r11, r10
	cmove	eax, DWORD PTR [r9]
	test	eax, eax
	je	.L3
	sub	rsp, 16
	.cfi_def_cfa_offset 24
	cmp	r11, r10
	mov	r9d, edx
	push	32
	.cfi_def_cfa_offset 32
	sete	r10b
	xor	edx, edx
	push	r8
	.cfi_def_cfa_offset 40
	movzx	r10d, r10b
	mov	r8d, esi
	push	rcx
	.cfi_def_cfa_offset 48
	mov	esi, r10d
	mov	ecx, 1
	call	gfx_v9_0_wait_reg_mem@PLT
	add	rsp, 40
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	jmp	amdgpu_ring_emit_reg_write_reg_wait_helper@PLT
	.cfi_endproc
.LFE0:
	.size	gfx_v9_0_ring_emit_reg_write_reg_wait, .-gfx_v9_0_ring_emit_reg_write_reg_wait
	.comm	AMDGPU_RING_TYPE_GFX,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_gfx_v9_0.c_gfx_v9_0_ring_emit_reg_write_reg_wait.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gfx_v9_0_ring_emit_reg_write_reg_wait, %function
gfx_v9_0_ring_emit_reg_write_reg_wait:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	lr, [r0]
	ldr	r4, .L8
	ldr	ip, [r0, #4]
	ldr	r6, [lr]
	ldr	r5, [r4]
	ldr	lr, [ip]
	cmp	r6, r5
	ldr	ip, [ip, #4]
	moveq	ip, lr
	sub	sp, sp, #28
	cmp	ip, #0
	ldr	r7, [sp, #48]
	beq	.L3
	mov	ip, r1
	sub	r1, r6, r5
	mov	lr, r2
	mov	r4, r3
	clz	r1, r1
	mov	r3, #32
	mov	r2, #0
	str	r3, [sp, #16]
	stm	sp, {ip, lr}
	mov	r3, #1
	str	r7, [sp, #12]
	str	r4, [sp, #8]
	lsr	r1, r1, #5
	bl	gfx_v9_0_wait_reg_mem
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L3:
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	amdgpu_ring_emit_reg_write_reg_wait_helper
.L9:
	.align	2
.L8:
	.word	AMDGPU_RING_TYPE_GFX
	.size	gfx_v9_0_ring_emit_reg_write_reg_wait, .-gfx_v9_0_ring_emit_reg_write_reg_wait
	.comm	AMDGPU_RING_TYPE_GFX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
