	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv88e6xxx_atu_new
_mv88e6xxx_atu_new:                     ## @mv88e6xxx_atu_new
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_fid_bitmap@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_MV88E6XXX_N_FID@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_DECLARE_BITMAP
	movl	(%r12), %edi
	movl	(%r13), %esi
	callq	_bitmap_zero
	movq	%r15, %rdi
	callq	_mv88e6xxx_num_ports
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_mv88e6xxx_port_get_fid
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rdi
	movl	(%r12), %esi
	callq	_set_bit
	incl	%ebx
	movq	%r15, %rdi
	callq	_mv88e6xxx_num_ports
	cmpl	%eax, %ebx
	jl	LBB0_2
LBB0_4:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movl	$0, -56(%rbp)
	leaq	-64(%rbp), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mv88e6xxx_vtu_getnext
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, -56(%rbp)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rdi
	movl	(%r12), %esi
	callq	_set_bit
	movq	-64(%rbp), %rax
	movq	(%r15), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_5
LBB0_8:
	movl	(%r12), %edi
	movl	(%r13), %esi
	movl	$1, %edx
	callq	_find_next_zero_bit
	movq	%rax, %rbx
	movq	%rax, (%r14)
	movq	%r15, %rdi
	callq	_mv88e6xxx_num_databases
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_10:
	movq	(%r14), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_mv88e6xxx_g1_atu_flush
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fid_bitmap,4,2                 ## @fid_bitmap
	.comm	_MV88E6XXX_N_FID,4,2            ## @MV88E6XXX_N_FID
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_mv88e6xxx_atu_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv88e6xxx_atu_new
_mv88e6xxx_atu_new:                     ; @mv88e6xxx_atu_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
Lloh0:
	adrp	x22, _fid_bitmap@GOTPAGE
Lloh1:
	ldr	x22, [x22, _fid_bitmap@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x23, _MV88E6XXX_N_FID@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MV88E6XXX_N_FID@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_DECLARE_BITMAP
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_bitmap_zero
	mov	x0, x19
	bl	_mv88e6xxx_num_ports
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_mv88e6xxx_port_get_fid
	cbnz	w0, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20]
	ldr	w1, [x22]
	bl	_set_bit
	add	w21, w21, #1
	mov	x0, x19
	bl	_mv88e6xxx_num_ports
	cmp	w21, w0
	b.lt	LBB0_2
LBB0_4:
	ldr	x8, [x19]
	ldr	x8, [x8]
	str	x8, [sp, #8]
	str	wzr, [sp, #16]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_mv88e6xxx_vtu_getnext
	cbnz	w0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #16]
	cbz	w8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #24]
	ldr	w1, [x22]
	bl	_set_bit
	ldr	x8, [sp, #8]
	ldr	x9, [x19]
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_5
LBB0_8:
	ldr	w0, [x22]
	ldr	w1, [x23]
	mov	w2, #1
	bl	_find_next_zero_bit
	mov	x21, x0
	str	x0, [x20]
	mov	x0, x19
	bl	_mv88e6xxx_num_databases
	cmp	x21, x0
	cset	w0, ge
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.9:
Lloh4:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_10:
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_mv88e6xxx_g1_atu_flush
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_fid_bitmap,4,2                 ; @fid_bitmap
	.comm	_MV88E6XXX_N_FID,4,2            ; @MV88E6XXX_N_FID
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_mv88e6xxx_atu_new
.subsections_via_symbols
