
# AllocVecPooled(pool:r3:PTR,size:r4:LONG)(PTR)

	.text
	.global	_AllocVecPooled
	.global	_AllocVecPooledPPC

_AllocVecPooledPPC:
_AllocVecPooled:
	mflr	r0
	stw	r0,8(r1)
	stwu	r1,-32(r1)
	stw	r4,24(r1)
	mr	r5,r4
	addi	r5,r5,4		# add the SIZEOF_LONG
	mr	r4,r3
	lwz	r3,_PowerPCBase(r2)
	lwz	r0,-828+2(r3)
	mtlr	r0
	blrl

	lwz	r4,24(r1)
	stw	r4,0(r3)
	addi	r3,r3,4		# store the size and return the position

	addi	r1,r1,32
	lwz	r0,8(r1)
	mtlr	r0
	blr

	.type	_AllocVecPooled,@function
	.size	_AllocVecPooled,$-_AllocVecPooled
	.type	_AllocVecPooledPPC,@function
	.size	_AllocVecPooledPPC,$-_AllocVecPooledPPC

	.extern	_PowerPCBase
