	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_isom_write_avcc             ## -- Begin function ff_isom_write_avcc
	.p2align	4, 0x90
_ff_isom_write_avcc:                    ## @ff_isom_write_avcc
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -84(%rbp)
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	cmpl	$6, %edx
	jg	LBB0_2
## %bb.1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_32
LBB0_2:
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_AV_RB32
	cmpl	$1, %eax
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_AV_RB24
	cmpl	$1, %eax
	jne	LBB0_4
LBB0_5:
	leaq	-48(%rbp), %rsi
	leaq	-84(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ff_avc_parse_nal_units_buf
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	-48(%rbp), %rbx
	movslq	-84(%rbp), %r14
	leaq	-80(%rbp), %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	leaq	-72(%rbp), %rdi
	callq	_avio_open_dyn_buf
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_27
## %bb.10:
	movq	%r15, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%r14,4), %r15
	movq	-48(%rbp), %rdi
	movq	%r15, %rax
	subq	%rdi, %rax
	xorl	%ebx, %ebx
	movl	$0, %r12d
	cmpq	$17, %rax
	jl	LBB0_23
## %bb.11:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	-48(%rbp), %rsi
	movl	%r14d, %edx
	callq	_avio_write
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	movslq	%r14d, %rdi
	shlq	$2, %rdi
	addq	-48(%rbp), %rdi
	movq	%rdi, -48(%rbp)
	movq	%r15, %rax
	subq	%rdi, %rax
	cmpq	$16, %rax
	jle	LBB0_23
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	callq	_AV_RB32
	movq	%r15, %rsi
	subq	-48(%rbp), %rsi
	shrq	$2, %rsi
	addl	$-4, %esi
	movl	%eax, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_FFMIN
	movl	%eax, %r14d
	movq	-48(%rbp), %rax
	leaq	16(%rax), %rcx
	movq	%rcx, -48(%rbp)
	movl	16(%rax), %eax
	andl	$31, %eax
	cmpl	$8, %eax
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$7, %eax
	jne	LBB0_22
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_UINT16_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jg	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%ebx
	movq	_H264_MAX_SPS_COUNT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jge	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-80(%rbp), %rdi
	movl	%r14d, %esi
	callq	_avio_wb16
	movq	-80(%rbp), %rdi
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	_UINT16_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jg	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%r12d
	movq	_H264_MAX_PPS_COUNT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jge	LBB0_16
## %bb.20:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-72(%rbp), %rdi
	movl	%r14d, %esi
	callq	_avio_wb16
	movq	-72(%rbp), %rdi
	jmp	LBB0_21
LBB0_6:
	movl	%eax, %r13d
	jmp	LBB0_32
LBB0_4:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_avio_write
	xorl	%r13d, %r13d
	jmp	LBB0_32
LBB0_8:
	movl	%eax, %r13d
LBB0_27:
	cmpq	$0, -56(%rbp)
	jne	LBB0_29
LBB0_28:
	movq	-80(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_avio_close_dyn_buf
LBB0_29:
	cmpq	$0, -64(%rbp)
	jne	LBB0_31
## %bb.30:
	movq	-72(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_avio_close_dyn_buf
LBB0_31:
	movq	-56(%rbp), %rdi
	callq	_av_free
	movq	-64(%rbp), %rdi
	callq	_av_free
	movq	%rbx, %rdi
	callq	_av_free
LBB0_32:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	-80(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_avio_close_dyn_buf
	movl	%eax, %r14d
	movq	-72(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_avio_close_dyn_buf
	cmpl	$6, %r14d
	jl	LBB0_16
## %bb.24:
	testl	%eax, %eax
	je	LBB0_16
## %bb.25:
	movq	-112(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	callq	_avio_w8
	movq	-56(%rbp), %rax
	movl	12(%rax), %esi
	movq	%r15, %rdi
	callq	_avio_w8
	movq	-56(%rbp), %rax
	movl	16(%rax), %esi
	movq	%r15, %rdi
	callq	_avio_w8
	movq	-56(%rbp), %rax
	movl	20(%rax), %esi
	movq	%r15, %rdi
	callq	_avio_w8
	movq	%r15, %rdi
	movl	$255, %esi
	callq	_avio_w8
	orl	$224, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_avio_w8
	movq	-56(%rbp), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_avio_write
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_avio_w8
	movq	-64(%rbp), %rsi
	movq	%r15, %rdi
	movl	-100(%rbp), %edx                ## 4-byte Reload
	callq	_avio_write
	jmp	LBB0_26
LBB0_16:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_26:
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, -56(%rbp)
	jne	LBB0_29
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_UINT16_MAX,4,2                 ## @UINT16_MAX
	.comm	_H264_MAX_SPS_COUNT,4,2         ## @H264_MAX_SPS_COUNT
	.comm	_H264_MAX_PPS_COUNT,4,2         ## @H264_MAX_PPS_COUNT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_isom_write_avcc             ; -- Begin function ff_isom_write_avcc
	.p2align	2
_ff_isom_write_avcc:                    ; @ff_isom_write_avcc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	w2, [sp, #44]
	stp	xzr, xzr, [sp, #24]
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp]
	cmp	w2, #6
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_30
LBB0_2:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_AV_RB32
	cmp	w0, #1
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_AV_RB24
	cmp	w0, #1
	b.ne	LBB0_18
LBB0_4:
	add	x1, sp, #16
	add	x2, sp, #44
	mov	x0, x19
	bl	_ff_avc_parse_nal_units_buf
	tbnz	w0, #31, LBB0_17
; %bb.5:
	ldr	x19, [sp, #16]
	ldrsw	x22, [sp, #44]
	add	x0, sp, #32
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_19
; %bb.6:
	add	x0, sp, #24
	bl	_avio_open_dyn_buf
	mov	x20, x0
	tbnz	w0, #31, LBB0_25
; %bb.7:
	add	x24, x19, x22, lsl #2
	ldr	x0, [sp, #16]
	sub	x8, x24, x0
	cmp	x8, #17
	b.lt	LBB0_20
; %bb.8:
	mov	w22, #0
	mov	w25, #0
Lloh3:
	adrp	x26, _UINT16_MAX@GOTPAGE
Lloh4:
	ldr	x26, [x26, _UINT16_MAX@GOTPAGEOFF]
Lloh5:
	adrp	x27, _H264_MAX_PPS_COUNT@GOTPAGE
Lloh6:
	ldr	x27, [x27, _H264_MAX_PPS_COUNT@GOTPAGEOFF]
Lloh7:
	adrp	x28, _H264_MAX_SPS_COUNT@GOTPAGE
Lloh8:
	ldr	x28, [x28, _H264_MAX_SPS_COUNT@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	x1, [sp, #16]
	mov	x2, x23
	bl	_avio_write
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [sp, #16]
	add	x0, x8, w23, sxtw #2
	str	x0, [sp, #16]
	sub	x8, x24, x0
	cmp	x8, #16
	b.le	LBB0_21
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	bl	_AV_RB32
	ldr	x8, [sp, #16]
	sub	x8, x24, x8
	lsr	x8, x8, #2
	sub	w1, w8, #4
	bl	_FFMIN
	mov	x23, x0
	ldr	x8, [sp, #16]
	ldr	w9, [x8, #16]!
	str	x8, [sp, #16]
	and	w8, w9, #0x1f
	cmp	w8, #8
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w8, #7
	b.ne	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w25, w25, #1
	ldr	w8, [x26]
	ldr	w9, [x28]
	cmp	w23, w8
	ccmp	w25, w9, #0, le
	b.ge	LBB0_24
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [sp, #32]
	mov	x1, x23
	bl	_avio_wb16
	ldr	x0, [sp, #32]
	b	LBB0_9
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w22, w22, #1
	ldr	w8, [x26]
	ldr	w9, [x27]
	cmp	w23, w8
	ccmp	w22, w9, #0, le
	b.ge	LBB0_24
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [sp, #24]
	mov	x1, x23
	bl	_avio_wb16
	ldr	x0, [sp, #24]
	b	LBB0_9
LBB0_17:
	mov	x20, x0
	b	LBB0_30
LBB0_18:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_avio_write
	mov	w20, #0
	b	LBB0_30
LBB0_19:
	mov	x20, x0
	b	LBB0_25
LBB0_20:
	mov	w25, #0
	mov	w22, #0
LBB0_21:
	ldr	x0, [sp, #32]
	add	x1, sp, #8
	bl	_avio_close_dyn_buf
	mov	x24, x0
	ldr	x0, [sp, #24]
	mov	x1, sp
	bl	_avio_close_dyn_buf
	cmp	w24, #6
	b.lt	LBB0_24
; %bb.22:
	mov	x23, x0
	cbz	w0, LBB0_24
; %bb.23:
	mov	x0, x21
	mov	w1, #1
	bl	_avio_w8
	ldr	x8, [sp, #8]
	ldr	w1, [x8, #12]
	mov	x0, x21
	bl	_avio_w8
	ldr	x8, [sp, #8]
	ldr	w1, [x8, #16]
	mov	x0, x21
	bl	_avio_w8
	ldr	x8, [sp, #8]
	ldr	w1, [x8, #20]
	mov	x0, x21
	bl	_avio_w8
	mov	x0, x21
	mov	w1, #255
	bl	_avio_w8
	orr	w1, w25, #0xe0
	mov	x0, x21
	bl	_avio_w8
	ldr	x1, [sp, #8]
	mov	x0, x21
	mov	x2, x24
	bl	_avio_write
	mov	x0, x21
	mov	x1, x22
	bl	_avio_w8
	ldr	x1, [sp]
	mov	x0, x21
	mov	x2, x23
	bl	_avio_write
	b	LBB0_25
LBB0_24:
Lloh9:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
LBB0_25:
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_27
; %bb.26:
	ldr	x0, [sp, #32]
	add	x1, sp, #8
	bl	_avio_close_dyn_buf
LBB0_27:
	ldr	x8, [sp]
	cbnz	x8, LBB0_29
; %bb.28:
	ldr	x0, [sp, #24]
	mov	x1, sp
	bl	_avio_close_dyn_buf
LBB0_29:
	ldr	x0, [sp, #8]
	bl	_av_free
	ldr	x0, [sp]
	bl	_av_free
	mov	x0, x19
	bl	_av_free
LBB0_30:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_UINT16_MAX,4,2                 ; @UINT16_MAX
	.comm	_H264_MAX_SPS_COUNT,4,2         ; @H264_MAX_SPS_COUNT
	.comm	_H264_MAX_PPS_COUNT,4,2         ; @H264_MAX_PPS_COUNT
.subsections_via_symbols
