#if     !defined( lint )
static const char rcsid[] = "@(#)fib20.c        (c) OpenLisp v10.2 2015/09/26";
#endif

/*
 * File 'fib20.c' automatically compiled from 'fib20.lsp'. DO NOT EDIT!!
 *
 * WARNING! This generated code is neither GPL nor LGPL.
 * It requires a commercial license to be used.
 */

#include "openlisp.h"
#include "module.h"
#include "cbackend.h"
#include "lap.h"
#include "fib20.h"

#if     defined(__GNUC__)
#if     (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif  /* GCC >= 4.6 */
#endif  /* __GNUC__ */

#if     defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning( disable : 4702 ) /* unreachable code  */
#pragma warning( disable : 6011 ) /* Dereferencing NULL */
#pragma auto_inline( on )
#endif  /* _MSC_VER */

#if     defined(__POCC__)
#pragma warn( disable : 1814 ) /* Local never used     */
#pragma warn( disable : 2115 ) /* Init. but never used */
#pragma warn( disable : 2128 ) /* reference removed    */
#endif  /* __POCC__ */

/*
 *      fib                                             [SUBR1]
 */

static POINTER 
OLDEFCOMPILED1( olfib_00, p1 )
{
        POINTER a1;
        POINTER VOLATILE a2;

        ollapenter( SN_OLFIB_00 );
        a1 = p1;
        if( eq( a1, olmakefix( 1 ) ) ) goto _l004;
        if( !eq( a1, olmakefix( 2 ) ) ) goto _l003;
        ollapleave( SN_OLFIB_00 );
        return( olmakefix( 1 ) );
_l003:
        a1 = ollapgsub( a1, olmakefix( 1 ) );
        a2 = olfib_00( a1 );
        a1 = ollapgsub( p1, olmakefix( 2 ) );
        a1 = olfib_00( a1 );
        a1 = ollapgadd( a2, a1 );
_l004:
        ollapleave( SN_OLFIB_00 );
        return( a1 );
}

/*
 *      ilos::GF$gfib$i                                 [SUBR1]
 */

OLINLINE static POINTER 
OLDEFCOMPILED1( olGF_gfib_i_01, p1 )
{
        POINTER a1;
        POINTER VOLATILE a2;

        ollapenter( SN_OLGF_GFIB_I_01 );
        a1 = p1;
        if( eq( a1, olmakefix( 1 ) ) ) goto _l004;
        if( !eq( a1, olmakefix( 2 ) ) ) goto _l003;
        ollapleave( SN_OLGF_GFIB_I_01 );
        return( olmakefix( 1 ) );
_l003:
        a1 = ollapsub( a1, olmakefix( 1 ) );
        a2 = olGF_gfib_i_01( a1 );
        a1 = ollapsub( p1, olmakefix( 2 ) );
        a1 = olGF_gfib_i_01( a1 );
        a1 = ollapgadd( a2, a1 );
_l004:
        ollapleave( SN_OLGF_GFIB_I_01 );
        return( a1 );
}

#if     defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma warning( disable : 4125 ) /* octal char followed by number   */
#pragma warning( disable : 4566 ) /* for UNICODE characters          */
#pragma warning( disable : 4428 ) /* for UNICODE characters          */
#pragma warning( disable : 4343 ) /* disable warning for next pragma */
#pragma optimize( "gs", off )     /* don't optimize init routine     */
#endif  /* _MSC_VER */

OLEXPORT void
OLDEFCOMPILEDN( olfib20init, initflag )
{
        POINTER VOLATILE a1 = NULLPTR;
        POINTER VOLATILE a2 = NULLPTR;

        if( initflag == 0 ) {
                return;
        }

        olentermodule( LCSTR("fib20.c"), 10.2 );
        (void)olidentity( a1 );
        (void)olidentity( a2 );

#if     defined( OLLAPTIMETRACE )
        ollapttinit( SN_OLFIB_00 );
        ollapttinit( SN_OLGF_GFIB_I_01 );
#endif  /* OLLAPTIMETRACE */

        (void)olfentry( (PFUN)olfib_00, SUBR1, SN_OLFIB_00 );
        olpush( olsymbdefgeneric );
        olpush( olusersymbol(LCSTR("gfib")) );
        a1 = olcons( olusersymbol(LCSTR("n")), nil );
        olpush( a1 );
        a1 = ollist( 3 );
        oladjstk( 3 );
        (void)olevalenv(a1, OLNULLENV);
        (void)olfentry( (PFUN)olGF_gfib_i_01, SUBR1, SN_OLGF_GFIB_I_01 );
        olpush( olsymbdefmethod );
        olpush( olusersymbol(LCSTR("gfib")) );
        a1 = olcons( olusersymbol(LCSTR("<integer>")), nil );
        a1 = olcons( olusersymbol(LCSTR("n")), a1 );
        a1 = olcons( a1, nil );
        olpush( a1 );
        a1 = ollist( 3 );
        oladjstk( 3 );
        olpush( a1 );
        olpush( olusersymbol(LCSTR("ilos::GF$gfib$i")) );
        a1 = olnconc( 2 );
        oladjstk( 2 );
        (void)olevalenv(a1, OLNULLENV);

        olleavemodule();
}