	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlgmac_maybe_stop_tx_queue
_xlgmac_maybe_stop_tx_queue:            ## @xlgmac_maybe_stop_tx_queue
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	%rsi, %rdi
	callq	_xlgmac_tx_avail_desc
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ebx, %ecx
	jae	LBB0_4
## %bb.1:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_info
	movl	8(%r14), %edi
	movl	(%r15), %esi
	callq	_netif_stop_subqueue
	movl	$1, (%r12)
	cmpq	$0, 8(%r12)
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	*(%r14)
LBB0_3:
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tx queue stopped, not enough descriptors available\n"

	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.no_dead_strip	_xlgmac_maybe_stop_tx_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlgmac_maybe_stop_tx_queue
_xlgmac_maybe_stop_tx_queue:            ; @xlgmac_maybe_stop_tx_queue
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0, #8]
	mov	x0, x1
	bl	_xlgmac_tx_avail_desc
	cmp	w0, w22
	b.hs	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _drv@GOTPAGE
Lloh1:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x21, #8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x21
	bl	_netif_info
	ldr	w0, [x21, #8]
	ldr	w1, [x20]
	bl	_netif_stop_subqueue
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x21]
	mov	x0, x20
	mov	x1, x19
	blr	x8
LBB0_3:
Lloh5:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tx queue stopped, not enough descriptors available\n"

	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.no_dead_strip	_xlgmac_maybe_stop_tx_queue
.subsections_via_symbols
