	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _intel_set_memory_cxsr
__intel_set_memory_cxsr:                ## @_intel_set_memory_cxsr
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_IS_VALLEYVIEW
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_IS_CHERRYVIEW
	testq	%rax, %rax
	je	LBB0_6
LBB0_2:
	movq	_FW_BLC_SELF_VLV@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movl	%eax, %r13d
	movq	_FW_CSPWRDWNEN@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	andl	%esi, %r13d
	movl	(%rbx), %edi
	testl	%r15d, %r15d
	cmovel	%r15d, %esi
LBB0_4:
	callq	_I915_WRITE
	movl	(%rbx), %edi
	callq	_POSTING_READ
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_trace_intel_memory_cxsr
	movl	%r15d, %edi
	callq	_enableddisabled
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_enableddisabled
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_DRM_DEBUG_KMS
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	callq	_IS_G4X
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_IS_I965GM
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:
	movq	_FW_BLC_SELF@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movl	%eax, %r13d
	movq	_FW_BLC_SELF_EN@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_9:
	movq	%r14, %rdi
	callq	_IS_PINEVIEW
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_DSPFW3@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_PINEVIEW_SELF_REFRESH_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %r13d
	andl	%eax, %r13d
	movl	%esi, %ecx
	orl	%eax, %ecx
	notl	%esi
	andl	%eax, %esi
	testl	%r15d, %r15d
	cmovnel	%ecx, %esi
	movl	(%rbx), %edi
	jmp	LBB0_4
LBB0_11:
	movq	%r14, %rdi
	callq	_IS_I945G
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_IS_I945GM
	testq	%rax, %rax
	je	LBB0_16
LBB0_13:
	movq	_FW_BLC_SELF@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movl	%eax, %r12d
	movq	_FW_BLC_SELF_EN@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %r13d
	movl	%r13d, %edi
	testl	%r15d, %r15d
	je	LBB0_18
## %bb.15:
	callq	__MASKED_BIT_ENABLE
	jmp	LBB0_19
LBB0_18:
	callq	__MASKED_BIT_DISABLE
LBB0_19:
	andl	%r12d, %r13d
	movl	(%rbx), %edi
	movl	%eax, %esi
	jmp	LBB0_4
LBB0_16:
	movq	%r14, %rdi
	callq	_IS_I915GM
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	movq	_INSTPM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movl	%eax, %r12d
	movq	_INSTPM_SELF_EN@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_20:
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_FW_BLC_SELF_VLV,4,2            ## @FW_BLC_SELF_VLV
	.comm	_FW_CSPWRDWNEN,4,2              ## @FW_CSPWRDWNEN
	.comm	_FW_BLC_SELF,4,2                ## @FW_BLC_SELF
	.comm	_FW_BLC_SELF_EN,4,2             ## @FW_BLC_SELF_EN
	.comm	_DSPFW3,4,2                     ## @DSPFW3
	.comm	_PINEVIEW_SELF_REFRESH_EN,4,2   ## @PINEVIEW_SELF_REFRESH_EN
	.comm	_INSTPM,4,2                     ## @INSTPM
	.comm	_INSTPM_SELF_EN,4,2             ## @INSTPM_SELF_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"memory self-refresh is %s (was %s)\n"

	.no_dead_strip	__intel_set_memory_cxsr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _intel_set_memory_cxsr
__intel_set_memory_cxsr:                ; @_intel_set_memory_cxsr
	.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, x1
	mov	x20, x0
	bl	_IS_VALLEYVIEW
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_IS_CHERRYVIEW
	cbz	x0, LBB0_6
LBB0_2:
Lloh0:
	adrp	x22, _FW_BLC_SELF_VLV@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FW_BLC_SELF_VLV@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh2:
	adrp	x8, _FW_CSPWRDWNEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FW_CSPWRDWNEN@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	and	w21, w8, w0
	ldr	w0, [x22]
	cmp	w19, #0
	csel	w1, wzr, w8, eq
LBB0_4:
	bl	_I915_WRITE
	ldr	w0, [x22]
	bl	_POSTING_READ
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_trace_intel_memory_cxsr
	mov	x0, x19
	bl	_enableddisabled
	mov	x19, x0
	mov	x0, x21
	bl	_enableddisabled
	mov	x2, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DRM_DEBUG_KMS
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
	mov	x0, x20
	bl	_IS_G4X
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_IS_I965GM
	cbz	x0, LBB0_9
LBB0_8:
Lloh6:
	adrp	x22, _FW_BLC_SELF@GOTPAGE
Lloh7:
	ldr	x22, [x22, _FW_BLC_SELF@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh8:
	adrp	x8, _FW_BLC_SELF_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FW_BLC_SELF_EN@GOTPAGEOFF]
	b	LBB0_3
LBB0_9:
	mov	x0, x20
	bl	_IS_PINEVIEW
	cbz	x0, LBB0_11
; %bb.10:
Lloh10:
	adrp	x22, _DSPFW3@GOTPAGE
Lloh11:
	ldr	x22, [x22, _DSPFW3@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh12:
	adrp	x8, _PINEVIEW_SELF_REFRESH_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PINEVIEW_SELF_REFRESH_EN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	and	w21, w8, w0
	orr	w9, w8, w0
	bic	w8, w0, w8
	cmp	w19, #0
	csel	w1, w8, w9, eq
	b	LBB0_18
LBB0_11:
	mov	x0, x20
	bl	_IS_I945G
	cbnz	x0, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_IS_I945GM
	cbz	x0, LBB0_19
LBB0_13:
Lloh15:
	adrp	x22, _FW_BLC_SELF@GOTPAGE
Lloh16:
	ldr	x22, [x22, _FW_BLC_SELF@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
	mov	x8, x0
Lloh17:
	adrp	x9, _FW_BLC_SELF_EN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FW_BLC_SELF_EN@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x9]
	and	w21, w0, w8
	cbz	w19, LBB0_16
; %bb.15:
	bl	__MASKED_BIT_ENABLE
	b	LBB0_17
LBB0_16:
	bl	__MASKED_BIT_DISABLE
LBB0_17:
	mov	x1, x0
LBB0_18:
	ldr	w0, [x22]
	b	LBB0_4
LBB0_19:
	mov	x0, x20
	bl	_IS_I915GM
	cbz	x0, LBB0_21
; %bb.20:
Lloh19:
	adrp	x22, _INSTPM@GOTPAGE
Lloh20:
	ldr	x22, [x22, _INSTPM@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
	mov	x8, x0
Lloh21:
	adrp	x9, _INSTPM_SELF_EN@GOTPAGE
Lloh22:
	ldr	x9, [x9, _INSTPM_SELF_EN@GOTPAGEOFF]
	b	LBB0_14
LBB0_21:
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_FW_BLC_SELF_VLV,4,2            ; @FW_BLC_SELF_VLV
	.comm	_FW_CSPWRDWNEN,4,2              ; @FW_CSPWRDWNEN
	.comm	_FW_BLC_SELF,4,2                ; @FW_BLC_SELF
	.comm	_FW_BLC_SELF_EN,4,2             ; @FW_BLC_SELF_EN
	.comm	_DSPFW3,4,2                     ; @DSPFW3
	.comm	_PINEVIEW_SELF_REFRESH_EN,4,2   ; @PINEVIEW_SELF_REFRESH_EN
	.comm	_INSTPM,4,2                     ; @INSTPM
	.comm	_INSTPM_SELF_EN,4,2             ; @INSTPM_SELF_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"memory self-refresh is %s (was %s)\n"

	.no_dead_strip	__intel_set_memory_cxsr
.subsections_via_symbols
