	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_tx_work
_niu_tx_work:                           ## @niu_tx_work
	.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	%rsi, %r15
	movq	%rdi, %r12
	movq	%rsi, %rax
	subq	8(%rdi), %rax
	shrq	$2, %rax
	imull	$-1431655765, %eax, %esi        ## imm = 0xAAAAAAAB
	movq	(%rdi), %rdi
	callq	_netdev_get_tx_queue
	movq	%rax, %r14
	movq	_TX_CS_MK@GOTPCREL(%rip), %rax
	movq	_TX_CS_MMK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	(%r15), %r13d
	xorl	%edi, %edi
	testl	%r13d, %ecx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_TX_CS_PKT_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%ebx, %r13d
	movq	_TX_CS_PKT_CNT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r13d
	movl	%r13d, %r14d
	sarl	%cl, %ebx
	subl	4(%r15), %r14d
	movl	%r13d, 4(%r15)
	movl	8(%r15), %r13d
	movq	_TX_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	andl	%ebx, %ecx
	movl	%r13d, %r8d
	callq	_niudbg
	andl	%r14d, %ebx
	je	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_release_tx_packet
	movl	%eax, %r13d
	decl	%ebx
	jne	LBB0_2
LBB0_3:
	movl	%r13d, 8(%r15)
	xorl	%eax, %eax
	callq	_smp_mb
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_4:
	movq	%r14, %rdi
	callq	_netif_tx_queue_stopped
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	callq	_niu_tx_avail
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_NIU_TX_WAKEUP_THRESH
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	setg	%dil
	jmp	LBB0_7
LBB0_5:
	xorl	%edi, %edi
LBB0_7:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	xorl	%eax, %eax
	callq	_smp_processor_id
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	___netif_tx_lock
	movq	%r14, %rdi
	callq	_netif_tx_queue_stopped
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	callq	_niu_tx_avail
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_NIU_TX_WAKEUP_THRESH
	cmpq	%rax, %rbx
	jle	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_netif_tx_wake_queue
LBB0_11:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___netif_tx_unlock              ## TAILCALL
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_CS_MK,4,2                   ## @TX_CS_MK
	.comm	_TX_CS_MMK,4,2                  ## @TX_CS_MMK
	.comm	_TX_CS_PKT_CNT,4,2              ## @TX_CS_PKT_CNT
	.comm	_TX_CS_PKT_CNT_SHIFT,4,2        ## @TX_CS_PKT_CNT_SHIFT
	.comm	_TX_DONE,4,2                    ## @TX_DONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: niu_tx_work() pkt_cnt[%u] cons[%d]\n"

	.no_dead_strip	_niu_tx_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_tx_work
_niu_tx_work:                           ; @niu_tx_work
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x21, x0
	ldp	x0, x8, [x0]
	sub	x8, x1, x8
	lsr	x8, x8, #2
	mov	w9, #43691
	movk	w9, #43690, lsl #16
	mul	w1, w8, w9
	bl	_netdev_get_tx_queue
	mov	x20, x0
	ldr	w22, [x19]
Lloh0:
	adrp	x8, _TX_CS_MK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TX_CS_MK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _TX_CS_MMK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TX_CS_MMK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w22
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _TX_CS_PKT_CNT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TX_CS_PKT_CNT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w9, w8, w22
Lloh9:
	adrp	x10, _TX_CS_PKT_CNT_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TX_CS_PKT_CNT_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	asr	w9, w9, w10
	asr	w8, w8, w10
	ldp	w10, w22, [x19, #4]
	sub	w10, w9, w10
	and	w23, w10, w8
	str	w9, [x19, #4]
Lloh12:
	adrp	x8, _TX_DONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TX_DONE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x8, [x21]
	ldr	w2, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x23
	mov	x4, x22
	bl	_niudbg
	cbz	w23, LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w23, w23, #1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_release_tx_packet
	mov	x22, x0
	cbnz	w23, LBB0_2
LBB0_3:
	str	w22, [x19, #8]
	bl	_smp_mb
LBB0_4:
	mov	x0, x20
	bl	_netif_tx_queue_stopped
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_niu_tx_avail
	mov	x21, x0
	mov	x0, x19
	bl	_NIU_TX_WAKEUP_THRESH
	cmp	x21, x0
	cset	w0, gt
LBB0_6:
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.7:
	bl	_smp_processor_id
	mov	x1, x0
	mov	x0, x20
	bl	___netif_tx_lock
	mov	x0, x20
	bl	_netif_tx_queue_stopped
	cbz	x0, LBB0_10
; %bb.8:
	mov	x0, x19
	bl	_niu_tx_avail
	mov	x21, x0
	mov	x0, x19
	bl	_NIU_TX_WAKEUP_THRESH
	cmp	x21, x0
	b.le	LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_netif_tx_wake_queue
LBB0_10:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	___netif_tx_unlock
LBB0_11:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_CS_MK,4,2                   ; @TX_CS_MK
	.comm	_TX_CS_MMK,4,2                  ; @TX_CS_MMK
	.comm	_TX_CS_PKT_CNT,4,2              ; @TX_CS_PKT_CNT
	.comm	_TX_CS_PKT_CNT_SHIFT,4,2        ; @TX_CS_PKT_CNT_SHIFT
	.comm	_TX_DONE,4,2                    ; @TX_DONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: niu_tx_work() pkt_cnt[%u] cons[%d]\n"

	.no_dead_strip	_niu_tx_work
.subsections_via_symbols
