	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_mgmt_dequeue_rx_buffer
_octeon_mgmt_dequeue_rx_buffer:         ## @octeon_mgmt_dequeue_rx_buffer
	.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, %rbx
	movl	8(%rdi), %r15d
	movl	32(%rdi), %r12d
	movq	_OCTEON_MGMT_RX_RING_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_ring_size_to_bytes
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_dma_sync_single_for_cpu
	movq	(%rbx), %rax
	movq	24(%rbx), %rcx
	movl	(%rcx,%rax,4), %r15d
	incq	%rax
	movslq	(%r13), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	movq	%rdx, (%rbx)
	decl	16(%rbx)
	leaq	12(%rbx), %rdi
	callq	___skb_dequeue
	movq	%rax, (%r14)
	movl	8(%rbx), %edi
	movq	_ETH_FRAME_LEN@GOTPCREL(%rip), %rax
	movq	_OCTEON_MGMT_RX_HEADROOM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	addq	(%rax), %rdx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %esi
	callq	_dma_unmap_single
	movl	%r15d, %eax
	addq	$8, %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	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_ETH_FRAME_LEN,8,3              ## @ETH_FRAME_LEN
	.comm	_OCTEON_MGMT_RX_HEADROOM,8,3    ## @OCTEON_MGMT_RX_HEADROOM
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_octeon_mgmt_dequeue_rx_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_mgmt_dequeue_rx_buffer
_octeon_mgmt_dequeue_rx_buffer:         ; @octeon_mgmt_dequeue_rx_buffer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w21, [x0, #8]
	ldr	w22, [x0, #32]
Lloh0:
	adrp	x23, _OCTEON_MGMT_RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _OCTEON_MGMT_RX_RING_SIZE@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_ring_size_to_bytes
	mov	x2, x0
Lloh2:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_dma_sync_single_for_cpu
	ldr	x8, [x20, #24]
	ldr	x9, [x20]
	ldr	w21, [x8, x9, lsl #2]
	add	x8, x9, #1
	ldrsw	x9, [x23]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x20]
	ldr	w8, [x20, #16]
	sub	w8, w8, #1
	str	w8, [x20, #16]
	add	x0, x20, #12
	bl	___skb_dequeue
	str	x0, [x19]
	ldr	w0, [x20, #8]
Lloh5:
	adrp	x8, _ETH_FRAME_LEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETH_FRAME_LEN@GOTPAGEOFF]
Lloh7:
	adrp	x9, _OCTEON_MGMT_RX_HEADROOM@GOTPAGE
Lloh8:
	ldr	x9, [x9, _OCTEON_MGMT_RX_HEADROOM@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	ldr	x9, [x9]
	add	x2, x9, x8
Lloh11:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x1, x21
	bl	_dma_unmap_single
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTEON_MGMT_RX_RING_SIZE,4,2   ; @OCTEON_MGMT_RX_RING_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_ETH_FRAME_LEN,8,3              ; @ETH_FRAME_LEN
	.comm	_OCTEON_MGMT_RX_HEADROOM,8,3    ; @OCTEON_MGMT_RX_HEADROOM
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_octeon_mgmt_dequeue_rx_buffer
.subsections_via_symbols
