	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp2_bm_pools_init
_mvpp2_bm_pools_init:                   ## @mvpp2_bm_pools_init
	.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	%rsi, %rbx
	movq	%rdi, %r14
	cmpq	$0, 8(%rsi)
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_mvpp2_get_nrxqs
	addl	%eax, %eax
	testl	%eax, %eax
	jle	LBB0_4
LBB0_5:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_MVPP2_BM_POOL_SIZE_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	$-4, %r12
	movq	$-1, %r15
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rax
	leaq	(%rax,%r12), %r14
	addq	$4, %r14
	movl	%ebx, 4(%rax,%r12)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_mvpp2_bm_pool_create
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r13d, %r13d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_mvpp2_bm_pool_bufsize_set
	addq	$4, %r12
	incl	%ebx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	%r15, %rax
	decq	%rax
	decq	%r15
	cmpq	$-1, %rax
	jne	LBB0_6
	jmp	LBB0_11
LBB0_1:
	movq	_MVPP2_BM_POOLS_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	LBB0_5
LBB0_4:
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_8:
	movl	%eax, %r13d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_dev_err
	cmpl	$-1, %r15d
	je	LBB0_11
## %bb.9:
	negq	%r15
	movq	%r14, %rbx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdx
	addq	%r12, %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mvpp2_bm_pool_destroy
	decq	%r15
	addq	$-4, %r12
	cmpq	$1, %r15
	jg	LBB0_10
LBB0_11:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVPP2_BM_POOLS_NUM,4,2         ## @MVPP2_BM_POOLS_NUM
	.comm	_MVPP2_BM_POOL_SIZE_MAX,4,2     ## @MVPP2_BM_POOL_SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create BM pool %d, size %d\n"

	.no_dead_strip	_mvpp2_bm_pools_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp2_bm_pools_init
_mvpp2_bm_pools_init:                   ; @mvpp2_bm_pools_init
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mvpp2_get_nrxqs
	lsl	w8, w0, #1
	cmp	w8, #1
	b.ge	LBB0_3
	b	LBB0_6
LBB0_2:
Lloh0:
	adrp	x8, _MVPP2_BM_POOLS_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MVPP2_BM_POOLS_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_6
LBB0_3:
	mov	x9, #0
Lloh3:
	adrp	x10, _MVPP2_BM_POOL_SIZE_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MVPP2_BM_POOL_SIZE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x10]
	sub	x26, x9, w8, uxtw
	mov	x24, #-4
	mov	w25, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x23, x8, x24
	sub	w8, w25, #1
	str	w8, [x23, #4]!
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	mov	x3, x21
	bl	_mvpp2_bm_pool_create
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	w2, #0
	bl	_mvpp2_bm_pool_bufsize_set
	add	x25, x25, #1
	add	x24, x24, #4
	add	x8, x26, x25
	cmp	x8, #1
	b.ne	LBB0_4
LBB0_6:
	mov	w22, #0
	b	LBB0_9
LBB0_7:
	mov	x22, x0
	subs	w2, w25, #1
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x21
	bl	_dev_err
	cmp	w25, #1
	b.eq	LBB0_9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x2, x8, x24
	mov	x0, x20
	mov	x1, x19
	bl	_mvpp2_bm_pool_destroy
	sub	x25, x25, #1
	sub	x24, x24, #4
	cmp	x25, #1
	b.gt	LBB0_8
LBB0_9:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MVPP2_BM_POOLS_NUM,4,2         ; @MVPP2_BM_POOLS_NUM
	.comm	_MVPP2_BM_POOL_SIZE_MAX,4,2     ; @MVPP2_BM_POOL_SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create BM pool %d, size %d\n"

	.no_dead_strip	_mvpp2_bm_pools_init
.subsections_via_symbols
