int tarai(int x, int y, int z){ if(x <= y){ return y; }else{ return tarai(tarai(x-1,y,z),tarai(y-1,z,x),tarai(z-1,x,y)); } }
int tarai(int x, int y, int z) { return (x <= y) ? y : tarai(tarai(x-1, y, z), tarai(y-1, z, x), tarai(z-1, x, y)); }
int main( int argc, char *argv[], char *env[] ) { unsigned long x; unsigned long y; unsigned long z; unsigned long ans=0; if(argc!=3) { //some error } else { x = atoi(argv[0]); y = atoi(argv[1]); z = atoi(argv[2]); //figure out how to call assembly function from c ans = tarai(x,y,z); } return ans; }
int main(){ bench_start(); int result = tarai(12,6,0); bench_end(); }