	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function myri10ge_clean_rx_done
_myri10ge_clean_rx_done:                ## @myri10ge_clean_rx_done
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	48(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rax), %r8
	movl	56(%rdi), %eax
	movl	60(%rdi), %r14d
	movq	72(%rdi), %rcx
	movslq	%eax, %r12
	movq	%r12, %rdx
	shlq	$4, %rdx
	movq	(%rcx,%rdx), %rdi
	xorl	%r15d, %r15d
	pxor	%xmm1, %xmm1
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	testl	%esi, %esi
	jle	LBB0_9
## %bb.2:
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	leaq	16(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	pxor	%xmm1, %xmm1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm1, -96(%rbp)                ## 16-byte Spill
	callq	_ntohs
	movq	%rax, %r13
	movq	72(%rbx), %rax
	shlq	$4, %r12
	movq	$0, (%rax,%r12)
	movl	8(%rax,%r12), %edi
	callq	_csum_unfold
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rdx
	cmpq	%rdx, %r13
	jle	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rdx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rcx
	movl	%eax, %r8d
	callq	_myri10ge_rx_done
	imulq	%rax, %r13
	movq	%r13, %xmm0
	movq	%rax, %xmm1
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	movdqa	-96(%rbp), %xmm0                ## 16-byte Reload
	paddq	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	leal	(%r14,%r15), %eax
	incl	%eax
	movslq	16(%r12), %rcx
	decq	%rcx
	movslq	%eax, %r12
	andq	%rcx, %r12
	incl	%r15d
	movq	72(%rbx), %rax
	movq	%r12, %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-52(%rbp), %r15d                ## 4-byte Folded Reload
	jl	LBB0_3
LBB0_8:
	addl	%r15d, %r14d
	movl	%r12d, %eax
	movq	-64(%rbp), %r8                  ## 8-byte Reload
LBB0_9:
	movl	%eax, 56(%rbx)
	movl	%r14d, 60(%rbx)
	movdqu	32(%rbx), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	%xmm0, 32(%rbx)
	movq	_NETIF_F_LRO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r8)
	je	LBB0_11
## %bb.10:
	leaq	64(%rbx), %rdi
	callq	_lro_flush_all
LBB0_11:
	movq	16(%rbx), %rcx
	subq	24(%rbx), %rcx
	movq	_myri10ge_fill_thresh@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	cmpq	%rax, %rcx
	jge	LBB0_13
## %bb.12:
	leaq	16(%rbx), %rsi
	movq	_MXGEFW_PAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	(%rdi), %rdx
	xorl	%ecx, %ecx
	callq	_myri10ge_alloc_rx_pages
	movq	(%r12), %rax
LBB0_13:
	movq	(%rbx), %rcx
	subq	8(%rbx), %rcx
	cmpq	%rax, %rcx
	jge	LBB0_15
## %bb.14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rdx
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_myri10ge_alloc_rx_pages
LBB0_15:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NETIF_F_LRO,4,2                ## @NETIF_F_LRO
	.comm	_myri10ge_fill_thresh,8,3       ## @myri10ge_fill_thresh
	.comm	_MXGEFW_PAD,8,3                 ## @MXGEFW_PAD
	.no_dead_strip	_myri10ge_clean_rx_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function myri10ge_clean_rx_done
_myri10ge_clean_rx_done:                ; @myri10ge_clean_rx_done
	.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	x20, [x0, #48]
	ldr	x25, [x20, #24]
	ldp	w27, w26, [x0, #56]
	ldr	x8, [x0, #72]
	sbfiz	x9, x27, #4, #32
	ldr	x0, [x8, x9]
	cmp	x0, #0
	ccmp	w1, #1, #8, ne
	b.ge	LBB0_2
; %bb.1:
	mov	w21, #0
	movi.2d	v1, #0000000000000000
	b	LBB0_8
LBB0_2:
	mov	x22, x1
	mov	w21, #0
	sxtw	x27, w27
	add	x23, x19, #16
	movi.2d	v1, #0000000000000000
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x2, [x20, #8]
	mov	x0, x19
	mov	x1, x19
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x3, x24
	bl	_myri10ge_rx_done
	ldr	q1, [sp]                        ; 16-byte Folded Reload
	mul	x8, x0, x24
	fmov	d0, x0
	mov.d	v0[1], x8
	add.2d	v1, v0, v1
	add	w8, w26, w21
	add	w8, w8, #1
	ldrsw	x9, [x20, #16]
	sub	x9, x9, #1
	sxtw	x8, w8
	and	x27, x9, x8
	add	w21, w21, #1
	ldr	x8, [x19, #72]
	lsl	x9, x27, #4
	ldr	x0, [x8, x9]
	cmp	x0, #0
	ccmp	w21, w22, #0, ne
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	q1, [sp]                        ; 16-byte Folded Spill
	bl	_ntohs
	mov	x24, x0
	ldr	x8, [x19, #72]
	add	x8, x8, x27, lsl #4
	str	xzr, [x8]
	ldr	w0, [x8, #8]
	bl	_csum_unfold
	mov	x4, x0
	ldr	x2, [x20]
	cmp	x24, x2
	b.gt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x23
	b	LBB0_4
LBB0_7:
	add	w26, w26, w21
                                        ; kill: def $w27 killed $w27 killed $x27 def $x27
LBB0_8:
	stp	w27, w26, [x19, #56]
	ldr	q0, [x19, #32]
	add.2d	v0, v0, v1
	str	q0, [x19, #32]
	ldr	w8, [x25]
Lloh0:
	adrp	x9, _NETIF_F_LRO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NETIF_F_LRO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	add	x0, x19, #64
	bl	_lro_flush_all
LBB0_10:
	mov	x1, x19
	ldp	x9, x10, [x1, #16]!
Lloh3:
	adrp	x22, _myri10ge_fill_thresh@GOTPAGE
Lloh4:
	ldr	x22, [x22, _myri10ge_fill_thresh@GOTPAGEOFF]
	ldr	x8, [x22]
	sub	x9, x9, x10
	cmp	x9, x8
	b.ge	LBB0_12
; %bb.11:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _MXGEFW_PAD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MXGEFW_PAD@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x2, x9, x8
	mov	x0, x20
	mov	w3, #0
	bl	_myri10ge_alloc_rx_pages
	ldr	x8, [x22]
LBB0_12:
	ldp	x9, x10, [x19]
	sub	x9, x9, x10
	cmp	x9, x8
	b.ge	LBB0_14
; %bb.13:
	ldr	x2, [x20, #8]
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	bl	_myri10ge_alloc_rx_pages
LBB0_14:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NETIF_F_LRO,4,2                ; @NETIF_F_LRO
	.comm	_myri10ge_fill_thresh,8,3       ; @myri10ge_fill_thresh
	.comm	_MXGEFW_PAD,8,3                 ; @MXGEFW_PAD
	.no_dead_strip	_myri10ge_clean_rx_done
.subsections_via_symbols
