	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ilk_update_colorkey
_ilk_update_colorkey:                   ## @ilk_update_colorkey
	.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	%rsi, %r14
	callq	_to_intel_plane
	movq	%rax, %r15
	movl	(%rax), %edi
	callq	_DVSKEYVAL
	movl	(%r14), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	(%r15), %edi
	callq	_DVSKEYMAX
	movl	4(%r14), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	(%r15), %edi
	callq	_DVSKEYMSK
	movl	8(%r14), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	(%r15), %edi
	callq	_DVSCNTR
	movl	%eax, %edi
	callq	_I915_READ
	movq	_DVS_SOURCE_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_DVS_DEST_KEY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	12(%r14), %edx
	movq	_I915_SET_COLORKEY_DESTINATION@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%edx, %esi
	movq	_I915_SET_COLORKEY_SOURCE@GOTPCREL(%rip), %rdi
	andl	(%rdi), %edx
	cmovnel	%ecx, %edx
	testl	%esi, %esi
	cmovnel	%ebx, %edx
	orl	%ecx, %ebx
	notl	%ebx
	andl	%eax, %ebx
	orl	%edx, %ebx
	movl	(%r15), %edi
	callq	_DVSCNTR
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r15), %edi
	callq	_DVSKEYMSK
	movl	%eax, %edi
	callq	_POSTING_READ
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DVS_SOURCE_KEY,4,2             ## @DVS_SOURCE_KEY
	.comm	_DVS_DEST_KEY,4,2               ## @DVS_DEST_KEY
	.comm	_I915_SET_COLORKEY_DESTINATION,4,2 ## @I915_SET_COLORKEY_DESTINATION
	.comm	_I915_SET_COLORKEY_SOURCE,4,2   ## @I915_SET_COLORKEY_SOURCE
	.no_dead_strip	_ilk_update_colorkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ilk_update_colorkey
_ilk_update_colorkey:                   ; @ilk_update_colorkey
	.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, x1
	bl	_to_intel_plane
	mov	x19, x0
	ldr	w0, [x0]
	bl	_DVSKEYVAL
	ldr	w1, [x20]
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_DVSKEYMAX
	ldr	w1, [x20, #4]
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_DVSKEYMSK
	ldr	w1, [x20, #8]
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_DVSCNTR
	bl	_I915_READ
Lloh0:
	adrp	x8, _DVS_SOURCE_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DVS_SOURCE_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DVS_DEST_KEY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DVS_DEST_KEY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	w10, [x20, #12]
Lloh6:
	adrp	x11, _I915_SET_COLORKEY_DESTINATION@GOTPAGE
Lloh7:
	ldr	x11, [x11, _I915_SET_COLORKEY_DESTINATION@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
Lloh9:
	adrp	x12, _I915_SET_COLORKEY_SOURCE@GOTPAGE
Lloh10:
	ldr	x12, [x12, _I915_SET_COLORKEY_SOURCE@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	tst	w12, w10
	csel	w12, wzr, w8, eq
	tst	w11, w10
	csel	w10, w12, w9, eq
	orr	w8, w9, w8
	bic	w8, w0, w8
	orr	w20, w10, w8
	ldr	w0, [x19]
	bl	_DVSCNTR
	mov	x1, x20
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_DVSKEYMSK
	bl	_POSTING_READ
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DVS_SOURCE_KEY,4,2             ; @DVS_SOURCE_KEY
	.comm	_DVS_DEST_KEY,4,2               ; @DVS_DEST_KEY
	.comm	_I915_SET_COLORKEY_DESTINATION,4,2 ; @I915_SET_COLORKEY_DESTINATION
	.comm	_I915_SET_COLORKEY_SOURCE,4,2   ; @I915_SET_COLORKEY_SOURCE
	.no_dead_strip	_ilk_update_colorkey
.subsections_via_symbols
