	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i8xx_enable_fbc
_i8xx_enable_fbc:                       ## @i8xx_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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	16(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movq	%r15, %rdi
	callq	_to_intel_framebuffer
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_to_intel_crtc
	movl	(%r14), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	_FBC_LL_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	(%r15), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_FBC_CTL_PLANEA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_FBC_CTL_PLANEB@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	cmpl	$-31, %edx
	jl	LBB0_3
## %bb.1:
	movq	$-1, %r13
	xorl	%r12d, %r12d
	movq	_FBC_TAG@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	addq	%r12, %rdi
	xorl	%esi, %esi
	callq	_I915_WRITE
	movl	(%r14), %eax
	leal	31(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$5, %ecx
	movslq	%ecx, %rax
	incq	%r13
	addq	$4, %r12
	cmpq	%rax, %r13
	jl	LBB0_2
LBB0_3:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	cmovel	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	-52(%rbp)                       ## 4-byte Folded Reload
	movl	%eax, %r15d
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmpl	%r15d, %eax
	cmovll	%eax, %r15d
	movq	_FBC_CTL_FENCE_DBL@GOTPCREL(%rip), %rax
	movq	_FBC_CTL_IDLE_IMM@GOTPCREL(%rip), %rcx
	movq	_FBC_CTL_CPU_FENCE@GOTPCREL(%rip), %rdx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	orl	(%rdx), %ebx
	movq	_FBC_CONTROL2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movq	_FBC_FENCE_OFF@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movl	(%r12), %esi
	callq	_I915_WRITE
	movq	_FBC_CTL_EN@GOTPCREL(%rip), %rax
	movq	_FBC_CTL_PERIODIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_IS_I945GM
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_FBC_CTL_C3_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_5:
	orl	%ecx, %r14d
	leal	63(%r15), %ebx
	testl	%r15d, %r15d
	cmovnsl	%r15d, %ebx
	sarl	$6, %ebx
	decl	%ebx
	movzbl	%bl, %esi
	movq	_FBC_CTL_STRIDE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	andl	$12287, %edx                    ## imm = 0x2FFF
	movq	_FBC_CTL_INTERVAL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rdx
	orl	%r14d, %esi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	orl	(%rax), %esi
	orl	%edx, %esi
	movq	_FBC_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_I915_WRITE
	movl	(%r12), %edx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FBC_LL_SIZE,4,2                ## @FBC_LL_SIZE
	.comm	_FBC_CTL_PLANEA,4,2             ## @FBC_CTL_PLANEA
	.comm	_FBC_CTL_PLANEB,4,2             ## @FBC_CTL_PLANEB
	.comm	_FBC_TAG,8,3                    ## @FBC_TAG
	.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,8,3               ## @FBC_CONTROL2
	.comm	_FBC_FENCE_OFF,8,3              ## @FBC_FENCE_OFF
	.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
	.comm	_FBC_CTL_INTERVAL_SHIFT,8,3     ## @FBC_CTL_INTERVAL_SHIFT
	.comm	_FBC_CONTROL,8,3                ## @FBC_CONTROL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enabled FBC, pitch %d, yoff %d, plane %d, "

	.no_dead_strip	_i8xx_enable_fbc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i8xx_enable_fbc
_i8xx_enable_fbc:                       ; @i8xx_enable_fbc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	x1, [sp, #40]                   ; 8-byte Folded Spill
	mov	x19, x0
	ldp	x23, x8, [x0, #8]
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x20, [x8]
	mov	x0, x23
	bl	_to_intel_framebuffer
	ldr	x8, [x0]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_to_intel_crtc
Lloh0:
	adrp	x27, _FBC_LL_SIZE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _FBC_LL_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	ldr	w26, [x27]
	ldr	x8, [x23]
	ldr	w23, [x8]
Lloh2:
	adrp	x8, _FBC_CTL_PLANEA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FBC_CTL_PLANEA@GOTPAGEOFF]
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	ldr	w20, [x0]
Lloh4:
	ldr	w28, [x8]
Lloh5:
	adrp	x8, _FBC_CTL_PLANEB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FBC_CTL_PLANEB@GOTPAGEOFF]
Lloh7:
	ldr	w24, [x8]
	cmn	w26, #31
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	x22, #-1
Lloh8:
	adrp	x25, _FBC_TAG@GOTPAGE
Lloh9:
	ldr	x25, [x25, _FBC_TAG@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x0, x21, x8
	mov	w1, #0
	bl	_I915_WRITE
	ldr	w8, [x27]
	add	w9, w8, #31
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #5
	add	x22, x22, #1
	add	x21, x21, #4
	cmp	x22, w8, sxtw
	b.lt	LBB0_2
LBB0_3:
	cmp	w20, #0
	csel	w8, w28, w24, eq
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	sdiv	w9, w9, w26
	cmp	w23, w9
	csel	w20, w23, w9, lt
Lloh10:
	adrp	x9, _FBC_CTL_FENCE_DBL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FBC_CTL_FENCE_DBL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _FBC_CTL_IDLE_IMM@GOTPAGE
Lloh14:
	ldr	x10, [x10, _FBC_CTL_IDLE_IMM@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
Lloh16:
	adrp	x11, _FBC_CTL_CPU_FENCE@GOTPAGE
Lloh17:
	ldr	x11, [x11, _FBC_CTL_CPU_FENCE@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w1, w8, w11
Lloh19:
	adrp	x8, _FBC_CONTROL2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FBC_CONTROL2@GOTPAGEOFF]
Lloh21:
	ldr	x0, [x8]
	bl	_I915_WRITE
Lloh22:
	adrp	x8, _FBC_FENCE_OFF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FBC_FENCE_OFF@GOTPAGEOFF]
Lloh24:
	ldr	x0, [x8]
	ldr	w1, [x19]
	bl	_I915_WRITE
Lloh25:
	adrp	x8, _FBC_CTL_EN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FBC_CTL_EN@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _FBC_CTL_PERIODIC@GOTPAGE
Lloh29:
	ldr	x9, [x9, _FBC_CTL_PERIODIC@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w21, w9, w8
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_IS_I945GM
Lloh31:
	adrp	x8, _FBC_CTL_C3_IDLE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _FBC_CTL_C3_IDLE@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w8, w21, w8
	add	w9, w20, #63
	cmp	w20, #0
	csel	w9, w9, w20, lt
	asr	w9, w9, #6
	sub	w22, w9, #1
	and	w9, w22, #0xff
Lloh34:
	adrp	x10, _FBC_CTL_STRIDE_SHIFT@GOTPAGE
Lloh35:
	ldr	x10, [x10, _FBC_CTL_STRIDE_SHIFT@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
	mov	w9, #12287
	ldr	x10, [sp, #40]                  ; 8-byte Folded Reload
	and	x9, x10, x9
Lloh37:
	adrp	x10, _FBC_CTL_INTERVAL_SHIFT@GOTPAGE
Lloh38:
	ldr	x10, [x10, _FBC_CTL_INTERVAL_SHIFT@GOTPAGEOFF]
Lloh39:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	ldr	x10, [sp, #24]                  ; 8-byte Folded Reload
	ldr	w10, [x10]
	orr	w8, w8, w10
	orr	w1, w8, w9
Lloh40:
	adrp	x8, _FBC_CONTROL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _FBC_CONTROL@GOTPAGEOFF]
Lloh42:
	ldr	x0, [x8]
	bl	_I915_WRITE
	ldr	w2, [x19]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	w3, [x8]
Lloh43:
	adrp	x0, l_.str@PAGE
Lloh44:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_DRM_DEBUG_KMS
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh43, Lloh44
	.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	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_FBC_LL_SIZE,4,2                ; @FBC_LL_SIZE
	.comm	_FBC_CTL_PLANEA,4,2             ; @FBC_CTL_PLANEA
	.comm	_FBC_CTL_PLANEB,4,2             ; @FBC_CTL_PLANEB
	.comm	_FBC_TAG,8,3                    ; @FBC_TAG
	.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,8,3               ; @FBC_CONTROL2
	.comm	_FBC_FENCE_OFF,8,3              ; @FBC_FENCE_OFF
	.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
	.comm	_FBC_CTL_INTERVAL_SHIFT,8,3     ; @FBC_CTL_INTERVAL_SHIFT
	.comm	_FBC_CONTROL,8,3                ; @FBC_CONTROL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enabled FBC, pitch %d, yoff %d, plane %d, "

	.no_dead_strip	_i8xx_enable_fbc
.subsections_via_symbols
