	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi3660_phy_init
_hi3660_phy_init:                       ## @hi3660_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_phy_get_drvdata
	movq	%rax, %r14
	movl	12(%rax), %edi
	movq	_PERI_CRG_ISODIS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_USB_REFCLK_ISO_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	_USB_TCXO_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PCTRL_PERI_CTRL3_MSK_START@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%eax, %edx
	shll	%cl, %edx
	orl	%eax, %edx
	movl	16(%r14), %edi
	movq	_PCTRL_PERI_CTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movq	_IP_RST_USB3OTGPHY_POR@GOTPCREL(%rip), %r15
	movq	_IP_RST_USB3OTG@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	(%r15), %edx
	movl	12(%r14), %edi
	movq	_PERI_CRG_RSTEN4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movq	_SC_USB3PHY_ABB_GT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	8(%r14), %edi
	movq	_USBOTG3_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movq	_REF_SSP_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	8(%r14), %edi
	movq	_USBOTG3_CTRL7@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	_USBOTG3CTRL2_POWERDOWN_HSP@GOTPCREL(%rip), %rax
	movq	_USBOTG3CTRL2_POWERDOWN_SSP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	8(%r14), %edi
	movq	_USBOTG3_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movl	$100, %edi
	movl	$120, %esi
	callq	_usleep_range
	movl	(%r12), %edx
	orl	(%r15), %edx
	movl	12(%r14), %edi
	movq	_PERI_CRG_RSTDIS4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movq	_USBOTG3_CTRL3_VBUSVLDEXT@GOTPCREL(%rip), %rax
	movq	_USBOTG3_CTRL3_VBUSVLDEXTSEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	8(%r14), %edi
	movq	_USBOTG3_CTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movl	$100, %edi
	movl	$120, %esi
	callq	_usleep_range
	movl	(%r14), %edx
	movl	8(%r14), %edi
	movq	_USBOTG3_CTRL4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_PERI_CRG_ISODIS,4,2            ## @PERI_CRG_ISODIS
	.comm	_USB_REFCLK_ISO_EN,4,2          ## @USB_REFCLK_ISO_EN
	.comm	_USB_TCXO_EN,4,2                ## @USB_TCXO_EN
	.comm	_PCTRL_PERI_CTRL3_MSK_START,4,2 ## @PCTRL_PERI_CTRL3_MSK_START
	.comm	_PCTRL_PERI_CTRL3,4,2           ## @PCTRL_PERI_CTRL3
	.comm	_IP_RST_USB3OTGPHY_POR,4,2      ## @IP_RST_USB3OTGPHY_POR
	.comm	_IP_RST_USB3OTG,4,2             ## @IP_RST_USB3OTG
	.comm	_PERI_CRG_RSTEN4,4,2            ## @PERI_CRG_RSTEN4
	.comm	_SC_USB3PHY_ABB_GT_EN,4,2       ## @SC_USB3PHY_ABB_GT_EN
	.comm	_USBOTG3_CTRL0,4,2              ## @USBOTG3_CTRL0
	.comm	_REF_SSP_EN,4,2                 ## @REF_SSP_EN
	.comm	_USBOTG3_CTRL7,4,2              ## @USBOTG3_CTRL7
	.comm	_USBOTG3CTRL2_POWERDOWN_HSP,4,2 ## @USBOTG3CTRL2_POWERDOWN_HSP
	.comm	_USBOTG3CTRL2_POWERDOWN_SSP,4,2 ## @USBOTG3CTRL2_POWERDOWN_SSP
	.comm	_USBOTG3_CTRL2,4,2              ## @USBOTG3_CTRL2
	.comm	_PERI_CRG_RSTDIS4,4,2           ## @PERI_CRG_RSTDIS4
	.comm	_USBOTG3_CTRL3_VBUSVLDEXT,4,2   ## @USBOTG3_CTRL3_VBUSVLDEXT
	.comm	_USBOTG3_CTRL3_VBUSVLDEXTSEL,4,2 ## @USBOTG3_CTRL3_VBUSVLDEXTSEL
	.comm	_USBOTG3_CTRL3,4,2              ## @USBOTG3_CTRL3
	.comm	_USBOTG3_CTRL4,4,2              ## @USBOTG3_CTRL4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to init phy ret: %d\n"

	.no_dead_strip	_hi3660_phy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hi3660_phy_init
_hi3660_phy_init:                       ; @hi3660_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
	bl	_phy_get_drvdata
	mov	x19, x0
	ldr	w0, [x0, #12]
Lloh0:
	adrp	x8, _PERI_CRG_ISODIS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PERI_CRG_ISODIS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _USB_REFCLK_ISO_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_REFCLK_ISO_EN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.1:
Lloh6:
	adrp	x8, _USB_TCXO_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _USB_TCXO_EN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PCTRL_PERI_CTRL3_MSK_START@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PCTRL_PERI_CTRL3_MSK_START@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsl	w9, w8, w9
	orr	w2, w9, w8
	ldr	w0, [x19, #16]
Lloh12:
	adrp	x8, _PCTRL_PERI_CTRL3@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCTRL_PERI_CTRL3@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.2:
Lloh15:
	adrp	x21, _IP_RST_USB3OTGPHY_POR@GOTPAGE
Lloh16:
	ldr	x21, [x21, _IP_RST_USB3OTGPHY_POR@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh17:
	adrp	x22, _IP_RST_USB3OTG@GOTPAGE
Lloh18:
	ldr	x22, [x22, _IP_RST_USB3OTG@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w2, w9, w8
	ldr	w0, [x19, #12]
Lloh19:
	adrp	x8, _PERI_CRG_RSTEN4@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PERI_CRG_RSTEN4@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.3:
Lloh22:
	adrp	x8, _SC_USB3PHY_ABB_GT_EN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SC_USB3PHY_ABB_GT_EN@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	ldr	w0, [x19, #8]
Lloh25:
	adrp	x8, _USBOTG3_CTRL0@GOTPAGE
Lloh26:
	ldr	x8, [x8, _USBOTG3_CTRL0@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.4:
Lloh28:
	adrp	x8, _REF_SSP_EN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _REF_SSP_EN@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	w0, [x19, #8]
Lloh31:
	adrp	x8, _USBOTG3_CTRL7@GOTPAGE
Lloh32:
	ldr	x8, [x8, _USBOTG3_CTRL7@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.5:
Lloh34:
	adrp	x8, _USBOTG3CTRL2_POWERDOWN_HSP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _USBOTG3CTRL2_POWERDOWN_HSP@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _USBOTG3CTRL2_POWERDOWN_SSP@GOTPAGE
Lloh38:
	ldr	x9, [x9, _USBOTG3CTRL2_POWERDOWN_SSP@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w2, w9, w8
	ldr	w0, [x19, #8]
Lloh40:
	adrp	x8, _USBOTG3_CTRL2@GOTPAGE
Lloh41:
	ldr	x8, [x8, _USBOTG3_CTRL2@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	mov	w3, #0
	bl	_regmap_update_bits
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.6:
	mov	w0, #100
	mov	w1, #120
	bl	_usleep_range
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w2, w9, w8
	ldr	w0, [x19, #12]
Lloh43:
	adrp	x8, _PERI_CRG_RSTDIS4@GOTPAGE
Lloh44:
	ldr	x8, [x8, _PERI_CRG_RSTDIS4@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.7:
	mov	w0, #10000
	mov	w1, #15000
	bl	_usleep_range
Lloh46:
	adrp	x8, _USBOTG3_CTRL3_VBUSVLDEXT@GOTPAGE
Lloh47:
	ldr	x8, [x8, _USBOTG3_CTRL3_VBUSVLDEXT@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
Lloh49:
	adrp	x9, _USBOTG3_CTRL3_VBUSVLDEXTSEL@GOTPAGE
Lloh50:
	ldr	x9, [x9, _USBOTG3_CTRL3_VBUSVLDEXTSEL@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x9]
	orr	w2, w9, w8
	ldr	w0, [x19, #8]
Lloh52:
	adrp	x8, _USBOTG3_CTRL3@GOTPAGE
Lloh53:
	ldr	x8, [x8, _USBOTG3_CTRL3@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.8:
	mov	w0, #100
	mov	w1, #120
	bl	_usleep_range
	ldr	w0, [x19, #8]
Lloh55:
	adrp	x8, _USBOTG3_CTRL4@GOTPAGE
Lloh56:
	ldr	x8, [x8, _USBOTG3_CTRL4@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bl	_regmap_write
	mov	x20, x0
	cbz	w0, LBB0_10
LBB0_9:
	ldr	w0, [x19, #4]
Lloh58:
	adrp	x1, l_.str@PAGE
Lloh59:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_10:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_PERI_CRG_ISODIS,4,2            ; @PERI_CRG_ISODIS
	.comm	_USB_REFCLK_ISO_EN,4,2          ; @USB_REFCLK_ISO_EN
	.comm	_USB_TCXO_EN,4,2                ; @USB_TCXO_EN
	.comm	_PCTRL_PERI_CTRL3_MSK_START,4,2 ; @PCTRL_PERI_CTRL3_MSK_START
	.comm	_PCTRL_PERI_CTRL3,4,2           ; @PCTRL_PERI_CTRL3
	.comm	_IP_RST_USB3OTGPHY_POR,4,2      ; @IP_RST_USB3OTGPHY_POR
	.comm	_IP_RST_USB3OTG,4,2             ; @IP_RST_USB3OTG
	.comm	_PERI_CRG_RSTEN4,4,2            ; @PERI_CRG_RSTEN4
	.comm	_SC_USB3PHY_ABB_GT_EN,4,2       ; @SC_USB3PHY_ABB_GT_EN
	.comm	_USBOTG3_CTRL0,4,2              ; @USBOTG3_CTRL0
	.comm	_REF_SSP_EN,4,2                 ; @REF_SSP_EN
	.comm	_USBOTG3_CTRL7,4,2              ; @USBOTG3_CTRL7
	.comm	_USBOTG3CTRL2_POWERDOWN_HSP,4,2 ; @USBOTG3CTRL2_POWERDOWN_HSP
	.comm	_USBOTG3CTRL2_POWERDOWN_SSP,4,2 ; @USBOTG3CTRL2_POWERDOWN_SSP
	.comm	_USBOTG3_CTRL2,4,2              ; @USBOTG3_CTRL2
	.comm	_PERI_CRG_RSTDIS4,4,2           ; @PERI_CRG_RSTDIS4
	.comm	_USBOTG3_CTRL3_VBUSVLDEXT,4,2   ; @USBOTG3_CTRL3_VBUSVLDEXT
	.comm	_USBOTG3_CTRL3_VBUSVLDEXTSEL,4,2 ; @USBOTG3_CTRL3_VBUSVLDEXTSEL
	.comm	_USBOTG3_CTRL3,4,2              ; @USBOTG3_CTRL3
	.comm	_USBOTG3_CTRL4,4,2              ; @USBOTG3_CTRL4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to init phy ret: %d\n"

	.no_dead_strip	_hi3660_phy_init
.subsections_via_symbols
