
# BitCount(r3:LONG)(LONG)

	.text
	.global	_BitCount

_BitCount:
	li	r4,31
	li	r6,0
.loop:	li	r5,1
	slw	r5,r5,r4
	and.	r0,r3,r5
	beq	.next
	addi	r6,r6,1
.next:	subi	r4,r4,1
	mr.	r4,r4
	bge	.loop
	mr	r3,r6
	blr

	.type	_BitCount,@function
	.size	_BitCount,$-_BitCount
