	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i8xx_disable_fbc
_i8xx_disable_fbc:                      ## @i8xx_disable_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_FBC_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_FBC_CTL_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_1
## %bb.2:
	notl	%ecx
	andl	%ecx, %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movq	_FBC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movq	_FBC_STAT_COMPRESSING@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andl	(%rcx), %eax
	sete	%dil
	movl	$10, %esi
	callq	_wait_for
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rdi
	cmoveq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FBC_CONTROL,4,2                ## @FBC_CONTROL
	.comm	_FBC_CTL_EN,4,2                 ## @FBC_CTL_EN
	.comm	_FBC_STATUS,4,2                 ## @FBC_STATUS
	.comm	_FBC_STAT_COMPRESSING,4,2       ## @FBC_STAT_COMPRESSING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FBC idle timed out\n"

L_.str.1:                               ## @.str.1
	.asciz	"disabled FBC\n"

	.no_dead_strip	_i8xx_disable_fbc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i8xx_disable_fbc
_i8xx_disable_fbc:                      ; @i8xx_disable_fbc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _FBC_CONTROL@GOTPAGE
Lloh1:
	ldr	x19, [x19, _FBC_CONTROL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_I915_READ
Lloh2:
	adrp	x8, _FBC_CTL_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FBC_CTL_EN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	bic	w1, w0, w8
	ldr	w0, [x19]
	bl	_I915_WRITE
Lloh5:
	adrp	x8, _FBC_STATUS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FBC_STATUS@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh8:
	adrp	x8, _FBC_STAT_COMPRESSING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FBC_STAT_COMPRESSING@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #10
	bl	_wait_for
Lloh11:
	adrp	x8, l_.str@PAGE
Lloh12:
	add	x8, x8, l_.str@PAGEOFF
Lloh13:
	adrp	x9, l_.str.1@PAGE
Lloh14:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x0, #0
	csel	x0, x9, x8, eq
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_DEBUG_KMS
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_FBC_CONTROL,4,2                ; @FBC_CONTROL
	.comm	_FBC_CTL_EN,4,2                 ; @FBC_CTL_EN
	.comm	_FBC_STATUS,4,2                 ; @FBC_STATUS
	.comm	_FBC_STAT_COMPRESSING,4,2       ; @FBC_STAT_COMPRESSING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FBC idle timed out\n"

l_.str.1:                               ; @.str.1
	.asciz	"disabled FBC\n"

	.no_dead_strip	_i8xx_disable_fbc
.subsections_via_symbols
