	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_do_user_init
_qib_do_user_init:                      ## @qib_do_user_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_ctxt_fp
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_subctxt_fp
	testq	%rax, %rax
	je	LBB0_1
## %bb.13:
	movl	12(%r12), %ebx
	movq	_QIB_CTXT_MASTER_UNINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$16, %r12
	movq	%r12, %rsi
	callq	_test_bit
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wait_event_interruptible       ## TAILCALL
LBB0_1:
	movq	80(%r12), %r14
	movl	(%r12), %ecx
	movl	%ecx, %eax
	subl	(%r14), %eax
	movl	4(%r14), %r8d
	movl	8(%r14), %ebx
	leal	1(%rbx), %edx
	movl	%edx, %edi
	imull	%eax, %edi
	movl	%ebx, %esi
	imull	%eax, %esi
	addl	%r8d, %esi
	cmpl	%r8d, %eax
	cmovael	%ebx, %edx
	cmovbl	%edi, %esi
	movl	%edx, 4(%r12)
	movl	%esi, 8(%r12)
	leal	(%rdx,%rsi), %edi
	movl	12(%r14), %eax
	cmpl	%eax, %edi
	jbe	LBB0_5
## %bb.2:
	subl	%esi, %eax
	jbe	LBB0_3
## %bb.4:
	movl	%eax, 4(%r12)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_qib_dev_err
	movl	4(%r12), %edx
	movl	8(%r12), %esi
LBB0_5:
	movl	20(%r14), %eax
	imull	%esi, %eax
	addq	48(%r14), %rax
	movq	%rax, 72(%r12)
	movq	_TXCHK_CHG_TYPE_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r12, %r8
	callq	_qib_chg_pioavailkernel
	movl	32(%r14), %edi
	movq	_QIB_SENDCTRL_AVAIL_BLIP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	*40(%r14)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_qib_create_rcvhdrq
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	%r12, %rdi
	callq	_qib_setup_eagerbufs
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_7
LBB0_11:
	movl	4(%r12), %edx
	movl	8(%r12), %esi
	movq	_TXCHK_CHG_TYPE_KERN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r12, %r8
	callq	_qib_chg_pioavailkernel
	jmp	LBB0_12
LBB0_3:
	movl	16(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_qib_dev_err
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_7:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%r12)
	movq	$0, 64(%r12)
	cmpq	$0, 40(%r12)
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_qib_clear_rcvhdrtail
LBB0_9:
	movl	(%r12), %edx
	movl	32(%r12), %edi
	movq	_QIB_RCVCTRL_CTXT_ENB@GOTPCREL(%rip), %rax
	movq	_QIB_RCVCTRL_TIDFLOW_ENB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	*24(%r14)
	xorl	%r15d, %r15d
	cmpq	$0, 24(%r12)
	je	LBB0_12
## %bb.10:
	movq	_QIB_CTXT_MASTER_UNINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r12), %rsi
	callq	_clear_bit
	addq	$12, %r12
	movq	%r12, %rdi
	callq	_wake_up
LBB0_12:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QIB_CTXT_MASTER_UNINIT,4,2     ## @QIB_CTXT_MASTER_UNINIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%u:ctxt%u: no 2KB buffers available\n"

	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
L_.str.1:                               ## @.str.1
	.asciz	"Ctxt%u: would use 4KB bufs, using %u\n"

	.comm	_TXCHK_CHG_TYPE_USER,4,2        ## @TXCHK_CHG_TYPE_USER
	.comm	_QIB_SENDCTRL_AVAIL_BLIP,4,2    ## @QIB_SENDCTRL_AVAIL_BLIP
	.comm	_QIB_RCVCTRL_CTXT_ENB,4,2       ## @QIB_RCVCTRL_CTXT_ENB
	.comm	_QIB_RCVCTRL_TIDFLOW_ENB,4,2    ## @QIB_RCVCTRL_TIDFLOW_ENB
	.comm	_TXCHK_CHG_TYPE_KERN,4,2        ## @TXCHK_CHG_TYPE_KERN
	.no_dead_strip	_qib_do_user_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_do_user_init
_qib_do_user_init:                      ; @qib_do_user_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	bl	_ctxt_fp
	mov	x19, x0
	mov	x0, x20
	bl	_subctxt_fp
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w20, [x19, #12]
Lloh0:
	adrp	x8, _QIB_CTXT_MASTER_UNINIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QIB_CTXT_MASTER_UNINIT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_bit
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wait_event_interruptible
LBB0_2:
	ldr	x20, [x19, #80]
	ldr	w8, [x19]
	ldp	w9, w10, [x20]
	ldr	w11, [x20, #8]
	add	w12, w11, #1
	sub	w9, w8, w9
	cmp	w9, w10
	mul	w12, w12, w9
	madd	w9, w11, w9, w10
	cinc	w2, w11, lo
	csel	w1, w12, w9, lo
	stp	w2, w1, [x19, #4]
	ldr	w9, [x20, #12]
	add	w10, w2, w1
	cmp	w10, w9
	b.ls	LBB0_5
; %bb.3:
	subs	w3, w9, w1
	b.ls	LBB0_8
; %bb.4:
	str	w3, [x19, #4]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x8
	bl	_qib_dev_err
	ldp	w2, w1, [x19, #4]
LBB0_5:
	ldr	x8, [x20, #48]
	ldr	w9, [x20, #20]
	mul	w9, w9, w1
	add	x8, x8, x9
	str	x8, [x19, #72]
Lloh5:
	adrp	x8, _TXCHK_CHG_TYPE_USER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TXCHK_CHG_TYPE_USER@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x4, x19
	bl	_qib_chg_pioavailkernel
	ldr	x8, [x20, #40]
	ldr	w0, [x20, #32]
Lloh8:
	adrp	x9, _QIB_SENDCTRL_AVAIL_BLIP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _QIB_SENDCTRL_AVAIL_BLIP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
	blr	x8
	mov	x0, x20
	mov	x1, x19
	bl	_qib_create_rcvhdrq
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_qib_setup_eagerbufs
	mov	x21, x0
	cbz	w0, LBB0_9
LBB0_7:
	ldp	w2, w1, [x19, #4]
Lloh11:
	adrp	x8, _TXCHK_CHG_TYPE_KERN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TXCHK_CHG_TYPE_KERN@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x4, x19
	bl	_qib_chg_pioavailkernel
	b	LBB0_14
LBB0_8:
	ldr	w2, [x20, #16]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x8
	bl	_qib_dev_err
Lloh16:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_9:
	stp	xzr, xzr, [x19, #48]
	str	xzr, [x19, #64]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_qib_clear_rcvhdrtail
LBB0_11:
	ldr	x8, [x20, #24]
	ldr	w0, [x19, #32]
Lloh19:
	adrp	x9, _QIB_RCVCTRL_CTXT_ENB@GOTPAGE
Lloh20:
	ldr	x9, [x9, _QIB_RCVCTRL_CTXT_ENB@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _QIB_RCVCTRL_TIDFLOW_ENB@GOTPAGE
Lloh23:
	ldr	x10, [x10, _QIB_RCVCTRL_TIDFLOW_ENB@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	orr	w1, w10, w9
	ldr	w2, [x19]
	blr	x8
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.12:
Lloh25:
	adrp	x8, _QIB_CTXT_MASTER_UNINIT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _QIB_CTXT_MASTER_UNINIT@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_clear_bit
	add	x0, x19, #12
	bl	_wake_up
LBB0_13:
	mov	w21, #0
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_QIB_CTXT_MASTER_UNINIT,4,2     ; @QIB_CTXT_MASTER_UNINIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u:ctxt%u: no 2KB buffers available\n"

	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
l_.str.1:                               ; @.str.1
	.asciz	"Ctxt%u: would use 4KB bufs, using %u\n"

	.comm	_TXCHK_CHG_TYPE_USER,4,2        ; @TXCHK_CHG_TYPE_USER
	.comm	_QIB_SENDCTRL_AVAIL_BLIP,4,2    ; @QIB_SENDCTRL_AVAIL_BLIP
	.comm	_QIB_RCVCTRL_CTXT_ENB,4,2       ; @QIB_RCVCTRL_CTXT_ENB
	.comm	_QIB_RCVCTRL_TIDFLOW_ENB,4,2    ; @QIB_RCVCTRL_TIDFLOW_ENB
	.comm	_TXCHK_CHG_TYPE_KERN,4,2        ; @TXCHK_CHG_TYPE_KERN
	.no_dead_strip	_qib_do_user_init
.subsections_via_symbols
