	.file	"extr_en_rx.c_mlx4_en_create_rx_ring.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed allocating rx_info ring\n"
	.align 8
.LC1:
	.string	"Allocated rx_info ring at addr:%p size:%d\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Failed to map RX buffer\n"
	.text
	.p2align 4
	.globl	mlx4_en_create_rx_ring
	.type	mlx4_en_create_rx_ring, @function
mlx4_en_create_rx_ring:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	lea	eax, -1[rdx]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	mov	edi, ecx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, QWORD PTR 8[r13]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	mov	DWORD PTR 8[rsi], ecx
	mov	QWORD PTR 64[rsi], 0
	mov	QWORD PTR 56[rsi], 0
	mov	DWORD PTR [rsi], edx
	mov	DWORD PTR 4[rsi], eax
	call	ffs@PLT
	mov	ecx, DWORD PTR [rbx]
	imul	ecx, DWORD PTR 8[rbx]
	sub	rax, 1
	mov	QWORD PTR 48[rbx], rax
	mov	eax, DWORD PTR MLX4_EN_MAX_RX_FRAGS[rip]
	movsx	rcx, ecx
	add	rcx, QWORD PTR TXBB_SIZE[rip]
	mov	QWORD PTR 24[rbx], rcx
	lea	edi, 0[0+rax*4]
	call	roundup_pow_of_two@PLT
	imul	r12d, eax
	mov	edi, r12d
	call	vmalloc@PLT
	mov	QWORD PTR 16[rbx], rax
	test	rax, rax
	je	.L8
	mov	edi, DWORD PTR DRV[rip]
	mov	r8d, r12d
	mov	rcx, rax
	mov	rsi, r13
	lea	rdx, .LC1[rip]
	lea	r14, 32[rbx]
	call	en_dbg@PLT
	mov	rdx, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r14
	mov	eax, DWORD PTR PAGE_SIZE[rip]
	lea	ecx, [rax+rax]
	call	mlx4_alloc_hwq_res@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L9
.L4:
	mov	rdi, QWORD PTR 16[rbx]
	call	vfree@PLT
	mov	eax, r12d
	mov	QWORD PTR 16[rbx], 0
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, r14
	call	mlx4_en_map_buffer@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L10
	mov	eax, DWORD PTR 32[rbx]
	mov	DWORD PTR 40[rbx], eax
	mov	eax, DWORD PTR 0[r13]
	mov	DWORD PTR 36[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rdi, r13
	lea	rsi, .LC0[rip]
	call	en_err@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, r13
	lea	rsi, .LC2[rip]
	call	en_err@PLT
	mov	rdx, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR 0[rbp]
	mov	rsi, r14
	call	mlx4_free_hwq_res@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	mlx4_en_create_rx_ring, .-mlx4_en_create_rx_ring
	.comm	TXBB_SIZE,8,8
	.comm	PAGE_SIZE,4,4
	.comm	MLX4_EN_MAX_RX_FRAGS,4,4
	.comm	ENOMEM,4,4
	.comm	DRV,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_en_rx.c_mlx4_en_create_rx_ring.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed allocating rx_info ring\012\000"
	.align	2
.LC1:
	.ascii	"Allocated rx_info ring at addr:%p size:%d\012\000"
	.align	2
.LC2:
	.ascii	"Failed to map RX buffer\012\000"
	.text
	.align	2
	.global	mlx4_en_create_rx_ring
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_en_create_rx_ring, %function
mlx4_en_create_rx_ring:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r2
	rsb	ip, r3, #0
	and	ip, ip, r3
	clz	ip, ip
	mov	r4, r1
	mov	r6, r0
	mov	r1, #0
	ldr	r2, .L11
	ldr	r0, .L11+4
	ldr	r2, [r2]
	ldr	r0, [r0]
	mla	r2, r3, r5, r2
	sub	lr, r5, #1
	rsb	ip, ip, #31
	ldr	r7, [r6, #4]
	sub	sp, sp, #8
	stm	r4, {r5, lr}
	str	r3, [r4, #8]
	str	ip, [r4, #32]
	str	r2, [r4, #16]
	str	r1, [r4, #40]
	str	r1, [r4, #36]
	lsl	r0, r0, #2
	bl	roundup_pow_of_two
	mul	r5, r0, r5
	mov	r0, r5
	bl	vmalloc
	cmp	r0, #0
	str	r0, [r4, #12]
	beq	.L8
	ldr	r2, .L11+8
	str	r5, [sp]
	mov	r3, r0
	mov	r1, r6
	ldr	r0, [r2]
	ldr	r2, .L11+12
	bl	en_dbg
	ldr	r3, .L11+16
	add	r8, r4, #20
	ldr	r3, [r3]
	mov	r1, r8
	ldr	r2, [r4, #16]
	ldr	r0, [r7]
	lsl	r3, r3, #1
	bl	mlx4_alloc_hwq_res
	subs	r5, r0, #0
	beq	.L9
.L4:
	ldr	r0, [r4, #12]
	bl	vfree
	mov	r3, #0
	mov	r0, r5
	str	r3, [r4, #12]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r0, r8
	bl	mlx4_en_map_buffer
	subs	r5, r0, #0
	bne	.L10
	mov	r0, r5
	ldr	r2, [r6]
	ldr	r3, [r4, #20]
	str	r2, [r4, #24]
	str	r3, [r4, #28]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r0, r6
	ldr	r1, .L11+20
	bl	en_err
	ldr	r3, .L11+24
	ldr	r0, [r3]
	rsb	r5, r0, #0
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	r0, r6
	ldr	r1, .L11+28
	bl	en_err
	mov	r1, r8
	ldr	r0, [r7]
	ldr	r2, [r4, #16]
	bl	mlx4_free_hwq_res
	b	.L4
.L12:
	.align	2
.L11:
	.word	TXBB_SIZE
	.word	MLX4_EN_MAX_RX_FRAGS
	.word	DRV
	.word	.LC1
	.word	PAGE_SIZE
	.word	.LC0
	.word	ENOMEM
	.word	.LC2
	.size	mlx4_en_create_rx_ring, .-mlx4_en_create_rx_ring
	.comm	TXBB_SIZE,4,4
	.comm	PAGE_SIZE,4,4
	.comm	MLX4_EN_MAX_RX_FRAGS,4,4
	.comm	ENOMEM,4,4
	.comm	DRV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
