	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_pm_init                    ## -- Begin function pci_pm_init
	.p2align	4, 0x90
_pci_pm_init:                           ## @pci_pm_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	32(%rdi), %r14
	movq	%r14, %rdi
	callq	_pm_runtime_forbid
	movq	%r14, %rdi
	callq	_pm_runtime_set_active
	movq	%r14, %rdi
	callq	_pm_runtime_enable
	movq	%r14, %rdi
	callq	_device_enable_async_suspend
	movq	$0, (%r15)
	movl	$0, 8(%r15)
	movq	_PCI_CAP_ID_PM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pci_find_capability
	testl	%eax, %eax
	je	LBB0_17
## %bb.1:
	movl	%eax, %ebx
	movslq	%eax, %rsi
	movq	_PCI_PM_PMC@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	movq	_PCI_PM_CAP_VER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	-28(%rbp), %edx
	cmpl	$4, %edx
	jl	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_pci_err
	jmp	LBB0_17
LBB0_3:
	movl	%ebx, 4(%r15)
	movq	_PCI_PM_D3_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r15)
	movq	_PCI_PM_D3COLD_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	movq	%r15, %rdi
	callq	_pci_bridge_d3_possible
	movl	%eax, 36(%r15)
	movq	$1, 12(%r15)
	movl	$0, 20(%r15)
	movq	%r15, %rdi
	callq	_pci_no_d1d2
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movl	-28(%rbp), %eax
	movq	_PCI_PM_CAP_D1@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movl	$1, 16(%r15)
LBB0_6:
	movq	_PCI_PM_CAP_D2@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movl	$1, 20(%r15)
LBB0_8:
	cmpl	$0, 16(%r15)
	movl	20(%r15), %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_12
LBB0_10:
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	leaq	L_.str.3(%rip), %rdx
LBB0_12:
	testl	%eax, %eax
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_pci_info
LBB0_13:
	movq	_PCI_PM_CAP_PME_MASK@GOTPCREL(%rip), %rcx
	movl	-28(%rbp), %eax
	andl	(%rcx), %eax
	movl	%eax, -28(%rbp)
	je	LBB0_15
## %bb.14:
	movq	_PCI_PM_CAP_PME_D0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.6(%rip), %rdx
	cmoveq	%rsi, %rdx
	movq	_PCI_PM_CAP_PME_D1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rsi, %rcx
	movq	_PCI_PM_CAP_PME_D2@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%eax, %edi
	leaq	L_.str.4(%rip), %r8
	cmoveq	%rsi, %r8
	movq	_PCI_PM_CAP_PME_D3@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%eax, %edi
	leaq	L_.str.7(%rip), %r9
	cmoveq	%rsi, %r9
	movq	_PCI_PM_CAP_PME_D3cold@GOTPCREL(%rip), %rdi
	andl	(%rdi), %eax
	leaq	L_.str.8(%rip), %rax
	cmoveq	%rsi, %rax
	movq	%rax, (%rsp)
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_pci_info
	movl	-28(%rbp), %eax
	movq	_PCI_PM_CAP_PME_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	%eax, 8(%r15)
	movl	$1, 24(%r15)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_set_wakeup_capable
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_pme_active
LBB0_15:
	movq	_PCI_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-32(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	movq	_PCI_STATUS_IMM_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -32(%rbp)
	je	LBB0_17
## %bb.16:
	movl	$1, 28(%r15)
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CAP_ID_PM,4,2              ## @PCI_CAP_ID_PM
	.comm	_PCI_PM_PMC,8,3                 ## @PCI_PM_PMC
	.comm	_PCI_PM_CAP_VER_MASK,4,2        ## @PCI_PM_CAP_VER_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported PM cap regs version (%u)\n"

	.comm	_PCI_PM_D3_WAIT,4,2             ## @PCI_PM_D3_WAIT
	.comm	_PCI_PM_D3COLD_WAIT,4,2         ## @PCI_PM_D3COLD_WAIT
	.comm	_PCI_PM_CAP_D1,4,2              ## @PCI_PM_CAP_D1
	.comm	_PCI_PM_CAP_D2,4,2              ## @PCI_PM_CAP_D2
L_.str.1:                               ## @.str.1
	.asciz	"supports%s%s\n"

L_.str.2:                               ## @.str.2
	.asciz	" D1"

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	" D2"

	.comm	_PCI_PM_CAP_PME_MASK,4,2        ## @PCI_PM_CAP_PME_MASK
L_.str.5:                               ## @.str.5
	.asciz	"PME# supported from%s%s%s%s%s\n"

	.comm	_PCI_PM_CAP_PME_D0,4,2          ## @PCI_PM_CAP_PME_D0
L_.str.6:                               ## @.str.6
	.asciz	" D0"

	.comm	_PCI_PM_CAP_PME_D1,4,2          ## @PCI_PM_CAP_PME_D1
	.comm	_PCI_PM_CAP_PME_D2,4,2          ## @PCI_PM_CAP_PME_D2
	.comm	_PCI_PM_CAP_PME_D3,4,2          ## @PCI_PM_CAP_PME_D3
L_.str.7:                               ## @.str.7
	.asciz	" D3hot"

	.comm	_PCI_PM_CAP_PME_D3cold,4,2      ## @PCI_PM_CAP_PME_D3cold
L_.str.8:                               ## @.str.8
	.asciz	" D3cold"

	.comm	_PCI_PM_CAP_PME_SHIFT,4,2       ## @PCI_PM_CAP_PME_SHIFT
	.comm	_PCI_STATUS,8,3                 ## @PCI_STATUS
	.comm	_PCI_STATUS_IMM_READY,4,2       ## @PCI_STATUS_IMM_READY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function pci_pm_init
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_pci_pm_init
	.p2align	2
_pci_pm_init:                           ; @pci_pm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	add	x20, x0, #32
	mov	x0, x20
	bl	_pm_runtime_forbid
	mov	x0, x20
	bl	_pm_runtime_set_active
	mov	x0, x20
	bl	_pm_runtime_enable
	mov	x0, x20
	bl	_device_enable_async_suspend
	str	xzr, [x19]
	str	wzr, [x19, #8]
Lloh0:
	adrp	x8, _PCI_CAP_ID_PM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_CAP_ID_PM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_find_capability
	cbz	w0, LBB0_17
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x8, _PCI_PM_PMC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_PM_PMC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, w0, sxtw
	add	x2, sp, #24
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w8, [sp, #24]
Lloh6:
	adrp	x9, _PCI_PM_CAP_VER_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCI_PM_CAP_VER_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w2, w9, w8
	cmp	w2, #4
	b.lt	LBB0_3
; %bb.2:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_err
	b	LBB0_17
LBB0_3:
	str	w21, [x19, #4]
Lloh11:
	adrp	x8, _PCI_PM_D3_WAIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PCI_PM_D3_WAIT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _PCI_PM_D3COLD_WAIT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PCI_PM_D3COLD_WAIT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
	mov	x0, x19
	bl	_pci_bridge_d3_possible
	str	w0, [x19, #36]
Lloh17:
	adrp	x8, lCPI0_0@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #12]
	str	wzr, [x19, #20]
	mov	x0, x19
	bl	_pci_no_d1d2
	cbnz	w0, LBB0_13
; %bb.4:
	ldr	w8, [sp, #24]
Lloh19:
	adrp	x9, _PCI_PM_CAP_D1@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PCI_PM_CAP_D1@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	w9, #1
	str	w9, [x19, #16]
LBB0_6:
Lloh22:
	adrp	x9, _PCI_PM_CAP_D2@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PCI_PM_CAP_D2@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	mov	w8, #1
	str	w8, [x19, #20]
LBB0_8:
	ldp	w9, w8, [x19, #16]
	cbz	w9, LBB0_10
; %bb.9:
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_10:
	cbz	w8, LBB0_13
; %bb.11:
Lloh27:
	adrp	x2, l_.str.3@PAGE
Lloh28:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_12:
Lloh29:
	adrp	x9, l_.str.4@PAGE
Lloh30:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh31:
	adrp	x10, l_.str.3@PAGE
Lloh32:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w8, #0
	csel	x3, x10, x9, eq
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_info
LBB0_13:
Lloh35:
	adrp	x8, _PCI_PM_CAP_PME_MASK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _PCI_PM_CAP_PME_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	ands	w8, w9, w8
	str	w8, [sp, #24]
	b.eq	LBB0_15
; %bb.14:
Lloh38:
	adrp	x9, _PCI_PM_CAP_PME_D0@GOTPAGE
Lloh39:
	ldr	x9, [x9, _PCI_PM_CAP_PME_D0@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
Lloh41:
	adrp	x10, l_.str.6@PAGE
Lloh42:
	add	x10, x10, l_.str.6@PAGEOFF
Lloh43:
	adrp	x11, l_.str.3@PAGE
Lloh44:
	add	x11, x11, l_.str.3@PAGEOFF
	tst	w9, w8
	csel	x2, x11, x10, eq
Lloh45:
	adrp	x9, _PCI_PM_CAP_PME_D1@GOTPAGE
Lloh46:
	ldr	x9, [x9, _PCI_PM_CAP_PME_D1@GOTPAGEOFF]
Lloh47:
	adrp	x10, l_.str.2@PAGE
Lloh48:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh49:
	ldr	w9, [x9]
	tst	w9, w8
	csel	x3, x11, x10, eq
Lloh50:
	adrp	x9, _PCI_PM_CAP_PME_D2@GOTPAGE
Lloh51:
	ldr	x9, [x9, _PCI_PM_CAP_PME_D2@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
Lloh53:
	adrp	x10, l_.str.4@PAGE
Lloh54:
	add	x10, x10, l_.str.4@PAGEOFF
	tst	w9, w8
	csel	x9, x11, x10, eq
Lloh55:
	adrp	x10, _PCI_PM_CAP_PME_D3@GOTPAGE
Lloh56:
	ldr	x10, [x10, _PCI_PM_CAP_PME_D3@GOTPAGEOFF]
Lloh57:
	ldr	w10, [x10]
Lloh58:
	adrp	x12, l_.str.7@PAGE
Lloh59:
	add	x12, x12, l_.str.7@PAGEOFF
	tst	w10, w8
Lloh60:
	adrp	x10, _PCI_PM_CAP_PME_D3cold@GOTPAGE
Lloh61:
	ldr	x10, [x10, _PCI_PM_CAP_PME_D3cold@GOTPAGEOFF]
	csel	x12, x11, x12, eq
Lloh62:
	ldr	w10, [x10]
Lloh63:
	adrp	x13, l_.str.8@PAGE
Lloh64:
	add	x13, x13, l_.str.8@PAGEOFF
	tst	w10, w8
	csel	x8, x11, x13, eq
	stp	x12, x8, [sp, #8]
	str	x9, [sp]
Lloh65:
	adrp	x1, l_.str.5@PAGE
Lloh66:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_pci_info
Lloh67:
	adrp	x8, _PCI_PM_CAP_PME_SHIFT@GOTPAGE
Lloh68:
	ldr	x8, [x8, _PCI_PM_CAP_PME_SHIFT@GOTPAGEOFF]
	ldr	w9, [sp, #24]
Lloh69:
	ldr	w8, [x8]
	asr	w8, w9, w8
	str	w8, [x19, #8]
	mov	w8, #1
	str	w8, [x19, #24]
	mov	x0, x20
	mov	w1, #1
	bl	_device_set_wakeup_capable
	mov	x0, x19
	mov	w1, #0
	bl	_pci_pme_active
LBB0_15:
Lloh70:
	adrp	x8, _PCI_STATUS@GOTPAGE
Lloh71:
	ldr	x8, [x8, _PCI_STATUS@GOTPAGEOFF]
Lloh72:
	ldr	x1, [x8]
	add	x2, sp, #28
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w8, [sp, #28]
Lloh73:
	adrp	x9, _PCI_STATUS_IMM_READY@GOTPAGE
Lloh74:
	ldr	x9, [x9, _PCI_STATUS_IMM_READY@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
	mov	w8, #1
	str	w8, [x19, #28]
LBB0_17:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh49
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CAP_ID_PM,4,2              ; @PCI_CAP_ID_PM
	.comm	_PCI_PM_PMC,8,3                 ; @PCI_PM_PMC
	.comm	_PCI_PM_CAP_VER_MASK,4,2        ; @PCI_PM_CAP_VER_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported PM cap regs version (%u)\n"

	.comm	_PCI_PM_D3_WAIT,4,2             ; @PCI_PM_D3_WAIT
	.comm	_PCI_PM_D3COLD_WAIT,4,2         ; @PCI_PM_D3COLD_WAIT
	.comm	_PCI_PM_CAP_D1,4,2              ; @PCI_PM_CAP_D1
	.comm	_PCI_PM_CAP_D2,4,2              ; @PCI_PM_CAP_D2
l_.str.1:                               ; @.str.1
	.asciz	"supports%s%s\n"

l_.str.2:                               ; @.str.2
	.asciz	" D1"

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	" D2"

	.comm	_PCI_PM_CAP_PME_MASK,4,2        ; @PCI_PM_CAP_PME_MASK
l_.str.5:                               ; @.str.5
	.asciz	"PME# supported from%s%s%s%s%s\n"

	.comm	_PCI_PM_CAP_PME_D0,4,2          ; @PCI_PM_CAP_PME_D0
l_.str.6:                               ; @.str.6
	.asciz	" D0"

	.comm	_PCI_PM_CAP_PME_D1,4,2          ; @PCI_PM_CAP_PME_D1
	.comm	_PCI_PM_CAP_PME_D2,4,2          ; @PCI_PM_CAP_PME_D2
	.comm	_PCI_PM_CAP_PME_D3,4,2          ; @PCI_PM_CAP_PME_D3
l_.str.7:                               ; @.str.7
	.asciz	" D3hot"

	.comm	_PCI_PM_CAP_PME_D3cold,4,2      ; @PCI_PM_CAP_PME_D3cold
l_.str.8:                               ; @.str.8
	.asciz	" D3cold"

	.comm	_PCI_PM_CAP_PME_SHIFT,4,2       ; @PCI_PM_CAP_PME_SHIFT
	.comm	_PCI_STATUS,8,3                 ; @PCI_STATUS
	.comm	_PCI_STATUS_IMM_READY,4,2       ; @PCI_STATUS_IMM_READY
.subsections_via_symbols
