	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alx_clean_tx_irq
_alx_clean_tx_irq:                      ## @alx_clean_tx_irq
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_ALX_DEFAULT_TX_WORK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	28(%rdi), %edi
	callq	_netdev_priv
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_alx_get_tx_queue
	movq	%rax, %r14
	movq	(%r15), %rbx
	leaq	4(%r13), %rdi
	movl	24(%r15), %esi
	callq	_alx_read_mem16
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %rbx
	je	LBB0_9
## %bb.1:
	testl	%r12d, %r12d
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_2
## %bb.3:
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	(%rax), %r13d
	incl	%r14d
	decl	%r12d
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_alx_free_txbuf
	movq	%rbx, %rax
	incq	%rax
	cmpq	8(%r15), %rax
	movl	$0, %ebx
	cmovneq	%rax, %rbx
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%r12d, %r12d
	jg	LBB0_4
	jmp	LBB0_8
LBB0_2:
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
LBB0_8:
	movq	%rbx, (%r15)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	%rdi, %r14
	movl	%r13d, %edx
	callq	_netdev_tx_completed_queue
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_9:
	movq	%r14, %rdi
	callq	_netif_tx_queue_stopped
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movl	(%r13), %edi
	callq	_netif_carrier_ok
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	%r15, %rdi
	callq	_alx_tpd_avail
	cltq
	movq	8(%r15), %rcx
	shrq	$2, %rcx
	cmpq	%rax, %rcx
	jae	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_netif_tx_wake_queue
LBB0_13:
	xorl	%eax, %eax
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	sete	%al
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ALX_DEFAULT_TX_WORK,4,2        ## @ALX_DEFAULT_TX_WORK
	.no_dead_strip	_alx_clean_tx_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alx_clean_tx_irq
_alx_clean_tx_irq:                      ; @alx_clean_tx_irq
	.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	x19, x0
Lloh0:
	adrp	x8, _ALX_DEFAULT_TX_WORK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ALX_DEFAULT_TX_WORK@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	ldr	w0, [x0, #28]
	bl	_netdev_priv
	mov	x23, x0
	mov	x0, x19
	bl	_alx_get_tx_queue
	mov	x21, x0
	ldr	x20, [x19]
	add	x0, x23, #4
	ldr	w1, [x19, #24]
	bl	_alx_read_mem16
	mov	x22, x0
	cmp	x20, x0
	b.eq	LBB0_8
; %bb.1:
	cmp	w26, #1
	b.lt	LBB0_6
; %bb.2:
	mov	w25, #0
	mov	w24, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_alx_free_txbuf
	add	x8, x20, #1
	ldr	x9, [x19, #8]
	cmp	x8, x9
	csinc	x20, xzr, x20, eq
	cmp	x20, x22
	ccmp	w26, #0, #4, ne
	b.le	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x20, lsl #3]
	cbz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x8]
	add	w24, w24, w8
	add	w25, w25, #1
	sub	w26, w26, #1
	b	LBB0_3
LBB0_6:
	mov	w24, #0
	mov	w25, #0
LBB0_7:
	str	x20, [x19]
	mov	x0, x21
	mov	x1, x25
	mov	x2, x24
	bl	_netdev_tx_completed_queue
LBB0_8:
	mov	x0, x21
	bl	_netif_tx_queue_stopped
	cbz	x0, LBB0_12
; %bb.9:
	ldr	w0, [x23]
	bl	_netif_carrier_ok
	cbz	x0, LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_alx_tpd_avail
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	ldr	x9, [x19, #8]
	cmp	x8, x9, lsr #2
	b.ls	LBB0_12
; %bb.11:
	mov	x0, x21
	bl	_netif_tx_wake_queue
LBB0_12:
	cmp	x20, x22
	cset	w0, eq
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ALX_DEFAULT_TX_WORK,4,2        ; @ALX_DEFAULT_TX_WORK
	.no_dead_strip	_alx_clean_tx_irq
.subsections_via_symbols
