	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp2_bm_switch_buffers
_mvpp2_bm_switch_buffers:               ## @mvpp2_bm_switch_buffers
	.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	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MVPP2_BM_POOLS_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_MVPP2_MAX_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	cmpl	$0, (%r15)
	jle	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movslq	(%r15), %rax
	cmpq	%rax, %r14
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r14,8), %r13
	movq	8(%r13), %rdi
	callq	_netif_running
	movl	%eax, (%r12,%r14,4)
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r13), %rdi
	callq	_mvpp2_stop
	jmp	LBB0_5
LBB0_1:
	xorl	%r13d, %r13d
LBB0_6:
	cmpl	$0, 4(%r15)
	je	LBB0_8
## %bb.7:
	movl	(%r13), %ebx
	addl	%ebx, %ebx
LBB0_8:
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.9:
	movl	%ebx, %r14d
	shlq	$2, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rdx
	addq	%rbx, %rdx
	movq	%r15, %rsi
	callq	_mvpp2_bm_pool_destroy
	addq	$4, %rbx
	cmpq	%rbx, %r14
	jne	LBB0_10
LBB0_11:
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rsi
	callq	_devm_kfree
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r15)
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_mvpp2_bm_init
	cmpl	$0, (%r15)
	jle	LBB0_16
## %bb.12:
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %r14
	movq	%r14, %rdi
	callq	_mvpp2_swf_bm_pool_init
	cmpl	$0, (%r12,%rbx,4)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r14), %rdi
	callq	_mvpp2_open
	jmp	LBB0_15
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MVPP2_BM_POOLS_NUM,4,2         ## @MVPP2_BM_POOLS_NUM
	.comm	_MVPP2_MAX_PORTS,4,2            ## @MVPP2_MAX_PORTS
	.no_dead_strip	_mvpp2_bm_switch_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp2_bm_switch_buffers
_mvpp2_bm_switch_buffers:               ; @mvpp2_bm_switch_buffers
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MVPP2_BM_POOLS_NUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MVPP2_BM_POOLS_NUM@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _MVPP2_MAX_PORTS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MVPP2_MAX_PORTS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x24, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x19]
	cmp	x24, x8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x22, [x8, x24, lsl #3]
	ldr	x0, [x22, #8]
	bl	_netif_running
	str	w0, [x21, x24, lsl #2]
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x22, #8]
	bl	_mvpp2_stop
	b	LBB0_2
LBB0_5:
	mov	x22, #0
LBB0_6:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	w8, [x22]
	lsl	w23, w8, #1
LBB0_8:
	cmp	w23, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x24, #0
	mov	w8, w23
	lsl	x23, x8, #2
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
	add	x2, x8, x24
	mov	x1, x19
	bl	_mvpp2_bm_pool_destroy
	add	x24, x24, #4
	cmp	x23, x24
	b.ne	LBB0_10
LBB0_11:
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
	bl	_devm_kfree
	str	w20, [x19, #4]
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_mvpp2_bm_init
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.12:
	mov	x22, #0
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.ge	LBB0_16
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x20, [x8, x22, lsl #3]
	mov	x0, x20
	bl	_mvpp2_swf_bm_pool_init
	ldr	w8, [x21, x22, lsl #2]
	cbz	w8, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x0, [x20, #8]
	bl	_mvpp2_open
	b	LBB0_13
LBB0_16:
	ldur	x8, [x29, #-56]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	w0, #0
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MVPP2_BM_POOLS_NUM,4,2         ; @MVPP2_BM_POOLS_NUM
	.comm	_MVPP2_MAX_PORTS,4,2            ; @MVPP2_MAX_PORTS
	.no_dead_strip	_mvpp2_bm_switch_buffers
.subsections_via_symbols
