	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uniphier_u3hsphy_init
_uniphier_u3hsphy_init:                 ## @uniphier_u3hsphy_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_phy_get_drvdata
	movq	%rax, %r14
	movl	(%rax), %edi
	callq	_clk_prepare_enable
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	4(%r14), %edi
	callq	_reset_control_deassert
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_2
LBB0_8:
	movl	(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_9
LBB0_2:
	movq	8(%r14), %rax
	movq	16(%rax), %r15
	movq	24(%rax), %rax
	xorl	%r13d, %r13d
	movq	%rax, %rcx
	orq	%r15, %rcx
	jne	LBB0_3
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_uniphier_u3hsphy_update_config
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:
	movl	%eax, %r12d
	movl	4(%r14), %edi
	callq	_reset_control_assert
	movl	%r12d, %r13d
	jmp	LBB0_8
LBB0_4:
	movq	-48(%rbp), %rdi
	movq	_HSPHY_CFG0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r14), %rsi
	callq	_writel
	movq	_HSPHY_CFG1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r14), %rsi
	movq	%r15, %rdi
	callq	_writel
	movq	8(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_9
## %bb.5:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rsi
	addq	%r15, %rsi
	movq	%r14, %rdi
	callq	_uniphier_u3hsphy_set_param
	incq	%rbx
	movq	8(%r14), %rax
	movslq	(%rax), %rcx
	addq	$4, %r15
	cmpq	%rcx, %rbx
	jl	LBB0_6
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_HSPHY_CFG0,8,3                 ## @HSPHY_CFG0
	.comm	_HSPHY_CFG1,8,3                 ## @HSPHY_CFG1
	.no_dead_strip	_uniphier_u3hsphy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uniphier_u3hsphy_init
_uniphier_u3hsphy_init:                 ; @uniphier_u3hsphy_init
	.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
	bl	_phy_get_drvdata
	mov	x19, x0
	ldr	w0, [x0]
	bl	_clk_prepare_enable
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x19, #4]
	bl	_reset_control_deassert
	mov	x20, x0
	cbz	w0, LBB0_3
LBB0_2:
	ldr	w0, [x19]
	bl	_clk_disable_unprepare
	b	LBB0_5
LBB0_3:
	ldr	x9, [x19, #8]
	ldp	x21, x8, [x9, #16]
	orr	x9, x8, x21
	cbnz	x9, LBB0_6
LBB0_4:
	mov	w20, #0
LBB0_5:
	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
LBB0_6:
	str	x8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_uniphier_u3hsphy_update_config
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
	ldr	w0, [x19, #4]
	bl	_reset_control_assert
	b	LBB0_2
LBB0_8:
	ldr	x0, [sp, #8]
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _HSPHY_CFG0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HSPHY_CFG0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _HSPHY_CFG1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HSPHY_CFG1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.9:
	mov	x21, #0
	mov	x22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #8]
	add	x1, x8, x21
	mov	x0, x19
	bl	_uniphier_u3hsphy_set_param
	mov	w20, #0
	add	x22, x22, #1
	ldr	x8, [x19, #8]
	ldrsw	x9, [x8]
	add	x21, x21, #4
	cmp	x22, x9
	b.lt	LBB0_10
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HSPHY_CFG0,8,3                 ; @HSPHY_CFG0
	.comm	_HSPHY_CFG1,8,3                 ; @HSPHY_CFG1
	.no_dead_strip	_uniphier_u3hsphy_init
.subsections_via_symbols
