	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksz9477_get_vlan_table
_ksz9477_get_vlan_table:                ## @ksz9477_get_vlan_table
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_mutex_lock
	movq	_REG_SW_VLAN_ENTRY_INDEX__2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VLAN_INDEX_M@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ksz_write16
	movq	_REG_SW_VLAN_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_VLAN_READ@GOTPCREL(%rip), %rax
	movq	_VLAN_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r12, %rdi
	callq	_ksz_write8
	movq	%r12, %rdi
	callq	_ksz9477_wait_vlan_ctrl_ready
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	4(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	jmp	LBB0_3
LBB0_2:
	movq	_REG_SW_VLAN_ENTRY__4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_ksz_read32
	movq	_REG_SW_VLAN_ENTRY_UNTAG__4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	4(%r14), %rdx
	movq	%r12, %rdi
	callq	_ksz_read32
	movq	_REG_SW_VLAN_ENTRY_PORTS__4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %r14
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_ksz_read32
	movl	(%rbx), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_ksz_write8
LBB0_3:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_SW_VLAN_ENTRY_INDEX__2,4,2 ## @REG_SW_VLAN_ENTRY_INDEX__2
	.comm	_VLAN_INDEX_M,4,2               ## @VLAN_INDEX_M
	.comm	_REG_SW_VLAN_CTRL,4,2           ## @REG_SW_VLAN_CTRL
	.comm	_VLAN_READ,4,2                  ## @VLAN_READ
	.comm	_VLAN_START,4,2                 ## @VLAN_START
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read vlan table\n"

	.comm	_REG_SW_VLAN_ENTRY__4,4,2       ## @REG_SW_VLAN_ENTRY__4
	.comm	_REG_SW_VLAN_ENTRY_UNTAG__4,4,2 ## @REG_SW_VLAN_ENTRY_UNTAG__4
	.comm	_REG_SW_VLAN_ENTRY_PORTS__4,4,2 ## @REG_SW_VLAN_ENTRY_PORTS__4
	.no_dead_strip	_ksz9477_get_vlan_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksz9477_get_vlan_table
_ksz9477_get_vlan_table:                ; @ksz9477_get_vlan_table
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _REG_SW_VLAN_ENTRY_INDEX__2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_SW_VLAN_ENTRY_INDEX__2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _VLAN_INDEX_M@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VLAN_INDEX_M@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w2, w8, w21
	mov	x0, x19
	bl	_ksz_write16
Lloh6:
	adrp	x22, _REG_SW_VLAN_CTRL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _REG_SW_VLAN_CTRL@GOTPAGEOFF]
Lloh8:
	adrp	x8, _VLAN_READ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VLAN_READ@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _VLAN_START@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VLAN_START@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_ksz_write8
	mov	x0, x19
	bl	_ksz9477_wait_vlan_ctrl_ready
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	b	LBB0_3
LBB0_2:
Lloh16:
	adrp	x8, _REG_SW_VLAN_ENTRY__4@GOTPAGE
Lloh17:
	ldr	x8, [x8, _REG_SW_VLAN_ENTRY__4@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_ksz_read32
Lloh19:
	adrp	x8, _REG_SW_VLAN_ENTRY_UNTAG__4@GOTPAGE
Lloh20:
	ldr	x8, [x8, _REG_SW_VLAN_ENTRY_UNTAG__4@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x2, x20, #4
	mov	x0, x19
	bl	_ksz_read32
Lloh22:
	adrp	x8, _REG_SW_VLAN_ENTRY_PORTS__4@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REG_SW_VLAN_ENTRY_PORTS__4@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x2, x20, #8
	mov	x0, x19
	bl	_ksz_read32
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_ksz_write8
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_SW_VLAN_ENTRY_INDEX__2,4,2 ; @REG_SW_VLAN_ENTRY_INDEX__2
	.comm	_VLAN_INDEX_M,4,2               ; @VLAN_INDEX_M
	.comm	_REG_SW_VLAN_CTRL,4,2           ; @REG_SW_VLAN_CTRL
	.comm	_VLAN_READ,4,2                  ; @VLAN_READ
	.comm	_VLAN_START,4,2                 ; @VLAN_START
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read vlan table\n"

	.comm	_REG_SW_VLAN_ENTRY__4,4,2       ; @REG_SW_VLAN_ENTRY__4
	.comm	_REG_SW_VLAN_ENTRY_UNTAG__4,4,2 ; @REG_SW_VLAN_ENTRY_UNTAG__4
	.comm	_REG_SW_VLAN_ENTRY_PORTS__4,4,2 ; @REG_SW_VLAN_ENTRY_PORTS__4
	.no_dead_strip	_ksz9477_get_vlan_table
.subsections_via_symbols
