	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gem_clean_rings
_gem_clean_rings:                       ## @gem_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	24(%rdi), %r12
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_5
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, 8(%r15,%r14,2)
	xorl	%eax, %eax
	callq	_dma_wmb
	movq	$0, (%r15,%r14,2)
	incq	%r13
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$8, %r14
	cmpq	%rax, %r13
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%rbx, %rdi
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %r15
	movq	16(%rdi), %rax
	movq	%rdi, %rbx
	movq	(%rax,%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r15,%r14,2), %rdi
	callq	_le64_to_cpu
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %r12
	movl	(%rbx), %ebx
	movq	%r12, %rdi
	callq	_RX_BUF_ALLOC_SIZE
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edi
	movq	%r12, %rbx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_pci_unmap_page
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_kfree_skb_any
	movq	16(%r12), %rax
	movq	$0, (%rax,%r14)
	jmp	LBB0_4
LBB0_5:
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.6:
	xorl	%r13d, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_kfree_skb_any
	movl	(%r15), %eax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%r13d
	cmpl	%eax, %r13d
	jge	LBB0_13
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	8(%rdi), %rcx
	movslq	%r13d, %rdx
	movq	(%rcx,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	$0, (%rcx,%rdx,8)
	movq	%rbx, %rdi
	callq	_skb_shinfo
	cmpl	$0, (%rax)
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	js	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	$-1, %r14d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%r14d
	movq	%r15, %rbx
	movslq	(%r15), %r15
	decq	%r15
	movslq	%r13d, %r13
	andq	%r13, %r15
	movq	(%r12), %r12
	shlq	$4, %r15
	movq	8(%r12,%r15), %rdi
	callq	_le64_to_cpu
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r12,%r15), %rdi
	movq	%rbx, %r15
	movq	_TXDCTRL_BUFSZ@GOTPCREL(%rip), %rbx
	callq	_le64_to_cpu
	andl	(%rbx), %eax
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_pci_unmap_page
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_skb_shinfo
	xorl	%ecx, %ecx
	cmpl	(%rax), %r14d
	setne	%cl
	addl	%ecx, %r13d
	movq	%rbx, %rdi
	callq	_skb_shinfo
	cmpl	(%rax), %r14d
	jl	LBB0_10
	jmp	LBB0_11
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_RING_SIZE,4,2               ## @RX_RING_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.comm	_TXDCTRL_BUFSZ,4,2              ## @TXDCTRL_BUFSZ
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.no_dead_strip	_gem_clean_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gem_clean_rings
_gem_clean_rings:                       ; @gem_clean_rings
	.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	x19, x0
	ldr	x23, [x0, #24]
Lloh0:
	adrp	x24, _RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x25, #0
	mov	x26, #0
Lloh2:
	adrp	x27, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x28, x25
	str	xzr, [x20, #8]
	bl	_dma_wmb
	str	xzr, [x20]
	add	x26, x26, #1
	ldrsw	x8, [x24]
	add	x25, x25, #16
	cmp	x26, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x23, #8]
	ldr	x8, [x19, #16]
	ldr	x20, [x8, x26, lsl #3]
	cbz	x20, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x28, x25]
	bl	_le64_to_cpu
	mov	x21, x0
	ldr	w22, [x19]
	mov	x0, x19
	bl	_RX_BUF_ALLOC_SIZE
	mov	x2, x0
	ldr	w3, [x27]
	mov	x0, x22
	mov	x1, x21
	bl	_pci_unmap_page
	mov	x0, x20
	bl	_dev_kfree_skb_any
	ldr	x8, [x19, #16]
	str	xzr, [x8, x26, lsl #3]
	b	LBB0_2
LBB0_5:
Lloh4:
	adrp	x26, _TX_RING_SIZE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _TX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.6:
	mov	w25, #0
Lloh6:
	adrp	x24, _TXDCTRL_BUFSZ@GOTPAGE
Lloh7:
	ldr	x24, [x24, _TXDCTRL_BUFSZ@GOTPAGEOFF]
Lloh8:
	adrp	x27, _PCI_DMA_TODEVICE@GOTPAGE
Lloh9:
	ldr	x27, [x27, _PCI_DMA_TODEVICE@GOTPAGEOFF]
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x20
	bl	_dev_kfree_skb_any
	ldr	w8, [x26]
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w25, w25, #1
	cmp	w25, w8
	b.ge	LBB0_13
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	x9, [x19, #8]
	ldr	x20, [x9, w25, sxtw #3]
	cbz	x20, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	sxtw	x8, w25
	str	xzr, [x9, x8, lsl #3]
	mov	x0, x20
	bl	_skb_shinfo
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w28, #-1
LBB0_12:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w28, w28, #1
	ldr	w8, [x26]
	sub	w8, w8, #1
	and	w8, w8, w25
	ldr	x9, [x23]
	mov	x19, x23
	mov	x23, x27
	mov	x27, x24
	add	x24, x9, w8, sxtw #4
	ldr	x0, [x24, #8]
	bl	_le64_to_cpu
	mov	x21, x0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w22, [x8]
	ldr	x0, [x24]
	mov	x24, x27
	mov	x27, x23
	mov	x23, x19
	bl	_le64_to_cpu
	ldr	w8, [x24]
	and	w2, w8, w0
	ldr	w3, [x27]
	mov	x0, x22
	mov	x1, x21
	bl	_pci_unmap_page
	mov	x0, x20
	bl	_skb_shinfo
	ldr	w8, [x0]
	cmp	w28, w8
	cinc	w25, w25, ne
	mov	x0, x20
	bl	_skb_shinfo
	ldr	w8, [x0]
	cmp	w28, w8
	b.lt	LBB0_12
	b	LBB0_7
LBB0_13:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.comm	_TXDCTRL_BUFSZ,4,2              ; @TXDCTRL_BUFSZ
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.no_dead_strip	_gem_clean_rings
.subsections_via_symbols
