	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_drm_freeze
_i915_drm_freeze:                       ## @i915_drm_freeze
	.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
	movq	8(%rdi), %r12
	leaq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_MODESET_SUSPENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_intel_set_power_well
	movq	%r15, %rdi
	callq	_drm_kms_helper_poll_disable
	movq	(%r15), %rdi
	callq	_pci_save_state
	movq	_DRIVER_MODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_drm_core_check_feature
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_i915_gem_idle
	testl	%eax, %eax
	je	LBB0_2
## %bb.5:
	movl	%eax, %r14d
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_4
LBB0_2:
	leaq	4(%r12), %rdi
	callq	_cancel_delayed_work_sync
	movq	%r15, %rdi
	callq	_intel_modeset_disable
	movq	%r15, %rdi
	callq	_drm_irq_uninstall
	movl	$0, (%r12)
LBB0_3:
	movq	%r15, %rdi
	callq	_i915_save_state
	movq	%r15, %rdi
	callq	_intel_opregion_fini
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_console_lock
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_intel_fbdev_set_suspend
	xorl	%eax, %eax
	callq	_console_unlock
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MODESET_SUSPENDED,4,2          ## @MODESET_SUSPENDED
	.comm	_DRIVER_MODESET,4,2             ## @DRIVER_MODESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GEM idle failed, resume might fail\n"

	.no_dead_strip	_i915_drm_freeze
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_drm_freeze
_i915_drm_freeze:                       ; @i915_drm_freeze
	.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
	ldr	x21, [x0, #8]
	add	x20, x21, #8
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x8, _MODESET_SUSPENDED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MODESET_SUSPENDED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x21, #12]
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	mov	w1, #1
	bl	_intel_set_power_well
	mov	x0, x19
	bl	_drm_kms_helper_poll_disable
	ldr	x0, [x19]
	bl	_pci_save_state
Lloh3:
	adrp	x8, _DRIVER_MODESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRIVER_MODESET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_drm_core_check_feature
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_i915_gem_idle
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
	ldr	x0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_3:
	add	x0, x21, #4
	bl	_cancel_delayed_work_sync
	mov	x0, x19
	bl	_intel_modeset_disable
	mov	x0, x19
	bl	_drm_irq_uninstall
	str	wzr, [x21]
LBB0_4:
	mov	x0, x19
	bl	_i915_save_state
	mov	x0, x19
	bl	_intel_opregion_fini
	bl	_console_lock
	mov	x0, x19
	mov	w1, #1
	bl	_intel_fbdev_set_suspend
	bl	_console_unlock
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	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 AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MODESET_SUSPENDED,4,2          ; @MODESET_SUSPENDED
	.comm	_DRIVER_MODESET,4,2             ; @DRIVER_MODESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GEM idle failed, resume might fail\n"

	.no_dead_strip	_i915_drm_freeze
.subsections_via_symbols
