	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xcvr_diag_bcm870x
_xcvr_diag_bcm870x:                     ## @xcvr_diag_bcm870x
	.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
	movl	4(%rdi), %esi
	movq	_BCM8704_PMA_PMD_DEV_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MII_STAT1000@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_mdio_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.1:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pr_info
	movl	4(%r14), %esi
	movq	_BCM8704_USER_DEV3_ADDR@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$32, %ecx
	callq	_mdio_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.2:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pr_info
	movl	4(%r14), %esi
	movq	_BCM8704_PHYXS_DEV_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MII_NWAYTEST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_mdio_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_18
## %bb.3:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pr_info
	movl	4(%r14), %esi
	movl	(%r12), %edx
	movq	_BCM8704_USER_ANALOG_STATUS0@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	%r14, %rdi
	callq	_mdio_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	movl	4(%r14), %esi
	movl	(%r12), %edx
	movl	(%r15), %ecx
	movq	%r14, %rdi
	callq	_mdio_read
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movl	4(%r14), %esi
	movl	(%r12), %edx
	movq	_BCM8704_USER_TX_ALARM_STATUS@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_mdio_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:
	movl	4(%r14), %esi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_mdio_read
	testl	%eax, %eax
	js	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	cmpl	$1020, %r15d                    ## imm = 0x3FC
	je	LBB0_18
## %bb.8:
	cmpl	$17340, %r15d                   ## imm = 0x43BC
	jne	LBB0_15
## %bb.9:
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_17
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_18
LBB0_12:
	movl	%r15d, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	cmpl	$25500, %r15d                   ## imm = 0x639C
	jne	LBB0_18
## %bb.16:
	leaq	L_.str.4(%rip), %rdi
LBB0_17:
	movl	(%r14), %esi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_BCM8704_PMA_PMD_DEV_ADDR,4,2   ## @BCM8704_PMA_PMD_DEV_ADDR
	.comm	_MII_STAT1000,4,2               ## @MII_STAT1000
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port %u PMA_PMD(MII_STAT1000) [%04x]\n"

	.comm	_BCM8704_USER_DEV3_ADDR,4,2     ## @BCM8704_USER_DEV3_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"Port %u USER_DEV3(0x20) [%04x]\n"

	.comm	_BCM8704_PHYXS_DEV_ADDR,4,2     ## @BCM8704_PHYXS_DEV_ADDR
	.comm	_MII_NWAYTEST,4,2               ## @MII_NWAYTEST
L_.str.2:                               ## @.str.2
	.asciz	"Port %u PHYXS(MII_NWAYTEST) [%04x]\n"

	.comm	_BCM8704_USER_ANALOG_STATUS0,4,2 ## @BCM8704_USER_ANALOG_STATUS0
	.comm	_BCM8704_USER_TX_ALARM_STATUS,4,2 ## @BCM8704_USER_TX_ALARM_STATUS
L_.str.3:                               ## @.str.3
	.asciz	"Port %u cable not connected or bad cable\n"

L_.str.4:                               ## @.str.4
	.asciz	"Port %u optical module is bad or missing\n"

	.no_dead_strip	_xcvr_diag_bcm870x
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xcvr_diag_bcm870x
_xcvr_diag_bcm870x:                     ; @xcvr_diag_bcm870x
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w1, [x0, #4]
Lloh0:
	adrp	x8, _BCM8704_PMA_PMD_DEV_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCM8704_PMA_PMD_DEV_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _MII_STAT1000@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_STAT1000@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	bl	_mdio_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_12
; %bb.1:
	ldr	w1, [x19]
	str	x0, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	ldr	w1, [x19, #4]
Lloh8:
	adrp	x21, _BCM8704_USER_DEV3_ADDR@GOTPAGE
Lloh9:
	ldr	x21, [x21, _BCM8704_USER_DEV3_ADDR@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #32
	bl	_mdio_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	w1, [x19]
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	ldr	w1, [x19, #4]
Lloh12:
	adrp	x8, _BCM8704_PHYXS_DEV_ADDR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BCM8704_PHYXS_DEV_ADDR@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _MII_NWAYTEST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MII_NWAYTEST@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_mdio_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_11
; %bb.3:
	ldr	w1, [x19]
	str	x0, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	ldr	w1, [x19, #4]
	ldr	w2, [x21]
Lloh20:
	adrp	x20, _BCM8704_USER_ANALOG_STATUS0@GOTPAGE
Lloh21:
	ldr	x20, [x20, _BCM8704_USER_ANALOG_STATUS0@GOTPAGEOFF]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_mdio_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_12
; %bb.4:
	ldr	w1, [x19, #4]
	ldr	w2, [x21]
	ldr	w3, [x20]
	mov	x0, x19
	bl	_mdio_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_13
; %bb.5:
	ldr	w1, [x19, #4]
	ldr	w2, [x21]
Lloh22:
	adrp	x22, _BCM8704_USER_TX_ALARM_STATUS@GOTPAGE
Lloh23:
	ldr	x22, [x22, _BCM8704_USER_TX_ALARM_STATUS@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x0, x19
	bl	_mdio_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_12
; %bb.6:
	ldr	w1, [x19, #4]
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	bl	_mdio_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_12
; %bb.7:
	cmp	w20, #1020
	b.eq	LBB0_17
; %bb.8:
	mov	w8, #17340
	cmp	w20, w8
	b.ne	LBB0_14
; %bb.9:
	cbz	w0, LBB0_14
; %bb.10:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_16
LBB0_11:
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	add	sp, sp, #64
	ret
LBB0_13:
	mov	x0, x20
	b	LBB0_12
LBB0_14:
	mov	w8, #25500
	cmp	w20, w8
	b.ne	LBB0_17
; %bb.15:
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_16:
	ldr	w1, [x19]
	bl	_pr_info
LBB0_17:
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_BCM8704_PMA_PMD_DEV_ADDR,4,2   ; @BCM8704_PMA_PMD_DEV_ADDR
	.comm	_MII_STAT1000,4,2               ; @MII_STAT1000
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port %u PMA_PMD(MII_STAT1000) [%04x]\n"

	.comm	_BCM8704_USER_DEV3_ADDR,4,2     ; @BCM8704_USER_DEV3_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"Port %u USER_DEV3(0x20) [%04x]\n"

	.comm	_BCM8704_PHYXS_DEV_ADDR,4,2     ; @BCM8704_PHYXS_DEV_ADDR
	.comm	_MII_NWAYTEST,4,2               ; @MII_NWAYTEST
l_.str.2:                               ; @.str.2
	.asciz	"Port %u PHYXS(MII_NWAYTEST) [%04x]\n"

	.comm	_BCM8704_USER_ANALOG_STATUS0,4,2 ; @BCM8704_USER_ANALOG_STATUS0
	.comm	_BCM8704_USER_TX_ALARM_STATUS,4,2 ; @BCM8704_USER_TX_ALARM_STATUS
l_.str.3:                               ; @.str.3
	.asciz	"Port %u cable not connected or bad cable\n"

l_.str.4:                               ; @.str.4
	.asciz	"Port %u optical module is bad or missing\n"

	.no_dead_strip	_xcvr_diag_bcm870x
.subsections_via_symbols
