	.file	"extr_cabac.c_put_cabac_terminate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	put_cabac_terminate, @function
put_cabac_terminate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, 8[rdi]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR [rdi]
	sub	eax, 2
	mov	DWORD PTR [rdi], eax
	test	esi, esi
	jne	.L2
	call	renorm_cabac_encoder@PLT
.L3:
	mov	rdi, r12
	call	put_bits_count@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	add	eax, 7
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	sar	eax, 3
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	add	DWORD PTR 4[rdi], eax
	mov	DWORD PTR [rdi], 2
	call	renorm_cabac_encoder@PLT
	xor	edi, edi
	cmp	DWORD PTR 4[rbp], 511
	setle	dil
	call	av_assert0@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	rdi, rbp
	sar	esi, 9
	call	put_cabac_bit@PLT
	mov	edx, DWORD PTR 4[rbp]
	mov	rdi, r12
	mov	esi, 2
	sar	edx, 7
	and	edx, 2
	or	edx, 1
	call	put_bits@PLT
	mov	rdi, r12
	call	flush_put_bits@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	put_cabac_terminate, .-put_cabac_terminate
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cabac.c_put_cabac_terminate.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	put_cabac_terminate, %function
put_cabac_terminate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r3, [r0]
	cmp	r1, #0
	sub	r3, r3, #2
	str	r3, [r5], #8
	bne	.L2
	bl	renorm_cabac_encoder
.L3:
	mov	r0, r5
	bl	put_bits_count
	add	r0, r0, #7
	asr	r0, r0, #3
	pop	{r4, r5, r6, pc}
.L2:
	mov	r6, #2
	mov	r4, r0
	ldr	r2, [r0, #4]
	str	r6, [r0]
	add	r3, r2, r3
	str	r3, [r0, #4]
	bl	renorm_cabac_encoder
	ldr	r0, [r4, #4]
	cmp	r0, #512
	movge	r0, #0
	movlt	r0, #1
	bl	av_assert0
	ldr	r1, [r4, #4]
	mov	r0, r4
	asr	r1, r1, #9
	bl	put_cabac_bit
	ldr	r2, [r4, #4]
	mov	r1, r6
	asr	r2, r2, #7
	and	r2, r2, r6
	mov	r0, r5
	orr	r2, r2, #1
	bl	put_bits
	mov	r0, r5
	bl	flush_put_bits
	b	.L3
	.size	put_cabac_terminate, .-put_cabac_terminate
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
