	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hevc_mp4toannexb_filter
_hevc_mp4toannexb_filter:               ## @hevc_mp4toannexb_filter
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	8(%rdi), %r15
	leaq	-72(%rbp), %rsi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_ff_bsf_get_packet
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	cmpl	$0, 4(%r15)
	movq	-72(%rbp), %rsi
	je	LBB0_3
## %bb.4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %rax
	movl	(%rsi), %edx
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_bytestream2_init
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	testq	%rax, %rax
	je	LBB0_19
## %bb.5:
	xorl	%r14d, %r14d
	leaq	-60(%rbp), %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	movb	%cl, %al
	movl	-76(%rbp), %r14d                ## 4-byte Reload
	orl	%eax, %r14d
	movslq	-96(%rbp), %rax                 ## 4-byte Folded Reload
	addq	%rax, %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rdi
	addq	%r13, %rdi
	movl	$1, %esi
	callq	_AV_WB32
	movq	8(%rbx), %rax
	leaq	(%rax,%r13), %rsi
	addq	$4, %rsi
	leaq	-60(%rbp), %r13
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_bytestream2_get_buffer
	movq	%r13, %rdi
	callq	_bytestream2_get_bytes_left
	testq	%rax, %rax
	je	LBB0_19
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	cmpl	$0, (%r15)
	movl	$0, %r12d
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	shll	$8, %r12d
	movq	%r13, %rdi
	callq	_bytestream2_get_byte
	orl	%eax, %r12d
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	callq	_bytestream2_peek_byte
	andl	$112, %eax
	cmpl	$32, %eax
	sete	%cl
	testl	%r14d, %r14d
	sete	%bl
	xorl	%edx, %edx
	andb	%cl, %bl
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %edx
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%r12d, %eax
	cmpl	$4, %eax
	jl	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	addl	$-4, %eax
	cmpl	%edx, %eax
	jl	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	movl	%r14d, -76(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movslq	(%rdi), %r13
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	leal	(%r12,%rdx), %esi
	addl	$4, %esi
	callq	_av_grow_packet
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	testb	%bl, %bl
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	addq	%r13, %rdi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	4(%rax), %esi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	jmp	LBB0_18
LBB0_1:
	movl	%eax, %r14d
	jmp	LBB0_23
LBB0_3:
	movq	%rbx, %rdi
	callq	_av_packet_move_ref
	xorl	%r14d, %r14d
	jmp	LBB0_22
LBB0_19:
	movq	-72(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_packet_copy_props
	movl	%eax, %r14d
	testl	%r14d, %r14d
	jns	LBB0_22
	jmp	LBB0_21
LBB0_13:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%r14d, %r14d
	jns	LBB0_22
	jmp	LBB0_21
LBB0_15:
	movl	%eax, %r14d
LBB0_21:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_packet_unref
LBB0_22:
	leaq	-72(%rbp), %rdi
	callq	_av_packet_free
LBB0_23:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_hevc_mp4toannexb_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hevc_mp4toannexb_filter
_hevc_mp4toannexb_filter:               ; @hevc_mp4toannexb_filter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x1
	mov	x20, x0
	ldr	x24, [x0, #8]
	add	x1, sp, #8
	bl	_ff_bsf_get_packet
	tbnz	w0, #31, LBB0_14
; %bb.1:
	ldr	w8, [x24, #4]
	ldr	x1, [sp, #8]
	cbz	w8, LBB0_15
; %bb.2:
	ldr	x8, [x1, #8]
	ldr	w2, [x1]
	add	x0, sp, #4
	mov	x1, x8
	bl	_bytestream2_init
	add	x0, sp, #4
	bl	_bytestream2_get_bytes_left
	cbz	x0, LBB0_16
; %bb.3:
	mov	w25, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	orr	w25, w25, w27
	ldr	x8, [x19, #8]
	add	x22, x28, w22, sxtw
	add	x0, x22, x8
	mov	w1, #1
	bl	_AV_WB32
	ldr	x8, [x19, #8]
	add	x8, x22, x8
	add	x1, x8, #4
	add	x0, sp, #4
	mov	x2, x21
	bl	_bytestream2_get_buffer
	add	x0, sp, #4
	bl	_bytestream2_get_bytes_left
	cbz	x0, LBB0_16
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w22, #0
	mov	w21, #0
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #4
	bl	_bytestream2_get_byte
	orr	w21, w0, w21, lsl #8
	add	w22, w22, #1
	ldr	w8, [x24]
	cmp	w22, w8
	b.lt	LBB0_7
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w21, #0
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #4
	bl	_bytestream2_peek_byte
	and	w8, w0, #0x70
	cmp	w8, #32
	cset	w27, eq
	cmp	w25, #0
	cset	w8, eq
	ands	w26, w27, w8
	ldr	x8, [x20]
	ldr	w8, [x8]
	csel	w22, w8, wzr, ne
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w8, w8, w21
	subs	w8, w8, #4
	b.lt	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, w22
	b.lt	LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x28, [x19]
	add	w8, w21, w22
	add	w1, w8, #4
	mov	x0, x19
	bl	_av_grow_packet
	tbnz	w0, #31, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	tbz	w26, #0, LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x28
	ldr	x8, [x20]
	ldr	w1, [x8, #4]
	mov	x2, x22
	bl	_memcpy
	b	LBB0_4
LBB0_14:
	mov	x23, x0
	b	LBB0_21
LBB0_15:
	mov	x0, x19
	bl	_av_packet_move_ref
	mov	w23, #0
	b	LBB0_20
LBB0_16:
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_av_packet_copy_props
	mov	x23, x0
	tbz	w23, #31, LBB0_20
	b	LBB0_19
LBB0_17:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	tbz	w23, #31, LBB0_20
	b	LBB0_19
LBB0_18:
	mov	x23, x0
LBB0_19:
	mov	x0, x19
	bl	_av_packet_unref
LBB0_20:
	add	x0, sp, #8
	bl	_av_packet_free
LBB0_21:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_hevc_mp4toannexb_filter
.subsections_via_symbols
