	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mvneta_bm_pool_use             ## -- Begin function mvneta_bm_pool_use
	.p2align	4, 0x90
_mvneta_bm_pool_use:                    ## @mvneta_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
	pushq	%rax
	.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, %r15
	movq	8(%rdi), %r13
	shlq	$6, %rbx
	movq	(%r13,%rbx), %rax
	movq	_MVNETA_BM_LONG@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_4
## %bb.1:
	movl	$1, %esi
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %esi
	cmpl	%esi, 8(%r13,%rbx)
	jne	LBB0_2
LBB0_4:
	movq	_MVNETA_BM_SHORT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movl	%edx, %ecx
	cmpq	%rcx, %rax
	je	LBB0_7
## %bb.5:
	cmpq	%rsi, %rax
	jne	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_7:
	leaq	(%rbx,%r13), %r12
	addq	$12, %r12
	movl	12(%r13,%rbx), %edi
	testl	%edi, %edi
	je	LBB0_9
## %bb.8:
	cmpq	%rcx, %rsi
	je	LBB0_10
LBB0_9:
	movl	%r8d, (%r12)
	movl	%r8d, %edi
LBB0_10:
	leaq	(%rbx,%r13), %r14
	movq	_MVNETA_BM_FREE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_15
## %bb.11:
	movq	%r15, 24(%r13,%rbx)
	movq	%rcx, (%r14)
	callq	_MVNETA_RX_BUF_SIZE
	movl	%eax, 16(%r13,%rbx)
	movl	(%r12), %edi
	callq	_MVNETA_RX_BUF_SIZE
	movl	%eax, %edi
	callq	_SKB_DATA_ALIGN
	movq	%rax, %r12
	movl	$4, %edi
	callq	_SKB_DATA_ALIGN
	addq	%r12, %rax
	movq	%rax, 56(%r13,%rbx)
	movq	_mvneta_bm_construct@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r13,%rbx)
	movq	%r14, 40(%r13,%rbx)
	leaq	(%rbx,%r13), %rdi
	addq	$36, %rdi
	callq	_mutex_init
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mvneta_bm_pool_create
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	(%r15), %rdi
	movl	20(%r13,%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_2:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
LBB0_3:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
LBB0_15:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	leaq	(%rbx,%r13), %rdi
	addq	$32, %rdi
	movl	32(%r13,%rbx), %esi
	callq	_hwbm_pool_add
	movl	32(%r13,%rbx), %r8d
	cmpl	%r8d, %eax
	je	LBB0_15
## %bb.14:
	movl	20(%r13,%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %ecx
	callq	_WARN
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_MVNETA_BM_LONG,8,3             ## @MVNETA_BM_LONG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"long pool cannot be shared by the ports\n"

	.comm	_MVNETA_BM_SHORT,8,3            ## @MVNETA_BM_SHORT
L_.str.1:                               ## @.str.1
	.asciz	"mixing pools' types between the ports is forbidden\n"

	.comm	_MVNETA_BM_FREE,8,3             ## @MVNETA_BM_FREE
	.comm	_mvneta_bm_construct,4,2        ## @mvneta_bm_construct
L_.str.2:                               ## @.str.2
	.asciz	"fail to create pool %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"pool %d: %d of %d allocated\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mvneta_bm_pool_use             ; -- Begin function mvneta_bm_pool_use
	.p2align	2
_mvneta_bm_pool_use:                    ; @mvneta_bm_pool_use
	.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, x1
	mov	x21, x0
	ldr	x24, [x0, #8]
	add	x19, x24, x1, lsl #6
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _MVNETA_BM_LONG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MVNETA_BM_LONG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w9, [x19, #8]
	mov	w10, #1
	lsl	w10, w10, w3
	cmp	w9, w10
	b.ne	LBB0_9
LBB0_2:
Lloh3:
	adrp	x9, _MVNETA_BM_SHORT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MVNETA_BM_SHORT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x9]
	mov	w9, w2
	cmp	x8, x9
	ccmp	x8, x10, #0, ne
	b.eq	LBB0_8
; %bb.3:
	add	x23, x24, x20, lsl #6
	ldr	w0, [x23, #12]!
	cmp	w0, #0
	ccmp	x10, x9, #0, ne
	b.eq	LBB0_5
; %bb.4:
	str	w4, [x23]
	mov	x0, x4
LBB0_5:
Lloh6:
	adrp	x10, _MVNETA_BM_FREE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MVNETA_BM_FREE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_12
; %bb.6:
	add	x22, x24, x20, lsl #6
	str	x21, [x22, #24]
	str	x9, [x19]
	bl	_MVNETA_RX_BUF_SIZE
	str	w0, [x22, #16]
	ldr	w0, [x23]
	bl	_MVNETA_RX_BUF_SIZE
	bl	_SKB_DATA_ALIGN
	mov	x23, x0
	mov	w0, #4
	bl	_SKB_DATA_ALIGN
	add	x8, x0, x23
	str	x8, [x22, #56]
Lloh9:
	adrp	x8, _mvneta_bm_construct@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mvneta_bm_construct@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x22, #48]
	str	x19, [x22, #40]
	add	x0, x22, #36
	bl	_mutex_init
	mov	x0, x21
	mov	x1, x19
	bl	_mvneta_bm_pool_create
	cbz	w0, LBB0_13
; %bb.7:
	ldr	x0, [x21]
	ldr	w8, [x22, #20]
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_8:
	ldr	x0, [x21]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	x0, [x21]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
LBB0_10:
	bl	_dev_err
LBB0_11:
	mov	x19, #0
LBB0_12:
	mov	x0, 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
LBB0_13:
	ldr	w1, [x22, #32]!
	mov	x0, x22
	bl	_hwbm_pool_add
	ldr	w4, [x22]
	cmp	w0, w4
	b.eq	LBB0_12
; %bb.14:
	mov	x3, x0
	add	x8, x24, x20, lsl #6
	ldr	w2, [x8, #20]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_WARN
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MVNETA_BM_LONG,8,3             ; @MVNETA_BM_LONG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"long pool cannot be shared by the ports\n"

	.comm	_MVNETA_BM_SHORT,8,3            ; @MVNETA_BM_SHORT
l_.str.1:                               ; @.str.1
	.asciz	"mixing pools' types between the ports is forbidden\n"

	.comm	_MVNETA_BM_FREE,8,3             ; @MVNETA_BM_FREE
	.comm	_mvneta_bm_construct,4,2        ; @mvneta_bm_construct
l_.str.2:                               ; @.str.2
	.asciz	"fail to create pool %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"pool %d: %d of %d allocated\n"

.subsections_via_symbols
