#pragma On(Align_all_labels)
#pragma On(Align_labels)

#include <stdio.h>
#include <math.h>
#include <limits.h>

#define ROUND 1024
#define PI _PI

main()
{
	double i,j;
	int x;

	printf("pragma On(Align_all_labels);\n\n");

	printf("int FX_asintbl[]={\n");
	for(i=-ROUND/2; i<ROUND/2; i+=8)
	{
		printf("\t");
		for(j=i; j<i+8; j++)
		{
			x=(int)(asin(j/(ROUND/2)) * 32768 / PI);
			printf("%6d,",x);
		}
		printf("\n");
	}
	j=ROUND/2;
	x=(int)(asin(j/(ROUND/2)) * 32768 / PI);
	printf("\t%6d\n",x);
	printf("};\n\n");


	printf("int FX_acostbl[]={\n");
	for(i=-ROUND/2; i<ROUND/2; i+=8)
	{
		printf("\t");
		for(j=i; j<i+8; j++)
		{
			x=(int)(acos(j/(ROUND/2)) * 32768 / PI);
			printf("%6d,",x);
		}
		printf("\n");
	}
	j=ROUND/2;
	x=(int)(acos(j/(ROUND/2)) * 32768 / PI);
	printf("\t%6d\n",x);
	printf("};\n\n");


	printf("int FX_atantbl[]={\n");
	for(i=0; i<ROUND; i+=8)
	{
		printf("\t");
		for(j=i; j<i+8; j++)
		{
			x=(int)(atan2(j,ROUND-j) * 32768 / PI);
			printf("%6d,",x);
		}
		printf("\n");
	}
	printf("\t16384\n",x);
	printf("};\n\n");
}
