	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi6220_phy_setup
_hi6220_phy_setup:                      ## @hi6220_phy_setup
	.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, %r14
	movq	8(%rdi), %r15
	testl	%esi, %esi
	je	LBB0_6
## %bb.1:
	movq	_CTRL5_USBOTG_RES_SEL@GOTPCREL(%rip), %rax
	movq	_CTRL5_PICOPHY_ACAENB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_CTRL5_PICOPHY_BC_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%ecx, %edx
	movq	_SC_PERIPH_CTRL5@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movq	_CTRL4_PICO_VBUSVLDEXT@GOTPCREL(%rip), %rax
	movq	_CTRL4_PICO_VBUSVLDEXTSEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_CTRL4_OTG_PHY_SEL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_CTRL4_PICO_SIDDQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%ecx, %edx
	movq	_CTRL4_PICO_OGDISABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_SC_PERIPH_CTRL4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_regmap_update_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_SC_PERIPH_CTRL8@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EYE_PATTERN_PARA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_regmap_write
	jmp	LBB0_4
LBB0_6:
	movq	_CTRL4_PICO_SIDDQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SC_PERIPH_CTRL4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_regmap_update_bits
LBB0_4:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_7:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_CTRL5_USBOTG_RES_SEL,4,2       ## @CTRL5_USBOTG_RES_SEL
	.comm	_CTRL5_PICOPHY_ACAENB,4,2       ## @CTRL5_PICOPHY_ACAENB
	.comm	_CTRL5_PICOPHY_BC_MODE,4,2      ## @CTRL5_PICOPHY_BC_MODE
	.comm	_SC_PERIPH_CTRL5,4,2            ## @SC_PERIPH_CTRL5
	.comm	_CTRL4_PICO_VBUSVLDEXT,4,2      ## @CTRL4_PICO_VBUSVLDEXT
	.comm	_CTRL4_PICO_VBUSVLDEXTSEL,4,2   ## @CTRL4_PICO_VBUSVLDEXTSEL
	.comm	_CTRL4_OTG_PHY_SEL,4,2          ## @CTRL4_OTG_PHY_SEL
	.comm	_CTRL4_PICO_SIDDQ,4,2           ## @CTRL4_PICO_SIDDQ
	.comm	_CTRL4_PICO_OGDISABLE,4,2       ## @CTRL4_PICO_OGDISABLE
	.comm	_SC_PERIPH_CTRL4,4,2            ## @SC_PERIPH_CTRL4
	.comm	_SC_PERIPH_CTRL8,4,2            ## @SC_PERIPH_CTRL8
	.comm	_EYE_PATTERN_PARA,4,2           ## @EYE_PATTERN_PARA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to setup phy ret: %d\n"

	.no_dead_strip	_hi6220_phy_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hi6220_phy_setup
_hi6220_phy_setup:                      ; @hi6220_phy_setup
	.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	x19, x0
	ldr	x20, [x0, #8]
	cbz	w1, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _CTRL5_USBOTG_RES_SEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTRL5_USBOTG_RES_SEL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CTRL5_PICOPHY_ACAENB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CTRL5_PICOPHY_ACAENB@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _CTRL5_PICOPHY_BC_MODE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CTRL5_PICOPHY_BC_MODE@GOTPAGEOFF]
	orr	w3, w9, w8
Lloh8:
	ldr	w8, [x10]
	orr	w2, w3, w8
Lloh9:
	adrp	x8, _SC_PERIPH_CTRL5@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SC_PERIPH_CTRL5@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_regmap_update_bits
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.2:
Lloh12:
	adrp	x8, _CTRL4_PICO_VBUSVLDEXT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CTRL4_PICO_VBUSVLDEXT@GOTPAGEOFF]
Lloh14:
	adrp	x9, _CTRL4_PICO_VBUSVLDEXTSEL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CTRL4_PICO_VBUSVLDEXTSEL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _CTRL4_OTG_PHY_SEL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CTRL4_OTG_PHY_SEL@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w3, w8, w9
Lloh21:
	adrp	x8, _CTRL4_PICO_SIDDQ@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CTRL4_PICO_SIDDQ@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _CTRL4_PICO_OGDISABLE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _CTRL4_PICO_OGDISABLE@GOTPAGEOFF]
	orr	w8, w3, w8
Lloh26:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh27:
	adrp	x8, _SC_PERIPH_CTRL4@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SC_PERIPH_CTRL4@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_regmap_update_bits
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
Lloh30:
	adrp	x8, _SC_PERIPH_CTRL8@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SC_PERIPH_CTRL8@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x8, _EYE_PATTERN_PARA@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EYE_PATTERN_PARA@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_regmap_write
	mov	x21, x0
	cbnz	w0, LBB0_5
	b	LBB0_6
LBB0_4:
Lloh36:
	adrp	x8, _CTRL4_PICO_SIDDQ@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CTRL4_PICO_SIDDQ@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
Lloh39:
	adrp	x8, _SC_PERIPH_CTRL4@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SC_PERIPH_CTRL4@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x3, x2
	bl	_regmap_update_bits
	mov	x21, x0
	cbz	w0, LBB0_6
LBB0_5:
	ldr	w0, [x19]
Lloh42:
	adrp	x1, l_.str@PAGE
Lloh43:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_CTRL5_USBOTG_RES_SEL,4,2       ; @CTRL5_USBOTG_RES_SEL
	.comm	_CTRL5_PICOPHY_ACAENB,4,2       ; @CTRL5_PICOPHY_ACAENB
	.comm	_CTRL5_PICOPHY_BC_MODE,4,2      ; @CTRL5_PICOPHY_BC_MODE
	.comm	_SC_PERIPH_CTRL5,4,2            ; @SC_PERIPH_CTRL5
	.comm	_CTRL4_PICO_VBUSVLDEXT,4,2      ; @CTRL4_PICO_VBUSVLDEXT
	.comm	_CTRL4_PICO_VBUSVLDEXTSEL,4,2   ; @CTRL4_PICO_VBUSVLDEXTSEL
	.comm	_CTRL4_OTG_PHY_SEL,4,2          ; @CTRL4_OTG_PHY_SEL
	.comm	_CTRL4_PICO_SIDDQ,4,2           ; @CTRL4_PICO_SIDDQ
	.comm	_CTRL4_PICO_OGDISABLE,4,2       ; @CTRL4_PICO_OGDISABLE
	.comm	_SC_PERIPH_CTRL4,4,2            ; @SC_PERIPH_CTRL4
	.comm	_SC_PERIPH_CTRL8,4,2            ; @SC_PERIPH_CTRL8
	.comm	_EYE_PATTERN_PARA,4,2           ; @EYE_PATTERN_PARA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to setup phy ret: %d\n"

	.no_dead_strip	_hi6220_phy_setup
.subsections_via_symbols
