	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function convert_sps_pps
LCPI0_0:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_convert_sps_pps:                       ## @convert_sps_pps
	.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	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	cmpl	$6, %r13d
	jg	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	callq	_ALOGE
	movl	$-1, %eax
	jmp	LBB0_27
LBB0_3:
	movq	%rdi, %rbx
	testq	%r9, %r9
	je	LBB0_5
## %bb.4:
	movl	16(%rbx), %eax
	andl	$3, %eax
	incq	%rax
	movq	%rax, (%r9)
LBB0_5:
	movl	20(%rbx), %r15d
	addq	$24, %rbx
	addl	$-6, %r13d
	andl	$31, %r15d
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	je	LBB0_6
## %bb.10:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$1, %r13d
	jle	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%rbx), %edx
	shll	$8, %edx
	orl	4(%rbx), %edx
	movl	%r13d, %esi
	addl	$-2, %esi
	movl	%esi, %r13d
	subl	%edx, %r13d
	jl	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	leal	(%rdx,%rax), %r14d
	addl	$4, %r14d
	movslq	%r14d, %rcx
	cmpq	-64(%rbp), %rcx                 ## 8-byte Folded Reload
	ja	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	movslq	%edx, %r12
	addq	$8, %rbx
	movslq	%eax, %rcx
	addl	$4, %eax
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,1]
	movups	%xmm0, (%rsi,%rcx,4)
	cltq
	leaq	(%rsi,%rax,4), %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	leaq	(%rbx,%r12,4), %rbx
	movl	%r14d, %eax
	decl	%r15d
	jne	LBB0_11
## %bb.18:
	testl	%r13d, %r13d
	jg	LBB0_19
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_8
LBB0_6:
	xorl	%r14d, %r14d
LBB0_19:
	movzbl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:
	decl	%r13d
	addq	$4, %rbx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$2, %r13d
	jl	LBB0_12
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	(%rbx), %edx
	shll	$8, %edx
	orl	4(%rbx), %edx
	movl	%r13d, %esi
	addl	$-2, %esi
	movl	%esi, %r13d
	subl	%edx, %r13d
	jl	LBB0_14
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	leal	(%rdx,%r14), %r15d
	addl	$4, %r15d
	movslq	%r15d, %r12
	cmpq	-64(%rbp), %r12                 ## 8-byte Folded Reload
	ja	LBB0_16
## %bb.25:                              ##   in Loop: Header=BB0_22 Depth=1
	movslq	%edx, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	addq	$8, %rbx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%r14d, %rax
	addl	$4, %r14d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,1]
	movups	%xmm0, (%rcx,%rax,4)
	movslq	%r14d, %rax
	leaq	(%rcx,%rax,4), %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rbx,%rcx,4), %rbx
	movl	%r15d, %r14d
	decl	%eax
	jne	LBB0_22
	jmp	LBB0_26
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
LBB0_8:
	movl	%r13d, %esi
	jmp	LBB0_9
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
LBB0_9:
	xorl	%eax, %eax
	callq	_ALOGE
	movl	$-1, %eax
	jmp	LBB0_27
LBB0_16:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_2
LBB0_20:
	movslq	%r14d, %r12
LBB0_26:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	xorl	%eax, %eax
LBB0_27:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Input Metadata too small"

L_.str.1:                               ## @.str.1
	.asciz	"PPS too small after processing SPS/PPS %u"

L_.str.2:                               ## @.str.2
	.asciz	"SPS is too small %u"

L_.str.3:                               ## @.str.3
	.asciz	"SPS size does not match NAL specified size %u"

L_.str.4:                               ## @.str.4
	.asciz	"Output SPS/PPS buffer too small"

	.no_dead_strip	_convert_sps_pps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_sps_pps
_convert_sps_pps:                       ; @convert_sps_pps
	.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
	subs	w24, w1, #6
	b.gt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_ALOGE
	mov	w0, #-1
LBB0_3:
	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_4:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	cbz	x5, LBB0_6
; %bb.5:
	ldr	w8, [x0, #16]
	and	x8, x8, #0x3
	add	x8, x8, #1
	str	x8, [x5]
LBB0_6:
	ldr	w9, [x0, #20]
	add	x8, x0, #24
	mov	w25, #0
	and	w26, w9, #0x1f
	cbz	w26, LBB0_13
; %bb.7:
	mov	x27, #4294967296
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w24, #1
	b.le	LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldp	w9, w10, [x8]
	orr	w22, w10, w9, lsl #8
	sub	w9, w24, #2
	subs	w24, w9, w22
	b.lt	LBB0_20
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	sxtw	x10, w25
	add	x9, x10, #4
	add	w25, w22, w9
	mov	x11, x25
	sxtw	x11, w11
	cmp	x11, x20
	b.hi	LBB0_21
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x8, #8
	add	x8, x21, x10, lsl #2
	stp	xzr, x27, [x8]
	add	x0, x21, x9, lsl #2
	mov	x1, x23
	mov	x2, x22
	bl	_memcpy
	add	x8, x23, w22, sxtw #2
	subs	w26, w26, #1
	b.ne	LBB0_8
; %bb.12:
	cmp	w24, #1
	b.lt	LBB0_24
LBB0_13:
	ldrb	w26, [x8]
	cbz	w26, LBB0_22
; %bb.14:
	sub	w24, w24, #1
	add	x8, x8, #4
	mov	x27, #4294967296
	mov	x28, x25
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	subs	w9, w24, #2
	b.lt	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldp	w10, w11, [x8]
	orr	w22, w11, w10, lsl #8
	subs	w24, w9, w22
	b.lt	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	sxtw	x10, w28
	add	x9, x10, #4
	add	w28, w22, w9
	sxtw	x25, w28
	cmp	x25, x20
	b.hi	LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x8, #8
	add	x8, x21, x10, lsl #2
	stp	xzr, x27, [x8]
	add	x0, x21, x9, lsl #2
	mov	x1, x23
	mov	x2, x22
	bl	_memcpy
	add	x8, x23, w22, sxtw #2
                                        ; kill: def $w28 killed $w28 killed $x28 def $x28
	subs	w26, w26, #1
	b.ne	LBB0_15
	b	LBB0_23
LBB0_19:
	str	x24, [sp]
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_20:
	str	x9, [sp]
Lloh4:
	adrp	x0, l_.str.3@PAGE
Lloh5:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_2
LBB0_21:
Lloh6:
	adrp	x0, l_.str.4@PAGE
Lloh7:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_2
LBB0_22:
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	sxtw	x25, w25
LBB0_23:
	mov	w0, #0
	str	x25, [x19]
	b	LBB0_3
LBB0_24:
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	str	x24, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Input Metadata too small"

l_.str.1:                               ; @.str.1
	.asciz	"PPS too small after processing SPS/PPS %u"

l_.str.2:                               ; @.str.2
	.asciz	"SPS is too small %u"

l_.str.3:                               ; @.str.3
	.asciz	"SPS size does not match NAL specified size %u"

l_.str.4:                               ; @.str.4
	.asciz	"Output SPS/PPS buffer too small"

	.no_dead_strip	_convert_sps_pps
.subsections_via_symbols
