	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moxart_mac_start_xmit
_moxart_mac_start_xmit:                 ## @moxart_mac_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	$40, %rsp
	.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, %rbx
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	24(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	movl	(%r12), %ecx
	movq	_TX_REG_DESC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	imull	%ecx, %r13d
	addq	56(%r12), %r13
	movq	%r15, %rdi
	callq	_moxart_tx_queue_space
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_netif_stop_queue
LBB0_2:
	movq	_TX_REG_OFFSET_DESC0@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_moxart_desc_read
	movq	_TX_DESC0_DMA_OWN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_net_dbg_ratelimited
	incl	4(%r15)
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_11
LBB0_4:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_rmb
	movl	(%rbx), %eax
	movq	_TX_BUF_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	cmpl	%r14d, %eax
	cmovbl	%eax, %r14d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rsi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dma_map_single
	movq	8(%r12), %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rcx,%rbx,4)
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_err
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_11
LBB0_6:
	movq	16(%r12), %rax
	movl	%r14d, (%rax,%rbx,4)
	movq	48(%r12), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax,%rbx,8)
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movq	_TX_REG_OFFSET_DESC2@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%r13, %rax
	movq	_TX_DESC2_ADDRESS_PHYS@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rsi
	addq	%rax, %rsi
	callq	_moxart_desc_write
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %edi
	movq	_TX_REG_OFFSET_DESC2@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%r13, %rax
	movq	_TX_DESC2_ADDRESS_VIRT@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rsi
	addq	%rax, %rsi
	callq	_moxart_desc_write
	movl	(%rbx), %eax
	movq	_ETH_ZLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	cmpl	%eax, %edx
	jbe	LBB0_8
## %bb.7:
	movq	%rax, %rdi
	shlq	$2, %rdi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	8(%rcx), %rdi
	subl	%eax, %edx
	xorl	%esi, %esi
	callq	_memset
	movl	(%rbx), %r14d
LBB0_8:
	movq	8(%r12), %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rax,%rbx,4), %esi
	movl	40(%r12), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_dma_sync_single_for_device
	movq	_TX_DESC1_LTS@GOTPCREL(%rip), %rcx
	movq	_TX_DESC1_FTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_TX_DESC1_BUF_SIZE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r14d
	movq	_TX_DESC_NUM_MASK@GOTPCREL(%rip), %rdx
	movl	$0, %ecx
	cmpl	(%rdx), %ebx
	jne	LBB0_10
## %bb.9:
	movq	_TX_DESC1_END@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_10:
	orl	%ecx, %eax
	orl	%eax, %r14d
	movq	_TX_REG_OFFSET_DESC1@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	addq	%r13, %rsi
	movl	%r14d, %edi
	callq	_moxart_desc_write
	xorl	%eax, %eax
	callq	_wmb
	movq	_TX_DESC0_DMA_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TX_REG_OFFSET_DESC0@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	addq	%r13, %rsi
	callq	_moxart_desc_write
	movq	_REG_TX_POLL_DEMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%r12), %rsi
	movl	$-1, %edi
	callq	_writel
	movl	%ebx, %edi
	callq	_TX_NEXT
	movl	%eax, (%r12)
	movq	%r15, %rdi
	callq	_netif_trans_update
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_11:
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.comm	_TX_REG_DESC_SIZE,4,2           ## @TX_REG_DESC_SIZE
	.comm	_TX_REG_OFFSET_DESC0,4,2        ## @TX_REG_OFFSET_DESC0
	.comm	_TX_DESC0_DMA_OWN,4,2           ## @TX_DESC0_DMA_OWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no TX space for packet\n"

	.comm	_TX_BUF_SIZE,4,2                ## @TX_BUF_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
L_.str.1:                               ## @.str.1
	.asciz	"DMA mapping error\n"

	.comm	_TX_REG_OFFSET_DESC2,4,2        ## @TX_REG_OFFSET_DESC2
	.comm	_TX_DESC2_ADDRESS_PHYS,4,2      ## @TX_DESC2_ADDRESS_PHYS
	.comm	_TX_DESC2_ADDRESS_VIRT,4,2      ## @TX_DESC2_ADDRESS_VIRT
	.comm	_ETH_ZLEN,4,2                   ## @ETH_ZLEN
	.comm	_TX_DESC1_LTS,4,2               ## @TX_DESC1_LTS
	.comm	_TX_DESC1_FTS,4,2               ## @TX_DESC1_FTS
	.comm	_TX_DESC1_BUF_SIZE_MASK,4,2     ## @TX_DESC1_BUF_SIZE_MASK
	.comm	_TX_DESC_NUM_MASK,4,2           ## @TX_DESC_NUM_MASK
	.comm	_TX_DESC1_END,4,2               ## @TX_DESC1_END
	.comm	_TX_REG_OFFSET_DESC1,4,2        ## @TX_REG_OFFSET_DESC1
	.comm	_REG_TX_POLL_DEMAND,8,3         ## @REG_TX_POLL_DEMAND
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_moxart_mac_start_xmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moxart_mac_start_xmit
_moxart_mac_start_xmit:                 ; @moxart_mac_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	x20, x1
	mov	x23, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	add	x19, x0, #24
	mov	x0, x19
	bl	_spin_lock_irq
	ldr	w22, [x21]
	ldr	x8, [x21, #56]
Lloh3:
	adrp	x9, _TX_REG_DESC_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TX_REG_DESC_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mul	w9, w9, w22
	add	x26, x8, x9
	mov	x0, x20
	bl	_moxart_tx_queue_space
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_netif_stop_queue
LBB0_2:
Lloh6:
	adrp	x27, _TX_REG_OFFSET_DESC0@GOTPAGE
Lloh7:
	ldr	x27, [x27, _TX_REG_OFFSET_DESC0@GOTPAGEOFF]
	ldrsw	x8, [x27]
	add	x0, x26, x8
	bl	_moxart_desc_read
Lloh8:
	adrp	x28, _TX_DESC0_DMA_OWN@GOTPAGE
Lloh9:
	ldr	x28, [x28, _TX_DESC0_DMA_OWN@GOTPAGEOFF]
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_net_dbg_ratelimited
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
	b	LBB0_9
LBB0_4:
	bl	_rmb
	ldr	w8, [x23]
Lloh12:
	adrp	x9, _TX_BUF_SIZE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TX_BUF_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w25, w8, w9, lo
	ldr	x1, [x23, #8]
Lloh15:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x2, x25
	bl	_dma_map_single
	mov	x1, x0
	ldr	x8, [x21, #8]
	str	w0, [x8, x22, lsl #2]
	mov	x0, x20
	bl	_dma_mapping_error
	cbz	x0, LBB0_6
; %bb.5:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	b	LBB0_9
LBB0_6:
	ldr	x8, [x21, #16]
	lsl	x9, x22, #2
	str	w25, [x8, x9]
	ldr	x8, [x21, #48]
	str	x23, [x8, x22, lsl #3]
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x9]
Lloh20:
	adrp	x24, _TX_REG_OFFSET_DESC2@GOTPAGE
Lloh21:
	ldr	x24, [x24, _TX_REG_OFFSET_DESC2@GOTPAGEOFF]
	ldrsw	x8, [x24]
Lloh22:
	adrp	x9, _TX_DESC2_ADDRESS_PHYS@GOTPAGE
Lloh23:
	ldr	x9, [x9, _TX_DESC2_ADDRESS_PHYS@GOTPAGEOFF]
Lloh24:
	ldrsw	x9, [x9]
	add	x8, x26, x8
	add	x1, x8, x9
	bl	_moxart_desc_write
	ldr	w0, [x23, #8]
	ldrsw	x8, [x24]
Lloh25:
	adrp	x9, _TX_DESC2_ADDRESS_VIRT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _TX_DESC2_ADDRESS_VIRT@GOTPAGEOFF]
Lloh27:
	ldrsw	x9, [x9]
	add	x8, x26, x8
	add	x1, x8, x9
	bl	_moxart_desc_write
	ldr	w8, [x23]
Lloh28:
	adrp	x24, _ETH_ZLEN@GOTPAGE
Lloh29:
	ldr	x24, [x24, _ETH_ZLEN@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w9, w8
	b.ls	LBB0_8
; %bb.7:
	ldr	x10, [x23, #8]
	add	x0, x10, x8, lsl #2
	sub	w2, w9, w8
	mov	w1, #0
	bl	_memset
	ldr	w25, [x24]
LBB0_8:
	ldr	x8, [x21, #8]
	ldr	w1, [x8, x22, lsl #2]
	ldr	w2, [x21, #40]
Lloh30:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_dma_sync_single_for_device
Lloh33:
	adrp	x8, _TX_DESC1_LTS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _TX_DESC1_LTS@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _TX_DESC1_FTS@GOTPAGE
Lloh37:
	ldr	x9, [x9, _TX_DESC1_FTS@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh39:
	adrp	x9, _TX_DESC1_BUF_SIZE_MASK@GOTPAGE
Lloh40:
	ldr	x9, [x9, _TX_DESC1_BUF_SIZE_MASK@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	and	w9, w9, w25
Lloh42:
	adrp	x10, _TX_DESC_NUM_MASK@GOTPAGE
Lloh43:
	ldr	x10, [x10, _TX_DESC_NUM_MASK@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh44:
	ldr	w9, [x10]
Lloh45:
	adrp	x10, _TX_DESC1_END@GOTPAGE
Lloh46:
	ldr	x10, [x10, _TX_DESC1_END@GOTPAGEOFF]
Lloh47:
	ldr	w10, [x10]
	cmp	w22, w9
	csel	w9, w10, wzr, eq
	orr	w0, w8, w9
Lloh48:
	adrp	x8, _TX_REG_OFFSET_DESC1@GOTPAGE
Lloh49:
	ldr	x8, [x8, _TX_REG_OFFSET_DESC1@GOTPAGEOFF]
Lloh50:
	ldrsw	x8, [x8]
	add	x1, x26, x8
	bl	_moxart_desc_write
	bl	_wmb
	ldr	w0, [x28]
	ldrsw	x8, [x27]
	add	x1, x26, x8
	bl	_moxart_desc_write
	ldr	x8, [x21, #32]
Lloh51:
	adrp	x9, _REG_TX_POLL_DEMAND@GOTPAGE
Lloh52:
	ldr	x9, [x9, _REG_TX_POLL_DEMAND@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #-1
	bl	_writel
	mov	x0, x22
	bl	_TX_NEXT
	str	w0, [x21]
	mov	x0, x20
	bl	_netif_trans_update
Lloh54:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh55:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
Lloh56:
	ldr	w24, [x8]
LBB0_9:
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	x0, x24
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_TX_REG_DESC_SIZE,4,2           ; @TX_REG_DESC_SIZE
	.comm	_TX_REG_OFFSET_DESC0,4,2        ; @TX_REG_OFFSET_DESC0
	.comm	_TX_DESC0_DMA_OWN,4,2           ; @TX_DESC0_DMA_OWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no TX space for packet\n"

	.comm	_TX_BUF_SIZE,4,2                ; @TX_BUF_SIZE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
l_.str.1:                               ; @.str.1
	.asciz	"DMA mapping error\n"

	.comm	_TX_REG_OFFSET_DESC2,4,2        ; @TX_REG_OFFSET_DESC2
	.comm	_TX_DESC2_ADDRESS_PHYS,4,2      ; @TX_DESC2_ADDRESS_PHYS
	.comm	_TX_DESC2_ADDRESS_VIRT,4,2      ; @TX_DESC2_ADDRESS_VIRT
	.comm	_ETH_ZLEN,4,2                   ; @ETH_ZLEN
	.comm	_TX_DESC1_LTS,4,2               ; @TX_DESC1_LTS
	.comm	_TX_DESC1_FTS,4,2               ; @TX_DESC1_FTS
	.comm	_TX_DESC1_BUF_SIZE_MASK,4,2     ; @TX_DESC1_BUF_SIZE_MASK
	.comm	_TX_DESC_NUM_MASK,4,2           ; @TX_DESC_NUM_MASK
	.comm	_TX_DESC1_END,4,2               ; @TX_DESC1_END
	.comm	_TX_REG_OFFSET_DESC1,4,2        ; @TX_REG_OFFSET_DESC1
	.comm	_REG_TX_POLL_DEMAND,8,3         ; @REG_TX_POLL_DEMAND
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_moxart_mac_start_xmit
.subsections_via_symbols
