	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function avc1_packetizer_codecconfig
LCPI0_0:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_avc1_packetizer_codecconfig:           ## @avc1_packetizer_codecconfig
	.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	8(%rdi), %rax
	movslq	8(%rax), %r15
	cmpq	$6, %r15
	jl	LBB0_5
## %bb.1:
	movq	(%rax), %r12
	cmpl	$1, (%r12)
	jne	LBB0_5
## %bb.2:
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	movq	(%rdi), %rdi
	movl	%r15d, %esi
	callq	_vc_container_format_extradata_alloc
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	%r12, %rsi
	movq	(%rbx), %rcx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rdx
	movq	(%rcx), %r12
	movq	(%rdx), %rdx
	movl	16(%rdx), %edx
	andl	$3, %edx
	incl	%edx
	movl	%edx, (%r14)
	xorl	%r13d, %r13d
	cmpl	$7, %r15d
	jb	LBB0_18
## %bb.4:
	leaq	20(%rsi), %r14
	leaq	(%rsi,%r15,4), %rax
	leaq	(%rsi,%r15,4), %rcx
	addq	$-4, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	$-8, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movb	$1, %al
	movl	$31, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%rsi, %r14
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	cmpq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	setb	%al
	movl	$255, %r15d
	testb	%al, -44(%rbp)                  ## 1-byte Folded Reload
	movl	$0, %eax
	je	LBB0_17
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	leaq	4(%r14), %rsi
	andl	(%r14), %r15d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	-64(%rbp), %rsi                 ## 8-byte Folded Reload
	jae	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	decl	%r15d
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi), %ebx
	shll	$8, %ebx
	orl	4(%rsi), %ebx
	leaq	(%rsi,%rbx,4), %r14
	addq	$8, %r14
	cmpq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	ja	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	addq	$8, %rsi
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,1]
	movups	%xmm0, (%r12)
	leaq	16(%r12), %rdi
	movl	%ebx, %edx
	callq	_memcpy
	leal	4(%rbx), %eax
	leaq	(%r12,%rax,4), %r12
	addl	%ebx, %r13d
	addl	$4, %r13d
	addl	$-1, %r15d
	jae	LBB0_8
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	%r14, %rsi
	cmpq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	jb	LBB0_12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_5:
	movq	_VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_18:
	movl	%r13d, 8(%rcx)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,8,3 ## @VC_CONTAINER_ERROR_FORMAT_INVALID
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.no_dead_strip	_avc1_packetizer_codecconfig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function avc1_packetizer_codecconfig
lCPI0_0:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_avc1_packetizer_codecconfig:           ; @avc1_packetizer_codecconfig
	.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
	ldr	x8, [x0, #8]
	ldrsw	x20, [x8, #8]
	cmp	w20, #6
	b.lt	LBB0_9
; %bb.1:
	ldr	x22, [x8]
	ldr	w8, [x22]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.2:
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x24, [x8]
	ldr	x0, [x0]
	mov	x1, x20
	bl	_vc_container_format_extradata_alloc
Lloh0:
	adrp	x21, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.3:
	ldp	x8, x9, [x19]
	ldr	x23, [x8]
	ldr	x9, [x9]
	ldr	w9, [x9, #16]
	and	w9, w9, #0x3
	add	w9, w9, #1
	str	w9, [x24]
	cmp	w20, #7
	b.lo	LBB0_11
; %bb.4:
	add	x24, x22, x20, lsl #2
	add	x8, x22, x20, lsl #2
	sub	x27, x8, #4
	sub	x25, x8, #8
	add	x26, x22, #24
	ldr	w8, [x22, #20]
	and	w8, w8, #0x1f
	cmp	w8, #0
	mov	w22, #0
	ccmp	w20, #9, #8, ne
	b.lt	LBB0_13
; %bb.5:
	sub	w28, w8, #1
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp]                        ; 16-byte Folded Spill
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x26]
	orr	w20, w9, w8, lsl #8
	add	x1, x26, #8
	add	x26, x1, w20, uxtw #2
	cmp	x26, x24
	b.hi	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	str	q0, [x0], #16
	mov	x2, x20
	bl	_memcpy
	add	w8, w20, #4
	add	x23, x23, w8, uxtw #2
	add	w22, w8, w22
	subs	w28, w28, #1
	b.lo	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x26, x25
	b.lo	LBB0_6
	b	LBB0_13
LBB0_9:
Lloh4:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGEOFF]
Lloh6:
	ldr	x0, [x8]
LBB0_10:
	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
LBB0_11:
	mov	w22, #0
	b	LBB0_21
LBB0_12:
	mov	x26, x24
LBB0_13:
	cmp	x26, x27
	b.hs	LBB0_20
; %bb.14:
	ldrb	w8, [x26], #4
	cbz	w8, LBB0_20
; %bb.15:
	cmp	x26, x25
	b.hs	LBB0_20
; %bb.16:
	sub	w27, w8, #1
Lloh7:
	adrp	x8, lCPI0_0@PAGE
Lloh8:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp]                        ; 16-byte Folded Spill
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x26]
	orr	w20, w9, w8, lsl #8
	add	x1, x26, #8
	add	x26, x1, w20, uxtw #2
	cmp	x26, x24
	b.hi	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x23
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	str	q0, [x0], #16
	mov	x2, x20
	bl	_memcpy
	add	w8, w20, #4
	add	w22, w8, w22
	subs	w27, w27, #1
	b.lo	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x23, x23, w8, uxtw #2
	cmp	x26, x25
	b.lo	LBB0_17
LBB0_20:
	ldr	x8, [x19]
	ldr	x0, [x21]
LBB0_21:
	str	w22, [x8, #8]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdr	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,8,3 ; @VC_CONTAINER_ERROR_FORMAT_INVALID
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.no_dead_strip	_avc1_packetizer_codecconfig
.subsections_via_symbols
