	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_update_current_state       ## -- Begin function pci_update_current_state
	.p2align	4, 0x90
_pci_update_current_state:              ## @pci_update_current_state
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_platform_pci_get_power_state
	movq	_PCI_D3cold@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_pci_device_is_present
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:
	movq	_PCI_PM_CTRL@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_word
	movq	_PCI_PM_CTRL_STATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-28(%rbp), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_7
LBB0_2:
	movq	(%r15), %rax
LBB0_3:
	movl	%eax, (%rbx)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%r14d, (%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_D3cold,8,3                 ## @PCI_D3cold
	.comm	_PCI_PM_CTRL,8,3                ## @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ## @PCI_PM_CTRL_STATE_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_update_current_state       ; -- Begin function pci_update_current_state
	.p2align	2
_pci_update_current_state:              ; @pci_update_current_state
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_platform_pci_get_power_state
Lloh0:
	adrp	x21, _PCI_D3cold@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCI_D3cold@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_pci_device_is_present
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.3:
Lloh2:
	adrp	x9, _PCI_PM_CTRL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PCI_PM_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	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_STATE_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PCI_PM_CTRL_STATE_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x19]
	b	LBB0_6
LBB0_4:
	ldr	x0, [x21]
LBB0_5:
	str	w0, [x19]
LBB0_6:
	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_7:
	str	w20, [x19]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_D3cold,8,3                 ; @PCI_D3cold
	.comm	_PCI_PM_CTRL,8,3                ; @PCI_PM_CTRL
	.comm	_PCI_PM_CTRL_STATE_MASK,4,2     ; @PCI_PM_CTRL_STATE_MASK
.subsections_via_symbols
