	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc95xx_mdio_read
_smsc95xx_mdio_read:                    ## @smsc95xx_mdio_read
	.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
	movl	%edx, %r14d
	movl	%esi, %ebx
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_smsc95xx_phy_wait_not_busy
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_devwarn
	jmp	LBB0_2
LBB0_3:
	andl	4(%r15), %ebx
	andl	8(%r15), %r14d
	shll	$11, %ebx
	movl	%r14d, %eax
	movq	_MII_READ_@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	shll	$6, %eax
	orl	%eax, %ebx
	movq	_MII_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_smsc95xx_write_reg
	movq	%r15, %rdi
	callq	_smsc95xx_phy_wait_not_busy
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_devwarn
LBB0_2:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_MII_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_smsc95xx_read_reg
	movq	%r15, %rdi
	callq	_mutex_unlock
	movzwl	-28(%rbp), %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MII is busy in smsc95xx_mdio_read"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_MII_READ_,4,2                  ## @MII_READ_
	.comm	_MII_ADDR,4,2                   ## @MII_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"Timed out reading MII reg %02X"

	.comm	_MII_DATA,4,2                   ## @MII_DATA
	.no_dead_strip	_smsc95xx_mdio_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc95xx_mdio_read
_smsc95xx_mdio_read:                    ; @smsc95xx_mdio_read
	.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	x20, x2
	mov	x21, x1
	bl	_netdev_priv
	mov	x19, x0
	bl	_mutex_lock
	mov	x0, x19
	bl	_smsc95xx_phy_wait_not_busy
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldp	w8, w9, [x19, #4]
	and	w8, w8, w21
	and	w20, w9, w20
Lloh2:
	adrp	x9, _MII_READ_@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MII_READ_@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w8, w9, w8, lsl #11
	orr	w2, w8, w20, lsl #6
Lloh5:
	adrp	x8, _MII_ADDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MII_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smsc95xx_write_reg
	mov	x0, x19
	bl	_smsc95xx_phy_wait_not_busy
	cbz	x0, LBB0_6
; %bb.3:
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_devwarn
	mov	x0, x19
	bl	_mutex_unlock
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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_6:
Lloh13:
	adrp	x8, _MII_DATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MII_DATA@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_smsc95xx_read_reg
	mov	x0, x19
	bl	_mutex_unlock
	ldrh	w0, [sp, #12]
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MII is busy in smsc95xx_mdio_read"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_MII_READ_,4,2                  ; @MII_READ_
	.comm	_MII_ADDR,4,2                   ; @MII_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"Timed out reading MII reg %02X"

	.comm	_MII_DATA,4,2                   ; @MII_DATA
	.no_dead_strip	_smsc95xx_mdio_read
.subsections_via_symbols
