/*
 * param1.c sample of inline asm
 *
 *    N.B. this file does not use and headers or other module apart from gba_font (the chars)
 *         so it is completly self contained.
 */

volatile int data = 3; /* just to force -O3 not to optimise incase */
/* test code */
int funcWithAParam( int one )
{
	return one * 3 + data;
}

int funcWithALocal( void )
{
	int one;
	one = data;
	return one * 3;
}

int funcWithTenParams( int a, int b, int c, int d, int e, int f, int g, int h, int i, int j )
{
	return a + b + c + d + e + f + g + h + i + j;
}

int funcWithTenParamsAndTwoLocals( int a, int b, int c, int d, int e, int f, int g, int h, int i, int j )
{
	int x, y;
	x = data * (a + b + c + d + e);
	y = data * (f + g + h + i + j);
	return  x + y + a + b + c + d + e + f + g + h + i + j;
}

int funcWithTenParamsAndTenLocals( int a, int b, int c, int d, int e, int f, int g, int h, int i, int j )
{
	int aa, bb, cc, dd, ee, ff, gg, hh, ii, jj;
	aa = a + data;
	bb = b + data;
	cc = c + data;
	dd = d * data;
	ee = e - data;
	ff = f - a;
	gg = g - b;
	hh = h - c;
	ii = i - d;
	jj = j - e;
	return  aa + bb+ cc+ dd+ ee+ff +gg +hh+ii+jj+a + b + c + d + e + f + g + h + i + j;
}
