	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_PMT_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_smsc911x_reg_read
	movl	(%r14), %esi
	movq	_PMT_CTRL_PHY_RST_@GOTPCREL(%rip), %r15
	orl	(%r15), %eax
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_smsc911x_reg_write
	movl	$-100000, %ebx                  ## imm = 0xFFFE7960
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_smsc911x_reg_read
	andl	(%r15), %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:
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_SMSC_WARN
	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:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PMT_CTRL,4,2                   ## @PMT_CTRL
	.comm	_PMT_CTRL_PHY_RST_,4,2          ## @PMT_CTRL_PHY_RST_
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.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	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
Lloh0:
	adrp	x20, _PMT_CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PMT_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_smsc911x_reg_read
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _PMT_CTRL_PHY_RST_@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PMT_CTRL_PHY_RST_@GOTPAGEOFF]
	ldr	w8, [x21]
	orr	w2, w8, w0
	mov	x0, x19
	bl	_smsc911x_reg_write
	mov	w22, #31072
	movk	w22, #65534, lsl #16
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_smsc911x_reg_read
	ldr	w8, [x21]
	and	w0, w8, w0
	cbz	w22, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w22, w22, #1
	cbnz	w0, LBB0_1
LBB0_3:
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
Lloh4:
	adrp	x8, _hw@GOTPAGE
Lloh5:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_SMSC_WARN
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	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, #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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PMT_CTRL,4,2                   ; @PMT_CTRL
	.comm	_PMT_CTRL_PHY_RST_,4,2          ; @PMT_CTRL_PHY_RST_
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY reset failed to complete"

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