	.file	"extr_qib_iba7220.c_qib_7220_config_ctxts.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	qib_7220_config_ctxts, @function
qib_7220_config_ctxts:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR kr_portcnt[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	call	qib_read_kreg32@PLT
	mov	rdi, QWORD PTR 40[rbx]
	mov	r12d, DWORD PTR qib_n_krcv_queues[rip]
	mov	rbp, rax
	mov	QWORD PTR 16[rdi], rax
	cmp	r12d, 1
	jle	.L2
	imul	r12d, DWORD PTR 8[rbx]
	mov	DWORD PTR [rbx], 62
	movsx	rax, r12d
	cmp	rax, rbp
	jg	.L3
.L17:
	mov	QWORD PTR 16[rbx], rax
	mov	rax, QWORD PTR qib_cfgctxts[rip]
	mov	DWORD PTR 4[rbx], r12d
	test	rax, rax
	je	.L20
.L5:
	cmp	rax, rbp
	jle	.L11
.L18:
	mov	edx, DWORD PTR 24[rbx]
.L10:
	test	edx, edx
	jne	.L12
	mov	DWORD PTR 24[rbx], ebp
.L12:
	add	rdi, 8
	xor	esi, esi
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR 24[rbx]
	cmp	eax, 9
	jle	.L13
	mov	rcx, QWORD PTR IBA7220_R_CTXTCFG_SHIFT[rip]
	mov	edx, 2
	sal	rdx, cl
	or	rdx, QWORD PTR 32[rbx]
	mov	QWORD PTR 32[rbx], rdx
.L14:
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	je	.L15
	mov	rcx, QWORD PTR QIB_7220_RcvCtrl_RcvQPMapEnable_LSB[rip]
	mov	eax, 1
	sal	rax, cl
	or	rdx, rax
	mov	QWORD PTR 32[rbx], rdx
.L15:
	mov	esi, DWORD PTR kr_rcvctrl[rip]
	mov	rdi, rbx
	call	qib_write_kreg@PLT
	mov	rax, QWORD PTR 40[rbx]
	xor	esi, esi
	lea	rdi, 8[rax]
	call	spin_unlock_irqrestore@PLT
	mov	esi, DWORD PTR kr_rcvegrcnt[rip]
	mov	rbp, QWORD PTR 40[rbx]
	mov	rdi, rbx
	call	qib_read_kreg32@PLT
	mov	esi, DWORD PTR IBA7220_KRCVEGRCNT[rip]
	mov	QWORD PTR 0[rbp], rax
	mov	rax, QWORD PTR 40[rbx]
	mov	rdi, QWORD PTR [rax]
	call	max@PLT
	mov	DWORD PTR 48[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	DWORD PTR 24[rbx], eax
	mov	edx, eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movsx	rax, ebp
	mov	DWORD PTR 4[rbx], ebp
	mov	r12d, ebp
	mov	QWORD PTR 16[rbx], rax
	mov	rax, QWORD PTR qib_cfgctxts[rip]
	test	rax, rax
	jne	.L5
.L20:
	call	num_online_cpus@PLT
	add	r12d, eax
	cmp	r12d, 5
	jle	.L21
	mov	rdi, QWORD PTR 40[rbx]
	cmp	r12d, 9
	jg	.L8
	mov	DWORD PTR 24[rbx], 9
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdx, QWORD PTR 32[rbx]
	cmp	eax, 5
	jle	.L14
	mov	rcx, QWORD PTR IBA7220_R_CTXTCFG_SHIFT[rip]
	mov	eax, 1
	sal	rax, cl
	or	rdx, rax
	mov	QWORD PTR 32[rbx], rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L2:
	movsx	rax, DWORD PTR 8[rbx]
	mov	r12, rax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L21:
	mov	DWORD PTR 24[rbx], 5
	mov	rdi, QWORD PTR 40[rbx]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L8:
	movsx	r12, r12d
	cmp	r12, rbp
	jg	.L18
	mov	DWORD PTR 24[rbx], ebp
	mov	edx, ebp
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	qib_7220_config_ctxts, .-qib_7220_config_ctxts
	.comm	qib_n_krcv_queues,4,4
	.comm	qib_cfgctxts,8,8
	.comm	kr_rcvegrcnt,4,4
	.comm	kr_rcvctrl,4,4
	.comm	kr_portcnt,4,4
	.comm	QIB_7220_RcvCtrl_RcvQPMapEnable_LSB,8,8
	.comm	IBA7220_R_CTXTCFG_SHIFT,8,8
	.comm	IBA7220_KRCVEGRCNT,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_qib_iba7220.c_qib_7220_config_ctxts.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qib_7220_config_ctxts, %function
qib_7220_config_ctxts:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L23
	push	{r4, r5, r6, lr}
	ldr	r1, [r3]
	mov	r4, r0
	bl	qib_read_kreg32
	mov	r6, r0
	ldr	r2, .L23+4
	ldr	r0, [r4, #32]
	ldr	r5, [r2]
	str	r6, [r0, #8]
	cmp	r5, #1
	ble	.L2
	mov	r2, #62
	ldr	r3, [r4, #8]
	str	r2, [r4]
	mul	r5, r3, r5
	cmp	r5, r6
	movgt	r5, r6
	strgt	r6, [r4, #4]
	ble	.L18
.L4:
	ldr	r2, .L23+8
	str	r5, [r4, #12]
	ldr	r2, [r2]
	cmp	r2, #0
	beq	.L21
	cmp	r2, r6
	strle	r2, [r4, #16]
	bgt	.L9
.L10:
	mov	r1, #0
	add	r0, r0, #4
	bl	spin_lock_irqsave
	ldr	r3, [r4, #16]
	cmp	r3, #9
	ble	.L11
	mov	r2, #2
	ldr	r3, .L23+12
	ldr	ip, [r4, #28]
	ldr	r1, [r3]
	sub	r3, r1, #32
	lsl	r3, r2, r3
	rsb	r0, r1, #32
	orr	r3, r3, r2, lsr r0
	ldr	r0, [r4, #24]
	orr	r3, r3, ip
	orr	r2, r0, r2, lsl r1
	str	r3, [r4, #28]
	str	r2, [r4, #24]
.L12:
	ldr	r1, [r4]
	cmp	r1, #0
	beq	.L13
	mov	ip, #1
	ldr	r1, .L23+16
	ldr	r0, [r1]
	sub	r1, r0, #32
	lsl	r1, ip, r1
	rsb	lr, r0, #32
	orr	r1, r1, ip, lsr lr
	orr	r2, r2, ip, lsl r0
	orr	r3, r1, r3
	str	r3, [r4, #28]
	str	r2, [r4, #24]
.L13:
	ldr	r1, .L23+20
	mov	r0, r4
	ldr	r1, [r1]
	bl	qib_write_kreg
	ldr	r0, [r4, #32]
	mov	r1, #0
	add	r0, r0, #4
	bl	spin_unlock_irqrestore
	ldr	r3, .L23+24
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r5, [r4, #32]
	bl	qib_read_kreg32
	ldr	r2, [r4, #32]
	ldr	r3, .L23+28
	str	r0, [r5]
	ldr	r0, [r2]
	ldr	r1, [r3]
	bl	max
	str	r0, [r4, #36]
	pop	{r4, r5, r6, pc}
.L21:
	bl	num_online_cpus
	add	r5, r0, r5
	cmp	r5, #5
	ble	.L22
	cmp	r5, #9
	movle	r2, #9
	ldr	r0, [r4, #32]
	strle	r2, [r4, #16]
	ble	.L10
	cmp	r6, r5
	bge	.L19
.L9:
	ldr	r2, [r4, #16]
	cmp	r2, #0
	bne	.L10
.L19:
	str	r6, [r4, #16]
	b	.L10
.L2:
	ldr	r5, [r4, #8]
.L18:
	str	r5, [r4, #4]
	b	.L4
.L11:
	cmp	r3, #5
	ldr	r2, [r4, #24]
	ldr	r3, [r4, #28]
	ble	.L12
	mov	ip, #1
	ldr	r1, .L23+12
	ldr	r0, [r1]
	sub	r1, r0, #32
	lsl	r1, ip, r1
	rsb	lr, r0, #32
	orr	r1, r1, ip, lsr lr
	orr	r2, r2, ip, lsl r0
	orr	r3, r1, r3
	str	r3, [r4, #28]
	str	r2, [r4, #24]
	b	.L12
.L22:
	mov	r2, #5
	ldr	r0, [r4, #32]
	str	r2, [r4, #16]
	b	.L10
.L24:
	.align	2
.L23:
	.word	kr_portcnt
	.word	qib_n_krcv_queues
	.word	qib_cfgctxts
	.word	IBA7220_R_CTXTCFG_SHIFT
	.word	QIB_7220_RcvCtrl_RcvQPMapEnable_LSB
	.word	kr_rcvctrl
	.word	kr_rcvegrcnt
	.word	IBA7220_KRCVEGRCNT
	.size	qib_7220_config_ctxts, .-qib_7220_config_ctxts
	.comm	qib_n_krcv_queues,4,4
	.comm	qib_cfgctxts,4,4
	.comm	kr_rcvegrcnt,4,4
	.comm	kr_rcvctrl,4,4
	.comm	kr_portcnt,4,4
	.comm	QIB_7220_RcvCtrl_RcvQPMapEnable_LSB,8,8
	.comm	IBA7220_R_CTXTCFG_SHIFT,8,8
	.comm	IBA7220_KRCVEGRCNT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
