	.file	"82950333.c"
	.intel_syntax noprefix
	.text
	.local	inmN
	.comm	inmN,1,1
	.local	inmNumStreams
	.comm	inmNumStreams,1,1
	.local	inmPrevBits
	.comm	inmPrevBits,4,4
	.local	inmNumBitsSampled
	.comm	inmNumBitsSampled,4,4
	.local	inmOnes
	.comm	inmOnes,8,8
	.local	inmZeros
	.comm	inmZeros,8,8
	.local	inmNumBitsOfEntropy
	.comm	inmNumBitsOfEntropy,4,4
	.local	inmCurrentProbability
	.comm	inmCurrentProbability,8,8
	.local	inmTotalBits
	.comm	inmTotalBits,8,8
	.local	inmPrevBit
	.comm	inmPrevBit,1,1
	.local	inmTotalOnes
	.comm	inmTotalOnes,4,4
	.local	inmTotalZeros
	.comm	inmTotalZeros,4,4
	.local	inmDebug
	.comm	inmDebug,1,1
	.type	resetStats, @function
resetStats:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR inmNumBitsSampled[rip], 0
	movsd	xmm0, QWORD PTR .LC0[rip]
	movsd	QWORD PTR inmCurrentProbability[rip], xmm0
	mov	DWORD PTR inmNumBitsOfEntropy[rip], 0
	mov	DWORD PTR inmTotalOnes[rip], 0
	mov	DWORD PTR inmTotalZeros[rip], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	resetStats, .-resetStats
	.globl	inmEntCheckStart
	.type	inmEntCheckStart, @function
inmEntCheckStart:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	ecx, esi
	mov	eax, edx
	mov	edx, edi
	mov	BYTE PTR -36[rbp], dl
	mov	edx, ecx
	mov	BYTE PTR -40[rbp], dl
	mov	BYTE PTR -44[rbp], al
	cmp	BYTE PTR -36[rbp], 0
	je	.L3
	cmp	BYTE PTR -36[rbp], 30
	jbe	.L4
.L3:
	mov	eax, 0
	jmp	.L5
.L4:
	movzx	eax, BYTE PTR -44[rbp]
	mov	BYTE PTR inmDebug[rip], al
	mov	DWORD PTR inmNumBitsOfEntropy[rip], 0
	movsd	xmm0, QWORD PTR .LC0[rip]
	movsd	QWORD PTR inmCurrentProbability[rip], xmm0
	movzx	eax, BYTE PTR -36[rbp]
	mov	BYTE PTR inmN[rip], al
	movzx	eax, BYTE PTR -40[rbp]
	mov	BYTE PTR inmNumStreams[rip], al
	mov	DWORD PTR inmPrevBits[rip], 0
	movzx	eax, BYTE PTR -40[rbp]
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR inmOnes[rip], rax
	movzx	eax, BYTE PTR -40[rbp]
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR inmZeros[rip], rax
	mov	rax, QWORD PTR inmOnes[rip]
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR inmZeros[rip]
	test	rax, rax
	jne	.L7
.L6:
	mov	eax, 0
	jmp	.L5
.L7:
	mov	BYTE PTR -17[rbp], 0
	jmp	.L8
.L11:
	movzx	eax, BYTE PTR -36[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	edx, eax
	mov	rcx, QWORD PTR inmOnes[rip]
	movzx	eax, BYTE PTR -17[rbp]
	sal	rax, 3
	lea	rbx, [rcx+rax]
	mov	esi, 4
	mov	rdi, rdx
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	movzx	eax, BYTE PTR -36[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	edx, eax
	mov	rcx, QWORD PTR inmZeros[rip]
	movzx	eax, BYTE PTR -17[rbp]
	sal	rax, 3
	lea	rbx, [rcx+rax]
	mov	esi, 4
	mov	rdi, rdx
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rdx, QWORD PTR inmOnes[rip]
	movzx	eax, BYTE PTR -17[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L9
	mov	rdx, QWORD PTR inmZeros[rip]
	movzx	eax, BYTE PTR -17[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L10
.L9:
	mov	eax, 0
	jmp	.L5
.L10:
	movzx	eax, BYTE PTR -17[rbp]
	add	eax, 1
	mov	BYTE PTR -17[rbp], al
.L8:
	movzx	eax, BYTE PTR -17[rbp]
	cmp	al, BYTE PTR -40[rbp]
	jb	.L11
	mov	QWORD PTR inmTotalBits[rip], 0
	mov	BYTE PTR inmPrevBit[rip], 0
	call	resetStats
	mov	eax, 1
.L5:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	inmEntCheckStart, .-inmEntCheckStart
	.type	scaleStats, @function
scaleStats:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -8[rbp], 0
	jmp	.L13
.L16:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L14
.L15:
	mov	rdx, QWORD PTR inmZeros[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rcx, QWORD PTR inmZeros[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 3
	add	rax, rcx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rcx
	shr	edx
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR inmOnes[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rcx, QWORD PTR inmOnes[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 3
	add	rax, rcx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rcx
	shr	edx
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -4[rbp], 1
.L14:
	movzx	eax, BYTE PTR inmN[rip]
	movzx	eax, al
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	cmp	DWORD PTR -4[rbp], eax
	jb	.L15
	add	DWORD PTR -8[rbp], 1
.L13:
	movzx	eax, BYTE PTR inmNumStreams[rip]
	movzx	eax, al
	cmp	DWORD PTR -8[rbp], eax
	jb	.L16
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	scaleStats, .-scaleStats
	.type	scaleEntropy, @function
scaleEntropy:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR inmNumBitsSampled[rip]
	cmp	eax, 80000
	jne	.L19
	mov	eax, DWORD PTR inmNumBitsOfEntropy[rip]
	shr	eax
	mov	DWORD PTR inmNumBitsOfEntropy[rip], eax
	mov	eax, DWORD PTR inmNumBitsSampled[rip]
	shr	eax
	mov	DWORD PTR inmNumBitsSampled[rip], eax
.L19:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	scaleEntropy, .-scaleEntropy
	.type	scaleZeroOneCounts, @function
scaleZeroOneCounts:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, DWORD PTR inmTotalZeros[rip]
	mov	eax, DWORD PTR inmTotalOnes[rip]
	cmp	edx, eax
	cmovnb	eax, edx
	mov	eax, eax
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 80000
	jne	.L22
	mov	eax, DWORD PTR inmTotalZeros[rip]
	shr	eax
	mov	DWORD PTR inmTotalZeros[rip], eax
	mov	eax, DWORD PTR inmTotalOnes[rip]
	shr	eax
	mov	DWORD PTR inmTotalOnes[rip], eax
.L22:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	scaleZeroOneCounts, .-scaleZeroOneCounts
	.globl	inmEntCheckAddBit
	.type	inmEntCheckAddBit, @function
inmEntCheckAddBit:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 40
	mov	eax, edi
	mov	BYTE PTR -36[rbp], al
	mov	rax, QWORD PTR inmTotalBits[rip]
	movzx	edx, BYTE PTR inmNumStreams[rip]
	movzx	ecx, dl
	mov	edx, 0
	div	rcx
	mov	rax, rdx
	mov	BYTE PTR -29[rbp], al
	mov	rax, QWORD PTR inmTotalBits[rip]
	add	rax, 1
	mov	QWORD PTR inmTotalBits[rip], rax
	mov	eax, DWORD PTR inmPrevBits[rip]
	lea	edx, [rax+rax]
	movzx	eax, BYTE PTR inmN[rip]
	movzx	eax, al
	mov	esi, 1
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	sub	eax, 1
	and	eax, edx
	mov	DWORD PTR inmPrevBits[rip], eax
	movzx	eax, BYTE PTR inmPrevBit[rip]
	test	al, al
	je	.L24
	mov	eax, DWORD PTR inmPrevBits[rip]
	or	eax, 1
	mov	DWORD PTR inmPrevBits[rip], eax
.L24:
	movzx	eax, BYTE PTR -36[rbp]
	mov	BYTE PTR inmPrevBit[rip], al
	mov	eax, DWORD PTR inmNumBitsSampled[rip]
	cmp	eax, 100
	jbe	.L25
	cmp	BYTE PTR -36[rbp], 0
	je	.L26
	mov	eax, DWORD PTR inmTotalOnes[rip]
	add	eax, 1
	mov	DWORD PTR inmTotalOnes[rip], eax
	jmp	.L25
.L26:
	mov	eax, DWORD PTR inmTotalZeros[rip]
	add	eax, 1
	mov	DWORD PTR inmTotalZeros[rip], eax
.L25:
	mov	rdx, QWORD PTR inmZeros[rip]
	movzx	eax, BYTE PTR -29[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR inmOnes[rip]
	movzx	eax, BYTE PTR -29[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR inmPrevBits[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR inmPrevBits[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -24[rbp], eax
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	mov	DWORD PTR -20[rbp], eax
	cmp	BYTE PTR -36[rbp], 0
	je	.L27
	cmp	DWORD PTR -24[rbp], 0
	je	.L37
	mov	eax, DWORD PTR -24[rbp]
	test	rax, rax
	js	.L29
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L30
.L29:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L30:
	mov	eax, DWORD PTR -20[rbp]
	test	rax, rax
	js	.L31
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	jmp	.L32
.L31:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rdx
	addsd	xmm1, xmm1
.L32:
	movapd	xmm2, xmm0
	divsd	xmm2, xmm1
	movsd	xmm0, QWORD PTR inmCurrentProbability[rip]
	mulsd	xmm0, xmm2
	movsd	QWORD PTR inmCurrentProbability[rip], xmm0
	jmp	.L37
.L27:
	cmp	DWORD PTR -28[rbp], 0
	je	.L37
	mov	eax, DWORD PTR -28[rbp]
	test	rax, rax
	js	.L33
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L34
.L33:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L34:
	mov	eax, DWORD PTR -20[rbp]
	test	rax, rax
	js	.L35
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	jmp	.L36
.L35:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rdx
	addsd	xmm1, xmm1
.L36:
	movapd	xmm2, xmm0
	divsd	xmm2, xmm1
	movsd	xmm0, QWORD PTR inmCurrentProbability[rip]
	mulsd	xmm0, xmm2
	movsd	QWORD PTR inmCurrentProbability[rip], xmm0
	jmp	.L37
.L38:
	movsd	xmm0, QWORD PTR inmCurrentProbability[rip]
	addsd	xmm0, xmm0
	movsd	QWORD PTR inmCurrentProbability[rip], xmm0
	mov	eax, DWORD PTR inmNumBitsOfEntropy[rip]
	add	eax, 1
	mov	DWORD PTR inmNumBitsOfEntropy[rip], eax
.L37:
	movsd	xmm1, QWORD PTR inmCurrentProbability[rip]
	movsd	xmm0, QWORD PTR .LC1[rip]
	comisd	xmm0, xmm1
	jnb	.L38
	mov	eax, DWORD PTR inmNumBitsSampled[rip]
	add	eax, 1
	mov	DWORD PTR inmNumBitsSampled[rip], eax
	cmp	BYTE PTR -36[rbp], 0
	je	.L39
	mov	eax, DWORD PTR inmPrevBits[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR inmPrevBits[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 16384
	jne	.L40
	call	scaleStats
	jmp	.L40
.L39:
	mov	eax, DWORD PTR inmPrevBits[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR inmPrevBits[rip]
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 16384
	jne	.L40
	call	scaleStats
.L40:
	call	scaleEntropy
	call	scaleZeroOneCounts
	mov	eax, 1
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	inmEntCheckAddBit, .-inmEntCheckAddBit
	.globl	inmEntCheckEstimateEntropyPerBit
	.type	inmEntCheckEstimateEntropyPerBit, @function
inmEntCheckEstimateEntropyPerBit:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR inmNumBitsOfEntropy[rip]
	mov	eax, eax
	test	rax, rax
	js	.L43
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L44
.L43:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L44:
	mov	eax, DWORD PTR inmNumBitsSampled[rip]
	mov	eax, eax
	test	rax, rax
	js	.L45
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	jmp	.L46
.L45:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rdx
	addsd	xmm1, xmm1
.L46:
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	inmEntCheckEstimateEntropyPerBit, .-inmEntCheckEstimateEntropyPerBit
	.section	.rodata
	.align 8
.LC2:
	.string	"*************************************** stream %u\n"
	.align 8
.LC4:
	.string	"%x ones:%u(%.2g%%) zeros:%u(%.2g%%)\n"
	.text
	.type	inmDumpStats, @function
inmDumpStats:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -8[rbp], 0
	jmp	.L49
.L60:
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L50
.L59:
	mov	rdx, QWORD PTR inmZeros[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	eax, eax
	test	rax, rax
	js	.L51
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L52
.L51:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L52:
	movsd	xmm1, QWORD PTR .LC3[rip]
	mulsd	xmm1, xmm0
	mov	rax, QWORD PTR inmTotalBits[rip]
	test	rax, rax
	js	.L53
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L54
.L53:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L54:
	movapd	xmm2, xmm1
	divsd	xmm2, xmm0
	mov	rdx, QWORD PTR inmZeros[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	rdx, QWORD PTR inmOnes[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	eax, eax
	test	rax, rax
	js	.L55
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L56
.L55:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L56:
	movsd	xmm1, QWORD PTR .LC3[rip]
	mulsd	xmm1, xmm0
	mov	rax, QWORD PTR inmTotalBits[rip]
	test	rax, rax
	js	.L57
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L58
.L57:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L58:
	divsd	xmm1, xmm0
	movq	rsi, xmm1
	mov	rdx, QWORD PTR inmOnes[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	movapd	xmm1, xmm2
	movq	xmm0, rsi
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 2
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L50:
	movzx	eax, BYTE PTR inmN[rip]
	movzx	eax, al
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	cmp	DWORD PTR -4[rbp], eax
	jb	.L59
	add	DWORD PTR -8[rbp], 1
.L49:
	movzx	eax, BYTE PTR inmNumStreams[rip]
	movzx	eax, al
	cmp	DWORD PTR -8[rbp], eax
	jb	.L60
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	inmDumpStats, .-inmDumpStats
	.section	.rodata
	.align 8
.LC5:
	.ascii	"Usage: entcheck [options]\n    -N numBits    -- Use N previo"
	.ascii	"us bits to predict the next bit\n    -s numStreams -- Use s "
	.ascii	"streams to predict the next bit\n\nentcheck simply uses the "
	.ascii	"previous N bits (16 by default) to predict the next bit.\nIt"
	.ascii	" estimates the entropy based on 'surpris"
	.string	"e', or log2 of the probability of seeing\nthe string of 0's and 1's.  Sometimes some bits are special, such as the output of\nan 8 bit DAC, where we want different tables depending on which bit we're predicting.\nSet numStreams to the DAC width in this case.\n"
	.text
	.type	usage, @function
usage:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 531
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE14:
	.size	usage, .-usage
	.section	.rodata
.LC6:
	.string	"-N"
.LC7:
	.string	"-s"
.LC8:
	.string	"Unable to allocate memory\n"
	.align 8
.LC9:
	.string	"Added %llu bits, estimated entropy per bit:%f\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	BYTE PTR -15[rbp], 12
	mov	BYTE PTR -14[rbp], 2
	mov	DWORD PTR -12[rbp], 1
	jmp	.L63
.L70:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L64
	add	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jne	.L65
	call	usage
.L65:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	BYTE PTR -15[rbp], al
	cmp	BYTE PTR -15[rbp], 0
	jne	.L66
	call	usage
	jmp	.L66
.L64:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L67
	add	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jne	.L68
	call	usage
.L68:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	BYTE PTR -14[rbp], al
	cmp	BYTE PTR -14[rbp], 0
	je	.L69
	cmp	BYTE PTR -14[rbp], 32
	jbe	.L66
.L69:
	call	usage
	jmp	.L66
.L67:
	call	usage
.L66:
	add	DWORD PTR -12[rbp], 1
.L63:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L70
	movzx	ecx, BYTE PTR -14[rbp]
	movzx	eax, BYTE PTR -15[rbp]
	mov	edx, 1
	mov	esi, ecx
	mov	edi, eax
	call	inmEntCheckStart
	xor	eax, 1
	test	al, al
	je	.L71
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L72
.L71:
	call	getchar@PLT
	mov	DWORD PTR -8[rbp], eax
	jmp	.L73
.L76:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L74
.L75:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, 7
	sub	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	shr	edx, cl
	mov	eax, edx
	and	eax, 1
	test	eax, eax
	setne	al
	mov	BYTE PTR -13[rbp], al
	movzx	eax, BYTE PTR -13[rbp]
	mov	edi, eax
	call	inmEntCheckAddBit
	add	DWORD PTR -4[rbp], 1
.L74:
	cmp	DWORD PTR -4[rbp], 7
	jbe	.L75
	call	getchar@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR inmTotalBits[rip]
	movzx	eax, ax
	test	rax, rax
	jne	.L73
	call	inmEntCheckEstimateEntropyPerBit
	movq	rax, xmm0
	mov	rdx, QWORD PTR inmTotalBits[rip]
	movq	xmm0, rax
	mov	rsi, rdx
	lea	rdi, .LC9[rip]
	mov	eax, 1
	call	printf@PLT
.L73:
	cmp	DWORD PTR -8[rbp], -1
	jne	.L76
	movzx	eax, BYTE PTR inmDebug[rip]
	test	al, al
	je	.L77
	call	inmDumpStats
.L77:
	mov	eax, 0
.L72:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 8
.LC3:
	.long	0
	.long	1079574528
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"82950333.c"
	.text
	.local	inmN
	.comm	inmN,1,1
	.local	inmNumStreams
	.comm	inmNumStreams,1,1
	.local	inmPrevBits
	.comm	inmPrevBits,4,4
	.local	inmNumBitsSampled
	.comm	inmNumBitsSampled,4,4
	.local	inmOnes
	.comm	inmOnes,4,4
	.local	inmZeros
	.comm	inmZeros,4,4
	.local	inmNumBitsOfEntropy
	.comm	inmNumBitsOfEntropy,4,4
	.local	inmCurrentProbability
	.comm	inmCurrentProbability,8,8
	.local	inmTotalBits
	.comm	inmTotalBits,8,8
	.local	inmPrevBit
	.comm	inmPrevBit,1,1
	.local	inmTotalOnes
	.comm	inmTotalOnes,4,4
	.local	inmTotalZeros
	.comm	inmTotalZeros,4,4
	.local	inmDebug
	.comm	inmDebug,1,1
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	resetStats, %function
resetStats:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L2
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L2+4
	mov	r2, #0
	ldr	r3, .L2+8
	stm	r1, {r2-r3}
	ldr	r3, .L2+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L2+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L2+20
	mov	r2, #0
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	inmNumBitsSampled
	.word	inmCurrentProbability
	.word	1072693248
	.word	inmNumBitsOfEntropy
	.word	inmTotalOnes
	.word	inmTotalZeros
	.size	resetStats, .-resetStats
	.align	2
	.global	inmEntCheckStart
	.syntax unified
	.arm
	.fpu softvfp
	.type	inmEntCheckStart, %function
inmEntCheckStart:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r3, r0
	strb	r3, [fp, #-21]
	mov	r3, r1
	strb	r3, [fp, #-22]
	mov	r3, r2
	strb	r3, [fp, #-23]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L5
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #30
	bls	.L6
.L5:
	mov	r3, #0
	b	.L7
.L6:
	ldr	r2, .L14
	ldrb	r3, [fp, #-23]
	strb	r3, [r2]
	ldr	r3, .L14+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L14+8
	mov	r2, #0
	ldr	r3, .L14+12
	stm	r1, {r2-r3}
	ldr	r2, .L14+16
	ldrb	r3, [fp, #-21]
	strb	r3, [r2]
	ldr	r2, .L14+20
	ldrb	r3, [fp, #-22]
	strb	r3, [r2]
	ldr	r3, .L14+24
	mov	r2, #0
	str	r2, [r3]
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L14+28
	str	r2, [r3]
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L14+32
	str	r2, [r3]
	ldr	r3, .L14+28
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L14+32
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L9
.L8:
	mov	r3, #0
	b	.L7
.L9:
	mov	r3, #0
	strb	r3, [fp, #-13]
	b	.L10
.L13:
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r2, #1
	lsl	r0, r2, r3
	ldr	r3, .L14+28
	ldr	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #4
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	mov	r2, #1
	lsl	r0, r2, r3
	ldr	r3, .L14+32
	ldr	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #4
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L14+28
	ldr	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L14+32
	ldr	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
.L11:
	mov	r3, #0
	b	.L7
.L12:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-13]
.L10:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldrb	r3, [fp, #-22]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L13
	ldr	r1, .L14+36
	mov	r2, #0
	mov	r3, #0
	stm	r1, {r2-r3}
	ldr	r3, .L14+40
	mov	r2, #0
	strb	r2, [r3]
	bl	resetStats
	mov	r3, #1
.L7:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L15:
	.align	2
.L14:
	.word	inmDebug
	.word	inmNumBitsOfEntropy
	.word	inmCurrentProbability
	.word	1072693248
	.word	inmN
	.word	inmNumStreams
	.word	inmPrevBits
	.word	inmOnes
	.word	inmZeros
	.word	inmTotalBits
	.word	inmPrevBit
	.size	inmEntCheckStart, .-inmEntCheckStart
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	scaleStats, %function
scaleStats:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L17
.L20:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L18
.L19:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L21
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r1, r3
	lsr	r2, r2, #1
	str	r2, [r3]
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L21+4
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r1, r3
	lsr	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L18:
	ldr	r3, .L21+8
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, #1
	lsl	r3, r3, r2
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L19
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L17:
	ldr	r3, .L21+12
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	cmp	r3, r2
	bcc	.L20
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L22:
	.align	2
.L21:
	.word	inmZeros
	.word	inmOnes
	.word	inmN
	.word	inmNumStreams
	.size	scaleStats, .-scaleStats
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	scaleEntropy, %function
scaleEntropy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L26
	ldr	r3, [r3]
	ldr	r2, .L26+4
	cmp	r3, r2
	bne	.L25
	ldr	r3, .L26+8
	ldr	r3, [r3]
	lsr	r3, r3, #1
	ldr	r2, .L26+8
	str	r3, [r2]
	ldr	r3, .L26
	ldr	r3, [r3]
	lsr	r3, r3, #1
	ldr	r2, .L26
	str	r3, [r2]
.L25:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L27:
	.align	2
.L26:
	.word	inmNumBitsSampled
	.word	80000
	.word	inmNumBitsOfEntropy
	.size	scaleEntropy, .-scaleEntropy
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	scaleZeroOneCounts, %function
scaleZeroOneCounts:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, .L31+4
	ldr	r3, [r3]
	cmp	r2, r3
	movcs	r3, r2
	movcc	r3, r3
	mov	r2, r3
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L31+8
	mov	r1, #0
	cmp	r3, r1
	cmpeq	r2, r0
	bne	.L30
	ldr	r3, .L31
	ldr	r3, [r3]
	lsr	r3, r3, #1
	ldr	r2, .L31
	str	r3, [r2]
	ldr	r3, .L31+4
	ldr	r3, [r3]
	lsr	r3, r3, #1
	ldr	r2, .L31+4
	str	r3, [r2]
.L30:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L32:
	.align	2
.L31:
	.word	inmTotalZeros
	.word	inmTotalOnes
	.word	80000
	.size	scaleZeroOneCounts, .-scaleZeroOneCounts
	.global	__aeabi_uldivmod
	.global	__aeabi_ui2d
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_dcmple
	.align	2
	.global	inmEntCheckAddBit
	.syntax unified
	.arm
	.fpu softvfp
	.type	inmEntCheckAddBit, %function
inmEntCheckAddBit:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	mov	r3, r0
	strb	r3, [fp, #-37]
	ldr	r3, .L44
	ldmia	r3, {r0-r1}
	ldr	r3, .L44+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r2, r3, #255
	mov	r3, #0
	bl	__aeabi_uldivmod
	mov	r3, r2
	strb	r3, [fp, #-33]
	ldr	r3, .L44
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	ldr	r3, .L44
	stm	r3, {r4-r5}
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r2, r3, #1
	ldr	r3, .L44+12
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	mov	r3, #1
	lsl	r3, r3, r1
	sub	r3, r3, #1
	and	r3, r3, r2
	ldr	r2, .L44+8
	str	r3, [r2]
	ldr	r3, .L44+16
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L34
	ldr	r3, .L44+8
	ldr	r3, [r3]
	orr	r3, r3, #1
	ldr	r2, .L44+8
	str	r3, [r2]
.L34:
	ldr	r2, .L44+16
	ldrb	r3, [fp, #-37]
	strb	r3, [r2]
	ldr	r3, .L44+20
	ldr	r3, [r3]
	cmp	r3, #100
	bls	.L35
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L36
	ldr	r3, .L44+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L44+24
	str	r3, [r2]
	b	.L35
.L36:
	ldr	r3, .L44+28
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L44+28
	str	r3, [r2]
.L35:
	ldr	r3, .L44+32
	ldr	r2, [r3]
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	ldr	r3, .L44+36
	ldr	r2, [r3]
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L37
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L39
	ldr	r0, [fp, #-20]
	bl	__aeabi_ui2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-16]
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, .L44+40
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L44+40
	stm	r1, {r2-r3}
	b	.L39
.L37:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L39
	ldr	r0, [fp, #-24]
	bl	__aeabi_ui2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-16]
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, .L44+40
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L44+40
	stm	r1, {r2-r3}
	b	.L39
.L40:
	ldr	r3, .L44+40
	ldmia	r3, {r0-r1}
	mov	r2, r0
	mov	r3, r1
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L44+40
	stm	r1, {r2-r3}
	ldr	r3, .L44+44
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L44+44
	str	r3, [r2]
.L39:
	ldr	r3, .L44+40
	ldmia	r3, {r0-r1}
	mov	r2, #0
	ldr	r3, .L44+48
	bl	__aeabi_dcmple
	mov	r3, r0
	cmp	r3, #0
	bne	.L40
	ldr	r3, .L44+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L44+20
	str	r3, [r2]
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L41
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #16384
	bne	.L42
	bl	scaleStats
	b	.L42
.L41:
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, .L44+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #16384
	bne	.L42
	bl	scaleStats
.L42:
	bl	scaleEntropy
	bl	scaleZeroOneCounts
	mov	r3, #1
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L45:
	.align	2
.L44:
	.word	inmTotalBits
	.word	inmNumStreams
	.word	inmPrevBits
	.word	inmN
	.word	inmPrevBit
	.word	inmNumBitsSampled
	.word	inmTotalOnes
	.word	inmTotalZeros
	.word	inmZeros
	.word	inmOnes
	.word	inmCurrentProbability
	.word	inmNumBitsOfEntropy
	.word	1071644672
	.size	inmEntCheckAddBit, .-inmEntCheckAddBit
	.align	2
	.global	inmEntCheckEstimateEntropyPerBit
	.syntax unified
	.arm
	.fpu softvfp
	.type	inmEntCheckEstimateEntropyPerBit, %function
inmEntCheckEstimateEntropyPerBit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	ldr	r3, .L48
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, .L48+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	pop	{r4, r5, fp, pc}
.L49:
	.align	2
.L48:
	.word	inmNumBitsOfEntropy
	.word	inmNumBitsSampled
	.size	inmEntCheckEstimateEntropyPerBit, .-inmEntCheckEstimateEntropyPerBit
	.section	.rodata
	.align	2
.LC0:
	.ascii	"*************************************** stream %u\012"
	.ascii	"\000"
	.global	__aeabi_ul2d
	.align	2
.LC1:
	.ascii	"%x ones:%u(%.2g%%) zeros:%u(%.2g%%)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	inmDumpStats, %function
inmDumpStats:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #32
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L51
.L54:
	ldr	r1, [fp, #-36]
	ldr	r0, .L55
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L52
.L53:
	ldr	r3, .L55+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r7, [r3]
	ldr	r3, .L55+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, #0
	ldr	r3, .L55+8
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, .L55+12
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_ul2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r3, .L55+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r6, [r3]
	ldr	r3, .L55+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, #0
	ldr	r3, .L55+8
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r8, r2
	mov	r9, r3
	ldr	r3, .L55+12
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_ul2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r8
	mov	r1, r9
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [sp, #16]
	str	r3, [sp, #20]
	str	r6, [sp, #8]
	stm	sp, {r4-r5}
	mov	r2, r7
	ldr	r1, [fp, #-32]
	ldr	r0, .L55+20
	bl	printf
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L52:
	ldr	r3, .L55+24
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, #1
	lsl	r3, r3, r2
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bcc	.L53
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L51:
	ldr	r3, .L55+28
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-36]
	cmp	r3, r2
	bcc	.L54
	nop
	nop
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L56:
	.align	2
.L55:
	.word	.LC0
	.word	inmOnes
	.word	1079574528
	.word	inmTotalBits
	.word	inmZeros
	.word	.LC1
	.word	inmN
	.word	inmNumStreams
	.size	inmDumpStats, .-inmDumpStats
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Usage: entcheck [options]\012    -N numBits    -- U"
	.ascii	"se N previous bits to predict the next bit\012    -"
	.ascii	"s numStreams -- Use s streams to predict the next b"
	.ascii	"it\012\012entcheck simply uses the previous N bits "
	.ascii	"(16 by default) to predict the next bit.\012It esti"
	.ascii	"mates the entropy based on 'surprise', or log2 of t"
	.ascii	"he probability of seeing\012the string of 0's and 1"
	.ascii	"'s.  Sometimes some bits are special, such as the o"
	.ascii	"utput of\012an 8 bit DAC, where we want different t"
	.ascii	"ables depending on which bit we're predicting.\012S"
	.ascii	"et numStreams to the DAC width in this case.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L58
	ldr	r3, [r3]
	ldr	r2, .L58+4
	mov	r1, #1
	ldr	r0, .L58+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L59:
	.align	2
.L58:
	.word	stderr
	.word	531
	.word	.LC2
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC3:
	.ascii	"-N\000"
	.align	2
.LC4:
	.ascii	"-s\000"
	.align	2
.LC5:
	.ascii	"Unable to allocate memory\012\000"
	.align	2
.LC6:
	.ascii	"Added %llu bits, estimated entropy per bit:%f\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #12
	strb	r3, [fp, #-35]
	mov	r3, #2
	strb	r3, [fp, #-34]
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L61
.L68:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L76
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L62
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bne	.L63
	bl	usage
.L63:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	strb	r3, [fp, #-35]
	ldrb	r3, [fp, #-35]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L64
	bl	usage
	b	.L64
.L62:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L76+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L65
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bne	.L66
	bl	usage
.L66:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	strb	r3, [fp, #-34]
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L67
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	cmp	r3, #32
	bls	.L64
.L67:
	bl	usage
	b	.L64
.L65:
	bl	usage
.L64:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L61:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	blt	.L68
	ldrb	r1, [fp, #-34]	@ zero_extendqisi2
	ldrb	r3, [fp, #-35]	@ zero_extendqisi2
	mov	r2, #1
	mov	r0, r3
	bl	inmEntCheckStart
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L69
	ldr	r3, .L76+8
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L76+12
	bl	fwrite
	mov	r3, #1
	b	.L70
.L69:
	bl	getchar
	str	r0, [fp, #-28]
	b	.L71
.L74:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L72
.L73:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	rsb	r3, r3, #7
	lsr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	strb	r3, [fp, #-33]
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	mov	r0, r3
	bl	inmEntCheckAddBit
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L72:
	ldr	r3, [fp, #-24]
	cmp	r3, #7
	bls	.L73
	bl	getchar
	str	r0, [fp, #-28]
	ldr	r3, .L76+16
	ldmia	r3, {r2-r3}
	ldr	r0, .L76+20
	mov	r1, #0
	and	r4, r2, r0
	and	r5, r3, r1
	orrs	r3, r4, r5
	bne	.L71
	ldr	r3, .L76+16
	ldmia	r3, {r2-r3}
	mov	r6, r2
	mov	r7, r3
	bl	inmEntCheckEstimateEntropyPerBit
	mov	r2, r0
	mov	r3, r1
	stm	sp, {r2-r3}
	mov	r2, r6
	mov	r3, r7
	ldr	r0, .L76+24
	bl	printf
.L71:
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L74
	ldr	r3, .L76+28
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L75
	bl	inmDumpStats
.L75:
	mov	r3, #0
.L70:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L77:
	.align	2
.L76:
	.word	.LC3
	.word	.LC4
	.word	stderr
	.word	.LC5
	.word	inmTotalBits
	.word	65535
	.word	.LC6
	.word	inmDebug
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
