	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk_gmac_integrated_phy_powerup
_rk_gmac_integrated_phy_powerup:        ## @rk_gmac_integrated_phy_powerup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_2:
	movl	(%rbx), %edi
	movq	_RK_GRF_MACPHY_CON0@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_RK_MACPHY_CFG_CLK_50M@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	movl	(%rbx), %edi
	movl	(%r14), %esi
	movq	_RK_GMAC2PHY_RMII_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	movl	(%rbx), %edi
	movq	_RK_GRF_MACPHY_CON2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RK_GRF_CON2_MACPHY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	movl	(%rbx), %edi
	movq	_RK_GRF_MACPHY_CON3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RK_GRF_CON3_MACPHY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.3:
	movl	(%rbx), %edi
	movl	(%r14), %esi
	movq	_RK_MACPHY_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_reset_control_assert
LBB0_5:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_reset_control_deassert
LBB0_7:
	movl	$10, %edi
	movl	$20, %esi
	callq	_usleep_range
	movl	(%rbx), %edi
	movl	(%r14), %esi
	movq	_RK_MACPHY_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	movl	$30, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RK_GRF_MACPHY_CON0,4,2         ## @RK_GRF_MACPHY_CON0
	.comm	_RK_MACPHY_CFG_CLK_50M,4,2      ## @RK_MACPHY_CFG_CLK_50M
	.comm	_RK_GMAC2PHY_RMII_MODE,4,2      ## @RK_GMAC2PHY_RMII_MODE
	.comm	_RK_GRF_MACPHY_CON2,4,2         ## @RK_GRF_MACPHY_CON2
	.comm	_RK_GRF_CON2_MACPHY_ID,4,2      ## @RK_GRF_CON2_MACPHY_ID
	.comm	_RK_GRF_MACPHY_CON3,4,2         ## @RK_GRF_MACPHY_CON3
	.comm	_RK_GRF_CON3_MACPHY_ID,4,2      ## @RK_GRF_CON3_MACPHY_ID
	.comm	_RK_MACPHY_DISABLE,4,2          ## @RK_MACPHY_DISABLE
	.comm	_RK_MACPHY_ENABLE,4,2           ## @RK_MACPHY_ENABLE
	.no_dead_strip	_rk_gmac_integrated_phy_powerup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk_gmac_integrated_phy_powerup
_rk_gmac_integrated_phy_powerup:        ; @rk_gmac_integrated_phy_powerup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	blr	x8
LBB0_2:
	ldr	w0, [x19]
Lloh0:
	adrp	x20, _RK_GRF_MACPHY_CON0@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RK_GRF_MACPHY_CON0@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _RK_MACPHY_CFG_CLK_50M@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RK_MACPHY_CFG_CLK_50M@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_regmap_write
	ldr	w0, [x19]
	ldr	w1, [x20]
Lloh5:
	adrp	x8, _RK_GMAC2PHY_RMII_MODE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RK_GMAC2PHY_RMII_MODE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_regmap_write
	ldr	w0, [x19]
Lloh8:
	adrp	x8, _RK_GRF_MACPHY_CON2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RK_GRF_MACPHY_CON2@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _RK_GRF_CON2_MACPHY_ID@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RK_GRF_CON2_MACPHY_ID@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_regmap_write
	ldr	w0, [x19]
Lloh14:
	adrp	x8, _RK_GRF_MACPHY_CON3@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RK_GRF_MACPHY_CON3@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _RK_GRF_CON3_MACPHY_ID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RK_GRF_CON3_MACPHY_ID@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	bl	_regmap_write
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	w0, [x19]
	ldr	w1, [x20]
Lloh20:
	adrp	x8, _RK_MACPHY_DISABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RK_MACPHY_DISABLE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	bl	_regmap_write
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_reset_control_assert
LBB0_5:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_reset_control_deassert
LBB0_7:
	mov	w0, #10
	mov	w1, #20
	bl	_usleep_range
	ldr	w0, [x19]
	ldr	w1, [x20]
Lloh23:
	adrp	x8, _RK_MACPHY_ENABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RK_MACPHY_ENABLE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	bl	_regmap_write
	mov	w0, #30
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_msleep
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_RK_GRF_MACPHY_CON0,4,2         ; @RK_GRF_MACPHY_CON0
	.comm	_RK_MACPHY_CFG_CLK_50M,4,2      ; @RK_MACPHY_CFG_CLK_50M
	.comm	_RK_GMAC2PHY_RMII_MODE,4,2      ; @RK_GMAC2PHY_RMII_MODE
	.comm	_RK_GRF_MACPHY_CON2,4,2         ; @RK_GRF_MACPHY_CON2
	.comm	_RK_GRF_CON2_MACPHY_ID,4,2      ; @RK_GRF_CON2_MACPHY_ID
	.comm	_RK_GRF_MACPHY_CON3,4,2         ; @RK_GRF_MACPHY_CON3
	.comm	_RK_GRF_CON3_MACPHY_ID,4,2      ; @RK_GRF_CON3_MACPHY_ID
	.comm	_RK_MACPHY_DISABLE,4,2          ; @RK_MACPHY_DISABLE
	.comm	_RK_MACPHY_ENABLE,4,2           ; @RK_MACPHY_ENABLE
	.no_dead_strip	_rk_gmac_integrated_phy_powerup
.subsections_via_symbols
