	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_pmops_runtime_resume
_nouveau_pmops_runtime_resume:          ## @nouveau_pmops_runtime_resume
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_pci_dev
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_pci_get_drvdata
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_nouveau_drm
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_nouveau_drm
	movq	%rax, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_nouveau_pmops_runtime
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_PCI_D0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_pci_set_power_state
	movq	%r13, %rdi
	callq	_pci_restore_state
	movq	%r13, %rdi
	callq	_pci_enable_device
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r13, %rdi
	callq	_pci_set_master
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_nouveau_do_resume
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_NV_ERROR
	jmp	LBB0_6
LBB0_1:
	movq	%r14, %rdi
	callq	_pm_runtime_forbid
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	addq	$4, %r15
	movq	%r15, %rdi
	movl	$558216, %esi                   ## imm = 0x88488
	movl	$33554432, %edx                 ## imm = 0x2000000
	movl	$33554432, %ecx                 ## imm = 0x2000000
	callq	_nvif_mask
	movq	_DRM_SWITCH_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	movq	%r12, %rdi
	callq	_nouveau_drm
	movq	%rax, %rdi
	callq	_schedule_work
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_PCI_D0,4,2                     ## @PCI_D0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resume failed with: %d\n"

	.comm	_DRM_SWITCH_POWER_ON,4,2        ## @DRM_SWITCH_POWER_ON
	.no_dead_strip	_nouveau_pmops_runtime_resume
.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_resume
_nouveau_pmops_runtime_resume:          ; @nouveau_pmops_runtime_resume
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x0
	bl	_to_pci_dev
	mov	x21, x0
	bl	_pci_get_drvdata
	mov	x19, x0
	bl	_nouveau_drm
	mov	x20, x0
	mov	x0, x19
	bl	_nouveau_drm
	mov	x22, x0
	bl	_nouveau_pmops_runtime
	cbz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _PCI_D0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_D0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_pci_set_power_state
	mov	x0, x21
	bl	_pci_restore_state
	mov	x0, x21
	bl	_pci_enable_device
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x21
	bl	_pci_set_master
	mov	x0, x19
	mov	w1, #1
	bl	_nouveau_do_resume
	mov	x23, x0
	cbz	w0, LBB0_5
; %bb.3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	bl	_NV_ERROR
	b	LBB0_6
LBB0_4:
	mov	x0, x23
	bl	_pm_runtime_forbid
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_6
LBB0_5:
	add	x0, x22, #4
	mov	w1, #33928
	movk	w1, #8, lsl #16
	mov	w2, #33554432
	mov	w3, #33554432
	bl	_nvif_mask
Lloh8:
	adrp	x8, _DRM_SWITCH_POWER_ON@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRM_SWITCH_POWER_ON@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x19
	bl	_nouveau_drm
	bl	_schedule_work
LBB0_6:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_PCI_D0,4,2                     ; @PCI_D0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resume failed with: %d\n"

	.comm	_DRM_SWITCH_POWER_ON,4,2        ; @DRM_SWITCH_POWER_ON
	.no_dead_strip	_nouveau_pmops_runtime_resume
.subsections_via_symbols
