	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_hevc_annexb2mp4             ## -- Begin function ff_hevc_annexb2mp4
	.p2align	4, 0x90
_ff_hevc_annexb2mp4:                    ## @ff_hevc_annexb2mp4
	.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	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rdi, %r15
	movl	%edx, -44(%rbp)
	movq	$0, -56(%rbp)
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.1:
	leaq	-56(%rbp), %rax
	leaq	-44(%rbp), %rdx
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_ff_avc_parse_nal_units_buf
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movslq	-44(%rbp), %rbx
	xorl	%r12d, %r12d
	cmpq	$5, %rbx
	jl	LBB0_7
## %bb.3:
	movq	-56(%rbp), %r13
	leaq	(,%rbx,4), %rax
	addq	%r13, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	shlq	$2, %rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	shrq	$2, %rbx
	movq	%r13, %rdi
	callq	_AV_RB32
	addl	$-4, %ebx
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_FFMIN
	movl	%eax, %ebx
	leaq	16(%r13), %r14
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_avio_wb32
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_avio_write
	addl	%ebx, %r12d
	addl	$4, %r12d
	movslq	%ebx, %rax
	leaq	16(%r13,%rax,4), %r13
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	subq	%r13, %rbx
	cmpq	$16, %rbx
	jg	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movq	%r15, %rdi
	callq	_ff_avc_parse_nal_units
LBB0_6:
	movl	%eax, %r12d
LBB0_7:
	movq	-56(%rbp), %rdi
	callq	_av_free
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	$0, (%rax)
LBB0_9:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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	_ff_hevc_annexb2mp4             ; -- Begin function ff_hevc_annexb2mp4
	.p2align	2
_ff_hevc_annexb2mp4:                    ; @ff_hevc_annexb2mp4
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x4
	mov	x8, x1
	mov	x20, x0
	str	w2, [sp, #12]
	str	xzr, [sp]
	cbz	w3, LBB0_5
; %bb.1:
	mov	x1, sp
	add	x2, sp, #12
	mov	x0, x8
	bl	_ff_avc_parse_nal_units_buf
	tbnz	w0, #31, LBB0_6
; %bb.2:
	ldrsw	x8, [sp, #12]
	cmp	w8, #5
	b.lt	LBB0_7
; %bb.3:
	mov	w21, #0
	ldr	x22, [sp]
	add	x24, x22, x8, lsl #2
	lsl	x8, x8, #2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsr	x23, x8, #2
	mov	x0, x22
	bl	_AV_RB32
	sub	w1, w23, #4
	bl	_FFMIN
	mov	x23, x0
	add	x22, x22, #16
	mov	x0, x20
	mov	x1, x23
	bl	_avio_wb32
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_avio_write
	add	w8, w21, w23
	add	w21, w8, #4
	add	x22, x22, w23, sxtw #2
	sub	x8, x24, x22
	cmp	x8, #16
	b.gt	LBB0_4
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	mov	x1, x8
	bl	_ff_avc_parse_nal_units
LBB0_6:
	mov	x21, x0
	b	LBB0_8
LBB0_7:
	mov	w21, #0
LBB0_8:
	ldr	x0, [sp]
	bl	_av_free
	cbz	x19, LBB0_10
; %bb.9:
	str	wzr, [x19]
LBB0_10:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
