	.file	"extr_mlx5_en_main.c_mlx5e_open_channels.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mlx5e_open_channels, @function
mlx5e_open_channels:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR M_WAITOK[rip]
	mov	esi, DWORD PTR M_MLX5EN[rip]
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	edi, 4
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	call	malloc@PLT
	mov	rdi, r14
	mov	rsi, rax
	mov	rbp, rax
	call	mlx5e_build_channel_param@PLT
	mov	eax, DWORD PTR 8[r14]
	test	eax, eax
	jg	.L2
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR 8[r14]
	add	rbx, 1
	cmp	eax, ebx
	jle	.L19
.L2:
	mov	rax, QWORD PTR [r14]
	mov	rsi, rbp
	mov	rdi, r14
	mov	r13d, ebx
	lea	rdx, [rax+rbx*4]
	call	mlx5e_open_channel@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L20
	lea	eax, -1[rbx]
	test	ebx, ebx
	je	.L9
.L6:
	movsx	r13, eax
	mov	eax, eax
	lea	rbx, 0[0+r13*4]
	sub	r13, rax
	sal	r13, 2
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR [r14]
	add	rdi, rbx
	call	mlx5e_close_channel@PLT
	mov	rdi, QWORD PTR [r14]
	add	rdi, rbx
	call	mlx5e_close_channel_wait@PLT
	mov	rax, rbx
	sub	rbx, 4
	cmp	r13, rax
	jne	.L8
.L9:
	mov	esi, DWORD PTR M_MLX5EN[rip]
	mov	rdi, rbp
	call	free@PLT
	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
.L19:
	.cfi_restore_state
	test	eax, eax
	jle	.L5
	xor	ebx, ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L21:
	add	rbx, 1
	cmp	DWORD PTR 8[r14], ebx
	jle	.L5
.L7:
	mov	rax, QWORD PTR [r14]
	lea	rdi, [rax+rbx*4]
	call	mlx5e_wait_for_min_rx_wqes@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L21
	mov	eax, r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR M_MLX5EN[rip]
	mov	rdi, rbp
	xor	r12d, r12d
	call	free@PLT
	pop	rbx
	.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
	.cfi_endproc
.LFE0:
	.size	mlx5e_open_channels, .-mlx5e_open_channels
	.comm	M_WAITOK,4,4
	.comm	M_MLX5EN,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_mlx5_en_main.c_mlx5e_open_channels.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx5e_open_channels, %function
mlx5e_open_channels:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L20
	ldr	r8, .L20+4
	mov	r6, r0
	ldr	r2, [r3]
	ldr	r1, [r8]
	mov	r0, #4
	bl	malloc
	mov	r7, r0
	mov	r0, r6
	mov	r1, r7
	bl	mlx5e_build_channel_param
	ldr	r3, [r6, #4]
	cmp	r3, #0
	movgt	r4, #0
	bgt	.L2
	b	.L5
.L18:
	ldr	r2, [r6, #4]
	cmp	r2, r3
	ble	.L17
	mov	r4, r3
.L2:
	ldr	r2, [r6]
	mov	r1, r7
	mov	r0, r6
	add	r2, r2, r4, lsl #2
	bl	mlx5e_open_channel
	subs	r5, r0, #0
	add	r3, r4, #1
	beq	.L18
	cmp	r4, #0
	sub	r4, r4, #1
	beq	.L9
.L8:
	ldr	r0, [r6]
	lsl	r9, r4, #2
	add	r0, r0, r4, lsl #2
	bl	mlx5e_close_channel
	ldr	r0, [r6]
	sub	r4, r4, #1
	add	r0, r0, r9
	bl	mlx5e_close_channel_wait
	cmn	r4, #1
	bne	.L8
.L9:
	mov	r0, r7
	ldr	r1, [r8]
	bl	free
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	cmp	r2, #0
	bgt	.L7
	b	.L5
.L19:
	ldr	r3, [r6, #4]
	cmp	r3, r5
	ble	.L5
.L7:
	ldr	r0, [r6]
	add	r0, r0, r5, lsl #2
	bl	mlx5e_wait_for_min_rx_wqes
	cmp	r0, #0
	add	r5, r5, #1
	beq	.L19
	mov	r5, r0
	b	.L8
.L5:
	mov	r5, #0
	mov	r0, r7
	ldr	r1, [r8]
	bl	free
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	.align	2
.L20:
	.word	M_WAITOK
	.word	M_MLX5EN
	.size	mlx5e_open_channels, .-mlx5e_open_channels
	.comm	M_WAITOK,4,4
	.comm	M_MLX5EN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
