	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_needs_copy
_buffer_needs_copy:                     ## @buffer_needs_copy
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	pcmpeqd	%xmm0, %xmm0
	movdqa	%xmm0, -64(%rbp)
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	%r12, %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	%r12, %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_av_frame_get_plane_buffer
	cmpq	%r15, %rax
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, (%r14)
	addq	$4, %r14
	jmp	LBB0_2
LBB0_6:
	leaq	-64(%rbp), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_21
## %bb.7:
	xorl	%ebx, %ebx
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	leaq	-64(%rbp), %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	cmpq	%rax, %rbx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jge	LBB0_21
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	movl	-64(%rbp,%rbx,4), %r12d
	testl	%r12d, %r12d
	js	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	movl	(%rax,%r12,4), %r9d
	movq	24(%rbx), %rax
	movl	(%rax,%r12,4), %r8d
	movl	(%r13), %r10d
	movl	%r10d, %esi
	movl	%r8d, %ecx
	sarl	%cl, %esi
	movl	(%rbx), %eax
	movl	8(%rbx), %edx
	movl	16(%r13), %ecx
	addl	%eax, %ecx
	movl	%edx, %edi
	subl	%ecx, %edi
	movl	%r9d, %ecx
	sarl	%cl, %edi
	movq	8(%r13), %r11
	movl	4(%rbx), %r15d
	movl	12(%rbx), %r14d
	addl	%r15d, %r10d
	subl	%r10d, %r14d
	movl	%r8d, %ecx
	sarl	%cl, %r14d
	movl	(%r11,%r12,4), %r11d
	movl	%r9d, %ecx
	sarl	%cl, %edx
	movq	32(%rbx), %rcx
	movl	(%rcx,%r12,4), %r10d
	imull	%r10d, %edx
	cmpl	%edx, %r11d
	jl	LBB0_25
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	24(%r13), %rdx
	movl	%r9d, %ecx
	sarl	%cl, %eax
	movq	(%rdx,%r12,8), %r12
	movl	%r8d, %ecx
	sarl	%cl, %r15d
	imull	%r10d, %eax
	imull	%r11d, %r15d
	addl	%eax, %r15d
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movq	8(%rbx), %rax
	movq	%r12, %rcx
	subq	%rax, %rcx
	sarq	$2, %rcx
	movslq	%r15d, %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_25
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	imull	%r11d, %esi
	movslq	%esi, %rcx
	leaq	(%r12,%rcx,4), %rdx
	imull	%r10d, %edi
	imull	%r11d, %r14d
	addl	%edi, %r14d
	movslq	(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	subq	%rdx, %rax
	sarq	$2, %rax
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movslq	%r14d, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_25
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r15d, -72(%rbp)                ## 4-byte Spill
	leaq	-64(%rbp), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_8
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=2
	incq	%r13
	leaq	-64(%rbp), %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	cmpq	%rax, %r13
	jge	LBB0_8
LBB0_16:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-64(%rbp,%r13,4), %eax
	testl	%eax, %eax
	js	LBB0_8
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	cmpq	%r13, %rbx
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi), %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rcx), %rcx
	movzbl	(%rcx,%rax,4), %ecx
	sarl	%cl, %edx
	movq	24(%rsi), %rcx
	movq	8(%rsi), %rsi
	imull	(%rsi,%rax,4), %edx
	movq	(%rcx,%rax,8), %r15
	leaq	(%r15,%rdx,4), %rax
	movq	%r12, %r14
	subq	%rax, %r12
	shrq	$2, %r12
	movl	%r12d, %edi
	callq	_FFSIGN
	movq	%rax, %rbx
	subl	-72(%rbp), %r12d                ## 4-byte Folded Reload
	movl	%r12d, %edi
	callq	_FFSIGN
	cmpq	%rax, %rbx
	jne	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	subq	%r15, %rbx
	shrq	$2, %rbx
	movl	%ebx, %edi
	callq	_FFSIGN
	movq	%rax, %r12
	addl	-68(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	%ebx, %edi
	callq	_FFSIGN
	cmpq	%rax, %r12
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%r14, %r12
	je	LBB0_15
LBB0_25:
	movl	$1, %eax
	jmp	LBB0_26
LBB0_21:
	xorl	%eax, %eax
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_28
## %bb.27:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_buffer_needs_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_needs_copy
_buffer_needs_copy:                     ; @buffer_needs_copy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	x8, #-1
	stp	x8, x8, [sp, #24]
	add	x0, sp, #24
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, #0
	add	x19, sp, #24
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	add	x0, sp, #24
	bl	_FF_ARRAY_ELEMS
	cmp	x22, w0, sxtw
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	x8, [x8, x22, lsl #3]
	cbz	x8, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_av_frame_get_plane_buffer
	cmp	x0, x21
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w22, [x19], #4
	b	LBB0_2
LBB0_6:
	add	x22, sp, #24
	add	x0, sp, #24
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_21
; %bb.7:
	mov	x25, #0
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x25, x25, #1
	add	x0, sp, #24
	bl	_FF_ARRAY_ELEMS
	cmp	x25, w0, sxtw
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	b.ge	LBB0_21
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	ldr	w13, [x22, x25, lsl #2]
	tbnz	w13, #31, LBB0_21
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x23, #16]
	lsl	x12, x13, #2
	ldr	w9, [x8, x12]
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x12]
	ldr	x10, [x23, #32]
	ldr	w10, [x10, x12]
	ldr	w11, [x23, #8]
	asr	w14, w11, w9
	mul	w14, w14, w10
	cmp	w8, w14
	b.lt	LBB0_20
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x14, [x23, #24]
	ldr	w12, [x14, x12]
	ldr	x14, [x20, #24]
	ldr	x26, [x14, x13, lsl #3]
	ldp	w15, w13, [x23]
	asr	w14, w15, w9
	mul	w14, w10, w14
	asr	w16, w13, w12
	madd	w17, w16, w8, w14
	ldr	x14, [x21, #8]
	sub	x16, x26, x14
	str	x17, [sp, #16]                  ; 8-byte Folded Spill
	sxtw	x17, w17
	cmp	x17, x16, asr #2
	b.gt	LBB0_20
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w16, [x20]
	asr	w17, w16, w12
	mul	w17, w8, w17
	add	x28, x26, w17, sxtw #2
	ldr	w17, [x20, #16]
	add	w15, w15, w17
	sub	w11, w11, w15
	asr	w9, w11, w9
	mul	w9, w9, w10
	ldr	w10, [x23, #12]
	add	w11, w13, w16
	sub	w10, w10, w11
	asr	w10, w10, w12
	madd	w24, w10, w8, w9
	ldrsw	x8, [x21]
	add	x8, x14, x8, lsl #2
	sub	x8, x8, x28
	sxtw	x9, w24
	cmp	x9, x8, asr #2
	b.gt	LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x0, sp, #24
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x19, #0
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	add	x19, x19, #1
	add	x0, sp, #24
	bl	_FF_ARRAY_ELEMS
	cmp	x19, w0, sxtw
	b.ge	LBB0_8
LBB0_16:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x22, x19, lsl #2]
	tbnz	w8, #31, LBB0_8
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	cmp	x25, x19
	b.eq	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=2
	ldr	x9, [x20, #24]
	ldr	x21, [x9, x8, lsl #3]
	ldr	w9, [x20]
	mov	x27, x23
	ldr	x10, [x23, #24]
	lsl	x8, x8, #2
	ldr	w10, [x10, x8]
	asr	w9, w9, w10
	ldr	x10, [x20, #8]
	ldr	w8, [x10, x8]
	mul	w8, w8, w9
	add	x8, x21, w8, uxtw #2
	sub	x8, x26, x8
	lsr	x22, x8, #2
	mov	x0, x22
	bl	_FFSIGN
	mov	x23, x0
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	sub	w0, w22, w8
	bl	_FFSIGN
	cmp	x23, x0
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=2
	sub	x8, x28, x21
	lsr	x22, x8, #2
	mov	x0, x22
	bl	_FFSIGN
	mov	x23, x0
	add	w0, w24, w22
	bl	_FFSIGN
	cmp	x23, x0
	mov	x23, x27
	add	x22, sp, #24
	b.eq	LBB0_15
LBB0_20:
	mov	w0, #1
	b	LBB0_22
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldr	x8, [sp, #40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_buffer_needs_copy
.subsections_via_symbols
