#include <inline/stub.h>
#ifndef BASE_EXT_DECL
#define BASE_EXT_DECL extern struct Device * TimerBase;
#endif
#ifndef BASE_PAR_DECL
#define BASE_PAR_DECL
#define BASE_PAR_DECL0
#endif
#ifndef BASE_NAME
#define BASE_NAME TimerBase
#endif
__inline static void AddTime(BASE_PAR_DECL struct timeval* dest, const struct timeval* src)
{
	BASE_EXT_DECL
	register void *a6 __asm ("a6");
	register struct timeval* a0 __asm("a0");
	register const struct timeval* a1 __asm("a1");

	a6 = BASE_NAME;
	a0 = dest;
	a1 = src;
	__asm volatile ("
	jsr a6@(-0x2a)"
	: /* no output */
	: "r" (a6), "r" (a0), "r" (a1)
	: "d0", "d1", "a0", "a1");
	*a0=*a0;
}
__inline static void SubTime(BASE_PAR_DECL struct timeval* dest, const struct timeval* src)
{
	BASE_EXT_DECL
	register void *a6 __asm ("a6");
	register struct timeval* a0 __asm("a0");
	register const struct timeval* a1 __asm("a1");

	a6 = BASE_NAME;
	a0 = dest;
	a1 = src;
	__asm volatile ("
	jsr a6@(-0x30)"
	: /* no output */
	: "r" (a6), "r" (a0), "r" (a1)
	: "d0", "d1", "a0", "a1");
	*a0=*a0;
}
__inline static long CmpTime(BASE_PAR_DECL const struct timeval* dest, const struct timeval* src)
{
	BASE_EXT_DECL
	register long res __asm("d0");
	register void *a6 __asm ("a6");
	register const struct timeval* a0 __asm("a0");
	register const struct timeval* a1 __asm("a1");

	a6 = BASE_NAME;
	a0 = dest;
	a1 = src;
	__asm volatile ("
	jsr a6@(-0x36)"
	: "=r" (res)
	: "r" (a6), "r" (a0), "r" (a1)
	: "d0", "d1", "a0", "a1");
	return res;
}
#undef BASE_EXT_DECL
#undef BASE_PAR_DECL
#undef BASE_PAR_DECL0
#undef BASE_NAME
