	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8366rb_adjust_link
_rtl8366rb_adjust_link:                 ## @rtl8366rb_adjust_link
	.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), %r13
	cmpl	%esi, (%r13)
	jne	LBB0_3
## %bb.1:
	movl	%esi, %ebx
	movl	8(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_info
	movl	4(%r13), %r14d
	movq	_RTL8366RB_MAC_FORCE_CTRL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_BIT
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_BIT
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movl	4(%r13), %edi
	movq	_RTL8366RB_PAACR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RTL8366RB_PAACR_CPU_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	shll	$8, %ecx
	movl	$65280, %edx                    ## imm = 0xFF00
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	4(%r13), %r14d
	movq	_RTL8366RB_PECR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	callq	_BIT
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"adjust link on CPU port (%d)\n"

	.comm	_RTL8366RB_MAC_FORCE_CTRL_REG,4,2 ## @RTL8366RB_MAC_FORCE_CTRL_REG
	.comm	_RTL8366RB_PAACR2,4,2           ## @RTL8366RB_PAACR2
	.comm	_RTL8366RB_PAACR_CPU_PORT,4,2   ## @RTL8366RB_PAACR_CPU_PORT
	.comm	_RTL8366RB_PECR,4,2             ## @RTL8366RB_PECR
	.no_dead_strip	_rtl8366rb_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8366rb_adjust_link
_rtl8366rb_adjust_link:                 ; @rtl8366rb_adjust_link
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x23, [x0]
	ldr	w8, [x23]
	cmp	w8, w1
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x1
	ldr	w0, [x23, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_info
	ldr	w20, [x23, #4]
Lloh2:
	adrp	x8, _RTL8366RB_MAC_FORCE_CTRL_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RTL8366RB_MAC_FORCE_CTRL_REG@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_BIT
	mov	x22, x0
	mov	x0, x19
	bl	_BIT
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_regmap_update_bits
	cbnz	w0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _RTL8366RB_PAACR2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RTL8366RB_PAACR2@GOTPAGEOFF]
	ldr	w0, [x23, #4]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _RTL8366RB_PAACR_CPU_PORT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RTL8366RB_PAACR_CPU_PORT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsl	w3, w8, #8
	mov	w2, #65280
	bl	_regmap_update_bits
	cbz	w0, LBB0_4
LBB0_3:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w20, [x23, #4]
Lloh11:
	adrp	x8, _RTL8366RB_PECR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RTL8366RB_PECR@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_regmap_update_bits
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"adjust link on CPU port (%d)\n"

	.comm	_RTL8366RB_MAC_FORCE_CTRL_REG,4,2 ; @RTL8366RB_MAC_FORCE_CTRL_REG
	.comm	_RTL8366RB_PAACR2,4,2           ; @RTL8366RB_PAACR2
	.comm	_RTL8366RB_PAACR_CPU_PORT,4,2   ; @RTL8366RB_PAACR_CPU_PORT
	.comm	_RTL8366RB_PECR,4,2             ; @RTL8366RB_PECR
	.no_dead_strip	_rtl8366rb_adjust_link
.subsections_via_symbols
