	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vsc85xx_csr_ctrl_phy_write
_vsc85xx_csr_ctrl_phy_write:            ## @vsc85xx_csr_ctrl_phy_write
	.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
	movl	%ecx, %r12d
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	_MSCC_EXT_PAGE_ACCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSCC_PHY_PAGE_CSR_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_phy_base_write
	movq	_MSCC_EXT_PAGE_CSR_CNTL_20@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	sarl	$2, %edi
	callq	_MSCC_PHY_CSR_CNTL_20_TARGET
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_phy_base_write
	movq	_MSCC_EXT_PAGE_CSR_CNTL_17@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_phy_base_write
	movq	_MSCC_EXT_PAGE_CSR_CNTL_18@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$16, %r12d
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_phy_base_write
	movq	_MSCC_EXT_PAGE_CSR_CNTL_19@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MSCC_PHY_CSR_CNTL_19_CMD@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_MSCC_PHY_CSR_CNTL_19_REG_ADDR
	movl	%eax, %ebx
	andl	$3, %r14d
	movl	%r14d, %edi
	callq	_MSCC_PHY_CSR_CNTL_19_TARGET
	orl	%eax, %ebx
	orl	%r15d, %ebx
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_phy_base_write
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movq	_PROC_CMD_NCOMPLETED_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r14
	addq	%rbx, %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movq	_MSCC_EXT_PAGE_CSR_CNTL_19@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_phy_base_read
	movl	%eax, %ebx
	movq	(%r15), %rdi
	movq	%r14, %rsi
	callq	_time_before
	movl	(%r12), %ecx
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ecx, %eax
	andl	%ebx, %eax
	je	LBB0_1
LBB0_3:
	testl	%ebx, %ecx
	je	LBB0_4
## %bb.5:
	movq	_MSCC_EXT_PAGE_ACCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSCC_PHY_PAGE_STANDARD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_phy_base_write
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSCC_EXT_PAGE_ACCESS,4,2       ## @MSCC_EXT_PAGE_ACCESS
	.comm	_MSCC_PHY_PAGE_CSR_CNTL,4,2     ## @MSCC_PHY_PAGE_CSR_CNTL
	.comm	_MSCC_EXT_PAGE_CSR_CNTL_20,4,2  ## @MSCC_EXT_PAGE_CSR_CNTL_20
	.comm	_MSCC_EXT_PAGE_CSR_CNTL_17,4,2  ## @MSCC_EXT_PAGE_CSR_CNTL_17
	.comm	_MSCC_EXT_PAGE_CSR_CNTL_18,4,2  ## @MSCC_EXT_PAGE_CSR_CNTL_18
	.comm	_MSCC_EXT_PAGE_CSR_CNTL_19,4,2  ## @MSCC_EXT_PAGE_CSR_CNTL_19
	.comm	_MSCC_PHY_CSR_CNTL_19_CMD,4,2   ## @MSCC_PHY_CSR_CNTL_19_CMD
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_PROC_CMD_NCOMPLETED_TIMEOUT_MS,4,2 ## @PROC_CMD_NCOMPLETED_TIMEOUT_MS
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_MSCC_PHY_PAGE_STANDARD,4,2     ## @MSCC_PHY_PAGE_STANDARD
	.no_dead_strip	_vsc85xx_csr_ctrl_phy_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vsc85xx_csr_ctrl_phy_write
_vsc85xx_csr_ctrl_phy_write:            ; @vsc85xx_csr_ctrl_phy_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _MSCC_EXT_PAGE_ACCESS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MSCC_EXT_PAGE_ACCESS@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh2:
	adrp	x8, _MSCC_PHY_PAGE_CSR_CNTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSCC_PHY_PAGE_CSR_CNTL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_phy_base_write
Lloh5:
	adrp	x8, _MSCC_EXT_PAGE_CSR_CNTL_20@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSCC_EXT_PAGE_CSR_CNTL_20@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	asr	w0, w22, #2
	bl	_MSCC_PHY_CSR_CNTL_20_TARGET
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_phy_base_write
Lloh8:
	adrp	x8, _MSCC_EXT_PAGE_CSR_CNTL_17@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSCC_EXT_PAGE_CSR_CNTL_17@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_phy_base_write
Lloh11:
	adrp	x8, _MSCC_EXT_PAGE_CSR_CNTL_18@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSCC_EXT_PAGE_CSR_CNTL_18@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	asr	w2, w20, #16
	mov	x0, x19
	bl	_phy_base_write
Lloh14:
	adrp	x23, _MSCC_EXT_PAGE_CSR_CNTL_19@GOTPAGE
Lloh15:
	ldr	x23, [x23, _MSCC_EXT_PAGE_CSR_CNTL_19@GOTPAGEOFF]
	ldr	w20, [x23]
Lloh16:
	adrp	x25, _MSCC_PHY_CSR_CNTL_19_CMD@GOTPAGE
Lloh17:
	ldr	x25, [x25, _MSCC_PHY_CSR_CNTL_19_CMD@GOTPAGEOFF]
	ldr	w26, [x25]
	mov	x0, x21
	bl	_MSCC_PHY_CSR_CNTL_19_REG_ADDR
	orr	w21, w0, w26
	and	w0, w22, #0x3
	bl	_MSCC_PHY_CSR_CNTL_19_TARGET
	orr	w2, w21, w0
	mov	x0, x19
	mov	x1, x20
	bl	_phy_base_write
Lloh18:
	adrp	x22, _jiffies@GOTPAGE
Lloh19:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x20, [x22]
Lloh20:
	adrp	x8, _PROC_CMD_NCOMPLETED_TIMEOUT_MS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PROC_CMD_NCOMPLETED_TIMEOUT_MS@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x20, x0, x20
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w1, [x23]
	mov	x0, x19
	bl	_phy_base_read
	mov	x21, x0
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_before
	ldr	w8, [x25]
	and	w9, w8, w21
	cmp	x0, #0
	ccmp	w9, #0, #0, ne
	b.eq	LBB0_1
; %bb.2:
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
	ldr	w1, [x24]
Lloh23:
	adrp	x8, _MSCC_PHY_PAGE_STANDARD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSCC_PHY_PAGE_STANDARD@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_phy_base_write
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh26:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MSCC_EXT_PAGE_ACCESS,4,2       ; @MSCC_EXT_PAGE_ACCESS
	.comm	_MSCC_PHY_PAGE_CSR_CNTL,4,2     ; @MSCC_PHY_PAGE_CSR_CNTL
	.comm	_MSCC_EXT_PAGE_CSR_CNTL_20,4,2  ; @MSCC_EXT_PAGE_CSR_CNTL_20
	.comm	_MSCC_EXT_PAGE_CSR_CNTL_17,4,2  ; @MSCC_EXT_PAGE_CSR_CNTL_17
	.comm	_MSCC_EXT_PAGE_CSR_CNTL_18,4,2  ; @MSCC_EXT_PAGE_CSR_CNTL_18
	.comm	_MSCC_EXT_PAGE_CSR_CNTL_19,4,2  ; @MSCC_EXT_PAGE_CSR_CNTL_19
	.comm	_MSCC_PHY_CSR_CNTL_19_CMD,4,2   ; @MSCC_PHY_CSR_CNTL_19_CMD
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_PROC_CMD_NCOMPLETED_TIMEOUT_MS,4,2 ; @PROC_CMD_NCOMPLETED_TIMEOUT_MS
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_MSCC_PHY_PAGE_STANDARD,4,2     ; @MSCC_PHY_PAGE_STANDARD
	.no_dead_strip	_vsc85xx_csr_ctrl_phy_write
.subsections_via_symbols
