	.file	"extr_qla_nx2.c_qla8044_start_pex_dma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	qla8044_start_pex_dma, @function
qla8044_start_pex_dma:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rdx, QWORD PTR ISP8044_PEX_DMA_ENGINE_INDEX[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	mov	DWORD PTR 4[rsp], 0
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	ebx, DWORD PTR [rax+rdx*4]
	imul	ebx, DWORD PTR ISP8044_PEX_DMA_NUM_OFFSET[rip]
	mov	edx, DWORD PTR 4[rsi]
	mov	rsi, QWORD PTR ISP8044_PEX_DMA_CMD_ADDR_LOW[rip]
	movsx	rbx, ebx
	add	rbx, QWORD PTR ISP8044_PEX_DMA_BASE_ADDRESS[rip]
	add	rsi, rbx
	call	qla8044_wr_reg_indirect@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L12
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L12:
	.cfi_restore_state
	mov	rsi, QWORD PTR ISP8044_PEX_DMA_CMD_ADDR_HIGH[rip]
	xor	edx, edx
	mov	rdi, rbp
	add	rsi, rbx
	call	qla8044_wr_reg_indirect@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rsi, QWORD PTR ISP8044_PEX_DMA_CMD_STS_AND_CNTRL[rip]
	mov	edx, DWORD PTR 0[r13]
	mov	rdi, rbp
	add	rsi, rbx
	call	qla8044_wr_reg_indirect@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR ISP8044_PEX_DMA_MAX_WAIT[rip]
	test	eax, eax
	jle	.L6
	lea	r13, 4[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR 4[rsp]
	test	DWORD PTR BIT_1[rip], eax
	je	.L4
	mov	edi, 10
	add	r12d, 1
	call	udelay@PLT
	cmp	DWORD PTR ISP8044_PEX_DMA_MAX_WAIT[rip], r12d
	jle	.L6
.L5:
	mov	rsi, QWORD PTR ISP8044_PEX_DMA_CMD_STS_AND_CNTRL[rip]
	mov	rdx, r13
	mov	rdi, rbp
	add	rsi, rbx
	call	qla8044_rd_reg_indirect@PLT
	test	eax, eax
	je	.L14
.L2:
	endbr64
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	DWORD PTR ISP8044_PEX_DMA_MAX_WAIT[rip], r12d
	jle	.L6
	xor	r12d, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r12d, DWORD PTR QLA_FUNCTION_FAILED[rip]
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	qla8044_start_pex_dma, .-qla8044_start_pex_dma
	.comm	QLA_SUCCESS,4,4
	.comm	QLA_FUNCTION_FAILED,4,4
	.comm	ISP8044_PEX_DMA_NUM_OFFSET,4,4
	.comm	ISP8044_PEX_DMA_MAX_WAIT,4,4
	.comm	ISP8044_PEX_DMA_ENGINE_INDEX,8,8
	.comm	ISP8044_PEX_DMA_CMD_STS_AND_CNTRL,8,8
	.comm	ISP8044_PEX_DMA_CMD_ADDR_LOW,8,8
	.comm	ISP8044_PEX_DMA_CMD_ADDR_HIGH,8,8
	.comm	ISP8044_PEX_DMA_BASE_ADDRESS,8,8
	.comm	BIT_1,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_qla_nx2.c_qla8044_start_pex_dma.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qla8044_start_pex_dma, %function
qla8044_start_pex_dma:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r8, r1
	ldr	r2, [r0]
	ldr	r1, .L15
	ldr	r2, [r2]
	sub	sp, sp, #12
	ldr	ip, [r1]
	ldr	r1, [r2]
	str	r3, [sp]
	ldr	r2, .L15+4
	ldr	r3, .L15+8
	ldr	r5, [r1, ip, lsl #2]
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L15+12
	mla	r5, r1, r5, r2
	ldr	r1, [r3]
	ldr	r3, .L15+16
	ldr	r2, [r8, #4]
	add	r1, r5, r1
	mov	r6, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	qla8044_wr_reg_indirect
	subs	r4, r0, #0
	beq	.L12
.L1:
	ldr	r3, .L15+16
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L12:
	ldr	r3, .L15+20
	mov	r2, r4
	ldr	r1, [r3]
	mov	r0, r6
	add	r1, r5, r1
	bl	qla8044_wr_reg_indirect
	subs	r4, r0, #0
	bne	.L1
	ldr	r7, .L15+24
	mov	r0, r6
	ldr	r1, [r7]
	ldr	r2, [r8]
	add	r1, r5, r1
	bl	qla8044_wr_reg_indirect
	subs	r4, r0, #0
	bne	.L1
	ldr	r8, .L15+28
	ldr	r3, [r8]
	cmp	r3, #0
	ble	.L6
	ldr	r9, .L15+32
	b	.L5
.L14:
	ldr	r3, [sp]
	ldr	r2, [r9]
	ands	r3, r3, r2
	beq	.L4
	mov	r0, #10
	bl	udelay
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L6
.L5:
	ldr	r1, [r7]
	mov	r2, sp
	mov	r0, r6
	add	r1, r5, r1
	bl	qla8044_rd_reg_indirect
	cmp	r0, #0
	beq	.L14
.L2:
	mov	r4, r0
	b	.L1
.L4:
	ldr	r2, [r8]
	cmp	r2, r4
	movgt	r4, r3
	bgt	.L1
.L6:
	ldr	r3, .L15+36
	ldr	r4, [r3]
	b	.L1
.L13:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	ISP8044_PEX_DMA_ENGINE_INDEX
	.word	ISP8044_PEX_DMA_NUM_OFFSET
	.word	ISP8044_PEX_DMA_BASE_ADDRESS
	.word	ISP8044_PEX_DMA_CMD_ADDR_LOW
	.word	.LC0
	.word	ISP8044_PEX_DMA_CMD_ADDR_HIGH
	.word	ISP8044_PEX_DMA_CMD_STS_AND_CNTRL
	.word	ISP8044_PEX_DMA_MAX_WAIT
	.word	BIT_1
	.word	QLA_FUNCTION_FAILED
	.size	qla8044_start_pex_dma, .-qla8044_start_pex_dma
	.comm	QLA_SUCCESS,4,4
	.comm	QLA_FUNCTION_FAILED,4,4
	.comm	ISP8044_PEX_DMA_NUM_OFFSET,4,4
	.comm	ISP8044_PEX_DMA_MAX_WAIT,4,4
	.comm	ISP8044_PEX_DMA_ENGINE_INDEX,4,4
	.comm	ISP8044_PEX_DMA_CMD_STS_AND_CNTRL,4,4
	.comm	ISP8044_PEX_DMA_CMD_ADDR_LOW,4,4
	.comm	ISP8044_PEX_DMA_CMD_ADDR_HIGH,4,4
	.comm	ISP8044_PEX_DMA_BASE_ADDRESS,4,4
	.comm	BIT_1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
