	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_fbc_init                 ## -- Begin function intel_fbc_init
	.p2align	4, 0x90
_intel_fbc_init:                        ## @intel_fbc_init
	.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	%rdi, %rbx
	addq	$20, %rdi
	movq	_intel_fbc_underrun_work_fn@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	16(%rbx), %rdi
	callq	_mutex_init
	movq	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_need_fbc_vtd_wa
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mkwrite_device_info
	movl	$0, (%rax)
LBB0_2:
	movq	%rbx, %rdi
	callq	_intel_sanitize_fbc_option
	movq	_i915_modparams@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_KMS
	movq	%rbx, %rdi
	callq	_HAS_FBC
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_INTEL_GEN
	cmpl	$4, %eax
	jg	LBB0_7
## %bb.5:
	movq	%rbx, %rdi
	callq	_IS_GM45
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_FBC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FBC_CTL_INTERVAL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$500, %esi                      ## imm = 0x1F4
	shll	%cl, %esi
	callq	_I915_WRITE
LBB0_7:
	movq	%rbx, %rdi
	callq	_intel_fbc_hw_is_active
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_intel_fbc_hw_deactivate        ## TAILCALL
LBB0_3:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, 8(%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_intel_fbc_underrun_work_fn,4,2 ## @intel_fbc_underrun_work_fn
	.comm	_i915_modparams,4,2             ## @i915_modparams
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sanitized enable_fbc value: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"unsupported by this chipset"

	.comm	_FBC_CONTROL,4,2                ## @FBC_CONTROL
	.comm	_FBC_CTL_INTERVAL_SHIFT,4,2     ## @FBC_CTL_INTERVAL_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_fbc_init                 ; -- Begin function intel_fbc_init
	.p2align	2
_intel_fbc_init:                        ; @intel_fbc_init
	.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	x19, x0
	add	x0, x0, #20
Lloh0:
	adrp	x8, _intel_fbc_underrun_work_fn@GOTPAGE
Lloh1:
	ldr	x8, [x8, _intel_fbc_underrun_work_fn@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x19, #16
	bl	_mutex_init
	str	xzr, [x19]
	mov	x0, x19
	bl	_need_fbc_vtd_wa
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mkwrite_device_info
	str	wzr, [x0]
LBB0_2:
	mov	x0, x19
	bl	_intel_sanitize_fbc_option
	mov	x1, x0
Lloh3:
	adrp	x8, _i915_modparams@GOTPAGE
Lloh4:
	ldr	x8, [x8, _i915_modparams@GOTPAGEOFF]
Lloh5:
	str	w0, [x8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_HAS_FBC
	cbz	w0, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #4
	b.gt	LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_IS_GM45
	cbnz	w0, LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _FBC_CONTROL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FBC_CONTROL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _FBC_CTL_INTERVAL_SHIFT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FBC_CTL_INTERVAL_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w9, #500
	lsl	w1, w9, w8
	bl	_I915_WRITE
LBB0_6:
	mov	x0, x19
	bl	_intel_fbc_hw_is_active
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_intel_fbc_hw_deactivate
LBB0_8:
Lloh14:
	adrp	x8, l_.str.1@PAGE
Lloh15:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x19, #8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_intel_fbc_underrun_work_fn,4,2 ; @intel_fbc_underrun_work_fn
	.comm	_i915_modparams,4,2             ; @i915_modparams
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sanitized enable_fbc value: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"unsupported by this chipset"

	.comm	_FBC_CONTROL,4,2                ; @FBC_CONTROL
	.comm	_FBC_CTL_INTERVAL_SHIFT,4,2     ; @FBC_CTL_INTERVAL_SHIFT
.subsections_via_symbols
