	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnic_get_bnx2x_ctx
_cnic_get_bnx2x_ctx:                    ## @cnic_get_bnx2x_ctx
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %ecx
	movl	%esi, %eax
	movq	(%rdi), %rsi
	movq	16(%rsi), %rdx
	subl	(%rdx), %eax
	cltd
	idivl	(%rsi)
	movl	%edx, %r15d
	movslq	4(%rsi), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	leaq	-1(%r12), %rdx
	movq	8(%rsi), %rsi
	cltq
	movq	%rax, %rdi
	shlq	$4, %rdi
	movq	(%rsi,%rdi), %r13
	andq	%r13, %rdx
	subq	%rdx, %r12
	testq	%rdx, %rdx
	cmoveq	%rdx, %r12
	jmp	LBB0_3
LBB0_1:
	movq	8(%rsi), %rsi
	cltq
	movq	%rax, %rdx
	shlq	$4, %rdx
	movq	(%rsi,%rdx), %r13
	xorl	%r12d, %r12d
LBB0_3:
	movq	_BNX2X_CONTEXT_MEM_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	%edx, %r15d
	movslq	%r15d, %rdi
	shlq	$4, %rax
	movq	8(%rsi,%rax), %rbx
	addq	%r12, %rbx
	addq	%rdi, %rbx
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
LBB0_5:
	addl	%r12d, %r13d
	addl	%r13d, %r15d
	movl	%r15d, (%r14)
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2X_CONTEXT_MEM_SIZE,4,2     ## @BNX2X_CONTEXT_MEM_SIZE
	.no_dead_strip	_cnic_get_bnx2x_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnic_get_bnx2x_ctx
_cnic_get_bnx2x_ctx:                    ; @cnic_get_bnx2x_ctx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	ldr	x8, [x0]
	ldr	x9, [x8, #16]
	ldr	w9, [x9]
	sub	w9, w1, w9
	ldp	w10, w11, [x8]
                                        ; kill: def $w11 killed $w11 def $x11
	sxtw	x11, w11
	sdiv	w12, w9, w10
	msub	w9, w12, w10, w9
	cbz	w11, LBB0_2
; %bb.1:
	ldr	x10, [x8, #8]
                                        ; kill: def $w12 killed $w12 killed $x12 def $x12
	sbfiz	x8, x12, #4, #32
	ldr	x21, [x10, x8]
	sub	x8, x11, #1
	ands	x13, x21, x8
	sub	x13, x11, x13
	tst	x21, x8
	sxtw	x11, w12
	csel	x22, xzr, x13, eq
	b	LBB0_3
LBB0_2:
	mov	x22, #0
	ldr	x10, [x8, #8]
	sxtw	x11, w12
	sbfiz	x8, x12, #4, #32
	ldr	x21, [x10, x8]
LBB0_3:
Lloh0:
	adrp	x8, _BNX2X_CONTEXT_MEM_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNX2X_CONTEXT_MEM_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w23, w8, w9
	add	x9, x10, x11, lsl #4
	ldr	x9, [x9, #8]
	add	x9, x9, x22
	add	x20, x9, w23, sxtw
	cbz	w2, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x8
	bl	_memset
LBB0_5:
	add	w8, w21, w22
	add	w8, w23, w8
	str	w8, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2X_CONTEXT_MEM_SIZE,4,2     ; @BNX2X_CONTEXT_MEM_SIZE
	.no_dead_strip	_cnic_get_bnx2x_ctx
.subsections_via_symbols
