	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvebu_a3700_comphy_power_on
_mvebu_a3700_comphy_power_on:           ## @mvebu_a3700_comphy_power_on
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_phy_get_drvdata
	movq	%rax, %rbx
	movl	(%rax), %edx
	movl	8(%rax), %edi
	movl	12(%rax), %esi
	movl	16(%rax), %ecx
	callq	_mvebu_a3700_comphy_get_fw_mode
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%rbx), %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	ja	LBB0_14
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movl	4(%rbx), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_1:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_18
LBB0_6:
	movl	4(%rbx), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
LBB0_5:
	callq	_dev_dbg
	movl	%r14d, %edi
	callq	_COMPHY_FW_MODE
	jmp	LBB0_16
LBB0_15:
	movl	4(%rbx), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_dbg
	movl	12(%rbx), %esi
	movq	_COMPHY_FW_SPEED_5G@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movl	%r14d, %edi
	callq	_COMPHY_FW_PCIE
	jmp	LBB0_16
LBB0_7:
	movl	16(%rbx), %edx
	cmpl	$133, %edx
	je	LBB0_11
## %bb.8:
	cmpl	$132, %edx
	jne	LBB0_12
## %bb.9:
	movl	4(%rbx), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_dbg
	movl	12(%rbx), %esi
	movq	_COMPHY_FW_SPEED_1_25G@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_14:
	movl	4(%rbx), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%r14d, %r14d
                                        ## kill: def $edx killed $edx killed $rdx
	jmp	LBB0_13
LBB0_11:
	movl	4(%rbx), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_dbg
	movl	12(%rbx), %esi
	movq	_COMPHY_FW_SPEED_3_125G@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_COMPHY_FW_NET
LBB0_16:
	movq	_COMPHY_SIP_POWER_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	8(%rbx), %esi
	movl	%eax, %edx
	callq	_mvebu_a3700_comphy_smc
	movl	%eax, %r14d
	movq	_COMPHY_FW_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_19
## %bb.17:
	movl	4(%rbx), %edi
	leaq	L_.str.8(%rip), %rsi
LBB0_18:
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_19
LBB0_12:
	movl	4(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%r14d, %r14d
LBB0_13:
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_15
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid COMPHY mode\n"

L_.str.1:                               ## @.str.1
	.asciz	"set lane %d to USB3 host mode\n"

L_.str.2:                               ## @.str.2
	.asciz	"set lane %d to SATA mode\n"

L_.str.3:                               ## @.str.3
	.asciz	"set lane %d to SGMII mode\n"

	.comm	_COMPHY_FW_SPEED_1_25G,4,2      ## @COMPHY_FW_SPEED_1_25G
L_.str.4:                               ## @.str.4
	.asciz	"set lane %d to HS SGMII mode\n"

	.comm	_COMPHY_FW_SPEED_3_125G,4,2     ## @COMPHY_FW_SPEED_3_125G
L_.str.5:                               ## @.str.5
	.asciz	"unsupported PHY submode (%d)\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
L_.str.6:                               ## @.str.6
	.asciz	"set lane %d to PCIe mode\n"

	.comm	_COMPHY_FW_SPEED_5G,4,2         ## @COMPHY_FW_SPEED_5G
L_.str.7:                               ## @.str.7
	.asciz	"unsupported PHY mode (%d)\n"

	.comm	_COMPHY_SIP_POWER_ON,4,2        ## @COMPHY_SIP_POWER_ON
	.comm	_COMPHY_FW_NOT_SUPPORTED,4,2    ## @COMPHY_FW_NOT_SUPPORTED
L_.str.8:                               ## @.str.8
	.asciz	"unsupported SMC call, try updating your firmware\n"

	.no_dead_strip	_mvebu_a3700_comphy_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvebu_a3700_comphy_power_on
_mvebu_a3700_comphy_power_on:           ; @mvebu_a3700_comphy_power_on
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x0
	bl	_phy_get_drvdata
	mov	x19, x0
	ldr	w0, [x0, #8]
	ldp	w1, w3, [x19, #12]
	ldr	w2, [x19]
	bl	_mvebu_a3700_comphy_get_fw_mode
	mov	x20, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #3
	b.hi	LBB0_11
; %bb.2:
Lloh0:
	adrp	x8, lJTI0_0@PAGE
Lloh1:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	ldp	w0, w2, [x19, #4]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19, #4]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_5:
	ldp	w0, w2, [x19, #4]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	bl	_dev_dbg
	mov	x0, x20
	bl	_COMPHY_FW_MODE
	b	LBB0_14
LBB0_7:
	ldp	w0, w2, [x19, #4]
Lloh8:
	adrp	x1, l_.str.6@PAGE
Lloh9:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
	ldr	w1, [x19, #12]
Lloh10:
	adrp	x8, _COMPHY_FW_SPEED_5G@GOTPAGE
Lloh11:
	ldr	x8, [x8, _COMPHY_FW_SPEED_5G@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	ldr	w3, [x21]
	mov	x0, x20
	bl	_COMPHY_FW_PCIE
	b	LBB0_14
LBB0_8:
	ldr	w8, [x19, #16]
	cmp	w8, #133
	b.eq	LBB0_12
; %bb.9:
	cmp	w8, #132
	b.ne	LBB0_17
; %bb.10:
	ldp	w0, w2, [x19, #4]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	ldr	w1, [x19, #12]
Lloh15:
	adrp	x8, _COMPHY_FW_SPEED_1_25G@GOTPAGE
Lloh16:
	ldr	x8, [x8, _COMPHY_FW_SPEED_1_25G@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
	ldr	w0, [x19, #4]
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.7@PAGE
Lloh18:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_18
LBB0_12:
	ldp	w0, w2, [x19, #4]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
	ldr	w1, [x19, #12]
Lloh21:
	adrp	x8, _COMPHY_FW_SPEED_3_125G@GOTPAGE
Lloh22:
	ldr	x8, [x8, _COMPHY_FW_SPEED_3_125G@GOTPAGEOFF]
LBB0_13:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_COMPHY_FW_NET
LBB0_14:
	mov	x2, x0
Lloh23:
	adrp	x8, _COMPHY_SIP_POWER_ON@GOTPAGE
Lloh24:
	ldr	x8, [x8, _COMPHY_SIP_POWER_ON@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_mvebu_a3700_comphy_smc
	mov	x20, x0
Lloh26:
	adrp	x8, _COMPHY_FW_NOT_SUPPORTED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _COMPHY_FW_NOT_SUPPORTED@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_19
; %bb.15:
	ldr	w0, [x19, #4]
Lloh29:
	adrp	x1, l_.str.8@PAGE
Lloh30:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_16:
	bl	_dev_err
	b	LBB0_19
LBB0_17:
	ldr	w0, [x19, #4]
	str	x8, [sp]
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_18:
	bl	_dev_err
Lloh33:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_19:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid COMPHY mode\n"

l_.str.1:                               ; @.str.1
	.asciz	"set lane %d to USB3 host mode\n"

l_.str.2:                               ; @.str.2
	.asciz	"set lane %d to SATA mode\n"

l_.str.3:                               ; @.str.3
	.asciz	"set lane %d to SGMII mode\n"

	.comm	_COMPHY_FW_SPEED_1_25G,4,2      ; @COMPHY_FW_SPEED_1_25G
l_.str.4:                               ; @.str.4
	.asciz	"set lane %d to HS SGMII mode\n"

	.comm	_COMPHY_FW_SPEED_3_125G,4,2     ; @COMPHY_FW_SPEED_3_125G
l_.str.5:                               ; @.str.5
	.asciz	"unsupported PHY submode (%d)\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
l_.str.6:                               ; @.str.6
	.asciz	"set lane %d to PCIe mode\n"

	.comm	_COMPHY_FW_SPEED_5G,4,2         ; @COMPHY_FW_SPEED_5G
l_.str.7:                               ; @.str.7
	.asciz	"unsupported PHY mode (%d)\n"

	.comm	_COMPHY_SIP_POWER_ON,4,2        ; @COMPHY_SIP_POWER_ON
	.comm	_COMPHY_FW_NOT_SUPPORTED,4,2    ; @COMPHY_FW_NOT_SUPPORTED
l_.str.8:                               ; @.str.8
	.asciz	"unsupported SMC call, try updating your firmware\n"

	.no_dead_strip	_mvebu_a3700_comphy_power_on
.subsections_via_symbols
