	.file	"extr_qlge_main.c_ql_alloc_mem_resources.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"RX resource allocation failed.\n"
	.align 8
.LC1:
	.string	"TX resource allocation failed.\n"
	.text
	.p2align 4
	.type	ql_alloc_mem_resources, @function
ql_alloc_mem_resources:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	ql_alloc_shadow_space@PLT
	test	rax, rax
	jne	.L18
	mov	edx, DWORD PTR 0[rbp]
	xor	ebx, ebx
	test	edx, edx
	jg	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L4
.L3:
	mov	rax, QWORD PTR 24[rbp]
	mov	rdi, rbp
	lea	rsi, [rax+rbx*4]
	call	ql_alloc_rx_resources@PLT
	test	rax, rax
	je	.L6
	mov	edx, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR ifup[rip]
	lea	rcx, .LC0[rip]
	mov	rdi, rbp
	call	netif_err@PLT
.L7:
	mov	rdi, rbp
	call	ql_free_mem_resources@PLT
.L18:
	mov	eax, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	eax, DWORD PTR 4[rbp]
	xor	ebx, ebx
	test	eax, eax
	jg	.L8
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	add	rbx, 1
	cmp	DWORD PTR 4[rbp], ebx
	jle	.L10
.L8:
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	lea	rsi, [rax+rbx*4]
	call	ql_alloc_tx_resources@PLT
	test	rax, rax
	je	.L9
	mov	edx, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR ifup[rip]
	lea	rcx, .LC1[rip]
	mov	rdi, rbp
	call	netif_err@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ql_alloc_mem_resources, .-ql_alloc_mem_resources
	.comm	ifup,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_qlge_main.c_ql_alloc_mem_resources.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"RX resource allocation failed.\012\000"
	.align	2
.LC1:
	.ascii	"TX resource allocation failed.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ql_alloc_mem_resources, %function
ql_alloc_mem_resources:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	ql_alloc_shadow_space
	subs	r6, r0, #0
	bne	.L16
	ldr	r3, [r4]
	cmp	r3, #0
	movgt	r5, r6
	bgt	.L3
	b	.L4
.L6:
	ldr	r3, [r4]
	cmp	r3, r5
	ble	.L4
.L3:
	ldr	r1, [r4, #16]
	mov	r0, r4
	add	r1, r1, r5, lsl #2
	bl	ql_alloc_rx_resources
	cmp	r0, #0
	add	r5, r5, #1
	beq	.L6
	ldr	r2, .L18
	mov	r0, r4
	ldr	r1, [r2]
	ldr	r3, .L18+4
	ldr	r2, [r4, #8]
	bl	netif_err
.L7:
	mov	r0, r4
	bl	ql_free_mem_resources
.L16:
	ldr	r3, .L18+8
	ldr	r6, [r3]
	rsb	r6, r6, #0
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, pc}
.L4:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	ble	.L1
	mov	r5, #0
	b	.L8
.L9:
	ldr	r3, [r4, #4]
	cmp	r3, r5
	ble	.L1
.L8:
	ldr	r1, [r4, #12]
	mov	r0, r4
	add	r1, r1, r5, lsl #2
	bl	ql_alloc_tx_resources
	cmp	r0, #0
	add	r5, r5, #1
	beq	.L9
	ldr	r2, .L18
	mov	r0, r4
	ldr	r1, [r2]
	ldr	r3, .L18+12
	ldr	r2, [r4, #8]
	bl	netif_err
	b	.L7
.L19:
	.align	2
.L18:
	.word	ifup
	.word	.LC0
	.word	ENOMEM
	.word	.LC1
	.size	ql_alloc_mem_resources, .-ql_alloc_mem_resources
	.comm	ifup,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
