	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ironlake_enable_fbc
_ironlake_enable_fbc:                   ## @ironlake_enable_fbc
	.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	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rdi), %rdi
	movq	16(%r12), %rbx
	callq	_to_intel_framebuffer
	movq	(%rax), %r14
	movq	%r12, %rdi
	callq	_to_intel_crtc
	movq	%rax, %r15
	cmpl	$0, (%rax)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_1
## %bb.2:
	movq	_DPFC_CTL_PLANEA@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_DPFC_CTL_PLANEB@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %ebx
	movq	_ILK_DPFC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_DPFC_RESERVED@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_DPFC_CTL_LIMIT_1X@GOTPCREL(%rip), %rcx
	movq	_DPFC_CTL_PERSISTENT_MODE@GOTPCREL(%rip), %rdx
	movq	_DPFC_CTL_FENCE_EN@GOTPCREL(%rip), %r8
	movq	_ILK_DPFC_CHICKEN@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	movq	_DPFC_HT_MODIFY@GOTPCREL(%rip), %rsi
	orl	(%rcx), %ebx
	movl	(%rsi), %esi
	orl	%eax, %ebx
	orl	(%rdx), %ebx
	orl	(%r8), %ebx
	orl	(%r14), %ebx
	callq	_I915_WRITE
	movq	_ILK_DPFC_RECOMP_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DPFC_RECOMP_STALL_EN@GOTPCREL(%rip), %rax
	movq	_DPFC_RECOMP_STALL_WM_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$200, %edx
	shlq	%cl, %rdx
	orl	(%rax), %edx
	movq	_DPFC_RECOMP_TIMER_COUNT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %r13
	orl	%edx, %r13d
	movl	%r13d, %esi
	callq	_I915_WRITE
	movq	_ILK_DPFC_FENCE_YOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_I915_WRITE
	movq	_ILK_FBC_RT_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ILK_FBC_RT_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	4(%r14), %esi
	callq	_I915_WRITE
	movq	_ILK_DPFC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DPFC_CTL_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_I915_WRITE
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_IS_GEN6
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_SNB_DPFC_CTL_SA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SNB_CPU_FENCE_ENABLE@GOTPCREL(%rip), %rax
	movl	(%r14), %esi
	orl	(%rax), %esi
	callq	_I915_WRITE
	movq	_DPFC_CPU_FENCE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_I915_WRITE
	movq	%rbx, %rdi
	callq	_sandybridge_blit_fbc_update
LBB0_5:
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DPFC_CTL_PLANEA,4,2            ## @DPFC_CTL_PLANEA
	.comm	_DPFC_CTL_PLANEB,4,2            ## @DPFC_CTL_PLANEB
	.comm	_ILK_DPFC_CONTROL,4,2           ## @ILK_DPFC_CONTROL
	.comm	_DPFC_RESERVED,4,2              ## @DPFC_RESERVED
	.comm	_DPFC_CTL_LIMIT_1X,4,2          ## @DPFC_CTL_LIMIT_1X
	.comm	_DPFC_CTL_PERSISTENT_MODE,4,2   ## @DPFC_CTL_PERSISTENT_MODE
	.comm	_DPFC_CTL_FENCE_EN,4,2          ## @DPFC_CTL_FENCE_EN
	.comm	_ILK_DPFC_CHICKEN,4,2           ## @ILK_DPFC_CHICKEN
	.comm	_DPFC_HT_MODIFY,4,2             ## @DPFC_HT_MODIFY
	.comm	_ILK_DPFC_RECOMP_CTL,4,2        ## @ILK_DPFC_RECOMP_CTL
	.comm	_DPFC_RECOMP_STALL_EN,8,3       ## @DPFC_RECOMP_STALL_EN
	.comm	_DPFC_RECOMP_STALL_WM_SHIFT,8,3 ## @DPFC_RECOMP_STALL_WM_SHIFT
	.comm	_DPFC_RECOMP_TIMER_COUNT_SHIFT,8,3 ## @DPFC_RECOMP_TIMER_COUNT_SHIFT
	.comm	_ILK_DPFC_FENCE_YOFF,4,2        ## @ILK_DPFC_FENCE_YOFF
	.comm	_ILK_FBC_RT_BASE,4,2            ## @ILK_FBC_RT_BASE
	.comm	_ILK_FBC_RT_VALID,4,2           ## @ILK_FBC_RT_VALID
	.comm	_DPFC_CTL_EN,4,2                ## @DPFC_CTL_EN
	.comm	_SNB_DPFC_CTL_SA,4,2            ## @SNB_DPFC_CTL_SA
	.comm	_SNB_CPU_FENCE_ENABLE,4,2       ## @SNB_CPU_FENCE_ENABLE
	.comm	_DPFC_CPU_FENCE_OFFSET,4,2      ## @DPFC_CPU_FENCE_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enabled fbc on plane %d\n"

	.no_dead_strip	_ironlake_enable_fbc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ironlake_enable_fbc
_ironlake_enable_fbc:                   ; @ironlake_enable_fbc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x20, x0
	ldp	x0, x8, [x0, #8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	bl	_to_intel_framebuffer
	ldr	x23, [x0]
	mov	x0, x20
	bl	_to_intel_crtc
	mov	x21, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _DPFC_CTL_PLANEA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DPFC_CTL_PLANEA@GOTPAGEOFF]
Lloh2:
	adrp	x10, _DPFC_CTL_PLANEB@GOTPAGE
Lloh3:
	ldr	x10, [x10, _DPFC_CTL_PLANEB@GOTPAGEOFF]
	cmp	w8, #0
	csel	x8, x9, x10, eq
	ldr	w24, [x8]
Lloh4:
	adrp	x8, _ILK_DPFC_CONTROL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ILK_DPFC_CONTROL@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh7:
	adrp	x8, _DPFC_RESERVED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DPFC_RESERVED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w26, w8, w0
Lloh10:
	adrp	x8, _DPFC_CTL_LIMIT_1X@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DPFC_CTL_LIMIT_1X@GOTPAGEOFF]
Lloh12:
	adrp	x9, _DPFC_CTL_PERSISTENT_MODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DPFC_CTL_PERSISTENT_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w27, [x8]
Lloh15:
	ldr	w28, [x9]
Lloh16:
	adrp	x8, _DPFC_CTL_FENCE_EN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DPFC_CTL_FENCE_EN@GOTPAGEOFF]
Lloh18:
	ldr	w25, [x8]
	ldr	w19, [x23]
Lloh19:
	adrp	x8, _ILK_DPFC_CHICKEN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ILK_DPFC_CHICKEN@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x8, _DPFC_HT_MODIFY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DPFC_HT_MODIFY@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_I915_WRITE
Lloh25:
	adrp	x8, _ILK_DPFC_RECOMP_CTL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ILK_DPFC_RECOMP_CTL@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _DPFC_RECOMP_STALL_EN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DPFC_RECOMP_STALL_EN@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _DPFC_RECOMP_STALL_WM_SHIFT@GOTPAGE
Lloh32:
	ldr	x9, [x9, _DPFC_RECOMP_STALL_WM_SHIFT@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	mov	w10, #200
	lsl	x9, x10, x9
	orr	w8, w9, w8
Lloh34:
	adrp	x9, _DPFC_RECOMP_TIMER_COUNT_SHIFT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _DPFC_RECOMP_TIMER_COUNT_SHIFT@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	lsl	x9, x22, x9
	orr	w1, w8, w9
	bl	_I915_WRITE
Lloh37:
	adrp	x8, _ILK_DPFC_FENCE_YOFF@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ILK_DPFC_FENCE_YOFF@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_I915_WRITE
Lloh40:
	adrp	x8, _ILK_FBC_RT_BASE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ILK_FBC_RT_BASE@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	ldr	w8, [x23, #4]
Lloh43:
	adrp	x9, _ILK_FBC_RT_VALID@GOTPAGE
Lloh44:
	ldr	x9, [x9, _ILK_FBC_RT_VALID@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_I915_WRITE
Lloh46:
	adrp	x8, _ILK_DPFC_CONTROL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ILK_DPFC_CONTROL@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
Lloh49:
	adrp	x8, _DPFC_CTL_EN@GOTPAGE
Lloh50:
	ldr	x8, [x8, _DPFC_CTL_EN@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	orr	w9, w27, w24
	orr	w9, w9, w26
	orr	w9, w9, w28
	orr	w9, w9, w25
	orr	w9, w9, w19
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	orr	w1, w9, w8
	bl	_I915_WRITE
	mov	x0, x19
	bl	_IS_GEN6
	cbz	x0, LBB0_2
; %bb.1:
Lloh52:
	adrp	x8, _SNB_DPFC_CTL_SA@GOTPAGE
Lloh53:
	ldr	x8, [x8, _SNB_DPFC_CTL_SA@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
Lloh55:
	adrp	x8, _SNB_CPU_FENCE_ENABLE@GOTPAGE
Lloh56:
	ldr	x8, [x8, _SNB_CPU_FENCE_ENABLE@GOTPAGEOFF]
Lloh57:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w1, w9, w8
	bl	_I915_WRITE
Lloh58:
	adrp	x8, _DPFC_CPU_FENCE_OFFSET@GOTPAGE
Lloh59:
	ldr	x8, [x8, _DPFC_CPU_FENCE_OFFSET@GOTPAGEOFF]
Lloh60:
	ldr	w0, [x8]
	ldr	w1, [x20]
	bl	_I915_WRITE
	mov	x0, x19
	bl	_sandybridge_blit_fbc_update
LBB0_2:
	ldr	w1, [x21]
Lloh61:
	adrp	x0, l_.str@PAGE
Lloh62:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_DRM_DEBUG_KMS
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh61, Lloh62
	.cfi_endproc
                                        ; -- End function
	.comm	_DPFC_CTL_PLANEA,4,2            ; @DPFC_CTL_PLANEA
	.comm	_DPFC_CTL_PLANEB,4,2            ; @DPFC_CTL_PLANEB
	.comm	_ILK_DPFC_CONTROL,4,2           ; @ILK_DPFC_CONTROL
	.comm	_DPFC_RESERVED,4,2              ; @DPFC_RESERVED
	.comm	_DPFC_CTL_LIMIT_1X,4,2          ; @DPFC_CTL_LIMIT_1X
	.comm	_DPFC_CTL_PERSISTENT_MODE,4,2   ; @DPFC_CTL_PERSISTENT_MODE
	.comm	_DPFC_CTL_FENCE_EN,4,2          ; @DPFC_CTL_FENCE_EN
	.comm	_ILK_DPFC_CHICKEN,4,2           ; @ILK_DPFC_CHICKEN
	.comm	_DPFC_HT_MODIFY,4,2             ; @DPFC_HT_MODIFY
	.comm	_ILK_DPFC_RECOMP_CTL,4,2        ; @ILK_DPFC_RECOMP_CTL
	.comm	_DPFC_RECOMP_STALL_EN,8,3       ; @DPFC_RECOMP_STALL_EN
	.comm	_DPFC_RECOMP_STALL_WM_SHIFT,8,3 ; @DPFC_RECOMP_STALL_WM_SHIFT
	.comm	_DPFC_RECOMP_TIMER_COUNT_SHIFT,8,3 ; @DPFC_RECOMP_TIMER_COUNT_SHIFT
	.comm	_ILK_DPFC_FENCE_YOFF,4,2        ; @ILK_DPFC_FENCE_YOFF
	.comm	_ILK_FBC_RT_BASE,4,2            ; @ILK_FBC_RT_BASE
	.comm	_ILK_FBC_RT_VALID,4,2           ; @ILK_FBC_RT_VALID
	.comm	_DPFC_CTL_EN,4,2                ; @DPFC_CTL_EN
	.comm	_SNB_DPFC_CTL_SA,4,2            ; @SNB_DPFC_CTL_SA
	.comm	_SNB_CPU_FENCE_ENABLE,4,2       ; @SNB_CPU_FENCE_ENABLE
	.comm	_DPFC_CPU_FENCE_OFFSET,4,2      ; @DPFC_CPU_FENCE_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enabled fbc on plane %d\n"

	.no_dead_strip	_ironlake_enable_fbc
.subsections_via_symbols
