	.file	"extr_qib_file_ops.c_qib_do_user_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%u:ctxt%u: no 2KB buffers available\n"
	.align 8
.LC1:
	.string	"Ctxt%u: would use 4KB bufs, using %u\n"
	.text
	.p2align 4
	.type	qib_do_user_init, @function
qib_do_user_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	ctxt_fp@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	subctxt_fp@PLT
	test	rax, rax
	jne	.L13
	mov	rbp, QWORD PTR 80[rbx]
	mov	r8d, DWORD PTR [rbx]
	mov	eax, DWORD PTR 4[rbp]
	mov	esi, r8d
	sub	esi, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR 8[rbp]
	cmp	eax, esi
	ja	.L14
	imul	esi, edx
	mov	DWORD PTR 4[rbx], edx
	add	esi, eax
	mov	DWORD PTR 8[rbx], esi
.L4:
	mov	ecx, DWORD PTR 12[rbp]
	lea	eax, [rsi+rdx]
	cmp	eax, ecx
	jbe	.L5
	cmp	ecx, esi
	jbe	.L15
	sub	ecx, esi
	mov	edx, r8d
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	mov	DWORD PTR 4[rbx], ecx
	call	qib_dev_err@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR 4[rbx]
.L5:
	mov	eax, esi
	imul	eax, DWORD PTR 20[rbp]
	add	rax, QWORD PTR 48[rbp]
	mov	r8, rbx
	mov	QWORD PTR 72[rbx], rax
	mov	ecx, DWORD PTR TXCHK_CHG_TYPE_USER[rip]
	mov	rdi, rbp
	call	qib_chg_pioavailkernel@PLT
	mov	edi, DWORD PTR 32[rbp]
	mov	esi, DWORD PTR QIB_SENDCTRL_AVAIL_BLIP[rip]
	call	[QWORD PTR 40[rbp]]
	mov	rsi, rbx
	mov	rdi, rbp
	call	qib_create_rcvhdrq@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L16
.L8:
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR 8[rbx]
	mov	r8, rbx
	mov	rdi, rbp
	mov	ecx, DWORD PTR TXCHK_CHG_TYPE_KERN[rip]
	call	qib_chg_pioavailkernel@PLT
.L1:
	mov	eax, r12d
	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
.L14:
	.cfi_restore_state
	add	edx, 1
	imul	esi, edx
	mov	DWORD PTR 4[rbx], edx
	mov	DWORD PTR 8[rbx], esi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, rbx
	call	qib_setup_eagerbufs@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L8
	cmp	QWORD PTR 40[rbx], 0
	mov	QWORD PTR 64[rbx], 0
	mov	QWORD PTR 56[rbx], 0
	mov	QWORD PTR 48[rbx], 0
	jne	.L17
.L10:
	mov	esi, DWORD PTR QIB_RCVCTRL_CTXT_ENB[rip]
	mov	edi, DWORD PTR 32[rbx]
	or	esi, DWORD PTR QIB_RCVCTRL_TIDFLOW_ENB[rip]
	mov	edx, DWORD PTR [rbx]
	call	[QWORD PTR 24[rbp]]
	cmp	QWORD PTR 24[rbx], 0
	je	.L1
	mov	edi, DWORD PTR QIB_CTXT_MASTER_UNINIT[rip]
	lea	rsi, 16[rbx]
	call	clear_bit@PLT
	lea	rdi, 12[rbx]
	call	wake_up@PLT
	mov	eax, r12d
	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
.L13:
	.cfi_restore_state
	mov	edi, DWORD PTR QIB_CTXT_MASTER_UNINIT[rip]
	lea	rsi, 16[rbx]
	call	test_bit@PLT
	xor	esi, esi
	mov	edi, DWORD PTR 12[rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	test	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	sete	sil
	jmp	wait_event_interruptible@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edx, DWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	ecx, r8d
	lea	rsi, .LC0[rip]
	call	qib_dev_err@PLT
	mov	r12d, DWORD PTR ENOBUFS[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdi, rbx
	call	qib_clear_rcvhdrtail@PLT
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	qib_do_user_init, .-qib_do_user_init
	.comm	TXCHK_CHG_TYPE_USER,4,4
	.comm	TXCHK_CHG_TYPE_KERN,4,4
	.comm	QIB_SENDCTRL_AVAIL_BLIP,4,4
	.comm	QIB_RCVCTRL_TIDFLOW_ENB,4,4
	.comm	QIB_RCVCTRL_CTXT_ENB,4,4
	.comm	QIB_CTXT_MASTER_UNINIT,4,4
	.comm	ENOBUFS,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_file_ops.c_qib_do_user_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%u:ctxt%u: no 2KB buffers available\012\000"
	.align	2
.LC1:
	.ascii	"Ctxt%u: would use 4KB bufs, using %u\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qib_do_user_init, %function
qib_do_user_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	sub	sp, sp, #8
	mov	r5, r0
	bl	ctxt_fp
	mov	r4, r0
	mov	r0, r5
	bl	subctxt_fp
	cmp	r0, #0
	bne	.L19
	ldr	r5, [r4, #48]
	ldr	ip, [r4]
	ldr	r0, [r5, #8]
	ldm	r5, {r1, r3}
	sub	r1, ip, r1
	cmp	r3, r1
	addhi	r0, r0, #1
	movhi	r2, r0
	movls	r2, r0
	mulhi	r1, r2, r1
	mlals	r1, r2, r1, r3
	ldr	r3, [r5, #12]
	stmib	r4, {r0, r1}
	add	r0, r1, r2
	cmp	r0, r3
	bls	.L5
	cmp	r3, r1
	bls	.L20
	sub	r3, r3, r1
	mov	r2, ip
	ldr	r1, .L25
	mov	r0, r5
	str	r3, [r4, #4]
	bl	qib_dev_err
	ldr	r1, [r4, #8]
	ldr	r2, [r4, #4]
.L5:
	ldr	r0, [r5, #36]
	ldr	r3, [r5, #20]
	mla	r3, r1, r3, r0
	ldr	r0, .L25+4
	str	r3, [r4, #44]
	str	r4, [sp]
	ldr	r3, [r0]
	mov	r0, r5
	bl	qib_chg_pioavailkernel
	ldr	r2, .L25+8
	ldr	r3, [r5, #32]
	ldr	r1, [r2]
	ldr	r0, [r5, #28]
	blx	r3
	mov	r1, r4
	mov	r0, r5
	bl	qib_create_rcvhdrq
	subs	r6, r0, #0
	beq	.L21
.L8:
	ldr	r3, .L25+12
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #8]
	ldr	r3, [r3]
	mov	r0, r5
	str	r4, [sp]
	bl	qib_chg_pioavailkernel
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L21:
	mov	r0, r4
	bl	qib_setup_eagerbufs
	cmp	r0, #0
	bne	.L22
	ldr	r3, [r4, #28]
	str	r0, [r4, #40]
	cmp	r3, #0
	str	r0, [r4, #36]
	str	r0, [r4, #32]
	bne	.L23
.L10:
	ldr	r2, .L25+16
	ldr	r3, .L25+20
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r0, [r4, #24]
	orr	r1, r1, r2
	ldr	r3, [r5, #24]
	ldr	r2, [r4]
	blx	r3
	ldr	r6, [r4, #20]
	cmp	r6, #0
	bne	.L24
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L19:
	ldr	r3, .L25+24
	add	r1, r4, #16
	ldr	r0, [r3]
	ldr	r4, [r4, #12]
	bl	test_bit
	clz	r1, r0
	mov	r0, r4
	lsr	r1, r1, #5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	wait_event_interruptible
.L20:
	mov	r3, ip
	mov	r0, r5
	ldr	r2, [r5, #16]
	ldr	r1, .L25+28
	bl	qib_dev_err
	ldr	r3, .L25+32
	ldr	r6, [r3]
	rsb	r6, r6, #0
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L24:
	mov	r6, #0
	ldr	r3, .L25+24
	add	r1, r4, #16
	ldr	r0, [r3]
	bl	clear_bit
	add	r0, r4, #12
	bl	wake_up
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L23:
	mov	r0, r4
	bl	qib_clear_rcvhdrtail
	b	.L10
.L22:
	mov	r6, r0
	b	.L8
.L26:
	.align	2
.L25:
	.word	.LC1
	.word	TXCHK_CHG_TYPE_USER
	.word	QIB_SENDCTRL_AVAIL_BLIP
	.word	TXCHK_CHG_TYPE_KERN
	.word	QIB_RCVCTRL_CTXT_ENB
	.word	QIB_RCVCTRL_TIDFLOW_ENB
	.word	QIB_CTXT_MASTER_UNINIT
	.word	.LC0
	.word	ENOBUFS
	.size	qib_do_user_init, .-qib_do_user_init
	.comm	TXCHK_CHG_TYPE_USER,4,4
	.comm	TXCHK_CHG_TYPE_KERN,4,4
	.comm	QIB_SENDCTRL_AVAIL_BLIP,4,4
	.comm	QIB_RCVCTRL_TIDFLOW_ENB,4,4
	.comm	QIB_RCVCTRL_CTXT_ENB,4,4
	.comm	QIB_CTXT_MASTER_UNINIT,4,4
	.comm	ENOBUFS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
