	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hisi_femac_free_skb_rings
_hisi_femac_free_skb_rings:             ## @hisi_femac_free_skb_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	16(%rdi), %r14
	cmpq	24(%rdi), %r14
	jne	LBB0_1
LBB0_8:
	movq	%r14, 16(%r12)
	movq	56(%r12), %r14
	cmpq	64(%r12), %r14
	jne	LBB0_9
LBB0_16:
	movq	%r14, 56(%r12)
	movq	$0, (%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r12), %rax
	movq	(%rax,%r14,8), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r12), %edi
	movq	24(%r12), %rcx
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_netdev_err
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	24(%r12), %r14
	jne	LBB0_2
	jmp	LBB0_8
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	48(%r12), %rax
	movl	(%rax,%r14,4), %esi
	movl	12(%r12), %edi
	movq	_MAX_FRAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	callq	_dma_unmap_single
	movq	%rbx, %rdi
	callq	_dev_kfree_skb_any
	movq	40(%r12), %rax
	movq	$0, (%rax,%r14,8)
	incq	%r14
	movq	32(%r12), %rcx
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %r14
	jmp	LBB0_7
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %r14d
	jmp	LBB0_7
LBB0_9:
	leaq	L_.str.1(%rip), %r15
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	80(%r12), %rax
	movq	(%rax,%r14,8), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	8(%r12), %edi
	movq	64(%r12), %rcx
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_netdev_err
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpq	64(%r12), %r14
	jne	LBB0_10
	jmp	LBB0_16
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_hisi_femac_tx_dma_unmap
	movq	%rbx, %rdi
	callq	_dev_kfree_skb_any
	movq	80(%r12), %rax
	movq	$0, (%rax,%r14,8)
	incq	%r14
	movq	72(%r12), %rcx
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %r14
	jmp	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %r14d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NULL rx skb. pos=%d, head=%d\n"

	.comm	_MAX_FRAME_SIZE,4,2             ## @MAX_FRAME_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
L_.str.1:                               ## @.str.1
	.asciz	"NULL tx skb. pos=%d, head=%d\n"

	.no_dead_strip	_hisi_femac_free_skb_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hisi_femac_free_skb_rings
_hisi_femac_free_skb_rings:             ; @hisi_femac_free_skb_rings
	.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	x19, x0
	ldp	x20, x8, [x0, #16]
	cmp	x20, x8
	b.ne	LBB0_3
LBB0_1:
	str	x20, [x19, #16]
	ldp	x20, x8, [x19, #56]
	cmp	x20, x8
	b.ne	LBB0_7
LBB0_2:
	str	x20, [x19, #56]
	str	xzr, [x19]
	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_3:
Lloh0:
	adrp	x23, _MAX_FRAME_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MAX_FRAME_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	x22, [x8, x20, lsl #3]
	cmp	x22, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #8]
	ldr	x3, [x19, #24]
	mov	x1, x21
	mov	x2, x20
	bl	_netdev_err
	ldr	x8, [x19, #24]
	cmp	x20, x8
	b.ne	LBB0_4
	b	LBB0_1
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #48]
	ldr	w1, [x8, x20, lsl #2]
	ldr	w0, [x19, #12]
	ldr	w2, [x23]
	ldr	w3, [x24]
	bl	_dma_unmap_single
	mov	x0, x22
	bl	_dev_kfree_skb_any
	ldr	x8, [x19, #40]
	str	xzr, [x8, x20, lsl #3]
	add	x8, x20, #1
	ldp	x10, x9, [x19, #24]
	udiv	x11, x8, x9
	msub	x20, x11, x9, x8
	cmp	x20, x10
	b.ne	LBB0_4
	b	LBB0_1
LBB0_7:
Lloh6:
	adrp	x21, l_.str.1@PAGE
Lloh7:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #80]
	ldr	x22, [x8, x20, lsl #3]
	cmp	x22, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x19, #8]
	ldr	x3, [x19, #64]
	mov	x1, x21
	mov	x2, x20
	bl	_netdev_err
	ldr	x8, [x19, #64]
	cmp	x20, x8
	b.ne	LBB0_8
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_hisi_femac_tx_dma_unmap
	mov	x0, x22
	bl	_dev_kfree_skb_any
	ldr	x8, [x19, #80]
	str	xzr, [x8, x20, lsl #3]
	add	x8, x20, #1
	ldp	x10, x9, [x19, #64]
	udiv	x11, x8, x9
	msub	x20, x11, x9, x8
	cmp	x20, x10
	b.ne	LBB0_8
	b	LBB0_2
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NULL rx skb. pos=%d, head=%d\n"

	.comm	_MAX_FRAME_SIZE,4,2             ; @MAX_FRAME_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
l_.str.1:                               ; @.str.1
	.asciz	"NULL tx skb. pos=%d, head=%d\n"

	.no_dead_strip	_hisi_femac_free_skb_rings
.subsections_via_symbols
