	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_fbc_enable               ## -- Begin function intel_fbc_enable
	.p2align	4, 0x90
_intel_fbc_enable:                      ## @intel_fbc_enable
	.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	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_to_i915
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_fbc_supported
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	%rbx, %r14
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, 24(%rbx)
	sete	%dil
	callq	_WARN_ON
	cmpq	%r15, 24(%rbx)
	jne	LBB0_8
## %bb.3:
	xorl	%edi, %edi
	cmpl	$0, (%r12)
	sete	%dil
	callq	_WARN_ON
	movl	4(%rbx), %edi
	callq	_WARN_ON
	jmp	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	$0, (%r12)
	je	LBB0_8
## %bb.5:
	movl	4(%rbx), %edi
	callq	_WARN_ON
	xorl	%edi, %edi
	cmpq	$0, 24(%rbx)
	setne	%dil
	callq	_WARN_ON
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_intel_fbc_update_state_cache
	movq	%r15, %rdi
	callq	_intel_fbc_alloc_cfb
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_8
LBB0_7:
	movl	(%r15), %edi
	callq	_pipe_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_KMS
	leaq	L_.str.2(%rip), %rax
	movq	%rax, 8(%rbx)
	movl	$1, (%rbx)
	movq	%r15, 24(%rbx)
LBB0_8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not enough stolen memory"

L_.str.1:                               ## @.str.1
	.asciz	"Enabling FBC on pipe %c\n"

L_.str.2:                               ## @.str.2
	.asciz	"FBC enabled but not active yet\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_fbc_enable               ; -- Begin function intel_fbc_enable
	.p2align	2
_intel_fbc_enable:                      ; @intel_fbc_enable
	.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	x23, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	mov	x19, x0
	bl	_fbc_supported
	cbz	w0, LBB0_4
; %bb.1:
	add	x20, x19, #16
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.2:
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	x8, [x19, #24]
	cmp	x8, x21
	b.ne	LBB0_9
; %bb.3:
	ldr	w8, [x22]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w0, [x19, #4]
	bl	_WARN_ON
	b	LBB0_9
LBB0_4:
	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
	ret
LBB0_5:
	ldr	w8, [x22]
	cbz	w8, LBB0_9
; %bb.6:
	ldr	w0, [x19, #4]
	bl	_WARN_ON
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, ne
	bl	_WARN_ON
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_intel_fbc_update_state_cache
	mov	x0, x21
	bl	_intel_fbc_alloc_cfb
	cbz	x0, LBB0_8
; %bb.7:
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x19, #8]
	b	LBB0_9
LBB0_8:
	ldr	w0, [x21]
	bl	_pipe_name
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh4:
	adrp	x8, l_.str.2@PAGE
Lloh5:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x19, #8]
	mov	w8, #1
	str	w8, [x19]
	str	x21, [x19, #24]
LBB0_9:
	mov	x0, x20
	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	_mutex_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not enough stolen memory"

l_.str.1:                               ; @.str.1
	.asciz	"Enabling FBC on pipe %c\n"

l_.str.2:                               ; @.str.2
	.asciz	"FBC enabled but not active yet\n"

.subsections_via_symbols
