	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce110_compressor_disable_fbc  ## -- Begin function dce110_compressor_disable_fbc
	.p2align	4, 0x90
_dce110_compressor_disable_fbc:         ## @dce110_compressor_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_TO_DCE110_COMPRESSOR
	movq	$0, -40(%rbp)
	cmpq	$0, 24(%rbx)
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_dce110_compressor_is_fbc_enabled_in_hw
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	16(%rbx), %edi
	movq	_mmFBC_CNTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_dm_read_reg
	movq	%rax, %r15
	movq	_FBC_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FBC_GRPH_COMP_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_set_reg_field_value
	movl	16(%rbx), %edi
	movl	(%r12), %esi
	movq	%r15, %rdx
	callq	_dm_write_reg
	movq	$0, 8(%rbx)
	movl	$0, (%rbx)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_wait_for_fbc_state_changed
LBB0_3:
	movq	-40(%rbp), %rsi
	movq	_CONTROLLER_ID_UNDEFINED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jle	LBB0_6
## %bb.4:
	movq	_CONTROLLER_ID_D3@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jge	LBB0_6
## %bb.5:
	movq	_CONTROLLER_ID_D0@GOTPCREL(%rip), %rax
	subq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_reset_lb_on_vblank
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mmFBC_CNTL,4,2                 ## @mmFBC_CNTL
	.comm	_FBC_CNTL,4,2                   ## @FBC_CNTL
	.comm	_FBC_GRPH_COMP_EN,4,2           ## @FBC_GRPH_COMP_EN
	.comm	_CONTROLLER_ID_UNDEFINED,8,3    ## @CONTROLLER_ID_UNDEFINED
	.comm	_CONTROLLER_ID_D3,8,3           ## @CONTROLLER_ID_D3
	.comm	_CONTROLLER_ID_D0,8,3           ## @CONTROLLER_ID_D0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce110_compressor_disable_fbc  ; -- Begin function dce110_compressor_disable_fbc
	.p2align	2
_dce110_compressor_disable_fbc:         ; @dce110_compressor_disable_fbc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_TO_DCE110_COMPRESSOR
	str	xzr, [sp, #8]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_dce110_compressor_is_fbc_enabled_in_hw
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x22, _mmFBC_CNTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _mmFBC_CNTL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_dm_read_reg
	mov	x21, x0
Lloh2:
	adrp	x8, _FBC_CNTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FBC_CNTL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _FBC_GRPH_COMP_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FBC_GRPH_COMP_EN@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	w1, #0
	bl	_set_reg_field_value
	ldr	w0, [x19, #16]
	ldr	w1, [x22]
	mov	x2, x21
	bl	_dm_write_reg
	str	xzr, [x19, #8]
	str	wzr, [x19]
	mov	x0, x20
	mov	w1, #0
	bl	_wait_for_fbc_state_changed
LBB0_3:
	ldr	x8, [sp, #8]
Lloh8:
	adrp	x9, _CONTROLLER_ID_UNDEFINED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CONTROLLER_ID_UNDEFINED@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _CONTROLLER_ID_D3@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CONTROLLER_ID_D3@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, gt
	b.ge	LBB0_5
; %bb.4:
Lloh14:
	adrp	x9, _CONTROLLER_ID_D0@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CONTROLLER_ID_D0@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	sub	x1, x8, x9
	mov	x0, x19
	bl	_reset_lb_on_vblank
LBB0_5:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_mmFBC_CNTL,4,2                 ; @mmFBC_CNTL
	.comm	_FBC_CNTL,4,2                   ; @FBC_CNTL
	.comm	_FBC_GRPH_COMP_EN,4,2           ; @FBC_GRPH_COMP_EN
	.comm	_CONTROLLER_ID_UNDEFINED,8,3    ; @CONTROLLER_ID_UNDEFINED
	.comm	_CONTROLLER_ID_D3,8,3           ; @CONTROLLER_ID_D3
	.comm	_CONTROLLER_ID_D0,8,3           ; @CONTROLLER_ID_D0
.subsections_via_symbols
