	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl_hw_apply
_rtl_hw_apply:                          ## @rtl_hw_apply
	.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	%rdi, %r12
	leaq	-48(%rbp), %rdx
	movl	$5, %esi
	callq	_rtl_phy_save
	movq	_RTL8306_NUM_PORTS@GOTPCREL(%rip), %r13
	cmpl	$2, (%r13)
	jl	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_rtl_port_set_enable
	incl	%ebx
	movl	(%r13), %eax
	decl	%eax
	cmpl	%eax, %ebx
	jl	LBB0_2
LBB0_3:
	movq	_RTL_REG_EN_TRUNK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_RTL_REG_TRUNK_PORTSEL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	movl	%eax, %r15d
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rtl_set
	movl	(%r14), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rtl_set
	movq	_RTL_REG_RESET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rtl_set
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.4:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.5:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.8:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.10:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_rtl_get
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	$1, %edi
	callq	_msleep
LBB0_14:
	cmpl	$2, (%r13)
	jl	LBB0_17
## %bb.15:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_rtl_port_set_enable
	incl	%ebx
	movl	(%r13), %eax
	decl	%eax
	cmpl	%eax, %ebx
	jl	LBB0_16
LBB0_17:
	movq	_RTL_REG_EN_TRUNK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_rtl_set
	movq	_RTL_REG_TRUNK_PORTSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_rtl_set
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	$5, %esi
	callq	_rtl_phy_restore
	movq	_RTL_REG_CPU_LINKUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rtl_set
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8306_NUM_PORTS,4,2          ## @RTL8306_NUM_PORTS
	.comm	_RTL_REG_EN_TRUNK,4,2           ## @RTL_REG_EN_TRUNK
	.comm	_RTL_REG_TRUNK_PORTSEL,4,2      ## @RTL_REG_TRUNK_PORTSEL
	.comm	_RTL_REG_RESET,4,2              ## @RTL_REG_RESET
	.comm	_RTL_REG_CPU_LINKUP,4,2         ## @RTL_REG_CPU_LINKUP
	.no_dead_strip	_rtl_hw_apply
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl_hw_apply
_rtl_hw_apply:                          ; @rtl_hw_apply
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	add	x2, sp, #8
	mov	w1, #5
	bl	_rtl_phy_save
Lloh0:
	adrp	x23, _RTL8306_NUM_PORTS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RTL8306_NUM_PORTS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.1:
	mov	w20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_rtl_port_set_enable
	add	w20, w20, #1
	ldr	w8, [x23]
	sub	w8, w8, #1
	cmp	w20, w8
	b.lt	LBB0_2
LBB0_3:
Lloh2:
	adrp	x24, _RTL_REG_EN_TRUNK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _RTL_REG_EN_TRUNK@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_rtl_get
	mov	x20, x0
Lloh4:
	adrp	x25, _RTL_REG_TRUNK_PORTSEL@GOTPAGE
Lloh5:
	ldr	x25, [x25, _RTL_REG_TRUNK_PORTSEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_rtl_get
	mov	x21, x0
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #1
	bl	_rtl_set
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #1
	bl	_rtl_set
Lloh6:
	adrp	x22, _RTL_REG_RESET@GOTPAGE
Lloh7:
	ldr	x22, [x22, _RTL_REG_RESET@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #1
	bl	_rtl_set
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.4:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.5:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.6:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.7:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.8:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.9:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.10:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.11:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.12:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rtl_get
	cbz	w0, LBB0_14
; %bb.13:
	mov	w0, #1
	bl	_msleep
LBB0_14:
	ldr	w8, [x23]
	cmp	w8, #2
	b.lt	LBB0_17
; %bb.15:
	mov	w22, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1
	bl	_rtl_port_set_enable
	add	w22, w22, #1
	ldr	w8, [x23]
	sub	w8, w8, #1
	cmp	w22, w8
	b.lt	LBB0_16
LBB0_17:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x20
	bl	_rtl_set
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x21
	bl	_rtl_set
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #5
	bl	_rtl_phy_restore
Lloh8:
	adrp	x8, _RTL_REG_CPU_LINKUP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RTL_REG_CPU_LINKUP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_rtl_set
	mov	w0, #0
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8306_NUM_PORTS,4,2          ; @RTL8306_NUM_PORTS
	.comm	_RTL_REG_EN_TRUNK,4,2           ; @RTL_REG_EN_TRUNK
	.comm	_RTL_REG_TRUNK_PORTSEL,4,2      ; @RTL_REG_TRUNK_PORTSEL
	.comm	_RTL_REG_RESET,4,2              ; @RTL_REG_RESET
	.comm	_RTL_REG_CPU_LINKUP,4,2         ; @RTL_REG_CPU_LINKUP
	.no_dead_strip	_rtl_hw_apply
.subsections_via_symbols
