	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_suspend                   ## -- Begin function i915_suspend
	.p2align	4, 0x90
_i915_suspend:                          ## @i915_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	cmpl	$0, 12(%r14)
	je	LBB0_2
## %bb.3:
	movq	%rsi, %r15
	movq	_PM_EVENT_PRETHAW@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	je	LBB0_8
## %bb.4:
	movq	(%r14), %rax
	movq	_DRM_SWITCH_POWER_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_i915_drm_freeze
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	_PM_EVENT_SUSPEND@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_8
## %bb.7:
	movl	8(%r14), %edi
	callq	_pci_disable_device
	movl	8(%r14), %edi
	movq	_PCI_D3hot@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_set_power_state
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dev: %p\n"

L_.str.1:                               ## @.str.1
	.asciz	"DRM not initialized, aborting suspend.\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PM_EVENT_PRETHAW,8,3           ## @PM_EVENT_PRETHAW
	.comm	_DRM_SWITCH_POWER_OFF,8,3       ## @DRM_SWITCH_POWER_OFF
	.comm	_PM_EVENT_SUSPEND,8,3           ## @PM_EVENT_SUSPEND
	.comm	_PCI_D3hot,4,2                  ## @PCI_D3hot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_suspend                   ; -- Begin function i915_suspend
	.p2align	2
_i915_suspend:                          ; @i915_suspend
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x20, x1
Lloh0:
	adrp	x8, _PM_EVENT_PRETHAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PM_EVENT_PRETHAW@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _DRM_SWITCH_POWER_OFF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_SWITCH_POWER_OFF@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	str	x19, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
	mov	x0, x19
	bl	_i915_drm_freeze
	cbnz	w0, LBB0_6
; %bb.8:
Lloh13:
	adrp	x8, _PM_EVENT_SUSPEND@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PM_EVENT_SUSPEND@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_4
; %bb.9:
	ldr	w0, [x19, #8]
	bl	_pci_disable_device
	ldr	w0, [x19, #8]
Lloh16:
	adrp	x8, _PCI_D3hot@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PCI_D3hot@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_pci_set_power_state
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dev: %p\n"

l_.str.1:                               ; @.str.1
	.asciz	"DRM not initialized, aborting suspend.\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PM_EVENT_PRETHAW,8,3           ; @PM_EVENT_PRETHAW
	.comm	_DRM_SWITCH_POWER_OFF,8,3       ; @DRM_SWITCH_POWER_OFF
	.comm	_PM_EVENT_SUSPEND,8,3           ; @PM_EVENT_SUSPEND
	.comm	_PCI_D3hot,4,2                  ; @PCI_D3hot
.subsections_via_symbols
