	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opencl_unmap_frame
_opencl_unmap_frame:                    ## @opencl_unmap_frame
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	8(%rsi), %r13
	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, %r12
	movq	(%r13), %rdi
	callq	_FF_ARRAY_ELEMS
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	(%r13), %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	addq	$4, %r12
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %edx
	testl	%edx, %edx
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	movq	(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,8), %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_clEnqueueUnmapMemObject
	movq	_CL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	movq	%rax, %r8
	callq	_av_log
	jmp	LBB0_5
LBB0_6:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_opencl_wait_events
	movq	%r13, %rdi
	callq	_av_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NUM_DATA_POINTERS,4,2       ## @AV_NUM_DATA_POINTERS
	.comm	_CL_SUCCESS,8,3                 ## @CL_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to unmap OpenCL image plane %d: %d.\n"

	.no_dead_strip	_opencl_unmap_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opencl_unmap_frame
_opencl_unmap_frame:                    ; @opencl_unmap_frame
	.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, #16
	mov	x21, x1
	mov	x20, x0
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]
	ldr	x26, [x8]
	ldr	x19, [x1, #8]
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	x22, x9, x8
	mov	sp, x22
	ldr	x0, [x19]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x23, #0
Lloh8:
	adrp	x27, _CL_SUCCESS@GOTPAGE
Lloh9:
	ldr	x27, [x27, _CL_SUCCESS@GOTPAGEOFF]
Lloh10:
	adrp	x28, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x28, [x28, _AV_LOG_ERROR@GOTPAGEOFF]
	mov	x24, x22
Lloh12:
	adrp	x25, l_.str@PAGE
Lloh13:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldr	x0, [x19]
	bl	_FF_ARRAY_ELEMS
	add	x24, x24, #4
	cmp	x23, w0, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w2, [x8, x23, lsl #2]
	cbz	w2, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x26]
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x1, [x8, x23, lsl #3]
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w3, #0
	mov	x4, #0
	mov	x5, x24
	bl	_clEnqueueUnmapMemObject
	ldr	x8, [x27]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x4, x0
	ldr	w1, [x28]
	mov	x0, x20
	mov	x2, x25
	mov	x3, x23
	bl	_av_log
	b	LBB0_2
LBB0_6:
	mov	w23, #0
LBB0_7:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_opencl_wait_events
	mov	x0, x19
	bl	_av_free
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	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_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NUM_DATA_POINTERS,4,2       ; @AV_NUM_DATA_POINTERS
	.comm	_CL_SUCCESS,8,3                 ; @CL_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to unmap OpenCL image plane %d: %d.\n"

	.no_dead_strip	_opencl_unmap_frame
.subsections_via_symbols
