	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_mgmt_xmit
_octeon_mgmt_xmit:                      ## @octeon_mgmt_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, %r14
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r13
	movq	_NETDEV_TX_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_skb_shinfo
	movq	_SKBTX_HW_TSTAMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %edx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %esi
	movl	28(%r13), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dma_map_single
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	32(%r13), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	(%r13), %r15d
	movq	_OCTEON_MGMT_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ring_max_fill
	decl	%eax
	xorl	%edi, %edi
	cmpl	%eax, %r15d
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
LBB0_2:
	movq	%r14, %r15
	movl	(%r13), %ebx
	movq	_OCTEON_MGMT_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ring_max_fill
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	28(%r13), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dma_unmap_single
	movq	%r15, %rbx
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_8
LBB0_4:
	xorl	%ebx, %ebx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	setne	%bl
	movq	%r12, %rdi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	___skb_queue_tail
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	shlq	$32, %rax
	orq	%rax, %rbx
	movq	8(%r13), %rax
	movq	40(%r13), %rcx
	movq	%rbx, (%rcx,%rax,8)
	movq	8(%r13), %rax
	incq	%rax
	movq	_OCTEON_MGMT_TX_RING_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_5
## %bb.6:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_7
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_7:
	movq	%rdx, 8(%r13)
	incl	(%r13)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	24(%r13), %r12d
	movl	28(%r13), %ebx
	movq	_OCTEON_MGMT_TX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ring_size_to_bytes
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_dma_sync_single_for_device
	movq	%r15, %rbx
	incl	4(%r15)
	movl	(%r14), %eax
	addl	%eax, (%r15)
	movq	_MIX_ORING2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r13), %rdi
	movl	$1, %esi
	callq	_cvmx_write_csr
	movq	%r15, %rdi
	callq	_netif_trans_update
	movq	_NETDEV_TX_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_8:
	movq	%rbx, %rdi
	callq	_octeon_mgmt_update_tx_stats
	movl	%r14d, %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	_SKBTX_HW_TSTAMP,4,2            ## @SKBTX_HW_TSTAMP
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_OCTEON_MGMT_TX_RING_SIZE,4,2   ## @OCTEON_MGMT_TX_RING_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_MIX_ORING2,8,3                 ## @MIX_ORING2
	.comm	_NETDEV_TX_OK,4,2               ## @NETDEV_TX_OK
	.no_dead_strip	_octeon_mgmt_xmit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_mgmt_xmit
_octeon_mgmt_xmit:                      ; @octeon_mgmt_xmit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, _NETDEV_TX_BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NETDEV_TX_BUSY@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	mov	x0, x21
	bl	_skb_shinfo
	ldr	w8, [x0]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh3:
	adrp	x8, _SKBTX_HW_TSTAMP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SKBTX_HW_TSTAMP@GOTPAGEOFF]
Lloh5:
	ldr	w27, [x8]
	ldr	w0, [x20, #28]
	ldp	w23, w1, [x21]
Lloh6:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x2, x23
	bl	_dma_map_single
	mov	x25, x0
	add	x24, x20, #32
	mov	x0, x24
	bl	_spin_lock_irqsave
	ldr	w28, [x20]
Lloh9:
	adrp	x26, _OCTEON_MGMT_TX_RING_SIZE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _OCTEON_MGMT_TX_RING_SIZE@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_ring_max_fill
	sub	w8, w0, #1
	cmp	w28, w8
	cset	w0, ge
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x24
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x24
	bl	_spin_lock_irqsave
LBB0_2:
	ldr	w28, [x20]
	ldr	w0, [x26]
	bl	_ring_max_fill
	cmp	w28, w0
	cset	w0, ge
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x24
	bl	_spin_unlock_irqrestore
	ldr	w0, [x20, #28]
Lloh11:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x1, x25
	mov	x2, x23
	bl	_dma_unmap_single
	b	LBB0_5
LBB0_4:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	and	w8, w27, w8
	cmp	w8, #0
	cset	w22, ne
	mov	x0, x24
	mov	x1, x21
	bl	___skb_queue_tail
	bfi	x22, x23, #32, #32
	ldr	x8, [x20, #40]
	ldr	x9, [x20, #8]
	str	x22, [x8, x9, lsl #3]
	ldr	x8, [x20, #8]
	add	x8, x8, #1
	ldrsw	x9, [x26]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x20, #8]
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	mov	x0, x24
	bl	_spin_unlock_irqrestore
	ldp	w23, w22, [x20, #24]
	ldr	w0, [x26]
	bl	_ring_size_to_bytes
	mov	x2, x0
Lloh14:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_dma_sync_single_for_device
	ldr	d0, [x19]
	movi.2s	v1, #1
	ld1.s	{ v1 }[0], [x21]
	add.2s	v0, v0, v1
	str	d0, [x19]
	ldr	x8, [x20, #16]
Lloh17:
	adrp	x9, _MIX_ORING2@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MIX_ORING2@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x0, x9, x8
	mov	w1, #1
	bl	_cvmx_write_csr
	mov	x0, x19
	bl	_netif_trans_update
Lloh20:
	adrp	x8, _NETDEV_TX_OK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NETDEV_TX_OK@GOTPAGEOFF]
Lloh22:
	ldr	w22, [x8]
LBB0_5:
	mov	x0, x19
	bl	_octeon_mgmt_update_tx_stats
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NETDEV_TX_BUSY,4,2             ; @NETDEV_TX_BUSY
	.comm	_SKBTX_HW_TSTAMP,4,2            ; @SKBTX_HW_TSTAMP
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_OCTEON_MGMT_TX_RING_SIZE,4,2   ; @OCTEON_MGMT_TX_RING_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_MIX_ORING2,8,3                 ; @MIX_ORING2
	.comm	_NETDEV_TX_OK,4,2               ; @NETDEV_TX_OK
	.no_dead_strip	_octeon_mgmt_xmit
.subsections_via_symbols
