	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_phy_xlate
_mtk_phy_xlate:                         ## @mtk_phy_xlate
	.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	%rsi, %r12
	movq	%rdi, %r15
	callq	_dev_get_drvdata
	cmpl	$1, (%r12)
	jne	LBB0_3
## %bb.1:
	movq	%rax, %r14
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.2:
	movq	16(%r12), %rcx
	movq	16(%r14), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rbx
	movq	8(%rbx), %rdi
	cmpq	(%rdi), %rcx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_7
LBB0_18:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rsi
LBB0_4:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movq	8(%r12), %rax
	movq	(%rax), %rdx
	movq	%rdx, (%rbx)
	movq	_PHY_TYPE_USB2@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
## %bb.9:
	movq	_PHY_TYPE_USB3@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
## %bb.10:
	movq	_PHY_TYPE_PCIE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
## %bb.11:
	movq	_PHY_TYPE_SATA@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_13:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	_MTK_PHY_V1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_phy_v1_banks_init
	jmp	LBB0_17
LBB0_15:
	movq	_MTK_PHY_V2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.16:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_phy_v2_banks_init
LBB0_17:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_phy_parse_property
	movq	8(%rbx), %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid number of cells in 'phy' property\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"failed to find appropriate phy\n"

	.comm	_PHY_TYPE_USB2,8,3              ## @PHY_TYPE_USB2
	.comm	_PHY_TYPE_USB3,8,3              ## @PHY_TYPE_USB3
	.comm	_PHY_TYPE_PCIE,8,3              ## @PHY_TYPE_PCIE
	.comm	_PHY_TYPE_SATA,8,3              ## @PHY_TYPE_SATA
L_.str.2:                               ## @.str.2
	.asciz	"unsupported device type: %d\n"

	.comm	_MTK_PHY_V1,8,3                 ## @MTK_PHY_V1
	.comm	_MTK_PHY_V2,8,3                 ## @MTK_PHY_V2
L_.str.3:                               ## @.str.3
	.asciz	"phy version is not supported\n"

	.no_dead_strip	_mtk_phy_xlate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_phy_xlate
_mtk_phy_xlate:                         ; @mtk_phy_xlate
	.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	x22, x1
	mov	x19, x0
	bl	_dev_get_drvdata
	ldr	w8, [x22]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	ldr	x9, [x22, #16]
	ldr	x10, [x20, #16]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x10]
	ldr	x11, [x21, #8]
	ldr	x11, [x11]
	cmp	x9, x11
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #8
	subs	x8, x8, #1
	b.ne	LBB0_3
LBB0_5:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_8:
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	str	x8, [x21]
Lloh7:
	adrp	x9, _PHY_TYPE_USB2@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PHY_TYPE_USB2@GOTPAGEOFF]
Lloh9:
	adrp	x10, _PHY_TYPE_USB3@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PHY_TYPE_USB3@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	ldr	x10, [x10]
Lloh13:
	adrp	x11, _PHY_TYPE_PCIE@GOTPAGE
Lloh14:
	ldr	x11, [x11, _PHY_TYPE_PCIE@GOTPAGEOFF]
Lloh15:
	adrp	x12, _PHY_TYPE_SATA@GOTPAGE
Lloh16:
	ldr	x12, [x12, _PHY_TYPE_SATA@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
Lloh18:
	ldr	x12, [x12]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	ccmp	x8, x12, #4, ne
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _MTK_PHY_V1@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MTK_PHY_V1@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
	mov	x0, x20
	mov	x1, x21
	bl	_phy_v1_banks_init
	b	LBB0_14
LBB0_11:
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_12:
Lloh24:
	adrp	x9, _MTK_PHY_V2@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MTK_PHY_V2@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x20
	mov	x1, x21
	bl	_phy_v2_banks_init
LBB0_14:
	mov	x0, x20
	mov	x1, x21
	bl	_phy_parse_property
	ldr	x0, [x21, #8]
	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
LBB0_15:
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid number of cells in 'phy' property\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"failed to find appropriate phy\n"

	.comm	_PHY_TYPE_USB2,8,3              ; @PHY_TYPE_USB2
	.comm	_PHY_TYPE_USB3,8,3              ; @PHY_TYPE_USB3
	.comm	_PHY_TYPE_PCIE,8,3              ; @PHY_TYPE_PCIE
	.comm	_PHY_TYPE_SATA,8,3              ; @PHY_TYPE_SATA
l_.str.2:                               ; @.str.2
	.asciz	"unsupported device type: %d\n"

	.comm	_MTK_PHY_V1,8,3                 ; @MTK_PHY_V1
	.comm	_MTK_PHY_V2,8,3                 ; @MTK_PHY_V2
l_.str.3:                               ; @.str.3
	.asciz	"phy version is not supported\n"

	.no_dead_strip	_mtk_phy_xlate
.subsections_via_symbols
