	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_tx_avail
_bnx2_tx_avail:                         ## @bnx2_tx_avail
	.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	%rsi, %r15
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_barrier
	movl	(%r15), %ebx
	subl	4(%r15), %ebx
	movq	_BNX2_TX_DESC_CNT@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpl	(%r15), %ebx
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movzwl	%bx, %ebx
	cmpl	(%r15), %ebx
	jne	LBB0_3
## %bb.2:
	movq	_BNX2_MAX_TX_DESC_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_3:
	movl	(%r14), %eax
	subl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_TX_DESC_CNT,4,2           ## @BNX2_TX_DESC_CNT
	.comm	_BNX2_MAX_TX_DESC_CNT,4,2       ## @BNX2_MAX_TX_DESC_CNT
	.no_dead_strip	_bnx2_tx_avail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_tx_avail
_bnx2_tx_avail:                         ; @bnx2_tx_avail
	.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, x1
	mov	x19, x0
	bl	_barrier
	ldp	w8, w9, [x20]
Lloh0:
	adrp	x21, _BNX2_TX_DESC_CNT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BNX2_TX_DESC_CNT@GOTPAGEOFF]
	ldr	w10, [x21]
	sub	w20, w8, w9
	cmp	w20, w10
	cset	w0, ge
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	and	w8, w20, #0xffff
	ldr	w9, [x21]
Lloh2:
	adrp	x10, _BNX2_MAX_TX_DESC_CNT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _BNX2_MAX_TX_DESC_CNT@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w8, w9
	csel	w20, w10, w8, eq
LBB0_2:
	ldr	w8, [x19]
	sub	w0, w8, w20
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_TX_DESC_CNT,4,2           ; @BNX2_TX_DESC_CNT
	.comm	_BNX2_MAX_TX_DESC_CNT,4,2       ; @BNX2_MAX_TX_DESC_CNT
	.no_dead_strip	_bnx2_tx_avail
.subsections_via_symbols
