	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvebu_comphy_power_on_legacy
_mvebu_comphy_power_on_legacy:          ## @mvebu_comphy_power_on_legacy
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_phy_get_drvdata
	movq	%rax, %r15
	movq	16(%rax), %r13
	movl	(%rax), %ecx
	movl	4(%rax), %edi
	movl	12(%rax), %esi
	movl	8(%rax), %edx
	callq	_mvebu_comphy_get_mux
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r13), %edi
	movq	_MVEBU_COMPHY_PIPE_SELECTOR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movl	4(%r15), %edi
	callq	_MVEBU_COMPHY_PIPE_SELECTOR_PIPE
	movl	$15, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	$15, %r12d
	movl	%edx, -44(%rbp)
	movl	8(%r13), %edi
	movl	(%rbx), %esi
	callq	_regmap_write
	movl	8(%r13), %edi
	movq	_MVEBU_COMPHY_SELECTOR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movl	4(%r15), %edi
	callq	_MVEBU_COMPHY_SELECTOR_PHY
	movl	%eax, %ecx
	shll	%cl, %r12d
	notl	%r12d
	andl	%r12d, -44(%rbp)
	movl	4(%r15), %edi
	callq	_MVEBU_COMPHY_SELECTOR_PHY
	movl	%eax, %ecx
	shll	%cl, %r14d
	orl	-44(%rbp), %r14d
	movl	%r14d, -44(%rbp)
	movl	8(%r13), %edi
	movl	(%rbx), %esi
	movl	%r14d, %edx
	callq	_regmap_write
	movl	(%r15), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_1
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mvebu_comphy_set_mode_sgmii
	jmp	LBB0_7
LBB0_1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_4:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mvebu_comphy_set_mode_rxaui
	jmp	LBB0_7
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mvebu_comphy_set_mode_10gkr
LBB0_7:
	movl	%eax, %r14d
	movq	(%r13), %rbx
	movl	4(%r15), %edi
	callq	_MVEBU_COMPHY_SERDES_CFG1
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_MVEBU_COMPHY_SERDES_CFG1_RF_RESET@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, -44(%rbp)
	movq	(%r13), %r12
	movl	4(%r15), %edi
	callq	_MVEBU_COMPHY_SERDES_CFG1
	addq	%rax, %r12
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_writel
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_MVEBU_COMPHY_PIPE_SELECTOR,4,2 ## @MVEBU_COMPHY_PIPE_SELECTOR
	.comm	_MVEBU_COMPHY_SELECTOR,4,2      ## @MVEBU_COMPHY_SELECTOR
	.comm	_MVEBU_COMPHY_SERDES_CFG1_RF_RESET,4,2 ## @MVEBU_COMPHY_SERDES_CFG1_RF_RESET
	.no_dead_strip	_mvebu_comphy_power_on_legacy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvebu_comphy_power_on_legacy
_mvebu_comphy_power_on_legacy:          ; @mvebu_comphy_power_on_legacy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
	bl	_phy_get_drvdata
	mov	x19, x0
	ldr	x22, [x0, #16]
	ldp	w2, w1, [x0, #8]
	ldr	w0, [x0, #4]
	ldr	w3, [x19]
	bl	_mvebu_comphy_get_mux
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	w0, [x22, #8]
Lloh0:
	adrp	x23, _MVEBU_COMPHY_PIPE_SELECTOR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MVEBU_COMPHY_PIPE_SELECTOR@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w0, [x19, #4]
	bl	_MVEBU_COMPHY_PIPE_SELECTOR_PIPE
	mov	w24, #15
	lsl	w8, w24, w0
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w0, [x22, #8]
	ldr	w1, [x23]
	bl	_regmap_write
	ldr	w0, [x22, #8]
Lloh2:
	adrp	x23, _MVEBU_COMPHY_SELECTOR@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MVEBU_COMPHY_SELECTOR@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w0, [x19, #4]
	bl	_MVEBU_COMPHY_SELECTOR_PHY
	lsl	w8, w24, w0
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w0, [x19, #4]
	bl	_MVEBU_COMPHY_SELECTOR_PHY
	lsl	w8, w21, w0
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w0, [x22, #8]
	ldr	w1, [x23]
	bl	_regmap_write
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.2:
Lloh4:
	adrp	x9, lJTI0_0@PAGE
Lloh5:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	mov	x0, x20
	bl	_mvebu_comphy_set_mode_sgmii
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_mvebu_comphy_set_mode_rxaui
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_mvebu_comphy_set_mode_10gkr
LBB0_7:
	mov	x20, x0
	ldr	x21, [x22]
	ldr	w0, [x19, #4]
	bl	_MVEBU_COMPHY_SERDES_CFG1
	add	x0, x0, x21
	bl	_readl
Lloh9:
	adrp	x8, _MVEBU_COMPHY_SERDES_CFG1_RF_RESET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MVEBU_COMPHY_SERDES_CFG1_RF_RESET@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w21, w8, w0
	str	w21, [sp, #12]
	ldr	x22, [x22]
	ldr	w0, [x19, #4]
	bl	_MVEBU_COMPHY_SERDES_CFG1
	add	x1, x0, x22
	mov	x0, x21
	bl	_writel
LBB0_8:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_MVEBU_COMPHY_PIPE_SELECTOR,4,2 ; @MVEBU_COMPHY_PIPE_SELECTOR
	.comm	_MVEBU_COMPHY_SELECTOR,4,2      ; @MVEBU_COMPHY_SELECTOR
	.comm	_MVEBU_COMPHY_SERDES_CFG1_RF_RESET,4,2 ; @MVEBU_COMPHY_SERDES_CFG1_RF_RESET
	.no_dead_strip	_mvebu_comphy_power_on_legacy
.subsections_via_symbols
