	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ironlake_enable_rc6
_ironlake_enable_rc6:                   ## @ironlake_enable_rc6
	.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
	movq	8(%rdi), %r15
	movq	_RCS@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	shlq	$2, %rbx
	addq	24(%r15), %rbx
	callq	_intel_enable_rc6
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_mutex_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	%r14, %rdi
	callq	_ironlake_setup_rc6
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movl	16(%r15), %r12d
	movl	$0, 16(%r15)
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_intel_ring_begin
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_ironlake_teardown_rc6
	movl	%r12d, 16(%r15)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_MI_SUSPEND_FLUSH@GOTPCREL(%rip), %r13
	movq	_MI_SUSPEND_FLUSH_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_intel_ring_emit
	movq	_MI_SET_CONTEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_intel_ring_emit
	movq	8(%r15), %rax
	movq	_MI_MM_SPACE_GTT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_MI_SAVE_EXT_STATE_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MI_RESTORE_EXT_STATE_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_MI_RESTORE_INHIBIT@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_intel_ring_emit
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_intel_ring_emit
	movq	_MI_NOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_intel_ring_emit
	movq	_MI_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_intel_ring_emit
	movq	%rbx, %rdi
	callq	_intel_ring_advance
	movq	%rbx, %rdi
	callq	_intel_ring_idle
	movl	%r12d, 16(%r15)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ironlake_teardown_rc6          ## TAILCALL
LBB0_6:
	movq	_PWRCTXA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rax
	movq	_PWRCTX_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_I915_WRITE
	movq	_RSTDBYCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_I915_READ
	movq	_RCX_SW_EXIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RCS,8,3                        ## @RCS
	.comm	_MI_SUSPEND_FLUSH,4,2           ## @MI_SUSPEND_FLUSH
	.comm	_MI_SUSPEND_FLUSH_EN,4,2        ## @MI_SUSPEND_FLUSH_EN
	.comm	_MI_SET_CONTEXT,4,2             ## @MI_SET_CONTEXT
	.comm	_MI_MM_SPACE_GTT,4,2            ## @MI_MM_SPACE_GTT
	.comm	_MI_SAVE_EXT_STATE_EN,4,2       ## @MI_SAVE_EXT_STATE_EN
	.comm	_MI_RESTORE_EXT_STATE_EN,4,2    ## @MI_RESTORE_EXT_STATE_EN
	.comm	_MI_RESTORE_INHIBIT,4,2         ## @MI_RESTORE_INHIBIT
	.comm	_MI_NOOP,4,2                    ## @MI_NOOP
	.comm	_MI_FLUSH,4,2                   ## @MI_FLUSH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable ironlake power power savings\n"

	.comm	_PWRCTXA,4,2                    ## @PWRCTXA
	.comm	_PWRCTX_EN,4,2                  ## @PWRCTX_EN
	.comm	_RSTDBYCTL,4,2                  ## @RSTDBYCTL
	.comm	_RCX_SW_EXIT,4,2                ## @RCX_SW_EXIT
	.no_dead_strip	_ironlake_enable_rc6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ironlake_enable_rc6
_ironlake_enable_rc6:                   ; @ironlake_enable_rc6
	.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	x19, x0
	ldr	x21, [x0, #8]
	ldr	x20, [x21, #24]
Lloh0:
	adrp	x8, _RCS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RCS@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	bl	_intel_enable_rc6
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_mutex_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x19
	bl	_ironlake_setup_rc6
	cbnz	w0, LBB0_4
; %bb.2:
	add	x20, x20, x22, lsl #2
	ldr	w22, [x21, #16]
	str	wzr, [x21, #16]
	mov	x0, x20
	mov	w1, #6
	bl	_intel_ring_begin
	cbz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_ironlake_teardown_rc6
	str	w22, [x21, #16]
LBB0_4:
	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
LBB0_5:
Lloh3:
	adrp	x23, _MI_SUSPEND_FLUSH@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MI_SUSPEND_FLUSH@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x9, _MI_SUSPEND_FLUSH_EN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MI_SUSPEND_FLUSH_EN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_intel_ring_emit
Lloh8:
	adrp	x8, _MI_SET_CONTEXT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MI_SET_CONTEXT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_intel_ring_emit
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _MI_MM_SPACE_GTT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MI_MM_SPACE_GTT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _MI_SAVE_EXT_STATE_EN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MI_SAVE_EXT_STATE_EN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _MI_RESTORE_EXT_STATE_EN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MI_RESTORE_EXT_STATE_EN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh20:
	adrp	x9, _MI_RESTORE_INHIBIT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MI_RESTORE_INHIBIT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	x0, x20
	bl	_intel_ring_emit
	ldr	w1, [x23]
	mov	x0, x20
	bl	_intel_ring_emit
Lloh23:
	adrp	x8, _MI_NOOP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MI_NOOP@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_intel_ring_emit
Lloh26:
	adrp	x8, _MI_FLUSH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MI_FLUSH@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_intel_ring_emit
	mov	x0, x20
	bl	_intel_ring_advance
	mov	x0, x20
	bl	_intel_ring_idle
	str	w22, [x21, #16]
	cbz	w0, LBB0_7
; %bb.6:
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	mov	x0, x19
	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
	b	_ironlake_teardown_rc6
LBB0_7:
Lloh31:
	adrp	x8, _PWRCTXA@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PWRCTXA@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	ldr	x8, [x21]
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _PWRCTX_EN@GOTPAGE
Lloh35:
	ldr	x9, [x9, _PWRCTX_EN@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_I915_WRITE
Lloh37:
	adrp	x8, _RSTDBYCTL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _RSTDBYCTL@GOTPAGEOFF]
Lloh39:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_I915_READ
Lloh40:
	adrp	x8, _RCX_SW_EXIT@GOTPAGE
Lloh41:
	ldr	x8, [x8, _RCX_SW_EXIT@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	bic	w1, w0, w8
	mov	x0, x19
	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
	b	_I915_WRITE
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_RCS,8,3                        ; @RCS
	.comm	_MI_SUSPEND_FLUSH,4,2           ; @MI_SUSPEND_FLUSH
	.comm	_MI_SUSPEND_FLUSH_EN,4,2        ; @MI_SUSPEND_FLUSH_EN
	.comm	_MI_SET_CONTEXT,4,2             ; @MI_SET_CONTEXT
	.comm	_MI_MM_SPACE_GTT,4,2            ; @MI_MM_SPACE_GTT
	.comm	_MI_SAVE_EXT_STATE_EN,4,2       ; @MI_SAVE_EXT_STATE_EN
	.comm	_MI_RESTORE_EXT_STATE_EN,4,2    ; @MI_RESTORE_EXT_STATE_EN
	.comm	_MI_RESTORE_INHIBIT,4,2         ; @MI_RESTORE_INHIBIT
	.comm	_MI_NOOP,4,2                    ; @MI_NOOP
	.comm	_MI_FLUSH,4,2                   ; @MI_FLUSH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable ironlake power power savings\n"

	.comm	_PWRCTXA,4,2                    ; @PWRCTXA
	.comm	_PWRCTX_EN,4,2                  ; @PWRCTX_EN
	.comm	_RSTDBYCTL,4,2                  ; @RSTDBYCTL
	.comm	_RCX_SW_EXIT,4,2                ; @RCX_SW_EXIT
	.no_dead_strip	_ironlake_enable_rc6
.subsections_via_symbols
