	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw5864_h264_gen_sps_rbsp
_tw5864_h264_gen_sps_rbsp:              ## @tw5864_h264_gen_sps_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movq	%rsi, %rdx
	movq	%rdi, %rsi
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_bs_init
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$66, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	movl	$5, %esi
	xorl	%edx, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$30, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bs_write_ue
	movq	_MAX_GOP_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_ilog2
                                        ## kill: def $eax killed $eax def $rax
	leal	-4(%rax), %esi
	movq	%rbx, %rdi
	callq	_bs_write_ue
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bs_write_ue
	movl	(%r12), %edi
	callq	_ilog2
                                        ## kill: def $eax killed $eax def $rax
	leal	-4(%rax), %esi
	movq	%rbx, %rdi
	callq	_bs_write_ue
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bs_write_ue
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_bs_write
	leal	15(%r15), %esi
	testl	%r15d, %r15d
	cmovnsl	%r15d, %esi
	sarl	$4, %esi
	decl	%esi
	movq	%rbx, %rdi
	callq	_bs_write_ue
	leal	15(%r14), %esi
	testl	%r14d, %r14d
	cmovnsl	%r14d, %esi
	sarl	$4, %esi
	decl	%esi
	movq	%rbx, %rdi
	callq	_bs_write_ue
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_bs_write
	movq	%rbx, %rdi
	callq	_bs_rbsp_trailing
	movq	%rbx, %rdi
	callq	_bs_len
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_GOP_SIZE,4,2               ## @MAX_GOP_SIZE
	.no_dead_strip	_tw5864_h264_gen_sps_rbsp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw5864_h264_gen_sps_rbsp
_tw5864_h264_gen_sps_rbsp:              ; @tw5864_h264_gen_sps_rbsp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x2, x1
	mov	x1, x0
	add	x0, sp, #8
	bl	_bs_init
	add	x0, sp, #8
	mov	w1, #8
	mov	w2, #66
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #1
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #1
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #0
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #5
	mov	w2, #0
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #8
	mov	w2, #30
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #0
	bl	_bs_write_ue
Lloh0:
	adrp	x21, _MAX_GOP_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_GOP_SIZE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_ilog2
	sub	w1, w0, #4
	add	x0, sp, #8
	bl	_bs_write_ue
	add	x0, sp, #8
	mov	w1, #0
	bl	_bs_write_ue
	ldr	w0, [x21]
	bl	_ilog2
	sub	w1, w0, #4
	add	x0, sp, #8
	bl	_bs_write_ue
	add	x0, sp, #8
	mov	w1, #1
	bl	_bs_write_ue
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #0
	bl	_bs_write
	add	w8, w20, #15
	cmp	w20, #0
	csel	w8, w8, w20, lt
	asr	w8, w8, #4
	sub	w1, w8, #1
	add	x0, sp, #8
	bl	_bs_write_ue
	add	w8, w19, #15
	cmp	w19, #0
	csel	w8, w8, w19, lt
	asr	w8, w8, #4
	sub	w1, w8, #1
	add	x0, sp, #8
	bl	_bs_write_ue
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #1
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #0
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #0
	bl	_bs_write
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #0
	bl	_bs_write
	add	x0, sp, #8
	bl	_bs_rbsp_trailing
	add	x0, sp, #8
	bl	_bs_len
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_GOP_SIZE,4,2               ; @MAX_GOP_SIZE
	.no_dead_strip	_tw5864_h264_gen_sps_rbsp
.subsections_via_symbols
