	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_eth_start_xmit
_sh_eth_start_xmit:                     ## @sh_eth_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %rbx
	leaq	32(%rax), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %eax
	subl	4(%rbx), %eax
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	addl	$-4, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_sh_eth_txfree
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %eax
	cltd
	idivl	(%r13)
	movl	%edx, %r12d
	movslq	%edx, %r13
	movq	24(%rbx), %rax
	movq	%r15, (%rax,%r13,8)
	movq	16(%rbx), %r14
	movl	8(%r15), %edi
	callq	_virt_to_phys
	shlq	$4, %r13
	movl	%eax, 12(%r14,%r13)
	movq	8(%rbx), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_5
## %bb.4:
	movl	%eax, %edi
	movl	$4, %esi
	callq	_ALIGN
	movl	%eax, %edi
	callq	_phys_to_virt
	movq	(%r15), %rsi
	addq	$2, %rsi
	movl	%eax, %edi
	callq	_sh_eth_soft_swap
LBB0_5:
	movl	8(%r15), %edi
	movq	(%r15), %rsi
	callq	___flush_purge_region
	movq	(%r15), %rax
	movq	_ETHERSMALL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	cmovgq	%rax, %rcx
	movq	%rcx, (%r14,%r13)
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	decl	%ecx
	xorl	%esi, %esi
	movq	_TD_TACT@GOTPCREL(%rip), %rax
	cmpl	%ecx, %r12d
	jb	LBB0_7
## %bb.6:
	movq	_TD_TDLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_7:
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cpu_to_edmac
	orl	%eax, 8(%r14,%r13)
	incl	(%rbx)
	movq	_EDTRR@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	8(%rbx), %rdi
	callq	_ctrl_inl
	movq	_EDTRR_TRNS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %edi
	jne	LBB0_9
## %bb.8:
	movq	(%r14), %rsi
	addq	8(%rbx), %rsi
	callq	_ctrl_outl
LBB0_9:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.comm	_NETDEV_TX_BUSY,4,2             ## @NETDEV_TX_BUSY
	.comm	_ETHERSMALL,8,3                 ## @ETHERSMALL
	.comm	_TD_TACT,4,2                    ## @TD_TACT
	.comm	_TD_TDLE,4,2                    ## @TD_TDLE
	.comm	_EDTRR,8,3                      ## @EDTRR
	.comm	_EDTRR_TRNS,4,2                 ## @EDTRR_TRNS
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_sh_eth_start_xmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_eth_start_xmit
_sh_eth_start_xmit:                     ; @sh_eth_start_xmit
	.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, x1
	mov	x21, x0
	mov	x0, x1
	bl	_netdev_priv
	mov	x20, x0
	add	x22, x0, #32
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldp	w8, w9, [x20]
Lloh0:
	adrp	x23, _TX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TX_RING_SIZE@GOTPAGEOFF]
	ldr	w10, [x23]
	sub	w10, w10, #4
	sub	w8, w8, w9
	cmp	w8, w10
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_sh_eth_txfree
	cbz	w0, LBB0_7
LBB0_2:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w8, [x20]
	ldr	w9, [x23]
	sdiv	w10, w8, w9
	msub	w25, w10, w9, w8
	sxtw	x22, w25
	ldr	x8, [x20, #24]
	str	x21, [x8, w25, sxtw #3]
	ldr	x24, [x20, #16]
	ldr	w0, [x21, #8]
	bl	_virt_to_phys
	add	x8, x24, w25, sxtw #4
	str	w0, [x8, #12]
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	cbnz	w8, LBB0_4
; %bb.3:
	mov	w1, #4
	bl	_ALIGN
	bl	_phys_to_virt
	ldr	x8, [x21]
	add	x1, x8, #2
	bl	_sh_eth_soft_swap
LBB0_4:
	ldr	w0, [x21, #8]
	ldr	x1, [x21]
	bl	___flush_purge_region
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _ETHERSMALL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ETHERSMALL@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x8, x8, x9, gt
	add	x21, x24, x22, lsl #4
	str	x8, [x21]
	ldr	w8, [x23]
	sub	w8, w8, #1
Lloh5:
	adrp	x9, _TD_TACT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _TD_TACT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _TD_TDLE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _TD_TDLE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w22, w8
	csel	w8, wzr, w10, lo
	orr	w1, w9, w8
	mov	x0, x20
	bl	_cpu_to_edmac
	ldr	w8, [x21, #8]
	orr	w8, w8, w0
	str	w8, [x21, #8]
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	ldr	x8, [x19, #8]
Lloh11:
	adrp	x20, _EDTRR@GOTPAGE
Lloh12:
	ldr	x20, [x20, _EDTRR@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_ctrl_inl
	mov	x8, x0
Lloh13:
	adrp	x9, _EDTRR_TRNS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EDTRR_TRNS@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x9]
	tst	w0, w8
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_ctrl_outl
LBB0_6:
Lloh16:
	adrp	x8, _jiffies@GOTPAGE
Lloh17:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh19:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x22
	bl	_spin_unlock_irqrestore
Lloh21:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_ETHERSMALL,8,3                 ; @ETHERSMALL
	.comm	_TD_TACT,4,2                    ; @TD_TACT
	.comm	_TD_TDLE,4,2                    ; @TD_TDLE
	.comm	_EDTRR,8,3                      ; @EDTRR
	.comm	_EDTRR_TRNS,4,2                 ; @EDTRR_TRNS
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_sh_eth_start_xmit
.subsections_via_symbols
