	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_pm_reset
_pci_pm_reset:                          ## @pci_pm_reset
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	8(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	_PCI_DEV_FLAGS_NO_PM_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_2
## %bb.4:
	movq	_PCI_PM_CTRL@GOTPCREL(%rip), %r15
	addq	(%r15), %rsi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movl	-36(%rbp), %edx
	movq	_PCI_PM_CTRL_NO_SOFT_RESET@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_5
LBB0_2:
	movq	_ENOTTY@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.6:
	movl	4(%rbx), %eax
	movq	_PCI_D0@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_7
## %bb.8:
	movq	_PCI_PM_CTRL_STATE_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, %edx
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movq	(%r15), %rsi
	addq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_pci_write_config_word
	movq	%rbx, %rdi
	callq	_pci_dev_d3_sleep
	movl	(%r12), %edx
	notl	%edx
	andl	-36(%rbp), %edx
	orl	(%r14), %edx
	movl	%edx, -36(%rbp)
	movq	(%r15), %rsi
	addq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_pci_write_config_word
	movq	%rbx, %rdi
	callq	_pci_dev_d3_sleep
	movq	_PCIE_RESET_READY_POLL_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_dev_wait
	jmp	LBB0_9
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DEV_FLAGS_NO_PM_RESET,4,2  ## @PCI_DEV_FLAGS_NO_PM_RESET
	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.comm	_PCI_PM_CTRL,8,3                ## @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_NO_SOFT_RESET,4,2  ## @PCI_PM_CTRL_NO_SOFT_RESET
	.comm	_PCI_D0,4,2                     ## @PCI_D0
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ## @PCI_PM_CTRL_STATE_MASK
	.comm	_PCI_D3hot,4,2                  ## @PCI_D3hot
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PM D3->D0"

	.comm	_PCIE_RESET_READY_POLL_MS,4,2   ## @PCIE_RESET_READY_POLL_MS
	.no_dead_strip	_pci_pm_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_pm_reset
_pci_pm_reset:                          ; @pci_pm_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w9, [x0]
Lloh0:
	adrp	x10, _PCI_DEV_FLAGS_NO_PM_RESET@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PCI_DEV_FLAGS_NO_PM_RESET@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_3
; %bb.2:
	mov	x20, x1
Lloh3:
	adrp	x21, _PCI_PM_CTRL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PCI_PM_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x9, x8
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _PCI_PM_CTRL_NO_SOFT_RESET@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_PM_CTRL_NO_SOFT_RESET@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_3:
Lloh8:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	add	sp, sp, #64
	ret
LBB0_6:
	cbz	w20, LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_5
LBB0_8:
	ldr	w9, [x19, #4]
Lloh10:
	adrp	x20, _PCI_D0@GOTPAGE
Lloh11:
	ldr	x20, [x20, _PCI_D0@GOTPAGEOFF]
	ldr	w10, [x20]
	cmp	w9, w10
	b.ne	LBB0_10
; %bb.9:
Lloh12:
	adrp	x22, _PCI_PM_CTRL_STATE_MASK@GOTPAGE
Lloh13:
	ldr	x22, [x22, _PCI_PM_CTRL_STATE_MASK@GOTPAGEOFF]
	ldr	w9, [x22]
	bic	w8, w8, w9
Lloh14:
	adrp	x9, _PCI_D3hot@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PCI_D3hot@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x19
	bl	_pci_write_config_word
	mov	x0, x19
	bl	_pci_dev_d3_sleep
	ldr	w8, [x22]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	ldr	w9, [x20]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x19
	bl	_pci_write_config_word
	mov	x0, x19
	bl	_pci_dev_d3_sleep
Lloh17:
	adrp	x8, _PCIE_RESET_READY_POLL_MS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PCIE_RESET_READY_POLL_MS@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_dev_wait
	b	LBB0_5
LBB0_10:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DEV_FLAGS_NO_PM_RESET,4,2  ; @PCI_DEV_FLAGS_NO_PM_RESET
	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.comm	_PCI_PM_CTRL,8,3                ; @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_NO_SOFT_RESET,4,2  ; @PCI_PM_CTRL_NO_SOFT_RESET
	.comm	_PCI_D0,4,2                     ; @PCI_D0
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ; @PCI_PM_CTRL_STATE_MASK
	.comm	_PCI_D3hot,4,2                  ; @PCI_D3hot
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PM D3->D0"

	.comm	_PCIE_RESET_READY_POLL_MS,4,2   ; @PCIE_RESET_READY_POLL_MS
	.no_dead_strip	_pci_pm_reset
.subsections_via_symbols
