	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i8xx_fbc_activate
_i8xx_fbc_activate:                     ## @i8xx_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, %r12
	movl	(%rdi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	24(%rdi), %r13d
	movq	_FBC_LL_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$2, %esi
	callq	_IS_GEN
	movq	%rax, %r15
	cmpl	$-31, (%r14)
	jl	LBB0_3
## %bb.1:
	movl	$-1, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movl	%ebx, %edi
	callq	_FBC_TAG
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_I915_WRITE
	movl	(%r14), %eax
	leal	31(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$5, %ecx
	cmpl	%ecx, %ebx
	jl	LBB0_2
LBB0_3:
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_FBC_CTL_FENCE_DBL@GOTPCREL(%rip), %rax
	movq	_FBC_CTL_IDLE_IMM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_FBC_CTL_CPU_FENCE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	20(%r12), %edi
	callq	_FBC_CTL_PLANE
	orl	%eax, %ebx
	movq	_FBC_CONTROL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movq	_FBC_FENCE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r12), %esi
	callq	_I915_WRITE
LBB0_5:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	-44(%rbp)                       ## 4-byte Folded Reload
	cmpl	%eax, %r13d
	cmovll	%r13d, %eax
	xorl	%ecx, %ecx
	testq	%r15, %r15
	sete	%cl
	shll	$5, %ecx
	addl	$32, %ecx
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	movq	_FBC_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_I915_READ
	movq	_FBC_CTL_INTERVAL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$16383, %ebx                    ## imm = 0x3FFF
	shll	%cl, %ebx
	andl	%eax, %ebx
	movq	_FBC_CTL_EN@GOTPCREL(%rip), %rax
	movq	_FBC_CTL_PERIODIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_IS_I945GM
	xorl	%edx, %edx
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_FBC_CTL_C3_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_7:
	movq	_FBC_CTL_STRIDE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	decl	%r15d
	movzbl	%r15b, %esi
	shll	%cl, %esi
	orl	%edx, %r13d
	orl	%r13d, %ebx
	orl	%ebx, %esi
	movq	8(%r12), %rax
	movq	(%rax), %rax
	orl	(%rax), %esi
	movl	(%r14), %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	_FBC_LL_SIZE,4,2                ## @FBC_LL_SIZE
	.comm	_FBC_CTL_FENCE_DBL,4,2          ## @FBC_CTL_FENCE_DBL
	.comm	_FBC_CTL_IDLE_IMM,4,2           ## @FBC_CTL_IDLE_IMM
	.comm	_FBC_CTL_CPU_FENCE,4,2          ## @FBC_CTL_CPU_FENCE
	.comm	_FBC_CONTROL2,4,2               ## @FBC_CONTROL2
	.comm	_FBC_FENCE_OFF,4,2              ## @FBC_FENCE_OFF
	.comm	_FBC_CONTROL,4,2                ## @FBC_CONTROL
	.comm	_FBC_CTL_INTERVAL_SHIFT,4,2     ## @FBC_CTL_INTERVAL_SHIFT
	.comm	_FBC_CTL_EN,4,2                 ## @FBC_CTL_EN
	.comm	_FBC_CTL_PERIODIC,4,2           ## @FBC_CTL_PERIODIC
	.comm	_FBC_CTL_C3_IDLE,4,2            ## @FBC_CTL_C3_IDLE
	.comm	_FBC_CTL_STRIDE_SHIFT,4,2       ## @FBC_CTL_STRIDE_SHIFT
	.no_dead_strip	_i8xx_fbc_activate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i8xx_fbc_activate
_i8xx_fbc_activate:                     ; @i8xx_fbc_activate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	w22, [x0]
Lloh0:
	adrp	x25, _FBC_LL_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _FBC_LL_SIZE@GOTPAGEOFF]
	ldr	w24, [x25]
	ldr	w23, [x0, #24]
	mov	w1, #2
	bl	_IS_GEN
	mov	x20, x0
	ldr	w8, [x25]
	cmn	w8, #31
	b.lt	LBB0_3
; %bb.1:
	mov	w21, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w21, w21, #1
	mov	x0, x21
	bl	_FBC_TAG
	mov	w1, #0
	bl	_I915_WRITE
	ldr	w8, [x25]
	add	w9, w8, #31
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w21, w8, asr #5
	b.lt	LBB0_2
LBB0_3:
	mov	x0, x19
	mov	w1, #4
	bl	_IS_GEN
	cbz	x0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _FBC_CTL_FENCE_DBL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FBC_CTL_FENCE_DBL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _FBC_CTL_IDLE_IMM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FBC_CTL_IDLE_IMM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _FBC_CTL_CPU_FENCE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FBC_CTL_CPU_FENCE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w21, w8, w9
	ldr	w0, [x19, #20]
	bl	_FBC_CTL_PLANE
	orr	w1, w21, w0
Lloh11:
	adrp	x8, _FBC_CONTROL2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FBC_CONTROL2@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_I915_WRITE
Lloh14:
	adrp	x8, _FBC_FENCE_OFF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FBC_FENCE_OFF@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w1, [x19, #16]
	bl	_I915_WRITE
LBB0_5:
	sdiv	w8, w22, w24
	cmp	w23, w8
	csel	w8, w23, w8, lt
	cmp	x20, #0
	mov	w9, #32
	mov	w10, #64
	csel	w9, w10, w9, eq
Lloh17:
	adrp	x20, _FBC_CONTROL@GOTPAGE
Lloh18:
	ldr	x20, [x20, _FBC_CONTROL@GOTPAGEOFF]
	ldr	w0, [x20]
	sdiv	w21, w8, w9
	bl	_I915_READ
Lloh19:
	adrp	x8, _FBC_CTL_INTERVAL_SHIFT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FBC_CTL_INTERVAL_SHIFT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	mov	w9, #16383
	lsl	w8, w9, w8
	and	w8, w8, w0
Lloh22:
	adrp	x9, _FBC_CTL_EN@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FBC_CTL_EN@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x10, _FBC_CTL_PERIODIC@GOTPAGE
Lloh26:
	ldr	x10, [x10, _FBC_CTL_PERIODIC@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	orr	w9, w10, w9
	orr	w22, w9, w8
	mov	x0, x19
	bl	_IS_I945GM
Lloh28:
	adrp	x8, _FBC_CTL_C3_IDLE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FBC_CTL_C3_IDLE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w8, w22, w8
	sub	w9, w21, #1
	and	w9, w9, #0xff
Lloh31:
	adrp	x10, _FBC_CTL_STRIDE_SHIFT@GOTPAGE
Lloh32:
	ldr	x10, [x10, _FBC_CTL_STRIDE_SHIFT@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_I915_WRITE
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.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 AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_FBC_LL_SIZE,4,2                ; @FBC_LL_SIZE
	.comm	_FBC_CTL_FENCE_DBL,4,2          ; @FBC_CTL_FENCE_DBL
	.comm	_FBC_CTL_IDLE_IMM,4,2           ; @FBC_CTL_IDLE_IMM
	.comm	_FBC_CTL_CPU_FENCE,4,2          ; @FBC_CTL_CPU_FENCE
	.comm	_FBC_CONTROL2,4,2               ; @FBC_CONTROL2
	.comm	_FBC_FENCE_OFF,4,2              ; @FBC_FENCE_OFF
	.comm	_FBC_CONTROL,4,2                ; @FBC_CONTROL
	.comm	_FBC_CTL_INTERVAL_SHIFT,4,2     ; @FBC_CTL_INTERVAL_SHIFT
	.comm	_FBC_CTL_EN,4,2                 ; @FBC_CTL_EN
	.comm	_FBC_CTL_PERIODIC,4,2           ; @FBC_CTL_PERIODIC
	.comm	_FBC_CTL_C3_IDLE,4,2            ; @FBC_CTL_C3_IDLE
	.comm	_FBC_CTL_STRIDE_SHIFT,4,2       ; @FBC_CTL_STRIDE_SHIFT
	.no_dead_strip	_i8xx_fbc_activate
.subsections_via_symbols
