	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_restore_state             ## -- Begin function i915_restore_state
	.p2align	4, 0x90
_i915_restore_state:                    ## @i915_restore_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_GCDGMBUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	48(%r14), %edx
	movq	%rbx, %rdi
	callq	_pci_write_config_word
LBB0_2:
	movq	%r14, %rdi
	callq	_i915_restore_display
	movq	%r14, %rdi
	callq	_INTEL_GEN
	cmpl	$6, %eax
	jg	LBB0_4
## %bb.3:
	movq	_CACHE_MODE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-65536, %esi                   ## imm = 0xFFFF0000
	orl	16(%r14), %esi
	callq	_I915_WRITE
LBB0_4:
	movq	_MI_ARB_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-65536, %esi                   ## imm = 0xFFFF0000
	orl	20(%r14), %esi
	callq	_I915_WRITE
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_IS_MOBILE
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	xorl	%edi, %edi
	callq	_SWF0
	movq	24(%r14), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	xorl	%edi, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$1, %edi
	callq	_SWF0
	movq	24(%r14), %rcx
	movl	4(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$1, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	4(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$2, %edi
	callq	_SWF0
	movq	24(%r14), %rcx
	movl	8(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$2, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	8(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$3, %edi
	callq	_SWF0
	movq	24(%r14), %rcx
	movl	12(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$3, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	12(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$4, %edi
	callq	_SWF0
	movq	24(%r14), %rcx
	movl	16(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$4, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	16(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$5, %edi
	callq	_SWF0
	movq	24(%r14), %rcx
	movl	20(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$5, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	20(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$6, %edi
	callq	_SWF0
	movq	24(%r14), %rcx
	movl	24(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$6, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	24(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	jmp	LBB0_12
LBB0_7:
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	32(%r14), %rbx
	xorl	%edi, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$1, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	4(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$2, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	8(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$3, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	12(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$4, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	16(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$5, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	20(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$6, %edi
	callq	_SWF1
	movl	%eax, %edi
	movl	$6, %eax
	jmp	LBB0_13
LBB0_9:
	movq	%r14, %rdi
	callq	_HAS_GMCH
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_SWF0
	movq	24(%r14), %rcx
	movl	(%rcx,%rbx,4), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_SWF1
	movq	32(%r14), %rcx
	movl	(%rcx,%rbx,4), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	incq	%rbx
	cmpq	$16, %rbx
	jne	LBB0_11
LBB0_12:
	leaq	40(%r14), %rbx
	xorl	%edi, %edi
	callq	_SWF3
	movq	40(%r14), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$1, %edi
	callq	_SWF3
	movq	40(%r14), %rcx
	movl	4(%rcx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	$2, %edi
	callq	_SWF3
	movl	%eax, %edi
	movl	$2, %eax
LBB0_13:
	movq	(%rbx), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_I915_WRITE
LBB0_14:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_intel_gmbus_reset
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GCDGMBUS,4,2                   ## @GCDGMBUS
	.comm	_CACHE_MODE_0,4,2               ## @CACHE_MODE_0
	.comm	_MI_ARB_STATE,4,2               ## @MI_ARB_STATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_restore_state             ; -- Begin function i915_restore_state
	.p2align	2
_i915_restore_state:                    ; @i915_restore_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
	ldr	x20, [x0, #8]
	bl	_mutex_lock
	mov	x0, x19
	mov	w1, #4
	bl	_IS_GEN
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _GCDGMBUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GCDGMBUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19, #48]
	mov	x0, x20
	bl	_pci_write_config_word
LBB0_2:
	mov	x0, x19
	bl	_i915_restore_display
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #6
	b.gt	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _CACHE_MODE_0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CACHE_MODE_0@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w8, [x19, #16]
	orr	w1, w8, #0xffff0000
	bl	_I915_WRITE
LBB0_4:
Lloh6:
	adrp	x8, _MI_ARB_STATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MI_ARB_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w8, [x19, #20]
	orr	w1, w8, #0xffff0000
	bl	_I915_WRITE
	mov	x0, x19
	mov	w1, #2
	bl	_IS_GEN
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_IS_MOBILE
	cbz	x0, LBB0_7
; %bb.6:
	mov	w0, #0
	bl	_SWF0
	ldr	x8, [x19, #24]
	ldr	w1, [x8]
	bl	_I915_WRITE
	mov	w0, #0
	bl	_SWF1
	ldr	x8, [x19, #32]
	ldr	w1, [x8]
	bl	_I915_WRITE
	mov	w0, #1
	bl	_SWF0
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #4]
	bl	_I915_WRITE
	mov	w0, #1
	bl	_SWF1
	ldr	x8, [x19, #32]
	ldr	w1, [x8, #4]
	bl	_I915_WRITE
	mov	w20, #2
	mov	w0, #2
	bl	_SWF0
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #8]
	bl	_I915_WRITE
	mov	w0, #2
	bl	_SWF1
	ldr	x8, [x19, #32]
	ldr	w1, [x8, #8]
	bl	_I915_WRITE
	mov	w0, #3
	bl	_SWF0
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #12]
	bl	_I915_WRITE
	mov	w0, #3
	bl	_SWF1
	ldr	x8, [x19, #32]
	ldr	w1, [x8, #12]
	bl	_I915_WRITE
	mov	w0, #4
	bl	_SWF0
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #16]
	bl	_I915_WRITE
	mov	w0, #4
	bl	_SWF1
	ldr	x8, [x19, #32]
	ldr	w1, [x8, #16]
	bl	_I915_WRITE
	mov	w0, #5
	bl	_SWF0
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #20]
	bl	_I915_WRITE
	mov	w0, #5
	bl	_SWF1
	ldr	x8, [x19, #32]
	ldr	w1, [x8, #20]
	bl	_I915_WRITE
	mov	w0, #6
	bl	_SWF0
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #24]
	bl	_I915_WRITE
	mov	w0, #6
	bl	_SWF1
	ldr	x8, [x19, #32]
	ldr	w1, [x8, #24]
	bl	_I915_WRITE
	mov	w0, #0
	bl	_SWF3
	mov	x21, x19
	ldr	x8, [x21, #40]!
	ldr	w1, [x8]
	bl	_I915_WRITE
	mov	w0, #1
	bl	_SWF3
	ldr	x8, [x21]
	ldr	w1, [x8, #4]
	bl	_I915_WRITE
	b	LBB0_13
LBB0_7:
	mov	x0, x19
	mov	w1, #2
	bl	_IS_GEN
	cbz	x0, LBB0_9
; %bb.8:
	mov	w0, #0
	bl	_SWF1
	mov	x21, x19
	ldr	x8, [x21, #32]!
	ldr	w1, [x8]
	bl	_I915_WRITE
	mov	w0, #1
	bl	_SWF1
	ldr	x8, [x21]
	ldr	w1, [x8, #4]
	bl	_I915_WRITE
	mov	w0, #2
	bl	_SWF1
	ldr	x8, [x21]
	ldr	w1, [x8, #8]
	bl	_I915_WRITE
	mov	w0, #3
	bl	_SWF1
	ldr	x8, [x21]
	ldr	w1, [x8, #12]
	bl	_I915_WRITE
	mov	w0, #4
	bl	_SWF1
	ldr	x8, [x21]
	ldr	w1, [x8, #16]
	bl	_I915_WRITE
	mov	w0, #5
	bl	_SWF1
	ldr	x8, [x21]
	ldr	w1, [x8, #20]
	bl	_I915_WRITE
	mov	w20, #6
	mov	w0, #6
	bl	_SWF1
	b	LBB0_14
LBB0_9:
	mov	x0, x19
	bl	_HAS_GMCH
	cbz	x0, LBB0_15
; %bb.10:
	mov	x20, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_SWF0
	ldr	x8, [x19, #24]
	lsl	x21, x20, #2
	ldr	w1, [x8, x21]
	bl	_I915_WRITE
	mov	x0, x20
	bl	_SWF1
	ldr	x8, [x19, #32]
	ldr	w1, [x8, x21]
	bl	_I915_WRITE
	add	x20, x20, #1
	cmp	x20, #16
	b.ne	LBB0_11
; %bb.12:
	mov	w0, #0
	bl	_SWF3
	mov	x21, x19
	ldr	x8, [x21, #40]!
	ldr	w1, [x8]
	bl	_I915_WRITE
	mov	w0, #1
	bl	_SWF3
	ldr	x8, [x21]
	ldr	w1, [x8, #4]
	bl	_I915_WRITE
	mov	w20, #2
LBB0_13:
	mov	w0, #2
	bl	_SWF3
LBB0_14:
	ldr	x8, [x21]
	ldr	w1, [x8, x20, lsl #2]
	bl	_I915_WRITE
LBB0_15:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x19
	bl	_intel_gmbus_reset
	mov	w0, #0
	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	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GCDGMBUS,4,2                   ; @GCDGMBUS
	.comm	_CACHE_MODE_0,4,2               ; @CACHE_MODE_0
	.comm	_MI_ARB_STATE,4,2               ; @MI_ARB_STATE
.subsections_via_symbols
