	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spider_net_prepare_rx_descr
_spider_net_prepare_rx_descr:           ## @spider_net_prepare_rx_descr
	.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, %r15
	movq	%rdi, %r14
	movq	8(%rsi), %r12
	movq	_SPIDER_NET_MAX_FRAME@GOTPCREL(%rip), %rdx
	movq	_SPIDER_NET_RXBUF_ALIGN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	leal	-1(%rax), %ecx
	addl	(%rdx), %ecx
	movl	%eax, %r13d
	negl	%r13d
	andl	%ecx, %r13d
	movq	8(%rdi), %rdi
	leal	(%rax,%r13), %esi
	decl	%esi
	callq	_netdev_alloc_skb
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movl	%r13d, (%r12)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r12)
	movups	%xmm0, 32(%r12)
	movq	(%rax), %rsi
	movl	(%rbx), %ecx
	leal	-1(%rcx), %edi
	movl	%esi, %edx
	andl	%edi, %edx
	je	LBB0_7
## %bb.6:
	subl	%edx, %ecx
	movq	%rax, %rdi
	movl	%ecx, %esi
	callq	_skb_reserve
	movq	(%r15), %rax
	movq	(%rax), %rsi
LBB0_7:
	movl	16(%r14), %edi
	movq	_SPIDER_NET_MAX_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movl	%eax, %ebx
	movl	16(%r14), %edi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	(%r15), %rdi
	callq	_dev_kfree_skb_any
	movq	$0, (%r15)
	movq	%r14, %rdi
	callq	_netif_msg_rx_err
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_11:
	incl	(%r14)
	movq	_SPIDER_NET_DESCR_NOT_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_1:
	movq	%r14, %rdi
	callq	_netif_msg_rx_err
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:
	incl	4(%r14)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_12:
	movl	%ebx, 8(%r12)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wmb
	movq	_SPIDER_NET_DESCR_CARDOWNED@GOTPCREL(%rip), %rax
	movq	_SPIDER_NET_DMAC_NOINTR_COMPLETE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 4(%r12)
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPIDER_NET_MAX_FRAME,4,2       ## @SPIDER_NET_MAX_FRAME
	.comm	_SPIDER_NET_RXBUF_ALIGN,4,2     ## @SPIDER_NET_RXBUF_ALIGN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not enough memory to allocate rx buffer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
L_.str.1:                               ## @.str.1
	.asciz	"Could not iommu-map rx buffer\n"

	.comm	_SPIDER_NET_DESCR_NOT_IN_USE,4,2 ## @SPIDER_NET_DESCR_NOT_IN_USE
	.comm	_SPIDER_NET_DESCR_CARDOWNED,4,2 ## @SPIDER_NET_DESCR_CARDOWNED
	.comm	_SPIDER_NET_DMAC_NOINTR_COMPLETE,4,2 ## @SPIDER_NET_DMAC_NOINTR_COMPLETE
	.no_dead_strip	_spider_net_prepare_rx_descr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spider_net_prepare_rx_descr
_spider_net_prepare_rx_descr:           ; @spider_net_prepare_rx_descr
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x1, #8]
Lloh0:
	adrp	x21, _SPIDER_NET_MAX_FRAME@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SPIDER_NET_MAX_FRAME@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x23, _SPIDER_NET_RXBUF_ALIGN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SPIDER_NET_RXBUF_ALIGN@GOTPAGEOFF]
	ldr	w9, [x23]
	sub	w10, w9, #1
	add	w8, w10, w8
	neg	w9, w9
	and	w24, w8, w9
	ldr	x0, [x0, #8]
	add	w1, w10, w24
	bl	_netdev_alloc_skb
	str	x0, [x20]
	cbz	x0, LBB0_8
; %bb.1:
	str	w24, [x22]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x22, #16]
	ldr	x1, [x0]
	ldr	w8, [x23]
	sub	w9, w8, #1
	ands	w9, w9, w1
	b.eq	LBB0_3
; %bb.2:
	sub	w1, w8, w9
	bl	_skb_reserve
	ldr	x8, [x20]
	ldr	x1, [x8]
LBB0_3:
	ldr	w0, [x19, #16]
	ldr	w2, [x21]
Lloh4:
	adrp	x8, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	bl	_pci_map_single
	mov	x21, x0
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_pci_dma_mapping_error
	cbz	x0, LBB0_12
; %bb.4:
	ldr	x0, [x20]
	bl	_dev_kfree_skb_any
	str	xzr, [x20]
	mov	x0, x19
	bl	_netif_msg_rx_err
	cbz	x0, LBB0_7
; %bb.5:
	bl	_net_ratelimit
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x0, [x19, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_7:
	mov	w0, #0
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
Lloh9:
	adrp	x8, _SPIDER_NET_DESCR_NOT_IN_USE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPIDER_NET_DESCR_NOT_IN_USE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	b	LBB0_13
LBB0_8:
	mov	x0, x19
	bl	_netif_msg_rx_err
	cbz	x0, LBB0_11
; %bb.9:
	bl	_net_ratelimit
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_11:
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_12:
	str	w21, [x22, #8]
	bl	_wmb
	mov	w0, #0
Lloh17:
	adrp	x8, _SPIDER_NET_DESCR_CARDOWNED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SPIDER_NET_DESCR_CARDOWNED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _SPIDER_NET_DMAC_NOINTR_COMPLETE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SPIDER_NET_DMAC_NOINTR_COMPLETE@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_13:
	str	w8, [x22, #4]
LBB0_14:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SPIDER_NET_MAX_FRAME,4,2       ; @SPIDER_NET_MAX_FRAME
	.comm	_SPIDER_NET_RXBUF_ALIGN,4,2     ; @SPIDER_NET_RXBUF_ALIGN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not enough memory to allocate rx buffer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
l_.str.1:                               ; @.str.1
	.asciz	"Could not iommu-map rx buffer\n"

	.comm	_SPIDER_NET_DESCR_NOT_IN_USE,4,2 ; @SPIDER_NET_DESCR_NOT_IN_USE
	.comm	_SPIDER_NET_DESCR_CARDOWNED,4,2 ; @SPIDER_NET_DESCR_CARDOWNED
	.comm	_SPIDER_NET_DMAC_NOINTR_COMPLETE,4,2 ; @SPIDER_NET_DMAC_NOINTR_COMPLETE
	.no_dead_strip	_spider_net_prepare_rx_descr
.subsections_via_symbols
