	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cbs_h265_read_nal_unit
_cbs_h265_read_nal_unit:                ## @cbs_h265_read_nal_unit
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	16(%rsi), %rsi
	movl	(%r12), %edx
	shll	$3, %edx
	leaq	-44(%rbp), %rdi
	callq	_init_get_bits
	testl	%eax, %eax
	js	LBB0_33
## %bb.1:
	movl	4(%r12), %eax
	addl	$-128, %eax
	cmpl	$21, %eax
	ja	LBB0_30
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	movq	_cbs_h265_free_slice@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$20, %edx
	callq	_ff_cbs_alloc_unit_content
	testl	%eax, %eax
	js	LBB0_33
## %bb.14:
	movq	8(%r12), %rbx
	leaq	16(%rbx), %rdx
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cbs_h265_read_slice_segment_header
	testl	%eax, %eax
	js	LBB0_33
## %bb.15:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %rdi
	callq	_get_bits_count
	movl	%eax, %r15d
	movslq	(%r12), %r13
	movq	16(%r12), %rax
	cmpl	$0, -4(%rax,%r13,4)
	jne	LBB0_23
## %bb.16:
	testl	%r13d, %r13d
	jle	LBB0_17
## %bb.18:
	movl	%r13d, %ecx
	leal	-1(%r13), %edx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rdx,%rbx), %esi
	movslq	%esi, %rsi
	cmpl	$0, (%rax,%rsi,4)
	jne	LBB0_34
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	decq	%rbx
	movq	%rcx, %rsi
	addq	%rbx, %rsi
	jne	LBB0_19
## %bb.21:
	movl	%ecx, %ebx
	jmp	LBB0_22
LBB0_28:
	movq	_cbs_h265_free_sei@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_ff_cbs_alloc_unit_content
	testl	%eax, %eax
	js	LBB0_33
## %bb.29:
	movq	8(%r12), %rdx
	xorl	%ecx, %ecx
	cmpl	$137, 4(%r12)
	sete	%cl
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cbs_h265_read_sei
	jmp	LBB0_6
LBB0_30:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_3:
	movq	_cbs_h265_free_vps@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$20, %edx
	callq	_ff_cbs_alloc_unit_content
	testl	%eax, %eax
	js	LBB0_33
## %bb.4:
	movq	8(%r12), %rdx
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cbs_h265_read_vps
	testl	%eax, %eax
	js	LBB0_33
## %bb.5:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_cbs_h265_replace_vps
	jmp	LBB0_6
LBB0_7:
	movq	_cbs_h265_free_sps@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$20, %edx
	callq	_ff_cbs_alloc_unit_content
	testl	%eax, %eax
	js	LBB0_33
## %bb.8:
	movq	8(%r12), %rdx
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cbs_h265_read_sps
	testl	%eax, %eax
	js	LBB0_33
## %bb.9:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_cbs_h265_replace_sps
	jmp	LBB0_6
LBB0_10:
	movq	_cbs_h265_free_pps@GOTPCREL(%rip), %rcx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$20, %edx
	callq	_ff_cbs_alloc_unit_content
	testl	%eax, %eax
	js	LBB0_33
## %bb.11:
	movq	8(%r12), %rdx
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cbs_h265_read_pps
	testl	%eax, %eax
	js	LBB0_33
## %bb.12:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_cbs_h265_replace_pps
	jmp	LBB0_6
LBB0_26:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_ff_cbs_alloc_unit_content
	testl	%eax, %eax
	js	LBB0_33
## %bb.27:
	movq	8(%r12), %rdx
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cbs_h265_read_aud
LBB0_6:
	testl	%eax, %eax
	jns	LBB0_32
	jmp	LBB0_33
LBB0_17:
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_34:
	negl	%ebx
LBB0_22:
	movl	(%r14), %edi
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	callq	_av_log
	subl	%ebx, %r13d
LBB0_23:
	leal	7(%r15), %r14d
	testl	%r15d, %r15d
	cmovnsl	%r15d, %r14d
	movl	%r14d, %ebx
	sarl	$3, %ebx
	subl	%ebx, %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	movq	%rax, %r13
	movl	24(%r12), %edi
	callq	_av_buffer_ref
	movl	%eax, 12(%r13)
	testl	%eax, %eax
	je	LBB0_24
## %bb.31:
	andl	$-8, %r14d
	subl	%r14d, %r15d
	shll	$2, %ebx
	addl	16(%r12), %ebx
	movl	%ebx, 8(%r13)
	movl	%r15d, 4(%r13)
LBB0_32:
	xorl	%eax, %eax
	jmp	LBB0_33
LBB0_24:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_33:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_7
	.long	L0_0_set_28
	.long	L0_0_set_28
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_10
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_13
	.long	L0_0_set_26
	.end_data_region
                                        ## -- End function
	.comm	_cbs_h265_free_vps,4,2          ## @cbs_h265_free_vps
	.comm	_cbs_h265_free_sps,4,2          ## @cbs_h265_free_sps
	.comm	_cbs_h265_free_pps,4,2          ## @cbs_h265_free_pps
	.comm	_cbs_h265_free_slice,4,2        ## @cbs_h265_free_slice
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Deleted %d trailing zeroes from slice data.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_cbs_h265_free_sei,4,2          ## @cbs_h265_free_sei
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.no_dead_strip	_cbs_h265_read_nal_unit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cbs_h265_read_nal_unit
_cbs_h265_read_nal_unit:                ; @cbs_h265_read_nal_unit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x1, [x1, #16]
	ldr	w8, [x19]
	lsl	w2, w8, #3
	add	x0, sp, #12
	bl	_init_get_bits
	tbnz	w0, #31, LBB0_33
; %bb.1:
	ldr	w8, [x19, #4]
	sub	w8, w8, #128
	cmp	w8, #21
	b.hi	LBB0_13
; %bb.2:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
Lloh2:
	adrp	x3, _cbs_h265_free_slice@GOTPAGE
Lloh3:
	ldr	x3, [x3, _cbs_h265_free_slice@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #20
	bl	_ff_cbs_alloc_unit_content
	tbnz	w0, #31, LBB0_33
; %bb.4:
	ldr	x23, [x19, #8]
	add	x2, x23, #16
	add	x1, sp, #12
	mov	x0, x20
	bl	_cbs_h265_read_slice_segment_header
	tbnz	w0, #31, LBB0_33
; %bb.5:
	add	x0, sp, #12
	bl	_get_bits_count
	mov	x21, x0
	ldr	w24, [x19]
	ldr	x8, [x19, #16]
	sub	w9, w24, #1
	ldr	w9, [x8, w9, sxtw #2]
	cbnz	w9, LBB0_28
; %bb.6:
	subs	w9, w24, #1
	b.lt	LBB0_25
; %bb.7:
	mov	x10, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w9, w10
	ldr	w11, [x8, w11, sxtw #2]
	cbnz	w11, LBB0_26
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sub	x10, x10, #1
	cmn	x24, x10
	b.ne	LBB0_8
; %bb.10:
	mov	x22, x24
	b	LBB0_27
LBB0_11:
Lloh4:
	adrp	x3, _cbs_h265_free_sei@GOTPAGE
Lloh5:
	ldr	x3, [x3, _cbs_h265_free_sei@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	bl	_ff_cbs_alloc_unit_content
	tbnz	w0, #31, LBB0_33
; %bb.12:
	ldr	x2, [x19, #8]
	ldr	w8, [x19, #4]
	cmp	w8, #137
	cset	w3, eq
	add	x1, sp, #12
	mov	x0, x20
	bl	_cbs_h265_read_sei
	tbz	w0, #31, LBB0_30
	b	LBB0_33
LBB0_13:
Lloh6:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_32
LBB0_14:
Lloh8:
	adrp	x3, _cbs_h265_free_vps@GOTPAGE
Lloh9:
	ldr	x3, [x3, _cbs_h265_free_vps@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #20
	bl	_ff_cbs_alloc_unit_content
	tbnz	w0, #31, LBB0_33
; %bb.15:
	ldr	x2, [x19, #8]
	add	x1, sp, #12
	mov	x0, x20
	bl	_cbs_h265_read_vps
	tbnz	w0, #31, LBB0_33
; %bb.16:
	mov	x0, x20
	mov	x1, x19
	bl	_cbs_h265_replace_vps
	tbz	w0, #31, LBB0_30
	b	LBB0_33
LBB0_17:
Lloh10:
	adrp	x3, _cbs_h265_free_sps@GOTPAGE
Lloh11:
	ldr	x3, [x3, _cbs_h265_free_sps@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #20
	bl	_ff_cbs_alloc_unit_content
	tbnz	w0, #31, LBB0_33
; %bb.18:
	ldr	x2, [x19, #8]
	add	x1, sp, #12
	mov	x0, x20
	bl	_cbs_h265_read_sps
	tbnz	w0, #31, LBB0_33
; %bb.19:
	mov	x0, x20
	mov	x1, x19
	bl	_cbs_h265_replace_sps
	tbz	w0, #31, LBB0_30
	b	LBB0_33
LBB0_20:
Lloh12:
	adrp	x3, _cbs_h265_free_pps@GOTPAGE
Lloh13:
	ldr	x3, [x3, _cbs_h265_free_pps@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #20
	bl	_ff_cbs_alloc_unit_content
	tbnz	w0, #31, LBB0_33
; %bb.21:
	ldr	x2, [x19, #8]
	add	x1, sp, #12
	mov	x0, x20
	bl	_cbs_h265_read_pps
	tbnz	w0, #31, LBB0_33
; %bb.22:
	mov	x0, x20
	mov	x1, x19
	bl	_cbs_h265_replace_pps
	tbz	w0, #31, LBB0_30
	b	LBB0_33
LBB0_23:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	x3, #0
	bl	_ff_cbs_alloc_unit_content
	tbnz	w0, #31, LBB0_33
; %bb.24:
	ldr	x2, [x19, #8]
	add	x1, sp, #12
	mov	x0, x20
	bl	_cbs_h265_read_aud
	tbz	w0, #31, LBB0_30
	b	LBB0_33
LBB0_25:
	mov	w22, #0
	b	LBB0_27
LBB0_26:
	neg	w22, w10
LBB0_27:
	ldr	w0, [x20]
Lloh14:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x22
	bl	_av_log
	sub	w24, w24, w22
LBB0_28:
	add	w8, w21, #7
	cmp	w21, #0
	csel	w8, w8, w21, lt
	asr	w20, w8, #3
	sub	w8, w24, w20
	str	w8, [x23]
	ldr	w0, [x19, #24]
	bl	_av_buffer_ref
	str	w0, [x23, #12]
	cbz	w0, LBB0_31
; %bb.29:
	ldr	w8, [x19, #16]
	add	w8, w8, w20, lsl #2
	sub	w9, w21, w20, lsl #3
	stp	w9, w8, [x23, #4]
LBB0_30:
	mov	w0, #0
	b	LBB0_33
LBB0_31:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_32:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_33:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_14-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_17-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_20-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_23-LBB0_3)>>2
                                        ; -- End function
	.comm	_cbs_h265_free_vps,4,2          ; @cbs_h265_free_vps
	.comm	_cbs_h265_free_sps,4,2          ; @cbs_h265_free_sps
	.comm	_cbs_h265_free_pps,4,2          ; @cbs_h265_free_pps
	.comm	_cbs_h265_free_slice,4,2        ; @cbs_h265_free_slice
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Deleted %d trailing zeroes from slice data.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_cbs_h265_free_sei,4,2          ; @cbs_h265_free_sei
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.no_dead_strip	_cbs_h265_read_nal_unit
.subsections_via_symbols
