	.file	"extr_qlcnic_ctx.c_qlcnic_alloc_hw_resources.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to allocate tx consumer\n"
	.align 8
.LC1:
	.string	"failed to allocate tx desc ring\n"
	.align 8
.LC2:
	.string	"failed to allocate rds ring [%d]\n"
	.align 8
.LC3:
	.string	"failed to allocate sds ring [%d]\n"
	.text
	.p2align 4
	.globl	qlcnic_alloc_hw_resources
	.type	qlcnic_alloc_hw_resources, @function
qlcnic_alloc_hw_resources:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	ecx, DWORD PTR [rdi]
	mov	r13, QWORD PTR 16[rdi]
	mov	r14, QWORD PTR 32[rdi]
	test	ecx, ecx
	jg	.L9
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L5:
	mov	QWORD PTR 16[rbx], rax
	mov	r15d, DWORD PTR GFP_KERNEL[rip]
	mov	rdi, rbx
	call	TX_DESC_RINGSIZE@PLT
	lea	rdx, 8[rbx]
	mov	ecx, r15d
	mov	rdi, r13
	mov	esi, eax
	call	dma_alloc_coherent@PLT
	test	rax, rax
	je	.L26
	mov	QWORD PTR [rbx], rax
	add	rbp, 1
	cmp	DWORD PTR [r12], ebp
	jle	.L10
.L9:
	mov	rbx, rbp
	mov	ecx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 4
	mov	rdi, r13
	sal	rbx, 5
	add	rbx, QWORD PTR 24[r12]
	lea	rdx, 24[rbx]
	call	dma_alloc_coherent@PLT
	test	rax, rax
	jne	.L5
	mov	rdi, r13
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r13d, DWORD PTR ENOMEM[rip]
	neg	r13d
.L1:
	add	rsp, 8
	.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
.L10:
	.cfi_restore_state
	mov	edx, DWORD PTR 4[r12]
	xor	ebp, ebp
	test	edx, edx
	jg	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	mov	QWORD PTR [rbx], rax
	add	rbp, 1
	cmp	DWORD PTR 4[r12], ebp
	jle	.L4
.L3:
	mov	rbx, rbp
	mov	r15d, DWORD PTR GFP_KERNEL[rip]
	sal	rbx, 4
	add	rbx, QWORD PTR 8[r14]
	mov	rdi, rbx
	call	RCV_DESC_RINGSIZE@PLT
	mov	rdi, QWORD PTR 16[r12]
	lea	rdx, 8[rbx]
	mov	ecx, r15d
	mov	esi, eax
	call	dma_alloc_coherent@PLT
	test	rax, rax
	jne	.L13
	mov	rdi, r13
	mov	edx, ebp
	lea	rsi, .LC2[rip]
	call	dev_err@PLT
	mov	r13d, DWORD PTR ENOMEM[rip]
	neg	r13d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r13
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	r13d, DWORD PTR ENOMEM[rip]
	neg	r13d
.L8:
	mov	rdi, r12
	call	qlcnic_free_hw_resources@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR 8[r12]
	xor	ebp, ebp
	test	eax, eax
	jg	.L11
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L14:
	mov	QWORD PTR [rbx], rax
	add	rbp, 1
	cmp	DWORD PTR 8[r12], ebp
	jle	.L12
.L11:
	mov	rbx, rbp
	mov	r15d, DWORD PTR GFP_KERNEL[rip]
	sal	rbx, 4
	add	rbx, QWORD PTR [r14]
	mov	rdi, rbx
	call	STATUS_DESC_RINGSIZE@PLT
	mov	rdi, QWORD PTR 16[r12]
	lea	rdx, 8[rbx]
	mov	ecx, r15d
	mov	esi, eax
	call	dma_alloc_coherent@PLT
	test	rax, rax
	jne	.L14
	mov	rdi, r13
	mov	edx, ebp
	lea	rsi, .LC3[rip]
	call	dev_err@PLT
	mov	r13d, DWORD PTR ENOMEM[rip]
	neg	r13d
	jmp	.L8
.L12:
	xor	r13d, r13d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	qlcnic_alloc_hw_resources, .-qlcnic_alloc_hw_resources
	.comm	GFP_KERNEL,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_qlcnic_ctx.c_qlcnic_alloc_hw_resources.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to allocate tx consumer\012\000"
	.align	2
.LC1:
	.ascii	"failed to allocate tx desc ring\012\000"
	.align	2
.LC2:
	.ascii	"failed to allocate rds ring [%d]\012\000"
	.align	2
.LC3:
	.ascii	"failed to allocate sds ring [%d]\012\000"
	.text
	.align	2
	.global	qlcnic_alloc_hw_resources
	.syntax unified
	.arm
	.fpu softvfp
	.type	qlcnic_alloc_hw_resources, %function
qlcnic_alloc_hw_resources:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	mov	r6, r0
	cmp	r3, #0
	movgt	r4, #0
	ldr	r9, [r0, #12]
	ldr	r10, [r0, #20]
	ldrgt	r8, .L23
	bgt	.L9
	b	.L10
.L5:
	str	r0, [r5, #8]
	mov	r0, r5
	bl	TX_DESC_RINGSIZE
	ldr	r3, [r8]
	mov	r1, r0
	add	r2, r5, #4
	mov	r0, r9
	bl	dma_alloc_coherent
	cmp	r0, #0
	beq	.L22
	ldr	r3, [r6]
	str	r0, [r7, fp]
	cmp	r3, r4
	ble	.L10
.L9:
	ldr	r7, [r6, #16]
	mov	r1, #4
	add	r5, r7, r4, lsl #4
	mov	r0, r9
	ldr	r3, [r8]
	add	r2, r5, #12
	bl	dma_alloc_coherent
	cmp	r0, #0
	lsl	fp, r4, #4
	add	r4, r4, #1
	bne	.L5
	mov	r0, r9
	ldr	r1, .L23+4
	bl	dev_err
	ldr	r3, .L23+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	ldr	r3, [r6, #4]
	cmp	r3, #0
	movgt	r4, #0
	ldrgt	r8, .L23
	bgt	.L3
	b	.L4
.L13:
	ldr	r3, [r6, #4]
	str	r0, [r5, r4, lsl #3]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L4
.L3:
	ldr	r5, [r10, #4]
	ldr	fp, [r6, #12]
	add	r7, r5, r4, lsl #3
	mov	r0, r7
	bl	RCV_DESC_RINGSIZE
	ldr	r3, [r8]
	mov	r1, r0
	add	r2, r7, #4
	mov	r0, fp
	bl	dma_alloc_coherent
	cmp	r0, #0
	bne	.L13
	mov	r2, r4
	mov	r0, r9
	ldr	r1, .L23+12
	bl	dev_err
	ldr	r3, .L23+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L8
.L22:
	mov	r0, r9
	ldr	r1, .L23+16
	bl	dev_err
	ldr	r3, .L23+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L8:
	mov	r0, r6
	bl	qlcnic_free_hw_resources
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, [r6, #8]
	cmp	r3, #0
	movgt	r4, #0
	ldrgt	r8, .L23
	bgt	.L11
	b	.L12
.L14:
	ldr	r3, [r6, #8]
	str	r0, [r5, r4, lsl #3]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L12
.L11:
	ldr	r5, [r10]
	ldr	fp, [r6, #12]
	add	r7, r5, r4, lsl #3
	mov	r0, r7
	bl	STATUS_DESC_RINGSIZE
	ldr	r3, [r8]
	mov	r1, r0
	add	r2, r7, #4
	mov	r0, fp
	bl	dma_alloc_coherent
	cmp	r0, #0
	bne	.L14
	mov	r2, r4
	mov	r0, r9
	ldr	r1, .L23+20
	bl	dev_err
	ldr	r3, .L23+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L8
.L12:
	mov	r4, #0
	b	.L1
.L24:
	.align	2
.L23:
	.word	GFP_KERNEL
	.word	.LC0
	.word	ENOMEM
	.word	.LC2
	.word	.LC1
	.word	.LC3
	.size	qlcnic_alloc_hw_resources, .-qlcnic_alloc_hw_resources
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
