	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_femac_xmit_reclaim
_hisi_femac_xmit_reclaim:               ## @hisi_femac_xmit_reclaim
	.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, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_netif_tx_lock
	movq	_ADDRQ_STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r13d
	movq	_TX_CNT_INUSE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	xorl	%r12d, %r12d
	movl	$0, %r15d
	cmpl	(%rbx), %r13d
	jge	LBB0_10
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	(%rcx,%rax,8), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_unlikely
	xorl	%r15d, %r15d
	movl	$0, %r12d
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_hisi_femac_tx_dma_unmap
	addl	(%r14), %r12d
	movq	%r14, %rdi
	callq	_dev_kfree_skb_any
	decl	(%rbx)
	movq	_ADDRQ_STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r13d
	movq	16(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	_TX_CNT_INUSE_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %r13d
	movq	$0, (%rcx,%rax,8)
	incq	%rax
	movslq	24(%rbx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdx, 16(%rbx)
	cmpl	(%rbx), %r13d
	jge	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	32(%rbx), %rax
	movq	(%rax,%rdx,8), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_unlikely
	incl	%r15d
	testq	%rax, %rax
	je	LBB0_3
LBB0_6:
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_netdev_err
	jmp	LBB0_10
LBB0_9:
	incl	%r15d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_10:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_netdev_completed_queue
	movq	%r14, %rdi
	callq	_netif_queue_stopped
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_netif_wake_queue
LBB0_13:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_tx_unlock                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ADDRQ_STAT,8,3                 ## @ADDRQ_STAT
	.comm	_TX_CNT_INUSE_MASK,4,2          ## @TX_CNT_INUSE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"xmitq_cnt_inuse=%d, tx_fifo_used=%d\n"

	.no_dead_strip	_hisi_femac_xmit_reclaim
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_femac_xmit_reclaim
_hisi_femac_xmit_reclaim:               ; @hisi_femac_xmit_reclaim
	.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
	bl	_netdev_priv
	mov	x20, x0
	mov	x0, x19
	bl	_netif_tx_lock
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x25, _ADDRQ_STAT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ADDRQ_STAT@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x26, _TX_CNT_INUSE_MASK@GOTPAGE
Lloh3:
	ldr	x26, [x26, _TX_CNT_INUSE_MASK@GOTPAGEOFF]
	ldr	w8, [x26]
	and	w23, w8, w0
	ldr	w8, [x20]
	cmp	w23, w8
	b.ge	LBB0_3
; %bb.1:
	ldr	x8, [x20, #16]
	ldr	x9, [x20, #32]
	ldr	x24, [x9, x8, lsl #3]
	cmp	x24, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.2:
	mov	w21, #0
	mov	w22, #0
	b	LBB0_7
LBB0_3:
	mov	w22, #0
	mov	w21, #0
	b	LBB0_9
LBB0_4:
	mov	w22, #0
	mov	w21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x20, #16]
	mov	x0, x20
	mov	x1, x24
	bl	_hisi_femac_tx_dma_unmap
	ldr	w8, [x24]
	add	w22, w22, w8
	mov	x0, x24
	bl	_dev_kfree_skb_any
	ldr	w8, [x20]
	sub	w8, w8, #1
	str	w8, [x20]
	ldr	x8, [x20, #8]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x26]
	and	w23, w8, w0
	ldr	x8, [x20, #32]
	ldr	x9, [x20, #16]
	str	xzr, [x8, x9, lsl #3]
	add	x8, x9, #1
	ldrsw	x9, [x20, #24]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x20, #16]
	ldr	w9, [x20]
	cmp	w23, w9
	b.ge	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x20, #32]
	ldr	x24, [x9, x8, lsl #3]
	cmp	x24, #0
	cset	w0, eq
	bl	_unlikely
	add	w21, w21, #1
	cbz	x0, LBB0_5
LBB0_7:
	ldr	w3, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_netdev_err
	b	LBB0_9
LBB0_8:
	add	w21, w21, #1
LBB0_9:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_netdev_completed_queue
	mov	x0, x19
	bl	_netif_queue_stopped
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.10:
	cbz	w21, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_netif_wake_queue
LBB0_12:
	mov	x0, x19
	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
	b	_netif_tx_unlock
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ADDRQ_STAT,8,3                 ; @ADDRQ_STAT
	.comm	_TX_CNT_INUSE_MASK,4,2          ; @TX_CNT_INUSE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"xmitq_cnt_inuse=%d, tx_fifo_used=%d\n"

	.no_dead_strip	_hisi_femac_xmit_reclaim
.subsections_via_symbols
