txSlot* fxGetTypedArrayValue(txMachine* the, txSlot* instance, txInteger index)
{
	txSlot* dispatch = instance->next;
	txSlot* view = dispatch->next;
	txSlot* buffer = view->next;
	txSlot* data = mxIsReference(buffer) ? fxCheckArrayBufferDetached(the, buffer, XS_IMMUTABLE) : C_NULL;
	txU2 shift = dispatch->value.typedArray.dispatch->shift;
	index <<= shift;
	if ((0 <= index) && ((index + (1 << shift)) <= view->value.dataView.size)) {
		(*dispatch->value.typedArray.dispatch->getter)(the, data, view->value.dataView.offset + index, &(the->scratch), EndianNative);
		return &the->scratch;
	}
	return C_NULL;
}
txSlot* fxGetTypedArrayValue(txMachine* the, txSlot* instance, txInteger index)
{
	txSlot* dispatch = instance->next;
	txSlot* view = dispatch->next;
	txSlot* buffer = view->next;
	txSlot* data = mxIsReference(buffer) ? fxCheckArrayBufferDetached(the, buffer, XS_IMMUTABLE) : C_NULL;
	txU2 shift = dispatch->value.typedArray.dispatch->shift;
	index <<= shift;
	if ((0 <= index) && ((index + (1 << shift)) <= view->value.dataView.size)) {
		(*dispatch->value.typedArray.dispatch->getter)(the, data, view->value.dataView.offset + index, &(the->scratch), EndianNative);
		return &the->scratch;
	}
	return C_NULL;
}