	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvneta_bm_update_mtu
_mvneta_bm_update_mtu:                  ## @mvneta_bm_update_mtu
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	24(%rdi), %rbx
	movq	8(%rdi), %rdi
	movb	(%r14), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	%rbx, %rsi
	callq	_mvneta_bm_bufs_free
	cmpq	$0, 32(%rbx)
	je	LBB0_2
## %bb.1:
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_WARN
	jmp	LBB0_4
LBB0_2:
	leaq	16(%rbx), %r15
	movl	%r12d, %edi
	callq	_MVNETA_RX_PKT_SIZE
	movl	%eax, 8(%rbx)
	movl	%eax, %edi
	callq	_MVNETA_RX_BUF_SIZE
	movl	%eax, (%rbx)
	movl	$4, %edi
	callq	_SKB_DATA_ALIGN
	movq	%rax, %r12
	movl	8(%rbx), %edi
	callq	_MVNETA_RX_BUF_SIZE
	movl	%eax, %edi
	callq	_SKB_DATA_ALIGN
	addq	%r12, %rax
	movq	%rax, 24(%rbx)
	movl	16(%rbx), %esi
	movq	%r15, %rdi
	callq	_hwbm_pool_add
	movl	16(%rbx), %r8d
	cmpl	%r8d, %eax
	jne	LBB0_3
## %bb.5:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mvneta_bm_pool_bufsize_set     ## TAILCALL
LBB0_3:
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_WARN
LBB0_4:
	movq	8(%r14), %rdi
	movq	24(%r14), %rsi
	movb	(%r14), %cl
	movl	$1, %ebx
	movl	$1, %edx
	shll	%cl, %edx
	callq	_mvneta_bm_pool_destroy
	movq	8(%r14), %rdi
	movq	16(%r14), %rsi
	movb	(%r14), %cl
	shll	%cl, %ebx
	movl	%ebx, %edx
	callq	_mvneta_bm_pool_destroy
	movq	$0, 8(%r14)
	movq	_MVNETA_ACC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MVNETA_ACC_MODE_EXT1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mvreg_write
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_info                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot free all buffers in pool %d\n"

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

	.comm	_MVNETA_ACC_MODE,4,2            ## @MVNETA_ACC_MODE
	.comm	_MVNETA_ACC_MODE_EXT1,4,2       ## @MVNETA_ACC_MODE_EXT1
L_.str.2:                               ## @.str.2
	.asciz	"fail to update MTU, fall back to software BM\n"

	.no_dead_strip	_mvneta_bm_update_mtu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvneta_bm_update_mtu
_mvneta_bm_update_mtu:                  ; @mvneta_bm_update_mtu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #24]
	ldr	x0, [x0, #8]
	ldr	w8, [x19]
	mov	w9, #1
	lsl	w2, w9, w8
	mov	x1, x20
	bl	_mvneta_bm_bufs_free
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w2, [x20, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_2:
	mov	x0, x21
	bl	_MVNETA_RX_PKT_SIZE
	str	w0, [x20, #8]
	bl	_MVNETA_RX_BUF_SIZE
	str	w0, [x20]
	mov	w0, #4
	bl	_SKB_DATA_ALIGN
	mov	x21, x0
	ldr	w0, [x20, #8]
	bl	_MVNETA_RX_BUF_SIZE
	bl	_SKB_DATA_ALIGN
	add	x8, x0, x21
	mov	x21, x20
	ldr	w1, [x21, #16]!
	str	x8, [x21, #8]
	mov	x0, x21
	bl	_hwbm_pool_add
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	ldp	w1, w2, [x20]
	mov	x0, 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
	add	sp, sp, #64
	b	_mvneta_bm_pool_bufsize_set
LBB0_4:
	ldr	w2, [x20, #4]
	stp	x0, x8, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	w0, #1
	bl	_WARN
	ldr	x0, [x19, #8]
	ldr	x1, [x19, #24]
	ldr	w8, [x19]
	mov	w20, #1
	lsl	w2, w20, w8
	bl	_mvneta_bm_pool_destroy
	ldp	x0, x1, [x19, #8]
	ldr	w8, [x19]
	lsl	w2, w20, w8
	bl	_mvneta_bm_pool_destroy
	str	xzr, [x19, #8]
Lloh4:
	adrp	x8, _MVNETA_ACC_MODE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MVNETA_ACC_MODE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _MVNETA_ACC_MODE_EXT1@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MVNETA_ACC_MODE_EXT1@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mvreg_write
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	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
	add	sp, sp, #64
	b	_netdev_info
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot free all buffers in pool %d\n"

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

	.comm	_MVNETA_ACC_MODE,4,2            ; @MVNETA_ACC_MODE
	.comm	_MVNETA_ACC_MODE_EXT1,4,2       ; @MVNETA_ACC_MODE_EXT1
l_.str.2:                               ; @.str.2
	.asciz	"fail to update MTU, fall back to software BM\n"

	.no_dead_strip	_mvneta_bm_update_mtu
.subsections_via_symbols
