	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8306_read_status
_rtl8306_read_status:                   ## @rtl8306_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	cmpl	$4, 40(%rdi)
	jne	LBB0_1
## %bb.2:
	movq	48(%rbx), %r14
	movq	_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_RTL_PORT_REG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rtl_get
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movl	$1, (%rbx)
	jmp	LBB0_9
LBB0_3:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	_DUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_RTL_PORT_REG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rtl_get
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_RTL_PORT_REG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rtl_get
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, (%rbx)
	je	LBB0_10
LBB0_9:
	movq	_PHY_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	4(%rbx), %edi
	callq	_netif_carrier_on
	jmp	LBB0_11
LBB0_10:
	movq	_PHY_NOLINK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	4(%rbx), %edi
	callq	_netif_carrier_off
LBB0_11:
	movl	4(%rbx), %edi
	callq	*8(%rbx)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED,4,2                      ## @SPEED
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_DUPLEX,4,2                     ## @DUPLEX
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_LINK,4,2                       ## @LINK
	.comm	_PHY_RUNNING,4,2                ## @PHY_RUNNING
	.comm	_PHY_NOLINK,4,2                 ## @PHY_NOLINK
	.no_dead_strip	_rtl8306_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8306_read_status
_rtl8306_read_status:                   ; @rtl8306_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
	ldr	w8, [x0, #40]
	cmp	w8, #4
	b.ne	LBB0_3
; %bb.1:
	ldr	x20, [x19, #48]
Lloh0:
	adrp	x8, _SPEED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPEED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_RTL_PORT_REG
	mov	x1, x0
	mov	x0, x20
	bl	_rtl_get
Lloh3:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh5:
	adrp	x9, _SPEED_10@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SPEED_10@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	x8, [x8]
	str	x8, [x19, #32]
Lloh7:
	adrp	x8, _DUPLEX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DUPLEX@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_RTL_PORT_REG
	mov	x1, x0
	mov	x0, x20
	bl	_rtl_get
Lloh10:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
Lloh12:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	x8, [x8]
	str	x8, [x19, #24]
Lloh14:
	adrp	x8, _LINK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LINK@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_RTL_PORT_REG
	mov	x1, x0
	mov	x0, x20
	bl	_rtl_get
	cmp	x0, #0
	cset	w8, ne
	str	w8, [x19]
	cbnz	x0, LBB0_4
; %bb.2:
Lloh17:
	adrp	x8, _PHY_NOLINK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PHY_NOLINK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w0, [x19, #4]
	bl	_netif_carrier_off
	b	LBB0_5
LBB0_3:
Lloh20:
	adrp	x8, _SPEED_100@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SPEED_100@GOTPAGEOFF]
Lloh22:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh23:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
Lloh25:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #24]
	mov	w8, #1
	str	w8, [x19]
LBB0_4:
Lloh26:
	adrp	x8, _PHY_RUNNING@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PHY_RUNNING@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w0, [x19, #4]
	bl	_netif_carrier_on
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	w0, [x19, #4]
	blr	x8
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED,4,2                      ; @SPEED
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_DUPLEX,4,2                     ; @DUPLEX
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_LINK,4,2                       ; @LINK
	.comm	_PHY_RUNNING,4,2                ; @PHY_RUNNING
	.comm	_PHY_NOLINK,4,2                 ; @PHY_NOLINK
	.no_dead_strip	_rtl8306_read_status
.subsections_via_symbols
