	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spider_net_release_tx_chain
_spider_net_release_tx_chain:           ## @spider_net_release_tx_chain
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	leaq	16(%rdi), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	24(%r15), %r12
	xorl	%r14d, %r14d
	cmpq	32(%r15), %r12
	je	LBB0_17
## %bb.1:
	leaq	4(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leaq	8(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	24(%r15), %r12
	cmpq	32(%r15), %r12
	je	LBB0_16
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_spider_net_get_descr_status
	movl	%eax, %r13d
	leal	-128(%r13), %eax
	cmpl	$3, %eax
	jb	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$132, %r13d
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$131, %r13d
	jne	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	12(%rax)
	movq	(%r12), %rax
	movl	(%rax), %ebx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_18
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_netif_msg_tx_err
	movl	$1, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rdi
	addq	$16, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_err
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	addl	%ebx, (%rax)
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rax
	movq	%rax, 24(%r15)
	movq	_SPIDER_NET_DESCR_NOT_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r14)
	movq	(%r12), %rbx
	movq	$0, (%r12)
	movl	(%r14), %r14d
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %edi
	movl	(%rbx), %edx
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	callq	_pci_unmap_single
	movq	%rbx, %rdi
	callq	_dev_consume_skb_any
	jmp	LBB0_2
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_12
## %bb.15:
	movl	$1, %r14d
	jmp	LBB0_17
LBB0_16:
	xorl	%r14d, %r14d
LBB0_17:
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	$1, %r14d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"forcing end of tx descriptor with status x%02x\n"

	.comm	_SPIDER_NET_DESCR_NOT_IN_USE,4,2 ## @SPIDER_NET_DESCR_NOT_IN_USE
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.no_dead_strip	_spider_net_release_tx_chain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spider_net_release_tx_chain
_spider_net_release_tx_chain:           ; @spider_net_release_tx_chain
	.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	x21, x0
	ldr	x26, [x0, #8]
	add	x19, x0, #16
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldp	x22, x8, [x21, #24]
	cmp	x22, x8
	b.eq	LBB0_16
; %bb.1:
	add	x27, x26, #4
	add	x8, x26, #8
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x28, _SPIDER_NET_DESCR_NOT_IN_USE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _SPIDER_NET_DESCR_NOT_IN_USE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldp	x22, x8, [x21, #24]
	cmp	x22, x8
	b.eq	LBB0_16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x22, #16]
	mov	x0, x23
	bl	_spider_net_get_descr_status
	mov	x24, x0
	sub	w8, w0, #128
	cmp	w8, #3
	b.lo	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, #132
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, #131
	b.ne	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26, #12]
	add	w8, w8, #1
	str	w8, [x26, #12]
	ldr	x8, [x22]
	ldr	w8, [x8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	b	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	w20, LBB0_15
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_netif_msg_tx_err
	cbz	w0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21, #8]
	add	x0, x8, #16
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x24
	bl	_dev_err
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #1
	mov	x9, x27
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x24, x8, [x22]
	str	x8, [x21, #24]
	ldr	w8, [x28]
	ldp	w25, w9, [x23]
	orr	w8, w9, w8
	str	w8, [x23, #4]
	str	xzr, [x22]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cbz	x24, LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	ldr	w2, [x24]
Lloh4:
	adrp	x8, _PCI_DMA_TODEVICE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCI_DMA_TODEVICE@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x1, x25
	bl	_pci_unmap_single
	mov	x0, x24
	bl	_dev_consume_skb_any
	b	LBB0_2
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	add	w8, w8, #1
	str	w8, [x26]
	cbnz	w20, LBB0_12
LBB0_15:
	mov	w20, #1
	b	LBB0_17
LBB0_16:
	mov	w20, #0
LBB0_17:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"forcing end of tx descriptor with status x%02x\n"

	.comm	_SPIDER_NET_DESCR_NOT_IN_USE,4,2 ; @SPIDER_NET_DESCR_NOT_IN_USE
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.no_dead_strip	_spider_net_release_tx_chain
.subsections_via_symbols
