	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_7220_config_ctxts
_qib_7220_config_ctxts:                 ## @qib_7220_config_ctxts
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_kr_portcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_qib_read_kreg32
	movq	%rax, %r14
	movq	40(%rbx), %rax
	movq	%r14, 16(%rax)
	movq	_qib_n_krcv_queues@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_3
## %bb.1:
	movl	$62, (%rbx)
	movslq	(%rax), %rax
	movslq	8(%rbx), %r15
	imulq	%rax, %r15
	movl	%r15d, 4(%rbx)
	cmpq	%r14, %r15
	jle	LBB0_4
## %bb.2:
	movl	%r14d, 4(%rbx)
	movl	%r14d, %r15d
	jmp	LBB0_4
LBB0_3:
	movl	8(%rbx), %r15d
	movl	%r15d, 4(%rbx)
LBB0_4:
	movslq	%r15d, %rax
	movq	%rax, 16(%rbx)
	movq	_qib_cfgctxts@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.9:
	cmpq	%r14, %rcx
	jle	LBB0_10
	jmp	LBB0_11
LBB0_5:
	xorl	%eax, %eax
	callq	_num_online_cpus
	addl	%r15d, %eax
	movl	$5, %ecx
	cmpl	$6, %eax
	jl	LBB0_10
## %bb.6:
	movl	$9, %ecx
	cmpl	$10, %eax
	jb	LBB0_10
## %bb.7:
	movl	%eax, %eax
	cmpq	%r14, %rax
	jg	LBB0_11
## %bb.8:
	movl	%r14d, %ecx
LBB0_10:
	movl	%ecx, 24(%rbx)
LBB0_11:
	cmpl	$0, 24(%rbx)
	jne	LBB0_13
## %bb.12:
	movl	%r14d, 24(%rbx)
LBB0_13:
	movq	40(%rbx), %rdi
	addq	$8, %rdi
	callq	_spin_lock_irqsave
	movl	24(%rbx), %ecx
	movl	$2, %eax
	cmpl	$9, %ecx
	jg	LBB0_15
## %bb.14:
	movl	$1, %eax
	cmpl	$6, %ecx
	jl	LBB0_16
LBB0_15:
	movq	_IBA7220_R_CTXTCFG_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	orq	%rax, 32(%rbx)
LBB0_16:
	cmpl	$0, (%rbx)
	je	LBB0_17
## %bb.18:
	movq	_QIB_7220_RcvCtrl_RcvQPMapEnable_LSB@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	32(%rbx), %rdx
	btsq	%rax, %rdx
	movq	%rdx, 32(%rbx)
	jmp	LBB0_19
LBB0_17:
	movq	32(%rbx), %rdx
LBB0_19:
	movq	_kr_rcvctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qib_write_kreg
	movq	40(%rbx), %rdi
	addq	$8, %rdi
	callq	_spin_unlock_irqrestore
	movq	_kr_rcvegrcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qib_read_kreg32
	movq	40(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	_IBA7220_KRCVEGRCNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_max
	movl	%eax, 48(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kr_portcnt,4,2                 ## @kr_portcnt
	.comm	_qib_n_krcv_queues,4,2          ## @qib_n_krcv_queues
	.comm	_qib_cfgctxts,8,3               ## @qib_cfgctxts
	.comm	_IBA7220_R_CTXTCFG_SHIFT,8,3    ## @IBA7220_R_CTXTCFG_SHIFT
	.comm	_QIB_7220_RcvCtrl_RcvQPMapEnable_LSB,8,3 ## @QIB_7220_RcvCtrl_RcvQPMapEnable_LSB
	.comm	_kr_rcvctrl,4,2                 ## @kr_rcvctrl
	.comm	_kr_rcvegrcnt,4,2               ## @kr_rcvegrcnt
	.comm	_IBA7220_KRCVEGRCNT,4,2         ## @IBA7220_KRCVEGRCNT
	.no_dead_strip	_qib_7220_config_ctxts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_7220_config_ctxts
_qib_7220_config_ctxts:                 ; @qib_7220_config_ctxts
	.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	x19, x0
Lloh0:
	adrp	x8, _kr_portcnt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kr_portcnt@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_qib_read_kreg32
	mov	x20, x0
	ldr	x8, [x19, #40]
	str	x0, [x8, #16]
Lloh3:
	adrp	x8, _qib_n_krcv_queues@GOTPAGE
Lloh4:
	ldr	x8, [x8, _qib_n_krcv_queues@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #2
	b.lt	LBB0_3
; %bb.1:
	mov	w9, #62
	str	w9, [x19]
	ldrsw	x8, [x8]
	ldrsw	x9, [x19, #8]
	mul	x8, x9, x8
	str	w8, [x19, #4]
	mov	x21, x8
	cmp	x8, x20
	b.le	LBB0_4
; %bb.2:
	str	w20, [x19, #4]
	mov	x21, x20
	b	LBB0_4
LBB0_3:
	ldr	w21, [x19, #8]
	str	w21, [x19, #4]
LBB0_4:
	sxtw	x8, w21
	str	x8, [x19, #16]
Lloh5:
	adrp	x8, _qib_cfgctxts@GOTPAGE
Lloh6:
	ldr	x8, [x8, _qib_cfgctxts@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	cmp	x8, x20
	b.le	LBB0_12
	b	LBB0_13
LBB0_6:
	bl	_num_online_cpus
	add	w8, w0, w21
	cmp	w8, #6
	b.ge	LBB0_8
; %bb.7:
	mov	w8, #5
	b	LBB0_12
LBB0_8:
	cmp	w8, #10
	b.hs	LBB0_10
; %bb.9:
	mov	w8, #9
	b	LBB0_12
LBB0_10:
	cmp	x8, x20
	b.gt	LBB0_13
; %bb.11:
	mov	x8, x20
LBB0_12:
	str	w8, [x19, #24]
LBB0_13:
	ldr	w8, [x19, #24]
	cbnz	w8, LBB0_15
; %bb.14:
	str	w20, [x19, #24]
LBB0_15:
	ldr	x8, [x19, #40]
	add	x0, x8, #8
	bl	_spin_lock_irqsave
	ldr	w8, [x19, #24]
	cmp	w8, #9
	b.le	LBB0_17
; %bb.16:
	mov	w8, #2
	b	LBB0_19
LBB0_17:
	cmp	w8, #6
	b.lt	LBB0_20
; %bb.18:
	mov	w8, #1
LBB0_19:
Lloh8:
	adrp	x9, _IBA7220_R_CTXTCFG_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IBA7220_R_CTXTCFG_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	lsl	x8, x8, x9
	ldr	x9, [x19, #32]
	orr	x8, x9, x8
	str	x8, [x19, #32]
LBB0_20:
	ldr	w8, [x19]
	cbz	w8, LBB0_22
; %bb.21:
Lloh11:
	adrp	x8, _QIB_7220_RcvCtrl_RcvQPMapEnable_LSB@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QIB_7220_RcvCtrl_RcvQPMapEnable_LSB@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	mov	w9, #1
	lsl	x8, x9, x8
	ldr	x9, [x19, #32]
	orr	x2, x9, x8
	str	x2, [x19, #32]
	b	LBB0_23
LBB0_22:
	ldr	x2, [x19, #32]
LBB0_23:
Lloh14:
	adrp	x8, _kr_rcvctrl@GOTPAGE
Lloh15:
	ldr	x8, [x8, _kr_rcvctrl@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qib_write_kreg
	ldr	x8, [x19, #40]
	add	x0, x8, #8
	bl	_spin_unlock_irqrestore
Lloh17:
	adrp	x8, _kr_rcvegrcnt@GOTPAGE
Lloh18:
	ldr	x8, [x8, _kr_rcvegrcnt@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qib_read_kreg32
	ldr	x8, [x19, #40]
	str	x0, [x8]
Lloh20:
	adrp	x8, _IBA7220_KRCVEGRCNT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IBA7220_KRCVEGRCNT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_max
	str	w0, [x19, #48]
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_kr_portcnt,4,2                 ; @kr_portcnt
	.comm	_qib_n_krcv_queues,4,2          ; @qib_n_krcv_queues
	.comm	_qib_cfgctxts,8,3               ; @qib_cfgctxts
	.comm	_IBA7220_R_CTXTCFG_SHIFT,8,3    ; @IBA7220_R_CTXTCFG_SHIFT
	.comm	_QIB_7220_RcvCtrl_RcvQPMapEnable_LSB,8,3 ; @QIB_7220_RcvCtrl_RcvQPMapEnable_LSB
	.comm	_kr_rcvctrl,4,2                 ; @kr_rcvctrl
	.comm	_kr_rcvegrcnt,4,2               ; @kr_rcvegrcnt
	.comm	_IBA7220_KRCVEGRCNT,4,2         ; @IBA7220_KRCVEGRCNT
	.no_dead_strip	_qib_7220_config_ctxts
.subsections_via_symbols
