	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc911x_phy_reset
_smsc911x_phy_reset:                    ## @smsc911x_phy_reset
	.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), %r13
	xorl	%edi, %edi
	testq	%r13, %r13
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpl	$0, 4(%r13)
	sete	%dil
	callq	_BUG_ON
	movq	_HW@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_SMSC_TRACE
	movl	(%r13), %esi
	movl	4(%r13), %edi
	movq	_MII_BMCR@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_BMCR_RESET@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	callq	_smsc911x_mii_write
	movl	$-100000, %ebx                  ## imm = 0xFFFE7960
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep
	movl	(%r13), %esi
	movl	4(%r13), %edi
	movl	(%r15), %edx
	callq	_smsc911x_mii_read
	andl	(%r12), %eax
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	testl	%eax, %eax
	jne	LBB0_1
LBB0_3:
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_SMSC_WARNING
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movl	$1, %edi
	callq	_msleep
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HW,4,2                         ## @HW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Performing PHY BCR Reset"

	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_RESET,4,2                 ## @BMCR_RESET
L_.str.1:                               ## @.str.1
	.asciz	"PHY reset failed to complete."

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_smsc911x_phy_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc911x_phy_reset
_smsc911x_phy_reset:                    ; @smsc911x_phy_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x19, [x0]
	cmp	x19, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cset	w0, eq
	bl	_BUG_ON
Lloh0:
	adrp	x20, _HW@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HW@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_SMSC_TRACE
	ldp	w1, w0, [x19]
Lloh4:
	adrp	x21, _MII_BMCR@GOTPAGE
Lloh5:
	ldr	x21, [x21, _MII_BMCR@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh6:
	adrp	x22, _BMCR_RESET@GOTPAGE
Lloh7:
	ldr	x22, [x22, _BMCR_RESET@GOTPAGEOFF]
	ldr	w3, [x22]
	bl	_smsc911x_mii_write
	mov	w23, #31072
	movk	w23, #65534, lsl #16
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_msleep
	ldp	w1, w0, [x19]
	ldr	w2, [x21]
	bl	_smsc911x_mii_read
	ldr	w8, [x22]
	and	w8, w8, w0
	cbz	w23, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w23, w23, #1
	cbnz	w8, LBB0_1
LBB0_3:
	cbz	w8, LBB0_5
; %bb.4:
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_SMSC_WARNING
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #1
	bl	_msleep
	mov	w0, #0
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_HW,4,2                         ; @HW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Performing PHY BCR Reset"

	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_RESET,4,2                 ; @BMCR_RESET
l_.str.1:                               ; @.str.1
	.asciz	"PHY reset failed to complete."

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_smsc911x_phy_reset
.subsections_via_symbols
