	.file	"extr_qlnx_ioctl.c_qlnx_grc_dump.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ecore_ptt_acquire failed\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"ecore_dbg_grc_dump failed [%d, 0x%x]\n"
	.text
	.p2align 4
	.globl	qlnx_grc_dump
	.type	qlnx_grc_dump, @function
qlnx_grc_dump:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movsx	rbx, edx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 32[rdi]
	mov	rax, QWORD PTR [rax+rbx*8]
	test	rax, rax
	je	.L2
	mov	QWORD PTR [rsi], rax
	xor	r13d, r13d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L2:
	.cfi_restore_state
	xor	eax, eax
	mov	rbp, rdi
	mov	DWORD PTR 12[rsp], ebx
	mov	r13d, DWORD PTR EINVAL[rip]
	call	ecore_dbg_get_fw_func_ver@PLT
	mov	edi, eax
	call	ecore_dbg_set_app_ver@PLT
	mov	rax, QWORD PTR 24[rbp]
	lea	r12, [rax+rbx*4]
	mov	rdi, r12
	call	ecore_ptt_acquire@PLT
	mov	r9d, DWORD PTR 12[rsp]
	test	rax, rax
	mov	r14, rax
	je	.L9
	mov	rax, QWORD PTR 0[rbp]
	mov	r8, r15
	mov	rsi, r14
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], r9d
	mov	ecx, DWORD PTR [rax+rbx*4]
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR [rax+rbx*4]
	sar	ecx, 2
	call	ecore_dbg_grc_dump@PLT
	cmp	DWORD PTR DBG_STATUS_OK[rip], eax
	mov	r9d, DWORD PTR 12[rsp]
	mov	r13d, eax
	jne	.L5
	mov	DWORD PTR 8[rbp], 1
	xor	r13d, r13d
.L6:
	mov	rsi, r14
	mov	rdi, r12
	call	ecore_ptt_release@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ecx, eax
	mov	edx, r9d
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	QL_DPRINT1@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	QL_DPRINT1@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	qlnx_grc_dump, .-qlnx_grc_dump
	.comm	EINVAL,4,4
	.comm	DBG_STATUS_OK,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_qlnx_ioctl.c_qlnx_grc_dump.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ecore_ptt_acquire failed\012\000"
	.align	2
.LC1:
	.ascii	"ecore_dbg_grc_dump failed [%d, 0x%x]\012\000"
	.text
	.align	2
	.global	qlnx_grc_dump
	.syntax unified
	.arm
	.fpu softvfp
	.type	qlnx_grc_dump, %function
qlnx_grc_dump:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, [r0, #16]
	mov	r7, r1
	ldr	r6, [r3, r2, lsl #2]
	sub	sp, sp, #8
	cmp	r6, #0
	strne	r6, [r1]
	movne	r6, #0
	beq	.L9
.L1:
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	mov	r5, r0
	ldr	r3, .L11
	lsl	r8, r2, #2
	mov	r4, r2
	ldr	r10, [r3]
	bl	ecore_dbg_get_fw_func_ver
	bl	ecore_dbg_set_app_ver
	ldr	r3, [r5, #12]
	add	r8, r3, r8
	mov	r0, r8
	bl	ecore_ptt_acquire
	subs	r9, r0, #0
	beq	.L10
	ldr	r3, [r5]
	ldr	r2, [r5, #8]
	ldr	r3, [r3, r4, lsl #2]
	ldr	r2, [r2, r4, lsl #2]
	asr	r3, r3, #2
	mov	r1, r9
	mov	r0, r8
	str	r7, [sp]
	bl	ecore_dbg_grc_dump
	ldr	r2, .L11+4
	mov	r3, r0
	ldr	r2, [r2]
	cmp	r2, r0
	moveq	r3, #1
	streq	r3, [r5, #4]
	beq	.L6
	mov	r2, r4
	mov	r0, r5
	ldr	r1, .L11+8
	mov	r6, r3
	bl	QL_DPRINT1
.L6:
	mov	r1, r9
	mov	r0, r8
	bl	ecore_ptt_release
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r0, r5
	ldr	r1, .L11+12
	mov	r6, r10
	bl	QL_DPRINT1
	b	.L1
.L12:
	.align	2
.L11:
	.word	EINVAL
	.word	DBG_STATUS_OK
	.word	.LC1
	.word	.LC0
	.size	qlnx_grc_dump, .-qlnx_grc_dump
	.comm	EINVAL,4,4
	.comm	DBG_STATUS_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
