	.file	"extr_ac3enc.c_count_exponent_bits.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	count_exponent_bits, @function
count_exponent_bits:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	jle	.L7
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	sub	eax, 1
	xor	esi, esi
	xor	r8d, r8d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	lea	rax, 4[0+rax*4]
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, QWORD PTR exponent_group_tab[rip]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, DWORD PTR CPL_CH[rip]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, DWORD PTR EXP_REUSE[rip]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	r15, QWORD PTR 24[rdi]
	mov	r10d, DWORD PTR 4[rdi]
	mov	QWORD PTR -8[rsp], rax
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR 8[r15+rsi*4]
	test	eax, eax
	sete	dl
	sete	al
	movzx	edx, dl
	cmp	edx, r10d
	jg	.L3
	mov	rbx, QWORD PTR 8[r14]
	mov	r11, QWORD PTR [r15+rsi*4]
	movzx	eax, al
	mov	r9, QWORD PTR 16[r14]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdx, QWORD PTR [rbx+rax*8]
	cmp	r12d, eax
	sete	dil
	movsx	rcx, DWORD PTR [rdx+rsi]
	mov	edx, DWORD PTR [r11+rax*4]
	sub	edx, DWORD PTR [r9+rax*4]
	cmp	ebp, ecx
	je	.L4
	movzx	edi, dil
	movsx	rdx, edx
	mov	rdi, QWORD PTR 0[r13+rdi*8]
	mov	rcx, QWORD PTR -8[rdi+rcx*8]
	mov	ecx, DWORD PTR [rcx+rdx*4]
	lea	edx, 0[0+rcx*8]
	sub	edx, ecx
	lea	r8d, 4[r8+rdx]
.L4:
	add	rax, 1
	cmp	r10d, eax
	jge	.L5
.L3:
	add	rsi, 4
	cmp	QWORD PTR -8[rsp], rsi
	jne	.L6
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	eax, r8d
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	xor	r8d, r8d
	mov	eax, r8d
	ret
	.cfi_endproc
.LFE0:
	.size	count_exponent_bits, .-count_exponent_bits
	.comm	exponent_group_tab,8,8
	.comm	EXP_REUSE,4,4
	.comm	CPL_CH,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_ac3enc.c_count_exponent_bits.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	count_exponent_bits, %function
count_exponent_bits:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	sub	sp, sp, #28
	cmp	r3, #0
	str	r0, [sp, #16]
	ble	.L7
	mov	r7, #0
	mov	lr, r0
	mov	r0, r7
	ldr	r4, [lr, #16]
	ldr	ip, .L12
	ldr	r1, .L12+4
	ldr	r2, .L12+8
	ldr	lr, [lr, #4]
	lsl	r3, r3, #2
	str	r3, [sp, #8]
	ldr	r10, [ip]
	add	r3, r4, #4
	ldr	r9, [r1]
	ldr	fp, [r2]
	str	r4, [sp, #20]
	str	lr, [sp, #4]
	str	r3, [sp, #12]
	add	r8, lr, #1
.L6:
	ldr	r3, [sp, #12]
	ldr	r2, [sp, #4]
	ldr	r3, [r3, r7, lsl #1]
	clz	r3, r3
	lsr	r3, r3, #5
	cmp	r3, r2
	bgt	.L3
	ldr	r2, [sp, #16]
	ldr	r1, [sp, #20]
	ldr	r4, [r2, #8]
	ldr	lr, [r1, r7, lsl #1]
	ldr	ip, [r2, #12]
	add	r4, r4, r3, lsl #2
	add	lr, lr, r3, lsl #2
	add	ip, ip, r3, lsl #2
.L5:
	sub	r5, r10, r3
	clz	r5, r5
	ldr	r2, [r4], #4
	ldr	r6, [lr], #4
	ldr	r2, [r2, r7]
	ldr	r1, [ip], #4
	cmp	r9, r2
	lsr	r5, r5, #5
	add	r3, r3, #1
	sub	r1, r6, r1
	beq	.L4
	ldr	r5, [fp, r5, lsl #2]
	sub	r2, r2, #-1073741823
	ldr	r2, [r5, r2, lsl #2]
	ldr	r2, [r2, r1, lsl #2]
	rsb	r2, r2, r2, lsl #3
	add	r2, r2, #4
	add	r0, r0, r2
.L4:
	cmp	r3, r8
	bne	.L5
.L3:
	ldr	r3, [sp, #8]
	add	r7, r7, #4
	cmp	r7, r3
	bne	.L6
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	mov	r0, #0
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	.align	2
.L12:
	.word	CPL_CH
	.word	EXP_REUSE
	.word	exponent_group_tab
	.size	count_exponent_bits, .-count_exponent_bits
	.comm	exponent_group_tab,4,4
	.comm	EXP_REUSE,4,4
	.comm	CPL_CH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
