	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen7_fbc_activate
_gen7_fbc_activate:                     ## @gen7_fbc_activate
	.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, %r15
	movl	(%rdi), %r12d
	movl	$9, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	callq	_IS_GEMINILAKE
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	_CHICKEN_MISC_4@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_I915_READ
	movq	_FBC_STRIDE_OVERRIDE@GOTPCREL(%rip), %r13
	movq	_FBC_STRIDE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%r13), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	40(%r15), %rax
	movl	8(%rax), %edi
	callq	_i915_gem_object_get_tiling
	movq	_I915_TILING_X@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	orl	(%r13), %ebx
	orl	16(%r15), %ebx
LBB0_4:
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
LBB0_5:
	movq	%r15, %rdi
	callq	_IS_IVYBRIDGE
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	32(%r15), %edi
	callq	_IVB_DPFC_CTL_PLANE
	movl	%eax, %r14d
	jmp	LBB0_8
LBB0_6:
	xorl	%r14d, %r14d
LBB0_8:
	movq	48(%r15), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	cmpl	$2, (%rcx)
	sete	%al
	leal	(%r12,%rax), %ecx
	addl	$-3, %ecx
	cmpl	$2, %ecx
	jb	LBB0_26
## %bb.9:
	addl	%eax, %r12d
	cmpl	$1, %r12d
	je	LBB0_12
## %bb.10:
	cmpl	$2, %r12d
	jne	LBB0_14
## %bb.11:
	movq	_DPFC_CTL_LIMIT_2X@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_26:
	movq	_DPFC_CTL_LIMIT_4X@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_DPFC_CTL_LIMIT_1X@GOTPCREL(%rip), %rax
LBB0_13:
	orl	(%rax), %r14d
LBB0_14:
	movq	_PLANE_HAS_FENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 20(%r15)
	je	LBB0_16
## %bb.15:
	movq	_IVB_DPFC_CTL_FENCE_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_SNB_DPFC_CTL_SA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SNB_CPU_FENCE_ENABLE@GOTPCREL(%rip), %rax
	movq	40(%r15), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_I915_WRITE
	movq	_DPFC_CPU_FENCE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r15), %esi
	jmp	LBB0_17
LBB0_16:
	movq	_SNB_DPFC_CTL_SA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_I915_WRITE
	movq	_DPFC_CPU_FENCE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
LBB0_17:
	callq	_I915_WRITE
	movq	8(%r15), %r12
	movq	_FBC_CTL_FALSE_COLOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_IS_IVYBRIDGE
	testq	%rax, %rax
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_19
## %bb.18:
	movq	%r12, %r14
	movq	_ILK_DISPLAY_CHICKEN1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ILK_FBCQ_DIS@GOTPCREL(%rip), %r13
	movl	%edi, %r12d
	jmp	LBB0_22
LBB0_19:
	movq	%r15, %rdi
	callq	_IS_HASWELL
	testq	%rax, %rax
	jne	LBB0_21
## %bb.20:
	movq	%r15, %rdi
	callq	_IS_BROADWELL
	testq	%rax, %rax
	je	LBB0_23
LBB0_21:
	movq	%r12, %r14
	movl	28(%r15), %edi
	callq	_CHICKEN_PIPESL_1
	movl	%eax, %r12d
	movl	28(%r15), %edi
	callq	_CHICKEN_PIPESL_1
	movl	%eax, %edi
	movq	_HSW_FBCQ_DIS@GOTPCREL(%rip), %r13
LBB0_22:
	callq	_I915_READ
	orl	(%r13), %eax
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movq	%r14, %r12
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_23:
	movq	%r15, %rdi
	movl	$11, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	_ILK_DPFC_CHICKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_I915_WRITE
LBB0_25:
	xorl	%eax, %eax
	testq	%r12, %r12
	cmovel	%eax, %ebx
	orl	%r14d, %ebx
	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	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_fbc_recompress           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHICKEN_MISC_4,4,2             ## @CHICKEN_MISC_4
	.comm	_FBC_STRIDE_OVERRIDE,4,2        ## @FBC_STRIDE_OVERRIDE
	.comm	_FBC_STRIDE_MASK,4,2            ## @FBC_STRIDE_MASK
	.comm	_I915_TILING_X,8,3              ## @I915_TILING_X
	.comm	_DPFC_CTL_LIMIT_4X,4,2          ## @DPFC_CTL_LIMIT_4X
	.comm	_DPFC_CTL_LIMIT_2X,4,2          ## @DPFC_CTL_LIMIT_2X
	.comm	_DPFC_CTL_LIMIT_1X,4,2          ## @DPFC_CTL_LIMIT_1X
	.comm	_PLANE_HAS_FENCE,4,2            ## @PLANE_HAS_FENCE
	.comm	_IVB_DPFC_CTL_FENCE_EN,4,2      ## @IVB_DPFC_CTL_FENCE_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
	.comm	_FBC_CTL_FALSE_COLOR,4,2        ## @FBC_CTL_FALSE_COLOR
	.comm	_ILK_DISPLAY_CHICKEN1,4,2       ## @ILK_DISPLAY_CHICKEN1
	.comm	_ILK_FBCQ_DIS,4,2               ## @ILK_FBCQ_DIS
	.comm	_HSW_FBCQ_DIS,4,2               ## @HSW_FBCQ_DIS
	.comm	_ILK_DPFC_CHICKEN,4,2           ## @ILK_DPFC_CHICKEN
	.comm	_ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL,4,2 ## @ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL
	.comm	_ILK_DPFC_CONTROL,4,2           ## @ILK_DPFC_CONTROL
	.comm	_DPFC_CTL_EN,4,2                ## @DPFC_CTL_EN
	.no_dead_strip	_gen7_fbc_activate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen7_fbc_activate
_gen7_fbc_activate:                     ; @gen7_fbc_activate
	.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	w21, [x0]
	mov	w1, #9
	bl	_IS_GEN
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_IS_GEMINILAKE
	cbnz	w0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x22, _CHICKEN_MISC_4@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CHICKEN_MISC_4@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh2:
	adrp	x23, _FBC_STRIDE_OVERRIDE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FBC_STRIDE_OVERRIDE@GOTPAGEOFF]
Lloh4:
	adrp	x8, _FBC_STRIDE_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FBC_STRIDE_MASK@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh6:
	ldr	w8, [x8]
	orr	w8, w8, w9
	bic	w20, w0, w8
	ldr	x8, [x19, #40]
	ldr	w0, [x8, #8]
	bl	_i915_gem_object_get_tiling
Lloh7:
	adrp	x8, _I915_TILING_X@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I915_TILING_X@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x23]
	ldr	w9, [x19, #16]
	orr	w8, w8, w20
	orr	w20, w8, w9
LBB0_4:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_I915_WRITE
LBB0_5:
	mov	x0, x19
	bl	_IS_IVYBRIDGE
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x19, #32]
	bl	_IVB_DPFC_CTL_PLANE
	mov	x20, x0
	b	LBB0_8
LBB0_7:
	mov	w20, #0
LBB0_8:
	ldr	x8, [x19, #48]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w8, #2
	cinc	w8, w21, eq
	sub	w9, w8, #3
	cmp	w9, #2
	b.lo	LBB0_12
; %bb.9:
	cmp	w8, #1
	b.eq	LBB0_13
; %bb.10:
	cmp	w8, #2
	b.ne	LBB0_15
; %bb.11:
Lloh10:
	adrp	x8, _DPFC_CTL_LIMIT_2X@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DPFC_CTL_LIMIT_2X@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh12:
	adrp	x8, _DPFC_CTL_LIMIT_4X@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DPFC_CTL_LIMIT_4X@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh14:
	adrp	x8, _DPFC_CTL_LIMIT_1X@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DPFC_CTL_LIMIT_1X@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_15:
	ldr	w8, [x19, #20]
Lloh16:
	adrp	x9, _PLANE_HAS_FENCE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PLANE_HAS_FENCE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
Lloh19:
	adrp	x8, _IVB_DPFC_CTL_FENCE_EN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IVB_DPFC_CTL_FENCE_EN@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w20, w8, w20
Lloh22:
	adrp	x8, _SNB_DPFC_CTL_SA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SNB_DPFC_CTL_SA@GOTPAGEOFF]
Lloh24:
	adrp	x9, _SNB_CPU_FENCE_ENABLE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SNB_CPU_FENCE_ENABLE@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	ldr	w8, [x9]
	ldr	x9, [x19, #40]
	ldr	x9, [x9]
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_I915_WRITE
Lloh28:
	adrp	x8, _DPFC_CPU_FENCE_OFFSET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DPFC_CPU_FENCE_OFFSET@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	w1, [x19, #24]
	b	LBB0_18
LBB0_17:
Lloh31:
	adrp	x8, _SNB_DPFC_CTL_SA@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SNB_DPFC_CTL_SA@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_I915_WRITE
Lloh34:
	adrp	x8, _DPFC_CPU_FENCE_OFFSET@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DPFC_CPU_FENCE_OFFSET@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	mov	w1, #0
LBB0_18:
	bl	_I915_WRITE
	ldr	x22, [x19, #8]
Lloh37:
	adrp	x8, _FBC_CTL_FALSE_COLOR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _FBC_CTL_FALSE_COLOR@GOTPAGEOFF]
Lloh39:
	ldr	w23, [x8]
	mov	x0, x19
	bl	_IS_IVYBRIDGE
	cbz	x0, LBB0_20
; %bb.19:
Lloh40:
	adrp	x8, _ILK_DISPLAY_CHICKEN1@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ILK_DISPLAY_CHICKEN1@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
Lloh43:
	adrp	x24, _ILK_FBCQ_DIS@GOTPAGE
Lloh44:
	ldr	x24, [x24, _ILK_FBCQ_DIS@GOTPAGEOFF]
	mov	x21, x0
	b	LBB0_23
LBB0_20:
	mov	x0, x19
	bl	_IS_HASWELL
	cbnz	x0, LBB0_22
; %bb.21:
	mov	x0, x19
	bl	_IS_BROADWELL
	cbz	x0, LBB0_24
LBB0_22:
	ldr	w0, [x19, #28]
	bl	_CHICKEN_PIPESL_1
	mov	x21, x0
	ldr	w0, [x19, #28]
	bl	_CHICKEN_PIPESL_1
Lloh45:
	adrp	x24, _HSW_FBCQ_DIS@GOTPAGE
Lloh46:
	ldr	x24, [x24, _HSW_FBCQ_DIS@GOTPAGEOFF]
LBB0_23:
	bl	_I915_READ
	ldr	w8, [x24]
	orr	w1, w8, w0
	mov	x0, x21
	bl	_I915_WRITE
LBB0_24:
	mov	x0, x19
	mov	w1, #11
	bl	_IS_GEN
	cbz	x0, LBB0_26
; %bb.25:
Lloh47:
	adrp	x8, _ILK_DPFC_CHICKEN@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ILK_DPFC_CHICKEN@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
Lloh50:
	adrp	x8, _ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	bl	_I915_WRITE
LBB0_26:
	cmp	x22, #0
	csel	w8, wzr, w23, eq
Lloh53:
	adrp	x9, _ILK_DPFC_CONTROL@GOTPAGE
Lloh54:
	ldr	x9, [x9, _ILK_DPFC_CONTROL@GOTPAGEOFF]
	orr	w8, w8, w20
Lloh55:
	ldr	w0, [x9]
Lloh56:
	adrp	x9, _DPFC_CTL_EN@GOTPAGE
Lloh57:
	ldr	x9, [x9, _DPFC_CTL_EN@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_I915_WRITE
	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	_intel_fbc_recompress
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_CHICKEN_MISC_4,4,2             ; @CHICKEN_MISC_4
	.comm	_FBC_STRIDE_OVERRIDE,4,2        ; @FBC_STRIDE_OVERRIDE
	.comm	_FBC_STRIDE_MASK,4,2            ; @FBC_STRIDE_MASK
	.comm	_I915_TILING_X,8,3              ; @I915_TILING_X
	.comm	_DPFC_CTL_LIMIT_4X,4,2          ; @DPFC_CTL_LIMIT_4X
	.comm	_DPFC_CTL_LIMIT_2X,4,2          ; @DPFC_CTL_LIMIT_2X
	.comm	_DPFC_CTL_LIMIT_1X,4,2          ; @DPFC_CTL_LIMIT_1X
	.comm	_PLANE_HAS_FENCE,4,2            ; @PLANE_HAS_FENCE
	.comm	_IVB_DPFC_CTL_FENCE_EN,4,2      ; @IVB_DPFC_CTL_FENCE_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
	.comm	_FBC_CTL_FALSE_COLOR,4,2        ; @FBC_CTL_FALSE_COLOR
	.comm	_ILK_DISPLAY_CHICKEN1,4,2       ; @ILK_DISPLAY_CHICKEN1
	.comm	_ILK_FBCQ_DIS,4,2               ; @ILK_FBCQ_DIS
	.comm	_HSW_FBCQ_DIS,4,2               ; @HSW_FBCQ_DIS
	.comm	_ILK_DPFC_CHICKEN,4,2           ; @ILK_DPFC_CHICKEN
	.comm	_ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL,4,2 ; @ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL
	.comm	_ILK_DPFC_CONTROL,4,2           ; @ILK_DPFC_CONTROL
	.comm	_DPFC_CTL_EN,4,2                ; @DPFC_CTL_EN
	.no_dead_strip	_gen7_fbc_activate
.subsections_via_symbols
