	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_isom_write_hvcc             ## -- Begin function ff_isom_write_hvcc
	.p2align	4, 0x90
_ff_isom_write_hvcc:                    ## @ff_isom_write_hvcc
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	%edx, -40(%rbp)
	movq	$0, -48(%rbp)
	leaq	-36(%rbp), %rdi
	callq	_hvcc_init
	cmpl	$5, %ebx
	jg	LBB0_2
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_12
LBB0_2:
	cmpl	$1, (%r15)
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_avio_write
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_4:
	movq	%r15, %rdi
	callq	_AV_RB24
	cmpl	$1, %eax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_AV_RB32
	cmpl	$1, %eax
	jne	LBB0_1
LBB0_6:
	leaq	-48(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ff_avc_parse_nal_units_buf
	testl	%eax, %eax
	js	LBB0_11
## %bb.7:
	movslq	-40(%rbp), %rbx
	cmpq	$5, %rbx
	jl	LBB0_10
## %bb.8:
	movq	-48(%rbp), %r15
	leaq	(%r15,%rbx,4), %r12
	shlq	$2, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	shrq	$2, %rbx
	movq	%r15, %rdi
	callq	_AV_RB32
	addl	$-4, %ebx
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_FFMIN
	cltq
	leaq	(%r15,%rax,4), %r15
	addq	$16, %r15
	movq	%r12, %rbx
	subq	%r15, %rbx
	cmpq	$16, %rbx
	jg	LBB0_9
LBB0_10:
	leaq	-36(%rbp), %rsi
	movq	%r14, %rdi
	callq	_hvcc_write
LBB0_11:
	movl	%eax, %ebx
LBB0_12:
	leaq	-36(%rbp), %rdi
	callq	_hvcc_close
	movq	-48(%rbp), %rdi
	callq	_av_free
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_isom_write_hvcc             ; -- Begin function ff_isom_write_hvcc
	.p2align	2
_ff_isom_write_hvcc:                    ; @ff_isom_write_hvcc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	str	w2, [sp, #28]
	str	xzr, [sp, #16]
	add	x0, sp, #12
	bl	_hvcc_init
	cmp	w21, #5
	b.gt	LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_2:
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_avio_write
	mov	w20, #0
	b	LBB0_12
LBB0_4:
	mov	x0, x20
	bl	_AV_RB24
	cmp	w0, #1
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_AV_RB32
	cmp	w0, #1
	b.ne	LBB0_1
LBB0_6:
	add	x1, sp, #16
	add	x2, sp, #28
	mov	x0, x20
	bl	_ff_avc_parse_nal_units_buf
	tbnz	w0, #31, LBB0_11
; %bb.7:
	ldrsw	x8, [sp, #28]
	cmp	w8, #5
	b.lt	LBB0_10
; %bb.8:
	ldr	x20, [sp, #16]
	add	x21, x20, x8, lsl #2
	lsl	x8, x8, #2
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	lsr	x22, x8, #2
	mov	x0, x20
	bl	_AV_RB32
	sub	w1, w22, #4
	bl	_FFMIN
	add	x8, x20, w0, sxtw #2
	add	x20, x8, #16
	sub	x8, x21, x20
	cmp	x8, #16
	b.gt	LBB0_9
LBB0_10:
	add	x1, sp, #12
	mov	x0, x19
	bl	_hvcc_write
LBB0_11:
	mov	x20, x0
LBB0_12:
	add	x0, sp, #12
	bl	_hvcc_close
	ldr	x0, [sp, #16]
	bl	_av_free
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
.subsections_via_symbols
