	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opencl_transfer_data_to
_opencl_transfer_data_to:               ## @opencl_transfer_data_to
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, -152(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movq	%rsp, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	movq	_AV_NUM_DATA_POINTERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movq	(%r13), %rdi
	cmpq	(%rbx), %rdi
	jne	LBB0_3
## %bb.1:
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	movl	24(%r13), %ecx
	movl	28(%r13), %edx
	leaq	-132(%rbp), %r8
	leaq	-176(%rbp), %r9
	xorl	%esi, %esi
	callq	_opencl_get_plane_format
	testl	%eax, %eax
	js	LBB0_2
## %bb.7:
	movq	%r15, -120(%rbp)                ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	-144(%rbp), %r15                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movaps	-176(%rbp), %xmm0
	movaps	%xmm0, -112(%rbp)
	movq	$1, -96(%rbp)
	movl	(%r14), %edi
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	movq	8(%rcx), %rcx
	movl	(%rcx,%rbx,8), %esi
	movq	_CL_FALSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	16(%r13), %rcx
	movl	(%rcx,%rbx,4), %r9d
	subq	$8, %rsp
	leaq	-80(%rbp), %rcx
	leaq	-112(%rbp), %r8
	pushq	%r15
	pushq	$0
	pushq	$0
	pushq	(%rax,%rbx,8)
	pushq	$0
	callq	_clEnqueueWriteImage
	addq	$48, %rsp
	movq	_CL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-128(%rbp), %r12                ## 8-byte Reload
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movq	(%r12), %rdi
	movl	24(%r13), %ecx
	movl	28(%r13), %edx
	movl	%ebx, %esi
	leaq	-132(%rbp), %r8
	leaq	-176(%rbp), %r9
	callq	_opencl_get_plane_format
	addq	$4, %r15
	testl	%eax, %eax
	jns	LBB0_8
## %bb.5:
	movl	%eax, %r12d
	movq	-120(%rbp), %r15                ## 8-byte Reload
	jmp	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	jmp	LBB0_14
LBB0_2:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	cmpl	%eax, %r12d
	movl	$0, %r14d
	cmovnel	%r12d, %r14d
	movq	-128(%rbp), %r12                ## 8-byte Reload
	jmp	LBB0_13
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-128(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %ecx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	movq	-120(%rbp), %r15                ## 8-byte Reload
LBB0_13:
	movq	%r12, %rdi
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	movl	%ebx, %edx
	callq	_opencl_wait_events
LBB0_14:
	movq	%r15, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NUM_DATA_POINTERS,4,2       ## @AV_NUM_DATA_POINTERS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Plane %d missing on source frame for transfer.\n"

	.comm	_CL_FALSE,4,2                   ## @CL_FALSE
	.comm	_CL_SUCCESS,8,3                 ## @CL_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to enqueue write of OpenCL image plane %d: %d.\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_opencl_transfer_data_to
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opencl_transfer_data_to
_opencl_transfer_data_to:               ; @opencl_transfer_data_to
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #112
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	mov	x20, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0, #8]
	ldr	x26, [x8]
	stp	xzr, xzr, [x29, #-112]
	stur	xzr, [x29, #-96]
Lloh3:
	adrp	x8, _AV_NUM_DATA_POINTERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_NUM_DATA_POINTERS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	ldr	x0, [x2]
	ldr	x8, [x19]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.1:
	ldp	w3, w2, [x22, #24]
	sub	x4, x29, #148
	sub	x5, x29, #176
	mov	w1, #0
	bl	_opencl_get_plane_format
	tbnz	w0, #31, LBB0_8
; %bb.2:
	stur	x20, [x29, #-184]               ; 8-byte Folded Spill
	mov	x21, #0
	mov	w27, #1
Lloh8:
	adrp	x28, _CL_FALSE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _CL_FALSE@GOTPAGEOFF]
	mov	x20, x25
Lloh10:
	adrp	x25, _CL_SUCCESS@GOTPAGE
Lloh11:
	ldr	x25, [x25, _CL_SUCCESS@GOTPAGEOFF]
	stur	x20, [x29, #-192]               ; 8-byte Folded Spill
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	x9, [x8, x21, lsl #3]
	cbz	x9, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	q0, [x29, #-176]
	stur	q0, [x29, #-144]
	stur	x27, [x29, #-128]
	ldr	w0, [x26]
	ldr	x9, [x23, #8]
	lsl	x10, x21, #3
	ldr	w1, [x9, x10]
	ldr	w2, [x28]
	ldr	x9, [x22, #16]
	ldr	w5, [x9, x21, lsl #2]
	ldr	x7, [x8, x10]
	sub	sp, sp, #32
	stp	xzr, x20, [sp, #8]
	sub	x3, x29, #112
	sub	x4, x29, #144
	str	wzr, [sp]
	mov	w6, #0
	bl	_clEnqueueWriteImage
	add	sp, sp, #32
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldr	x0, [x19]
	ldp	w3, w2, [x22, #24]
	sub	x4, x29, #148
	sub	x5, x29, #176
	mov	x1, x21
	bl	_opencl_get_plane_format
	add	x20, x20, #4
	tbz	w0, #31, LBB0_3
; %bb.6:
	mov	x24, x0
	ldp	x25, x20, [x29, #-192]          ; 16-byte Folded Reload
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x22, x0
	b	LBB0_14
LBB0_8:
	mov	x24, x0
	mov	w21, #0
LBB0_9:
Lloh15:
	adrp	x8, _ENOENT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_AVERROR
	cmp	w24, w0
	csel	w22, wzr, w24, eq
	b	LBB0_13
LBB0_10:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_av_log
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh25:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	str	x0, [sp, #-16]!
Lloh28:
	adrp	x2, l_.str.1@PAGE
Lloh29:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_av_log
	add	sp, sp, #16
Lloh30:
	adrp	x8, _EIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x22, x0
	ldp	x25, x20, [x29, #-192]          ; 16-byte Folded Reload
LBB0_13:
	mov	x0, x19
	mov	x1, x25
	mov	x2, x21
	bl	_opencl_wait_events
LBB0_14:
	mov	sp, x20
	ldur	x8, [x29, #-88]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x22
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NUM_DATA_POINTERS,4,2       ; @AV_NUM_DATA_POINTERS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Plane %d missing on source frame for transfer.\n"

	.comm	_CL_FALSE,4,2                   ; @CL_FALSE
	.comm	_CL_SUCCESS,8,3                 ; @CL_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to enqueue write of OpenCL image plane %d: %d.\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_opencl_transfer_data_to
.subsections_via_symbols
