	.file	"extr_cxgb_sge.c_t3_sge_prep.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Insufficient clusters and/or jumbo buffers.\n"
	.text
	.p2align 4
	.globl	t3_sge_prep
	.type	t3_sge_prep, @function
t3_sge_prep:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	eax, DWORD PTR SGE_QSETS[rip]
	mov	QWORD PTR 8[rsp], rsi
	mov	esi, DWORD PTR mp_ncpus[rip]
	cdq
	idiv	DWORD PTR [rdi]
	mov	edi, eax
	call	min@PLT
	imul	eax, DWORD PTR [r12]
	mov	esi, DWORD PTR FL_Q_SIZE[rip]
	lea	ebx, [rax+rax*2]
	mov	eax, DWORD PTR nmbclusters[rip]
	cdq
	idiv	ebx
	mov	edi, eax
	call	min@PLT
	mov	ebp, eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	sub	ebp, 1
.L2:
	mov	edi, ebp
	call	powerof2@PLT
	test	eax, eax
	je	.L3
	cmp	DWORD PTR cxgb_use_16k_clusters[rip], -1
	je	.L18
.L4:
	mov	eax, DWORD PTR nmbjumbop[rip]
	mov	esi, DWORD PTR JUMBO_Q_SIZE[rip]
	cdq
	idiv	ebx
	mov	edi, eax
	call	min@PLT
	mov	r14d, DWORD PTR MJUMPAGESIZE[rip]
	mov	r13d, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	sub	r13d, 1
.L5:
	mov	edi, r13d
	call	powerof2@PLT
	test	eax, eax
	je	.L6
	mov	ecx, DWORD PTR FL_Q_SIZE[rip]
	test	ecx, ecx
	lea	eax, 3[rcx]
	cmovns	eax, ecx
	sar	eax, 2
	cmp	eax, ebp
	jg	.L7
	mov	ecx, DWORD PTR JUMBO_Q_SIZE[rip]
	mov	eax, ecx
	shr	eax, 31
	add	eax, ecx
	sar	eax
	cmp	eax, r13d
	jg	.L7
.L8:
	mov	rcx, QWORD PTR 8[rsp]
	lea	eax, -4[r14]
	mov	DWORD PTR [rcx], eax
	mov	eax, DWORD PTR SGE_QSETS[rip]
	test	eax, eax
	jle	.L1
	xor	r15d, r15d
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR 8[rsp]
	lea	rbx, [r15+r15*2]
	mov	edx, 50
	mov	edi, DWORD PTR TX_ETH_Q_SIZE[rip]
	sal	rbx, 4
	mov	rsi, QWORD PTR TXQ_ETH[rip]
	add	rbx, QWORD PTR 8[rax]
	cmp	DWORD PTR [r12], 2
	mov	eax, 5
	cmovg	eax, edx
	mov	QWORD PTR 40[rbx], 0
	mov	DWORD PTR 4[rbx], ebp
	mov	DWORD PTR [rbx], eax
	mov	eax, DWORD PTR RSPQ_Q_SIZE[rip]
	mov	DWORD PTR 8[rbx], r13d
	mov	DWORD PTR 32[rbx], eax
	mov	rax, QWORD PTR 16[rbx]
	mov	DWORD PTR 12[rbx], r14d
	mov	DWORD PTR [rax+rsi*4], edi
	mov	rdi, r12
	call	is_offload@PLT
	mov	rdi, QWORD PTR TXQ_OFLD[rip]
	mov	rsi, QWORD PTR 16[rbx]
	test	eax, eax
	mov	eax, 16
	cmovne	eax, DWORD PTR TX_OFLD_Q_SIZE[rip]
	add	r15, 1
	mov	DWORD PTR [rsi+rdi*4], eax
	mov	rax, QWORD PTR TXQ_CTRL[rip]
	mov	edi, DWORD PTR TX_CTRL_Q_SIZE[rip]
	mov	DWORD PTR [rsi+rax*4], edi
	cmp	DWORD PTR SGE_QSETS[rip], r15d
	mov	QWORD PTR 24[rbx], 0
	jg	.L12
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[r12]
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, r12
	call	is_offload@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	t3_sge_prep, .-t3_sge_prep
	.comm	nmbjumbop,4,4
	.comm	nmbjumbo9,4,4
	.comm	nmbjumbo16,4,4
	.comm	nmbclusters,4,4
	.comm	mp_ncpus,4,4
	.comm	cxgb_use_16k_clusters,4,4
	.comm	TX_OFLD_Q_SIZE,4,4
	.comm	TX_ETH_Q_SIZE,4,4
	.comm	TX_CTRL_Q_SIZE,4,4
	.comm	TXQ_OFLD,8,8
	.comm	TXQ_ETH,8,8
	.comm	TXQ_CTRL,8,8
	.comm	SGE_QSETS,4,4
	.comm	RSPQ_Q_SIZE,4,4
	.comm	MJUMPAGESIZE,4,4
	.comm	MJUM9BYTES,4,4
	.comm	MJUM16BYTES,4,4
	.comm	JUMBO_Q_SIZE,4,4
	.comm	FL_Q_SIZE,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_cxgb_sge.c_t3_sge_prep.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Insufficient clusters and/or jumbo buffers.\012\000"
	.text
	.align	2
	.global	t3_sge_prep
	.syntax unified
	.arm
	.fpu softvfp
	.type	t3_sge_prep, %function
t3_sge_prep:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L19
	ldr	r10, .L19+4
	ldr	r4, [r3]
	sub	sp, sp, #12
	mov	r8, r0
	mov	r9, r1
	ldr	r1, [r0]
	ldr	r0, [r10]
	bl	__aeabi_idiv
	mov	r1, r4
	bl	min
	ldr	r7, [r8]
	ldr	r4, .L19+8
	mul	r7, r0, r7
	ldr	r3, .L19+12
	ldr	r5, [r4]
	add	r7, r7, r7, lsl #1
	mov	r1, r7
	ldr	r0, [r3]
	bl	__aeabi_idiv
	mov	r1, r5
	bl	min
	mov	r6, r0
	b	.L2
.L3:
	sub	r6, r6, #1
.L2:
	mov	r0, r6
	bl	powerof2
	cmp	r0, #0
	beq	.L3
	ldr	r3, .L19+16
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L18
.L4:
	ldr	r5, .L19+20
	ldr	r3, .L19+24
	mov	r1, r7
	ldr	r7, [r5]
	ldr	r0, [r3]
	bl	__aeabi_idiv
	mov	r1, r7
	bl	min
	ldr	r3, .L19+28
	mov	r7, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	b	.L5
.L6:
	sub	r7, r7, #1
.L5:
	mov	r0, r7
	bl	powerof2
	cmp	r0, #0
	beq	.L6
	ldr	r3, [r4]
	cmp	r3, #0
	add	r2, r3, #3
	movlt	r3, r2
	cmp	r6, r3, asr #2
	blt	.L7
	ldr	r3, [r5]
	add	r3, r3, r3, lsr #31
	cmp	r7, r3, asr #1
	blt	.L7
.L8:
	ldr	r2, [r10]
	ldr	r3, [sp, #4]
	cmp	r2, #0
	sub	r3, r3, #4
	str	r3, [r9]
	ble	.L1
	mov	r5, #0
	mov	fp, r5
	ldr	r1, .L19+32
	ldr	r2, .L19+36
.L12:
	ldr	r0, [r8]
	ldr	r3, [r9, #4]
	cmp	r0, #2
	movgt	lr, #50
	movle	lr, #5
	ldr	r0, .L19+40
	add	r4, r3, r5, lsl #5
	ldr	ip, [r0]
	ldr	r0, [r4, #16]
	str	lr, [r3, r5, lsl #5]
	ldr	r3, [r2]
	ldr	lr, [r1]
	ldr	r2, [sp, #4]
	str	ip, [r4, #24]
	str	r2, [r4, #12]
	stmib	r4, {r6, r7}
	str	fp, [r4, #28]
	str	lr, [r0, r3, lsl #2]
	mov	r0, r8
	bl	is_offload
	cmp	r0, #0
	moveq	ip, #16
	ldrne	r3, .L19+44
	ldr	r0, .L19+48
	ldrne	ip, [r3]
	ldr	r0, [r0]
	ldr	r3, [r4, #16]
	add	r5, r5, #1
	str	ip, [r3, r0, lsl #2]
	ldr	r0, .L19+52
	ldr	r2, .L19+36
	ldr	ip, [r0]
	ldr	r0, .L19+56
	ldr	r1, .L19+32
	ldr	r0, [r0]
	str	ip, [r3, r0, lsl #2]
	ldr	r3, [r10]
	str	fp, [r4, #20]
	cmp	r3, r5
	bgt	.L12
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r1, .L19+60
	ldr	r0, [r8, #4]
	bl	device_printf
	b	.L8
.L18:
	mov	r0, r8
	bl	is_offload
	b	.L4
.L20:
	.align	2
.L19:
	.word	mp_ncpus
	.word	SGE_QSETS
	.word	FL_Q_SIZE
	.word	nmbclusters
	.word	cxgb_use_16k_clusters
	.word	JUMBO_Q_SIZE
	.word	nmbjumbop
	.word	MJUMPAGESIZE
	.word	TX_ETH_Q_SIZE
	.word	TXQ_ETH
	.word	RSPQ_Q_SIZE
	.word	TX_OFLD_Q_SIZE
	.word	TXQ_OFLD
	.word	TX_CTRL_Q_SIZE
	.word	TXQ_CTRL
	.word	.LC0
	.size	t3_sge_prep, .-t3_sge_prep
	.comm	nmbjumbop,4,4
	.comm	nmbjumbo9,4,4
	.comm	nmbjumbo16,4,4
	.comm	nmbclusters,4,4
	.comm	mp_ncpus,4,4
	.comm	cxgb_use_16k_clusters,4,4
	.comm	TX_OFLD_Q_SIZE,4,4
	.comm	TX_ETH_Q_SIZE,4,4
	.comm	TX_CTRL_Q_SIZE,4,4
	.comm	TXQ_OFLD,4,4
	.comm	TXQ_ETH,4,4
	.comm	TXQ_CTRL,4,4
	.comm	SGE_QSETS,4,4
	.comm	RSPQ_Q_SIZE,4,4
	.comm	MJUMPAGESIZE,4,4
	.comm	MJUM9BYTES,4,4
	.comm	MJUM16BYTES,4,4
	.comm	JUMBO_Q_SIZE,4,4
	.comm	FL_Q_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
