	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_pcie_pme_turnoff
_tegra_pcie_pme_turnoff:                ## @tegra_pcie_pme_turnoff
	.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, %r14
	movq	8(%rdi), %r15
	movq	16(%r15), %r13
	movq	_AFI_PCIE_PME@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_afi_readl
	movl	%eax, %ebx
	movq	(%r13), %rax
	movq	(%r14), %rcx
	movb	(%rax,%rcx,8), %al
	btsl	%eax, %ebx
	movq	(%r12), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_afi_writel
	movq	(%r13), %rax
	movq	(%r14), %rcx
	movb	4(%rax,%rcx,8), %cl
	movq	(%r12), %rdi
	addq	8(%r15), %rdi
	movl	$1, %edx
	shll	%cl, %edx
	andl	%ebx, %edx
	movq	_PME_ACK_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%ebx, %esi
	movl	$1, %ecx
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	movq	(%r14), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_2:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movq	(%r12), %rsi
	movq	%r15, %rdi
	callq	_afi_readl
	movq	(%r13), %rcx
	movq	(%r14), %rdx
	movb	(%rcx,%rdx,8), %cl
	btrl	%ecx, %eax
	movq	(%r12), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_afi_writel                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AFI_PCIE_PME,8,3               ## @AFI_PCIE_PME
	.comm	_PME_ACK_TIMEOUT,4,2            ## @PME_ACK_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PME Ack is not received on port: %d\n"

	.no_dead_strip	_tegra_pcie_pme_turnoff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_pcie_pme_turnoff
_tegra_pcie_pme_turnoff:                ; @tegra_pcie_pme_turnoff
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	x23, [x19, #16]
Lloh0:
	adrp	x22, _AFI_PCIE_PME@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AFI_PCIE_PME@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	bl	_afi_readl
	ldr	x8, [x23]
	ldr	x9, [x20]
	lsl	x9, x9, #3
	ldr	w8, [x8, x9]
	mov	w24, #1
	lsl	w8, w24, w8
	orr	w21, w8, w0
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x21
	bl	_afi_writel
	ldr	x8, [x23]
	ldr	x9, [x20]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	ldr	x9, [x19, #8]
	ldr	x10, [x22]
	add	x0, x10, x9
	lsl	w8, w24, w8
	and	w2, w8, w21
Lloh2:
	adrp	x8, _PME_ACK_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PME_ACK_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x8]
	mov	x1, x21
	mov	w3, #1
	bl	_readl_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	ldr	x2, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	ldr	x1, [x22]
	mov	x0, x19
	bl	_afi_readl
	ldr	x8, [x23]
	ldr	x9, [x20]
	lsl	x9, x9, #3
	ldr	w8, [x8, x9]
	lsl	w8, w24, w8
	bic	w1, w0, w8
	ldr	x2, [x22]
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_afi_writel
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AFI_PCIE_PME,8,3               ; @AFI_PCIE_PME
	.comm	_PME_ACK_TIMEOUT,4,2            ; @PME_ACK_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PME Ack is not received on port: %d\n"

	.no_dead_strip	_tegra_pcie_pme_turnoff
.subsections_via_symbols
