	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hvcc_add_nal_unit
_hvcc_add_nal_unit:                     ## @hvcc_add_nal_unit
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r14
	leaq	-60(%rbp), %rdx
	movl	$2, %ecx
	callq	_ff_nal_unit_extract_rbsp
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	-60(%rbp), %edx
	leaq	-44(%rbp), %rdi
	movq	%r15, %rsi
	callq	_init_get_bits8
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_nal_unit_parse_header
	movl	-48(%rbp), %edx
	leal	-128(%rdx), %eax
	cmpl	$4, %eax
	ja	LBB0_10
## %bb.3:
	movq	%r14, %rdi
	movl	%r13d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r12d, %ecx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	callq	_hvcc_array_add_nal_unit
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	movl	-48(%rbp), %eax
	cmpl	$132, %eax
	je	LBB0_12
## %bb.5:
	cmpl	$129, %eax
	je	LBB0_13
## %bb.6:
	cmpl	$128, %eax
	jne	LBB0_11
## %bb.7:
	leaq	-44(%rbp), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_hvcc_parse_vps
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_10:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_av_free
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	-44(%rbp), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_hvcc_parse_pps
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_13:
	leaq	-44(%rbp), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_hvcc_parse_sps
	movl	%eax, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_hvcc_add_nal_unit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hvcc_add_nal_unit
_hvcc_add_nal_unit:                     ; @hvcc_add_nal_unit
	.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	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	add	x2, sp, #4
	mov	w3, #2
	bl	_ff_nal_unit_extract_rbsp
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.1:
	ldr	w2, [sp, #4]
	add	x0, sp, #12
	mov	x1, x19
	bl	_init_get_bits8
	tbnz	w0, #31, LBB0_9
; %bb.2:
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_nal_unit_parse_header
	ldr	w2, [sp, #8]
	sub	w8, w2, #128
	cmp	w8, #4
	b.hi	LBB0_10
; %bb.3:
	mov	x0, x24
	mov	x1, x23
	mov	x3, x22
	mov	x4, x20
	bl	_hvcc_array_add_nal_unit
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldr	w8, [sp, #8]
	cmp	w8, #132
	b.eq	LBB0_12
; %bb.5:
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.6:
	cmp	w8, #128
	b.ne	LBB0_11
; %bb.7:
	add	x0, sp, #12
	mov	x1, x20
	bl	_hvcc_parse_vps
	mov	x21, x0
	b	LBB0_11
LBB0_8:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_9:
	mov	x21, x0
	b	LBB0_11
LBB0_10:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
LBB0_11:
	mov	x0, x19
	bl	_av_free
	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
LBB0_12:
	add	x0, sp, #12
	mov	x1, x20
	bl	_hvcc_parse_pps
	mov	x21, x0
	b	LBB0_11
LBB0_13:
	add	x0, sp, #12
	mov	x1, x20
	bl	_hvcc_parse_sps
	mov	x21, x0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_hvcc_add_nal_unit
.subsections_via_symbols
