	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp2_bm_bufs_free
_mvpp2_bm_bufs_free:                    ## @mvpp2_bm_bufs_free
	.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
	movl	%ecx, %r13d
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	cmpl	%ecx, (%rdx)
	jge	LBB0_2
## %bb.1:
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%r13d, %ecx
	callq	_WARN
	movl	(%rbx), %r13d
LBB0_2:
	xorl	%r14d, %r14d
	testl	%r13d, %r13d
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	callq	_mvpp2_bm_bufs_get_addrs
	movl	-48(%rbp), %esi
	movl	4(%rbx), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	callq	_dma_unmap_single
	movl	-44(%rbp), %edi
	callq	_phys_to_virt
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_mvpp2_frag_free
	incl	%r14d
	cmpl	%r14d, %r13d
	jne	LBB0_3
## %bb.5:
	movl	%r13d, %r14d
LBB0_6:
	subl	%r14d, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pool does not have so many bufs pool(%d) bufs(%d)\n"

	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_mvpp2_bm_bufs_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp2_bm_bufs_free
_mvpp2_bm_bufs_free:                    ; @mvpp2_bm_bufs_free
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w8, [x2]
	cmp	w8, w3
	b.ge	LBB0_2
; %bb.1:
	ldr	w2, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x3, x20
	bl	_WARN
	ldr	w20, [x19]
LBB0_2:
	cmp	w20, #1
	b.lt	LBB0_7
; %bb.3:
	mov	w23, #0
Lloh2:
	adrp	x24, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DMA_FROM_DEVICE@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	bl	_mvpp2_bm_bufs_get_addrs
	ldr	w1, [sp, #12]
	ldr	w2, [x19, #4]
	ldr	w3, [x24]
	mov	x0, x22
	bl	_dma_unmap_single
	ldr	w0, [sp, #8]
	bl	_phys_to_virt
	cbz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	mov	x0, x19
	bl	_mvpp2_frag_free
	add	w23, w23, #1
	cmp	w20, w23
	b.ne	LBB0_4
; %bb.6:
	mov	x23, x20
	b	LBB0_8
LBB0_7:
	mov	w23, #0
LBB0_8:
	ldr	w8, [x19]
	sub	w8, w8, w23
	str	w8, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pool does not have so many bufs pool(%d) bufs(%d)\n"

	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_mvpp2_bm_bufs_free
.subsections_via_symbols
