	.file	"extr_lossless_enc.c_FastLog2Slow_C.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	FastLog2Slow_C, @function
FastLog2Slow_C:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR LOG_LOOKUP_IDX_MAX[rip], edi
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ebx, edi
	setle	dil
	movzx	edi, dil
	call	assert@PLT
	cmp	DWORD PTR APPROX_LOG_WITH_CORRECTION_MAX[rip], ebx
	jle	.L2
	mov	esi, DWORD PTR LOG_LOOKUP_IDX_MAX[rip]
	mov	eax, ebx
	mov	ecx, 1
	xor	edx, edx
	.p2align 4,,10
	.p2align 3
.L3:
	sar	eax
	add	edx, 1
	add	ecx, ecx
	cmp	esi, eax
	jle	.L3
	mov	rsi, QWORD PTR kLog2Table[rip]
	cdqe
	pxor	xmm0, xmm0
	add	edx, DWORD PTR [rsi+rax*4]
	cmp	DWORD PTR APPROX_LOG_MAX[rip], ebx
	cvtsi2sd	xmm0, edx
	jg	.L4
	lea	eax, -1[rcx]
	pxor	xmm1, xmm1
	pxor	xmm2, xmm2
	and	eax, ebx
	cvtsi2sd	xmm2, ebx
	imul	eax, eax, 23
	sar	eax, 4
	cvtsi2sd	xmm1, eax
	divsd	xmm1, xmm2
	addsd	xmm0, xmm1
.L4:
	cvtsd2ss	xmm0, xmm0
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, ebx
	call	log@PLT
	imul	eax, DWORD PTR LOG_2_RECIPROCAL[rip]
	pxor	xmm0, xmm0
	pop	rbx
	.cfi_def_cfa_offset 8
	cvtsi2ss	xmm0, eax
	ret
	.cfi_endproc
.LFE0:
	.size	FastLog2Slow_C, .-FastLog2Slow_C
	.comm	kLog2Table,8,8
	.comm	LOG_LOOKUP_IDX_MAX,4,4
	.comm	LOG_2_RECIPROCAL,4,4
	.comm	APPROX_LOG_WITH_CORRECTION_MAX,4,4
	.comm	APPROX_LOG_MAX,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_lossless_enc.c_FastLog2Slow_C.c"
	.text
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.global	__aeabi_d2f
	.global	__aeabi_i2f
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FastLog2Slow_C, %function
FastLog2Slow_C:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r6, .L9
	ldr	r0, [r6]
	cmp	r0, r5
	movgt	r0, #0
	movle	r0, #1
	bl	assert
	ldr	r3, .L9+4
	ldr	r3, [r3]
	cmp	r3, r5
	ble	.L2
	mov	r3, r5
	mov	r4, #1
	mov	r2, #0
	ldr	r1, [r6]
.L3:
	asr	r3, r3, #1
	cmp	r1, r3
	add	r2, r2, #1
	lsl	r4, r4, #1
	ble	.L3
	ldr	r1, .L9+8
	ldr	r1, [r1]
	ldr	r0, [r1, r3, lsl #2]
	add	r0, r2, r0
	bl	__aeabi_i2d
	ldr	r3, .L9+12
	mov	r6, r0
	ldr	r3, [r3]
	mov	r7, r1
	cmp	r3, r5
	bgt	.L4
	sub	r4, r4, #1
	and	r4, r4, r5
	add	r0, r4, r4, lsl #1
	rsb	r0, r4, r0, lsl #3
	asr	r0, r0, #4
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r0, r5
	mov	r4, r2
	mov	r5, r1
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dadd
	mov	r6, r0
	mov	r7, r1
.L4:
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_d2f
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r5
	bl	__aeabi_i2d
	bl	log
	ldr	r3, .L9+16
	ldr	r3, [r3]
	mul	r0, r3, r0
	bl	__aeabi_i2f
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	.align	2
.L9:
	.word	LOG_LOOKUP_IDX_MAX
	.word	APPROX_LOG_WITH_CORRECTION_MAX
	.word	kLog2Table
	.word	APPROX_LOG_MAX
	.word	LOG_2_RECIPROCAL
	.size	FastLog2Slow_C, .-FastLog2Slow_C
	.comm	kLog2Table,4,4
	.comm	LOG_LOOKUP_IDX_MAX,4,4
	.comm	LOG_2_RECIPROCAL,4,4
	.comm	APPROX_LOG_WITH_CORRECTION_MAX,4,4
	.comm	APPROX_LOG_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
