	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8xxx_phy_read_status
_ar8xxx_phy_read_status:                ## @ar8xxx_phy_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %r14
	movq	(%rdi), %rax
	movq	_PHY_CHANGELINK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_ar8xxx_check_link_states
LBB0_2:
	cmpl	$0, 32(%rbx)
	je	LBB0_3
## %bb.17:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_genphy_read_status             ## TAILCALL
LBB0_3:
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ar8216_read_port_link
	xorl	%eax, %eax
	cmpl	$0, -32(%rbp)
	setne	%al
	movl	%eax, 8(%rbx)
	je	LBB0_16
## %bb.4:
	movl	-48(%rbp), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.5:
	cmpl	$129, %eax
	je	LBB0_8
## %bb.6:
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.7:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %r15d
LBB0_11:
	movl	%r15d, 28(%rbx)
	cmpq	$0, -40(%rbp)
	jne	LBB0_12
## %bb.13:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_PHY_RUNNING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	12(%rbx), %edi
	callq	_netif_carrier_on
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movl	12(%rbx), %edi
	callq	*%rax
LBB0_16:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_CHANGELINK,8,3             ## @PHY_CHANGELINK
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_PHY_RUNNING,8,3                ## @PHY_RUNNING
	.no_dead_strip	_ar8xxx_phy_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8xxx_phy_read_status
_ar8xxx_phy_read_status:                ; @ar8xxx_phy_read_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	ldr	x20, [x0, #40]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PHY_CHANGELINK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHY_CHANGELINK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_ar8xxx_check_link_states
LBB0_2:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_4
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_genphy_read_status
LBB0_4:
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #0
	bl	_ar8216_read_port_link
	ldr	w8, [sp, #24]
	cmp	w8, #0
	cset	w9, ne
	str	w9, [x19, #8]
	cbz	w8, LBB0_15
; %bb.5:
	ldr	w8, [sp, #8]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.6:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.7:
	cmp	w8, #130
	b.ne	LBB0_12
; %bb.8:
Lloh3:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh5:
	adrp	x8, _SPEED_1000@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SPEED_1000@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh7:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	b	LBB0_13
LBB0_12:
	mov	w8, #0
LBB0_13:
	str	w8, [x19, #28]
Lloh9:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
	ldr	x9, [sp, #16]
Lloh11:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh13:
	adrp	x8, _PHY_RUNNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PHY_RUNNING@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [x19]
	ldr	w0, [x19, #12]
	bl	_netif_carrier_on
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	w0, [x19, #12]
	blr	x8
LBB0_15:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_CHANGELINK,8,3             ; @PHY_CHANGELINK
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_PHY_RUNNING,8,3                ; @PHY_RUNNING
	.no_dead_strip	_ar8xxx_phy_read_status
.subsections_via_symbols
