	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __emac_prepare_rx_skb
___emac_prepare_rx_skb:                 ## @__emac_prepare_rx_skb
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	movq	24(%r14), %rax
	movslq	%r15d, %r12
	movq	%rbx, (%rax,%r12,8)
	movq	(%r14), %rax
	leaq	(,%r12,8), %rcx
	leaq	(%rcx,%rcx,2), %r15
	movq	$0, 16(%rax,%r15)
	movq	(%rbx), %rsi
	movq	_NET_IP_ALIGN@GOTPCREL(%rip), %rbx
	subq	(%rbx), %rsi
	movq	16(%r14), %rdi
	movl	8(%r14), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	addq	(%rbx), %rax
	movq	(%r14), %rcx
	movq	%rax, 8(%rcx,%r15)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wmb
	movq	_MAL_RX_CTRL_EMPTY@GOTPCREL(%rip), %rax
	movq	_NUM_RX_BUFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	decl	%edx
	movl	$0, %ecx
	cmpl	%r12d, %edx
	jne	LBB0_4
## %bb.3:
	movq	_MAL_RX_CTRL_WRAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	orl	(%rax), %ecx
	movq	(%r14), %rax
	movl	%ecx, (%rax,%r15)
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_NET_IP_ALIGN,8,3               ## @NET_IP_ALIGN
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_MAL_RX_CTRL_EMPTY,4,2          ## @MAL_RX_CTRL_EMPTY
	.comm	_NUM_RX_BUFF,4,2                ## @NUM_RX_BUFF
	.comm	_MAL_RX_CTRL_WRAP,4,2           ## @MAL_RX_CTRL_WRAP
	.no_dead_strip	___emac_prepare_rx_skb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __emac_prepare_rx_skb
___emac_prepare_rx_skb:                 ; @__emac_prepare_rx_skb
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #24]
	sxtw	x9, w20
	str	x21, [x8, w20, sxtw #3]
	ldr	x8, [x19]
	add	x9, x9, w20, sxtw #1
	lsl	x22, x9, #3
	add	x8, x8, x22
	str	xzr, [x8, #16]
	ldr	x0, [x19, #16]
	ldr	x8, [x21]
Lloh3:
	adrp	x21, _NET_IP_ALIGN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _NET_IP_ALIGN@GOTPAGEOFF]
	ldr	x9, [x21]
	sub	x1, x8, x9
	ldr	w2, [x19, #8]
Lloh5:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	bl	_dma_map_single
	ldr	x8, [x21]
	add	x8, x8, x0
	ldr	x9, [x19]
	add	x9, x9, x22
	str	x8, [x9, #8]
	bl	_wmb
	mov	w0, #0
Lloh8:
	adrp	x8, _MAL_RX_CTRL_EMPTY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAL_RX_CTRL_EMPTY@GOTPAGEOFF]
Lloh10:
	adrp	x9, _NUM_RX_BUFF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _NUM_RX_BUFF@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	sub	w9, w9, #1
Lloh14:
	adrp	x10, _MAL_RX_CTRL_WRAP@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MAL_RX_CTRL_WRAP@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	cmp	w9, w20
	csel	w9, w10, wzr, eq
	orr	w8, w9, w8
	ldr	x9, [x19]
	str	w8, [x9, x22]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_NET_IP_ALIGN,8,3               ; @NET_IP_ALIGN
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_MAL_RX_CTRL_EMPTY,4,2          ; @MAL_RX_CTRL_EMPTY
	.comm	_NUM_RX_BUFF,4,2                ; @NUM_RX_BUFF
	.comm	_MAL_RX_CTRL_WRAP,4,2           ; @MAL_RX_CTRL_WRAP
	.no_dead_strip	___emac_prepare_rx_skb
.subsections_via_symbols
