	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8366s_setup
_rtl8366s_setup:                        ## @rtl8366s_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	movq	8(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_6
## %bb.1:
	cmpl	$0, (%r15)
	je	LBB0_6
## %bb.2:
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.3:
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	cmpl	$0, (%r15)
	je	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,8), %edx
	movl	4(%rax,%rbx,8), %esi
	movq	%r14, %rdi
	callq	_REG_WR
	incq	%rbx
	movl	(%r15), %eax
	cmpq	%rax, %rbx
	jb	LBB0_5
LBB0_6:
	movq	_RTL8366S_SGCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8366S_SGCR_MAX_LENGTH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_RTL8366S_SGCR_MAX_LENGTH_1536@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_REG_RMW
	movq	_RTL8366S_SSCR0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_REG_WR
	movq	_RTL8366S_SSCR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_REG_WR
	movq	_RTL8366S_VLAN_MEMBERINGRESS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8366S_PORT_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_REG_WR
	movq	_RTL8366S_SSCR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8366S_SSCR2_DROP_UNKNOWN_DA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_REG_RMW
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"applying initvals\n"

	.comm	_RTL8366S_SGCR,4,2              ## @RTL8366S_SGCR
	.comm	_RTL8366S_SGCR_MAX_LENGTH_MASK,4,2 ## @RTL8366S_SGCR_MAX_LENGTH_MASK
	.comm	_RTL8366S_SGCR_MAX_LENGTH_1536,4,2 ## @RTL8366S_SGCR_MAX_LENGTH_1536
	.comm	_RTL8366S_SSCR0,4,2             ## @RTL8366S_SSCR0
	.comm	_RTL8366S_SSCR1,4,2             ## @RTL8366S_SSCR1
	.comm	_RTL8366S_VLAN_MEMBERINGRESS_REG,4,2 ## @RTL8366S_VLAN_MEMBERINGRESS_REG
	.comm	_RTL8366S_PORT_ALL,4,2          ## @RTL8366S_PORT_ALL
	.comm	_RTL8366S_SSCR2,4,2             ## @RTL8366S_SSCR2
	.comm	_RTL8366S_SSCR2_DROP_UNKNOWN_DA,4,2 ## @RTL8366S_SSCR2_DROP_UNKNOWN_DA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RTL8366S_PHY_NO_MAX,4,2        ## @RTL8366S_PHY_NO_MAX
	.no_dead_strip	_rtl8366s_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8366s_setup
_rtl8366s_setup:                        ; @rtl8366s_setup
	.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	x19, x0
	ldr	x0, [x0]
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_6
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.4:
	mov	x21, #0
	mov	x22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x21
	ldp	w2, w1, [x8]
	mov	x0, x19
	bl	_REG_WR
	add	x22, x22, #1
	ldr	w8, [x20]
	add	x21, x21, #8
	cmp	x22, x8
	b.lo	LBB0_5
LBB0_6:
Lloh2:
	adrp	x8, _RTL8366S_SGCR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RTL8366S_SGCR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _RTL8366S_SGCR_MAX_LENGTH_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RTL8366S_SGCR_MAX_LENGTH_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _RTL8366S_SGCR_MAX_LENGTH_1536@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RTL8366S_SGCR_MAX_LENGTH_1536@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_REG_RMW
Lloh11:
	adrp	x8, _RTL8366S_SSCR0@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RTL8366S_SSCR0@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_REG_WR
Lloh14:
	adrp	x8, _RTL8366S_SSCR1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RTL8366S_SSCR1@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_REG_WR
Lloh17:
	adrp	x8, _RTL8366S_VLAN_MEMBERINGRESS_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RTL8366S_VLAN_MEMBERINGRESS_REG@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _RTL8366S_PORT_ALL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RTL8366S_PORT_ALL@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_WR
Lloh23:
	adrp	x8, _RTL8366S_SSCR2@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RTL8366S_SSCR2@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _RTL8366S_SSCR2_DROP_UNKNOWN_DA@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RTL8366S_SSCR2_DROP_UNKNOWN_DA@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_REG_RMW
	mov	w0, #0
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"applying initvals\n"

	.comm	_RTL8366S_SGCR,4,2              ; @RTL8366S_SGCR
	.comm	_RTL8366S_SGCR_MAX_LENGTH_MASK,4,2 ; @RTL8366S_SGCR_MAX_LENGTH_MASK
	.comm	_RTL8366S_SGCR_MAX_LENGTH_1536,4,2 ; @RTL8366S_SGCR_MAX_LENGTH_1536
	.comm	_RTL8366S_SSCR0,4,2             ; @RTL8366S_SSCR0
	.comm	_RTL8366S_SSCR1,4,2             ; @RTL8366S_SSCR1
	.comm	_RTL8366S_VLAN_MEMBERINGRESS_REG,4,2 ; @RTL8366S_VLAN_MEMBERINGRESS_REG
	.comm	_RTL8366S_PORT_ALL,4,2          ; @RTL8366S_PORT_ALL
	.comm	_RTL8366S_SSCR2,4,2             ; @RTL8366S_SSCR2
	.comm	_RTL8366S_SSCR2_DROP_UNKNOWN_DA,4,2 ; @RTL8366S_SSCR2_DROP_UNKNOWN_DA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RTL8366S_PHY_NO_MAX,4,2        ; @RTL8366S_PHY_NO_MAX
	.no_dead_strip	_rtl8366s_setup
.subsections_via_symbols
