	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spider_net_prepare_tx_descr
_spider_net_prepare_tx_descr:           ## @spider_net_prepare_tx_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, %r14
	movq	%rdi, %r13
	movl	8(%rdi), %edi
	movl	8(%rsi), %edx
	movl	12(%rsi), %esi
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	callq	_pci_map_single
	movl	%eax, %r15d
	movl	8(%r13), %edi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%r13, %rdi
	callq	_netif_msg_tx_err
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%r13), %rdi
	movl	8(%r14), %ecx
	movl	12(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:
	incl	40(%r13)
	jmp	LBB0_5
LBB0_6:
	leaq	24(%r13), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	16(%r13), %rdx
	movq	32(%r13), %rcx
	movq	(%rdx), %rax
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	8(%r13), %edi
	movl	8(%r14), %edx
	movl	(%rbx), %ecx
	movl	%r15d, %esi
	callq	_pci_unmap_single
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	32(%rdx), %rbx
	movq	%rax, 16(%r13)
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, 24(%rdx)
	movl	%r15d, 28(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 24(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	_SPIDER_NET_DESCR_CARDOWNED@GOTPCREL(%rip), %rax
	movq	_SPIDER_NET_DMAC_TXFRMTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r14), %rax
	movq	_CHECKSUM_PARTIAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.9:
	movq	%r14, %rdi
	callq	_ip_hdr
	movl	(%rax), %eax
	cmpl	$129, %eax
	je	LBB0_10
## %bb.11:
	cmpl	$128, %eax
	jne	LBB0_14
## %bb.12:
	movq	_SPIDER_NET_DMAC_UDP@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_SPIDER_NET_DMAC_TCP@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_14:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wmb
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rcx), %eax
	movq	16(%rcx), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	(%r13), %rdi
	callq	_netif_trans_update
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not iommu-map packet (%p, %i). Dropping packet\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SPIDER_NET_DESCR_CARDOWNED,4,2 ## @SPIDER_NET_DESCR_CARDOWNED
	.comm	_SPIDER_NET_DMAC_TXFRMTL,4,2    ## @SPIDER_NET_DMAC_TXFRMTL
	.comm	_CHECKSUM_PARTIAL,8,3           ## @CHECKSUM_PARTIAL
	.comm	_SPIDER_NET_DMAC_TCP,4,2        ## @SPIDER_NET_DMAC_TCP
	.comm	_SPIDER_NET_DMAC_UDP,4,2        ## @SPIDER_NET_DMAC_UDP
	.no_dead_strip	_spider_net_prepare_tx_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_tx_descr
_spider_net_prepare_tx_descr:           ; @spider_net_prepare_tx_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	w0, [x0, #8]
	ldr	w1, [x1, #12]
	ldr	w2, [x20, #8]
Lloh0:
	adrp	x24, _PCI_DMA_TODEVICE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PCI_DMA_TODEVICE@GOTPAGEOFF]
	ldr	w3, [x24]
	bl	_pci_map_single
	mov	x21, x0
	ldr	w0, [x19, #8]
	mov	x1, x21
	bl	_pci_dma_mapping_error
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_netif_msg_tx_err
	cbz	x0, LBB0_4
; %bb.2:
	bl	_net_ratelimit
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x19]
	ldp	w3, w2, [x20, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_4:
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #40]
	b	LBB0_7
LBB0_5:
	add	x22, x19, #24
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x23, [x19, #16]
	ldr	x8, [x23]
	ldr	x9, [x19, #32]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #8]
	ldr	w2, [x20, #8]
	ldr	w3, [x24]
	mov	x1, x21
	bl	_pci_unmap_single
LBB0_7:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
LBB0_9:
	ldr	x24, [x23, #32]
	str	x8, [x19, #16]
	str	x20, [x23, #24]
	ldr	w8, [x20, #8]
	stp	w8, w21, [x24, #24]
	stp	xzr, xzr, [x24, #8]
Lloh7:
	adrp	x8, _SPIDER_NET_DESCR_CARDOWNED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPIDER_NET_DESCR_CARDOWNED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _SPIDER_NET_DMAC_TXFRMTL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SPIDER_NET_DMAC_TXFRMTL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x24]
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20]
Lloh13:
	adrp	x9, _CHECKSUM_PARTIAL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CHECKSUM_PARTIAL@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.10:
	mov	x0, x20
	bl	_ip_hdr
	ldr	w8, [x0]
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.11:
	cmp	w8, #128
	b.ne	LBB0_15
; %bb.12:
Lloh16:
	adrp	x8, _SPIDER_NET_DMAC_UDP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SPIDER_NET_DMAC_UDP@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh18:
	adrp	x8, _SPIDER_NET_DMAC_TCP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SPIDER_NET_DMAC_TCP@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	ldr	w9, [x24]
	orr	w8, w9, w8
	str	w8, [x24]
LBB0_15:
	bl	_wmb
	ldr	w8, [x23, #8]
	ldr	x9, [x23, #16]
	ldr	x9, [x9]
	str	w8, [x9]
	ldr	x0, [x19]
	bl	_netif_trans_update
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not iommu-map packet (%p, %i). Dropping packet\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SPIDER_NET_DESCR_CARDOWNED,4,2 ; @SPIDER_NET_DESCR_CARDOWNED
	.comm	_SPIDER_NET_DMAC_TXFRMTL,4,2    ; @SPIDER_NET_DMAC_TXFRMTL
	.comm	_CHECKSUM_PARTIAL,8,3           ; @CHECKSUM_PARTIAL
	.comm	_SPIDER_NET_DMAC_TCP,4,2        ; @SPIDER_NET_DMAC_TCP
	.comm	_SPIDER_NET_DMAC_UDP,4,2        ; @SPIDER_NET_DMAC_UDP
	.no_dead_strip	_spider_net_prepare_tx_descr
.subsections_via_symbols
