	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_mgmt_clean_tx_buffers
_octeon_mgmt_clean_tx_buffers:          ## @octeon_mgmt_clean_tx_buffers
	.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	%rdi, %r15
	movq	_MIX_ORCNT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	16(%r15), %rdi
	callq	_cvmx_read_csr
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	leaq	32(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_dev_kfree_skb_any
	movq	(%rbx), %rdi
	addq	16(%r15), %rdi
	callq	_cvmx_read_csr
	decl	%r14d
	testl	%eax, %eax
	je	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_lock_irqsave
	movq	(%rbx), %rdi
	addq	16(%r15), %rdi
	callq	_cvmx_read_csr
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	28(%r15), %ebx
	movl	48(%r15), %r12d
	movq	_OCTEON_MGMT_TX_RING_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %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_cpu
	movq	(%r15), %rax
	movq	40(%r15), %rcx
	movl	(%rcx,%rax,4), %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	incq	%rax
	movslq	(%r13), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_MIX_ORCNT@GOTPCREL(%rip), %rbx
	movq	%rdx, (%r15)
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	___skb_dequeue
	movq	%rax, %r12
	movq	(%rbx), %rdi
	addq	16(%r15), %rdi
	movl	$1, %esi
	callq	_cvmx_write_csr
	decl	36(%r15)
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movl	28(%r15), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_unmap_single
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	24(%r15), %edi
	callq	_CVMX_MIXX_TSTAMP
	movq	%rax, %rdi
	callq	_cvmx_read_csr
	movq	%rax, %rbx
	movl	24(%r15), %edi
	callq	_CVMX_MIXX_TSCTL
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_cvmx_write_csr
	movq	%rbx, %rdi
	movq	_MIX_ORCNT@GOTPCREL(%rip), %rbx
	callq	_ns_to_ktime
	movl	%eax, -56(%rbp)
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_skb_tstamp_tx
	jmp	LBB0_8
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	testl	%r14d, %r14d
	je	LBB0_12
LBB0_10:
	movl	8(%r15), %edi
	callq	_netif_queue_stopped
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	8(%r15), %edi
	callq	_netif_wake_queue
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIX_ORCNT,8,3                  ## @MIX_ORCNT
	.comm	_OCTEON_MGMT_TX_RING_SIZE,4,2   ## @OCTEON_MGMT_TX_RING_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_octeon_mgmt_clean_tx_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_mgmt_clean_tx_buffers
_octeon_mgmt_clean_tx_buffers:          ; @octeon_mgmt_clean_tx_buffers
	.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, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x23, _MIX_ORCNT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MIX_ORCNT@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	cbz	w0, LBB0_9
; %bb.1:
	mov	w24, #0
	add	x20, x19, #32
Lloh2:
	adrp	x25, _OCTEON_MGMT_TX_RING_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _OCTEON_MGMT_TX_RING_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x26, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh5:
	ldr	x26, [x26, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh6:
	adrp	x27, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_dev_kfree_skb_any
	ldr	x8, [x19, #16]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	sub	w24, w24, #1
	cbz	w0, LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #16]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	cbz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w21, [x19, #28]
	ldr	w22, [x19, #48]
	ldr	w0, [x25]
	bl	_ring_size_to_bytes
	mov	x2, x0
	ldr	w3, [x26]
	mov	x0, x21
	mov	x1, x22
	bl	_dma_sync_single_for_cpu
	ldr	x8, [x19, #40]
	ldr	x9, [x19]
	ldr	w22, [x8, x9, lsl #2]
	add	x8, x9, #1
	ldrsw	x9, [x25]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x19]
	mov	x0, x20
	bl	___skb_dequeue
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldr	x9, [x23]
	add	x0, x9, x8
	mov	w1, #1
	bl	_cvmx_write_csr
	ldr	w8, [x19, #36]
	sub	w8, w8, #1
	str	w8, [x19, #36]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #28]
	ldr	w3, [x27]
	bl	_dma_unmap_single
	mov	x0, x22
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w0, [x19, #24]
	bl	_CVMX_MIXX_TSTAMP
	bl	_cvmx_read_csr
	mov	x22, x0
	ldr	w0, [x19, #24]
	bl	_CVMX_MIXX_TSCTL
	mov	x1, #0
	bl	_cvmx_write_csr
	mov	x0, x22
	bl	_ns_to_ktime
	str	w0, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	bl	_skb_tstamp_tx
	b	LBB0_2
LBB0_6:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	cbz	w24, LBB0_9
LBB0_7:
	ldr	w0, [x19, #8]
	bl	_netif_queue_stopped
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x19, #8]
	bl	_netif_wake_queue
LBB0_9:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MIX_ORCNT,8,3                  ; @MIX_ORCNT
	.comm	_OCTEON_MGMT_TX_RING_SIZE,4,2   ; @OCTEON_MGMT_TX_RING_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_octeon_mgmt_clean_tx_buffers
.subsections_via_symbols
