	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_set_rx_ring_size
_bnx2_set_rx_ring_size:                 ## @bnx2_set_rx_ring_size
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	64(%rdi), %rax
	movq	(%rax), %rax
	movq	_ETH_HLEN@GOTPCREL(%rip), %rcx
	movq	_BNX2_RX_OFFSET@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	addq	(%rcx), %rax
	leaq	(%rdx,%rax), %r13
	addq	$8, %r13
	movq	_BNX2_RX_ALIGN@GOTPCREL(%rip), %rax
	movl	%r13d, %r12d
	movl	(%rax), %edi
	addl	%r13d, %edi
	callq	_SKB_DATA_ALIGN
	movq	%rax, %rbx
	movq	_NET_SKB_PAD@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movl	$4, %edi
	callq	_SKB_DATA_ALIGN
	addq	%rbx, %rax
	movq	_BNX2_RX_COPY_THRESH@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	%rcx, 48(%r15)
	movq	$0, 56(%r15)
	movq	$0, (%r15)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_3
## %bb.1:
	movq	_BNX2_FLAG_JUMBO_BROKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	jne	LBB0_3
## %bb.2:
	movq	64(%r15), %rax
	movq	(%rax), %rdi
	addq	$-40, %rdi
	callq	_PAGE_ALIGN
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movslq	%eax, %rdi
	imulq	%r14, %rdi
	movq	_BNX2_MAX_TOTAL_RX_PG_DESC_CNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdi
	cmovgeq	%rax, %rdi
	movq	%rdi, 56(%r15)
	movq	_BNX2_MAX_RX_PG_RINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bnx2_find_max_ring
	movl	%eax, (%r15)
	movq	_BNX2_RX_DESC_CNT@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	decl	%eax
	movl	%eax, 4(%r15)
	movq	_BNX2_RX_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	addq	(%rbx), %r12
	movq	$0, 48(%r15)
	movq	%r12, %r13
LBB0_3:
	movl	%r12d, 12(%r15)
	movq	_BNX2_RX_ALIGN@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_SKB_DATA_ALIGN
	movq	%rax, %rbx
	movq	_NET_SKB_PAD@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movl	$4, %edi
	callq	_SKB_DATA_ALIGN
	addq	%rbx, %rax
	movq	%rax, 40(%r15)
	movq	_BNX2_RX_OFFSET@GOTPCREL(%rip), %rax
	subq	(%rax), %r13
	movq	%r13, 32(%r15)
	movq	%r14, 24(%r15)
	movq	_BNX2_MAX_RX_RINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bnx2_find_max_ring
	movl	%eax, 16(%r15)
	movq	_BNX2_RX_DESC_CNT@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	decl	%eax
	movl	%eax, 20(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_HLEN,8,3                   ## @ETH_HLEN
	.comm	_BNX2_RX_OFFSET,8,3             ## @BNX2_RX_OFFSET
	.comm	_BNX2_RX_ALIGN,4,2              ## @BNX2_RX_ALIGN
	.comm	_NET_SKB_PAD,8,3                ## @NET_SKB_PAD
	.comm	_BNX2_RX_COPY_THRESH,8,3        ## @BNX2_RX_COPY_THRESH
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_BNX2_FLAG_JUMBO_BROKEN,4,2     ## @BNX2_FLAG_JUMBO_BROKEN
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_BNX2_MAX_TOTAL_RX_PG_DESC_CNT,8,3 ## @BNX2_MAX_TOTAL_RX_PG_DESC_CNT
	.comm	_BNX2_MAX_RX_PG_RINGS,4,2       ## @BNX2_MAX_RX_PG_RINGS
	.comm	_BNX2_RX_DESC_CNT,4,2           ## @BNX2_RX_DESC_CNT
	.comm	_BNX2_MAX_RX_RINGS,4,2          ## @BNX2_MAX_RX_RINGS
	.no_dead_strip	_bnx2_set_rx_ring_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_set_rx_ring_size
_bnx2_set_rx_ring_size:                 ; @bnx2_set_rx_ring_size
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #64]
Lloh0:
	adrp	x9, _ETH_HLEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ETH_HLEN@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x21, _BNX2_RX_OFFSET@GOTPAGE
Lloh4:
	ldr	x21, [x21, _BNX2_RX_OFFSET@GOTPAGEOFF]
	ldr	x10, [x21]
	add	x8, x8, x9
	add	x8, x8, x10
	add	x25, x8, #8
Lloh5:
	adrp	x22, _BNX2_RX_ALIGN@GOTPAGE
Lloh6:
	ldr	x22, [x22, _BNX2_RX_ALIGN@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w0, w8, w25
	bl	_SKB_DATA_ALIGN
Lloh7:
	adrp	x24, _NET_SKB_PAD@GOTPAGE
Lloh8:
	ldr	x24, [x24, _NET_SKB_PAD@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x23, x8, x0
	mov	w0, #4
	bl	_SKB_DATA_ALIGN
Lloh9:
	adrp	x26, _BNX2_RX_COPY_THRESH@GOTPAGE
Lloh10:
	ldr	x26, [x26, _BNX2_RX_COPY_THRESH@GOTPAGEOFF]
	ldr	x8, [x26]
	stp	x8, xzr, [x19, #48]
Lloh11:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
	str	xzr, [x19]
Lloh13:
	ldr	x8, [x8]
	add	x9, x23, x0
	cmp	x9, x8
Lloh14:
	adrp	x23, _BNX2_RX_DESC_CNT@GOTPAGE
Lloh15:
	ldr	x23, [x23, _BNX2_RX_DESC_CNT@GOTPAGEOFF]
	b.le	LBB0_3
; %bb.1:
	ldr	w8, [x19, #8]
Lloh16:
	adrp	x9, _BNX2_FLAG_JUMBO_BROKEN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BNX2_FLAG_JUMBO_BROKEN@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x19, #64]
	ldr	x8, [x8]
	sub	x0, x8, #40
	bl	_PAGE_ALIGN
Lloh19:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	asr	w8, w0, w8
	sxtw	x8, w8
	mul	x8, x8, x20
Lloh22:
	adrp	x9, _BNX2_MAX_TOTAL_RX_PG_DESC_CNT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _BNX2_MAX_TOTAL_RX_PG_DESC_CNT@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x0, x8, x9, lt
	str	x0, [x19, #56]
Lloh25:
	adrp	x8, _BNX2_MAX_RX_PG_RINGS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BNX2_MAX_RX_PG_RINGS@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_bnx2_find_max_ring
	str	w0, [x19]
	ldr	w8, [x23]
	mul	w8, w8, w0
	sub	w8, w8, #1
	str	w8, [x19, #4]
	ldr	x8, [x26]
	ldr	x9, [x21]
	add	x25, x9, x8
	str	xzr, [x19, #48]
LBB0_3:
	str	w25, [x19, #12]
	ldr	w8, [x22]
	add	w0, w8, w25
	bl	_SKB_DATA_ALIGN
	ldr	x8, [x24]
	add	x22, x8, x0
	mov	w0, #4
	bl	_SKB_DATA_ALIGN
	add	x8, x22, x0
	str	x8, [x19, #40]
	ldr	x8, [x21]
	sub	x8, x25, x8
	stp	x20, x8, [x19, #24]
Lloh28:
	adrp	x8, _BNX2_MAX_RX_RINGS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BNX2_MAX_RX_RINGS@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_bnx2_find_max_ring
	ldr	w8, [x23]
	mul	w8, w8, w0
	sub	w8, w8, #1
	stp	w0, w8, [x19, #16]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_HLEN,8,3                   ; @ETH_HLEN
	.comm	_BNX2_RX_OFFSET,8,3             ; @BNX2_RX_OFFSET
	.comm	_BNX2_RX_ALIGN,4,2              ; @BNX2_RX_ALIGN
	.comm	_NET_SKB_PAD,8,3                ; @NET_SKB_PAD
	.comm	_BNX2_RX_COPY_THRESH,8,3        ; @BNX2_RX_COPY_THRESH
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_BNX2_FLAG_JUMBO_BROKEN,4,2     ; @BNX2_FLAG_JUMBO_BROKEN
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_BNX2_MAX_TOTAL_RX_PG_DESC_CNT,8,3 ; @BNX2_MAX_TOTAL_RX_PG_DESC_CNT
	.comm	_BNX2_MAX_RX_PG_RINGS,4,2       ; @BNX2_MAX_RX_PG_RINGS
	.comm	_BNX2_RX_DESC_CNT,4,2           ; @BNX2_RX_DESC_CNT
	.comm	_BNX2_MAX_RX_RINGS,4,2          ; @BNX2_MAX_RX_RINGS
	.no_dead_strip	_bnx2_set_rx_ring_size
.subsections_via_symbols
