	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan87xx_read_status
_lan87xx_read_status:                   ## @lan87xx_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	%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, %r13
	movq	8(%rdi), %rbx
	callq	_genphy_read_status
	movl	%eax, %r14d
	cmpl	$0, (%r13)
	je	LBB0_1
LBB0_10:
	movl	%r14d, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	$0, (%rbx)
	je	LBB0_10
## %bb.2:
	movq	_MII_LAN83C185_CTRL_STATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.3:
	movl	(%r15), %esi
	movq	_MII_LAN83C185_EDPWRDOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_phy_write
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	movl	$63, %ebx
	movq	_MII_LAN83C185_ENERGYON@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	subl	$1, %ebx
	setb	%cl
	testl	%eax, (%r12)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	testb	%cl, %cl
	je	LBB0_5
LBB0_8:
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	movl	(%r15), %esi
	movq	_MII_LAN83C185_EDPWRDOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	%eax, %edx
	movq	%r13, %rdi
	callq	_phy_write
	testl	%eax, %eax
	jns	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_LAN83C185_CTRL_STATUS,4,2  ## @MII_LAN83C185_CTRL_STATUS
	.comm	_MII_LAN83C185_EDPWRDOWN,4,2    ## @MII_LAN83C185_EDPWRDOWN
	.comm	_MII_LAN83C185_ENERGYON,4,2     ## @MII_LAN83C185_ENERGYON
	.no_dead_strip	_lan87xx_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan87xx_read_status
_lan87xx_read_status:                   ; @lan87xx_read_status
	.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	x20, x0
	ldr	x21, [x0, #8]
	bl	_genphy_read_status
	mov	x19, x0
	ldr	w8, [x20]
	cbnz	w8, LBB0_10
; %bb.1:
	ldr	x8, [x21]
	cbz	x8, LBB0_10
; %bb.2:
Lloh0:
	adrp	x21, _MII_LAN83C185_CTRL_STATUS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MII_LAN83C185_CTRL_STATUS@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_phy_read
	tbnz	w0, #31, LBB0_9
; %bb.3:
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _MII_LAN83C185_EDPWRDOWN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MII_LAN83C185_EDPWRDOWN@GOTPAGEOFF]
	ldr	w8, [x22]
	bic	w2, w0, w8
	mov	x0, x20
	bl	_phy_write
	tbnz	w0, #31, LBB0_9
; %bb.4:
	mov	w23, #63
Lloh4:
	adrp	x24, _MII_LAN83C185_ENERGYON@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MII_LAN83C185_ENERGYON@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_phy_read
	tbnz	w0, #31, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w23, #0, #4, eq
	sub	w23, w23, #1
	b.ne	LBB0_5
; %bb.7:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_phy_read
	tbnz	w0, #31, LBB0_9
; %bb.8:
	ldr	w1, [x21]
	ldr	w8, [x22]
	orr	w2, w8, w0
	mov	x0, x20
	bl	_phy_write
	tbz	w0, #31, LBB0_10
LBB0_9:
	mov	x19, x0
LBB0_10:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_LAN83C185_CTRL_STATUS,4,2  ; @MII_LAN83C185_CTRL_STATUS
	.comm	_MII_LAN83C185_EDPWRDOWN,4,2    ; @MII_LAN83C185_EDPWRDOWN
	.comm	_MII_LAN83C185_ENERGYON,4,2     ; @MII_LAN83C185_ENERGYON
	.no_dead_strip	_lan87xx_read_status
.subsections_via_symbols
