	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_pmops_runtime_suspend
_nouveau_pmops_runtime_suspend:         ## @nouveau_pmops_runtime_suspend
	.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, %r15
	callq	_to_pci_dev
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_pci_get_drvdata
	movq	%rax, %r14
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_nouveau_pmops_runtime
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	xorl	%eax, %eax
	callq	_nouveau_switcheroo_optimus_dsm
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_nouveau_do_suspend
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_pci_save_state
	movq	%rbx, %rdi
	callq	_pci_disable_device
	movq	%rbx, %rdi
	callq	_pci_ignore_hotplug
	movq	_PCI_D3cold@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pci_set_power_state
	movq	_DRM_SWITCH_POWER_DYNAMIC_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movl	%r15d, %eax
	jmp	LBB0_2
LBB0_1:
	movq	%r15, %rdi
	callq	_pm_runtime_forbid
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movl	%r12d, %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PCI_D3cold,4,2                 ## @PCI_D3cold
	.comm	_DRM_SWITCH_POWER_DYNAMIC_OFF,4,2 ## @DRM_SWITCH_POWER_DYNAMIC_OFF
	.no_dead_strip	_nouveau_pmops_runtime_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_pmops_runtime_suspend
_nouveau_pmops_runtime_suspend:         ; @nouveau_pmops_runtime_suspend
	.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	x21, x0
	bl	_to_pci_dev
	mov	x20, x0
	bl	_pci_get_drvdata
	mov	x19, x0
	bl	_nouveau_pmops_runtime
	cbz	w0, LBB0_2
; %bb.1:
	bl	_nouveau_switcheroo_optimus_dsm
	mov	x0, x19
	mov	w1, #1
	bl	_nouveau_do_suspend
	mov	x21, x0
	mov	x0, x20
	bl	_pci_save_state
	mov	x0, x20
	bl	_pci_disable_device
	mov	x0, x20
	bl	_pci_ignore_hotplug
Lloh0:
	adrp	x8, _PCI_D3cold@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_D3cold@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_set_power_state
Lloh3:
	adrp	x8, _DRM_SWITCH_POWER_DYNAMIC_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_SWITCH_POWER_DYNAMIC_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x21
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_pm_runtime_forbid
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PCI_D3cold,4,2                 ; @PCI_D3cold
	.comm	_DRM_SWITCH_POWER_DYNAMIC_OFF,4,2 ; @DRM_SWITCH_POWER_DYNAMIC_OFF
	.no_dead_strip	_nouveau_pmops_runtime_suspend
.subsections_via_symbols
