	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function colorkey_opencl_init
LCPI0_0:
	.quad	0x3f1a36e2eb1c432d              ## double 1.0E-4
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.long	0x437f0000                      ## float 255
	.long	0x437f0000                      ## float 255
	.long	0x437f0000                      ## float 255
	.long	0x437f0000                      ## float 255
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_colorkey_opencl_init:                  ## @colorkey_opencl_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %r14
	movq	_ff_opencl_source_colorkey@GOTPCREL(%rip), %rsi
	movl	$1, %edx
	callq	_ff_opencl_filter_load_program
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	56(%r14), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edi
	leaq	-20(%rbp), %rcx
	xorl	%edx, %edx
	callq	_clCreateCommandQueue
	movq	%rax, 24(%r14)
	movq	_EIO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_AVERROR
	movl	-20(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_CL_FAIL_ON_ERROR
	movsd	(%r14), %xmm0                   ## xmm0 = mem[0],zero
	ucomisd	LCPI0_0(%rip), %xmm0
	movl	48(%r14), %edi
	jbe	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	leaq	-20(%rbp), %rdx
	callq	_clCreateKernel
	movq	%rax, 16(%r14)
	movl	(%rbx), %edi
	callq	_AVERROR
	movl	-20(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_4
LBB0_5:
	movl	%eax, %ebx
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_clReleaseCommandQueue
LBB0_7:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_clReleaseKernel
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str.3(%rip), %rsi
	leaq	-20(%rbp), %rdx
	callq	_clCreateKernel
	movq	%rax, 16(%r14)
	movl	(%rbx), %edi
	callq	_AVERROR
	movl	-20(%rbp), %edx
	leaq	L_.str.4(%rip), %rsi
LBB0_4:
	movl	%eax, %edi
	callq	_CL_FAIL_ON_ERROR
	movq	32(%r14), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ssq	8(%rax), %xmm0
	cvtsi2ssq	(%rax), %xmm1
	cvtsi2ssq	16(%rax), %xmm2
	insertps	$16, %xmm0, %xmm1               ## xmm1 = xmm1[0],xmm0[0],xmm1[2,3]
	xorps	%xmm0, %xmm0
	cvtsi2ssq	24(%rax), %xmm0
	insertps	$32, %xmm2, %xmm1               ## xmm1 = xmm1[0,1],xmm2[0],xmm1[3]
	insertps	$48, %xmm0, %xmm1               ## xmm1 = xmm1[0,1,2],xmm0[0]
	divps	LCPI0_1(%rip), %xmm1
	movq	40(%r14), %rax
	movups	%xmm1, (%rax)
	movl	$1, 8(%r14)
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_opencl_source_colorkey,4,2  ## @ff_opencl_source_colorkey
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create OpenCL command queue %d.\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"Failed to create colorkey_blend kernel: %d.\n"

L_.str.3:                               ## @.str.3
	.asciz	"colorkey"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to create colorkey kernel: %d.\n"

	.no_dead_strip	_colorkey_opencl_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function colorkey_opencl_init
_colorkey_opencl_init:                  ; @colorkey_opencl_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x20, [x0]
Lloh0:
	adrp	x1, _ff_opencl_source_colorkey@GOTPAGE
Lloh1:
	ldr	x1, [x1, _ff_opencl_source_colorkey@GOTPAGEOFF]
	mov	w2, #1
	bl	_ff_opencl_filter_load_program
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x20, #56]
	ldp	w1, w0, [x8]
	add	x3, sp, #12
	mov	w2, #0
	bl	_clCreateCommandQueue
	str	x0, [x20, #24]
Lloh2:
	adrp	x19, _EIO@GOTPAGE
Lloh3:
	ldr	x19, [x19, _EIO@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_AVERROR
	ldr	w2, [sp, #12]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_CL_FAIL_ON_ERROR
	ldr	d0, [x20]
	ldr	w0, [x20, #48]
	mov	x8, #17197
	movk	x8, #60188, lsl #16
	movk	x8, #14050, lsl #32
	movk	x8, #16154, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.le	LBB0_7
; %bb.2:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #12
	bl	_clCreateKernel
	str	x0, [x20, #16]
	ldr	w0, [x19]
	bl	_AVERROR
	ldr	w2, [sp, #12]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_3:
	mov	x19, x0
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_clReleaseCommandQueue
LBB0_5:
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_9
; %bb.6:
	bl	_clReleaseKernel
	b	LBB0_9
LBB0_7:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #12
	bl	_clCreateKernel
	str	x0, [x20, #16]
	ldr	w0, [x19]
	bl	_AVERROR
	ldr	w2, [sp, #12]
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_8:
	bl	_CL_FAIL_ON_ERROR
	mov	w19, #0
	ldp	x8, x9, [x20, #32]
	ldp	q1, q0, [x8]
	scvtf.2d	v1, v1
	fcvtn	v1.2s, v1.2d
	scvtf.2d	v0, v0
	fcvtn2	v1.4s, v0.2d
	mov	w8, #1132396544
	dup.4s	v0, w8
	fdiv.4s	v0, v1, v0
	str	q0, [x9]
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_opencl_source_colorkey,4,2  ; @ff_opencl_source_colorkey
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create OpenCL command queue %d.\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"Failed to create colorkey_blend kernel: %d.\n"

l_.str.3:                               ; @.str.3
	.asciz	"colorkey"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to create colorkey kernel: %d.\n"

	.no_dead_strip	_colorkey_opencl_init
.subsections_via_symbols
