	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_7322_init_ctxt
_qib_7322_init_ctxt:                    ## @qib_7322_init_ctxt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	16(%rdi), %rdx
	movq	_NUM_IB_PORTS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_4
## %bb.1:
	cmpl	$2, (%rdx)
	movq	_KCTXT0_EGRCNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jl	LBB0_3
## %bb.2:
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	movl	%edx, 8(%rdi)
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovnel	%edx, %ecx
	jmp	LBB0_5
LBB0_4:
	movq	8(%rdx), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rdi)
	movq	_KCTXT0_EGRCNT@GOTPCREL(%rip), %rsi
	subl	%ecx, %eax
	imull	%edx, %eax
	addl	(%rsi), %eax
	movl	%eax, %ecx
	jmp	LBB0_5
LBB0_3:
	movl	%ecx, 8(%rdi)
	xorl	%ecx, %ecx
LBB0_5:
	movl	%ecx, 12(%rdi)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_IB_PORTS,8,3               ## @NUM_IB_PORTS
	.comm	_KCTXT0_EGRCNT,4,2              ## @KCTXT0_EGRCNT
	.no_dead_strip	_qib_7322_init_ctxt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_7322_init_ctxt
_qib_7322_init_ctxt:                    ; @qib_7322_init_ctxt
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _NUM_IB_PORTS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NUM_IB_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x10, [x0, #16]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
	ldr	w10, [x10]
Lloh3:
	adrp	x9, _KCTXT0_EGRCNT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KCTXT0_EGRCNT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w10, #2
	b.lt	LBB0_4
; %bb.2:
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	stp	w9, w8, [x0, #8]
	ret
LBB0_3:
	ldr	x10, [x10, #8]
	ldr	w10, [x10]
	str	w10, [x0, #8]
Lloh6:
	adrp	x11, _KCTXT0_EGRCNT@GOTPAGE
Lloh7:
	ldr	x11, [x11, _KCTXT0_EGRCNT@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	sub	w8, w8, w9
	madd	w8, w10, w8, w11
	str	w8, [x0, #12]
	ret
LBB0_4:
	stp	w9, wzr, [x0, #8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_IB_PORTS,8,3               ; @NUM_IB_PORTS
	.comm	_KCTXT0_EGRCNT,4,2              ; @KCTXT0_EGRCNT
	.no_dead_strip	_qib_7322_init_ctxt
.subsections_via_symbols
