	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_linkspeed
_update_linkspeed:                      ## @update_linkspeed
	.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, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	8(%rax), %r15
	movq	%rax, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mii_link_ok
	testl	%eax, %eax
	je	LBB0_20
## %bb.1:
	cmpl	$1, (%r12)
	jne	LBB0_2
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	$0, (%r12)
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
LBB0_2:
	movl	(%rbx), %esi
	movq	_MII_BMSR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_w90p910_mdio_read
	movl	%eax, %r13d
	movl	(%rbx), %esi
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_w90p910_mdio_read
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.3:
	movq	_BMSR_ANEGCOMPLETE@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_19
## %bb.4:
	movl	(%rbx), %esi
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_w90p910_mdio_read
	movq	_LPA_100FULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_LPA_100HALF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	orl	%ecx, %edx
	jne	LBB0_5
## %bb.6:
	movq	_SPEED_10@GOTPCREL(%rip), %rdx
	jmp	LBB0_7
LBB0_11:
	movq	_BMCR_SPEED100@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.13:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_5:
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
LBB0_7:
	movl	(%rdx), %r13d
	testl	%ecx, %ecx
	jne	LBB0_9
## %bb.8:
	movq	_LPA_10FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
LBB0_9:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_12:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
LBB0_14:
	movq	_BMCR_FULLDPLX@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	jne	LBB0_15
## %bb.16:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rcx), %r13d
LBB0_18:
	movl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	callq	_update_linkspeed_register
	movl	(%r14), %edx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %ecx
	callq	_dev_info
	movl	$1, (%r12)
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_carrier_on               ## TAILCALL
LBB0_10:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Link down.\n"

	.comm	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_BMSR_ANEGCOMPLETE,4,2          ## @BMSR_ANEGCOMPLETE
	.comm	_MII_LPA,4,2                    ## @MII_LPA
	.comm	_LPA_100FULL,4,2                ## @LPA_100FULL
	.comm	_LPA_100HALF,4,2                ## @LPA_100HALF
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_LPA_10FULL,4,2                 ## @LPA_10FULL
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_BMCR_SPEED100,4,2              ## @BMCR_SPEED100
	.comm	_BMCR_FULLDPLX,4,2              ## @BMCR_FULLDPLX
L_.str.1:                               ## @.str.1
	.asciz	"%s: Link now %i-%s\n"

L_.str.2:                               ## @.str.2
	.asciz	"FullDuplex"

L_.str.3:                               ## @.str.3
	.asciz	"HalfDuplex"

	.no_dead_strip	_update_linkspeed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_linkspeed
_update_linkspeed:                      ; @update_linkspeed
	.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
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x21, [x0, #8]
	add	x22, x0, #4
	mov	x0, x22
	bl	_mii_link_ok
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_4
LBB0_2:
	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_3:
	str	wzr, [x20]
	mov	x0, x19
	bl	_netif_carrier_off
	ldr	w2, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	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	_dev_warn
LBB0_4:
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _MII_BMSR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MII_BMSR@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_w90p910_mdio_read
	mov	x23, x0
	ldr	w1, [x22]
Lloh5:
	adrp	x8, _MII_BMCR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MII_BMCR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_w90p910_mdio_read
Lloh8:
	adrp	x8, _BMCR_ANENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x24, _DUPLEX_FULL@GOTPAGE
Lloh12:
	ldr	x24, [x24, _DUPLEX_FULL@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.5:
Lloh13:
	adrp	x8, _BMSR_ANEGCOMPLETE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BMSR_ANEGCOMPLETE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_2
; %bb.6:
	ldr	w1, [x22]
Lloh16:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_w90p910_mdio_read
Lloh19:
	adrp	x8, _LPA_100FULL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LPA_100FULL@GOTPAGEOFF]
Lloh21:
	adrp	x9, _LPA_100HALF@GOTPAGE
Lloh22:
	ldr	x9, [x9, _LPA_100HALF@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	ldr	w9, [x9]
	and	w9, w9, w0
Lloh25:
	adrp	x10, _SPEED_10@GOTPAGE
Lloh26:
	ldr	x10, [x10, _SPEED_10@GOTPAGEOFF]
	and	w8, w8, w0
	orr	w9, w8, w9
Lloh27:
	adrp	x11, _SPEED_100@GOTPAGE
Lloh28:
	ldr	x11, [x11, _SPEED_100@GOTPAGEOFF]
	cmp	w9, #0
	csel	x9, x10, x11, eq
	ldr	w22, [x9]
	cbnz	w8, LBB0_8
; %bb.7:
Lloh29:
	adrp	x8, _LPA_10FULL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _LPA_10FULL@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_12
LBB0_8:
	ldr	w23, [x24]
	b	LBB0_11
LBB0_9:
Lloh32:
	adrp	x8, _BMCR_SPEED100@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BMCR_SPEED100@GOTPAGEOFF]
Lloh34:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh35:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh36:
	adrp	x10, _SPEED_10@GOTPAGE
Lloh37:
	ldr	x10, [x10, _SPEED_10@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w0
	csel	x8, x10, x9, eq
	ldr	w22, [x8]
Lloh39:
	adrp	x8, _BMCR_FULLDPLX@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BMCR_FULLDPLX@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
Lloh42:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh43:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
	tst	w8, w0
	csel	x8, x9, x24, eq
LBB0_10:
	ldr	w23, [x8]
LBB0_11:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_update_linkspeed_register
	ldr	w2, [x19]
	ldr	w8, [x24]
Lloh44:
	adrp	x9, l_.str.3@PAGE
Lloh45:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh46:
	adrp	x10, l_.str.2@PAGE
Lloh47:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w23, w8
	csel	x4, x10, x9, eq
Lloh48:
	adrp	x1, l_.str.1@PAGE
Lloh49:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x3, x22
	bl	_dev_info
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x19
	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	_netif_carrier_on
LBB0_12:
Lloh50:
	adrp	x8, _DUPLEX_HALF@GOTPAGE
Lloh51:
	ldr	x8, [x8, _DUPLEX_HALF@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh38
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Link down.\n"

	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_BMSR_ANEGCOMPLETE,4,2          ; @BMSR_ANEGCOMPLETE
	.comm	_MII_LPA,4,2                    ; @MII_LPA
	.comm	_LPA_100FULL,4,2                ; @LPA_100FULL
	.comm	_LPA_100HALF,4,2                ; @LPA_100HALF
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_LPA_10FULL,4,2                 ; @LPA_10FULL
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_BMCR_SPEED100,4,2              ; @BMCR_SPEED100
	.comm	_BMCR_FULLDPLX,4,2              ; @BMCR_FULLDPLX
l_.str.1:                               ; @.str.1
	.asciz	"%s: Link now %i-%s\n"

l_.str.2:                               ; @.str.2
	.asciz	"FullDuplex"

l_.str.3:                               ; @.str.3
	.asciz	"HalfDuplex"

	.no_dead_strip	_update_linkspeed
.subsections_via_symbols
