	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_nic_tx_poll_one
_hns_nic_tx_poll_one:                   ## @hns_nic_tx_poll_one
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	movq	16(%rdi), %rbx
	movq	%r15, %rdi
	callq	_netdev_priv
	movq	%rax, %r13
	movq	_RCB_REG_HEAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	callq	_readl_relaxed
	movl	%eax, %r14d
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	callq	_rmb
	movq	%rbx, %rdi
	callq	_is_ring_empty
	testq	%rax, %rax
	jne	LBB0_20
## %bb.1:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	cmpl	(%rbx), %r14d
	je	LBB0_20
## %bb.2:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_is_valid_clean_head
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	$0, -60(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, %eax
	movl	$0, %ecx
	cmpl	(%rbx), %r14d
	je	LBB0_8
## %bb.5:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	leaq	-60(%rbp), %r13
	leaq	-44(%rbp), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_hns_nic_reclaim_one_desc
	movslq	(%rbx), %rdi
	shlq	$2, %rdi
	addq	24(%rbx), %rdi
	callq	_prefetch
	cmpl	(%rbx), %r14d
	jne	LBB0_6
## %bb.7:
	movl	-44(%rbp), %ecx
	movl	-60(%rbp), %eax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_8:
	addl	%ecx, 8(%rbx)
	addl	%eax, 12(%rbx)
	movl	(%r12), %esi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_netdev_get_tx_queue
	movq	%rax, %r12
	movl	-44(%rbp), %esi
	movl	-60(%rbp), %edx
	movq	%rax, %rdi
	callq	_netdev_tx_completed_queue
	cmpq	$0, 8(%r13)
	movl	$0, %edi
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_netif_carrier_ok
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
LBB0_10:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_netif_carrier_on
LBB0_12:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	cmpl	$0, -44(%rbp)
	movl	$0, %edi
	je	LBB0_15
## %bb.13:
	movq	%r14, %rdi
	callq	_netif_carrier_ok
	movl	$0, %edi
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_ring_space
	movl	4(%rbx), %ecx
	addl	%ecx, %ecx
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	setge	%dil
LBB0_15:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	xorl	%eax, %eax
	callq	_smp_mb
	movq	%r12, %rdi
	callq	_netif_tx_queue_stopped
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movq	_NIC_STATE_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movq	%r12, %rdi
	callq	_netif_tx_wake_queue
	incl	16(%rbx)
	jmp	LBB0_20
LBB0_3:
	movl	(%rbx), %r8d
	movl	32(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_netdev_err
	incl	20(%rbx)
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_20
LBB0_17:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
LBB0_20:
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCB_REG_HEAD,8,3               ## @RCB_REG_HEAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrong head (%d, %d-%d)\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_NIC_STATE_DOWN,4,2             ## @NIC_STATE_DOWN
	.no_dead_strip	_hns_nic_tx_poll_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_nic_tx_poll_one
_hns_nic_tx_poll_one:                   ; @hns_nic_tx_poll_one
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x0
	ldp	x21, x19, [x0, #8]
	mov	x0, x21
	bl	_netdev_priv
	mov	x20, x0
	ldr	x8, [x19, #40]
Lloh0:
	adrp	x9, _RCB_REG_HEAD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RCB_REG_HEAD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x23, x0
	bl	_rmb
	mov	x0, x19
	bl	_is_ring_empty
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	cmp	w23, w8
	b.ne	LBB0_4
LBB0_2:
	mov	w0, #0
LBB0_3:
	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
	add	sp, sp, #80
	ret
LBB0_4:
	mov	x0, x19
	mov	x1, x23
	bl	_is_valid_clean_head
	cbz	w0, LBB0_14
; %bb.5:
	mov	w9, #0
	mov	w8, #0
	str	xzr, [sp, #8]
	ldr	w10, [x19]
	cmp	w23, w10
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	bl	_hns_nic_reclaim_one_desc
	ldr	x8, [x19, #24]
	ldrsw	x9, [x19]
	add	x0, x8, x9, lsl #2
	bl	_prefetch
	ldr	w8, [x19]
	cmp	w23, w8
	b.ne	LBB0_6
; %bb.7:
	ldp	w8, w9, [sp, #8]
LBB0_8:
	ldp	w10, w11, [x19, #8]
	add	w8, w10, w8
	add	w9, w11, w9
	stp	w8, w9, [x19, #8]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_netdev_get_tx_queue
	mov	x22, x0
	ldp	w1, w2, [sp, #8]
	bl	_netdev_tx_completed_queue
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_15
; %bb.9:
	mov	x0, x21
	bl	_netif_carrier_ok
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_11
LBB0_10:
	mov	x0, x21
	bl	_netif_carrier_on
LBB0_11:
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_16
; %bb.12:
	mov	x0, x21
	bl	_netif_carrier_ok
	cbz	x0, LBB0_17
; %bb.13:
	mov	x0, x19
	bl	_ring_space
	ldr	w8, [x19, #4]
	cmp	w0, w8, lsl #1
	cset	w0, ge
	b	LBB0_17
LBB0_14:
	ldr	w3, [x19, #32]
	ldr	w4, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x23
	bl	_netdev_err
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_15:
	mov	w0, #0
	bl	_unlikely
	cbnz	x0, LBB0_10
	b	LBB0_11
LBB0_16:
	mov	w0, #0
LBB0_17:
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.18:
	bl	_smp_mb
	mov	x0, x22
	bl	_netif_tx_queue_stopped
	cbz	x0, LBB0_3
; %bb.19:
Lloh8:
	adrp	x8, _NIC_STATE_DOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NIC_STATE_DOWN@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbnz	w0, LBB0_2
; %bb.20:
	mov	x0, x22
	bl	_netif_tx_wake_queue
	mov	w0, #0
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RCB_REG_HEAD,8,3               ; @RCB_REG_HEAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrong head (%d, %d-%d)\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_NIC_STATE_DOWN,4,2             ; @NIC_STATE_DOWN
	.no_dead_strip	_hns_nic_tx_poll_one
.subsections_via_symbols
