	.file	"extr_gfx_v8_0.c_gfx_v8_0_check_soft_reset.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gfx_v8_0_check_soft_reset, @function
gfx_v8_0_check_soft_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR mmGRBM_STATUS[rip]
	call	RREG32@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR GRBM_STATUS__PA_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__SC_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__BCI_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__SX_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__TA_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__VGT_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__DB_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__CB_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__GDS_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__SPI_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__IA_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__IA_BUSY_NO_DMA_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__CP_BUSY_MASK[rip]
	or	eax, DWORD PTR GRBM_STATUS__CP_COHERENCY_BUSY_MASK[rip]
	and	eax, r8d
	jne	.L25
	xor	r12d, r12d
	mov	ebp, eax
.L2:
	mov	edi, DWORD PTR mmGRBM_STATUS2[rip]
	call	RREG32@PLT
	mov	edx, DWORD PTR RLC_BUSY[rip]
	mov	esi, DWORD PTR GRBM_STATUS2[rip]
	mov	edi, eax
	mov	r13d, eax
	call	REG_GET_FIELD@PLT
	test	rax, rax
	jne	.L26
.L3:
	mov	edx, DWORD PTR CPF_BUSY[rip]
	mov	esi, DWORD PTR GRBM_STATUS2[rip]
	mov	edi, r13d
	call	REG_GET_FIELD@PLT
	test	rax, rax
	jne	.L6
	mov	edx, DWORD PTR CPC_BUSY[rip]
	mov	esi, DWORD PTR GRBM_STATUS2[rip]
	mov	edi, r13d
	call	REG_GET_FIELD@PLT
	test	rax, rax
	je	.L27
.L6:
	mov	edx, DWORD PTR SOFT_RESET_CPF[rip]
	mov	esi, DWORD PTR GRBM_SOFT_RESET[rip]
	mov	edi, ebp
	mov	ecx, 1
	call	REG_SET_FIELD@PLT
	mov	edx, DWORD PTR SOFT_RESET_CPC[rip]
	mov	esi, DWORD PTR GRBM_SOFT_RESET[rip]
	mov	ecx, 1
	mov	edi, eax
	call	REG_SET_FIELD@PLT
	mov	edx, DWORD PTR SOFT_RESET_CPG[rip]
	mov	esi, DWORD PTR GRBM_SOFT_RESET[rip]
	mov	ecx, 1
	mov	edi, eax
	call	REG_SET_FIELD@PLT
	mov	edx, DWORD PTR SOFT_RESET_GRBM[rip]
	mov	esi, DWORD PTR SRBM_SOFT_RESET[rip]
	mov	edi, r12d
	mov	ecx, 1
	mov	ebp, eax
	call	REG_SET_FIELD@PLT
	mov	r12d, eax
.L5:
	mov	edi, DWORD PTR mmSRBM_STATUS[rip]
	call	RREG32@PLT
	mov	edx, DWORD PTR GRBM_RQ_PENDING[rip]
	mov	esi, DWORD PTR SRBM_STATUS[rip]
	mov	edi, eax
	mov	r13d, eax
	call	REG_GET_FIELD@PLT
	test	rax, rax
	jne	.L28
.L7:
	mov	edx, DWORD PTR SEM_BUSY[rip]
	mov	esi, DWORD PTR SRBM_STATUS[rip]
	mov	edi, r13d
	call	REG_GET_FIELD@PLT
	test	rax, rax
	jne	.L29
.L8:
	mov	eax, ebp
	or	eax, r12d
	je	.L9
	mov	DWORD PTR [rbx], ebp
	mov	eax, 1
	mov	DWORD PTR 4[rbx], r12d
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L9:
	.cfi_restore_state
	mov	QWORD PTR [rbx], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L26:
	.cfi_restore_state
	mov	edx, DWORD PTR SOFT_RESET_RLC[rip]
	mov	esi, DWORD PTR GRBM_SOFT_RESET[rip]
	mov	edi, ebp
	mov	ecx, 1
	call	REG_SET_FIELD@PLT
	mov	ebp, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edx, DWORD PTR SOFT_RESET_CP[rip]
	mov	esi, DWORD PTR GRBM_SOFT_RESET[rip]
	mov	ecx, 1
	xor	edi, edi
	call	REG_SET_FIELD@PLT
	mov	edx, DWORD PTR SOFT_RESET_GFX[rip]
	mov	esi, DWORD PTR GRBM_SOFT_RESET[rip]
	mov	ecx, 1
	mov	edi, eax
	call	REG_SET_FIELD@PLT
	mov	edx, DWORD PTR SOFT_RESET_GRBM[rip]
	mov	esi, DWORD PTR SRBM_SOFT_RESET[rip]
	xor	edi, edi
	mov	ecx, 1
	mov	ebp, eax
	call	REG_SET_FIELD@PLT
	mov	r12d, eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edx, DWORD PTR SOFT_RESET_SEM[rip]
	mov	esi, DWORD PTR SRBM_SOFT_RESET[rip]
	mov	edi, r12d
	mov	ecx, 1
	call	REG_SET_FIELD@PLT
	mov	r12d, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edx, DWORD PTR SOFT_RESET_GRBM[rip]
	mov	esi, DWORD PTR SRBM_SOFT_RESET[rip]
	mov	edi, r12d
	mov	ecx, 1
	call	REG_SET_FIELD@PLT
	mov	r12d, eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edx, DWORD PTR CPG_BUSY[rip]
	mov	esi, DWORD PTR GRBM_STATUS2[rip]
	mov	edi, r13d
	call	REG_GET_FIELD@PLT
	test	rax, rax
	jne	.L6
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	gfx_v8_0_check_soft_reset, .-gfx_v8_0_check_soft_reset
	.comm	mmSRBM_STATUS,4,4
	.comm	mmGRBM_STATUS2,4,4
	.comm	mmGRBM_STATUS,4,4
	.comm	SRBM_STATUS,4,4
	.comm	SRBM_SOFT_RESET,4,4
	.comm	SOFT_RESET_SEM,4,4
	.comm	SOFT_RESET_RLC,4,4
	.comm	SOFT_RESET_GRBM,4,4
	.comm	SOFT_RESET_GFX,4,4
	.comm	SOFT_RESET_CPG,4,4
	.comm	SOFT_RESET_CPF,4,4
	.comm	SOFT_RESET_CPC,4,4
	.comm	SOFT_RESET_CP,4,4
	.comm	SEM_BUSY,4,4
	.comm	RLC_BUSY,4,4
	.comm	GRBM_STATUS__VGT_BUSY_MASK,4,4
	.comm	GRBM_STATUS__TA_BUSY_MASK,4,4
	.comm	GRBM_STATUS__SX_BUSY_MASK,4,4
	.comm	GRBM_STATUS__SPI_BUSY_MASK,4,4
	.comm	GRBM_STATUS__SC_BUSY_MASK,4,4
	.comm	GRBM_STATUS__PA_BUSY_MASK,4,4
	.comm	GRBM_STATUS__IA_BUSY_NO_DMA_MASK,4,4
	.comm	GRBM_STATUS__IA_BUSY_MASK,4,4
	.comm	GRBM_STATUS__GDS_BUSY_MASK,4,4
	.comm	GRBM_STATUS__DB_BUSY_MASK,4,4
	.comm	GRBM_STATUS__CP_COHERENCY_BUSY_MASK,4,4
	.comm	GRBM_STATUS__CP_BUSY_MASK,4,4
	.comm	GRBM_STATUS__CB_BUSY_MASK,4,4
	.comm	GRBM_STATUS__BCI_BUSY_MASK,4,4
	.comm	GRBM_STATUS2,4,4
	.comm	GRBM_SOFT_RESET,4,4
	.comm	GRBM_RQ_PENDING,4,4
	.comm	CPG_BUSY,4,4
	.comm	CPF_BUSY,4,4
	.comm	CPC_BUSY,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_v8_0.c_gfx_v8_0_check_soft_reset.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gfx_v8_0_check_soft_reset, %function
gfx_v8_0_check_soft_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L28
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r0, [r3]
	bl	RREG32
	ldr	r2, .L28+4
	ldr	r3, .L28+8
	ldr	r4, [r2]
	ldr	r3, [r3]
	ldr	r1, .L28+12
	ldr	r2, .L28+16
	ldr	r1, [r1]
	orr	r4, r4, r3
	ldr	r3, .L28+20
	ldr	r2, [r2]
	ldr	r3, [r3]
	orr	r4, r4, r1
	ldr	r1, .L28+24
	orr	r4, r4, r2
	ldr	r2, .L28+28
	ldr	r1, [r1]
	orr	r4, r4, r3
	ldr	r3, .L28+32
	ldr	r2, [r2]
	ldr	r3, [r3]
	orr	r4, r4, r1
	ldr	r1, .L28+36
	orr	r4, r4, r2
	ldr	r2, .L28+40
	ldr	r1, [r1]
	orr	r4, r4, r3
	ldr	r3, .L28+44
	ldr	r2, [r2]
	ldr	r3, [r3]
	orr	r4, r4, r1
	ldr	r1, .L28+48
	orr	r4, r4, r2
	ldr	r2, .L28+52
	orr	r4, r4, r3
	ldr	r1, [r1]
	ldr	r3, .L28+56
	ldr	r2, [r2]
	ldr	r3, [r3]
	orr	r4, r4, r1
	orr	r4, r4, r2
	orr	r4, r4, r3
	ands	r4, r4, r0
	moveq	r6, r4
	bne	.L23
.L2:
	ldr	r3, .L28+60
	ldr	r8, .L28+64
	ldr	r0, [r3]
	bl	RREG32
	ldr	r3, .L28+68
	ldr	r1, [r8]
	ldr	r2, [r3]
	mov	r7, r0
	bl	REG_GET_FIELD
	cmp	r0, #0
	bne	.L24
.L3:
	ldr	r3, .L28+72
	mov	r0, r7
	ldr	r1, [r8]
	ldr	r2, [r3]
	bl	REG_GET_FIELD
	cmp	r0, #0
	bne	.L6
	ldr	r3, .L28+76
	mov	r0, r7
	ldr	r1, [r8]
	ldr	r2, [r3]
	bl	REG_GET_FIELD
	cmp	r0, #0
	beq	.L25
.L6:
	ldr	r7, .L28+80
	ldr	r3, .L28+84
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r1, [r7]
	mov	r3, #1
	bl	REG_SET_FIELD
	ldr	r3, .L28+88
	ldr	r1, [r7]
	ldr	r2, [r3]
	mov	r3, #1
	bl	REG_SET_FIELD
	ldr	r3, .L28+92
	ldr	r1, [r7]
	ldr	r2, [r3]
	mov	r3, #1
	bl	REG_SET_FIELD
	ldr	r3, .L28+96
	ldr	r2, .L28+100
	ldr	r1, [r3]
	mov	r4, r0
	mov	r3, #1
	mov	r0, r6
	ldr	r2, [r2]
	bl	REG_SET_FIELD
	mov	r6, r0
.L5:
	ldr	r3, .L28+104
	ldr	r8, .L28+108
	ldr	r0, [r3]
	bl	RREG32
	ldr	r3, .L28+112
	ldr	r1, [r8]
	ldr	r2, [r3]
	mov	r7, r0
	bl	REG_GET_FIELD
	cmp	r0, #0
	bne	.L26
.L7:
	ldr	r3, .L28+116
	mov	r0, r7
	ldr	r1, [r8]
	ldr	r2, [r3]
	bl	REG_GET_FIELD
	cmp	r0, #0
	bne	.L27
.L8:
	orrs	r0, r4, r6
	movne	r0, #1
	stmne	r5, {r4, r6}
	streq	r0, [r5]
	streq	r0, [r5, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	ldr	r3, .L28+80
	ldr	r2, .L28+120
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, #1
	bl	REG_SET_FIELD
	mov	r4, r0
	b	.L3
.L23:
	ldr	r4, .L28+80
	ldr	r3, .L28+124
	ldr	r1, [r4]
	ldr	r2, [r3]
	mov	r0, #0
	mov	r3, #1
	bl	REG_SET_FIELD
	ldr	r3, .L28+128
	ldr	r1, [r4]
	ldr	r2, [r3]
	mov	r3, #1
	bl	REG_SET_FIELD
	ldr	r3, .L28+96
	ldr	r2, .L28+100
	ldr	r1, [r3]
	mov	r4, r0
	mov	r3, #1
	mov	r0, #0
	ldr	r2, [r2]
	bl	REG_SET_FIELD
	mov	r6, r0
	b	.L2
.L27:
	ldr	r3, .L28+96
	ldr	r2, .L28+132
	mov	r0, r6
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, #1
	bl	REG_SET_FIELD
	mov	r6, r0
	b	.L8
.L26:
	ldr	r3, .L28+96
	ldr	r2, .L28+100
	mov	r0, r6
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, #1
	bl	REG_SET_FIELD
	mov	r6, r0
	b	.L7
.L25:
	ldr	r3, .L28+136
	mov	r0, r7
	ldr	r1, [r8]
	ldr	r2, [r3]
	bl	REG_GET_FIELD
	cmp	r0, #0
	bne	.L6
	b	.L5
.L29:
	.align	2
.L28:
	.word	mmGRBM_STATUS
	.word	GRBM_STATUS__PA_BUSY_MASK
	.word	GRBM_STATUS__SC_BUSY_MASK
	.word	GRBM_STATUS__BCI_BUSY_MASK
	.word	GRBM_STATUS__SX_BUSY_MASK
	.word	GRBM_STATUS__TA_BUSY_MASK
	.word	GRBM_STATUS__VGT_BUSY_MASK
	.word	GRBM_STATUS__DB_BUSY_MASK
	.word	GRBM_STATUS__CB_BUSY_MASK
	.word	GRBM_STATUS__GDS_BUSY_MASK
	.word	GRBM_STATUS__SPI_BUSY_MASK
	.word	GRBM_STATUS__IA_BUSY_MASK
	.word	GRBM_STATUS__IA_BUSY_NO_DMA_MASK
	.word	GRBM_STATUS__CP_BUSY_MASK
	.word	GRBM_STATUS__CP_COHERENCY_BUSY_MASK
	.word	mmGRBM_STATUS2
	.word	GRBM_STATUS2
	.word	RLC_BUSY
	.word	CPF_BUSY
	.word	CPC_BUSY
	.word	GRBM_SOFT_RESET
	.word	SOFT_RESET_CPF
	.word	SOFT_RESET_CPC
	.word	SOFT_RESET_CPG
	.word	SRBM_SOFT_RESET
	.word	SOFT_RESET_GRBM
	.word	mmSRBM_STATUS
	.word	SRBM_STATUS
	.word	GRBM_RQ_PENDING
	.word	SEM_BUSY
	.word	SOFT_RESET_RLC
	.word	SOFT_RESET_CP
	.word	SOFT_RESET_GFX
	.word	SOFT_RESET_SEM
	.word	CPG_BUSY
	.size	gfx_v8_0_check_soft_reset, .-gfx_v8_0_check_soft_reset
	.comm	mmSRBM_STATUS,4,4
	.comm	mmGRBM_STATUS2,4,4
	.comm	mmGRBM_STATUS,4,4
	.comm	SRBM_STATUS,4,4
	.comm	SRBM_SOFT_RESET,4,4
	.comm	SOFT_RESET_SEM,4,4
	.comm	SOFT_RESET_RLC,4,4
	.comm	SOFT_RESET_GRBM,4,4
	.comm	SOFT_RESET_GFX,4,4
	.comm	SOFT_RESET_CPG,4,4
	.comm	SOFT_RESET_CPF,4,4
	.comm	SOFT_RESET_CPC,4,4
	.comm	SOFT_RESET_CP,4,4
	.comm	SEM_BUSY,4,4
	.comm	RLC_BUSY,4,4
	.comm	GRBM_STATUS__VGT_BUSY_MASK,4,4
	.comm	GRBM_STATUS__TA_BUSY_MASK,4,4
	.comm	GRBM_STATUS__SX_BUSY_MASK,4,4
	.comm	GRBM_STATUS__SPI_BUSY_MASK,4,4
	.comm	GRBM_STATUS__SC_BUSY_MASK,4,4
	.comm	GRBM_STATUS__PA_BUSY_MASK,4,4
	.comm	GRBM_STATUS__IA_BUSY_NO_DMA_MASK,4,4
	.comm	GRBM_STATUS__IA_BUSY_MASK,4,4
	.comm	GRBM_STATUS__GDS_BUSY_MASK,4,4
	.comm	GRBM_STATUS__DB_BUSY_MASK,4,4
	.comm	GRBM_STATUS__CP_COHERENCY_BUSY_MASK,4,4
	.comm	GRBM_STATUS__CP_BUSY_MASK,4,4
	.comm	GRBM_STATUS__CB_BUSY_MASK,4,4
	.comm	GRBM_STATUS__BCI_BUSY_MASK,4,4
	.comm	GRBM_STATUS2,4,4
	.comm	GRBM_SOFT_RESET,4,4
	.comm	GRBM_RQ_PENDING,4,4
	.comm	CPG_BUSY,4,4
	.comm	CPF_BUSY,4,4
	.comm	CPC_BUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
