	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_genphy_read_lpa                ## -- Begin function genphy_read_lpa
	.p2align	4, 0x90
_genphy_read_lpa:                       ## @genphy_read_lpa
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.1:
	cmpl	$0, 24(%rbx)
	je	LBB0_2
## %bb.3:
	cmpq	$0, 16(%rbx)
	je	LBB0_9
## %bb.4:
	movq	_MII_STAT1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:
	movq	_LPA_1000MSFAIL@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_8
## %bb.6:
	movq	_MII_CTRL1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:
	movq	_CTL1000_ENABLE_MASTER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_phydev_err
	movq	_ENOLINK@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_11:
	movl	8(%rbx), %edi
	callq	_linkmode_zero
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_2:
	movl	8(%rbx), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_mii_stat1000_mod_linkmode_lpa_t
	movl	8(%rbx), %edi
	xorl	%esi, %esi
	callq	_mii_lpa_mod_linkmode_lpa_t
	jmp	LBB0_13
LBB0_8:
	movl	8(%rbx), %edi
	movl	%r14d, %esi
	callq	_mii_stat1000_mod_linkmode_lpa_t
LBB0_9:
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_13
## %bb.10:
	movl	8(%rbx), %edi
	movl	%r14d, %esi
	callq	_mii_lpa_mod_linkmode_lpa_t
	jmp	LBB0_12
LBB0_13:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_MII_STAT1000,4,2               ## @MII_STAT1000
	.comm	_LPA_1000MSFAIL,4,2             ## @LPA_1000MSFAIL
	.comm	_MII_CTRL1000,4,2               ## @MII_CTRL1000
	.comm	_CTL1000_ENABLE_MASTER,4,2      ## @CTL1000_ENABLE_MASTER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Master/Slave resolution failed, maybe conflicting manual settings?\n"

L_.str.1:                               ## @.str.1
	.asciz	"Master/Slave resolution failed\n"

	.comm	_ENOLINK,4,2                    ## @ENOLINK
	.comm	_MII_LPA,4,2                    ## @MII_LPA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_genphy_read_lpa                ; -- Begin function genphy_read_lpa
	.p2align	2
_genphy_read_lpa:                       ; @genphy_read_lpa
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_8
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.3:
Lloh3:
	adrp	x8, _MII_STAT1000@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_STAT1000@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x1, x0
	tbnz	w0, #31, LBB0_14
; %bb.4:
Lloh6:
	adrp	x8, _LPA_1000MSFAIL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LPA_1000MSFAIL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_9
; %bb.5:
Lloh9:
	adrp	x8, _MII_CTRL1000@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_CTRL1000@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x1, x0
	tbnz	w0, #31, LBB0_14
; %bb.6:
Lloh12:
	adrp	x8, _CTL1000_ENABLE_MASTER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CTL1000_ENABLE_MASTER@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, l_.str@PAGE
Lloh16:
	add	x9, x9, l_.str@PAGEOFF
Lloh17:
	adrp	x10, l_.str.1@PAGE
Lloh18:
	add	x10, x10, l_.str.1@PAGEOFF
	tst	w8, w1
	csel	x1, x10, x9, eq
	mov	x0, x19
	bl	_phydev_err
Lloh19:
	adrp	x8, _ENOLINK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOLINK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w1, w8
	b	LBB0_14
LBB0_7:
	ldr	w0, [x19, #8]
	bl	_linkmode_zero
	b	LBB0_13
LBB0_8:
	ldr	w0, [x19, #8]
	mov	w1, #0
	bl	_mii_stat1000_mod_linkmode_lpa_t
	ldr	w0, [x19, #8]
	mov	w1, #0
	b	LBB0_12
LBB0_9:
	ldr	w0, [x19, #8]
	bl	_mii_stat1000_mod_linkmode_lpa_t
LBB0_10:
Lloh22:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x1, x0
	tbnz	w0, #31, LBB0_14
; %bb.11:
	ldr	w0, [x19, #8]
LBB0_12:
	bl	_mii_lpa_mod_linkmode_lpa_t
LBB0_13:
	mov	w1, #0
LBB0_14:
	mov	x0, x1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_MII_STAT1000,4,2               ; @MII_STAT1000
	.comm	_LPA_1000MSFAIL,4,2             ; @LPA_1000MSFAIL
	.comm	_MII_CTRL1000,4,2               ; @MII_CTRL1000
	.comm	_CTL1000_ENABLE_MASTER,4,2      ; @CTL1000_ENABLE_MASTER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Master/Slave resolution failed, maybe conflicting manual settings?\n"

l_.str.1:                               ; @.str.1
	.asciz	"Master/Slave resolution failed\n"

	.comm	_ENOLINK,4,2                    ; @ENOLINK
	.comm	_MII_LPA,4,2                    ; @MII_LPA
.subsections_via_symbols
