	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan9303_setup
_lan9303_setup:                         ## @lan9303_setup
	.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	(%rdi), %r12
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_dsa_is_cpu_port
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_lan9303_setup_tagging
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_4:
	movq	%r12, %rdi
	callq	_lan9303_separate_ports
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_6:
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_lan9303_enable_processing_port
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_8:
	movq	_LAN9303_SWE_GLB_INGRESS_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_LAN9303_SWE_GLB_INGR_IGMP_TRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	xorl	%edi, %edi
	callq	_LAN9303_SWE_GLB_INGR_IGMP_PORT
	orl	%eax, %r13d
	movl	$1, %edi
	callq	_LAN9303_SWE_GLB_INGR_IGMP_PORT
	movl	%eax, %ebx
	movl	$2, %edi
	callq	_LAN9303_SWE_GLB_INGR_IGMP_PORT
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_lan9303_write_switch_reg_mask
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_1:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"port 0 is not the CPU port\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"failed to setup port tagging %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to separate ports %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to re-enable switching %d\n"

	.comm	_LAN9303_SWE_GLB_INGRESS_CFG,4,2 ## @LAN9303_SWE_GLB_INGRESS_CFG
	.comm	_LAN9303_SWE_GLB_INGR_IGMP_TRAP,4,2 ## @LAN9303_SWE_GLB_INGR_IGMP_TRAP
L_.str.4:                               ## @.str.4
	.asciz	"failed to setup IGMP trap %d\n"

	.no_dead_strip	_lan9303_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan9303_setup
_lan9303_setup:                         ; @lan9303_setup
	.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
	ldr	x19, [x0]
	mov	w1, #0
	bl	_dsa_is_cpu_port
	cbz	w0, LBB0_9
; %bb.1:
	mov	x0, x19
	bl	_lan9303_setup_tagging
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_3
; %bb.2:
	ldr	w8, [x19]
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_dev_err
LBB0_3:
	mov	x0, x19
	bl	_lan9303_separate_ports
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_5
; %bb.4:
	ldr	w8, [x19]
	str	x0, [sp]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
	bl	_dev_err
LBB0_5:
	mov	x0, x19
	mov	w1, #0
	bl	_lan9303_enable_processing_port
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w8, [x19]
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x8
	bl	_dev_err
LBB0_7:
Lloh6:
	adrp	x8, _LAN9303_SWE_GLB_INGRESS_CFG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LAN9303_SWE_GLB_INGRESS_CFG@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
Lloh9:
	adrp	x8, _LAN9303_SWE_GLB_INGR_IGMP_TRAP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LAN9303_SWE_GLB_INGR_IGMP_TRAP@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	mov	w0, #0
	bl	_LAN9303_SWE_GLB_INGR_IGMP_PORT
	orr	w21, w0, w21
	mov	w0, #1
	bl	_LAN9303_SWE_GLB_INGR_IGMP_PORT
	mov	x22, x0
	mov	w0, #2
	bl	_LAN9303_SWE_GLB_INGR_IGMP_PORT
	orr	w3, w0, w22
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_lan9303_write_switch_reg_mask
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_10
; %bb.8:
	ldr	w8, [x19]
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x8
	bl	_dev_err
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"port 0 is not the CPU port\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"failed to setup port tagging %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to separate ports %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to re-enable switching %d\n"

	.comm	_LAN9303_SWE_GLB_INGRESS_CFG,4,2 ; @LAN9303_SWE_GLB_INGRESS_CFG
	.comm	_LAN9303_SWE_GLB_INGR_IGMP_TRAP,4,2 ; @LAN9303_SWE_GLB_INGR_IGMP_TRAP
l_.str.4:                               ; @.str.4
	.asciz	"failed to setup IGMP trap %d\n"

	.no_dead_strip	_lan9303_setup
.subsections_via_symbols
