	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_frame_make_writable         ## -- Begin function av_frame_make_writable
	.p2align	4, 0x90
_av_frame_make_writable:                ## @av_frame_make_writable
	.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	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	40(%rdi), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	callq	_av_frame_is_writable
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_2
LBB0_9:
	movl	%r14d, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movl	36(%rbx), %eax
	movl	%eax, -28(%rbp)
	movl	32(%rbx), %eax
	movl	%eax, -32(%rbp)
	movups	16(%rbx), %xmm0
	movups	%xmm0, -48(%rbp)
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_av_frame_get_buffer
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	leaq	-64(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_av_frame_copy
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	leaq	-64(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_av_frame_copy_props
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movq	%rbx, %rdi
	callq	_av_frame_unref
	movups	-64(%rbp), %xmm0
	movups	-48(%rbp), %xmm1
	movups	-32(%rbp), %xmm2
	movups	%xmm2, 32(%rbx)
	movups	%xmm1, 16(%rbx)
	movups	%xmm0, (%rbx)
	movq	-64(%rbp), %rax
	xorl	%r14d, %r14d
	cmpq	-56(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movq	(%rbx), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_9
LBB0_3:
	movl	%eax, %r14d
	jmp	LBB0_9
LBB0_5:
	movl	%eax, %r14d
	leaq	-64(%rbp), %rdi
	callq	_av_frame_unref
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_frame_make_writable         ; -- Begin function av_frame_make_writable
	.p2align	2
_av_frame_make_writable:                ; @av_frame_make_writable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #40]
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_av_frame_is_writable
	cbz	x0, LBB0_5
LBB0_2:
	mov	w20, #0
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
LBB0_5:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	ldr	d0, [x19, #32]
	str	d0, [sp, #32]
	ldr	q0, [x19, #16]
	str	q0, [sp, #16]
	mov	x0, sp
	mov	w1, #32
	bl	_av_frame_get_buffer
	tbnz	w0, #31, LBB0_10
; %bb.6:
	mov	x0, sp
	mov	x1, x19
	bl	_av_frame_copy
	tbnz	w0, #31, LBB0_11
; %bb.7:
	mov	x0, sp
	mov	x1, x19
	bl	_av_frame_copy_props
	tbnz	w0, #31, LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_av_frame_unref
	ldp	q0, q1, [sp]
	ldr	q2, [sp, #32]
	stp	q0, q1, [x19]
	str	q2, [x19, #32]
	ldp	x8, x9, [sp]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.9:
	mov	w20, #0
	ldr	x8, [x19]
	str	x8, [x19, #8]
	b	LBB0_3
LBB0_10:
	mov	x20, x0
	b	LBB0_3
LBB0_11:
	mov	x20, x0
	mov	x0, sp
	bl	_av_frame_unref
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
