	.file	"extr_cxgb2.c_set_sge_param.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	set_sge_param, @function
set_sge_param:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbp, QWORD PTR [rdi]
	mov	rdi, rbp
	call	t1_is_T1B@PLT
	mov	rdx, QWORD PTR [rbx]
	cmp	rdx, QWORD PTR MAX_RX_BUFFERS[rip]
	jg	.L2
	cmp	QWORD PTR 24[rbx], 0
	jne	.L2
	mov	rcx, rax
	mov	rax, QWORD PTR 8[rbx]
	cmp	rax, QWORD PTR MAX_RX_JUMBO_BUFFERS[rip]
	jg	.L2
	mov	esi, DWORD PTR 16[rbx]
	cmp	esi, DWORD PTR MAX_CMDQ_ENTRIES[rip]
	jg	.L2
	cmp	rdx, rax
	cmovle	rax, rdx
	cmp	QWORD PTR MIN_FL_ENTRIES[rip], rax
	jg	.L2
	mov	eax, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR MAX_SKB_FRAGS[rip]
	add	eax, 1
	add	edi, 1
	imul	eax, edi
	cmp	esi, eax
	jl	.L2
	mov	eax, DWORD PTR 0[rbp]
	and	eax, DWORD PTR FULL_INIT_DONE[rip]
	jne	.L10
	mov	rdi, QWORD PTR 16[rbp]
	test	rcx, rcx
	mov	rcx, QWORD PTR 24[rbp]
	lea	r8, 8[rdi]
	cmovne	r8, rdi
	mov	QWORD PTR [r8], rdx
	setne	dl
	mov	r8, QWORD PTR 8[rbx]
	movzx	edx, dl
	mov	QWORD PTR [rdi+rdx*8], r8
	mov	DWORD PTR [rcx], esi
	mov	edx, DWORD PTR MAX_CMDQ1_ENTRIES[rip]
	cmp	DWORD PTR 16[rbx], edx
	cmovle	edx, DWORD PTR 16[rbx]
	mov	DWORD PTR 4[rcx], edx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	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
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR EBUSY[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	set_sge_param, .-set_sge_param
	.comm	MIN_FL_ENTRIES,8,8
	.comm	MAX_SKB_FRAGS,4,4
	.comm	MAX_RX_JUMBO_BUFFERS,8,8
	.comm	MAX_RX_BUFFERS,8,8
	.comm	MAX_CMDQ_ENTRIES,4,4
	.comm	MAX_CMDQ1_ENTRIES,4,4
	.comm	FULL_INIT_DONE,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,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_cxgb2.c_set_sge_param.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_sge_param, %function
set_sge_param:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r1
	ldr	r5, [r0]
	mov	r0, r5
	bl	t1_is_T1B
	ldr	r3, .L11
	ldr	r1, [r4]
	ldr	r3, [r3]
	cmp	r1, r3
	bgt	.L2
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L2
	mov	r2, r0
	ldr	r0, .L11+4
	ldr	r3, [r4, #4]
	ldr	r0, [r0]
	cmp	r3, r0
	bgt	.L2
	ldr	r0, .L11+8
	ldr	ip, [r4, #8]
	ldr	r0, [r0]
	cmp	ip, r0
	bgt	.L2
	cmp	r1, r3
	movlt	r3, r1
	ldr	r0, .L11+12
	ldr	r0, [r0]
	cmp	r0, r3
	bgt	.L2
	ldr	r0, .L11+16
	ldr	r3, [r5, #4]
	ldr	r0, [r0]
	add	r3, r3, #1
	add	r0, r0, #1
	mul	r3, r0, r3
	cmp	ip, r3
	blt	.L2
	ldr	r0, .L11+20
	ldr	r3, [r5]
	ldr	r0, [r0]
	ands	r0, r3, r0
	bne	.L10
	ldr	r3, [r5, #8]
	cmp	r2, #0
	movne	lr, r3
	addeq	lr, r3, #4
	subs	r2, r2, #0
	movne	r2, #1
	str	r1, [lr]
	ldr	r1, [r5, #12]
	ldr	r5, [r4, #4]
	ldr	lr, .L11+24
	str	r5, [r3, r2, lsl #2]
	str	ip, [r1]
	ldr	r3, [r4, #8]
	ldr	r2, [lr]
	cmp	r3, r2
	movge	r3, r2
	str	r3, [r1, #4]
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r3, .L11+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r3, .L11+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L12:
	.align	2
.L11:
	.word	MAX_RX_BUFFERS
	.word	MAX_RX_JUMBO_BUFFERS
	.word	MAX_CMDQ_ENTRIES
	.word	MIN_FL_ENTRIES
	.word	MAX_SKB_FRAGS
	.word	FULL_INIT_DONE
	.word	MAX_CMDQ1_ENTRIES
	.word	EINVAL
	.word	EBUSY
	.size	set_sge_param, .-set_sge_param
	.comm	MIN_FL_ENTRIES,4,4
	.comm	MAX_SKB_FRAGS,4,4
	.comm	MAX_RX_JUMBO_BUFFERS,4,4
	.comm	MAX_RX_BUFFERS,4,4
	.comm	MAX_CMDQ_ENTRIES,4,4
	.comm	MAX_CMDQ1_ENTRIES,4,4
	.comm	FULL_INIT_DONE,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
