	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce112_compressor_enable_fbc   ## -- Begin function dce112_compressor_enable_fbc
	.p2align	4, 0x90
_dce112_compressor_enable_fbc:          ## @dce112_compressor_enable_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	%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, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_TO_DCE112_COMPRESSOR
	cmpq	$0, 32(%rbx)
	je	LBB0_9
## %bb.1:
	cmpq	$0, 16(%rbx)
	jne	LBB0_9
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_dce112_compressor_is_fbc_enabled_in_hw
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movl	(%r15), %esi
	movl	4(%r15), %edx
	movq	%r14, %rdi
	callq	_is_source_bigger_than_epanel_size
	testl	%eax, %eax
	je	LBB0_4
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	$1, %r12d
	jg	LBB0_8
## %bb.5:
	cmpq	$0, 24(%rbx)
	je	LBB0_8
## %bb.6:
	movl	4(%r15), %eax
	imull	(%r15), %eax
	movq	_dce11_one_lpt_channel_max_resolution@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_dce112_compressor_enable_lpt
LBB0_8:
	movq	_mmFBC_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	8(%rbx), %edi
	movl	%r12d, %esi
	callq	_dm_read_reg
	movl	%eax, %r13d
	movq	_FBC_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FBC_GRPH_COMP_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edi
	movl	$1, %esi
	callq	_set_reg_field_value
	movl	8(%r15), %esi
	movq	_FBC_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FBC_SRC_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edi
	callq	_set_reg_field_value
	movl	8(%rbx), %edi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_dm_write_reg
	movl	$1, (%rbx)
	movslq	8(%r15), %rax
	movl	%eax, 4(%rbx)
	movq	_reg_offsets@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%r14)
	movq	_FBC_CNTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_FBC_GRPH_COMP_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edi
	xorl	%esi, %esi
	callq	_set_reg_field_value
	movl	8(%rbx), %edi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_dm_write_reg
	movl	(%r15), %edx
	movq	_FBC_GRPH_COMP_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r13d, %edi
	movl	$1, %esi
	callq	_set_reg_field_value
	movl	8(%rbx), %edi
	movl	%r12d, %esi
	movl	%r13d, %edx
	callq	_dm_write_reg
	movq	%r14, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wait_for_fbc_state_changed     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_dce11_one_lpt_channel_max_resolution,4,2 ## @dce11_one_lpt_channel_max_resolution
	.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	_FBC_SRC_SEL,4,2                ## @FBC_SRC_SEL
	.comm	_reg_offsets,8,3                ## @reg_offsets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dce112_compressor_enable_fbc   ; -- Begin function dce112_compressor_enable_fbc
	.p2align	2
_dce112_compressor_enable_fbc:          ; @dce112_compressor_enable_fbc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_TO_DCE112_COMPRESSOR
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_4
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	mov	x1, #0
	bl	_dce112_compressor_is_fbc_enabled_in_hw
	cbnz	w0, LBB0_4
; %bb.3:
	ldp	w1, w2, [x21]
	mov	x0, x19
	bl	_is_source_bigger_than_epanel_size
	cbz	w0, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	cmp	w22, #1
	b.gt	LBB0_9
; %bb.6:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_9
; %bb.7:
	ldp	w8, w9, [x21]
	mul	w8, w9, w8
Lloh0:
	adrp	x9, _dce11_one_lpt_channel_max_resolution@GOTPAGE
Lloh1:
	ldr	x9, [x9, _dce11_one_lpt_channel_max_resolution@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_dce112_compressor_enable_lpt
LBB0_9:
Lloh3:
	adrp	x8, _mmFBC_CNTL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mmFBC_CNTL@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	ldr	w0, [x20, #8]
	mov	x1, x22
	bl	_dm_read_reg
	mov	x23, x0
Lloh6:
	adrp	x24, _FBC_CNTL@GOTPAGE
Lloh7:
	ldr	x24, [x24, _FBC_CNTL@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh8:
	adrp	x25, _FBC_GRPH_COMP_EN@GOTPAGE
Lloh9:
	ldr	x25, [x25, _FBC_GRPH_COMP_EN@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	w26, #1
	mov	w1, #1
	bl	_set_reg_field_value
	ldr	w1, [x21, #8]
	ldr	w2, [x24]
Lloh10:
	adrp	x8, _FBC_SRC_SEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FBC_SRC_SEL@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
	mov	x0, x23
	bl	_set_reg_field_value
	ldr	w0, [x20, #8]
	mov	x1, x22
	mov	x2, x23
	bl	_dm_write_reg
	ldrsw	x8, [x21, #8]
	stp	w26, w8, [x20]
Lloh13:
	adrp	x9, _reg_offsets@GOTPAGE
Lloh14:
	ldr	x9, [x9, _reg_offsets@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x19]
	ldr	w2, [x24]
	ldr	w3, [x25]
	mov	x0, x23
	mov	w1, #0
	bl	_set_reg_field_value
	ldr	w0, [x20, #8]
	mov	x1, x22
	mov	x2, x23
	bl	_dm_write_reg
	ldr	w2, [x24]
	ldr	w3, [x25]
	mov	x0, x23
	mov	w1, #1
	bl	_set_reg_field_value
	ldr	w0, [x20, #8]
	mov	x1, x22
	mov	x2, x23
	bl	_dm_write_reg
	mov	x0, x19
	mov	w1, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_wait_for_fbc_state_changed
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_dce11_one_lpt_channel_max_resolution,4,2 ; @dce11_one_lpt_channel_max_resolution
	.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	_FBC_SRC_SEL,4,2                ; @FBC_SRC_SEL
	.comm	_reg_offsets,8,3                ; @reg_offsets
.subsections_via_symbols
