	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_phy_init
_mtk_phy_init:                          ## @mtk_phy_init
	.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, %rbx
	callq	_phy_get_drvdata
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movl	4(%rax), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_2:
	movl	4(%r14), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	callq	_dev_err
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_9
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_u3_phy_instance_init
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_9:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_10:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_u2_phy_instance_init
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_u2_phy_props_set
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_11:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_sata_phy_instance_init
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_pcie_phy_instance_init
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable u3phya_ref\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to enable ref_clk\n"

L_.str.2:                               ## @.str.2
	.asciz	"incompatible PHY type\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mtk_phy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_phy_init
_mtk_phy_init:                          ; @mtk_phy_init
	.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	x20, x0
	bl	_phy_get_drvdata
	mov	x19, x0
	ldr	w0, [x20]
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_6
; %bb.3:
	mov	x21, x0
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	bl	_dev_err
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_9
; %bb.7:
Lloh4:
	adrp	x9, lJTI0_0@PAGE
Lloh5:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_u3_phy_instance_init
	mov	w21, #0
	b	LBB0_5
LBB0_9:
	ldr	w0, [x20]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	bl	_u2_phy_instance_init
	mov	x0, x20
	mov	x1, x19
	bl	_u2_phy_props_set
	mov	w21, #0
	b	LBB0_5
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	bl	_sata_phy_instance_init
	mov	w21, #0
	b	LBB0_5
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_pcie_phy_instance_init
	mov	w21, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_10-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
	.byte	(LBB0_12-LBB0_8)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable u3phya_ref\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to enable ref_clk\n"

l_.str.2:                               ; @.str.2
	.asciz	"incompatible PHY type\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mtk_phy_init
.subsections_via_symbols
