	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_hard_start_xmit
_ag71xx_hard_start_xmit:                ## @ag71xx_hard_start_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movl	48(%rax), %edi
	callq	_BIT
	movl	%eax, %r13d
	movl	48(%r12), %edi
	callq	_BIT
	movl	(%r15), %edx
	cmpl	$4, %edx
	jg	LBB0_2
## %bb.1:
	movq	16(%r12), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	jmp	LBB0_7
LBB0_2:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	decl	%r13d
	movq	%r12, %rbx
	addq	$24, %rbx
	movq	8(%r12), %rdi
	movl	4(%r15), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, %r14
	movl	24(%r12), %esi
	andl	%r13d, %esi
	movq	%rbx, %rdi
	callq	_ag71xx_ring_desc
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%r12), %edx
	andl	(%r15), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ag71xx_fill_dma_desc
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	movl	%eax, %ebx
	movl	24(%r12), %eax
	addl	%ebx, %eax
	decl	%eax
	andl	%r13d, %eax
	movl	(%r15), %esi
	movq	40(%r12), %rcx
	cltq
	shlq	$4, %rax
	movl	%esi, (%rcx,%rax)
	movq	%r15, 8(%rcx,%rax)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_netdev_sent_queue
	movq	%r15, %rdi
	callq	_skb_tx_timestamp
	movq	_DESC_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	andl	%eax, (%rcx)
	addl	%ebx, 24(%r12)
	xorl	%eax, %eax
	callq	_wmb
	movq	_AG71XX_TX_RING_DS_PER_PKT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	negl	%eax
	cmpq	$0, 32(%r12)
	movl	$-2, %ecx
	cmovnel	%eax, %ecx
	movl	24(%r12), %eax
	subl	28(%r12), %eax
	addl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	cmpl	%ecx, %eax
	jl	LBB0_5
## %bb.4:
	movl	4(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_DBG
	movq	%r14, %rdi
	callq	_netif_stop_queue
LBB0_5:
	movq	16(%r12), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_DBG
	movq	_AG71XX_REG_TX_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TX_CTRL_TXE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_ag71xx_wr
	jmp	LBB0_8
LBB0_6:
	movq	8(%r12), %rdi
	movl	(%r15), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rsi
	callq	_dma_unmap_single
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_7:
	incl	(%rbx)
	movq	%r15, %rdi
	callq	_dev_kfree_skb
LBB0_8:
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: packet len is too small\n"

	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DESC_EMPTY,4,2                 ## @DESC_EMPTY
	.comm	_AG71XX_TX_RING_DS_PER_PKT,4,2  ## @AG71XX_TX_RING_DS_PER_PKT
L_.str.1:                               ## @.str.1
	.asciz	"%s: tx queue full\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: packet injected into TX queue\n"

	.comm	_AG71XX_REG_TX_CTRL,4,2         ## @AG71XX_REG_TX_CTRL
	.comm	_TX_CTRL_TXE,4,2                ## @TX_CTRL_TXE
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_ag71xx_hard_start_xmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_hard_start_xmit
_ag71xx_hard_start_xmit:                ; @ag71xx_hard_start_xmit
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x20, x0
	ldr	w0, [x0, #48]
	bl	_BIT
	mov	x23, x0
	ldr	w0, [x20, #48]
	bl	_BIT
	ldr	w2, [x21]
	cmp	w2, #4
	b.gt	LBB0_2
; %bb.1:
	ldr	x8, [x20, #16]
	ldr	w1, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	b	LBB0_7
LBB0_2:
	mov	x22, x0
	sub	w26, w23, #1
	ldr	x0, [x20, #8]
	ldr	w1, [x21, #4]
Lloh2:
	adrp	x27, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x27]
	bl	_dma_map_single
	mov	x24, x0
	mov	x25, x20
	ldr	w8, [x25, #24]!
	and	w1, w8, w26
	mov	x0, x25
	bl	_ag71xx_ring_desc
	mov	x23, x0
	ldr	w8, [x21]
	ldr	w9, [x20]
	and	w2, w9, w8
	mov	x0, x25
	mov	x1, x24
	bl	_ag71xx_fill_dma_desc
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x25, x0
	ldr	w8, [x20, #24]
	add	w8, w0, w8
	sub	w8, w8, #1
	and	w8, w8, w26
	ldr	w1, [x21]
	ldr	x9, [x20, #40]
	add	x8, x9, w8, sxtw #4
	str	w1, [x8]
	str	x21, [x8, #8]
	mov	x0, x19
	bl	_netdev_sent_queue
	mov	x0, x21
	bl	_skb_tx_timestamp
Lloh4:
	adrp	x8, _DESC_EMPTY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DESC_EMPTY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x23]
	bic	w8, w9, w8
	str	w8, [x23]
	ldr	w8, [x20, #24]
	add	w8, w8, w25
	str	w8, [x20, #24]
	bl	_wmb
	ldr	x8, [x20, #32]
Lloh7:
	adrp	x9, _AG71XX_TX_RING_DS_PER_PKT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AG71XX_TX_RING_DS_PER_PKT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	lsl	w9, w9, #1
	cmp	x8, #0
	mov	w8, #-2
	csneg	w8, w8, w9, eq
	ldp	w9, w10, [x20, #24]
	sub	w9, w9, w10
	add	w8, w8, w22
	cmp	w9, w8
	b.lt	LBB0_5
; %bb.4:
	ldr	w1, [x19, #4]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DBG
	mov	x0, x19
	bl	_netif_stop_queue
LBB0_5:
	ldr	x8, [x20, #16]
	ldr	w1, [x8]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DBG
Lloh14:
	adrp	x8, _AG71XX_REG_TX_CTRL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AG71XX_REG_TX_CTRL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _TX_CTRL_TXE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TX_CTRL_TXE@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_ag71xx_wr
	b	LBB0_8
LBB0_6:
	ldr	x0, [x20, #8]
	ldr	w2, [x21]
	ldr	w3, [x27]
	mov	x1, x24
	bl	_dma_unmap_single
LBB0_7:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x21
	bl	_dev_kfree_skb
LBB0_8:
Lloh20:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: packet len is too small\n"

	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DESC_EMPTY,4,2                 ; @DESC_EMPTY
	.comm	_AG71XX_TX_RING_DS_PER_PKT,4,2  ; @AG71XX_TX_RING_DS_PER_PKT
l_.str.1:                               ; @.str.1
	.asciz	"%s: tx queue full\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: packet injected into TX queue\n"

	.comm	_AG71XX_REG_TX_CTRL,4,2         ; @AG71XX_REG_TX_CTRL
	.comm	_TX_CTRL_TXE,4,2                ; @TX_CTRL_TXE
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_ag71xx_hard_start_xmit
.subsections_via_symbols
