	.file	"extr_a6xx_gpu_state.c_a6xx_get_shader_block.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	a6xx_get_shader_block, @function
a6xx_get_shader_block:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	xor	edi, edi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, r8
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r12d, DWORD PTR [rdx]
	imul	r12d, DWORD PTR A6XX_NUM_SHADER_BANKS[rip]
	mov	QWORD PTR [rsp], rsi
	mov	r15, QWORD PTR 8[r8]
	mov	QWORD PTR 8[rsp], rcx
	movsx	r12, r12d
	sal	r12, 2
	cmp	QWORD PTR A6XX_CD_DATA_SIZE[rip], r12
	setb	dil
	call	WARN_ON@PLT
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR A6XX_NUM_SHADER_BANKS[rip]
	test	eax, eax
	jle	.L4
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR REG_A6XX_HLSQ_DBG_READ_SEL[rip]
	mov	rdi, r15
	sal	edx, 8
	or	edx, r14d
	add	r14d, 1
	call	CRASHDUMP_WRITE@PLT
	mov	edx, DWORD PTR [rbx]
	mov	esi, DWORD PTR REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE[rip]
	lea	r15, [r15+rax*4]
	mov	ecx, DWORD PTR A6XX_CD_DATA_OFFSET[rip]
	add	ecx, DWORD PTR 0[rbp]
	mov	rdi, r15
	call	CRASHDUMP_READ@PLT
	cmp	DWORD PTR A6XX_NUM_SHADER_BANKS[rip], r14d
	lea	r15, [r15+rax*4]
	jg	.L5
.L4:
	mov	rdi, r15
	call	CRASHDUMP_FINI@PLT
	mov	rsi, rbp
	mov	rdi, r13
	call	a6xx_crashdumper_run@PLT
	test	rax, rax
	je	.L10
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L10:
	.cfi_restore_state
	mov	r14, QWORD PTR 8[rsp]
	movsx	rdx, DWORD PTR A6XX_CD_DATA_OFFSET[rip]
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [rsp]
	mov	QWORD PTR 8[r14], rbx
	lea	rsi, [rax+rdx*4]
	mov	rdx, r12
	call	state_kmemdup@PLT
	mov	DWORD PTR [r14], eax
	add	rsp, 24
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE0:
	.size	a6xx_get_shader_block, .-a6xx_get_shader_block
	.comm	REG_A6XX_HLSQ_DBG_READ_SEL,4,4
	.comm	REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,4,4
	.comm	A6XX_NUM_SHADER_BANKS,4,4
	.comm	A6XX_CD_DATA_SIZE,8,8
	.comm	A6XX_CD_DATA_OFFSET,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_a6xx_gpu_state.c_a6xx_get_shader_block.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	a6xx_get_shader_block, %function
a6xx_get_shader_block:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, r0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r8, .L11
	mov	r6, r2
	ldr	lr, [r8]
	ldr	r2, [r2]
	ldr	r0, .L11+4
	mul	r2, lr, r2
	ldr	r0, [r0]
	sub	sp, sp, #20
	cmp	r0, r2, lsl #2
	ldr	r7, [sp, #56]
	movcc	r0, #1
	movcs	r0, #0
	str	r3, [sp, #12]
	lsl	r3, r2, #2
	ldr	r4, [r7, #4]
	str	ip, [sp]
	str	r1, [sp, #8]
	str	r3, [sp, #4]
	bl	WARN_ON
	subs	r5, r0, #0
	bne	.L1
	ldr	r3, [r8]
	cmp	r3, #0
	ble	.L4
	ldr	fp, .L11+8
	ldr	r10, .L11+12
	ldr	r9, .L11+16
.L5:
	ldr	r2, [r6, #4]
	mov	r0, r4
	orr	r2, r5, r2, lsl #8
	ldr	r1, [fp]
	bl	CRASHDUMP_WRITE
	ldr	r2, [r7]
	ldr	r3, [r10]
	add	r4, r4, r0, lsl #2
	add	r3, r2, r3
	mov	r0, r4
	ldr	r2, [r6]
	ldr	r1, [r9]
	bl	CRASHDUMP_READ
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	add	r4, r4, r0, lsl #2
	bgt	.L5
.L4:
	mov	r0, r4
	bl	CRASHDUMP_FINI
	mov	r1, r7
	ldr	r0, [sp]
	bl	a6xx_crashdumper_run
	cmp	r0, #0
	beq	.L10
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	ldr	r2, .L11+12
	ldr	r3, [r7, #4]
	ldr	r4, [sp, #12]
	ldr	r1, [r2]
	ldr	r0, [sp, #8]
	ldr	r2, [sp, #4]
	str	r6, [r4, #4]
	add	r1, r3, r1, lsl #2
	bl	state_kmemdup
	str	r0, [r4]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	.align	2
.L11:
	.word	A6XX_NUM_SHADER_BANKS
	.word	A6XX_CD_DATA_SIZE
	.word	REG_A6XX_HLSQ_DBG_READ_SEL
	.word	A6XX_CD_DATA_OFFSET
	.word	REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE
	.size	a6xx_get_shader_block, .-a6xx_get_shader_block
	.comm	REG_A6XX_HLSQ_DBG_READ_SEL,4,4
	.comm	REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,4,4
	.comm	A6XX_NUM_SHADER_BANKS,4,4
	.comm	A6XX_CD_DATA_SIZE,4,4
	.comm	A6XX_CD_DATA_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
