	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function upd60620_read_status
_upd60620_read_status:                  ## @upd60620_read_status
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_MII_BMSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phy_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	$0, (%r12)
	movl	24(%r12), %edi
	callq	_linkmode_zero
	movq	$0, 4(%r12)
	movq	_BMSR_ANEGCOMPLETE@GOTPCREL(%rip), %rax
	movq	_BMSR_LSTATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	xorl	%r14d, %r14d
	testl	%ebx, %ecx
	je	LBB0_17
## %bb.3:
	movq	_PHY_PHYSCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_PHY_PHYSCR_10MB@GOTPCREL(%rip), %rdx
	movq	_PHY_PHYSCR_100MB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rdx), %esi
	testl	%eax, %esi
	je	LBB0_17
## %bb.6:
	movl	$1, (%r12)
	movq	_SPEED_10@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 28(%r12)
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 16(%r12)
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%r12)
LBB0_8:
	movq	_PHY_PHYSCR_DUPLEX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r12)
LBB0_10:
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_phy_read
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movl	24(%r12), %edi
	movl	%r15d, %esi
	callq	_mii_lpa_to_linkmode_lpa_t
	movq	16(%r12), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.13:
	movq	_LPA_PAUSE_CAP@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_15
## %bb.14:
	movl	$1, 4(%r12)
LBB0_15:
	movq	_LPA_PAUSE_ASYM@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_17
## %bb.16:
	movl	$1, 8(%r12)
	jmp	LBB0_17
LBB0_1:
	movl	%ebx, %r14d
	jmp	LBB0_17
LBB0_4:
	movl	%eax, %r14d
	jmp	LBB0_17
LBB0_11:
	movl	%r15d, %r14d
LBB0_17:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_BMSR_ANEGCOMPLETE,4,2          ## @BMSR_ANEGCOMPLETE
	.comm	_BMSR_LSTATUS,4,2               ## @BMSR_LSTATUS
	.comm	_PHY_PHYSCR,4,2                 ## @PHY_PHYSCR
	.comm	_PHY_PHYSCR_10MB,4,2            ## @PHY_PHYSCR_10MB
	.comm	_PHY_PHYSCR_100MB,4,2           ## @PHY_PHYSCR_100MB
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_PHY_PHYSCR_DUPLEX,4,2          ## @PHY_PHYSCR_DUPLEX
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_MII_LPA,4,2                    ## @MII_LPA
	.comm	_LPA_PAUSE_CAP,4,2              ## @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ## @LPA_PAUSE_ASYM
	.no_dead_strip	_upd60620_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function upd60620_read_status
_upd60620_read_status:                  ; @upd60620_read_status
	.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
Lloh0:
	adrp	x8, _MII_BMSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_BMSR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_phy_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_15
; %bb.1:
	str	wzr, [x19]
	ldr	w0, [x19, #24]
	bl	_linkmode_zero
	stp	wzr, wzr, [x19, #4]
Lloh3:
	adrp	x8, _BMSR_ANEGCOMPLETE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMSR_ANEGCOMPLETE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _BMSR_LSTATUS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BMSR_LSTATUS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w20
	b.eq	LBB0_14
; %bb.2:
Lloh9:
	adrp	x8, _PHY_PHYSCR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PHY_PHYSCR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_15
; %bb.3:
Lloh12:
	adrp	x8, _PHY_PHYSCR_10MB@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PHY_PHYSCR_10MB@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x8]
Lloh15:
	adrp	x8, _PHY_PHYSCR_100MB@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PHY_PHYSCR_100MB@GOTPAGEOFF]
	ldr	w10, [x8]
	orr	w9, w10, w9
	tst	w9, w20
	b.eq	LBB0_14
; %bb.4:
	mov	w9, #1
	str	w9, [x19]
Lloh17:
	adrp	x9, _SPEED_10@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SPEED_10@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	str	w9, [x19, #28]
Lloh20:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	str	x9, [x19, #16]
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
Lloh23:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #28]
LBB0_6:
Lloh26:
	adrp	x8, _PHY_PHYSCR_DUPLEX@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PHY_PHYSCR_DUPLEX@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x21, _DUPLEX_FULL@GOTPAGE
Lloh30:
	ldr	x21, [x21, _DUPLEX_FULL@GOTPAGEOFF]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x21]
	str	x8, [x19, #16]
LBB0_8:
Lloh31:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_15
; %bb.9:
	ldr	w0, [x19, #24]
	mov	x1, x20
	bl	_mii_lpa_to_linkmode_lpa_t
	ldr	x8, [x19, #16]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.10:
Lloh34:
	adrp	x8, _LPA_PAUSE_CAP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LPA_PAUSE_CAP@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_12:
Lloh37:
	adrp	x8, _LPA_PAUSE_ASYM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _LPA_PAUSE_ASYM@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_14
; %bb.13:
	mov	w20, #0
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_15
LBB0_14:
	mov	w20, #0
LBB0_15:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_BMSR_ANEGCOMPLETE,4,2          ; @BMSR_ANEGCOMPLETE
	.comm	_BMSR_LSTATUS,4,2               ; @BMSR_LSTATUS
	.comm	_PHY_PHYSCR,4,2                 ; @PHY_PHYSCR
	.comm	_PHY_PHYSCR_10MB,4,2            ; @PHY_PHYSCR_10MB
	.comm	_PHY_PHYSCR_100MB,4,2           ; @PHY_PHYSCR_100MB
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_PHY_PHYSCR_DUPLEX,4,2          ; @PHY_PHYSCR_DUPLEX
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_MII_LPA,4,2                    ; @MII_LPA
	.comm	_LPA_PAUSE_CAP,4,2              ; @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ; @LPA_PAUSE_ASYM
	.no_dead_strip	_upd60620_read_status
.subsections_via_symbols
