	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp2_bm_pool_use
_mvpp2_bm_pool_use:                     ## @mvpp2_bm_pool_use
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	8(%rbx), %r15
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_mvpp2_get_nrxqs
	addl	%eax, %eax
	cmpl	%r13d, %eax
	jb	LBB0_5
## %bb.2:
	movq	8(%r14), %rbx
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
	testq	%rax, %rax
	jne	LBB0_6
LBB0_4:
	movq	_MVPP2_BM_POOLS_NUM@GOTPCREL(%rip), %rcx
	cmpl	%r13d, (%rcx)
	ja	LBB0_6
LBB0_5:
	movq	16(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_netdev_err
	xorl	%r12d, %r12d
	jmp	LBB0_19
LBB0_6:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r13d, %ecx
	leaq	(%rcx,%rcx,2), %rdx
	leaq	(%r15,%rdx,8), %r12
	movl	(%r12), %edi
	testl	%edi, %edi
	jne	LBB0_18
## %bb.7:
	movl	4(%r15,%rdx,8), %esi
	testl	%esi, %esi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.8:
	movl	%esi, %r8d
	movq	16(%r14), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	%r8d, %r13d
	movl	%r8d, %ecx
	callq	_mvpp2_bm_bufs_free
	jmp	LBB0_16
LBB0_9:
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_mvpp2_pools@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	%r13d, (%r14)
	jbe	LBB0_13
## %bb.11:
	movq	_MVPP2_BM_SHORT@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_12:
	movq	_mvpp2_pools@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_MVPP2_BM_LONG@GOTPCREL(%rip), %rcx
LBB0_14:
	movq	(%rcx), %rcx
LBB0_15:
	movl	(%rax,%rcx,4), %r13d
LBB0_16:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, (%r12)
	callq	_MVPP2_RX_BUF_SIZE
	movl	%eax, %edi
	callq	_SKB_DATA_ALIGN
	movq	_MVPP2_SKB_SHINFO_SIZE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, 16(%r15,%rbx,8)
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_mvpp2_bm_bufs_add
	cmpl	%r13d, %eax
	jne	LBB0_20
## %bb.17:
	movq	8(%r14), %rbx
	movl	(%r12), %edi
LBB0_18:
	callq	_MVPP2_RX_BUF_SIZE
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_mvpp2_bm_pool_bufsize_set
LBB0_19:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	8(%r15,%rbx,8), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %ecx
	movl	%r13d, %r8d
	callq	_WARN
	xorl	%r12d, %r12d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_MVPP2_BM_POOLS_NUM,4,2         ## @MVPP2_BM_POOLS_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid pool %d\n"

	.comm	_mvpp2_pools,8,3                ## @mvpp2_pools
	.comm	_MVPP2_BM_SHORT,8,3             ## @MVPP2_BM_SHORT
	.comm	_MVPP2_BM_LONG,8,3              ## @MVPP2_BM_LONG
	.comm	_MVPP2_SKB_SHINFO_SIZE,8,3      ## @MVPP2_SKB_SHINFO_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"pool %d: %d of %d allocated\n"

	.no_dead_strip	_mvpp2_bm_pool_use
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp2_bm_pool_use
_mvpp2_bm_pool_use:                     ; @mvpp2_bm_pool_use
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldp	x8, x25, [x22]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x22
	bl	_mvpp2_get_nrxqs
	cmp	w23, w0, lsl #1
	b.hi	LBB0_5
; %bb.2:
	ldr	x22, [x19, #8]
	ldr	x8, [x22]
LBB0_3:
	cbnz	x8, LBB0_6
; %bb.4:
Lloh0:
	adrp	x9, _MVPP2_BM_POOLS_NUM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MVPP2_BM_POOLS_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w23
	b.hi	LBB0_6
LBB0_5:
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_netdev_err
	mov	x20, #0
	b	LBB0_18
LBB0_6:
	mov	w9, #24
	umaddl	x20, w23, w9, x25
	ldr	w0, [x20]
	cbnz	w0, LBB0_17
; %bb.7:
	mov	w26, w23
	mov	w9, #24
	madd	x9, x26, x9, x25
	ldr	w24, [x9, #4]
	cbz	w24, LBB0_9
; %bb.8:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	mov	x1, x22
	mov	x2, x20
	mov	x3, x24
	bl	_mvpp2_bm_bufs_free
	b	LBB0_15
LBB0_9:
	cbz	x8, LBB0_12
; %bb.10:
	ldr	w9, [x19]
Lloh5:
	adrp	x8, _mvpp2_pools@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mvpp2_pools@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	w9, w23
	b.ls	LBB0_13
; %bb.11:
Lloh8:
	adrp	x9, _MVPP2_BM_SHORT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MVPP2_BM_SHORT@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh10:
	adrp	x8, _mvpp2_pools@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mvpp2_pools@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w24, [x8, x26, lsl #2]
	b	LBB0_15
LBB0_13:
Lloh13:
	adrp	x9, _MVPP2_BM_LONG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MVPP2_BM_LONG@GOTPAGEOFF]
LBB0_14:
	ldr	x9, [x9]
	ldr	w24, [x8, x9, lsl #2]
LBB0_15:
	str	w21, [x20]
	mov	x0, x21
	bl	_MVPP2_RX_BUF_SIZE
	bl	_SKB_DATA_ALIGN
Lloh15:
	adrp	x8, _MVPP2_SKB_SHINFO_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MVPP2_SKB_SHINFO_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	add	x8, x8, x0
	mov	w9, #24
	madd	x9, x26, x9, x25
	str	x8, [x9, #16]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x24
	bl	_mvpp2_bm_bufs_add
	cmp	w0, w24
	b.ne	LBB0_19
; %bb.16:
	ldr	x22, [x19, #8]
	ldr	w0, [x20]
LBB0_17:
	bl	_MVPP2_RX_BUF_SIZE
	mov	x2, x0
	mov	x0, x22
	mov	x1, x20
	bl	_mvpp2_bm_pool_bufsize_set
LBB0_18:
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
	mov	x3, x0
	mov	w8, #24
	madd	x8, x26, x8, x25
	ldr	w2, [x8, #8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x4, x24
	bl	_WARN
	mov	x20, #0
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MVPP2_BM_POOLS_NUM,4,2         ; @MVPP2_BM_POOLS_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid pool %d\n"

	.comm	_mvpp2_pools,8,3                ; @mvpp2_pools
	.comm	_MVPP2_BM_SHORT,8,3             ; @MVPP2_BM_SHORT
	.comm	_MVPP2_BM_LONG,8,3              ; @MVPP2_BM_LONG
	.comm	_MVPP2_SKB_SHINFO_SIZE,8,3      ; @MVPP2_SKB_SHINFO_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"pool %d: %d of %d allocated\n"

	.no_dead_strip	_mvpp2_bm_pool_use
.subsections_via_symbols
