	.file	"extr_amdgpu_amdkfd_gfx_v10.c_kgd_hqd_dump.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	kgd_hqd_dump, @function
kgd_hqd_dump:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	get_amdgpu_device@PLT
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 896
	call	kmalloc@PLT
	mov	QWORD PTR [r12], rax
	test	rax, rax
	je	.L9
	mov	rsi, rbp
	mov	rdx, r15
	mov	rdi, r13
	xor	ebp, ebp
	call	acquire_queue@PLT
	mov	edx, DWORD PTR mmCP_MQD_BASE_ADDR[rip]
	mov	edi, DWORD PTR GC[rip]
	xor	esi, esi
	call	SOC15_REG_OFFSET@PLT
	mov	rbx, rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	add	rbx, 1
.L4:
	mov	edx, DWORD PTR mmCP_HQD_PQ_WPTR_HI[rip]
	mov	edi, DWORD PTR GC[rip]
	xor	esi, esi
	call	SOC15_REG_OFFSET@PLT
	cmp	rax, rbx
	jl	.L10
	xor	edi, edi
	cmp	rbp, 55
	setg	dil
	call	WARN_ON_ONCE@PLT
	test	eax, eax
	jne	.L5
	mov	rax, QWORD PTR [r12]
	mov	r15, rbp
	mov	rdi, rbx
	add	rbp, 1
	lea	rdx, 0[0+rbx*4]
	sal	r15, 4
	mov	QWORD PTR [rax+r15], rdx
	xor	eax, eax
	call	RREG32@PLT
	mov	rdx, QWORD PTR [r12]
	cdqe
	mov	QWORD PTR 8[rdx+r15], rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, r13
	call	release_queue@PLT
	xor	edi, edi
	cmp	rbp, 56
	setne	dil
	call	WARN_ON_ONCE@PLT
	mov	QWORD PTR [r14], rbp
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	kgd_hqd_dump, .-kgd_hqd_dump
	.comm	mmCP_MQD_BASE_ADDR,4,4
	.comm	mmCP_HQD_PQ_WPTR_HI,4,4
	.comm	HQD_N_REGS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GC,4,4
	.comm	ENOMEM,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_amdgpu_amdkfd_gfx_v10.c_kgd_hqd_dump.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kgd_hqd_dump, %function
kgd_hqd_dump:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r3
	mov	r4, r1
	mov	r5, r2
	mov	r9, r0
	bl	get_amdgpu_device
	ldr	r3, .L11
	mov	r0, #448
	ldr	r1, [r3]
	bl	kmalloc
	cmp	r0, #0
	str	r0, [r8]
	beq	.L9
	mov	r2, r5
	mov	r1, r4
	mov	r0, r9
	bl	acquire_queue
	ldr	r6, .L11+4
	ldr	r3, .L11+8
	mov	r1, #0
	ldr	r0, [r6]
	ldr	r2, [r3]
	bl	SOC15_REG_OFFSET
	mov	r5, #0
	mov	r4, r0
	ldr	r7, .L11+12
	b	.L4
.L5:
	add	r4, r4, #1
.L4:
	mov	r1, #0
	ldr	r2, [r7]
	ldr	r0, [r6]
	bl	SOC15_REG_OFFSET
	cmp	r0, r4
	blt	.L10
	cmp	r5, #55
	movle	r0, #0
	movgt	r0, #1
	bl	WARN_ON_ONCE
	cmp	r0, #0
	bne	.L5
	ldr	r3, [r8]
	lsl	r2, r4, #2
	str	r2, [r3, r5, lsl #3]
	mov	r0, r4
	add	r10, r3, r5, lsl #3
	bl	RREG32
	add	r5, r5, #1
	str	r0, [r10, #4]
	b	.L5
.L10:
	mov	r0, r9
	bl	release_queue
	subs	r0, r5, #56
	movne	r0, #1
	bl	WARN_ON_ONCE
	ldr	r3, [sp, #32]
	mov	r0, #0
	str	r5, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	ldr	r3, .L11+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	.align	2
.L11:
	.word	GFP_KERNEL
	.word	GC
	.word	mmCP_MQD_BASE_ADDR
	.word	mmCP_HQD_PQ_WPTR_HI
	.word	ENOMEM
	.size	kgd_hqd_dump, .-kgd_hqd_dump
	.comm	mmCP_MQD_BASE_ADDR,4,4
	.comm	mmCP_HQD_PQ_WPTR_HI,4,4
	.comm	HQD_N_REGS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GC,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
