	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_nal_unit_extract_rbsp       ## -- Begin function ff_nal_unit_extract_rbsp
	.p2align	4, 0x90
_ff_nal_unit_extract_rbsp:              ## @ff_nal_unit_extract_rbsp
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r14
	movslq	%esi, %rcx
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rcx, %rbx
	addq	%rcx, %rdi
	callq	_av_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_46
## %bb.1:
	xorl	%eax, %eax
	testl	%r13d, %r13d
	jle	LBB0_17
## %bb.2:
	testl	%r12d, %r12d
	jle	LBB0_17
## %bb.3:
	decl	%r13d
	leal	-1(%r12), %eax
	cmpl	%eax, %r13d
	cmovael	%eax, %r13d
	leal	1(%r13), %eax
	xorl	%ecx, %ecx
	cmpl	$7, %r13d
	jb	LBB0_13
## %bb.4:
	movq	%r15, %rdx
	subq	%r14, %rdx
	cmpq	$32, %rdx
	jb	LBB0_13
## %bb.5:
	movl	%eax, %ecx
	andl	$-8, %ecx
	leaq	-8(%rcx), %rdx
	movq	%rdx, %rsi
	shrq	$3, %rsi
	incq	%rsi
	movl	%esi, %r8d
	andl	$3, %r8d
	cmpq	$24, %rdx
	jae	LBB0_7
## %bb.6:
	xorl	%edi, %edi
	jmp	LBB0_9
LBB0_7:
	andq	$-4, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%r14,%rdi,4), %xmm0
	movups	16(%r14,%rdi,4), %xmm1
	movups	%xmm0, (%r15,%rdi,4)
	movups	%xmm1, 16(%r15,%rdi,4)
	movups	32(%r14,%rdi,4), %xmm0
	movups	48(%r14,%rdi,4), %xmm1
	movups	%xmm0, 32(%r15,%rdi,4)
	movups	%xmm1, 48(%r15,%rdi,4)
	movups	64(%r14,%rdi,4), %xmm0
	movups	80(%r14,%rdi,4), %xmm1
	movups	%xmm0, 64(%r15,%rdi,4)
	movups	%xmm1, 80(%r15,%rdi,4)
	movups	96(%r14,%rdi,4), %xmm0
	movups	112(%r14,%rdi,4), %xmm1
	movups	%xmm0, 96(%r15,%rdi,4)
	movups	%xmm1, 112(%r15,%rdi,4)
	addq	$32, %rdi
	addq	$-4, %rsi
	jne	LBB0_8
LBB0_9:
	testq	%r8, %r8
	je	LBB0_12
## %bb.10:
	leaq	(%r15,%rdi,4), %rsi
	addq	$16, %rsi
	leaq	(%r14,%rdi,4), %rdi
	addq	$16, %rdi
	shlq	$5, %r8
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%rdi,%rdx), %xmm0
	movups	(%rdi,%rdx), %xmm1
	movups	%xmm0, -16(%rsi,%rdx)
	movups	%xmm1, (%rsi,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %r8
	jne	LBB0_11
LBB0_12:
	cmpq	%rax, %rcx
	je	LBB0_17
LBB0_13:
	movq	%rcx, %r8
	notq	%r8
	addq	%rax, %r8
	movq	%rax, %rdi
	andq	$3, %rdi
	je	LBB0_37
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	leaq	1(%rcx), %rdx
	movl	(%r14,%rcx,4), %esi
	movl	%esi, (%r15,%rcx,4)
	movq	%rdx, %rcx
	decq	%rdi
	jne	LBB0_14
## %bb.15:
	cmpq	$3, %r8
	jb	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rdx,4), %ecx
	movl	%ecx, (%r15,%rdx,4)
	movl	4(%r14,%rdx,4), %ecx
	movl	%ecx, 4(%r15,%rdx,4)
	movl	8(%r14,%rdx,4), %ecx
	movl	%ecx, 8(%r15,%rdx,4)
	movl	12(%r14,%rdx,4), %ecx
	movl	%ecx, 12(%r15,%rdx,4)
	leaq	4(%rdx), %rcx
	movq	%rcx, %rdx
	cmpq	%rcx, %rax
	jne	LBB0_16
LBB0_17:
	leal	2(%rax), %ecx
	movl	%eax, %edx
	movq	%rbx, %r13
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	%edx, %ecx
LBB0_19:                                ##   in Loop: Header=BB0_20 Depth=1
	cltq
	movl	%esi, (%r15,%rax,4)
	incl	%eax
	leal	1(%rcx), %edx
	addl	$3, %ecx
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r12d, %ecx
	jge	LBB0_27
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movslq	%edx, %rdi
	movl	(%r14,%rdi,4), %esi
	testl	%esi, %esi
	jne	LBB0_18
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=1
	cmpl	$0, 4(%r14,%rdi,4)
	jne	LBB0_18
## %bb.24:                              ##   in Loop: Header=BB0_20 Depth=1
	movslq	%ecx, %rbx
	cmpl	$3, (%r14,%rbx,4)
	jne	LBB0_18
## %bb.25:                              ##   in Loop: Header=BB0_20 Depth=1
	incq	%rdi
	movslq	%eax, %rdx
	incl	%eax
	movl	$0, (%r15,%rdx,4)
	movl	(%r14,%rdi,4), %esi
	jmp	LBB0_19
LBB0_27:
	cmpl	%r12d, %edx
	jge	LBB0_36
## %bb.28:
	cltq
	movslq	%edx, %rcx
	movq	%r13, %r10
	subq	%rcx, %r10
	cmpq	$8, %r10
	jb	LBB0_39
## %bb.29:
	leaq	(%r15,%rax,4), %rdx
	leaq	(%r14,%rcx,4), %rsi
	subq	%rsi, %rdx
	cmpq	$32, %rdx
	jb	LBB0_39
## %bb.30:
	movq	%r10, %r8
	andq	$-8, %r8
	leaq	-8(%r8), %rdx
	movq	%rdx, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rdx, %rdx
	je	LBB0_47
## %bb.31:
	movabsq	$4611686018427387900, %rdi      ## imm = 0x3FFFFFFFFFFFFFFC
	orq	$2, %rdi
	andq	%r9, %rdi
	leaq	(%r15,%rax,4), %r11
	addq	$48, %r11
	leaq	(%r14,%rcx,4), %rdx
	addq	$48, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movups	-48(%rdx,%rsi,4), %xmm0
	movups	-32(%rdx,%rsi,4), %xmm1
	movups	%xmm0, -48(%r11,%rsi,4)
	movups	%xmm1, -32(%r11,%rsi,4)
	movups	-16(%rdx,%rsi,4), %xmm0
	movups	(%rdx,%rsi,4), %xmm1
	movups	%xmm0, -16(%r11,%rsi,4)
	movups	%xmm1, (%r11,%rsi,4)
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_32
## %bb.33:
	testb	$1, %r9b
	je	LBB0_35
LBB0_34:
	leaq	(%rsi,%rax), %rdx
	addq	%rcx, %rsi
	movups	(%r14,%rsi,4), %xmm0
	movups	16(%r14,%rsi,4), %xmm1
	movups	%xmm0, (%r15,%rdx,4)
	movups	%xmm1, 16(%r15,%rdx,4)
LBB0_35:
	addq	%r8, %rax
	cmpq	%r8, %r10
	jne	LBB0_38
LBB0_36:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_45
LBB0_37:
	movq	%rcx, %rdx
	cmpq	$3, %r8
	jae	LBB0_16
	jmp	LBB0_17
LBB0_38:
	addq	%r8, %rcx
LBB0_39:
	subl	%ecx, %r12d
	movq	%rcx, %rdx
	notq	%rdx
	addq	%r13, %rdx
	andq	$3, %r12
	je	LBB0_41
	.p2align	4, 0x90
LBB0_40:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rcx,4), %esi
	incq	%rcx
	movl	%esi, (%r15,%rax,4)
	incq	%rax
	decq	%r12
	jne	LBB0_40
LBB0_41:
	cmpq	$3, %rdx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jb	LBB0_45
## %bb.42:
	subq	%rcx, %r13
	leaq	(%r14,%rcx,4), %rdx
	addq	$12, %rdx
	leaq	(%r15,%rax,4), %rsi
	addq	$12, %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	movl	-12(%rdx,%rcx,4), %edi
	movl	%edi, -12(%rsi,%rcx,4)
	movl	-8(%rdx,%rcx,4), %edi
	movl	%edi, -8(%rsi,%rcx,4)
	movl	-4(%rdx,%rcx,4), %edi
	movl	%edi, -4(%rsi,%rcx,4)
	movl	(%rdx,%rcx,4), %edi
	movl	%edi, (%rsi,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %r13
	jne	LBB0_43
## %bb.44:
	addq	%rcx, %rax
LBB0_45:
	movslq	%eax, %rbx
	leaq	(%r15,%rbx,4), %rdi
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	xorl	%esi, %esi
	callq	_memset
	movl	%ebx, (%r12)
LBB0_46:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_47:
	xorl	%esi, %esi
	testb	$1, %r9b
	jne	LBB0_34
	jmp	LBB0_35
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ## @AV_INPUT_BUFFER_PADDING_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_nal_unit_extract_rbsp       ; -- Begin function ff_nal_unit_extract_rbsp
	.p2align	2
_ff_nal_unit_extract_rbsp:              ; @ff_nal_unit_extract_rbsp
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	sxtw	x25, w22
Lloh0:
	adrp	x24, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
	ldr	x8, [x24]
	add	x0, x8, x25
	bl	_av_malloc
	mov	x20, x0
	cbz	x0, LBB0_28
; %bb.1:
	mov	w26, #0
	subs	w9, w23, #1
	b.lt	LBB0_10
; %bb.2:
	subs	w10, w22, #1
	b.lt	LBB0_10
; %bb.3:
	mov	x8, #0
	cmp	w9, w10
	csel	w9, w9, w10, lo
	add	w26, w9, #1
	cmp	w9, #15
	b.lo	LBB0_8
; %bb.4:
	sub	x9, x20, x21
	cmp	x9, #64
	b.lo	LBB0_8
; %bb.5:
	and	x8, x26, #0xfffffff0
	add	x9, x20, #32
	add	x10, x21, #32
	mov	x11, x8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x10, #-32]
	ldp	q2, q3, [x10], #64
	stp	q0, q1, [x9, #-32]
	stp	q2, q3, [x9], #64
	subs	x11, x11, #16
	b.ne	LBB0_6
; %bb.7:
	cmp	x8, x26
	b.eq	LBB0_10
LBB0_8:
	lsl	x10, x8, #2
	add	x9, x21, x10
	add	x10, x20, x10
	sub	x8, x26, x8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	str	w11, [x10], #4
	subs	x8, x8, #1
	b.ne	LBB0_9
LBB0_10:
	add	w8, w26, #2
	mov	x9, x26
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x8, x9
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	str	w10, [x20, w26, sxtw #2]
	add	w26, w26, #1
	add	w9, w8, #1
	add	w8, w8, #3
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	cmp	w8, w22
	b.ge	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w10, [x21, w9, sxtw #2]
	cbnz	w10, LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	sxtw	x11, w9
	add	x11, x11, #1
	ldr	w12, [x21, x11, lsl #2]
	cbnz	w12, LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w12, [x21, w8, sxtw #2]
	cmp	w12, #3
	b.ne	LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	str	wzr, [x20, w26, sxtw #2]
	add	w9, w26, #1
	ldr	w10, [x21, x11, lsl #2]
	mov	x26, x9
	b	LBB0_12
LBB0_18:
	cmp	w9, w22
	b.ge	LBB0_27
; %bb.19:
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	sxtw	x26, w26
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	sxtw	x8, w9
	sub	x9, x25, x8
	cmp	x9, #16
	b.lo	LBB0_24
; %bb.20:
	add	x11, x20, x26, lsl #2
	add	x12, x21, x8, lsl #2
	sub	x10, x11, x12
	cmp	x10, #64
	b.lo	LBB0_24
; %bb.21:
	and	x10, x9, #0xfffffffffffffff0
	add	x8, x10, x8
	add	x26, x10, x26
	add	x11, x11, #32
	add	x12, x12, #32
	mov	x13, x10
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_22
; %bb.23:
	cmp	x9, x10
	b.eq	LBB0_26
LBB0_24:
	add	x9, x21, x8, lsl #2
	sub	x8, x25, x8
	mov	x10, x26
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	add	x26, x10, #1
	str	w11, [x20, x10, lsl #2]
	mov	x10, x26
	subs	x8, x8, #1
	b.ne	LBB0_25
LBB0_26:
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
LBB0_27:
	add	x0, x20, w26, sxtw #2
	ldr	x2, [x24]
	mov	w1, #0
	bl	_memset
	str	w26, [x19]
LBB0_28:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,8,3 ; @AV_INPUT_BUFFER_PADDING_SIZE
.subsections_via_symbols
