	.file	"extr_huffman_encode_utils.c_ReverseBits.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ReverseBits, @function
ReverseBits:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR MAX_ALLOWED_CODE_LENGTH[rip]
	mov	edx, edi
	lea	ecx, 1[rax]
	sub	ecx, edi
	mov	r9d, ecx
	test	edi, edi
	jle	.L4
	sub	edx, 1
	lea	edi, -7[rax]
	mov	r8, QWORD PTR kReversedBits[rip]
	lea	ecx, -3[rax]
	and	edx, -4
	xor	eax, eax
	sub	edi, edx
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, esi
	sar	esi, 4
	and	edx, 15
	mov	edx, DWORD PTR [r8+rdx*4]
	sal	edx, cl
	sub	ecx, 4
	or	eax, edx
	cmp	edi, ecx
	jne	.L3
	mov	ecx, r9d
	sar	eax, cl
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	ReverseBits, .-ReverseBits
	.comm	kReversedBits,8,8
	.comm	MAX_ALLOWED_CODE_LENGTH,4,4
	.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_huffman_encode_utils.c_ReverseBits.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ReverseBits, %function
ReverseBits:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L8
	cmp	r0, #0
	ldr	r3, [r3]
	push	{r4, r5, lr}
	add	r2, r3, #1
	sub	r5, r2, r0
	ble	.L4
	mov	r2, #0
	ldr	r4, .L8+4
	sub	lr, r0, #1
	bic	ip, lr, #3
	ldr	r4, [r4]
	sub	lr, r3, #7
	sub	lr, lr, ip
	sub	r3, r3, #3
.L3:
	and	ip, r1, #15
	ldr	ip, [r4, ip, lsl #2]
	asr	r1, r1, #4
	orr	r2, r2, ip, lsl r3
	sub	r3, r3, #4
	cmp	lr, r3
	bne	.L3
	asr	r0, r2, r5
	pop	{r4, r5, pc}
.L4:
	mov	r0, #0
	pop	{r4, r5, pc}
.L9:
	.align	2
.L8:
	.word	MAX_ALLOWED_CODE_LENGTH
	.word	kReversedBits
	.size	ReverseBits, .-ReverseBits
	.comm	kReversedBits,4,4
	.comm	MAX_ALLOWED_CODE_LENGTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
