	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function teranetics_read_status
_teranetics_read_status:                ## @teranetics_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$1, (%rdi)
	movq	_SPEED_10000@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rdi)
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdi)
	movq	_MDIO_MMD_VEND1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$93, %edx
	callq	_phy_read_mmd
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_MDIO_MMD_PHYXS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MDIO_PHYXS_LNSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_phy_read_mmd
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movq	_MDIO_PHYXS_LANE_READY@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.3:
	movq	_MDIO_MMD_AN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MDIO_STAT1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_phy_read_mmd
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movq	_MDIO_STAT1_LSTATUS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
LBB0_5:
	movl	$0, (%rbx)
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_10000,4,2                ## @SPEED_10000
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_MDIO_MMD_VEND1,4,2             ## @MDIO_MMD_VEND1
	.comm	_MDIO_MMD_PHYXS,4,2             ## @MDIO_MMD_PHYXS
	.comm	_MDIO_PHYXS_LNSTAT,4,2          ## @MDIO_PHYXS_LNSTAT
	.comm	_MDIO_PHYXS_LANE_READY,4,2      ## @MDIO_PHYXS_LANE_READY
	.comm	_MDIO_MMD_AN,4,2                ## @MDIO_MMD_AN
	.comm	_MDIO_STAT1,4,2                 ## @MDIO_STAT1
	.comm	_MDIO_STAT1_LSTATUS,4,2         ## @MDIO_STAT1_LSTATUS
	.no_dead_strip	_teranetics_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function teranetics_read_status
_teranetics_read_status:                ; @teranetics_read_status
	.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
	mov	w8, #1
	str	w8, [x0]
Lloh0:
	adrp	x8, _SPEED_10000@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPEED_10000@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #4]
Lloh6:
	adrp	x8, _MDIO_MMD_VEND1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIO_MMD_VEND1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #93
	bl	_phy_read_mmd
	cbnz	w0, LBB0_6
; %bb.1:
Lloh9:
	adrp	x8, _MDIO_MMD_PHYXS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MDIO_MMD_PHYXS@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _MDIO_PHYXS_LNSTAT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MDIO_PHYXS_LNSTAT@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_phy_read_mmd
	tbnz	w0, #31, LBB0_5
; %bb.2:
Lloh15:
	adrp	x8, _MDIO_PHYXS_LANE_READY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MDIO_PHYXS_LANE_READY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	bics	wzr, w8, w0
	b.ne	LBB0_5
; %bb.3:
Lloh18:
	adrp	x8, _MDIO_MMD_AN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MDIO_MMD_AN@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _MDIO_STAT1@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MDIO_STAT1@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_phy_read_mmd
	tbnz	w0, #31, LBB0_5
; %bb.4:
Lloh24:
	adrp	x8, _MDIO_STAT1_LSTATUS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MDIO_STAT1_LSTATUS@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_6
LBB0_5:
	str	wzr, [x19]
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_10000,4,2                ; @SPEED_10000
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_MDIO_MMD_VEND1,4,2             ; @MDIO_MMD_VEND1
	.comm	_MDIO_MMD_PHYXS,4,2             ; @MDIO_MMD_PHYXS
	.comm	_MDIO_PHYXS_LNSTAT,4,2          ; @MDIO_PHYXS_LNSTAT
	.comm	_MDIO_PHYXS_LANE_READY,4,2      ; @MDIO_PHYXS_LANE_READY
	.comm	_MDIO_MMD_AN,4,2                ; @MDIO_MMD_AN
	.comm	_MDIO_STAT1,4,2                 ; @MDIO_STAT1
	.comm	_MDIO_STAT1_LSTATUS,4,2         ; @MDIO_STAT1_LSTATUS
	.no_dead_strip	_teranetics_read_status
.subsections_via_symbols
