	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_set_power_state            ## -- Begin function pci_set_power_state
	.p2align	4, 0x90
_pci_set_power_state:                   ## @pci_set_power_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_PCI_D3cold@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpq	%rsi, %rbx
	jl	LBB0_6
## %bb.1:
	movq	%rsi, %r12
	movq	_PCI_D0@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpq	%rsi, %rbx
	jg	LBB0_6
## %bb.2:
	movq	_PCI_D1@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_PCI_D2@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%r12, %rbx
	jmp	LBB0_6
LBB0_5:
	movq	%r14, %rdi
	callq	_pci_no_d1d2
	xorl	%r15d, %r15d
	movq	%r12, %rbx
	testq	%rax, %rax
	jne	LBB0_10
LBB0_6:
	xorl	%r15d, %r15d
	cmpq	%rbx, (%r14)
	je	LBB0_10
## %bb.7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	___pci_start_power_transition
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%rsi, %rbx
	jl	LBB0_9
## %bb.8:
	movq	_PCI_DEV_FLAGS_NO_D3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	jne	LBB0_10
LBB0_9:
	cmpq	%rsi, %rbx
	cmovlq	%rbx, %rsi
	movq	%r14, %rdi
	callq	_pci_raw_set_power_state
	movl	%eax, %r15d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	___pci_complete_power_transition
	testl	%eax, %eax
	cmovel	%eax, %r15d
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_D3cold,8,3                 ## @PCI_D3cold
	.comm	_PCI_D0,8,3                     ## @PCI_D0
	.comm	_PCI_D1,8,3                     ## @PCI_D1
	.comm	_PCI_D2,8,3                     ## @PCI_D2
	.comm	_PCI_D3hot,8,3                  ## @PCI_D3hot
	.comm	_PCI_DEV_FLAGS_NO_D3,4,2        ## @PCI_DEV_FLAGS_NO_D3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_set_power_state            ; -- Begin function pci_set_power_state
	.p2align	2
_pci_set_power_state:                   ; @pci_set_power_state
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_D3cold@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_D3cold@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	cmp	x20, x1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, x1
Lloh3:
	adrp	x8, _PCI_D0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_D0@GOTPAGEOFF]
Lloh5:
	ldr	x20, [x8]
	cmp	x20, x1
	b.gt	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _PCI_D1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_D1@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _PCI_D2@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PCI_D2@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x21
	ccmp	x9, x21, #4, ne
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_pci_no_d1d2
	mov	x20, x21
	cbnz	x0, LBB0_8
	b	LBB0_5
LBB0_4:
	mov	x20, x21
LBB0_5:
	ldr	x8, [x19]
	cmp	x8, x20
	b.eq	LBB0_8
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	___pci_start_power_transition
Lloh12:
	adrp	x8, _PCI_D3hot@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_D3hot@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x20, x8
	b.lt	LBB0_9
; %bb.7:
	ldr	w9, [x19, #8]
Lloh15:
	adrp	x10, _PCI_DEV_FLAGS_NO_D3@GOTPAGE
Lloh16:
	ldr	x10, [x10, _PCI_DEV_FLAGS_NO_D3@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_9
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	cmp	x20, x8
	csel	x1, x20, x8, lt
	mov	x0, x19
	bl	_pci_raw_set_power_state
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	___pci_complete_power_transition
	cmp	w0, #0
	csel	w0, wzr, w21, eq
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_D3cold,8,3                 ; @PCI_D3cold
	.comm	_PCI_D0,8,3                     ; @PCI_D0
	.comm	_PCI_D1,8,3                     ; @PCI_D1
	.comm	_PCI_D2,8,3                     ; @PCI_D2
	.comm	_PCI_D3hot,8,3                  ; @PCI_D3hot
	.comm	_PCI_DEV_FLAGS_NO_D3,4,2        ; @PCI_DEV_FLAGS_NO_D3
.subsections_via_symbols
