	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sti_mixer_set_plane_status     ## -- Begin function sti_mixer_set_plane_status
	.p2align	4, 0x90
_sti_mixer_set_plane_status:            ## @sti_mixer_set_plane_status
	.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
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	testl	%edx, %edx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rbx
	cmoveq	%rax, %rbx
	callq	_sti_mixer_to_str
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_sti_plane_to_str
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_DRM_DEBUG_DRIVER
	movq	%r12, %rdi
	callq	_sti_mixer_get_plane_mask
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	_GAM_MIXER_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_sti_mixer_reg_read
	movl	%ebx, %ecx
	notl	%ecx
	andl	%eax, %ecx
	testl	%r15d, %r15d
	cmovel	%r15d, %ebx
	orl	%ecx, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_sti_mixer_reg_write
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s %s %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"enable"

L_.str.2:                               ## @.str.2
	.asciz	"disable"

L_.str.3:                               ## @.str.3
	.asciz	"Can't find layer mask\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GAM_MIXER_CTL,4,2              ## @GAM_MIXER_CTL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sti_mixer_set_plane_status     ; -- Begin function sti_mixer_set_plane_status
	.p2align	2
_sti_mixer_set_plane_status:            ; @sti_mixer_set_plane_status
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w2, #0
	csel	x22, x9, x8, eq
	bl	_sti_mixer_to_str
	mov	x23, x0
	mov	x0, x21
	bl	_sti_plane_to_str
	mov	x3, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x23
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x21
	bl	_sti_mixer_get_plane_mask
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh6:
	adrp	x22, _GAM_MIXER_CTL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _GAM_MIXER_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sti_mixer_reg_read
	bic	w8, w0, w21
	cmp	w20, #0
	csel	w9, wzr, w21, eq
	orr	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sti_mixer_reg_write
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %s %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"enable"

l_.str.2:                               ; @.str.2
	.asciz	"disable"

l_.str.3:                               ; @.str.3
	.asciz	"Can't find layer mask\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GAM_MIXER_CTL,4,2              ; @GAM_MIXER_CTL
.subsections_via_symbols
