	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan9303_adjust_link
_lan9303_adjust_link:                   ## @lan9303_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	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	%rdx, %rdi
	callq	_phy_is_pseudo_fixed_link
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_lan9303_phy_read
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	(%r12), %rdx
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_3
## %bb.2:
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_5
## %bb.4:
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	jmp	LBB0_6
LBB0_5:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movq	8(%r12), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	notl	%esi
	andl	%ebx, %esi
	orl	%edx, %ebx
	cmpq	(%rcx), %rax
	cmovnel	%esi, %ebx
	movl	%ebx, -44(%rbp)
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %ecx
	callq	_lan9303_phy_write
	cmpl	%r14d, (%r13)
	jne	LBB0_8
## %bb.7:
	movl	4(%r13), %edi
	movq	_LAN9303_VIRT_SPECIAL_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	callq	_lan9303_read
	movq	_LAN9303_VIRT_SPECIAL_TURBO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	4(%r13), %edi
	movl	(%rbx), %esi
	callq	_regmap_write
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_BMCR_SPEED100,4,2              ## @BMCR_SPEED100
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported speed: %d\n"

	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
	.comm	_LAN9303_VIRT_SPECIAL_CTRL,4,2  ## @LAN9303_VIRT_SPECIAL_CTRL
	.comm	_LAN9303_VIRT_SPECIAL_TURBO,4,2 ## @LAN9303_VIRT_SPECIAL_TURBO
	.no_dead_strip	_lan9303_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan9303_adjust_link
_lan9303_adjust_link:                   ; @lan9303_adjust_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	mov	x0, x2
	bl	_phy_is_pseudo_fixed_link
	cbz	w0, LBB0_8
; %bb.1:
Lloh0:
	adrp	x23, _MII_BMCR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MII_BMCR@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_lan9303_phy_read
Lloh2:
	adrp	x8, _BMCR_ANENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w24, w0, w8
	ldr	x2, [x21]
Lloh5:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _BMCR_SPEED100@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BMCR_SPEED100@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w24, w8, w24
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_5
; %bb.4:
Lloh14:
	adrp	x8, _BMCR_SPEED100@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BMCR_SPEED100@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bic	w24, w24, w8
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_6:
	ldr	x8, [x21, #8]
Lloh19:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, _BMCR_FULLDPLX@GOTPAGE
Lloh23:
	ldr	x10, [x10, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	bic	w11, w24, w10
	orr	w10, w24, w10
	cmp	x8, x9
	csel	w3, w10, w11, eq
	str	w3, [sp, #12]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_lan9303_phy_write
	ldr	w8, [x22]
	cmp	w8, w19
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x22, #4]
Lloh25:
	adrp	x19, _LAN9303_VIRT_SPECIAL_CTRL@GOTPAGE
Lloh26:
	ldr	x19, [x19, _LAN9303_VIRT_SPECIAL_CTRL@GOTPAGEOFF]
	ldr	w1, [x19]
	add	x2, sp, #12
	bl	_lan9303_read
Lloh27:
	adrp	x8, _LAN9303_VIRT_SPECIAL_TURBO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LAN9303_VIRT_SPECIAL_TURBO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w0, [x22, #4]
	ldr	w1, [x19]
	bl	_regmap_write
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_BMCR_SPEED100,4,2              ; @BMCR_SPEED100
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported speed: %d\n"

	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
	.comm	_LAN9303_VIRT_SPECIAL_CTRL,4,2  ; @LAN9303_VIRT_SPECIAL_CTRL
	.comm	_LAN9303_VIRT_SPECIAL_TURBO,4,2 ; @LAN9303_VIRT_SPECIAL_TURBO
	.no_dead_strip	_lan9303_adjust_link
.subsections_via_symbols
