	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_fbc_can_activate
_intel_fbc_can_activate:                ## @intel_fbc_can_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r14
	cmpq	$0, 96(%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rax
LBB0_30:
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
LBB0_31:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	cmpl	$0, 80(%r14)
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 56(%r14)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rax
	jmp	LBB0_30
LBB0_3:
	leaq	L_.str.1(%rip), %rax
	jmp	LBB0_30
LBB0_6:
	movq	%rbx, %rdi
	callq	_intel_fbc_hw_tracking_covers_screen
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	addq	$24, %r15
	movq	_PLANE_HAS_FENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	callq	_INTEL_GEN
	cmpl	$4, %eax
	jg	LBB0_14
## %bb.11:
	movq	%r14, %rdi
	callq	_IS_G4X
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	32(%r14), %rax
	movq	_DRM_MODE_ROTATE_0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_14:
	movl	72(%r14), %esi
	movq	%r14, %rdi
	callq	_stride_is_valid
	testl	%eax, %eax
	je	LBB0_15
## %bb.16:
	movq	64(%r14), %rax
	movl	8(%rax), %esi
	movq	%r14, %rdi
	callq	_pixel_format_is_valid
	testl	%eax, %eax
	je	LBB0_17
## %bb.18:
	movq	40(%r14), %rax
	movq	_DRM_MODE_BLEND_PIXEL_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_21
## %bb.19:
	movq	64(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_21
## %bb.20:
	leaq	L_.str.8(%rip), %rax
	jmp	LBB0_30
LBB0_7:
	leaq	L_.str.3(%rip), %rax
	jmp	LBB0_30
LBB0_9:
	leaq	L_.str.4(%rip), %rax
	jmp	LBB0_30
LBB0_15:
	leaq	L_.str.6(%rip), %rax
	jmp	LBB0_30
LBB0_21:
	movq	%r14, %rdi
	callq	_IS_HASWELL
	testq	%rax, %rax
	jne	LBB0_23
## %bb.22:
	movq	%r14, %rdi
	callq	_IS_BROADWELL
	testq	%rax, %rax
	je	LBB0_25
LBB0_23:
	imull	$95, (%r14), %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$37, %rax
	addl	%ecx, %eax
	cmpl	%eax, 60(%r14)
	jge	LBB0_24
LBB0_25:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_intel_fbc_calculate_cfb_size
	movl	16(%r14), %ecx
	imull	88(%r14), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_27
## %bb.26:
	leaq	L_.str.10(%rip), %rax
	jmp	LBB0_30
LBB0_17:
	leaq	L_.str.7(%rip), %rax
	jmp	LBB0_30
LBB0_24:
	leaq	L_.str.9(%rip), %rax
	jmp	LBB0_30
LBB0_13:
	leaq	L_.str.5(%rip), %rax
	jmp	LBB0_30
LBB0_27:
	movq	%r14, %rdi
	movl	$9, %esi
	movl	$10, %edx
	callq	_IS_GEN_RANGE
	movq	%rax, %rcx
	movl	$1, %eax
	testq	%rcx, %rcx
	je	LBB0_31
## %bb.28:
	testb	$3, 48(%r14)
	je	LBB0_31
## %bb.29:
	leaq	L_.str.11(%rip), %rax
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"underrun detected"

L_.str.1:                               ## @.str.1
	.asciz	"primary plane not visible"

	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
L_.str.2:                               ## @.str.2
	.asciz	"incompatible mode"

L_.str.3:                               ## @.str.3
	.asciz	"mode too large for compression"

	.comm	_PLANE_HAS_FENCE,4,2            ## @PLANE_HAS_FENCE
L_.str.4:                               ## @.str.4
	.asciz	"framebuffer not tiled or fenced"

	.comm	_DRM_MODE_ROTATE_0,8,3          ## @DRM_MODE_ROTATE_0
L_.str.5:                               ## @.str.5
	.asciz	"rotation unsupported"

L_.str.6:                               ## @.str.6
	.asciz	"framebuffer stride not supported"

L_.str.7:                               ## @.str.7
	.asciz	"pixel format is invalid"

	.comm	_DRM_MODE_BLEND_PIXEL_NONE,8,3  ## @DRM_MODE_BLEND_PIXEL_NONE
L_.str.8:                               ## @.str.8
	.asciz	"per-pixel alpha blending is incompatible with FBC"

L_.str.9:                               ## @.str.9
	.asciz	"pixel rate is too big"

L_.str.10:                              ## @.str.10
	.asciz	"CFB requirements changed"

L_.str.11:                              ## @.str.11
	.asciz	"plane Y offset is misaligned"

	.no_dead_strip	_intel_fbc_can_activate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_fbc_can_activate
_intel_fbc_can_activate:                ; @intel_fbc_can_activate
	.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
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_i915
	mov	x19, x0
	ldr	x8, [x0, #96]
	cbz	x8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
LBB0_2:
	mov	w0, #0
	str	x8, [x19, #8]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x19, #80]
	cbz	w8, LBB0_7
; %bb.5:
	ldr	w8, [x19, #56]
Lloh2:
	adrp	x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
Lloh5:
	adrp	x8, l_.str.2@PAGE
Lloh6:
	add	x8, x8, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_7:
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_8:
	mov	x0, x20
	bl	_intel_fbc_hw_tracking_covers_screen
	cbz	w0, LBB0_18
; %bb.9:
	add	x20, x19, #24
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _PLANE_HAS_FENCE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PLANE_HAS_FENCE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.10:
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #4
	b.gt	LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_IS_G4X
	cbnz	w0, LBB0_13
; %bb.12:
	ldr	x8, [x19, #32]
Lloh12:
	adrp	x9, _DRM_MODE_ROTATE_0@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DRM_MODE_ROTATE_0@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_28
LBB0_13:
	ldr	w1, [x19, #72]
	mov	x0, x19
	bl	_stride_is_valid
	cbz	w0, LBB0_20
; %bb.14:
	ldr	x8, [x19, #64]
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_pixel_format_is_valid
	cbz	w0, LBB0_26
; %bb.15:
	ldr	x8, [x19, #40]
Lloh15:
	adrp	x9, _DRM_MODE_BLEND_PIXEL_NONE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DRM_MODE_BLEND_PIXEL_NONE@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_21
; %bb.16:
	ldr	x8, [x19, #64]
	ldr	x8, [x8]
	cbz	x8, LBB0_21
; %bb.17:
Lloh18:
	adrp	x8, l_.str.8@PAGE
Lloh19:
	add	x8, x8, l_.str.8@PAGEOFF
	b	LBB0_2
LBB0_18:
Lloh20:
	adrp	x8, l_.str.3@PAGE
Lloh21:
	add	x8, x8, l_.str.3@PAGEOFF
	b	LBB0_2
LBB0_19:
Lloh22:
	adrp	x8, l_.str.4@PAGE
Lloh23:
	add	x8, x8, l_.str.4@PAGEOFF
	b	LBB0_2
LBB0_20:
Lloh24:
	adrp	x8, l_.str.6@PAGE
Lloh25:
	add	x8, x8, l_.str.6@PAGEOFF
	b	LBB0_2
LBB0_21:
	mov	x0, x19
	bl	_IS_HASWELL
	cbnz	x0, LBB0_23
; %bb.22:
	mov	x0, x19
	bl	_IS_BROADWELL
	cbz	x0, LBB0_24
LBB0_23:
	ldr	w8, [x19, #60]
	ldr	w9, [x19]
	mov	w10, #95
	mul	w9, w9, w10
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	cmp	w8, w9
	b.ge	LBB0_27
LBB0_24:
	mov	x0, x19
	mov	x1, x20
	bl	_intel_fbc_calculate_cfb_size
	ldr	w8, [x19, #88]
	ldr	w9, [x19, #16]
	mul	w8, w9, w8
	cmp	w0, w8
	b.le	LBB0_29
; %bb.25:
Lloh26:
	adrp	x8, l_.str.10@PAGE
Lloh27:
	add	x8, x8, l_.str.10@PAGEOFF
	b	LBB0_2
LBB0_26:
Lloh28:
	adrp	x8, l_.str.7@PAGE
Lloh29:
	add	x8, x8, l_.str.7@PAGEOFF
	b	LBB0_2
LBB0_27:
Lloh30:
	adrp	x8, l_.str.9@PAGE
Lloh31:
	add	x8, x8, l_.str.9@PAGEOFF
	b	LBB0_2
LBB0_28:
Lloh32:
	adrp	x8, l_.str.5@PAGE
Lloh33:
	add	x8, x8, l_.str.5@PAGEOFF
	b	LBB0_2
LBB0_29:
	mov	x0, x19
	mov	w1, #9
	mov	w2, #10
	bl	_IS_GEN_RANGE
	cbz	x0, LBB0_32
; %bb.30:
	ldrb	w8, [x19, #48]
	tst	w8, #0x3
	b.eq	LBB0_32
; %bb.31:
Lloh34:
	adrp	x8, l_.str.11@PAGE
Lloh35:
	add	x8, x8, l_.str.11@PAGEOFF
	b	LBB0_2
LBB0_32:
	mov	w0, #1
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"underrun detected"

l_.str.1:                               ; @.str.1
	.asciz	"primary plane not visible"

	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
l_.str.2:                               ; @.str.2
	.asciz	"incompatible mode"

l_.str.3:                               ; @.str.3
	.asciz	"mode too large for compression"

	.comm	_PLANE_HAS_FENCE,4,2            ; @PLANE_HAS_FENCE
l_.str.4:                               ; @.str.4
	.asciz	"framebuffer not tiled or fenced"

	.comm	_DRM_MODE_ROTATE_0,8,3          ; @DRM_MODE_ROTATE_0
l_.str.5:                               ; @.str.5
	.asciz	"rotation unsupported"

l_.str.6:                               ; @.str.6
	.asciz	"framebuffer stride not supported"

l_.str.7:                               ; @.str.7
	.asciz	"pixel format is invalid"

	.comm	_DRM_MODE_BLEND_PIXEL_NONE,8,3  ; @DRM_MODE_BLEND_PIXEL_NONE
l_.str.8:                               ; @.str.8
	.asciz	"per-pixel alpha blending is incompatible with FBC"

l_.str.9:                               ; @.str.9
	.asciz	"pixel rate is too big"

l_.str.10:                              ; @.str.10
	.asciz	"CFB requirements changed"

l_.str.11:                              ; @.str.11
	.asciz	"plane Y offset is misaligned"

	.no_dead_strip	_intel_fbc_can_activate
.subsections_via_symbols
