	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_pcie_phy_power_off
_rockchip_pcie_phy_power_off:           ## @rockchip_pcie_phy_power_off
	.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
	movq	%rdi, %r15
	callq	_phy_get_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_to_pcie_phy
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	16(%rbx), %r12d
	movq	8(%rbx), %rax
	movl	(%rax), %r13d
	movq	_PHY_LANE_IDLE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PHY_LANE_IDLE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PHY_LANE_IDLE_A_SHIFT@GOTPCREL(%rip), %rax
	movq	(%r14), %rdx
	addq	(%rax), %rdx
	callq	_HIWORD_UPDATE
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_regmap_write
	xorl	%r13d, %r13d
	decq	24(%rbx)
	jne	LBB0_3
## %bb.1:
	movl	32(%rbx), %edi
	callq	_reset_control_assert
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
	incq	24(%rbx)
	movl	16(%rbx), %r15d
	movq	8(%rbx), %rax
	movl	(%rax), %r13d
	xorl	%edi, %edi
	movq	_PHY_LANE_IDLE_OFF@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	sete	%dil
	movq	_PHY_LANE_IDLE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rdx
	movq	_PHY_LANE_IDLE_A_SHIFT@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	callq	_HIWORD_UPDATE
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_regmap_write
	movl	%r12d, %r13d
LBB0_3:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_LANE_IDLE_OFF,4,2          ## @PHY_LANE_IDLE_OFF
	.comm	_PHY_LANE_IDLE_MASK,4,2         ## @PHY_LANE_IDLE_MASK
	.comm	_PHY_LANE_IDLE_A_SHIFT,8,3      ## @PHY_LANE_IDLE_A_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"assert phy_rst err %d\n"

	.no_dead_strip	_rockchip_pcie_phy_power_off
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_pcie_phy_power_off
_rockchip_pcie_phy_power_off:           ; @rockchip_pcie_phy_power_off
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
	bl	_phy_get_drvdata
	mov	x20, x0
	bl	_to_pcie_phy
	mov	x19, x0
	bl	_mutex_lock
	ldr	w22, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w23, [x8]
Lloh0:
	adrp	x25, _PHY_LANE_IDLE_OFF@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PHY_LANE_IDLE_OFF@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh2:
	adrp	x24, _PHY_LANE_IDLE_MASK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PHY_LANE_IDLE_MASK@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh4:
	adrp	x26, _PHY_LANE_IDLE_A_SHIFT@GOTPAGE
Lloh5:
	ldr	x26, [x26, _PHY_LANE_IDLE_A_SHIFT@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	x9, [x20]
	add	x2, x9, x8
	bl	_HIWORD_UPDATE
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_regmap_write
	ldr	x8, [x19, #24]
	subs	x8, x8, #1
	str	x8, [x19, #24]
	b.eq	LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_4
LBB0_2:
	ldr	w0, [x19, #32]
	bl	_reset_control_assert
	mov	x22, x0
	cbz	w0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_dev_err
	ldr	x8, [x19, #24]
	add	x8, x8, #1
	str	x8, [x19, #24]
	ldr	w21, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	w23, [x8]
	ldr	w8, [x25]
	cmp	w8, #0
	cset	w0, eq
	ldr	w1, [x24]
	ldr	x8, [x26]
	ldr	x9, [x20]
	add	x2, x9, x8
	bl	_HIWORD_UPDATE
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	bl	_regmap_write
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_LANE_IDLE_OFF,4,2          ; @PHY_LANE_IDLE_OFF
	.comm	_PHY_LANE_IDLE_MASK,4,2         ; @PHY_LANE_IDLE_MASK
	.comm	_PHY_LANE_IDLE_A_SHIFT,8,3      ; @PHY_LANE_IDLE_A_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"assert phy_rst err %d\n"

	.no_dead_strip	_rockchip_pcie_phy_power_off
.subsections_via_symbols
