	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function overlay_opencl_load
_overlay_opencl_load:                   ## @overlay_opencl_load
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_ff_opencl_source_overlay@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movl	%esi, %edi
	callq	_av_pix_fmt_desc_get
	movq	%rax, %r12
	movl	%ebx, %edi
	callq	_av_pix_fmt_desc_get
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	cmpl	$0, (%r12)
	movl	$0, %r15d
	jle	LBB0_3
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movq	(%rax,%r14,8), %rsi
	incq	%rsi
	movl	%r15d, %edi
	callq	_FFMAX
	movl	%eax, %r15d
	incq	%r14
	movslq	(%r12), %rax
	cmpq	%rax, %r14
	jl	LBB0_2
LBB0_3:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %rsi
	incq	%rsi
	movl	%r13d, %edi
	callq	_FFMAX
	movl	%eax, %r13d
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%r15d, (%rbx)
	movb	4(%r12), %cl
	movl	$1, %r9d
	shll	%cl, %r9d
	movl	$1, %eax
	movl	%r9d, 4(%rbx)
	movb	8(%r12), %cl
	shll	%cl, %eax
	movl	%eax, 8(%rbx)
	movl	12(%rbx), %ecx
	movl	16(%rbx), %r8d
	leal	-1(%r9), %edx
	testl	%edx, %ecx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_8
## %bb.7:
	leal	-1(%rax), %edx
	testl	%edx, %r8d
	je	LBB0_9
LBB0_8:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	callq	_av_log
LBB0_9:
	cmpl	%r13d, %r15d
	jne	LBB0_10
## %bb.11:
	movl	(%r12), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpl	(%rcx), %eax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r12
	cmoveq	%rax, %r12
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.3(%rip), %r12
	movl	$1, %eax
LBB0_12:
	movl	%eax, 20(%rbx)
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_av_log
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_ff_opencl_filter_load_program
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movq	48(%rbx), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edi
	leaq	-44(%rbp), %r14
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_clCreateCommandQueue
	movq	%rax, 32(%rbx)
	movq	_EIO@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_AVERROR
	movl	-44(%rbp), %edx
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edi
	callq	_CL_FAIL_ON_ERROR
	movl	40(%rbx), %edi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_clCreateKernel
	movl	%eax, 28(%rbx)
	movl	(%r13), %edi
	callq	_AVERROR
	movl	-44(%rbp), %edx
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %edi
	callq	_CL_FAIL_ON_ERROR
	movl	$1, 24(%rbx)
	jmp	LBB0_19
LBB0_14:
	movl	%eax, %r14d
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:
	callq	_clReleaseCommandQueue
LBB0_16:
	movl	28(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_18
## %bb.17:
	callq	_clReleaseKernel
LBB0_18:
	movl	%r14d, %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_opencl_source_overlay,8,3   ## @ff_opencl_source_overlay
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Warning: overlay position (%d, %d) does not match subsampling (%d, %d).\n"

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

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

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

	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.4:                               ## @.str.4
	.asciz	"Using kernel %s.\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.5:                               ## @.str.5
	.asciz	"Failed to create OpenCL command queue %d.\n"

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

	.no_dead_strip	_overlay_opencl_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function overlay_opencl_load
_overlay_opencl_load:                   ; @overlay_opencl_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x0
	ldr	x24, [x0]
Lloh0:
	adrp	x8, _ff_opencl_source_overlay@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_opencl_source_overlay@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #32]
	mov	x0, x1
	bl	_av_pix_fmt_desc_get
	mov	x20, x0
	mov	x0, x21
	bl	_av_pix_fmt_desc_get
	mov	x21, x0
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, #0
	mov	w22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	x8, [x8, x23, lsl #3]
	add	x1, x8, #1
	mov	x0, x22
	bl	_FFMAX
	mov	x22, x0
	add	x23, x23, #1
	ldrsw	x8, [x20]
	cmp	x23, x8
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w22, #0
LBB0_4:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x25, #0
	mov	w23, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	ldr	x8, [x8, x25, lsl #3]
	add	x1, x8, #1
	mov	x0, x23
	bl	_FFMAX
	mov	x23, x0
	add	x25, x25, #1
	ldrsw	x8, [x21]
	cmp	x25, x8
	b.lt	LBB0_6
	b	LBB0_8
LBB0_7:
	mov	w23, #0
LBB0_8:
	mov	w9, #1
	ldp	w8, w10, [x20, #4]
	lsl	w8, w9, w8
	stp	w22, w8, [x24]
	lsl	w10, w9, w10
	str	w10, [x24, #8]
	sub	w12, w8, #1
	ldp	w9, w11, [x24, #12]
	tst	w9, w12
	b.ne	LBB0_10
; %bb.9:
	sub	w12, w10, #1
	tst	w11, w12
	b.eq	LBB0_11
LBB0_10:
Lloh3:
	adrp	x12, _AV_LOG_WARNING@GOTPAGE
Lloh4:
	ldr	x12, [x12, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x12]
	stp	x8, x10, [sp, #16]
	stp	x9, x11, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_11:
	cmp	w22, w23
	b.ne	LBB0_13
; %bb.12:
	mov	w8, #0
	ldr	w9, [x20]
	ldr	w10, [x21]
Lloh8:
	adrp	x11, l_.str.2@PAGE
Lloh9:
	add	x11, x11, l_.str.2@PAGEOFF
Lloh10:
	adrp	x12, l_.str.1@PAGE
Lloh11:
	add	x12, x12, l_.str.1@PAGEOFF
	cmp	w9, w10
	csel	x20, x12, x11, eq
	b	LBB0_14
LBB0_13:
Lloh12:
	adrp	x20, l_.str.3@PAGE
Lloh13:
	add	x20, x20, l_.str.3@PAGEOFF
	mov	w8, #1
LBB0_14:
	str	w8, [x24, #20]
Lloh14:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	str	x20, [sp]
Lloh17:
	adrp	x2, l_.str.4@PAGE
Lloh18:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w21, #1
	add	x1, sp, #32
	mov	x0, x19
	mov	w2, #1
	bl	_ff_opencl_filter_load_program
	tbnz	w0, #31, LBB0_16
; %bb.15:
	ldr	x8, [x24, #48]
	ldp	w1, w0, [x8]
	add	x3, sp, #44
	mov	w2, #0
	bl	_clCreateCommandQueue
	str	x0, [x24, #32]
Lloh19:
	adrp	x19, _EIO@GOTPAGE
Lloh20:
	ldr	x19, [x19, _EIO@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_AVERROR
	ldr	w2, [sp, #44]
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_CL_FAIL_ON_ERROR
	ldr	w0, [x24, #40]
	add	x2, sp, #44
	mov	x1, x20
	bl	_clCreateKernel
	str	w0, [x24, #28]
	ldr	w0, [x19]
	bl	_AVERROR
	ldr	w2, [sp, #44]
Lloh23:
	adrp	x1, l_.str.6@PAGE
Lloh24:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_CL_FAIL_ON_ERROR
	mov	w19, #0
	str	w21, [x24, #24]
	b	LBB0_20
LBB0_16:
	mov	x19, x0
	ldr	x0, [x24, #32]
	cbz	x0, LBB0_18
; %bb.17:
	bl	_clReleaseCommandQueue
LBB0_18:
	ldr	w0, [x24, #28]
	cbz	w0, LBB0_20
; %bb.19:
	bl	_clReleaseKernel
LBB0_20:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_opencl_source_overlay,8,3   ; @ff_opencl_source_overlay
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Warning: overlay position (%d, %d) does not match subsampling (%d, %d).\n"

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

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

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

	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.4:                               ; @.str.4
	.asciz	"Using kernel %s.\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.5:                               ; @.str.5
	.asciz	"Failed to create OpenCL command queue %d.\n"

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

	.no_dead_strip	_overlay_opencl_load
.subsections_via_symbols
