	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function greth_clean_rings
_greth_clean_rings:                     ## @greth_clean_rings
	.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
	movq	%rdi, %r12
	movq	72(%rdi), %r14
	cmpq	$0, 64(%rdi)
	movq	_GRETH_RXBD_NUM@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_12
## %bb.1:
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	addq	$4, %r14
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	56(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_dev_kfree_skb
	movl	16(%r12), %r15d
	movq	%r14, %rdi
	callq	_greth_read_bd
	movq	_NET_IP_ALIGN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_MAX_FRAME_SIZE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rdx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_dma_unmap_single
	movl	(%r13), %eax
	jmp	LBB0_5
LBB0_6:
	movl	(%r12), %eax
	movq	_GRETH_TXBD_NUM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_18
## %bb.7:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	incl	%eax
	movl	%eax, (%r12)
	movq	%rbx, %rdi
	callq	_dev_kfree_skb
	movl	(%r12), %eax
	movq	_GRETH_TXBD_NUM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_18
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	8(%r12), %rax
	movq	48(%r12), %rcx
	movq	(%rcx,%rax,8), %rbx
	movq	%rbx, %rdi
	callq	_skb_shinfo
	movl	(%rax), %r14d
	movq	8(%r12), %rdi
	movq	%rdi, %r15
	shlq	$2, %r15
	addq	40(%r12), %r15
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_NEXT_TX
	movq	%rax, 8(%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %r12d
	movq	%r15, %rdi
	callq	_greth_read_bd
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_skb_headlen
	movl	(%r13), %ecx
	movl	%r12d, %edi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%rax, %rdx
	callq	_dma_unmap_single
	movq	%r14, %rax
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_skb_shinfo
	movq	%rbx, %r15
	movq	8(%rax), %rbx
	addq	%r14, %rbx
	movq	8(%r12), %rdi
	movl	16(%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	shlq	$2, %rdi
	addq	40(%r12), %rdi
	callq	_greth_read_bd
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movq	%r15, %rbx
	callq	_skb_frag_size
	movl	(%r13), %ecx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %esi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dma_unmap_page
	movl	8(%r12), %edi
	callq	_NEXT_TX
	movq	%rax, 8(%r12)
	addq	$4, %r14
	cmpq	%r14, -72(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_10
	jmp	LBB0_11
LBB0_12:
	movq	40(%r12), %r15
	testl	%eax, %eax
	movq	%r12, %rbx
	jle	LBB0_15
## %bb.13:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	callq	_kfree
	movl	16(%rbx), %r13d
	movq	%r14, %rdi
	callq	_greth_read_bd
	movq	_MAX_FRAME_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_dma_unmap_single
	movq	_GRETH_RXBD_NUM@GOTPCREL(%rip), %rax
	incq	%r12
	addq	$4, %r14
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jl	LBB0_14
LBB0_15:
	movq	_GRETH_TXBD_NUM@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_18
## %bb.16:
	movq	%rbx, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_kfree
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %r12d
	movq	%r15, %rdi
	callq	_greth_read_bd
	movq	_MAX_FRAME_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r12d, %edi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_dma_unmap_single
	incq	%rbx
	addq	$4, %r15
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_17
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRETH_RXBD_NUM,4,2             ## @GRETH_RXBD_NUM
	.comm	_MAX_FRAME_SIZE,8,3             ## @MAX_FRAME_SIZE
	.comm	_NET_IP_ALIGN,8,3               ## @NET_IP_ALIGN
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_GRETH_TXBD_NUM,4,2             ## @GRETH_TXBD_NUM
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_greth_clean_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function greth_clean_rings
_greth_clean_rings:                     ; @greth_clean_rings
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	ldp	x9, x20, [x0, #64]
Lloh0:
	adrp	x23, _GRETH_RXBD_NUM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GRETH_RXBD_NUM@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	x9, LBB0_12
; %bb.1:
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x22, #0
Lloh2:
	adrp	x24, _MAX_FRAME_SIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MAX_FRAME_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _NET_IP_ALIGN@GOTPAGE
Lloh5:
	ldr	x25, [x25, _NET_IP_ALIGN@GOTPAGEOFF]
Lloh6:
	adrp	x26, _DMA_FROM_DEVICE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	add	x20, x20, #4
	cmp	x22, w8, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #56]
	ldr	x0, [x9, x22, lsl #3]
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_dev_kfree_skb
	ldr	w21, [x19, #16]
	mov	x0, x20
	bl	_greth_read_bd
	mov	x1, x0
	ldr	x8, [x24]
	ldr	x9, [x25]
	add	x2, x9, x8
	ldr	w3, [x26]
	mov	x0, x21
	bl	_dma_unmap_single
	ldr	w8, [x23]
	b	LBB0_3
LBB0_6:
	ldr	w8, [x19]
Lloh8:
	adrp	x24, _GRETH_TXBD_NUM@GOTPAGE
Lloh9:
	ldr	x24, [x24, _GRETH_TXBD_NUM@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ge	LBB0_18
; %bb.7:
Lloh10:
	adrp	x25, _DMA_TO_DEVICE@GOTPAGE
Lloh11:
	ldr	x25, [x25, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x19]
	add	w8, w26, w8
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_dev_kfree_skb
	ldr	w8, [x19]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ge	LBB0_18
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	x8, [x19, #48]
	ldr	x9, [x19, #8]
	ldr	x20, [x8, x9, lsl #3]
	mov	x0, x20
	bl	_skb_shinfo
	ldr	w26, [x0]
	ldr	x23, [x19, #40]
	ldr	x21, [x19, #8]
	mov	x0, x21
	bl	_NEXT_TX
	str	x0, [x19, #8]
	ldr	w22, [x19, #16]
	add	x0, x23, x21, lsl #2
	bl	_greth_read_bd
	mov	x21, x0
	mov	x0, x20
	bl	_skb_headlen
	mov	x2, x0
	ldr	w3, [x25]
	mov	x0, x22
	mov	x1, x21
	bl	_dma_unmap_single
	cmp	w26, #1
	b.lt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x27, #0
	lsl	x28, x26, #2
LBB0_11:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_skb_shinfo
	ldr	x8, [x0, #8]
	add	x21, x8, x27
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #8]
	ldr	w22, [x19, #16]
	add	x0, x8, x9, lsl #2
	bl	_greth_read_bd
	mov	x23, x0
	mov	x0, x21
	bl	_skb_frag_size
	mov	x2, x0
	ldr	w3, [x25]
	mov	x0, x22
	mov	x1, x23
	bl	_dma_unmap_page
	ldr	w0, [x19, #8]
	bl	_NEXT_TX
	str	x0, [x19, #8]
	add	x27, x27, #4
	cmp	x28, x27
	b.ne	LBB0_11
	b	LBB0_8
LBB0_12:
	ldr	x21, [x19, #40]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x24, #0
Lloh12:
	adrp	x25, _MAX_FRAME_SIZE@GOTPAGE
Lloh13:
	ldr	x25, [x25, _MAX_FRAME_SIZE@GOTPAGEOFF]
Lloh14:
	adrp	x26, _DMA_FROM_DEVICE@GOTPAGE
Lloh15:
	ldr	x26, [x26, _DMA_FROM_DEVICE@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	w0, [x8, x24, lsl #2]
	bl	_kfree
	ldr	w22, [x19, #16]
	mov	x0, x20
	bl	_greth_read_bd
	mov	x1, x0
	ldr	x2, [x25]
	ldr	w3, [x26]
	mov	x0, x22
	bl	_dma_unmap_single
	add	x24, x24, #1
	add	x20, x20, #4
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_14
LBB0_15:
Lloh16:
	adrp	x22, _GRETH_TXBD_NUM@GOTPAGE
Lloh17:
	ldr	x22, [x22, _GRETH_TXBD_NUM@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	mov	x23, #0
Lloh18:
	adrp	x24, _MAX_FRAME_SIZE@GOTPAGE
Lloh19:
	ldr	x24, [x24, _MAX_FRAME_SIZE@GOTPAGEOFF]
Lloh20:
	adrp	x25, _DMA_TO_DEVICE@GOTPAGE
Lloh21:
	ldr	x25, [x25, _DMA_TO_DEVICE@GOTPAGEOFF]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w0, [x8, x23, lsl #2]
	bl	_kfree
	ldr	w20, [x19, #16]
	mov	x0, x21
	bl	_greth_read_bd
	mov	x1, x0
	ldr	x2, [x24]
	ldr	w3, [x25]
	mov	x0, x20
	bl	_dma_unmap_single
	add	x23, x23, #1
	add	x21, x21, #4
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.lt	LBB0_17
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GRETH_RXBD_NUM,4,2             ; @GRETH_RXBD_NUM
	.comm	_MAX_FRAME_SIZE,8,3             ; @MAX_FRAME_SIZE
	.comm	_NET_IP_ALIGN,8,3               ; @NET_IP_ALIGN
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_GRETH_TXBD_NUM,4,2             ; @GRETH_TXBD_NUM
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_greth_clean_rings
.subsections_via_symbols
