	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ethoc_tx
_ethoc_tx:                              ## @ethoc_tx
	.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	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	leaq	12(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	(%rbx), %eax
	cmpl	4(%rbx), %eax
	jne	LBB0_2
## %bb.1:
	movl	%eax, %ecx
	jmp	LBB0_6
LBB0_2:
	leaq	-48(%rbp), %r12
	movq	_TX_BD_READY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	divl	8(%rbx)
	movq	%rbx, %rdi
	movl	%edx, %esi
	movq	%r12, %rdx
	callq	_ethoc_read_bd
	movl	(%r13), %eax
	testl	%eax, -48(%rbp)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	(%rbx)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ethoc_update_tx_stats
	movl	(%rbx), %eax
	movl	%eax, %ecx
	cmpl	4(%rbx), %eax
	jne	LBB0_3
	jmp	LBB0_6
LBB0_4:
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
LBB0_6:
	subl	%eax, %ecx
	movl	8(%rbx), %eax
	shrl	%eax
	cmpl	%eax, %ecx
	ja	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_netif_wake_queue
LBB0_8:
	movq	_INT_MASK_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ethoc_ack_irq
	movq	%r14, %rdi
	callq	_spin_unlock
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_BD_READY,4,2                ## @TX_BD_READY
	.comm	_INT_MASK_TX,4,2                ## @INT_MASK_TX
	.no_dead_strip	_ethoc_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ethoc_tx
_ethoc_tx:                              ; @ethoc_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_spin_lock
	ldp	w8, w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	x9, x8
	b	LBB0_6
LBB0_2:
Lloh0:
	adrp	x22, _TX_BD_READY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TX_BD_READY@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20, #8]
	udiv	w10, w8, w9
	msub	w1, w10, w9, w8
	add	x2, sp, #8
	mov	x0, x20
	bl	_ethoc_read_bd
	ldr	w8, [sp, #8]
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	add	x1, sp, #8
	mov	x0, x20
	bl	_ethoc_update_tx_stats
	ldp	w8, w10, [x20]
	mov	x9, x8
	cmp	w8, w10
	b.ne	LBB0_3
	b	LBB0_6
LBB0_5:
	ldp	w8, w9, [x20]
LBB0_6:
	sub	w8, w9, w8
	ldr	w9, [x20, #8]
	cmp	w8, w9, lsr #1
	b.hi	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_netif_wake_queue
LBB0_8:
Lloh2:
	adrp	x8, _INT_MASK_TX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INT_MASK_TX@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ethoc_ack_irq
	mov	x0, x19
	bl	_spin_unlock
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_BD_READY,4,2                ; @TX_BD_READY
	.comm	_INT_MASK_TX,4,2                ; @INT_MASK_TX
	.no_dead_strip	_ethoc_tx
.subsections_via_symbols
