/*
 * This file was generated automatically by xsubpp version 1.9508 from the
 * contents of Int32.xs. Do not edit this file, edit Int32.xs instead.
 *
 *	ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "Int32.xs"
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#include "ppport.h"

typedef SV* SELF;
typedef I32 X3D__Values__Int32;

#define MIN_INT32 ((I32)0x80000000)
#define MAX_INT32 ((I32)0x7fffffff)

/*warn("integer overflow in expression");*/

I32 atoi32(const char* s) {
	I32 v=0;
	int sign=1;
	while ( *s == ' ' || (unsigned int)(*s - 9) < 5u) ++s;
	switch (*s) {
		case '-': sign = -1;
		case '+': ++s;
	}
	while ((unsigned int) (*s - '0') < 10u) {
		v = v*10 + *s-'0';
		++s;
	}
	return sign == -1 ? -v :  v;
}

#line 40 "Int32.c"

XS(XS_X3D__Values__Int32_MIN_INT32); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_MIN_INT32)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::MIN_INT32()");
    {
	I32	RETVAL;
	dXSTARG;
#line 39 "Int32.xs"
	RETVAL = MIN_INT32;
#line 53 "Int32.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_MAX_INT32); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_MAX_INT32)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::MAX_INT32()");
    {
	I32	RETVAL;
	dXSTARG;
#line 47 "Int32.xs"
	RETVAL = MAX_INT32;
#line 71 "Int32.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_new); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_new)
{
    dXSARGS;
    if (items < 1 || items > 2)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::new(self, value=\"0\")");
    {
	char*	value;
	X3D__Values__Int32	RETVAL;

	if (items < 2)
	    value = "0";
	else {
	    value = (char *)SvPV_nolen(ST(1));
	}
#line 58 "Int32.xs"
	RETVAL = atoi32(value);
#line 95 "Int32.c"
	ST(0) = sv_newmortal();
	sv_setref_iv(ST(0), "X3D::Values::Int32", (IV)RETVAL);

    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_getClone); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_getClone)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::getClone(this, ...)");
    {
	X3D__Values__Int32	this;
	X3D__Values__Int32	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 69 "Int32.xs"
	RETVAL = this;
#line 121 "Int32.c"
	ST(0) = sv_newmortal();
	sv_setref_iv(ST(0), "X3D::Values::Int32", (IV)RETVAL);

    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_setValue); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_setValue)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::setValue(self, value)");
    {
	SELF	self;
	char*	value = (char *)SvPV_nolen(ST(1));

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 79 "Int32.xs"
	sv_setiv(self, atoi32(value));
#line 147 "Int32.c"
    }
    XSRETURN_EMPTY;
}


XS(XS_X3D__Values__Int32_getValue); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_getValue)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::getValue(this, ...)");
    {
	X3D__Values__Int32	this;
	I32	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 86 "Int32.xs"
	RETVAL = this;
#line 171 "Int32.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__bool); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__bool)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_bool(this, ...)");
    {
	X3D__Values__Int32	this;
	bool	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 97 "Int32.xs"
	RETVAL = this ? 1 : 0;
#line 195 "Int32.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__not); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__not)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_not(this, ...)");
    {
	X3D__Values__Int32	this;
	bool	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 108 "Int32.xs"
	RETVAL = !this;
#line 220 "Int32.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__neq); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__neq)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_neq(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	bool	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 120 "Int32.xs"
	RETVAL = this == value;
#line 246 "Int32.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__nne); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__nne)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_nne(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	bool	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 130 "Int32.xs"
	RETVAL = this != value;
#line 272 "Int32.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__ncmp); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__ncmp)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_ncmp(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	bool	swap;
	I32	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");

	if (items < 3)
	    swap = FALSE;
	else {
	    swap = (bool)SvTRUE(ST(2));
	}
#line 141 "Int32.xs"
	RETVAL = swap
		? (value < this ? -1 : value > this ? 1 : 0)
		: (this < value ? -1 : this > value ? 1 : 0);
#line 308 "Int32.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__eq); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__eq)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_eq(this, value, swap=FALSE)");
    {
	SV*	this = ST(0);
	SV*	value = ST(1);
	bool	RETVAL;
#line 153 "Int32.xs"
	RETVAL = sv_eq(this, value);
#line 327 "Int32.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__ne); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__ne)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_ne(this, value, swap=FALSE)");
    {
	SV*	this = ST(0);
	SV*	value = ST(1);
	bool	RETVAL;
#line 163 "Int32.xs"
	RETVAL = !sv_eq(this, value);
#line 347 "Int32.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__cmp); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__cmp)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_cmp(this, value, swap=FALSE)");
    {
	SV*	this = ST(0);
	SV*	value = ST(1);
	bool	swap;
	I32	RETVAL;
	dXSTARG;

	if (items < 3)
	    swap = FALSE;
	else {
	    swap = (bool)SvTRUE(ST(2));
	}
#line 174 "Int32.xs"
	RETVAL = swap ? sv_cmp(value, this) : sv_cmp(this, value);
#line 375 "Int32.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_complement); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_complement)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::complement(this, ...)");
    {
	X3D__Values__Int32	this;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 185 "Int32.xs"
	RETVAL = ~ this;
#line 400 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__and); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__and)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_and(self, value, swap=FALSE)");
    {
	SELF	self;
	IV	value = (IV)SvIV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 197 "Int32.xs"
	sv_setiv(self, (I32)(SvIV(self) & value));
#line 425 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__or); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__or)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_or(self, value, swap=FALSE)");
    {
	SELF	self;
	IV	value = (IV)SvIV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 208 "Int32.xs"
	sv_setiv(self, (I32)(SvIV(self) | value));
#line 449 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__xor); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__xor)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_xor(self, value, swap=FALSE)");
    {
	SELF	self;
	IV	value = (IV)SvIV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 219 "Int32.xs"
	sv_setiv(self, (I32)(SvIV(self) ^ value));
#line 473 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__sleft); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__sleft)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_sleft(self, value, swap=FALSE)");
    {
	SELF	self;
	IV	value = (IV)SvIV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 230 "Int32.xs"
	sv_setiv(self, (I32)(SvIV(self) << value));
#line 497 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__sright); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__sright)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_sright(self, value, swap=FALSE)");
    {
	SELF	self;
	IV	value = (IV)SvIV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 241 "Int32.xs"
	sv_setiv(self, (I32)(SvIV(self) >> value));
#line 521 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_and); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_and)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::and(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	IV	value = (IV)SvIV(ST(1));
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 254 "Int32.xs"
	RETVAL = this & value;
#line 546 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_or); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_or)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::or(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	IV	value = (IV)SvIV(ST(1));
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 264 "Int32.xs"
	RETVAL = this | value;
#line 572 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_xor); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_xor)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::xor(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	IV	value = (IV)SvIV(ST(1));
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 274 "Int32.xs"
	RETVAL = this ^ value;
#line 598 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_sleft); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_sleft)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::sleft(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	IV	value = (IV)SvIV(ST(1));
	bool	swap;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");

	if (items < 3)
	    swap = FALSE;
	else {
	    swap = (bool)SvTRUE(ST(2));
	}
#line 285 "Int32.xs"
	RETVAL = swap ? value << this : this << value;
#line 631 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_sright); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_sright)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::sright(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	IV	value = (IV)SvIV(ST(1));
	bool	swap;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");

	if (items < 3)
	    swap = FALSE;
	else {
	    swap = (bool)SvTRUE(ST(2));
	}
#line 296 "Int32.xs"
	RETVAL = swap ? value >> this : this >> value;
#line 664 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_negate); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_negate)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::negate(this, ...)");
    {
	X3D__Values__Int32	this;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 306 "Int32.xs"
	RETVAL = - (NV)this;
#line 689 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__inc); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__inc)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_inc(self, value, swap=FALSE)");
    {
	SELF	self;
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 317 "Int32.xs"
  sv_inc(self);
#line 713 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__dec); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__dec)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_dec(self, value, swap=FALSE)");
    {
	SELF	self;
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 327 "Int32.xs"
	sv_dec(self);
#line 736 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__add); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__add)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_add(self, value, swap=FALSE)");
    {
	SELF	self;
	char*	value = (char *)SvPV_nolen(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 340 "Int32.xs"
	sv_setiv(self, (I32)(SvIV(self) + atoi32(value)));
#line 760 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__subtract); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__subtract)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_subtract(self, value, swap=FALSE)");
    {
	SELF	self;
	char*	value = (char *)SvPV_nolen(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 351 "Int32.xs"
	sv_setiv(self, (I32)(SvIV(self) - atoi32(value)));
#line 784 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__multiply); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__multiply)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_multiply(self, value, swap=FALSE)");
    {
	SELF	self;
	NV	value = (NV)SvNV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 362 "Int32.xs"
	sv_setiv(self, (I32)(SvIV(self) * value));
#line 808 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__divide); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__divide)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_divide(self, value, swap=FALSE)");
    {
	SELF	self;
	NV	value = (NV)SvNV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 373 "Int32.xs"
	if (value == 0)
		croak("Illegal division by zero");
	sv_setiv(self, (I32)(SvIV(self) / value));
#line 834 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__modulo); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__modulo)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_modulo(self, value, swap=FALSE)");
    {
	SELF	self;
	IV	value = (IV)SvIV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 386 "Int32.xs"
	if (value == 0)
		croak("Illegal modulus zero");
	sv_setiv(self, (I32)(SvIV(self) % value));
#line 860 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32__pow); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32__pow)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::_pow(self, value, swap=FALSE)");
    {
	SELF	self;
	IV	value = (IV)SvIV(ST(1));
	SELF	RETVAL;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		self = (SELF)SvRV(ST(0));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 399 "Int32.xs"
	sv_setiv(self, (I32)pow(SvIV(self), value));
#line 884 "Int32.c"
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_add); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_add)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::add(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 412 "Int32.xs"
	RETVAL = this + value;
#line 909 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_subtract); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_subtract)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::subtract(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	bool	swap;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");

	if (items < 3)
	    swap = FALSE;
	else {
	    swap = (bool)SvTRUE(ST(2));
	}
#line 423 "Int32.xs"
	RETVAL = swap ? value - this : this - value;
#line 942 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_multiply); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_multiply)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::multiply(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 433 "Int32.xs"
	RETVAL = this * value;
#line 968 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_divide); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_divide)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::divide(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	bool	swap;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");

	if (items < 3)
	    swap = FALSE;
	else {
	    swap = (bool)SvTRUE(ST(2));
	}
#line 444 "Int32.xs"
	if (swap) {
		if (this == 0)
			croak("Illegal division by zero");
		RETVAL = value / this;
	} else {
		if (value == 0)
			croak("Illegal division by zero");
		RETVAL = this / value;
	}
#line 1009 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_modulo); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_modulo)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::modulo(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	IV	value = (IV)SvIV(ST(1));
	bool	swap;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");

	if (items < 3)
	    swap = FALSE;
	else {
	    swap = (bool)SvTRUE(ST(2));
	}
#line 463 "Int32.xs"
	if (swap) {
		if (this == 0)
			croak("Illegal modulus zero");
		RETVAL = value % this;
	} else {
		if (value == 0)
			croak("Illegal modulus zero");
		RETVAL = this % value;
	}
#line 1050 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_pow); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_pow)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::pow(this, value, swap=FALSE)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	bool	swap;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");

	if (items < 3)
	    swap = FALSE;
	else {
	    swap = (bool)SvTRUE(ST(2));
	}
#line 482 "Int32.xs"
	RETVAL = swap ? pow(value, this) : pow(this, value);
#line 1083 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_abs); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_abs)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::abs(this, ...)");
    {
	X3D__Values__Int32	this;
	U32	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 493 "Int32.xs"
	RETVAL = abs(this);
#line 1108 "Int32.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_cos); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_cos)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::cos(this, ...)");
    {
	X3D__Values__Int32	this;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 502 "Int32.xs"
	RETVAL = cos(this);
#line 1133 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_sin); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_sin)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::sin(this, ...)");
    {
	X3D__Values__Int32	this;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 511 "Int32.xs"
	RETVAL = sin(this);
#line 1158 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_exp); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_exp)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::exp(this, ...)");
    {
	X3D__Values__Int32	this;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 520 "Int32.xs"
	RETVAL = exp(this);
#line 1183 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_log); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_log)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::log(this, ...)");
    {
	X3D__Values__Int32	this;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 529 "Int32.xs"
	if (this <= 0)
		croak("Can't take log of %d", this);
	RETVAL = log(this);
#line 1210 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_atan2); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_atan2)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::atan2(this, value, swap)");
    {
	X3D__Values__Int32	this;
	NV	value = (NV)SvNV(ST(1));
	bool	swap = (bool)SvTRUE(ST(2));
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 542 "Int32.xs"
	RETVAL = swap ? atan2(value, this) : atan2(this, value);
#line 1237 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}


XS(XS_X3D__Values__Int32_sqrt); /* prototype to pass -Wmissing-prototypes */
XS(XS_X3D__Values__Int32_sqrt)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: X3D::Values::Int32::sqrt(this, ...)");
    {
	X3D__Values__Int32	this;
	NV	RETVAL;
	dXSTARG;

	if (sv_derived_from(ST(0), "X3D::Values::Int32")) {
		this = (X3D__Values__Int32)SvIV((SV*)SvRV(ST(0)));
	}
	else
		Perl_croak(aTHX_ "this is not of type X3D::Values::Int32");
#line 551 "Int32.xs"
	if (this < 0)
		croak("Can't take sqrt of %d", this);
	RETVAL = sqrt(this);
#line 1264 "Int32.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS(boot_X3D__Values__Int32); /* prototype to pass -Wmissing-prototypes */
XS(boot_X3D__Values__Int32)
{
    dXSARGS;
    char* file = __FILE__;

    XS_VERSION_BOOTCHECK ;

        newXS("X3D::Values::Int32::MIN_INT32", XS_X3D__Values__Int32_MIN_INT32, file);
        newXS("X3D::Values::Int32::MAX_INT32", XS_X3D__Values__Int32_MAX_INT32, file);
        newXS("X3D::Values::Int32::new", XS_X3D__Values__Int32_new, file);
        newXS("X3D::Values::Int32::getClone", XS_X3D__Values__Int32_getClone, file);
        newXS("X3D::Values::Int32::setValue", XS_X3D__Values__Int32_setValue, file);
        newXS("X3D::Values::Int32::getValue", XS_X3D__Values__Int32_getValue, file);
        newXS("X3D::Values::Int32::_bool", XS_X3D__Values__Int32__bool, file);
        newXS("X3D::Values::Int32::_not", XS_X3D__Values__Int32__not, file);
        newXS("X3D::Values::Int32::_neq", XS_X3D__Values__Int32__neq, file);
        newXS("X3D::Values::Int32::_nne", XS_X3D__Values__Int32__nne, file);
        newXS("X3D::Values::Int32::_ncmp", XS_X3D__Values__Int32__ncmp, file);
        newXS("X3D::Values::Int32::_eq", XS_X3D__Values__Int32__eq, file);
        newXS("X3D::Values::Int32::_ne", XS_X3D__Values__Int32__ne, file);
        newXS("X3D::Values::Int32::_cmp", XS_X3D__Values__Int32__cmp, file);
        newXS("X3D::Values::Int32::complement", XS_X3D__Values__Int32_complement, file);
        newXS("X3D::Values::Int32::_and", XS_X3D__Values__Int32__and, file);
        newXS("X3D::Values::Int32::_or", XS_X3D__Values__Int32__or, file);
        newXS("X3D::Values::Int32::_xor", XS_X3D__Values__Int32__xor, file);
        newXS("X3D::Values::Int32::_sleft", XS_X3D__Values__Int32__sleft, file);
        newXS("X3D::Values::Int32::_sright", XS_X3D__Values__Int32__sright, file);
        newXS("X3D::Values::Int32::and", XS_X3D__Values__Int32_and, file);
        newXS("X3D::Values::Int32::or", XS_X3D__Values__Int32_or, file);
        newXS("X3D::Values::Int32::xor", XS_X3D__Values__Int32_xor, file);
        newXS("X3D::Values::Int32::sleft", XS_X3D__Values__Int32_sleft, file);
        newXS("X3D::Values::Int32::sright", XS_X3D__Values__Int32_sright, file);
        newXS("X3D::Values::Int32::negate", XS_X3D__Values__Int32_negate, file);
        newXS("X3D::Values::Int32::_inc", XS_X3D__Values__Int32__inc, file);
        newXS("X3D::Values::Int32::_dec", XS_X3D__Values__Int32__dec, file);
        newXS("X3D::Values::Int32::_add", XS_X3D__Values__Int32__add, file);
        newXS("X3D::Values::Int32::_subtract", XS_X3D__Values__Int32__subtract, file);
        newXS("X3D::Values::Int32::_multiply", XS_X3D__Values__Int32__multiply, file);
        newXS("X3D::Values::Int32::_divide", XS_X3D__Values__Int32__divide, file);
        newXS("X3D::Values::Int32::_modulo", XS_X3D__Values__Int32__modulo, file);
        newXS("X3D::Values::Int32::_pow", XS_X3D__Values__Int32__pow, file);
        newXS("X3D::Values::Int32::add", XS_X3D__Values__Int32_add, file);
        newXS("X3D::Values::Int32::subtract", XS_X3D__Values__Int32_subtract, file);
        newXS("X3D::Values::Int32::multiply", XS_X3D__Values__Int32_multiply, file);
        newXS("X3D::Values::Int32::divide", XS_X3D__Values__Int32_divide, file);
        newXS("X3D::Values::Int32::modulo", XS_X3D__Values__Int32_modulo, file);
        newXS("X3D::Values::Int32::pow", XS_X3D__Values__Int32_pow, file);
        newXS("X3D::Values::Int32::abs", XS_X3D__Values__Int32_abs, file);
        newXS("X3D::Values::Int32::cos", XS_X3D__Values__Int32_cos, file);
        newXS("X3D::Values::Int32::sin", XS_X3D__Values__Int32_sin, file);
        newXS("X3D::Values::Int32::exp", XS_X3D__Values__Int32_exp, file);
        newXS("X3D::Values::Int32::log", XS_X3D__Values__Int32_log, file);
        newXS("X3D::Values::Int32::atan2", XS_X3D__Values__Int32_atan2, file);
        newXS("X3D::Values::Int32::sqrt", XS_X3D__Values__Int32_sqrt, file);
    XSRETURN_YES;
}

