	.file	"extr_bitstream.c_avpriv_copy_bits.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	avpriv_copy_bits
	.type	avpriv_copy_bits, @function
avpriv_copy_bits:
.LFB0:
	.cfi_startproc
	endbr64
	test	edx, edx
	jne	.L17
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	sar	r12d, 4
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	put_bits_left@PLT
	xor	edi, edi
	cmp	eax, ebx
	setge	dil
	call	av_assert0@PLT
	lea	eax, [r12+r12]
	cmp	QWORD PTR CONFIG_SMALL[rip], 0
	mov	DWORD PTR 12[rsp], eax
	jne	.L11
	cmp	r12d, 15
	jg	.L3
.L11:
	test	r12d, r12d
	jle	.L6
.L5:
	mov	r14, r13
	xor	r15d, r15d
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, r14
	add	r15d, 1
	add	r14, 8
	call	AV_RB16@PLT
	mov	esi, 16
	mov	rdi, rbp
	mov	edx, eax
	call	put_bits@PLT
	cmp	r12d, r15d
	jg	.L7
.L6:
	movsx	r14, DWORD PTR 12[rsp]
	and	ebx, 15
	lea	rdi, 0[r13+r14*4]
	call	AV_RB16@PLT
	mov	ecx, 16
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, ebx
	sub	ecx, ebx
	mov	rdi, rbp
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	sar	eax, cl
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	mov	edx, eax
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	put_bits@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rdi, rbp
	call	put_bits_count@PLT
	and	eax, 7
	mov	r15d, eax
	jne	.L5
	mov	r12, r13
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edx, DWORD PTR [r12]
	mov	esi, 8
	mov	rdi, rbp
	add	r15d, 1
	add	r12, 4
	call	put_bits@PLT
.L8:
	mov	rdi, rbp
	call	put_bits_count@PLT
	test	al, 31
	jne	.L10
	mov	rdi, rbp
	call	flush_put_bits@PLT
	mov	eax, DWORD PTR 12[rsp]
	mov	rdi, rbp
	sub	eax, r15d
	mov	r15d, eax
	call	put_bits_ptr@PLT
	mov	rsi, r12
	mov	edx, r15d
	mov	edi, eax
	call	memcpy@PLT
	mov	esi, r15d
	mov	rdi, rbp
	call	skip_put_bytes@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	avpriv_copy_bits, .-avpriv_copy_bits
	.comm	CONFIG_SMALL,8,8
	.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_bitstream.c_avpriv_copy_bits.c"
	.text
	.align	2
	.global	avpriv_copy_bits
	.syntax unified
	.arm
	.fpu softvfp
	.type	avpriv_copy_bits, %function
avpriv_copy_bits:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r8, r2, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r9, r1
	mov	r6, r0
	bl	put_bits_left
	cmp	r0, r8
	movlt	r0, #0
	movge	r0, #1
	bl	av_assert0
	ldr	r2, .L13
	asr	r7, r8, #4
	ldr	r2, [r2]
	cmp	r7, #15
	movgt	r3, #0
	movle	r3, #1
	cmp	r2, #0
	movne	r3, #1
	cmp	r3, #0
	beq	.L3
	cmp	r7, #0
	ble	.L5
.L4:
	mov	r5, r9
	mov	r4, #0
.L6:
	mov	r0, r5
	bl	AV_RB16
	add	r4, r4, #1
	mov	r2, r0
	mov	r1, #16
	mov	r0, r6
	bl	put_bits
	cmp	r7, r4
	add	r5, r5, #8
	bgt	.L6
.L5:
	add	r0, r9, r7, lsl #3
	bl	AV_RB16
	mov	r2, r0
	and	r1, r8, #15
	rsb	r3, r1, #16
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	asr	r2, r2, r3
	b	put_bits
.L3:
	mov	r0, r6
	bl	put_bits_count
	ands	r4, r0, #7
	moveq	r5, r9
	beq	.L7
	b	.L4
.L9:
	mov	r1, #8
	mov	r0, r6
	ldr	r2, [r3]
	bl	put_bits
	add	r5, r5, #4
	add	r4, r4, #1
.L7:
	mov	r0, r6
	bl	put_bits_count
	tst	r0, #31
	mov	r3, r5
	bne	.L9
	mov	r0, r6
	bl	flush_put_bits
	rsb	r4, r4, r7, lsl #1
	mov	r0, r6
	bl	put_bits_ptr
	mov	r1, r5
	mov	r2, r4
	bl	memcpy
	mov	r1, r4
	mov	r0, r6
	bl	skip_put_bytes
	b	.L5
.L14:
	.align	2
.L13:
	.word	CONFIG_SMALL
	.size	avpriv_copy_bits, .-avpriv_copy_bits
	.comm	CONFIG_SMALL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
