	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra186_usb3_phy_power_off
_tegra186_usb3_phy_power_off:           ## @tegra186_usb3_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_phy_get_drvdata
	movq	8(%rax), %rcx
	movq	(%rcx), %r12
	movl	(%rax), %r14d
	movq	8(%r12), %r15
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_tegra_xusb_find_usb3_port
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	_XUSB_PADCTL_ELPG_PROGRAM_1@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_padctl_readl
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_SSPX_ELPG_CLAMP_EN_EARLY
	orl	%eax, %ebx
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_padctl_writel
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_padctl_readl
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_SSPX_ELPG_CLAMP_EN
	orl	%eax, %ebx
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_padctl_writel
	movl	$250, %edi
	movl	$350, %esi                      ## imm = 0x15E
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_padctl_readl
	movl	%eax, %ebx
	movl	%r14d, %edi
	callq	_SSPX_ELPG_VCORE_DOWN
	orl	%eax, %ebx
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_padctl_writel
	movq	%r12, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no port found for USB3 lane %u\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_XUSB_PADCTL_ELPG_PROGRAM_1,4,2 ## @XUSB_PADCTL_ELPG_PROGRAM_1
	.no_dead_strip	_tegra186_usb3_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 tegra186_usb3_phy_power_off
_tegra186_usb3_phy_power_off:           ; @tegra186_usb3_phy_power_off
	.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
	ldr	x8, [x0, #8]
	ldr	x19, [x8]
	ldr	w20, [x0]
	ldr	x21, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_tegra_xusb_find_usb3_port
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x22, _XUSB_PADCTL_ELPG_PROGRAM_1@GOTPAGE
Lloh1:
	ldr	x22, [x22, _XUSB_PADCTL_ELPG_PROGRAM_1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_padctl_readl
	mov	x21, x0
	mov	x0, x20
	bl	_SSPX_ELPG_CLAMP_EN_EARLY
	orr	w1, w0, w21
	ldr	w2, [x22]
	mov	x0, x19
	bl	_padctl_writel
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x19
	bl	_padctl_readl
	mov	x21, x0
	mov	x0, x20
	bl	_SSPX_ELPG_CLAMP_EN
	orr	w1, w0, w21
	ldr	w2, [x22]
	mov	x0, x19
	bl	_padctl_writel
	mov	w0, #250
	mov	w1, #350
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x19
	bl	_padctl_readl
	mov	x21, x0
	mov	x0, x20
	bl	_SSPX_ELPG_VCORE_DOWN
	orr	w1, w0, w21
	ldr	w2, [x22]
	mov	x0, x19
	bl	_padctl_writel
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_dev_err
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no port found for USB3 lane %u\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_XUSB_PADCTL_ELPG_PROGRAM_1,4,2 ; @XUSB_PADCTL_ELPG_PROGRAM_1
	.no_dead_strip	_tegra186_usb3_phy_power_off
.subsections_via_symbols
