	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_packet_make_writable        ## -- Begin function av_packet_make_writable
	.p2align	4, 0x90
_av_packet_make_writable:               ## @av_packet_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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	$0, -24(%rbp)
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_av_buffer_is_writable
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_9
LBB0_2:
	movl	16(%rbx), %esi
	leaq	-24(%rbp), %rdi
	callq	_packet_alloc
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	cmpl	$0, 16(%rbx)
	je	LBB0_4
## %bb.5:
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	setne	%dil
	jmp	LBB0_6
LBB0_4:
	movl	$1, %edi
LBB0_6:
	leaq	8(%rbx), %r14
	callq	_av_assert1
	movl	16(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_8
## %bb.7:
	movq	-24(%rbp), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_memcpy
LBB0_8:
	movq	%r14, %rdi
	callq	_av_buffer_unref
	movq	-24(%rbp), %rax
	movq	%rax, 8(%rbx)
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_packet_make_writable        ; -- Begin function av_packet_make_writable
	.p2align	2
_av_packet_make_writable:               ; @av_packet_make_writable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	xzr, [sp, #8]
	mov	x20, x0
	ldr	x0, [x20, #8]!
	cbz	x0, LBB0_3
; %bb.1:
	bl	_av_buffer_is_writable
	cbz	x0, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_10
LBB0_3:
	ldr	w1, [x19, #16]
	add	x0, sp, #8
	bl	_packet_alloc
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_6
; %bb.5:
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w0, ne
	b	LBB0_7
LBB0_6:
	mov	w0, #1
LBB0_7:
	bl	_av_assert1
	ldr	w2, [x19, #16]
	cbz	w2, LBB0_9
; %bb.8:
	ldr	x8, [sp, #8]
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_memcpy
LBB0_9:
	mov	x0, x20
	bl	_av_buffer_unref
	mov	w0, #0
	ldr	x8, [sp, #8]
	str	x8, [x19, #8]
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
