	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cas_reset_mii_phy
_cas_reset_mii_phy:                     ## @cas_reset_mii_phy
	.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, %r14
	movq	_STOP_TRIES_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_MII_BMCR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_BMCR_RESET@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_cas_phy_write
	movl	$100, %edi
	callq	_udelay
	cmpl	$1, %ebx
	je	LBB0_5
## %bb.1:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_cas_phy_read
	testl	%eax, (%r12)
	je	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	cmpl	$2, %ebx
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_cas_phy_read
	decl	%ebx
	testl	%eax, (%r12)
	jne	LBB0_4
	jmp	LBB0_6
LBB0_5:
	movl	$1, %ebx
LBB0_6:
	xorl	%eax, %eax
	cmpl	$2, %ebx
	setl	%al
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STOP_TRIES_PHY,4,2             ## @STOP_TRIES_PHY
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_RESET,4,2                 ## @BMCR_RESET
	.no_dead_strip	_cas_reset_mii_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cas_reset_mii_phy
_cas_reset_mii_phy:                     ; @cas_reset_mii_phy
	.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	x8, _STOP_TRIES_PHY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STOP_TRIES_PHY@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x21, _MII_BMCR@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MII_BMCR@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh5:
	adrp	x22, _BMCR_RESET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _BMCR_RESET@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_cas_phy_write
	mov	w0, #100
	bl	_udelay
	cmp	w20, #1
	b.eq	LBB0_5
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_cas_phy_read
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	cmp	w20, #2
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_cas_phy_read
	ldr	w8, [x22]
	sub	w20, w20, #1
	and	w8, w8, w0
	cbnz	w8, LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w20, #1
LBB0_5:
	cmp	w20, #2
	cset	w0, lt
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_STOP_TRIES_PHY,4,2             ; @STOP_TRIES_PHY
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_RESET,4,2                 ; @BMCR_RESET
	.no_dead_strip	_cas_reset_mii_phy
.subsections_via_symbols
