	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function put_cabac_terminate
_put_cabac_terminate:                   ## @put_cabac_terminate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	addl	$-2, %eax
	movl	%eax, (%rdi)
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	addl	%eax, 4(%rbx)
	movl	$2, (%rbx)
	movq	%rbx, %rdi
	callq	_renorm_cabac_encoder
	xorl	%edi, %edi
	cmpl	$512, 4(%rbx)                   ## imm = 0x200
	setl	%dil
	callq	_av_assert0
	movl	4(%rbx), %esi
	sarl	$9, %esi
	movq	%rbx, %rdi
	callq	_put_cabac_bit
	leaq	8(%rbx), %r14
	movl	4(%rbx), %edx
	shrl	$7, %edx
	andl	$2, %edx
	orl	$1, %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
	movq	%r14, %rdi
	callq	_flush_put_bits
	jmp	LBB0_3
LBB0_1:
	movq	%rbx, %rdi
	callq	_renorm_cabac_encoder
LBB0_3:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_put_bits_count
	addl	$7, %eax
	sarl	$3, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_put_cabac_terminate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function put_cabac_terminate
_put_cabac_terminate:                   ; @put_cabac_terminate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	sub	w8, w8, #2
	str	w8, [x0]
	cbz	w1, LBB0_2
; %bb.1:
	ldr	w9, [x19, #4]
	add	w8, w9, w8
	mov	w9, #2
	stp	w9, w8, [x19]
	mov	x0, x19
	bl	_renorm_cabac_encoder
	ldr	w8, [x19, #4]
	cmp	w8, #512
	cset	w0, lt
	bl	_av_assert0
	ldr	w8, [x19, #4]
	asr	w1, w8, #9
	mov	x0, x19
	bl	_put_cabac_bit
	add	x20, x19, #8
	ldr	w8, [x19, #4]
	lsr	w8, w8, #7
	and	w8, w8, #0x2
	orr	w2, w8, #0x1
	mov	x0, x20
	mov	w1, #2
	bl	_put_bits
	mov	x0, x20
	bl	_flush_put_bits
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_renorm_cabac_encoder
LBB0_3:
	add	x0, x19, #8
	bl	_put_bits_count
	add	w8, w0, #7
	asr	w0, w8, #3
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_put_cabac_terminate
.subsections_via_symbols
