	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_mgmt_rx_fill_ring
_octeon_mgmt_rx_fill_ring:              ## @octeon_mgmt_rx_fill_ring
	.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, -56(%rbp)                 ## 8-byte Spill
	callq	_netdev_priv
	movq	%rax, %r12
	movq	(%rax), %rbx
	movq	_OCTEON_MGMT_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ring_max_fill
	cmpq	%rax, %rbx
	jge	LBB0_7
## %bb.1:
	movq	%r12, %rax
	addq	$40, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_NET_IP_ALIGN@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.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	%rdx, 8(%r12)
	incq	(%r12)
	movq	_MIX_IRING2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r12), %rdi
	movl	$1, %esi
	callq	_cvmx_write_csr
	movq	(%r12), %rbx
	movq	_OCTEON_MGMT_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ring_max_fill
	cmpq	%rax, %rbx
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %eax
	movl	(%r15), %ecx
	movq	_OCTEON_MGMT_RX_HEADROOM@GOTPCREL(%rip), %rdx
	addl	(%rdx), %eax
	leal	(%rcx,%rax), %r13d
	addl	$8, %r13d
	movl	%r13d, %esi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_skb_reserve
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	___skb_queue_tail
	movl	28(%r12), %edi
	movl	(%rbx), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edx
	callq	_dma_map_single
                                        ## kill: def $eax killed $eax def $rax
	shlq	$32, %rax
	movl	%r13d, %ecx
	orq	%rax, %rcx
	movq	8(%r12), %rax
	movq	32(%r12), %rdx
	movq	%rcx, (%rdx,%rax,8)
	movl	24(%r12), %r13d
	movl	28(%r12), %ebx
	movq	_OCTEON_MGMT_RX_RING_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_ring_size_to_bytes
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_dma_sync_single_for_device
	movq	8(%r12), %rax
	incq	%rax
	movslq	(%r14), %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
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCTEON_MGMT_RX_RING_SIZE,4,2   ## @OCTEON_MGMT_RX_RING_SIZE
	.comm	_OCTEON_MGMT_RX_HEADROOM,4,2    ## @OCTEON_MGMT_RX_HEADROOM
	.comm	_NET_IP_ALIGN,4,2               ## @NET_IP_ALIGN
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_MIX_IRING2,8,3                 ## @MIX_IRING2
	.no_dead_strip	_octeon_mgmt_rx_fill_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_mgmt_rx_fill_ring
_octeon_mgmt_rx_fill_ring:              ; @octeon_mgmt_rx_fill_ring
	.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, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x24, _OCTEON_MGMT_RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _OCTEON_MGMT_RX_RING_SIZE@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_ring_max_fill
	cmp	x21, x0
	b.ge	LBB0_4
; %bb.1:
	add	x21, x20, #40
Lloh2:
	adrp	x25, _OCTEON_MGMT_RX_HEADROOM@GOTPAGE
Lloh3:
	ldr	x25, [x25, _OCTEON_MGMT_RX_HEADROOM@GOTPAGEOFF]
Lloh4:
	adrp	x26, _NET_IP_ALIGN@GOTPAGE
Lloh5:
	ldr	x26, [x26, _NET_IP_ALIGN@GOTPAGEOFF]
Lloh6:
	adrp	x28, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh7:
	ldr	x28, [x28, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh8:
	adrp	x27, _MIX_IRING2@GOTPAGE
Lloh9:
	ldr	x27, [x27, _MIX_IRING2@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	ldr	w9, [x25]
	ldr	w10, [x26]
	add	w8, w8, w9
	add	w8, w8, w10
	add	w22, w8, #8
	mov	x0, x19
	mov	x1, x22
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	ldr	w1, [x26]
	bl	_skb_reserve
	mov	x0, x21
	mov	x1, x23
	bl	___skb_queue_tail
	ldr	w0, [x20, #28]
	ldr	w1, [x23]
Lloh10:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x2, x22
	bl	_dma_map_single
                                        ; kill: def $w0 killed $w0 def $x0
	bfi	x22, x0, #32, #32
	ldr	x8, [x20, #32]
	ldr	x9, [x20, #8]
	str	x22, [x8, x9, lsl #3]
	ldp	w23, w22, [x20, #24]
	ldr	w0, [x24]
	bl	_ring_size_to_bytes
	mov	x2, x0
	ldr	w3, [x28]
	mov	x0, x22
	mov	x1, x23
	bl	_dma_sync_single_for_device
	ldp	x9, x8, [x20]
	add	x8, x8, #1
	ldrsw	x10, [x24]
	udiv	x11, x8, x10
	msub	x8, x11, x10, x8
	add	x9, x9, #1
	stp	x9, x8, [x20]
	ldr	x8, [x20, #16]
	ldr	x9, [x27]
	add	x0, x9, x8
	mov	w1, #1
	bl	_cvmx_write_csr
	ldr	x22, [x20]
	ldr	w0, [x24]
	bl	_ring_max_fill
	cmp	x22, x0
	b.lt	LBB0_2
LBB0_4:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTEON_MGMT_RX_RING_SIZE,4,2   ; @OCTEON_MGMT_RX_RING_SIZE
	.comm	_OCTEON_MGMT_RX_HEADROOM,4,2    ; @OCTEON_MGMT_RX_HEADROOM
	.comm	_NET_IP_ALIGN,4,2               ; @NET_IP_ALIGN
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_MIX_IRING2,8,3                 ; @MIX_IRING2
	.no_dead_strip	_octeon_mgmt_rx_fill_ring
.subsections_via_symbols
