	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxbf_tmfifo_get_tx_avail
_mlxbf_tmfifo_get_tx_avail:             ## @mlxbf_tmfifo_get_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_VIRTIO_ID_NET@GOTPCREL(%rip), %rax
	movl	$1, %r14d
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %eax
	movq	_MLXBF_TMFIFO_RESERVE_RATIO@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %r14d
LBB0_2:
	movq	_MLXBF_TMFIFO_TX_STS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readq
	movq	_MLXBF_TMFIFO_TX_STS__COUNT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_FIELD_GET
	movl	(%rbx), %ecx
	addl	%r14d, %eax
	subl	%eax, %ecx
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIRTIO_ID_NET,4,2              ## @VIRTIO_ID_NET
	.comm	_MLXBF_TMFIFO_RESERVE_RATIO,4,2 ## @MLXBF_TMFIFO_RESERVE_RATIO
	.comm	_MLXBF_TMFIFO_TX_STS,8,3        ## @MLXBF_TMFIFO_TX_STS
	.comm	_MLXBF_TMFIFO_TX_STS__COUNT_MASK,4,2 ## @MLXBF_TMFIFO_TX_STS__COUNT_MASK
	.no_dead_strip	_mlxbf_tmfifo_get_tx_avail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxbf_tmfifo_get_tx_avail
_mlxbf_tmfifo_get_tx_avail:             ; @mlxbf_tmfifo_get_tx_avail
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _VIRTIO_ID_NET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIRTIO_ID_NET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _MLXBF_TMFIFO_RESERVE_RATIO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLXBF_TMFIFO_RESERVE_RATIO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sdiv	w20, w8, w9
	b	LBB0_3
LBB0_2:
	mov	w20, #1
LBB0_3:
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _MLXBF_TMFIFO_TX_STS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLXBF_TMFIFO_TX_STS@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readq
	mov	x1, x0
Lloh9:
	adrp	x8, _MLXBF_TMFIFO_TX_STS__COUNT_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLXBF_TMFIFO_TX_STS__COUNT_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_FIELD_GET
	ldr	w8, [x19]
	add	w9, w0, w20
	sub	w0, w8, w9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VIRTIO_ID_NET,4,2              ; @VIRTIO_ID_NET
	.comm	_MLXBF_TMFIFO_RESERVE_RATIO,4,2 ; @MLXBF_TMFIFO_RESERVE_RATIO
	.comm	_MLXBF_TMFIFO_TX_STS,8,3        ; @MLXBF_TMFIFO_TX_STS
	.comm	_MLXBF_TMFIFO_TX_STS__COUNT_MASK,4,2 ; @MLXBF_TMFIFO_TX_STS__COUNT_MASK
	.no_dead_strip	_mlxbf_tmfifo_get_tx_avail
.subsections_via_symbols
