	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ef4_mdio_test_alive
LCPI0_0:
	.long	0                               ## 0x0
	.long	65535                           ## 0xffff
	.long	0                               ## 0x0
	.long	65535                           ## 0xffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ef4_mdio_test_alive
	.p2align	4, 0x90
_ef4_mdio_test_alive:                   ## @ef4_mdio_test_alive
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	___ffs
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_MDIO_DEVID1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ef4_mdio_read
	movl	%eax, %r15d
	movq	_MDIO_DEVID2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ef4_mdio_read
	movd	%r15d, %xmm0
	pinsrd	$1, %eax, %xmm0
	pshufd	$80, %xmm0, %xmm0               ## xmm0 = xmm0[0,0,1,1]
	pcmpeqd	LCPI0_0(%rip), %xmm0
	movmskps	%xmm0, %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%rbx), %r8d
	movl	12(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ef4_mdio_check_mmds
	movl	%eax, %r14d
LBB0_3:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_DEVID1,4,2                ## @MDIO_DEVID1
	.comm	_MDIO_DEVID2,4,2                ## @MDIO_DEVID2
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no MDIO PHY present with ID %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ef4_mdio_test_alive            ; -- Begin function ef4_mdio_test_alive
	.p2align	2
_ef4_mdio_test_alive:                   ; @ef4_mdio_test_alive
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	w0, [x0, #4]
	bl	___ffs
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _MDIO_DEVID1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_DEVID1@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_ef4_mdio_read
	mov	x21, x0
Lloh3:
	adrp	x8, _MDIO_DEVID2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MDIO_DEVID2@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_ef4_mdio_read
	cmp	w21, #0
	mov	w8, #65535
	ccmp	w21, w8, #4, ne
	ccmp	w0, #0, #4, ne
	ccmp	w0, w8, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _hw@GOTPAGE
Lloh7:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldp	w4, w2, [x19, #8]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_3
LBB0_2:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_ef4_mdio_check_mmds
	mov	x20, x0
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_DEVID1,4,2                ; @MDIO_DEVID1
	.comm	_MDIO_DEVID2,4,2                ; @MDIO_DEVID2
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no MDIO PHY present with ID %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
