	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_femac_net_xmit
_hisi_femac_net_xmit:                   ## @hisi_femac_net_xmit
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	_ADDRQ_STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_BIT_TX_READY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	24(%rbx), %rdi
	movl	56(%rbx), %esi
	movl	32(%rbx), %edx
	callq	_CIRC_SPACE
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_IRQ_INT_TX_PER_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hisi_femac_irq_enable
	incl	12(%r15)
	incl	16(%r15)
	movq	%r15, %rdi
	callq	_netif_stop_queue
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_3:
	movl	16(%rbx), %edi
	movl	8(%r14), %esi
	movq	(%r14), %rdx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, %r12
	movl	16(%rbx), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_dev_kfree_skb_any
	incl	12(%r15)
	jmp	LBB0_9
LBB0_5:
	movq	24(%rbx), %rax
	movq	48(%rbx), %rcx
	movq	%r12, (%rcx,%rax,8)
	movq	24(%rbx), %rax
	movq	40(%rbx), %rcx
	movq	%r14, (%rcx,%rax,8)
	incq	%rax
	movslq	32(%rbx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_6
## %bb.7:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_8
LBB0_6:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_8:
	movq	%rdx, 24(%rbx)
	movq	_EQ_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movq	%r12, %rdi
	callq	_writel
	movq	_ETH_FCS_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	movq	_EQFRM_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	incl	(%rbx)
	incl	8(%r15)
	movq	(%r14), %rsi
	addq	%rsi, (%r15)
	movq	%r15, %rdi
	callq	_netdev_sent_queue
LBB0_9:
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADDRQ_STAT,8,3                 ## @ADDRQ_STAT
	.comm	_BIT_TX_READY,4,2               ## @BIT_TX_READY
	.comm	_IRQ_INT_TX_PER_PACKET,4,2      ## @IRQ_INT_TX_PER_PACKET
	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.comm	_EQ_ADDR,8,3                    ## @EQ_ADDR
	.comm	_ETH_FCS_LEN,8,3                ## @ETH_FCS_LEN
	.comm	_EQFRM_LEN,8,3                  ## @EQFRM_LEN
	.no_dead_strip	_hisi_femac_net_xmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_femac_net_xmit
_hisi_femac_net_xmit:                   ; @hisi_femac_net_xmit
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x21, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _ADDRQ_STAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ADDRQ_STAT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh3:
	adrp	x8, _BIT_TX_READY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BIT_TX_READY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x21, #24]
	ldr	w1, [x21, #56]
	ldr	w2, [x21, #32]
	bl	_CIRC_SPACE
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _IRQ_INT_TX_PER_PACKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_INT_TX_PER_PACKET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_hisi_femac_irq_enable
	ldur	d0, [x19, #12]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	stur	d0, [x19, #12]
	mov	x0, x19
	bl	_netif_stop_queue
Lloh9:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	ldr	w0, [x21, #16]
	ldr	w1, [x20, #8]
	ldr	x2, [x20]
Lloh11:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	bl	_dma_map_single
	mov	x22, x0
	ldr	w0, [x21, #16]
	mov	x1, x22
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_dev_kfree_skb_any
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x21, #24]
	ldp	x10, x9, [x21, #40]
	str	x22, [x9, x8, lsl #3]
	ldr	x8, [x21, #24]
	str	x20, [x10, x8, lsl #3]
	add	x8, x8, #1
	ldrsw	x9, [x21, #32]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x21, #24]
	ldr	x8, [x21, #8]
Lloh14:
	adrp	x9, _EQ_ADDR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EQ_ADDR@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x8, [x20]
Lloh17:
	adrp	x9, _ETH_FCS_LEN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ETH_FCS_LEN@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	x8, [x21, #8]
Lloh20:
	adrp	x9, _EQFRM_LEN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _EQFRM_LEN@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	x1, [x20]
	ldr	x8, [x19]
	add	x8, x8, x1
	str	x8, [x19]
	mov	x0, x19
	bl	_netdev_sent_queue
LBB0_6:
Lloh23:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ADDRQ_STAT,8,3                 ; @ADDRQ_STAT
	.comm	_BIT_TX_READY,4,2               ; @BIT_TX_READY
	.comm	_IRQ_INT_TX_PER_PACKET,4,2      ; @IRQ_INT_TX_PER_PACKET
	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.comm	_EQ_ADDR,8,3                    ; @EQ_ADDR
	.comm	_ETH_FCS_LEN,8,3                ; @ETH_FCS_LEN
	.comm	_EQFRM_LEN,8,3                  ; @EQFRM_LEN
	.no_dead_strip	_hisi_femac_net_xmit
.subsections_via_symbols
