	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ave_rxdesc_prepare
_ave_rxdesc_prepare:                    ## @ave_rxdesc_prepare
	.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
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %r15
	movq	(%rax), %rax
	movslq	%ebx, %r14
	movq	(%rax,%r14,8), %r13
	testq	%r13, %r13
	jne	LBB0_4
## %bb.1:
	movq	_AVE_MAX_ETHFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movq	_AVE_FRAME_HEADROOM@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	%rcx, (%r13)
	movl	(%rax), %eax
	addl	%eax, 8(%r13)
LBB0_4:
	movq	_AVE_DESCID_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AVE_STS_INTR@GOTPCREL(%rip), %rdx
	movq	_AVE_STS_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	(%rdx), %ecx
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_ave_desc_write_cmdsts
	leaq	(,%r14,8), %rsi
	addq	(%r15), %rsi
	movq	(%r13), %rdx
	movq	_AVE_FRAME_HEADROOM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	%rax, %rdx
	movq	_AVE_MAX_ETHFRAME@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rax, %rcx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-44(%rbp), %r9
	movq	%r12, %rdi
	callq	_ave_dma_map
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_netdev_err
	movq	%r13, %rdi
	callq	_dev_kfree_skb_any
	jmp	LBB0_7
LBB0_6:
	movq	(%r15), %rax
	movq	%r13, (%rax,%r14,8)
	movq	_AVE_DESCID_RX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	-44(%rbp), %ecx
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_ave_desc_write_addr
	movl	(%rbx), %esi
	movq	_AVE_MAX_ETHFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_AVE_STS_INTR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_ave_desc_write_cmdsts
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVE_MAX_ETHFRAME,4,2           ## @AVE_MAX_ETHFRAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't allocate skb for Rx\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVE_FRAME_HEADROOM,8,3         ## @AVE_FRAME_HEADROOM
	.comm	_AVE_DESCID_RX,4,2              ## @AVE_DESCID_RX
	.comm	_AVE_STS_INTR,4,2               ## @AVE_STS_INTR
	.comm	_AVE_STS_OWN,4,2                ## @AVE_STS_OWN
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
L_.str.1:                               ## @.str.1
	.asciz	"can't map skb for Rx\n"

	.no_dead_strip	_ave_rxdesc_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ave_rxdesc_prepare
_ave_rxdesc_prepare:                    ; @ave_rxdesc_prepare
	.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	x20, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x22, x0
	ldr	x8, [x0]
	ldr	x21, [x8, w20, sxtw #3]
Lloh0:
	adrp	x24, _AVE_MAX_ETHFRAME@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AVE_MAX_ETHFRAME@GOTPAGEOFF]
Lloh2:
	adrp	x23, _AVE_FRAME_HEADROOM@GOTPAGE
Lloh3:
	ldr	x23, [x23, _AVE_FRAME_HEADROOM@GOTPAGEOFF]
	cbnz	x21, LBB0_3
; %bb.1:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_6
; %bb.2:
	mov	x21, x0
	ldr	x8, [x23]
	ldr	x9, [x0]
	add	x8, x9, x8
	str	x8, [x0]
	ldr	w8, [x23]
	ldr	w9, [x0, #8]
	add	w8, w9, w8
	str	w8, [x0, #8]
LBB0_3:
	sxtw	x27, w20
Lloh4:
	adrp	x25, _AVE_DESCID_RX@GOTPAGE
Lloh5:
	ldr	x25, [x25, _AVE_DESCID_RX@GOTPAGEOFF]
Lloh6:
	adrp	x26, _AVE_STS_INTR@GOTPAGE
Lloh7:
	ldr	x26, [x26, _AVE_STS_INTR@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	w8, [x26]
Lloh8:
	adrp	x9, _AVE_STS_OWN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AVE_STS_OWN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x19
	mov	x2, x20
	bl	_ave_desc_write_cmdsts
	ldr	x8, [x22]
	add	x1, x8, x27, lsl #3
	ldr	x8, [x21]
	ldr	x9, [x23]
	sub	x2, x8, x9
	ldrsw	x8, [x24]
	add	x3, x9, x8
Lloh11:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
	add	x5, sp, #12
	mov	x0, x19
	bl	_ave_dma_map
	mov	x23, x0
	cbz	w0, LBB0_5
; %bb.4:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	mov	x0, x21
	bl	_dev_kfree_skb_any
	b	LBB0_7
LBB0_5:
	ldr	x8, [x22]
	str	x21, [x8, x27, lsl #3]
	ldr	w1, [x25]
	ldr	w3, [sp, #12]
	mov	x0, x19
	mov	x2, x20
	bl	_ave_desc_write_addr
	ldr	w1, [x25]
	ldr	w8, [x26]
	ldr	w9, [x24]
	orr	w3, w9, w8
	mov	x0, x19
	mov	x2, x20
	bl	_ave_desc_write_cmdsts
	b	LBB0_7
LBB0_6:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_7:
	mov	x0, x23
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AVE_MAX_ETHFRAME,4,2           ; @AVE_MAX_ETHFRAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't allocate skb for Rx\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVE_FRAME_HEADROOM,8,3         ; @AVE_FRAME_HEADROOM
	.comm	_AVE_DESCID_RX,4,2              ; @AVE_DESCID_RX
	.comm	_AVE_STS_INTR,4,2               ; @AVE_STS_INTR
	.comm	_AVE_STS_OWN,4,2                ; @AVE_STS_OWN
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
l_.str.1:                               ; @.str.1
	.asciz	"can't map skb for Rx\n"

	.no_dead_strip	_ave_rxdesc_prepare
.subsections_via_symbols
