// -*- c -*- c mode in emacs
|
// -*- c -*- c mode in emacs
|
|
|
// Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
|
// Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
|
// This program is free software; you can redistribute it and/or modify it
|
// This program is free software; you can redistribute it and/or modify it
|
// under the terms of the GNU General Public License as published by the
|
// under the terms of the GNU General Public License as published by the
|
// Free Software Foundation; either version 3, or (at your option) any
|
// Free Software Foundation; either version 3, or (at your option) any
|
// later version.
|
// later version.
|
//
|
//
|
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
//
|
//
|
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
// along with GCC; see the file COPYING3. If not see
|
// along with GCC; see the file COPYING3. If not see
|
// .
|
// .
|
//
|
//
|
// In other words, you are welcome to use, share and improve this program.
|
// In other words, you are welcome to use, share and improve this program.
|
// You are forbidden to forbid anyone else to use, share and improve
|
// You are forbidden to forbid anyone else to use, share and improve
|
// what you give them. Help stamp out software-hoarding!
|
// what you give them. Help stamp out software-hoarding!
|
|
|
|
|
external_definition int add(int arg1, int arg2);
|
external_definition int add(int arg1, int arg2);
|
external_definition int subtract(int arg3, int arg4);
|
external_definition int subtract(int arg3, int arg4);
|
external_definition int first_nonzero(int arg5, int arg6);
|
external_definition int first_nonzero(int arg5, int arg6);
|
external_definition int double_plus_one(int arg7);
|
external_definition int double_plus_one(int arg7);
|
|
|
add
|
add
|
{
|
{
|
return arg1 + arg2;
|
return arg1 + arg2;
|
}
|
}
|
|
|
|
|
subtract
|
subtract
|
{
|
{
|
return arg3 - arg4;
|
return arg3 - arg4;
|
}
|
}
|
|
|
double_plus_one
|
double_plus_one
|
{
|
{
|
automatic int aaa;
|
automatic int aaa;
|
aaa=add(arg7, arg7);
|
aaa=add(arg7, arg7);
|
aaa=add(aaa, aaa);
|
aaa=add(aaa, aaa);
|
aaa=subtract(subtract(aaa, arg7), arg7) + 1;
|
aaa=subtract(subtract(aaa, arg7), arg7) + 1;
|
return aaa;
|
return aaa;
|
}
|
}
|
|
|
first_nonzero
|
first_nonzero
|
{
|
{
|
if (arg5)
|
if (arg5)
|
{
|
{
|
return arg5;
|
return arg5;
|
}
|
}
|
else
|
else
|
{
|
{
|
}
|
}
|
return arg6;
|
return arg6;
|
}
|
}
|
|
|
|
|