	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_avc_write_annexb_extradata  ## -- Begin function ff_avc_write_annexb_extradata
	.p2align	4, 0x90
_ff_avc_write_annexb_extradata:         ## @ff_avc_write_annexb_extradata
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, (%rsi)
	cmpl	$4, (%rdx)
	jl	LBB0_5
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_AV_RB32
	xorl	%r14d, %r14d
	cmpl	$1, %eax
	je	LBB0_10
## %bb.2:
	movq	%r12, %rdi
	callq	_AV_RB24
	cmpl	$1, %eax
	je	LBB0_10
## %bb.3:
	cmpl	$11, (%rbx)
	jl	LBB0_5
## %bb.4:
	cmpl	$1, (%r12)
	jne	LBB0_5
## %bb.6:
	leaq	24(%r12), %rdi
	callq	_AV_RB16
	movl	%eax, %r13d
	leal	11(%r13), %eax
	cmpl	(%rbx), %eax
	jg	LBB0_5
## %bb.7:
	movslq	%r13d, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%rcx,4), %rdi
	addq	$36, %rdi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	callq	_AV_RB16
	movl	%eax, %ecx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%ecx, %eax
	cmpl	(%rbx), %eax
	jle	LBB0_8
LBB0_5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%r13), %eax
	addl	$8, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movslq	%eax, %rdi
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_AV_WB32
	leaq	16(%r13), %rdi
	leaq	32(%r12), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	16(,%rax,4), %rdi
	addq	%r13, %rdi
	movl	$1, %esi
	callq	_AV_WB32
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	32(,%rax,4), %rdi
	addq	%r13, %rdi
	movslq	-64(%rbp), %rax                 ## 4-byte Folded Reload
	leaq	(%r12,%rax,4), %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	%r13, (%r15)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	jmp	LBB0_10
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_avc_write_annexb_extradata  ; -- Begin function ff_avc_write_annexb_extradata
	.p2align	2
_ff_avc_write_annexb_extradata:         ; @ff_avc_write_annexb_extradata
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	str	xzr, [x1]
	ldr	w8, [x2]
	cmp	w8, #4
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_AV_RB32
	cmp	w0, #1
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_AV_RB24
	cmp	w0, #1
	b.ne	LBB0_4
LBB0_3:
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	ldr	w8, [x19]
	cmp	w8, #11
	b.lt	LBB0_8
; %bb.5:
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.6:
	add	x0, x21, #24
	bl	_AV_RB16
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x22, w0
	add	x25, x22, #11
	ldr	w8, [x19]
	cmp	w25, w8
	b.gt	LBB0_8
; %bb.7:
	add	x8, x21, x22, lsl #2
	add	x0, x8, #36
	bl	_AV_RB16
	ldr	w8, [x19]
	add	w9, w0, w25
	cmp	w9, w8
	b.le	LBB0_10
LBB0_8:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x23, x0
	add	w8, w22, w0
	add	w26, w8, #8
Lloh3:
	adrp	x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x0, x8, w26, sxtw
	bl	_av_mallocz
	cbz	x0, LBB0_12
; %bb.11:
	mov	x24, x0
	mov	w1, #1
	bl	_AV_WB32
	add	x0, x24, #16
	add	x1, x21, #32
	mov	x2, x22
	bl	_memcpy
	add	x22, x24, x22, lsl #2
	add	x0, x22, #16
	mov	w1, #1
	bl	_AV_WB32
	add	x0, x22, #32
	add	x1, x21, x25, lsl #2
	mov	x2, x23
	bl	_memcpy
	mov	w0, #0
	str	x24, [x20]
	str	w26, [x19]
	b	LBB0_9
LBB0_12:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
