view test/nds-test/build/main.i @ 2683:e858ac8868b6 gsoc2008_nds

Ongoing video render work; initial work on NDS Timers.
author Darren Alton <dalton@stevens.edu>
date Fri, 08 Aug 2008 08:22:08 +0000
parents
children
line wrap: on
line source

# 1 "/home/lifning/hack/nds-test/source/main.c"
# 1 "/home/lifning/hack/nds-test/build//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/home/lifning/hack/nds-test/source/main.c"

# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 1
# 77 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_main.h" 1
# 26 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_main.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 1
# 32 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config.h" 1
# 26 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_platform.h" 1
# 27 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config.h" 2



# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config_nintendods.h" 1
# 30 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config_nintendods.h"
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef signed long long int64_t;
typedef unsigned long long uint64_t;






typedef unsigned int uintptr_t;
# 31 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_config.h" 2
# 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2



# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 1 3
# 20 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 1 3
# 15 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/newlib.h" 1 3
# 16 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 2 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/config.h" 1 3



# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/ieeefp.h" 1 3
# 5 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/config.h" 2 3
# 17 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 2 3
# 21 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3




# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_types.h" 1 3






# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 1 3
# 26 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
typedef signed char __int8_t ;
typedef unsigned char __uint8_t ;
# 36 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
typedef signed short __int16_t;
typedef unsigned short __uint16_t;
# 46 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
typedef __int16_t __int_least16_t;
typedef __uint16_t __uint_least16_t;
# 58 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
# 76 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
typedef __int32_t __int_least32_t;
typedef __uint32_t __uint_least32_t;
# 99 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_default_types.h" 3
typedef signed long long __int64_t;
typedef unsigned long long __uint64_t;
# 8 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/_types.h" 2 3
# 26 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
# 61 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 1 3
# 13 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/lock.h" 1 3





typedef int _LOCK_T;
typedef int _LOCK_RECURSIVE_T;
# 14 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 2 3


typedef long _off_t;







typedef short __dev_t;




typedef unsigned short __uid_t;


typedef unsigned short __gid_t;



__extension__ typedef long long _off64_t;







typedef long _fpos_t;
# 56 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 3
typedef int _ssize_t;






# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
# 355 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 3 4
typedef unsigned int wint_t;
# 64 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/_types.h" 2 3



typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    unsigned char __wchb[4];
  } __value;
} _mbstate_t;



typedef _LOCK_RECURSIVE_T _flock_t;




typedef void *_iconv_t;
# 62 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3







# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
# 152 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 3 4
typedef int ptrdiff_t;
# 214 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 3 4
typedef unsigned int size_t;
# 326 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 3 4
typedef unsigned int wchar_t;
# 70 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/types.h" 1 3
# 19 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/types.h" 3
typedef long int __off_t;
typedef int __pid_t;

__extension__ typedef long long int __loff_t;
# 71 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
# 92 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;



typedef unsigned short ushort;
typedef unsigned int uint;



typedef unsigned long clock_t;




typedef long time_t;




struct timespec {
  time_t tv_sec;
  long tv_nsec;
};

struct itimerspec {
  struct timespec it_interval;
  struct timespec it_value;
};


typedef long daddr_t;
typedef char * caddr_t;






typedef unsigned int ino_t;
# 162 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
typedef _off_t off_t;
typedef __dev_t dev_t;
typedef __uid_t uid_t;
typedef __gid_t gid_t;


typedef int pid_t;

typedef long key_t;

typedef _ssize_t ssize_t;
# 186 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
typedef unsigned int mode_t __attribute__ ((__mode__ (__SI__)));




typedef unsigned short nlink_t;
# 213 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
typedef long fd_mask;







typedef struct _types_fd_set {
 fd_mask fds_bits[(((64)+(((sizeof (fd_mask) * 8))-1))/((sizeof (fd_mask) * 8)))];
} _types_fd_set;
# 244 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 3
typedef unsigned long clockid_t;




typedef unsigned long timer_t;



typedef unsigned long useconds_t;
typedef long suseconds_t;

typedef __uint32_t fsblkcnt_t;
typedef __uint32_t fsfilcnt_t;

# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/features.h" 1 3
# 260 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/types.h" 2 3
# 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2


# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 1 3
# 29 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/_ansi.h" 1 3
# 30 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3




# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
# 35 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3


# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stdarg.h" 1 3 4
# 43 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 38 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3







# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 1 3
# 21 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
typedef unsigned long __ULong;
# 37 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
struct _reent;






struct _Bigint
{
  struct _Bigint *_next;
  int _k, _maxwds, _sign, _wds;
  __ULong _x[1];
};


struct __tm
{
  int __tm_sec;
  int __tm_min;
  int __tm_hour;
  int __tm_mday;
  int __tm_mon;
  int __tm_year;
  int __tm_wday;
  int __tm_yday;
  int __tm_isdst;
};







struct _on_exit_args {
 void * _fnargs[32];
 void * _dso_handle[32];

 __ULong _fntypes;


 __ULong _is_cxa;
};
# 89 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
struct _atexit {
 struct _atexit *_next;
 int _ind;

 void (*_fns[32])(void);
        struct _on_exit_args _on_exit_args;
};
# 105 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
struct __sbuf {
 unsigned char *_base;
 int _size;
};
# 158 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
struct __sFILE {
  unsigned char *_p;
  int _r;
  int _w;
  short _flags;
  short _file;
  struct __sbuf _bf;
  int _lbfsize;






  void * _cookie;

  int (*_read) (struct _reent *, void *, char *, int);

  int (*_write) (struct _reent *, void *, const char *, int);

  _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int);
  int (*_close) (struct _reent *, void *);


  struct __sbuf _ub;
  unsigned char *_up;
  int _ur;


  unsigned char _ubuf[3];
  unsigned char _nbuf[1];


  struct __sbuf _lb;


  int _blksize;
  int _offset;


  struct _reent *_data;



  _flock_t _lock;

};
# 259 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
typedef struct __sFILE __FILE;



struct _glue
{
  struct _glue *_next;
  int _niobs;
  __FILE *_iobs;
};
# 291 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
struct _rand48 {
  unsigned short _seed[3];
  unsigned short _mult[3];
  unsigned short _add;




};
# 564 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
struct _reent
{
  int _errno;




  __FILE *_stdin, *_stdout, *_stderr;

  int _inc;
  char _emergency[25];

  int _current_category;
  const char *_current_locale;

  int __sdidinit;

  void (*__cleanup) (struct _reent *);


  struct _Bigint *_result;
  int _result_k;
  struct _Bigint *_p5s;
  struct _Bigint **_freelist;


  int _cvtlen;
  char *_cvtbuf;

  union
    {
      struct
        {
          unsigned int _unused_rand;
          char * _strtok_last;
          char _asctime_buf[26];
          struct __tm _localtime_buf;
          int _gamma_signgam;
          __extension__ unsigned long long _rand_next;
          struct _rand48 _r48;
          _mbstate_t _mblen_state;
          _mbstate_t _mbtowc_state;
          _mbstate_t _wctomb_state;
          char _l64a_buf[8];
          char _signal_buf[24];
          int _getdate_err;
          _mbstate_t _mbrlen_state;
          _mbstate_t _mbrtowc_state;
          _mbstate_t _mbsrtowcs_state;
          _mbstate_t _wcrtomb_state;
          _mbstate_t _wcsrtombs_state;
        } _reent;



      struct
        {

          unsigned char * _nextf[30];
          unsigned int _nmalloc[30];
        } _unused;
    } _new;


  struct _atexit *_atexit;
  struct _atexit _atexit0;


  void (**(_sig_func))(int);




  struct _glue __sglue;
  __FILE __sf[3];
};
# 796 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/reent.h" 3
extern struct _reent *_impure_ptr ;
extern struct _reent *const _global_impure_ptr ;

void _reclaim_reent (struct _reent *);
# 46 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3




typedef __FILE FILE;
# 59 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
typedef _fpos_t fpos_t;





# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/stdio.h" 1 3
# 66 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 2 3
# 170 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
FILE * tmpfile (void);
char * tmpnam (char *);
int fclose (FILE *);
int fflush (FILE *);
FILE * freopen (const char *, const char *, FILE *);
void setbuf (FILE *, char *);
int setvbuf (FILE *, char *, int, size_t);
int fprintf (FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));

int fscanf (FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));

int printf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));

int scanf (const char *, ...) __attribute__ ((__format__ (__scanf__, 1, 2)));

int sscanf (const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));

int vfprintf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

int vprintf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0)));

int vsprintf (char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

int fgetc (FILE *);
char * fgets (char *, int, FILE *);
int fputc (int, FILE *);
int fputs (const char *, FILE *);
int getc (FILE *);
int getchar (void);
char * gets (char *);
int putc (int, FILE *);
int putchar (int);
int puts (const char *);
int ungetc (int, FILE *);
size_t fread (void *, size_t _size, size_t _n, FILE *);
size_t fwrite (const void * , size_t _size, size_t _n, FILE *);



int fgetpos (FILE *, fpos_t *);

int fseek (FILE *, long, int);



int fsetpos (FILE *, const fpos_t *);

long ftell ( FILE *);
void rewind (FILE *);
void clearerr (FILE *);
int feof (FILE *);
int ferror (FILE *);
void perror (const char *);

FILE * fopen (const char *_name, const char *_type);
int sprintf (char *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));

int remove (const char *);
int rename (const char *, const char *);






int fseeko (FILE *, off_t, int);
off_t ftello ( FILE *);


int asiprintf (char **, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));

char * asniprintf (char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

char * asnprintf (char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int asprintf (char **, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));


int diprintf (int, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));


int fcloseall (void);
int fiprintf (FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));

int fiscanf (FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));

int iprintf (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));

int iscanf (const char *, ...) __attribute__ ((__format__ (__scanf__, 1, 2)));

int siprintf (char *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));

int siscanf (const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));

int snprintf (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int sniprintf (char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

char * tempnam (const char *, const char *);
int vasiprintf (char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

char * vasniprintf (char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

char * vasnprintf (char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int vasprintf (char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

int vdiprintf (int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

int vfiprintf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

int vfiscanf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));

int vfscanf (FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));

int viprintf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 1, 0)));

int viscanf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 1, 0)));

int vscanf (const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 1, 0)));

int vsiprintf (char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

int vsiscanf (const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));

int vsniprintf (char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int vsnprintf (char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int vsscanf (const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));
# 310 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
FILE * fdopen (int, const char *);

int fileno (FILE *);
int getw (FILE *);
int pclose (FILE *);
FILE * popen (const char *, const char *);
int putw (int, FILE *);
void setbuffer (FILE *, char *, int);
int setlinebuf (FILE *);
int getc_unlocked (FILE *);
int getchar_unlocked (void);
void flockfile (FILE *);
int ftrylockfile (FILE *);
void funlockfile (FILE *);
int putc_unlocked (int, FILE *);
int putchar_unlocked (int);
# 335 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
int dprintf (int, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));


FILE * fmemopen (void *, size_t, const char *);


FILE * open_memstream (char **, size_t *);

int vdprintf (int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));
# 352 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
int _asiprintf_r (struct _reent *, char **, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

char * _asniprintf_r (struct _reent *, char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));

char * _asnprintf_r (struct _reent *, char *, size_t *, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));

int _asprintf_r (struct _reent *, char **, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int _diprintf_r (struct _reent *, int, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int _dprintf_r (struct _reent *, int, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int _fclose_r (struct _reent *, FILE *);
int _fcloseall_r (struct _reent *);
FILE * _fdopen_r (struct _reent *, int, const char *);
int _fflush_r (struct _reent *, FILE *);
char * _fgets_r (struct _reent *, char *, int, FILE *);
int _fiprintf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int _fiscanf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));

FILE * _fmemopen_r (struct _reent *, void *, size_t, const char *);
FILE * _fopen_r (struct _reent *, const char *, const char *);
int _fprintf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int _fputc_r (struct _reent *, int, FILE *);
int _fputs_r (struct _reent *, const char *, FILE *);
size_t _fread_r (struct _reent *, void *, size_t _size, size_t _n, FILE *);
int _fscanf_r (struct _reent *, FILE *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));

int _fseek_r (struct _reent *, FILE *, long, int);
long _ftell_r (struct _reent *, FILE *);
size_t _fwrite_r (struct _reent *, const void * , size_t _size, size_t _n, FILE *);
int _getc_r (struct _reent *, FILE *);
int _getc_unlocked_r (struct _reent *, FILE *);
int _getchar_r (struct _reent *);
int _getchar_unlocked_r (struct _reent *);
char * _gets_r (struct _reent *, char *);
int _iprintf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));

int _iscanf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));

int _mkstemp_r (struct _reent *, char *);
char * _mktemp_r (struct _reent *, char *);
FILE * _open_memstream_r (struct _reent *, char **, size_t *);
void _perror_r (struct _reent *, const char *);
int _printf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__printf__, 2, 3)));

int _putc_r (struct _reent *, int, FILE *);
int _putc_unlocked_r (struct _reent *, int, FILE *);
int _putchar_unlocked_r (struct _reent *, int);
int _putchar_r (struct _reent *, int);
int _puts_r (struct _reent *, const char *);
int _remove_r (struct _reent *, const char *);
int _rename_r (struct _reent *, const char *_old, const char *_new);

int _scanf_r (struct _reent *, const char *, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));

int _siprintf_r (struct _reent *, char *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int _siscanf_r (struct _reent *, const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));

int _sniprintf_r (struct _reent *, char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));

int _snprintf_r (struct _reent *, char *, size_t, const char *, ...) __attribute__ ((__format__ (__printf__, 4, 5)));

int _sprintf_r (struct _reent *, char *, const char *, ...) __attribute__ ((__format__ (__printf__, 3, 4)));

int _sscanf_r (struct _reent *, const char *, const char *, ...) __attribute__ ((__format__ (__scanf__, 3, 4)));

char * _tempnam_r (struct _reent *, const char *, const char *);
FILE * _tmpfile_r (struct _reent *);
char * _tmpnam_r (struct _reent *, char *);
int _ungetc_r (struct _reent *, int, FILE *);
int _vasiprintf_r (struct _reent *, char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

char * _vasniprintf_r (struct _reent*, char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));

char * _vasnprintf_r (struct _reent*, char *, size_t *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));

int _vasprintf_r (struct _reent *, char **, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int _vdiprintf_r (struct _reent *, int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int _vdprintf_r (struct _reent *, int, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int _vfiprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int _vfiscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));

int _vfprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int _vfscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));

int _viprintf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

int _viscanf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));

int _vprintf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 2, 0)));

int _vscanf_r (struct _reent *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 2, 0)));

int _vsiprintf_r (struct _reent *, char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int _vsiscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));

int _vsniprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));

int _vsnprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 4, 0)));

int _vsprintf_r (struct _reent *, char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__printf__, 3, 0)));

int _vsscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__ ((__format__ (__scanf__, 3, 0)));


ssize_t __getdelim (char **, size_t *, int, FILE *);
ssize_t __getline (char **, size_t *, FILE *);
# 494 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
int __srget_r (struct _reent *, FILE *);
int __swbuf_r (struct _reent *, int, FILE *);
# 509 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
FILE *funopen (const void * __cookie, int (*__readfn)(void * __cookie, char *__buf, int __n), int (*__writefn)(void * __cookie, const char *__buf, int __n), fpos_t (*__seekfn)(void * __cookie, fpos_t __off, int __whence), int (*__closefn)(void * __cookie));
# 521 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3
typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n);
typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf,
     size_t __n);




typedef int cookie_seek_function_t(void *__cookie, off_t *__off, int __whence);

typedef int cookie_close_function_t(void *__cookie);
typedef struct
{


  cookie_read_function_t *read;
  cookie_write_function_t *write;
  cookie_seek_function_t *seek;
  cookie_close_function_t *close;
} cookie_io_functions_t;
FILE *fopencookie (void *__cookie, const char *__mode, cookie_io_functions_t __functions);
# 669 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdio.h" 3

# 40 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2


# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 1 3
# 14 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
# 15 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 2 3


# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/machine/stdlib.h" 1 3
# 18 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 2 3

# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/alloca.h" 1 3
# 20 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 2 3








typedef struct
{
  int quot;
  int rem;
} div_t;

typedef struct
{
  long quot;
  long rem;
} ldiv_t;


typedef struct
{
  long long int quot;
  long long int rem;
} lldiv_t;
# 57 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdlib.h" 3
extern int __mb_cur_max;



void abort (void) __attribute__ ((noreturn));
int abs (int);
int atexit (void (*__func)(void));
double atof (const char *__nptr);

float atoff (const char *__nptr);

int atoi (const char *__nptr);
int _atoi_r (struct _reent *, const char *__nptr);
long atol (const char *__nptr);
long _atol_r (struct _reent *, const char *__nptr);
void * bsearch (const void * __key, const void * __base, size_t __nmemb, size_t __size, int (* _compar) (const void *, const void *));




void * calloc (size_t __nmemb, size_t __size);
div_t div (int __numer, int __denom);
void exit (int __status) __attribute__ ((noreturn));
void free (void *);
char * getenv (const char *__string);
char * _getenv_r (struct _reent *, const char *__string);
char * _findenv (const char *, int *);
char * _findenv_r (struct _reent *, const char *, int *);
long labs (long);
ldiv_t ldiv (long __numer, long __denom);
void * malloc (size_t __size);
int mblen (const char *, size_t);
int _mblen_r (struct _reent *, const char *, size_t, _mbstate_t *);
int mbtowc (wchar_t *, const char *, size_t);
int _mbtowc_r (struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *);
int wctomb (char *, wchar_t);
int _wctomb_r (struct _reent *, char *, wchar_t, _mbstate_t *);
size_t mbstowcs (wchar_t *, const char *, size_t);
size_t _mbstowcs_r (struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *);
size_t wcstombs (char *, const wchar_t *, size_t);
size_t _wcstombs_r (struct _reent *, char *, const wchar_t *, size_t, _mbstate_t *);


int mkstemp (char *);
char * mktemp (char *);


void qsort (void * __base, size_t __nmemb, size_t __size, int(*_compar)(const void *, const void *));
int rand (void);
void * realloc (void * __r, size_t __size);
void srand (unsigned __seed);
double strtod (const char *__n, char **__end_PTR);
double _strtod_r (struct _reent *,const char *__n, char **__end_PTR);
float strtof (const char *__n, char **__end_PTR);






long strtol (const char *__n, char **__end_PTR, int __base);
long _strtol_r (struct _reent *,const char *__n, char **__end_PTR, int __base);
unsigned long strtoul (const char *__n, char **__end_PTR, int __base);
unsigned long _strtoul_r (struct _reent *,const char *__n, char **__end_PTR, int __base);

int system (const char *__string);


long a64l (const char *__input);
char * l64a (long __input);
char * _l64a_r (struct _reent *,long __input);
int on_exit (void (*__func)(int, void *),void * __arg);
void _Exit (int __status) __attribute__ ((noreturn));
int putenv (char *__string);
int _putenv_r (struct _reent *, char *__string);
int setenv (const char *__string, const char *__value, int __overwrite);
int _setenv_r (struct _reent *, const char *__string, const char *__value, int __overwrite);

char * gcvt (double,int,char *);
char * gcvtf (float,int,char *);
char * fcvt (double,int,int *,int *);
char * fcvtf (float,int,int *,int *);
char * ecvt (double,int,int *,int *);
char * ecvtbuf (double, int, int*, int*, char *);
char * fcvtbuf (double, int, int*, int*, char *);
char * ecvtf (float,int,int *,int *);
char * dtoa (double, int, int, int *, int*, char**);
int rand_r (unsigned *__seed);

double drand48 (void);
double _drand48_r (struct _reent *);
double erand48 (unsigned short [3]);
double _erand48_r (struct _reent *, unsigned short [3]);
long jrand48 (unsigned short [3]);
long _jrand48_r (struct _reent *, unsigned short [3]);
void lcong48 (unsigned short [7]);
void _lcong48_r (struct _reent *, unsigned short [7]);
long lrand48 (void);
long _lrand48_r (struct _reent *);
long mrand48 (void);
long _mrand48_r (struct _reent *);
long nrand48 (unsigned short [3]);
long _nrand48_r (struct _reent *, unsigned short [3]);
unsigned short *
       seed48 (unsigned short [3]);
unsigned short *
       _seed48_r (struct _reent *, unsigned short [3]);
void srand48 (long);
void _srand48_r (struct _reent *, long);
long long atoll (const char *__nptr);
long long _atoll_r (struct _reent *, const char *__nptr);
long long llabs (long long);
lldiv_t lldiv (long long __numer, long long __denom);
long long strtoll (const char *__n, char **__end_PTR, int __base);
long long _strtoll_r (struct _reent *, const char *__n, char **__end_PTR, int __base);
unsigned long long strtoull (const char *__n, char **__end_PTR, int __base);
unsigned long long _strtoull_r (struct _reent *, const char *__n, char **__end_PTR, int __base);


void cfree (void *);
void unsetenv (const char *__string);
void _unsetenv_r (struct _reent *, const char *__string);




char * _dtoa_r (struct _reent *, double, int, int, int *, int*, char**);

void * _malloc_r (struct _reent *, size_t);
void * _calloc_r (struct _reent *, size_t, size_t);
void _free_r (struct _reent *, void *);
void * _realloc_r (struct _reent *, void *, size_t);
void _mstats_r (struct _reent *, char *);

int _system_r (struct _reent *, const char *);

void __eprintf (const char *, const char *, unsigned int, const char *);


# 43 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
# 44 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stdarg.h" 1 3 4
# 105 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 45 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
# 62 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 1 3
# 14 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/include/stddef.h" 1 3 4
# 15 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 2 3







void * memchr (const void *, int, size_t);
int memcmp (const void *, const void *, size_t);
void * memcpy (void *, const void *, size_t);
void * memmove (void *, const void *, size_t);
void * memset (void *, int, size_t);
char *strcat (char *, const char *);
char *strchr (const char *, int);
int strcmp (const char *, const char *);
int strcoll (const char *, const char *);
char *strcpy (char *, const char *);
size_t strcspn (const char *, const char *);
char *strerror (int);
size_t strlen (const char *);
char *strncat (char *, const char *, size_t);
int strncmp (const char *, const char *, size_t);
char *strncpy (char *, const char *, size_t);
char *strpbrk (const char *, const char *);
char *strrchr (const char *, int);
size_t strspn (const char *, const char *);
char *strstr (const char *, const char *);


char *strtok (char *, const char *);


size_t strxfrm (char *, const char *, size_t);


char *strtok_r (char *, const char *, char **);

int bcmp (const void *, const void *, size_t);
void bcopy (const void *, void *, size_t);
void bzero (void *, size_t);
int ffs (int);
char *index (const char *, int);
void * memccpy (void *, const void *, int, size_t);
void * mempcpy (void *, const void *, size_t);



char *rindex (const char *, int);
char *stpcpy (char *, const char *);
char *stpncpy (char *, const char *, size_t);
int strcasecmp (const char *, const char *);
char *strcasestr (const char *, const char *);
char *strdup (const char *);
char *_strdup_r (struct _reent *, const char *);
char *strndup (const char *, size_t);
char *_strndup_r (struct _reent *, const char *, size_t);
char *strerror_r (int, char *, size_t);
size_t strlcat (char *, const char *, size_t);
size_t strlcpy (char *, const char *, size_t);
int strncasecmp (const char *, const char *, size_t);
size_t strnlen (const char *, size_t);
char *strsep (char **, const char *);
char *strlwr (char *);
char *strupr (char *);
# 102 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 3
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/sys/string.h" 1 3
# 103 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/string.h" 2 3


# 63 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
# 73 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/ctype.h" 1 3







int isalnum (int __c);
int isalpha (int __c);
int iscntrl (int __c);
int isdigit (int __c);
int isgraph (int __c);
int islower (int __c);
int isprint (int __c);
int ispunct (int __c);
int isspace (int __c);
int isupper (int __c);
int isxdigit (int __c);
int tolower (int __c);
int toupper (int __c);


int isblank (int __c);
int isascii (int __c);
int toascii (int __c);
int _tolower (int __c);
int _toupper (int __c);
# 39 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/ctype.h" 3
extern const char *__ctype_ptr;
extern const char _ctype_[];
# 71 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/ctype.h" 3

# 74 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
# 84 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
typedef enum SDL_bool
{
    SDL_FALSE = 0,
    SDL_TRUE = 1
} SDL_bool;





typedef int8_t Sint8;




typedef uint8_t Uint8;




typedef int16_t Sint16;




typedef uint16_t Uint16;




typedef int32_t Sint32;




typedef uint32_t Uint32;







typedef int64_t Sint64;





typedef uint64_t Uint64;
# 144 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
typedef int SDL_dummy_uint8[(sizeof(Uint8) == 1) * 2 - 1];
typedef int SDL_dummy_sint8[(sizeof(Sint8) == 1) * 2 - 1];
typedef int SDL_dummy_uint16[(sizeof(Uint16) == 2) * 2 - 1];
typedef int SDL_dummy_sint16[(sizeof(Sint16) == 2) * 2 - 1];
typedef int SDL_dummy_uint32[(sizeof(Uint32) == 4) * 2 - 1];
typedef int SDL_dummy_sint32[(sizeof(Sint32) == 4) * 2 - 1];
# 179 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 180 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
# 399 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
extern __attribute__ ((visibility("default"))) void * SDL_revcpy(void *dst, const void *src,
                                         size_t len);
# 437 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
extern __attribute__ ((visibility("default"))) size_t SDL_wcslen(const short * string);





extern __attribute__ ((visibility("default"))) size_t SDL_strlcpy(char *dst, const char *src,
                                           size_t maxlen);





extern __attribute__ ((visibility("default"))) size_t SDL_strlcat(char *dst, const char *src,
                                           size_t maxlen);
# 463 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
extern __attribute__ ((visibility("default"))) char * SDL_strrev(char *string);





extern __attribute__ ((visibility("default"))) char * SDL_strupr(char *string);





extern __attribute__ ((visibility("default"))) char * SDL_strlwr(char *string);
# 510 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
extern __attribute__ ((visibility("default"))) char * SDL_ltoa(long value, char *string, int radix);
# 522 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
extern __attribute__ ((visibility("default"))) char * SDL_ultoa(unsigned long value, char *string,
                                        int radix);
# 536 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
extern __attribute__ ((visibility("default"))) unsigned long SDL_strtoul(const char *string,
                                                  char **endp, int base);







extern __attribute__ ((visibility("default"))) char * SDL_lltoa(Sint64 value, char *string,
                                        int radix);





extern __attribute__ ((visibility("default"))) char * SDL_ulltoa(Uint64 value, char *string,
                                         int radix);





extern __attribute__ ((visibility("default"))) Sint64 SDL_strtoll(const char *string, char **endp,
                                           int base);





extern __attribute__ ((visibility("default"))) Uint64 SDL_strtoull(const char *string, char **endp,
                                            int base);
# 617 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
extern __attribute__ ((visibility("default"))) int SDL_strncasecmp(const char *str1,
                                            const char *str2, size_t maxlen);
# 653 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
typedef struct _SDL_iconv_t *SDL_iconv_t;
extern __attribute__ ((visibility("default"))) SDL_iconv_t SDL_iconv_open(const char *tocode,
                                                   const char *fromcode);
extern __attribute__ ((visibility("default"))) int SDL_iconv_close(SDL_iconv_t cd);

extern __attribute__ ((visibility("default"))) size_t SDL_iconv(SDL_iconv_t cd, const char **inbuf,
                                         size_t * inbytesleft, char **outbuf,
                                         size_t * outbytesleft);



extern __attribute__ ((visibility("default"))) char * SDL_iconv_string(const char *tocode,
                                               const char *fromcode,
                                               const char *inbuf,
                                               size_t inbytesleft);
# 678 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 679 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_stdinc.h" 2
# 27 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_main.h" 2
# 78 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2

# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 1
# 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h" 1
# 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h" 2
# 42 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h"
extern __attribute__ ((visibility("default"))) void SDL_SetError(const char *fmt, ...);
extern __attribute__ ((visibility("default"))) char * SDL_GetError(void);
extern __attribute__ ((visibility("default"))) void SDL_ClearError(void);




typedef enum
{
    SDL_ENOMEM,
    SDL_EFREAD,
    SDL_EFWRITE,
    SDL_EFSEEK,
    SDL_UNSUPPORTED,
    SDL_LASTERROR
} SDL_errorcode;
extern __attribute__ ((visibility("default"))) void SDL_Error(SDL_errorcode code);
# 67 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 68 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_error.h" 2
# 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h" 1
# 51 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 52 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h" 2
# 96 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
static __inline__ Uint16
SDL_Swap16(Uint16 x)
{
    return ((x << 8) | (x >> 8));
}
# 136 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
static __inline__ Uint32
SDL_Swap32(Uint32 x)
{
    return ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) |
            (x >> 24));
}
# 171 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
static __inline__ Uint64
SDL_Swap64(Uint64 x)
{
    Uint32 hi, lo;


    lo = (Uint32) (x & 0xFFFFFFFF);
    x >>= 32;
    hi = (Uint32) (x & 0xFFFFFFFF);
    x = SDL_Swap32(lo);
    x <<= 32;
    x |= SDL_Swap32(hi);
    return (x);
}
# 195 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
static __inline__ float
SDL_SwapFloat(float x)
{
    union
    {
        float f;
        Uint32 ui32;
    } swapper;
    swapper.f = x;
    swapper.ui32 = SDL_Swap32(swapper.ui32);
    return swapper.f;
}
# 236 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 237 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_endian.h" 2
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h" 1
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h" 2
# 57 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h"
struct SDL_mutex;
typedef struct SDL_mutex SDL_mutex;


extern __attribute__ ((visibility("default"))) SDL_mutex * SDL_CreateMutex(void);



extern __attribute__ ((visibility("default"))) int SDL_mutexP(SDL_mutex * mutex);






extern __attribute__ ((visibility("default"))) int SDL_mutexV(SDL_mutex * mutex);


extern __attribute__ ((visibility("default"))) void SDL_DestroyMutex(SDL_mutex * mutex);







struct SDL_semaphore;
typedef struct SDL_semaphore SDL_sem;


extern __attribute__ ((visibility("default"))) SDL_sem * SDL_CreateSemaphore(Uint32 initial_value);


extern __attribute__ ((visibility("default"))) void SDL_DestroySemaphore(SDL_sem * sem);





extern __attribute__ ((visibility("default"))) int SDL_SemWait(SDL_sem * sem);




extern __attribute__ ((visibility("default"))) int SDL_SemTryWait(SDL_sem * sem);







extern __attribute__ ((visibility("default"))) int SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);




extern __attribute__ ((visibility("default"))) int SDL_SemPost(SDL_sem * sem);


extern __attribute__ ((visibility("default"))) Uint32 SDL_SemValue(SDL_sem * sem);







struct SDL_cond;
typedef struct SDL_cond SDL_cond;


extern __attribute__ ((visibility("default"))) SDL_cond * SDL_CreateCond(void);


extern __attribute__ ((visibility("default"))) void SDL_DestroyCond(SDL_cond * cond);




extern __attribute__ ((visibility("default"))) int SDL_CondSignal(SDL_cond * cond);




extern __attribute__ ((visibility("default"))) int SDL_CondBroadcast(SDL_cond * cond);






extern __attribute__ ((visibility("default"))) int SDL_CondWait(SDL_cond * cond, SDL_mutex * mut);







extern __attribute__ ((visibility("default"))) int SDL_CondWaitTimeout(SDL_cond * cond,
                                                SDL_mutex * mutex, Uint32 ms);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 167 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mutex.h" 2
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h" 1
# 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 39 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h" 2
# 47 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h"
struct SDL_Thread;
typedef struct SDL_Thread SDL_Thread;
# 107 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h"
extern __attribute__ ((visibility("default"))) SDL_Thread *
SDL_CreateThread(int ( * fn) (void *), void *data);



extern __attribute__ ((visibility("default"))) Uint32 SDL_ThreadID(void);




extern __attribute__ ((visibility("default"))) Uint32 SDL_GetThreadID(SDL_Thread * thread);





extern __attribute__ ((visibility("default"))) void SDL_WaitThread(SDL_Thread * thread, int *status);


extern __attribute__ ((visibility("default"))) void SDL_KillThread(SDL_Thread * thread);
# 135 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 136 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_thread.h" 2
# 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h" 1
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h" 2
# 46 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
typedef struct SDL_RWops
{




    long ( * seek) (struct SDL_RWops * context, long offset,
                           int whence);





      size_t( * read) (struct SDL_RWops * context, void *ptr,
                              size_t size, size_t maxnum);





      size_t( * write) (struct SDL_RWops * context, const void *ptr,
                               size_t size, size_t num);




    int ( * close) (struct SDL_RWops * context);

    Uint32 type;
    union
    {
# 91 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
        struct
        {
            SDL_bool autoclose;
            FILE *fp;
        } stdio;

        struct
        {
            Uint8 *base;
            Uint8 *here;
            Uint8 *stop;
        } mem;
        struct
        {
            void *data1;
        } unknown;
    } hidden;

} SDL_RWops;




extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_RWFromFile(const char *file,
                                                  const char *mode);


extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_RWFromFP(FILE * fp,
                                                SDL_bool autoclose);


extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_RWFromMem(void *mem, int size);
extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_RWFromConstMem(const void *mem,
                                                      int size);

extern __attribute__ ((visibility("default"))) SDL_RWops * SDL_AllocRW(void);
extern __attribute__ ((visibility("default"))) void SDL_FreeRW(SDL_RWops * area);
# 142 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
extern __attribute__ ((visibility("default"))) Uint16 SDL_ReadLE16(SDL_RWops * src);
extern __attribute__ ((visibility("default"))) Uint16 SDL_ReadBE16(SDL_RWops * src);
extern __attribute__ ((visibility("default"))) Uint32 SDL_ReadLE32(SDL_RWops * src);
extern __attribute__ ((visibility("default"))) Uint32 SDL_ReadBE32(SDL_RWops * src);
extern __attribute__ ((visibility("default"))) Uint64 SDL_ReadLE64(SDL_RWops * src);
extern __attribute__ ((visibility("default"))) Uint64 SDL_ReadBE64(SDL_RWops * src);


extern __attribute__ ((visibility("default"))) int SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
extern __attribute__ ((visibility("default"))) int SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
extern __attribute__ ((visibility("default"))) int SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
extern __attribute__ ((visibility("default"))) int SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
extern __attribute__ ((visibility("default"))) int SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
extern __attribute__ ((visibility("default"))) int SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
# 164 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 165 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rwops.h" 2
# 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2

# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 40 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2







typedef Uint16 SDL_AudioFormat;


typedef struct SDL_AudioSpec
{
    int freq;
    SDL_AudioFormat format;
    Uint8 channels;
    Uint8 silence;
    Uint16 samples;
    Uint16 padding;
    Uint32 size;






    void ( * callback) (void *userdata, Uint8 * stream, int len);
    void *userdata;
} SDL_AudioSpec;
# 134 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
struct SDL_AudioCVT;
typedef void ( * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
                                          SDL_AudioFormat format);

typedef struct SDL_AudioCVT
{
    int needed;
    SDL_AudioFormat src_format;
    SDL_AudioFormat dst_format;
    double rate_incr;
    Uint8 *buf;
    int len;
    int len_cvt;
    int len_mult;
    double len_ratio;
    SDL_AudioFilter filters[10];
    int filter_index;
} SDL_AudioCVT;







extern __attribute__ ((visibility("default"))) int SDL_GetNumAudioDrivers(void);
extern __attribute__ ((visibility("default"))) const char * SDL_GetAudioDriver(int index);





extern __attribute__ ((visibility("default"))) int SDL_AudioInit(const char *driver_name);
extern __attribute__ ((visibility("default"))) void SDL_AudioQuit(void);




extern __attribute__ ((visibility("default"))) const char * SDL_GetCurrentAudioDriver(void);
# 215 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) int SDL_OpenAudio(const SDL_AudioSpec * desired,
                                          SDL_AudioSpec * obtained);
# 226 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
typedef Uint32 SDL_AudioDeviceID;
# 239 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) int SDL_GetNumAudioDevices(int iscapture);
# 254 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) const char * SDL_GetAudioDeviceName(int index,
                                                           int iscapture);
# 268 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) SDL_AudioDeviceID SDL_OpenAudioDevice(const char
                                                              *device,
                                                              int iscapture,
                                                              const
                                                              SDL_AudioSpec *
                                                              desired,
                                                              SDL_AudioSpec *
                                                              obtained);






typedef enum
{
    SDL_AUDIO_STOPPED = 0,
    SDL_AUDIO_PLAYING,
    SDL_AUDIO_PAUSED
} SDL_audiostatus;
extern __attribute__ ((visibility("default"))) SDL_audiostatus SDL_GetAudioStatus(void);

extern __attribute__ ((visibility("default"))) SDL_audiostatus
SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
# 300 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) void SDL_PauseAudio(int pause_on);
extern __attribute__ ((visibility("default"))) void SDL_PauseAudioDevice(SDL_AudioDeviceID dev,
                                                  int pause_on);
# 321 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) SDL_AudioSpec * SDL_LoadWAV_RW(SDL_RWops * src,
                                                      int freesrc,
                                                      SDL_AudioSpec * spec,
                                                      Uint8 ** audio_buf,
                                                      Uint32 * audio_len);
# 334 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) void SDL_FreeWAV(Uint8 * audio_buf);
# 344 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) int SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
                                              SDL_AudioFormat src_format,
                                              Uint8 src_channels,
                                              int src_rate,
                                              SDL_AudioFormat dst_format,
                                              Uint8 dst_channels,
                                              int dst_rate);
# 360 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) int SDL_ConvertAudio(SDL_AudioCVT * cvt);
# 370 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
extern __attribute__ ((visibility("default"))) void SDL_MixAudio(Uint8 * dst, const Uint8 * src,
                                          Uint32 len, int volume);






extern __attribute__ ((visibility("default"))) void SDL_MixAudioFormat(Uint8 * dst,
                                                const Uint8 * src,
                                                SDL_AudioFormat format,
                                                Uint32 len, int volume);







extern __attribute__ ((visibility("default"))) void SDL_LockAudio(void);
extern __attribute__ ((visibility("default"))) void SDL_LockAudioDevice(SDL_AudioDeviceID dev);
extern __attribute__ ((visibility("default"))) void SDL_UnlockAudio(void);
extern __attribute__ ((visibility("default"))) void SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);




extern __attribute__ ((visibility("default"))) void SDL_CloseAudio(void);
extern __attribute__ ((visibility("default"))) void SDL_CloseAudioDevice(SDL_AudioDeviceID dev);




extern __attribute__ ((visibility("default"))) int SDL_AudioDeviceConnected(SDL_AudioDeviceID dev);
# 412 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 413 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_audio.h" 2
# 80 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h" 1
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h" 2
# 56 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
typedef enum
{
    CD_TRAYEMPTY,
    CD_STOPPED,
    CD_PLAYING,
    CD_PAUSED,
    CD_ERROR = -1
} CDstatus;




typedef struct SDL_CDtrack
{
    Uint8 id;
    Uint8 type;
    Uint16 unused;
    Uint32 length;
    Uint32 offset;
} SDL_CDtrack;


typedef struct SDL_CD
{
    int id;
    CDstatus status;


    int numtracks;
    int cur_track;
    int cur_frame;
    SDL_CDtrack track[99 + 1];
} SDL_CD;
# 107 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
extern __attribute__ ((visibility("default"))) int SDL_CDNumDrives(void);







extern __attribute__ ((visibility("default"))) const char * SDL_CDName(int drive);







extern __attribute__ ((visibility("default"))) SDL_CD * SDL_CDOpen(int drive);





extern __attribute__ ((visibility("default"))) CDstatus SDL_CDStatus(SDL_CD * cdrom);
# 150 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
extern __attribute__ ((visibility("default"))) int SDL_CDPlayTracks(SDL_CD * cdrom,
                                             int start_track,
                                             int start_frame, int ntracks,
                                             int nframes);




extern __attribute__ ((visibility("default"))) int SDL_CDPlay(SDL_CD * cdrom, int start, int length);


extern __attribute__ ((visibility("default"))) int SDL_CDPause(SDL_CD * cdrom);


extern __attribute__ ((visibility("default"))) int SDL_CDResume(SDL_CD * cdrom);


extern __attribute__ ((visibility("default"))) int SDL_CDStop(SDL_CD * cdrom);


extern __attribute__ ((visibility("default"))) int SDL_CDEject(SDL_CD * cdrom);


extern __attribute__ ((visibility("default"))) void SDL_CDClose(SDL_CD * cdrom);
# 182 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 183 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cdrom.h" 2
# 81 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h" 1
# 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h" 2
# 44 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h"
extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasRDTSC(void);



extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasMMX(void);



extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasMMXExt(void);



extern __attribute__ ((visibility("default"))) SDL_bool SDL_Has3DNow(void);



extern __attribute__ ((visibility("default"))) SDL_bool SDL_Has3DNowExt(void);



extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasSSE(void);



extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasSSE2(void);



extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasAltiVec(void);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 81 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_cpuinfo.h" 2
# 82 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2


# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 1
# 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 1
# 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h" 1
# 32 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 33 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h" 2
# 44 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
enum
{
    SDL_PIXELTYPE_UNKNOWN,
    SDL_PIXELTYPE_INDEX1,
    SDL_PIXELTYPE_INDEX4,
    SDL_PIXELTYPE_INDEX8,
    SDL_PIXELTYPE_PACKED8,
    SDL_PIXELTYPE_PACKED16,
    SDL_PIXELTYPE_PACKED32,
    SDL_PIXELTYPE_ARRAYU8,
    SDL_PIXELTYPE_ARRAYU16,
    SDL_PIXELTYPE_ARRAYU32,
    SDL_PIXELTYPE_ARRAYF16,
    SDL_PIXELTYPE_ARRAYF32
};

enum
{
    SDL_BITMAPORDER_NONE,
    SDL_BITMAPORDER_4321,
    SDL_BITMAPORDER_1234
};
enum
{
    SDL_PACKEDORDER_NONE,
    SDL_PACKEDORDER_XRGB,
    SDL_PACKEDORDER_RGBX,
    SDL_PACKEDORDER_ARGB,
    SDL_PACKEDORDER_RGBA,
    SDL_PACKEDORDER_XBGR,
    SDL_PACKEDORDER_BGRX,
    SDL_PACKEDORDER_ABGR,
    SDL_PACKEDORDER_BGRA
};
enum
{
    SDL_ARRAYORDER_NONE,
    SDL_ARRAYORDER_RGB,
    SDL_ARRAYORDER_RGBA,
    SDL_ARRAYORDER_ARGB,
    SDL_ARRAYORDER_BGR,
    SDL_ARRAYORDER_BGRA,
    SDL_ARRAYORDER_ABGR
};

enum
{
    SDL_PACKEDLAYOUT_NONE,
    SDL_PACKEDLAYOUT_332,
    SDL_PACKEDLAYOUT_4444,
    SDL_PACKEDLAYOUT_1555,
    SDL_PACKEDLAYOUT_5551,
    SDL_PACKEDLAYOUT_565,
    SDL_PACKEDLAYOUT_8888,
    SDL_PACKEDLAYOUT_2101010,
    SDL_PACKEDLAYOUT_1010102
};
# 123 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
enum
{
    SDL_PIXELFORMAT_UNKNOWN,
    SDL_PIXELFORMAT_INDEX1LSB =
        ((1 << 31) | ((SDL_PIXELTYPE_INDEX1) << 24) | ((SDL_BITMAPORDER_1234) << 20) | ((0) << 16) | ((1) << 8) | ((0) << 0)),

    SDL_PIXELFORMAT_INDEX1MSB =
        ((1 << 31) | ((SDL_PIXELTYPE_INDEX1) << 24) | ((SDL_BITMAPORDER_4321) << 20) | ((0) << 16) | ((1) << 8) | ((0) << 0)),

    SDL_PIXELFORMAT_INDEX4LSB =
        ((1 << 31) | ((SDL_PIXELTYPE_INDEX4) << 24) | ((SDL_BITMAPORDER_1234) << 20) | ((0) << 16) | ((2) << 8) | ((0) << 0)),

    SDL_PIXELFORMAT_INDEX4MSB =
        ((1 << 31) | ((SDL_PIXELTYPE_INDEX4) << 24) | ((SDL_BITMAPORDER_4321) << 20) | ((0) << 16) | ((2) << 8) | ((0) << 0)),

    SDL_PIXELFORMAT_INDEX8 =
        ((1 << 31) | ((SDL_PIXELTYPE_INDEX8) << 24) | ((0) << 20) | ((0) << 16) | ((8) << 8) | ((1) << 0)),
    SDL_PIXELFORMAT_RGB332 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED8) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_332) << 16) | ((8) << 8) | ((1) << 0)),

    SDL_PIXELFORMAT_RGB444 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((12) << 8) | ((2) << 0)),

    SDL_PIXELFORMAT_RGB555 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((15) << 8) | ((2) << 0)),

    SDL_PIXELFORMAT_BGR555 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((15) << 8) | ((2) << 0)),

    SDL_PIXELFORMAT_ARGB4444 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_4444) << 16) | ((16) << 8) | ((2) << 0)),

    SDL_PIXELFORMAT_ARGB1555 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((16) << 8) | ((2) << 0)),

    SDL_PIXELFORMAT_ABGR1555 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_ABGR) << 20) | ((SDL_PACKEDLAYOUT_1555) << 16) | ((16) << 8) | ((2) << 0)),

    SDL_PIXELFORMAT_RGB565 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED16) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_565) << 16) | ((16) << 8) | ((2) << 0)),

    SDL_PIXELFORMAT_RGB24 =
        ((1 << 31) | ((SDL_PIXELTYPE_ARRAYU8) << 24) | ((SDL_ARRAYORDER_RGB) << 20) | ((0) << 16) | ((24) << 8) | ((3) << 0)),

    SDL_PIXELFORMAT_BGR24 =
        ((1 << 31) | ((SDL_PIXELTYPE_ARRAYU8) << 24) | ((SDL_ARRAYORDER_BGR) << 20) | ((0) << 16) | ((24) << 8) | ((3) << 0)),

    SDL_PIXELFORMAT_RGB888 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_XRGB) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((24) << 8) | ((4) << 0)),

    SDL_PIXELFORMAT_BGR888 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_XBGR) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((24) << 8) | ((4) << 0)),

    SDL_PIXELFORMAT_ARGB8888 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),

    SDL_PIXELFORMAT_RGBA8888 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_RGBA) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),

    SDL_PIXELFORMAT_ABGR8888 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ABGR) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),

    SDL_PIXELFORMAT_BGRA8888 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_BGRA) << 20) | ((SDL_PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)),

    SDL_PIXELFORMAT_ARGB2101010 =
        ((1 << 31) | ((SDL_PIXELTYPE_PACKED32) << 24) | ((SDL_PACKEDORDER_ARGB) << 20) | ((SDL_PACKEDLAYOUT_2101010) << 16) | ((32) << 8) | ((4) << 0)),


    SDL_PIXELFORMAT_YV12 =
        (('Y') | (('V') << 8) | (('1') << 16) | (('2') << 24)),
    SDL_PIXELFORMAT_IYUV =
        (('I') | (('Y') << 8) | (('U') << 16) | (('V') << 24)),
    SDL_PIXELFORMAT_YUY2 =
        (('Y') | (('U') << 8) | (('Y') << 16) | (('2') << 24)),
    SDL_PIXELFORMAT_UYVY =
        (('U') | (('Y') << 8) | (('V') << 16) | (('Y') << 24)),
    SDL_PIXELFORMAT_YVYU =
        (('Y') | (('V') << 8) | (('Y') << 16) | (('U') << 24))
};

typedef struct SDL_Color
{
    Uint8 r;
    Uint8 g;
    Uint8 b;
    Uint8 unused;
} SDL_Color;


typedef struct SDL_Palette SDL_Palette;
typedef int (*SDL_PaletteChangedFunc) (void *userdata, SDL_Palette * palette);

typedef struct SDL_PaletteWatch
{
    SDL_PaletteChangedFunc callback;
    void *userdata;
    struct SDL_PaletteWatch *next;
} SDL_PaletteWatch;

struct SDL_Palette
{
    int ncolors;
    SDL_Color *colors;

    int refcount;
    SDL_PaletteWatch *watch;
};


typedef struct SDL_PixelFormat
{
    SDL_Palette *palette;
    Uint8 BitsPerPixel;
    Uint8 BytesPerPixel;
    Uint8 Rloss;
    Uint8 Gloss;
    Uint8 Bloss;
    Uint8 Aloss;
    Uint8 Rshift;
    Uint8 Gshift;
    Uint8 Bshift;
    Uint8 Ashift;
    Uint32 Rmask;
    Uint32 Gmask;
    Uint32 Bmask;
    Uint32 Amask;
} SDL_PixelFormat;
# 261 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format,
                                                            int *bpp,
                                                            Uint32 * Rmask,
                                                            Uint32 * Gmask,
                                                            Uint32 * Bmask,
                                                            Uint32 * Amask);
# 277 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) Uint32 SDL_MasksToPixelFormatEnum(int bpp,
                                                          Uint32 Rmask,
                                                          Uint32 Gmask,
                                                          Uint32 Bmask,
                                                          Uint32 Amask);
# 294 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) SDL_Palette * SDL_AllocPalette(int ncolors);
# 303 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) int SDL_AddPaletteWatch(SDL_Palette * palette,
                                                SDL_PaletteChangedFunc
                                                callback, void *userdata);
# 314 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) void SDL_DelPaletteWatch(SDL_Palette * palette,
                                                 SDL_PaletteChangedFunc
                                                 callback, void *userdata);
# 330 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) int SDL_SetPaletteColors(SDL_Palette * palette,
                                                 const SDL_Color * colors,
                                                 int firstcolor, int ncolors);
# 341 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) void SDL_FreePalette(SDL_Palette * palette);
# 351 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) Uint32 SDL_MapRGB(const SDL_PixelFormat * format,
                                          Uint8 r, Uint8 g, Uint8 b);
# 362 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) Uint32 SDL_MapRGBA(const SDL_PixelFormat * format,
                                           Uint8 r, Uint8 g, Uint8 b,
                                           Uint8 a);
# 374 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) void SDL_GetRGB(Uint32 pixel,
                                        const SDL_PixelFormat * format,
                                        Uint8 * r, Uint8 * g, Uint8 * b);
# 386 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h"
extern __attribute__ ((visibility("default"))) void SDL_GetRGBA(Uint32 pixel,
                                         const SDL_PixelFormat * format,
                                         Uint8 * r, Uint8 * g, Uint8 * b,
                                         Uint8 * a);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 398 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_pixels.h" 2
# 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h" 1
# 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h" 2
# 56 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h"
typedef struct SDL_Rect
{
    int x, y;
    int w, h;
} SDL_Rect;
# 84 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h"
extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasIntersection(const SDL_Rect * A,
                                                     const SDL_Rect * B);
# 94 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h"
extern __attribute__ ((visibility("default"))) SDL_bool SDL_IntersectRect(const SDL_Rect * A,
                                                   const SDL_Rect * B,
                                                   SDL_Rect * result);






extern __attribute__ ((visibility("default"))) void SDL_UnionRect(const SDL_Rect * A,
                                           const SDL_Rect * B,
                                           SDL_Rect * result);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 114 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_rect.h" 2
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h" 1
# 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h" 2
# 61 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
typedef struct SDL_Surface
{
    Uint32 flags;
    SDL_PixelFormat *format;
    int w, h;
    int pitch;
    void *pixels;


    void *userdata;


    int locked;
    void *lock_data;


    SDL_Rect clip_rect;


    struct SDL_BlitMap *map;


    unsigned int format_version;


    int refcount;
} SDL_Surface;






typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
                         struct SDL_Surface * dst, SDL_Rect * dstrect);
# 108 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_CreateRGBSurface
    (Uint32 flags, int width, int height, int depth,
     Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_CreateRGBSurfaceFrom(void *pixels,
                                                              int width,
                                                              int height,
                                                              int depth,
                                                              int pitch,
                                                              Uint32 Rmask,
                                                              Uint32 Gmask,
                                                              Uint32 Bmask,
                                                              Uint32 Amask);
extern __attribute__ ((visibility("default"))) void SDL_FreeSurface(SDL_Surface * surface);
# 131 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SetSurfacePalette(SDL_Surface * surface,
                                                  SDL_Palette * palette);
# 150 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_LockSurface(SDL_Surface * surface);
extern __attribute__ ((visibility("default"))) void SDL_UnlockSurface(SDL_Surface * surface);







extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_LoadBMP_RW(SDL_RWops * src,
                                                    int freesrc);
# 170 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SaveBMP_RW
    (SDL_Surface * surface, SDL_RWops * dst, int freedst);
# 187 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceRLE(SDL_Surface * surface,
                                              int flag);
# 201 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SetColorKey(SDL_Surface * surface,
                                            Uint32 flag, Uint32 key);
# 218 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceColorMod(SDL_Surface * surface,
                                                   Uint8 r, Uint8 g, Uint8 b);
# 236 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_GetSurfaceColorMod(SDL_Surface * surface,
                                                   Uint8 * r, Uint8 * g,
                                                   Uint8 * b);
# 252 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
                                                   Uint8 alpha);
# 267 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
                                                   Uint8 * alpha);
# 282 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceBlendMode(SDL_Surface * surface,
                                                    int blendMode);
# 297 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_GetSurfaceBlendMode(SDL_Surface * surface,
                                                    int *blendMode);
# 314 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SetSurfaceScaleMode(SDL_Surface * surface,
                                                    int scaleMode);
# 329 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_GetSurfaceScaleMode(SDL_Surface * surface,
                                                    int *scaleMode);
# 344 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) SDL_bool SDL_SetClipRect(SDL_Surface * surface,
                                                 const SDL_Rect * rect);






extern __attribute__ ((visibility("default"))) void SDL_GetClipRect(SDL_Surface * surface,
                                             SDL_Rect * rect);
# 367 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_ConvertSurface
    (SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
# 379 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_FillRect
    (SDL_Surface * dst, SDL_Rect * dstrect, Uint32 color);
# 456 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_UpperBlit
    (SDL_Surface * src, SDL_Rect * srcrect,
     SDL_Surface * dst, SDL_Rect * dstrect);



extern __attribute__ ((visibility("default"))) int SDL_LowerBlit
    (SDL_Surface * src, SDL_Rect * srcrect,
     SDL_Surface * dst, SDL_Rect * dstrect);
# 473 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h"
extern __attribute__ ((visibility("default"))) int SDL_SoftStretch(SDL_Surface * src,
                                            SDL_Rect * srcrect,
                                            SDL_Surface * dst,
                                            SDL_Rect * dstrect);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 485 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_surface.h" 2
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2

# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
# 57 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
typedef struct
{
    Uint32 format;
    int w;
    int h;
    int refresh_rate;
    void *driverdata;
} SDL_DisplayMode;
# 94 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
typedef Uint32 SDL_WindowID;
# 103 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
typedef enum
{
    SDL_WINDOW_FULLSCREEN = 0x00000001,
    SDL_WINDOW_OPENGL = 0x00000002,
    SDL_WINDOW_SHOWN = 0x00000004,
    SDL_WINDOW_BORDERLESS = 0x00000008,
    SDL_WINDOW_RESIZABLE = 0x00000010,
    SDL_WINDOW_MINIMIZED = 0x00000020,
    SDL_WINDOW_MAXIMIZED = 0x00000040,
    SDL_WINDOW_INPUT_GRABBED = 0x00000100,
    SDL_WINDOW_INPUT_FOCUS = 0x00000200,
    SDL_WINDOW_MOUSE_FOCUS = 0x00000400
} SDL_WindowFlags;
# 133 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
typedef enum
{
    SDL_WINDOWEVENT_NONE,
    SDL_WINDOWEVENT_SHOWN,
    SDL_WINDOWEVENT_HIDDEN,
    SDL_WINDOWEVENT_EXPOSED,
    SDL_WINDOWEVENT_MOVED,
    SDL_WINDOWEVENT_RESIZED,
    SDL_WINDOWEVENT_MINIMIZED,
    SDL_WINDOWEVENT_MAXIMIZED,
    SDL_WINDOWEVENT_RESTORED,
    SDL_WINDOWEVENT_ENTER,
    SDL_WINDOWEVENT_LEAVE,
    SDL_WINDOWEVENT_FOCUS_GAINED,
    SDL_WINDOWEVENT_FOCUS_LOST,
    SDL_WINDOWEVENT_CLOSE
} SDL_WindowEventID;






typedef enum
{
    SDL_RENDERER_SINGLEBUFFER = 0x00000001,
    SDL_RENDERER_PRESENTCOPY = 0x00000002,
    SDL_RENDERER_PRESENTFLIP2 = 0x00000004,
    SDL_RENDERER_PRESENTFLIP3 = 0x00000008,
    SDL_RENDERER_PRESENTDISCARD = 0x00000010,
    SDL_RENDERER_PRESENTVSYNC = 0x00000020,
    SDL_RENDERER_ACCELERATED = 0x00000040
} SDL_RendererFlags;






typedef struct SDL_RendererInfo
{
    const char *name;
    Uint32 flags;
    Uint32 mod_modes;
    Uint32 blend_modes;
    Uint32 scale_modes;
    Uint32 num_texture_formats;
    Uint32 texture_formats[20];
    int max_texture_width;
    int max_texture_height;
} SDL_RendererInfo;






typedef enum
{
    SDL_TEXTUREACCESS_STATIC,
    SDL_TEXTUREACCESS_STREAMING
} SDL_TextureAccess;






typedef enum
{
    SDL_TEXTUREMODULATE_NONE = 0x00000000,
    SDL_TEXTUREMODULATE_COLOR = 0x00000001,
    SDL_TEXTUREMODULATE_ALPHA = 0x00000002
} SDL_TextureModulate;






typedef enum
{
    SDL_TEXTUREBLENDMODE_NONE = 0x00000000,
    SDL_TEXTUREBLENDMODE_MASK = 0x00000001,
    SDL_TEXTUREBLENDMODE_BLEND = 0x00000002,
    SDL_TEXTUREBLENDMODE_ADD = 0x00000004,
    SDL_TEXTUREBLENDMODE_MOD = 0x00000008
} SDL_TextureBlendMode;






typedef enum
{
    SDL_TEXTURESCALEMODE_NONE = 0x00000000,
    SDL_TEXTURESCALEMODE_FAST = 0x00000001,
    SDL_TEXTURESCALEMODE_SLOW = 0x00000002,
    SDL_TEXTURESCALEMODE_BEST = 0x00000004
} SDL_TextureScaleMode;






typedef Uint32 SDL_TextureID;






typedef void *SDL_GLContext;






typedef enum
{
    SDL_GL_RED_SIZE,
    SDL_GL_GREEN_SIZE,
    SDL_GL_BLUE_SIZE,
    SDL_GL_ALPHA_SIZE,
    SDL_GL_BUFFER_SIZE,
    SDL_GL_DOUBLEBUFFER,
    SDL_GL_DEPTH_SIZE,
    SDL_GL_STENCIL_SIZE,
    SDL_GL_ACCUM_RED_SIZE,
    SDL_GL_ACCUM_GREEN_SIZE,
    SDL_GL_ACCUM_BLUE_SIZE,
    SDL_GL_ACCUM_ALPHA_SIZE,
    SDL_GL_STEREO,
    SDL_GL_MULTISAMPLEBUFFERS,
    SDL_GL_MULTISAMPLESAMPLES,
    SDL_GL_ACCELERATED_VISUAL
} SDL_GLattr;
# 284 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetNumVideoDrivers(void);
# 296 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) const char * SDL_GetVideoDriver(int index);
# 314 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_VideoInit(const char *driver_name,
                                          Uint32 flags);
# 326 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_VideoQuit(void);
# 339 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) const char * SDL_GetCurrentVideoDriver(void);
# 348 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetNumVideoDisplays(void);
# 360 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SelectVideoDisplay(int index);
# 372 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetCurrentVideoDisplay(void);
# 381 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetNumDisplayModes(void);
# 396 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetDisplayMode(int index,
                                               SDL_DisplayMode * mode);






extern __attribute__ ((visibility("default"))) int SDL_GetDesktopDisplayMode(SDL_DisplayMode * mode);






extern __attribute__ ((visibility("default"))) int SDL_GetCurrentDisplayMode(SDL_DisplayMode * mode);
# 428 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) SDL_DisplayMode * SDL_GetClosestDisplayMode(const
                                                                   SDL_DisplayMode
                                                                   * mode,
                                                                   SDL_DisplayMode
                                                                   * closest);
# 446 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetFullscreenDisplayMode(const SDL_DisplayMode
                                                         * mode);







extern __attribute__ ((visibility("default"))) int SDL_GetFullscreenDisplayMode(SDL_DisplayMode *
                                                         mode);
# 465 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetDisplayPalette(const SDL_Color * colors,
                                                  int firstcolor,
                                                  int ncolors);
# 476 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetDisplayPalette(SDL_Color * colors,
                                                  int firstcolor,
                                                  int ncolors);
# 489 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetGamma(float red, float green, float blue);
# 510 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetGammaRamp(const Uint16 * red,
                                             const Uint16 * green,
                                             const Uint16 * blue);
# 527 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
                                             Uint16 * blue);
# 547 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) SDL_WindowID SDL_CreateWindow(const char *title,
                                                      int x, int y, int w,
                                                      int h, Uint32 flags);
# 564 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) SDL_WindowID SDL_CreateWindowFrom(const void *data);






extern __attribute__ ((visibility("default"))) Uint32 SDL_GetWindowFlags(SDL_WindowID windowID);
# 580 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_SetWindowTitle(SDL_WindowID windowID,
                                                const char *title);
# 590 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) const char * SDL_GetWindowTitle(SDL_WindowID windowID);
# 601 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_SetWindowIcon(SDL_Surface * icon);
# 610 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_SetWindowData(SDL_WindowID windowID,
                                               void *userdata);
# 620 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void * SDL_GetWindowData(SDL_WindowID windowID);
# 635 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_SetWindowPosition(SDL_WindowID windowID,
                                                   int x, int y);
# 645 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_GetWindowPosition(SDL_WindowID windowID,
                                                   int *x, int *y);
# 658 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_SetWindowSize(SDL_WindowID windowID, int w,
                                               int h);
# 668 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_GetWindowSize(SDL_WindowID windowID, int *w,
                                               int *h);
# 678 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_ShowWindow(SDL_WindowID windowID);
# 687 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_HideWindow(SDL_WindowID windowID);






extern __attribute__ ((visibility("default"))) void SDL_RaiseWindow(SDL_WindowID windowID);
# 703 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_MaximizeWindow(SDL_WindowID windowID);
# 712 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_MinimizeWindow(SDL_WindowID windowID);
# 722 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_RestoreWindow(SDL_WindowID windowID);
# 733 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetWindowFullscreen(SDL_WindowID windowID,
                                                    int fullscreen);
# 745 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_SetWindowGrab(SDL_WindowID windowID,
                                               int mode);
# 757 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetWindowGrab(SDL_WindowID windowID);
# 766 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
struct SDL_SysWMinfo;
extern __attribute__ ((visibility("default"))) SDL_bool SDL_GetWindowWMInfo(SDL_WindowID windowID,
                                                     struct SDL_SysWMinfo
                                                     *info);






extern __attribute__ ((visibility("default"))) void SDL_DestroyWindow(SDL_WindowID windowID);
# 790 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetNumRenderDrivers(void);
# 804 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetRenderDriverInfo(int index,
                                                    SDL_RendererInfo * info);
# 823 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_CreateRenderer(SDL_WindowID windowID,
                                               int index, Uint32 flags);
# 834 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SelectRenderer(SDL_WindowID windowID);






extern __attribute__ ((visibility("default"))) int SDL_GetRendererInfo(SDL_RendererInfo * info);
# 858 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) SDL_TextureID SDL_CreateTexture(Uint32 format,
                                                        int access, int w,
                                                        int h);
# 877 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) SDL_TextureID SDL_CreateTextureFromSurface(Uint32
                                                                   format,
                                                                   SDL_Surface
                                                                   * surface);
# 895 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_QueryTexture(SDL_TextureID textureID,
                                             Uint32 * format, int *access,
                                             int *w, int *h);
# 910 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_QueryTexturePixels(SDL_TextureID textureID,
                                                   void **pixels, int *pitch);
# 925 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetTexturePalette(SDL_TextureID textureID,
                                                  const SDL_Color * colors,
                                                  int firstcolor,
                                                  int ncolors);
# 942 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetTexturePalette(SDL_TextureID textureID,
                                                  SDL_Color * colors,
                                                  int firstcolor,
                                                  int ncolors);
# 961 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetTextureColorMod(SDL_TextureID textureID,
                                                   Uint8 r, Uint8 g, Uint8 b);
# 979 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetTextureColorMod(SDL_TextureID textureID,
                                                   Uint8 * r, Uint8 * g,
                                                   Uint8 * b);
# 995 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetTextureAlphaMod(SDL_TextureID textureID,
                                                   Uint8 alpha);
# 1010 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetTextureAlphaMod(SDL_TextureID textureID,
                                                   Uint8 * alpha);
# 1027 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetTextureBlendMode(SDL_TextureID textureID,
                                                    int blendMode);
# 1042 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetTextureBlendMode(SDL_TextureID textureID,
                                                    int *blendMode);
# 1059 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_SetTextureScaleMode(SDL_TextureID textureID,
                                                    int scaleMode);
# 1074 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GetTextureScaleMode(SDL_TextureID textureID,
                                                    int *scaleMode);
# 1091 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_UpdateTexture(SDL_TextureID textureID,
                                              const SDL_Rect * rect,
                                              const void *pixels, int pitch);
# 1111 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_LockTexture(SDL_TextureID textureID,
                                            const SDL_Rect * rect,
                                            int markDirty, void **pixels,
                                            int *pitch);
# 1124 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_UnlockTexture(SDL_TextureID textureID);
# 1138 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_DirtyTexture(SDL_TextureID textureID,
                                              int numrects,
                                              const SDL_Rect * rects);
# 1155 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_RenderFill(Uint8 r, Uint8 g, Uint8 b, Uint8 a,
                                           const SDL_Rect * rect);
# 1169 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_RenderCopy(SDL_TextureID textureID,
                                           const SDL_Rect * srcrect,
                                           const SDL_Rect * dstrect);
# 1186 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_RenderReadPixels(const SDL_Rect * rect,
                                                 void *pixels, int pitch);
# 1202 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_RenderWritePixels(const SDL_Rect * rect,
                                                  const void *pixels,
                                                  int pitch);






extern __attribute__ ((visibility("default"))) void SDL_RenderPresent(void);
# 1221 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_DestroyTexture(SDL_TextureID textureID);
# 1231 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_DestroyRenderer(SDL_WindowID windowID);
# 1256 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GL_LoadLibrary(const char *path);






extern __attribute__ ((visibility("default"))) void * SDL_GL_GetProcAddress(const char *proc);






extern __attribute__ ((visibility("default"))) SDL_bool SDL_GL_ExtensionSupported(const char
                                                           *extension);






extern __attribute__ ((visibility("default"))) int SDL_GL_SetAttribute(SDL_GLattr attr, int value);






extern __attribute__ ((visibility("default"))) int SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
# 1294 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) SDL_GLContext SDL_GL_CreateContext(SDL_WindowID
                                                           windowID);
# 1304 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GL_MakeCurrent(SDL_WindowID windowID,
                                               SDL_GLContext context);
# 1318 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GL_SetSwapInterval(int interval);
# 1329 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) int SDL_GL_GetSwapInterval(void);






extern __attribute__ ((visibility("default"))) void SDL_GL_SwapWindow(SDL_WindowID windowID);
# 1345 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
extern __attribute__ ((visibility("default"))) void SDL_GL_DeleteContext(SDL_GLContext context);
# 1354 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 1355 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_video.h" 2
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h" 1
# 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keysym.h" 1
# 31 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keysym.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_scancode.h" 1
# 44 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_scancode.h"
typedef enum
{
    SDL_SCANCODE_UNKNOWN = 0,



    SDL_SCANCODE_A = 4,
    SDL_SCANCODE_B = 5,
    SDL_SCANCODE_C = 6,
    SDL_SCANCODE_D = 7,
    SDL_SCANCODE_E = 8,
    SDL_SCANCODE_F = 9,
    SDL_SCANCODE_G = 10,
    SDL_SCANCODE_H = 11,
    SDL_SCANCODE_I = 12,
    SDL_SCANCODE_J = 13,
    SDL_SCANCODE_K = 14,
    SDL_SCANCODE_L = 15,
    SDL_SCANCODE_M = 16,
    SDL_SCANCODE_N = 17,
    SDL_SCANCODE_O = 18,
    SDL_SCANCODE_P = 19,
    SDL_SCANCODE_Q = 20,
    SDL_SCANCODE_R = 21,
    SDL_SCANCODE_S = 22,
    SDL_SCANCODE_T = 23,
    SDL_SCANCODE_U = 24,
    SDL_SCANCODE_V = 25,
    SDL_SCANCODE_W = 26,
    SDL_SCANCODE_X = 27,
    SDL_SCANCODE_Y = 28,
    SDL_SCANCODE_Z = 29,

    SDL_SCANCODE_1 = 30,
    SDL_SCANCODE_2 = 31,
    SDL_SCANCODE_3 = 32,
    SDL_SCANCODE_4 = 33,
    SDL_SCANCODE_5 = 34,
    SDL_SCANCODE_6 = 35,
    SDL_SCANCODE_7 = 36,
    SDL_SCANCODE_8 = 37,
    SDL_SCANCODE_9 = 38,
    SDL_SCANCODE_0 = 39,

    SDL_SCANCODE_RETURN = 40,
    SDL_SCANCODE_ESCAPE = 41,
    SDL_SCANCODE_BACKSPACE = 42,
    SDL_SCANCODE_TAB = 43,
    SDL_SCANCODE_SPACE = 44,

    SDL_SCANCODE_MINUS = 45,
    SDL_SCANCODE_EQUALS = 46,
    SDL_SCANCODE_LEFTBRACKET = 47,
    SDL_SCANCODE_RIGHTBRACKET = 48,
    SDL_SCANCODE_BACKSLASH = 49,
    SDL_SCANCODE_NONUSHASH = 50,
    SDL_SCANCODE_SEMICOLON = 51,
    SDL_SCANCODE_APOSTROPHE = 52,
    SDL_SCANCODE_GRAVE = 53,
    SDL_SCANCODE_COMMA = 54,
    SDL_SCANCODE_PERIOD = 55,
    SDL_SCANCODE_SLASH = 56,

    SDL_SCANCODE_CAPSLOCK = 57,

    SDL_SCANCODE_F1 = 58,
    SDL_SCANCODE_F2 = 59,
    SDL_SCANCODE_F3 = 60,
    SDL_SCANCODE_F4 = 61,
    SDL_SCANCODE_F5 = 62,
    SDL_SCANCODE_F6 = 63,
    SDL_SCANCODE_F7 = 64,
    SDL_SCANCODE_F8 = 65,
    SDL_SCANCODE_F9 = 66,
    SDL_SCANCODE_F10 = 67,
    SDL_SCANCODE_F11 = 68,
    SDL_SCANCODE_F12 = 69,

    SDL_SCANCODE_PRINTSCREEN = 70,
    SDL_SCANCODE_SCROLLLOCK = 71,
    SDL_SCANCODE_PAUSE = 72,
    SDL_SCANCODE_INSERT = 73,
    SDL_SCANCODE_HOME = 74,
    SDL_SCANCODE_PAGEUP = 75,
    SDL_SCANCODE_DELETE = 76,
    SDL_SCANCODE_END = 77,
    SDL_SCANCODE_PAGEDOWN = 78,
    SDL_SCANCODE_RIGHT = 79,
    SDL_SCANCODE_LEFT = 80,
    SDL_SCANCODE_DOWN = 81,
    SDL_SCANCODE_UP = 82,

    SDL_SCANCODE_NUMLOCKCLEAR = 83,
    SDL_SCANCODE_KP_DIVIDE = 84,
    SDL_SCANCODE_KP_MULTIPLY = 85,
    SDL_SCANCODE_KP_MINUS = 86,
    SDL_SCANCODE_KP_PLUS = 87,
    SDL_SCANCODE_KP_ENTER = 88,
    SDL_SCANCODE_KP_1 = 89,
    SDL_SCANCODE_KP_2 = 90,
    SDL_SCANCODE_KP_3 = 91,
    SDL_SCANCODE_KP_4 = 92,
    SDL_SCANCODE_KP_5 = 93,
    SDL_SCANCODE_KP_6 = 94,
    SDL_SCANCODE_KP_7 = 95,
    SDL_SCANCODE_KP_8 = 96,
    SDL_SCANCODE_KP_9 = 97,
    SDL_SCANCODE_KP_0 = 98,
    SDL_SCANCODE_KP_PERIOD = 99,

    SDL_SCANCODE_NONUSBACKSLASH = 100,
    SDL_SCANCODE_APPLICATION = 101,
    SDL_SCANCODE_POWER = 102,
    SDL_SCANCODE_KP_EQUALS = 103,
    SDL_SCANCODE_F13 = 104,
    SDL_SCANCODE_F14 = 105,
    SDL_SCANCODE_F15 = 106,
    SDL_SCANCODE_F16 = 107,
    SDL_SCANCODE_F17 = 108,
    SDL_SCANCODE_F18 = 109,
    SDL_SCANCODE_F19 = 110,
    SDL_SCANCODE_F20 = 111,
    SDL_SCANCODE_F21 = 112,
    SDL_SCANCODE_F22 = 113,
    SDL_SCANCODE_F23 = 114,
    SDL_SCANCODE_F24 = 115,
    SDL_SCANCODE_EXECUTE = 116,
    SDL_SCANCODE_HELP = 117,
    SDL_SCANCODE_MENU = 118,
    SDL_SCANCODE_SELECT = 119,
    SDL_SCANCODE_STOP = 120,
    SDL_SCANCODE_AGAIN = 121,
    SDL_SCANCODE_UNDO = 122,
    SDL_SCANCODE_CUT = 123,
    SDL_SCANCODE_COPY = 124,
    SDL_SCANCODE_PASTE = 125,
    SDL_SCANCODE_FIND = 126,
    SDL_SCANCODE_MUTE = 127,
    SDL_SCANCODE_VOLUMEUP = 128,
    SDL_SCANCODE_VOLUMEDOWN = 129,




    SDL_SCANCODE_KP_COMMA = 133,
    SDL_SCANCODE_KP_EQUALSAS400 = 134,

    SDL_SCANCODE_INTERNATIONAL1 = 135,
    SDL_SCANCODE_INTERNATIONAL2 = 136,
    SDL_SCANCODE_INTERNATIONAL3 = 137,
    SDL_SCANCODE_INTERNATIONAL4 = 138,
    SDL_SCANCODE_INTERNATIONAL5 = 139,
    SDL_SCANCODE_INTERNATIONAL6 = 140,
    SDL_SCANCODE_INTERNATIONAL7 = 141,
    SDL_SCANCODE_INTERNATIONAL8 = 142,
    SDL_SCANCODE_INTERNATIONAL9 = 143,
    SDL_SCANCODE_LANG1 = 144,
    SDL_SCANCODE_LANG2 = 145,
    SDL_SCANCODE_LANG3 = 146,
    SDL_SCANCODE_LANG4 = 147,
    SDL_SCANCODE_LANG5 = 148,
    SDL_SCANCODE_LANG6 = 149,
    SDL_SCANCODE_LANG7 = 150,
    SDL_SCANCODE_LANG8 = 151,
    SDL_SCANCODE_LANG9 = 152,

    SDL_SCANCODE_ALTERASE = 153,
    SDL_SCANCODE_SYSREQ = 154,
    SDL_SCANCODE_CANCEL = 155,
    SDL_SCANCODE_CLEAR = 156,
    SDL_SCANCODE_PRIOR = 157,
    SDL_SCANCODE_RETURN2 = 158,
    SDL_SCANCODE_SEPARATOR = 159,
    SDL_SCANCODE_OUT = 160,
    SDL_SCANCODE_OPER = 161,
    SDL_SCANCODE_CLEARAGAIN = 162,
    SDL_SCANCODE_CRSEL = 163,
    SDL_SCANCODE_EXSEL = 164,

    SDL_SCANCODE_KP_00 = 176,
    SDL_SCANCODE_KP_000 = 177,
    SDL_SCANCODE_THOUSANDSSEPARATOR = 178,
    SDL_SCANCODE_DECIMALSEPARATOR = 179,
    SDL_SCANCODE_CURRENCYUNIT = 180,
    SDL_SCANCODE_CURRENCYSUBUNIT = 181,
    SDL_SCANCODE_KP_LEFTPAREN = 182,
    SDL_SCANCODE_KP_RIGHTPAREN = 183,
    SDL_SCANCODE_KP_LEFTBRACE = 184,
    SDL_SCANCODE_KP_RIGHTBRACE = 185,
    SDL_SCANCODE_KP_TAB = 186,
    SDL_SCANCODE_KP_BACKSPACE = 187,
    SDL_SCANCODE_KP_A = 188,
    SDL_SCANCODE_KP_B = 189,
    SDL_SCANCODE_KP_C = 190,
    SDL_SCANCODE_KP_D = 191,
    SDL_SCANCODE_KP_E = 192,
    SDL_SCANCODE_KP_F = 193,
    SDL_SCANCODE_KP_XOR = 194,
    SDL_SCANCODE_KP_POWER = 195,
    SDL_SCANCODE_KP_PERCENT = 196,
    SDL_SCANCODE_KP_LESS = 197,
    SDL_SCANCODE_KP_GREATER = 198,
    SDL_SCANCODE_KP_AMPERSAND = 199,
    SDL_SCANCODE_KP_DBLAMPERSAND = 200,
    SDL_SCANCODE_KP_VERTICALBAR = 201,
    SDL_SCANCODE_KP_DBLVERTICALBAR = 202,
    SDL_SCANCODE_KP_COLON = 203,
    SDL_SCANCODE_KP_HASH = 204,
    SDL_SCANCODE_KP_SPACE = 205,
    SDL_SCANCODE_KP_AT = 206,
    SDL_SCANCODE_KP_EXCLAM = 207,
    SDL_SCANCODE_KP_MEMSTORE = 208,
    SDL_SCANCODE_KP_MEMRECALL = 209,
    SDL_SCANCODE_KP_MEMCLEAR = 210,
    SDL_SCANCODE_KP_MEMADD = 211,
    SDL_SCANCODE_KP_MEMSUBTRACT = 212,
    SDL_SCANCODE_KP_MEMMULTIPLY = 213,
    SDL_SCANCODE_KP_MEMDIVIDE = 214,
    SDL_SCANCODE_KP_PLUSMINUS = 215,
    SDL_SCANCODE_KP_CLEAR = 216,
    SDL_SCANCODE_KP_CLEARENTRY = 217,
    SDL_SCANCODE_KP_BINARY = 218,
    SDL_SCANCODE_KP_OCTAL = 219,
    SDL_SCANCODE_KP_DECIMAL = 220,
    SDL_SCANCODE_KP_HEXADECIMAL = 221,

    SDL_SCANCODE_LCTRL = 224,
    SDL_SCANCODE_LSHIFT = 225,
    SDL_SCANCODE_LALT = 226,
    SDL_SCANCODE_LGUI = 227,
    SDL_SCANCODE_RCTRL = 228,
    SDL_SCANCODE_RSHIFT = 229,
    SDL_SCANCODE_RALT = 230,
    SDL_SCANCODE_RGUI = 231,

    SDL_SCANCODE_MODE = 257,



    SDL_SCANCODE_AUDIONEXT = 258,
    SDL_SCANCODE_AUDIOPREV = 259,
    SDL_SCANCODE_AUDIOSTOP = 260,
    SDL_SCANCODE_AUDIOPLAY = 261,
    SDL_SCANCODE_AUDIOMUTE = 262,
    SDL_SCANCODE_MEDIASELECT = 263,
    SDL_SCANCODE_WWW = 264,
    SDL_SCANCODE_MAIL = 265,
    SDL_SCANCODE_CALCULATOR = 266,
    SDL_SCANCODE_COMPUTER = 267,
    SDL_SCANCODE_AC_SEARCH = 268,
    SDL_SCANCODE_AC_HOME = 269,
    SDL_SCANCODE_AC_BACK = 270,
    SDL_SCANCODE_AC_FORWARD = 271,
    SDL_SCANCODE_AC_STOP = 272,
    SDL_SCANCODE_AC_REFRESH = 273,
    SDL_SCANCODE_AC_BOOKMARKS = 274,



    SDL_SCANCODE_BRIGHTNESSDOWN = 275,
    SDL_SCANCODE_BRIGHTNESSUP = 276,
    SDL_SCANCODE_DISPLAYSWITCH = 277,
    SDL_SCANCODE_KBDILLUMTOGGLE = 278,
    SDL_SCANCODE_KBDILLUMDOWN = 279,
    SDL_SCANCODE_KBDILLUMUP = 280,
    SDL_SCANCODE_EJECT = 281,
    SDL_SCANCODE_SLEEP = 282,



    SDL_NUM_SCANCODES = 512
} SDL_scancode;
# 32 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keysym.h" 2
# 43 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keysym.h"
typedef Sint32 SDLKey;




enum
{
    SDLK_UNKNOWN = 0,

    SDLK_RETURN = (SDL_SCANCODE_RETURN | (1<<30)),
    SDLK_ESCAPE = (SDL_SCANCODE_ESCAPE | (1<<30)),
    SDLK_BACKSPACE = (SDL_SCANCODE_BACKSPACE | (1<<30)),
    SDLK_TAB = (SDL_SCANCODE_TAB | (1<<30)),
    SDLK_SPACE = (SDL_SCANCODE_SPACE | (1<<30)),

    SDLK_CAPSLOCK = (SDL_SCANCODE_CAPSLOCK | (1<<30)),

    SDLK_F1 = (SDL_SCANCODE_F1 | (1<<30)),
    SDLK_F2 = (SDL_SCANCODE_F2 | (1<<30)),
    SDLK_F3 = (SDL_SCANCODE_F3 | (1<<30)),
    SDLK_F4 = (SDL_SCANCODE_F4 | (1<<30)),
    SDLK_F5 = (SDL_SCANCODE_F5 | (1<<30)),
    SDLK_F6 = (SDL_SCANCODE_F6 | (1<<30)),
    SDLK_F7 = (SDL_SCANCODE_F7 | (1<<30)),
    SDLK_F8 = (SDL_SCANCODE_F8 | (1<<30)),
    SDLK_F9 = (SDL_SCANCODE_F9 | (1<<30)),
    SDLK_F10 = (SDL_SCANCODE_F10 | (1<<30)),
    SDLK_F11 = (SDL_SCANCODE_F11 | (1<<30)),
    SDLK_F12 = (SDL_SCANCODE_F12 | (1<<30)),

    SDLK_PRINTSCREEN = (SDL_SCANCODE_PRINTSCREEN | (1<<30)),
    SDLK_SCROLLLOCK = (SDL_SCANCODE_SCROLLLOCK | (1<<30)),
    SDLK_PAUSE = (SDL_SCANCODE_PAUSE | (1<<30)),
    SDLK_INSERT = (SDL_SCANCODE_INSERT | (1<<30)),
    SDLK_HOME = (SDL_SCANCODE_HOME | (1<<30)),
    SDLK_PAGEUP = (SDL_SCANCODE_PAGEUP | (1<<30)),
    SDLK_DELETE = (SDL_SCANCODE_DELETE | (1<<30)),
    SDLK_END = (SDL_SCANCODE_END | (1<<30)),
    SDLK_PAGEDOWN = (SDL_SCANCODE_PAGEDOWN | (1<<30)),
    SDLK_RIGHT = (SDL_SCANCODE_RIGHT | (1<<30)),
    SDLK_LEFT = (SDL_SCANCODE_LEFT | (1<<30)),
    SDLK_DOWN = (SDL_SCANCODE_DOWN | (1<<30)),
    SDLK_UP = (SDL_SCANCODE_UP | (1<<30)),

    SDLK_NUMLOCKCLEAR = (SDL_SCANCODE_NUMLOCKCLEAR | (1<<30)),
    SDLK_KP_DIVIDE = (SDL_SCANCODE_KP_DIVIDE | (1<<30)),
    SDLK_KP_MULTIPLY = (SDL_SCANCODE_KP_MULTIPLY | (1<<30)),
    SDLK_KP_MINUS = (SDL_SCANCODE_KP_MINUS | (1<<30)),
    SDLK_KP_PLUS = (SDL_SCANCODE_KP_PLUS | (1<<30)),
    SDLK_KP_ENTER = (SDL_SCANCODE_KP_ENTER | (1<<30)),
    SDLK_KP_1 = (SDL_SCANCODE_KP_1 | (1<<30)),
    SDLK_KP_2 = (SDL_SCANCODE_KP_2 | (1<<30)),
    SDLK_KP_3 = (SDL_SCANCODE_KP_3 | (1<<30)),
    SDLK_KP_4 = (SDL_SCANCODE_KP_4 | (1<<30)),
    SDLK_KP_5 = (SDL_SCANCODE_KP_5 | (1<<30)),
    SDLK_KP_6 = (SDL_SCANCODE_KP_6 | (1<<30)),
    SDLK_KP_7 = (SDL_SCANCODE_KP_7 | (1<<30)),
    SDLK_KP_8 = (SDL_SCANCODE_KP_8 | (1<<30)),
    SDLK_KP_9 = (SDL_SCANCODE_KP_9 | (1<<30)),
    SDLK_KP_0 = (SDL_SCANCODE_KP_0 | (1<<30)),
    SDLK_KP_PERIOD = (SDL_SCANCODE_KP_PERIOD | (1<<30)),

    SDLK_APPLICATION = (SDL_SCANCODE_APPLICATION | (1<<30)),
    SDLK_POWER = (SDL_SCANCODE_POWER | (1<<30)),
    SDLK_KP_EQUALS = (SDL_SCANCODE_KP_EQUALS | (1<<30)),
    SDLK_F13 = (SDL_SCANCODE_F13 | (1<<30)),
    SDLK_F14 = (SDL_SCANCODE_F14 | (1<<30)),
    SDLK_F15 = (SDL_SCANCODE_F15 | (1<<30)),
    SDLK_F16 = (SDL_SCANCODE_F16 | (1<<30)),
    SDLK_F17 = (SDL_SCANCODE_F17 | (1<<30)),
    SDLK_F18 = (SDL_SCANCODE_F18 | (1<<30)),
    SDLK_F19 = (SDL_SCANCODE_F19 | (1<<30)),
    SDLK_F20 = (SDL_SCANCODE_F20 | (1<<30)),
    SDLK_F21 = (SDL_SCANCODE_F21 | (1<<30)),
    SDLK_F22 = (SDL_SCANCODE_F22 | (1<<30)),
    SDLK_F23 = (SDL_SCANCODE_F23 | (1<<30)),
    SDLK_F24 = (SDL_SCANCODE_F24 | (1<<30)),
    SDLK_EXECUTE = (SDL_SCANCODE_EXECUTE | (1<<30)),
    SDLK_HELP = (SDL_SCANCODE_HELP | (1<<30)),
    SDLK_MENU = (SDL_SCANCODE_MENU | (1<<30)),
    SDLK_SELECT = (SDL_SCANCODE_SELECT | (1<<30)),
    SDLK_STOP = (SDL_SCANCODE_STOP | (1<<30)),
    SDLK_AGAIN = (SDL_SCANCODE_AGAIN | (1<<30)),
    SDLK_UNDO = (SDL_SCANCODE_UNDO | (1<<30)),
    SDLK_CUT = (SDL_SCANCODE_CUT | (1<<30)),
    SDLK_COPY = (SDL_SCANCODE_COPY | (1<<30)),
    SDLK_PASTE = (SDL_SCANCODE_PASTE | (1<<30)),
    SDLK_FIND = (SDL_SCANCODE_FIND | (1<<30)),
    SDLK_MUTE = (SDL_SCANCODE_MUTE | (1<<30)),
    SDLK_VOLUMEUP = (SDL_SCANCODE_VOLUMEUP | (1<<30)),
    SDLK_VOLUMEDOWN = (SDL_SCANCODE_VOLUMEDOWN | (1<<30)),
    SDLK_KP_COMMA = (SDL_SCANCODE_KP_COMMA | (1<<30)),
    SDLK_KP_EQUALSAS400 =
        (SDL_SCANCODE_KP_EQUALSAS400 | (1<<30)),

    SDLK_ALTERASE = (SDL_SCANCODE_ALTERASE | (1<<30)),
    SDLK_SYSREQ = (SDL_SCANCODE_SYSREQ | (1<<30)),
    SDLK_CANCEL = (SDL_SCANCODE_CANCEL | (1<<30)),
    SDLK_CLEAR = (SDL_SCANCODE_CLEAR | (1<<30)),
    SDLK_PRIOR = (SDL_SCANCODE_PRIOR | (1<<30)),
    SDLK_RETURN2 = (SDL_SCANCODE_RETURN2 | (1<<30)),
    SDLK_SEPARATOR = (SDL_SCANCODE_SEPARATOR | (1<<30)),
    SDLK_OUT = (SDL_SCANCODE_OUT | (1<<30)),
    SDLK_OPER = (SDL_SCANCODE_OPER | (1<<30)),
    SDLK_CLEARAGAIN = (SDL_SCANCODE_CLEARAGAIN | (1<<30)),
    SDLK_CRSEL = (SDL_SCANCODE_CRSEL | (1<<30)),
    SDLK_EXSEL = (SDL_SCANCODE_EXSEL | (1<<30)),

    SDLK_KP_00 = (SDL_SCANCODE_KP_00 | (1<<30)),
    SDLK_KP_000 = (SDL_SCANCODE_KP_000 | (1<<30)),
    SDLK_THOUSANDSSEPARATOR =
        (SDL_SCANCODE_THOUSANDSSEPARATOR | (1<<30)),
    SDLK_DECIMALSEPARATOR =
        (SDL_SCANCODE_DECIMALSEPARATOR | (1<<30)),
    SDLK_CURRENCYUNIT = (SDL_SCANCODE_CURRENCYUNIT | (1<<30)),
    SDLK_CURRENCYSUBUNIT =
        (SDL_SCANCODE_CURRENCYSUBUNIT | (1<<30)),
    SDLK_KP_LEFTPAREN = (SDL_SCANCODE_KP_LEFTPAREN | (1<<30)),
    SDLK_KP_RIGHTPAREN = (SDL_SCANCODE_KP_RIGHTPAREN | (1<<30)),
    SDLK_KP_LEFTBRACE = (SDL_SCANCODE_KP_LEFTBRACE | (1<<30)),
    SDLK_KP_RIGHTBRACE = (SDL_SCANCODE_KP_RIGHTBRACE | (1<<30)),
    SDLK_KP_TAB = (SDL_SCANCODE_KP_TAB | (1<<30)),
    SDLK_KP_BACKSPACE = (SDL_SCANCODE_KP_BACKSPACE | (1<<30)),
    SDLK_KP_A = (SDL_SCANCODE_KP_A | (1<<30)),
    SDLK_KP_B = (SDL_SCANCODE_KP_B | (1<<30)),
    SDLK_KP_C = (SDL_SCANCODE_KP_C | (1<<30)),
    SDLK_KP_D = (SDL_SCANCODE_KP_D | (1<<30)),
    SDLK_KP_E = (SDL_SCANCODE_KP_E | (1<<30)),
    SDLK_KP_F = (SDL_SCANCODE_KP_F | (1<<30)),
    SDLK_KP_XOR = (SDL_SCANCODE_KP_XOR | (1<<30)),
    SDLK_KP_POWER = (SDL_SCANCODE_KP_POWER | (1<<30)),
    SDLK_KP_PERCENT = (SDL_SCANCODE_KP_PERCENT | (1<<30)),
    SDLK_KP_LESS = (SDL_SCANCODE_KP_LESS | (1<<30)),
    SDLK_KP_GREATER = (SDL_SCANCODE_KP_GREATER | (1<<30)),
    SDLK_KP_AMPERSAND = (SDL_SCANCODE_KP_AMPERSAND | (1<<30)),
    SDLK_KP_DBLAMPERSAND =
        (SDL_SCANCODE_KP_DBLAMPERSAND | (1<<30)),
    SDLK_KP_VERTICALBAR =
        (SDL_SCANCODE_KP_VERTICALBAR | (1<<30)),
    SDLK_KP_DBLVERTICALBAR =
        (SDL_SCANCODE_KP_DBLVERTICALBAR | (1<<30)),
    SDLK_KP_COLON = (SDL_SCANCODE_KP_COLON | (1<<30)),
    SDLK_KP_HASH = (SDL_SCANCODE_KP_HASH | (1<<30)),
    SDLK_KP_SPACE = (SDL_SCANCODE_KP_SPACE | (1<<30)),
    SDLK_KP_AT = (SDL_SCANCODE_KP_AT | (1<<30)),
    SDLK_KP_EXCLAM = (SDL_SCANCODE_KP_EXCLAM | (1<<30)),
    SDLK_KP_MEMSTORE = (SDL_SCANCODE_KP_MEMSTORE | (1<<30)),
    SDLK_KP_MEMRECALL = (SDL_SCANCODE_KP_MEMRECALL | (1<<30)),
    SDLK_KP_MEMCLEAR = (SDL_SCANCODE_KP_MEMCLEAR | (1<<30)),
    SDLK_KP_MEMADD = (SDL_SCANCODE_KP_MEMADD | (1<<30)),
    SDLK_KP_MEMSUBTRACT =
        (SDL_SCANCODE_KP_MEMSUBTRACT | (1<<30)),
    SDLK_KP_MEMMULTIPLY =
        (SDL_SCANCODE_KP_MEMMULTIPLY | (1<<30)),
    SDLK_KP_MEMDIVIDE = (SDL_SCANCODE_KP_MEMDIVIDE | (1<<30)),
    SDLK_KP_PLUSMINUS = (SDL_SCANCODE_KP_PLUSMINUS | (1<<30)),
    SDLK_KP_CLEAR = (SDL_SCANCODE_KP_CLEAR | (1<<30)),
    SDLK_KP_CLEARENTRY = (SDL_SCANCODE_KP_CLEARENTRY | (1<<30)),
    SDLK_KP_BINARY = (SDL_SCANCODE_KP_BINARY | (1<<30)),
    SDLK_KP_OCTAL = (SDL_SCANCODE_KP_OCTAL | (1<<30)),
    SDLK_KP_DECIMAL = (SDL_SCANCODE_KP_DECIMAL | (1<<30)),
    SDLK_KP_HEXADECIMAL =
        (SDL_SCANCODE_KP_HEXADECIMAL | (1<<30)),

    SDLK_LCTRL = (SDL_SCANCODE_LCTRL | (1<<30)),
    SDLK_LSHIFT = (SDL_SCANCODE_LSHIFT | (1<<30)),
    SDLK_LALT = (SDL_SCANCODE_LALT | (1<<30)),
    SDLK_LGUI = (SDL_SCANCODE_LGUI | (1<<30)),
    SDLK_RCTRL = (SDL_SCANCODE_RCTRL | (1<<30)),
    SDLK_RSHIFT = (SDL_SCANCODE_RSHIFT | (1<<30)),
    SDLK_RALT = (SDL_SCANCODE_RALT | (1<<30)),
    SDLK_RGUI = (SDL_SCANCODE_RGUI | (1<<30)),

    SDLK_MODE = (SDL_SCANCODE_MODE | (1<<30)),

    SDLK_AUDIONEXT = (SDL_SCANCODE_AUDIONEXT | (1<<30)),
    SDLK_AUDIOPREV = (SDL_SCANCODE_AUDIOPREV | (1<<30)),
    SDLK_AUDIOSTOP = (SDL_SCANCODE_AUDIOSTOP | (1<<30)),
    SDLK_AUDIOPLAY = (SDL_SCANCODE_AUDIOPLAY | (1<<30)),
    SDLK_AUDIOMUTE = (SDL_SCANCODE_AUDIOMUTE | (1<<30)),
    SDLK_MEDIASELECT = (SDL_SCANCODE_MEDIASELECT | (1<<30)),
    SDLK_WWW = (SDL_SCANCODE_WWW | (1<<30)),
    SDLK_MAIL = (SDL_SCANCODE_MAIL | (1<<30)),
    SDLK_CALCULATOR = (SDL_SCANCODE_CALCULATOR | (1<<30)),
    SDLK_COMPUTER = (SDL_SCANCODE_COMPUTER | (1<<30)),
    SDLK_AC_SEARCH = (SDL_SCANCODE_AC_SEARCH | (1<<30)),
    SDLK_AC_HOME = (SDL_SCANCODE_AC_HOME | (1<<30)),
    SDLK_AC_BACK = (SDL_SCANCODE_AC_BACK | (1<<30)),
    SDLK_AC_FORWARD = (SDL_SCANCODE_AC_FORWARD | (1<<30)),
    SDLK_AC_STOP = (SDL_SCANCODE_AC_STOP | (1<<30)),
    SDLK_AC_REFRESH = (SDL_SCANCODE_AC_REFRESH | (1<<30)),
    SDLK_AC_BOOKMARKS = (SDL_SCANCODE_AC_BOOKMARKS | (1<<30)),

    SDLK_BRIGHTNESSDOWN =
        (SDL_SCANCODE_BRIGHTNESSDOWN | (1<<30)),
    SDLK_BRIGHTNESSUP = (SDL_SCANCODE_BRIGHTNESSUP | (1<<30)),
    SDLK_DISPLAYSWITCH = (SDL_SCANCODE_DISPLAYSWITCH | (1<<30)),
    SDLK_KBDILLUMTOGGLE =
        (SDL_SCANCODE_KBDILLUMTOGGLE | (1<<30)),
    SDLK_KBDILLUMDOWN = (SDL_SCANCODE_KBDILLUMDOWN | (1<<30)),
    SDLK_KBDILLUMUP = (SDL_SCANCODE_KBDILLUMUP | (1<<30)),
    SDLK_EJECT = (SDL_SCANCODE_EJECT | (1<<30)),
    SDLK_SLEEP = (SDL_SCANCODE_SLEEP | (1<<30)),
};






typedef enum
{
    KMOD_NONE = 0x0000,
    KMOD_LSHIFT = 0x0001,
    KMOD_RSHIFT = 0x0002,
    KMOD_LCTRL = 0x0040,
    KMOD_RCTRL = 0x0080,
    KMOD_LALT = 0x0100,
    KMOD_RALT = 0x0200,
    KMOD_LGUI = 0x0400,
    KMOD_RGUI = 0x0800,
    KMOD_NUM = 0x1000,
    KMOD_CAPS = 0x2000,
    KMOD_MODE = 0x4000,
    KMOD_RESERVED = 0x8000
} SDLMod;
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h" 2

# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h" 2
# 49 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
typedef struct SDL_keysym
{
    SDL_scancode scancode;
    SDLKey sym;
    Uint16 mod;
    Uint32 unicode;
} SDL_keysym;
# 66 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
extern __attribute__ ((visibility("default"))) int SDL_GetNumKeyboards(void);
# 79 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
extern __attribute__ ((visibility("default"))) int SDL_SelectKeyboard(int index);
# 94 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
extern __attribute__ ((visibility("default"))) Uint8 * SDL_GetKeyboardState(int *numkeys);






extern __attribute__ ((visibility("default"))) SDLMod SDL_GetModState(void);
# 110 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
extern __attribute__ ((visibility("default"))) void SDL_SetModState(SDLMod modstate);
# 121 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
extern __attribute__ ((visibility("default"))) SDLKey SDL_GetKeyFromScancode(SDL_scancode scancode);
# 132 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
extern __attribute__ ((visibility("default"))) SDL_scancode SDL_GetScancodeFromKey(SDLKey key);
# 143 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
extern __attribute__ ((visibility("default"))) const char * SDL_GetScancodeName(SDL_scancode
                                                        scancode);
# 155 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
extern __attribute__ ((visibility("default"))) const char * SDL_GetKeyName(SDLKey key);
# 164 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 165 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_keyboard.h" 2
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h" 1
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h" 2







typedef struct SDL_Cursor SDL_Cursor;
# 55 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) int SDL_GetNumMice(void);
# 68 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) int SDL_SelectMouse(int index);






extern __attribute__ ((visibility("default"))) SDL_WindowID SDL_GetMouseFocusWindow(void);
# 95 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) int SDL_SetRelativeMouseMode(SDL_bool enabled);
# 104 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) SDL_bool SDL_GetRelativeMouseMode(void);
# 116 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) Uint8 SDL_GetMouseState(int *x, int *y);
# 127 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) Uint8 SDL_GetRelativeMouseState(int *x, int *y);
# 140 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) void SDL_WarpMouseInWindow(SDL_WindowID windowID,
                                                   int x, int y);
# 160 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) SDL_Cursor * SDL_CreateCursor(const Uint8 * data,
                                                     const Uint8 * mask,
                                                     int w, int h, int hot_x,
                                                     int hot_y);
# 172 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) void SDL_SetCursor(SDL_Cursor * cursor);






extern __attribute__ ((visibility("default"))) SDL_Cursor * SDL_GetCursor(void);
# 188 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) void SDL_FreeCursor(SDL_Cursor * cursor);
# 199 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
extern __attribute__ ((visibility("default"))) int SDL_ShowCursor(int toggle);
# 225 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 226 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_mouse.h" 2
# 37 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h" 1
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h" 2
# 49 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
struct _SDL_Joystick;
typedef struct _SDL_Joystick SDL_Joystick;






extern __attribute__ ((visibility("default"))) int SDL_NumJoysticks(void);






extern __attribute__ ((visibility("default"))) const char * SDL_JoystickName(int device_index);
# 73 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
extern __attribute__ ((visibility("default"))) SDL_Joystick * SDL_JoystickOpen(int device_index);




extern __attribute__ ((visibility("default"))) int SDL_JoystickOpened(int device_index);




extern __attribute__ ((visibility("default"))) int SDL_JoystickIndex(SDL_Joystick * joystick);




extern __attribute__ ((visibility("default"))) int SDL_JoystickNumAxes(SDL_Joystick * joystick);






extern __attribute__ ((visibility("default"))) int SDL_JoystickNumBalls(SDL_Joystick * joystick);




extern __attribute__ ((visibility("default"))) int SDL_JoystickNumHats(SDL_Joystick * joystick);




extern __attribute__ ((visibility("default"))) int SDL_JoystickNumButtons(SDL_Joystick * joystick);






extern __attribute__ ((visibility("default"))) void SDL_JoystickUpdate(void);
# 121 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
extern __attribute__ ((visibility("default"))) int SDL_JoystickEventState(int state);






extern __attribute__ ((visibility("default"))) Sint16 SDL_JoystickGetAxis(SDL_Joystick * joystick,
                                                   int axis);
# 147 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
extern __attribute__ ((visibility("default"))) Uint8 SDL_JoystickGetHat(SDL_Joystick * joystick,
                                                 int hat);






extern __attribute__ ((visibility("default"))) int SDL_JoystickGetBall(SDL_Joystick * joystick,
                                                int ball, int *dx, int *dy);





extern __attribute__ ((visibility("default"))) Uint8 SDL_JoystickGetButton(SDL_Joystick * joystick,
                                                    int button);




extern __attribute__ ((visibility("default"))) void SDL_JoystickClose(SDL_Joystick * joystick);
# 177 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 178 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_joystick.h" 2
# 38 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_quit.h" 1
# 39 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2

# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 41 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
# 57 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
typedef enum
{
    SDL_NOEVENT = 0,
    SDL_WINDOWEVENT,
    SDL_KEYDOWN,
    SDL_KEYUP,
    SDL_TEXTINPUT,
    SDL_MOUSEMOTION,
    SDL_MOUSEBUTTONDOWN,
    SDL_MOUSEBUTTONUP,
    SDL_MOUSEWHEEL,
    SDL_JOYAXISMOTION,
    SDL_JOYBALLMOTION,
    SDL_JOYHATMOTION,
    SDL_JOYBUTTONDOWN,
    SDL_JOYBUTTONUP,
    SDL_QUIT,
    SDL_SYSWMEVENT,
    SDL_EVENT_RESERVED1,
    SDL_EVENT_RESERVED2,
    SDL_EVENT_RESERVED3,

    SDL_USEREVENT = 24,



    SDL_NUMEVENTS = 32
} SDL_EventType;







typedef enum
{
    SDL_WINDOWEVENTMASK = (1<<(SDL_WINDOWEVENT)),
    SDL_KEYDOWNMASK = (1<<(SDL_KEYDOWN)),
    SDL_KEYUPMASK = (1<<(SDL_KEYUP)),
    SDL_KEYEVENTMASK = (1<<(SDL_KEYDOWN)) | (1<<(SDL_KEYUP)),
    SDL_TEXTINPUTMASK = (1<<(SDL_TEXTINPUT)),
    SDL_MOUSEMOTIONMASK = (1<<(SDL_MOUSEMOTION)),
    SDL_MOUSEBUTTONDOWNMASK = (1<<(SDL_MOUSEBUTTONDOWN)),
    SDL_MOUSEBUTTONUPMASK = (1<<(SDL_MOUSEBUTTONUP)),
    SDL_MOUSEWHEELMASK = (1<<(SDL_MOUSEWHEEL)),
    SDL_MOUSEEVENTMASK = (1<<(SDL_MOUSEMOTION)) |
        (1<<(SDL_MOUSEBUTTONDOWN)) | (1<<(SDL_MOUSEBUTTONUP)),
    SDL_JOYAXISMOTIONMASK = (1<<(SDL_JOYAXISMOTION)),
    SDL_JOYBALLMOTIONMASK = (1<<(SDL_JOYBALLMOTION)),
    SDL_JOYHATMOTIONMASK = (1<<(SDL_JOYHATMOTION)),
    SDL_JOYBUTTONDOWNMASK = (1<<(SDL_JOYBUTTONDOWN)),
    SDL_JOYBUTTONUPMASK = (1<<(SDL_JOYBUTTONUP)),
    SDL_JOYEVENTMASK = (1<<(SDL_JOYAXISMOTION)) |
        (1<<(SDL_JOYBALLMOTION)) |
        (1<<(SDL_JOYHATMOTION)) |
        (1<<(SDL_JOYBUTTONDOWN)) | (1<<(SDL_JOYBUTTONUP)),
    SDL_QUITMASK = (1<<(SDL_QUIT)),
    SDL_SYSWMEVENTMASK = (1<<(SDL_SYSWMEVENT))
} SDL_EventMask;







typedef struct SDL_WindowEvent
{
    Uint8 type;
    Uint8 event;
    int data1;
    int data2;
    SDL_WindowID windowID;
} SDL_WindowEvent;






typedef struct SDL_KeyboardEvent
{
    Uint8 type;
    Uint8 which;
    Uint8 state;
    SDL_keysym keysym;
    SDL_WindowID windowID;
} SDL_KeyboardEvent;







typedef struct SDL_TextInputEvent
{
    Uint8 type;
    Uint8 which;
    char text[(32)];
    SDL_WindowID windowID;
} SDL_TextInputEvent;






typedef struct SDL_MouseMotionEvent
{
    Uint8 type;
    Uint8 which;
    Uint8 state;
    int x;
    int y;
    int xrel;
    int yrel;
    SDL_WindowID windowID;
} SDL_MouseMotionEvent;






typedef struct SDL_MouseButtonEvent
{
    Uint8 type;
    Uint8 which;
    Uint8 button;
    Uint8 state;
    int x;
    int y;
    SDL_WindowID windowID;
} SDL_MouseButtonEvent;






typedef struct SDL_MouseWheelEvent
{
    Uint8 type;
    Uint8 which;
    int x;
    int y;
    SDL_WindowID windowID;
} SDL_MouseWheelEvent;






typedef struct SDL_JoyAxisEvent
{
    Uint8 type;
    Uint8 which;
    Uint8 axis;
    int value;
} SDL_JoyAxisEvent;






typedef struct SDL_JoyBallEvent
{
    Uint8 type;
    Uint8 which;
    Uint8 ball;
    int xrel;
    int yrel;
} SDL_JoyBallEvent;






typedef struct SDL_JoyHatEvent
{
    Uint8 type;
    Uint8 which;
    Uint8 hat;
    Uint8 value;





} SDL_JoyHatEvent;






typedef struct SDL_JoyButtonEvent
{
    Uint8 type;
    Uint8 which;
    Uint8 button;
    Uint8 state;
} SDL_JoyButtonEvent;






typedef struct SDL_QuitEvent
{
    Uint8 type;
} SDL_QuitEvent;






typedef struct SDL_UserEvent
{
    Uint8 type;
    int code;
    void *data1;
    void *data2;
    SDL_WindowID windowID;
} SDL_UserEvent;
# 297 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
struct SDL_SysWMmsg;
typedef struct SDL_SysWMmsg SDL_SysWMmsg;
typedef struct SDL_SysWMEvent
{
    Uint8 type;
    SDL_SysWMmsg *msg;
} SDL_SysWMEvent;


typedef struct SDL_ActiveEvent
{
    Uint8 type;
    Uint8 gain;
    Uint8 state;
} SDL_ActiveEvent;
typedef struct SDL_ResizeEvent
{
    Uint8 type;
    int w;
    int h;
} SDL_ResizeEvent;






typedef union SDL_Event
{
    Uint8 type;
    SDL_WindowEvent window;
    SDL_KeyboardEvent key;
    SDL_TextInputEvent text;
    SDL_MouseMotionEvent motion;
    SDL_MouseButtonEvent button;
    SDL_MouseWheelEvent wheel;
    SDL_JoyAxisEvent jaxis;
    SDL_JoyBallEvent jball;
    SDL_JoyHatEvent jhat;
    SDL_JoyButtonEvent jbutton;
    SDL_QuitEvent quit;
    SDL_UserEvent user;
    SDL_SysWMEvent syswm;


    SDL_ActiveEvent active;
    SDL_ResizeEvent resize;
} SDL_Event;
# 353 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
extern __attribute__ ((visibility("default"))) void SDL_PumpEvents(void);
# 367 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
typedef enum
{
    SDL_ADDEVENT,
    SDL_PEEKEVENT,
    SDL_GETEVENT
} SDL_eventaction;

extern __attribute__ ((visibility("default"))) int SDL_PeepEvents(SDL_Event * events, int numevents,
                                           SDL_eventaction action,
                                           Uint32 mask);



extern __attribute__ ((visibility("default"))) SDL_bool SDL_HasEvent(Uint32 mask);





extern __attribute__ ((visibility("default"))) int SDL_PollEvent(SDL_Event * event);





extern __attribute__ ((visibility("default"))) int SDL_WaitEvent(SDL_Event * event);





extern __attribute__ ((visibility("default"))) int SDL_PushEvent(SDL_Event * event);







typedef int ( * SDL_EventFilter) (void *userdata, SDL_Event * event);
# 423 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
extern __attribute__ ((visibility("default"))) void SDL_SetEventFilter(SDL_EventFilter filter,
                                                void *userdata);





extern __attribute__ ((visibility("default"))) SDL_bool SDL_GetEventFilter(SDL_EventFilter * filter,
                                                    void **userdata);





extern __attribute__ ((visibility("default"))) void SDL_FilterEvents(SDL_EventFilter filter,
                                              void *userdata);
# 452 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
extern __attribute__ ((visibility("default"))) Uint8 SDL_EventState(Uint8 type, int state);
# 461 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 462 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_events.h" 2
# 85 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h" 1
# 48 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 49 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h" 2
# 60 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h"
extern __attribute__ ((visibility("default"))) void * SDL_LoadObject(const char *sofile);





extern __attribute__ ((visibility("default"))) void * SDL_LoadFunction(void *handle,
                                               const char *name);


extern __attribute__ ((visibility("default"))) void SDL_UnloadObject(void *handle);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 79 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_loadso.h" 2
# 86 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2



# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h" 1
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 36 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h" 2
# 52 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h"
extern __attribute__ ((visibility("default"))) Uint32 SDL_GetTicks(void);


extern __attribute__ ((visibility("default"))) void SDL_Delay(Uint32 ms);


typedef Uint32( * SDL_TimerCallback) (Uint32 interval);
# 88 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h"
extern __attribute__ ((visibility("default"))) int SDL_SetTimer(Uint32 interval,
                                         SDL_TimerCallback callback);
# 101 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h"
typedef Uint32( * SDL_NewTimerCallback) (Uint32 interval, void *param);


typedef struct _SDL_TimerID *SDL_TimerID;




extern __attribute__ ((visibility("default"))) SDL_TimerID SDL_AddTimer(Uint32 interval,
                                                 SDL_NewTimerCallback
                                                 callback, void *param);




extern __attribute__ ((visibility("default"))) SDL_bool SDL_RemoveTimer(SDL_TimerID t);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 125 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_timer.h" 2
# 90 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2

# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h" 1
# 34 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 35 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h" 2
# 55 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h"
typedef struct SDL_version
{
    Uint8 major;
    Uint8 minor;
    Uint8 patch;
} SDL_version;
# 132 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h"
extern __attribute__ ((visibility("default"))) void SDL_GetVersion(SDL_version * ver);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 141 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_version.h" 2
# 92 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h" 1
# 31 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 32 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h" 2
# 74 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h"
typedef struct SDL_VideoInfo
{
    Uint32 hw_available:1;
    Uint32 wm_available:1;
    Uint32 UnusedBits1:6;
    Uint32 UnusedBits2:1;
    Uint32 blit_hw:1;
    Uint32 blit_hw_CC:1;
    Uint32 blit_hw_A:1;
    Uint32 blit_sw:1;
    Uint32 blit_sw_CC:1;
    Uint32 blit_sw_A:1;
    Uint32 blit_fill:1;
    Uint32 UnusedBits3:16;
    Uint32 video_mem;

    SDL_PixelFormat *vfmt;
} SDL_VideoInfo;
# 107 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h"
typedef struct SDL_Overlay
{
    Uint32 format;
    int w, h;
    int planes;
    Uint16 *pitches;
    Uint8 **pixels;


    struct private_yuvhwfuncs *hwfuncs;
    struct private_yuvhwdata *hwdata;


    Uint32 hw_overlay:1;
    Uint32 UnusedBits:31;
} SDL_Overlay;

typedef enum
{
    SDL_GRAB_QUERY = -1,
    SDL_GRAB_OFF = 0,
    SDL_GRAB_ON = 1
} SDL_GrabMode;

struct SDL_SysWMinfo;
# 211 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h"
extern __attribute__ ((visibility("default"))) const SDL_version * SDL_Linked_Version(void);
extern __attribute__ ((visibility("default"))) char * SDL_AudioDriverName(char *namebuf, int maxlen);
extern __attribute__ ((visibility("default"))) char * SDL_VideoDriverName(char *namebuf, int maxlen);
extern __attribute__ ((visibility("default"))) const SDL_VideoInfo * SDL_GetVideoInfo(void);
extern __attribute__ ((visibility("default"))) int SDL_VideoModeOK(int width,
                                            int height,
                                            int bpp, Uint32 flags);
extern __attribute__ ((visibility("default"))) SDL_Rect ** SDL_ListModes(SDL_PixelFormat * format,
                                                 Uint32 flags);
extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_SetVideoMode(int width,
                                                      int height,
                                                      int bpp, Uint32 flags);
extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_GetVideoSurface(void);
extern __attribute__ ((visibility("default"))) void SDL_UpdateRects(SDL_Surface * screen,
                                             int numrects, SDL_Rect * rects);
extern __attribute__ ((visibility("default"))) void SDL_UpdateRect(SDL_Surface * screen,
                                            Sint32 x,
                                            Sint32 y, Uint32 w, Uint32 h);
extern __attribute__ ((visibility("default"))) int SDL_Flip(SDL_Surface * screen);
extern __attribute__ ((visibility("default"))) int SDL_SetAlpha(SDL_Surface * surface,
                                         Uint32 flag, Uint8 alpha);
extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_DisplayFormat(SDL_Surface * surface);
extern __attribute__ ((visibility("default"))) SDL_Surface * SDL_DisplayFormatAlpha(SDL_Surface *
                                                            surface);
extern __attribute__ ((visibility("default"))) void SDL_WM_SetCaption(const char *title,
                                               const char *icon);
extern __attribute__ ((visibility("default"))) void SDL_WM_GetCaption(const char **title,
                                               const char **icon);
extern __attribute__ ((visibility("default"))) void SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
extern __attribute__ ((visibility("default"))) int SDL_WM_IconifyWindow(void);
extern __attribute__ ((visibility("default"))) int SDL_WM_ToggleFullScreen(SDL_Surface * surface);
extern __attribute__ ((visibility("default"))) SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);
extern __attribute__ ((visibility("default"))) int SDL_SetPalette(SDL_Surface * surface,
                                           int flags,
                                           const SDL_Color * colors,
                                           int firstcolor, int ncolors);
extern __attribute__ ((visibility("default"))) int SDL_SetColors(SDL_Surface * surface,
                                          const SDL_Color * colors,
                                          int firstcolor, int ncolors);
extern __attribute__ ((visibility("default"))) int SDL_GetWMInfo(struct SDL_SysWMinfo *info);
extern __attribute__ ((visibility("default"))) Uint8 SDL_GetAppState(void);
extern __attribute__ ((visibility("default"))) void SDL_WarpMouse(Uint16 x, Uint16 y);
extern __attribute__ ((visibility("default"))) SDL_Overlay * SDL_CreateYUVOverlay(int width,
                                                          int height,
                                                          Uint32 format,
                                                          SDL_Surface *
                                                          display);
extern __attribute__ ((visibility("default"))) int SDL_LockYUVOverlay(SDL_Overlay * overlay);
extern __attribute__ ((visibility("default"))) void SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
extern __attribute__ ((visibility("default"))) int SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
                                                  SDL_Rect * dstrect);
extern __attribute__ ((visibility("default"))) void SDL_FreeYUVOverlay(SDL_Overlay * overlay);
extern __attribute__ ((visibility("default"))) void SDL_GL_SwapBuffers(void);
extern __attribute__ ((visibility("default"))) int SDL_EnableKeyRepeat(int delay, int interval);
extern __attribute__ ((visibility("default"))) void SDL_GetKeyRepeat(int *delay, int *interval);
extern __attribute__ ((visibility("default"))) int SDL_EnableUNICODE(int enable);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 275 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL_compat.h" 2
# 93 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2

# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/begin_code.h" 1
# 95 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
# 121 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h"
extern __attribute__ ((visibility("default"))) int SDL_Init(Uint32 flags);


extern __attribute__ ((visibility("default"))) int SDL_InitSubSystem(Uint32 flags);


extern __attribute__ ((visibility("default"))) void SDL_QuitSubSystem(Uint32 flags);





extern __attribute__ ((visibility("default"))) Uint32 SDL_WasInit(Uint32 flags);




extern __attribute__ ((visibility("default"))) void SDL_Quit(void);







# 1 "/home/lifning/hack/devkitPro/libnds/include/SDL/close_code.h" 1
# 147 "/home/lifning/hack/devkitPro/libnds/include/SDL/SDL.h" 2
# 3 "/home/lifning/hack/nds-test/source/main.c" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 1
# 44 "/home/lifning/hack/devkitPro/libnds/include/nds.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/jtypes.h" 1
# 65 "/home/lifning/hack/devkitPro/libnds/include/nds/jtypes.h"
# 1 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 1 3
# 45 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
typedef signed char int8_t ;
typedef unsigned char uint8_t ;




typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;




typedef signed short int16_t;
typedef unsigned short uint16_t;
# 71 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
typedef int16_t int_least16_t;
typedef uint16_t uint_least16_t;
# 83 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
typedef signed int int32_t;
typedef unsigned int uint32_t;
# 101 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
typedef int32_t int_least32_t;
typedef uint32_t uint_least32_t;
# 123 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
# 133 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
typedef int64_t int_least64_t;
typedef uint64_t uint_least64_t;
# 163 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
  typedef signed int int_fast8_t;
  typedef unsigned int uint_fast8_t;




  typedef signed int int_fast16_t;
  typedef unsigned int uint_fast16_t;




  typedef signed int int_fast32_t;
  typedef unsigned int uint_fast32_t;
# 217 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
  typedef int_least64_t int_fast64_t;
  typedef uint_least64_t uint_fast64_t;







  typedef long long int intmax_t;
# 235 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
  typedef long long unsigned int uintmax_t;
# 247 "/home/lifning/hack/devkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.3.0/../../../../arm-eabi/include/stdint.h" 3
typedef signed int intptr_t;
typedef unsigned int uintptr_t;
# 66 "/home/lifning/hack/devkitPro/libnds/include/nds/jtypes.h" 2

typedef uint8_t uint8;
typedef uint16_t uint16;
typedef uint32_t uint32;
typedef uint64_t uint64;

typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;
typedef int64_t int64;

typedef float float32;
typedef double float64;

typedef volatile uint8_t vuint8;
typedef volatile uint16_t vuint16;
typedef volatile uint32_t vuint32;
typedef volatile uint64_t vuint64;

typedef volatile int8_t vint8;
typedef volatile int16_t vint16;
typedef volatile int32_t vint32;
typedef volatile int64_t vint64;

typedef volatile float32 vfloat32;
typedef volatile float64 vfloat64;

typedef uint8_t byte;

typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;

typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;

typedef volatile u8 vu8;
typedef volatile u16 vu16;
typedef volatile u32 vu32;
typedef volatile u64 vu64;

typedef volatile s8 vs8;
typedef volatile s16 vs16;
typedef volatile s32 vs32;
typedef volatile s64 vs64;

typedef struct touchPosition {
 int16 x;
 int16 y;
 int16 px;
 int16 py;
 int16 z1;
 int16 z2;
} touchPosition;






typedef enum { false, true } bool;



typedef void ( * IntFn)(void);
typedef void (* VoidFunctionPointer)(void);
typedef void (* fp)(void);
# 45 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h" 1
# 47 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
typedef struct DecompressionStream {
  int (*getSize)(uint8 * source, uint16 * dest, uint32 r2);
  int (*getResult)(uint8 * source);
  uint8 (*readByte)(uint8 * source);
} __attribute__ ((packed)) TDecompressionStream;


typedef struct UnpackStruct {
  uint16 sourceSize;
  uint8 sourceWidth;
  uint8 destWidth;
  uint32 dataOffset;
} __attribute__ ((packed)) TUnpackStruct, * PUnpackStruct;






void swiSoftReset(void);
# 84 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiDelay(uint32 duration);
# 98 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiIntrWait(int waitForSet, uint32 flags);
# 108 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiWaitForVBlank(void);
# 135 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
int swiDivide(int numerator, int divisor);
int swiRemainder(int numerator, int divisor);
void swiDivMod(int numerator, int divisor, int * result, int * remainder);
# 168 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiCopy(const void * source, void * dest, int flags);
void swiFastCopy(const void * source, void * dest, int flags);



int swiSqrt(int value);
# 182 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
uint16 swiCRC16(uint16 crc, void * data, uint32 size);






int swiIsDebugger(void);
# 207 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiUnpackBits(uint8 * source, uint32 * destination, PUnpackStruct params);
# 220 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiDecompressLZSSWram(void * source, void * destination);
int swiDecompressLZSSVram(void * source, void * destination, uint32 toGetSize, TDecompressionStream * stream);




int swiDecompressHuffman(void * source, void * destination, uint32 toGetSize, TDecompressionStream * stream);
# 260 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiDecompressRLEWram(void * source, void * destination);
int swiDecompressRLEVram(void * source, void * destination, uint32 toGetSize, TDecompressionStream * stream);
# 279 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiWaitForIRQ(void);

void swiSetHaltCR(uint32 data);


extern void swiDecodeDelta8(void * source, void * destination);
# 295 "/home/lifning/hack/devkitPro/libnds/include/nds/bios.h"
void swiDecodeDelta16(void * source, void * destination);
# 46 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h" 1
# 32 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/jtypes.h" 1
# 33 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h" 2
# 78 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h"
void cardWriteCommand(const uint8 * command);

void cardPolledTransfer(uint32 flags, uint32 * destination, uint32 length, const uint8 * command);
void cardStartTransfer(const uint8 * command, uint32 * destination, int channel, uint32 flags);
uint32 cardWriteAndRead(const uint8 * command, uint32 flags);



void cardRead00(uint32 address, uint32 * destination, uint32 length, uint32 flags);
void cardReadHeader(uint8 * header);
int cardReadID(uint32 flags);


void cardReadEeprom(uint32 address, uint8 *data, uint32 length, uint32 addrtype);


void cardWriteEeprom(uint32 address, uint8 *data, uint32 length, uint32 addrtype);



uint8 cardEepromReadID(uint8 i);


uint8 cardEepromCommand(uint8 command, uint32 address);
# 110 "/home/lifning/hack/devkitPro/libnds/include/nds/card.h"
int cardEepromGetType(void);


uint32 cardEepromGetSize();


void cardEepromChipErase(void);


void cardEepromSectorErase(uint32 address);
# 47 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/dma.h" 1
# 93 "/home/lifning/hack/devkitPro/libnds/include/nds/dma.h"
static inline void dmaCopyWords(uint8 channel, const void* src, void* dest, uint32 size) {
 (*(vuint32*)(0x040000B0+(channel*12))) = (uint32)src;
 (*(vuint32*)(0x040000B4+(channel*12))) = (uint32)dest;
 (*(vuint32*)(0x040000B8+(channel*12))) = ((1 << (31)) | (1 << (26)) | 0) | (size>>2);
 while((*(vuint32*)(0x040000B8+(channel*12))) & (1 << (31)));
}

static inline void dmaCopyHalfWords(uint8 channel, const void* src, void* dest, uint32 size) {
 (*(vuint32*)(0x040000B0+(channel*12))) = (uint32)src;
 (*(vuint32*)(0x040000B4+(channel*12))) = (uint32)dest;
 (*(vuint32*)(0x040000B8+(channel*12))) = ((1 << (31)) | 0 | 0) | (size>>1);
 while((*(vuint32*)(0x040000B8+(channel*12))) & (1 << (31)));
}

static inline void dmaCopy(const void * source, void * dest, uint32 size) {
 (*(vuint32*)(0x040000B0+(3*12))) = (uint32)source;
 (*(vuint32*)(0x040000B4+(3*12))) = (uint32)dest;
 (*(vuint32*)(0x040000B8+(3*12))) = ((1 << (31)) | 0 | 0) | (size>>1);
 while((*(vuint32*)(0x040000B8+(3*12))) & (1 << (31)));
}

static inline void dmaCopyWordsAsynch(uint8 channel, const void* src, void* dest, uint32 size) {
 (*(vuint32*)(0x040000B0+(channel*12))) = (uint32)src;
 (*(vuint32*)(0x040000B4+(channel*12))) = (uint32)dest;
 (*(vuint32*)(0x040000B8+(channel*12))) = ((1 << (31)) | (1 << (26)) | 0) | (size>>2);

}

static inline void dmaCopyHalfWordsAsynch(uint8 channel, const void* src, void* dest, uint32 size) {
 (*(vuint32*)(0x040000B0+(channel*12))) = (uint32)src;
 (*(vuint32*)(0x040000B4+(channel*12))) = (uint32)dest;
 (*(vuint32*)(0x040000B8+(channel*12))) = ((1 << (31)) | 0 | 0) | (size>>1);
}

static inline void dmaCopyAsynch(const void * source, void * dest, uint32 size) {
 (*(vuint32*)(0x040000B0+(3*12))) = (uint32)source;
 (*(vuint32*)(0x040000B4+(3*12))) = (uint32)dest;
 (*(vuint32*)(0x040000B8+(3*12))) = ((1 << (31)) | 0 | 0) | (size>>1);
}

static inline void dmaFillWords( const void* src, void* dest, uint32 size) {
 (*(vuint32*)(0x040000B0+(3*12))) = (uint32)src;
 (*(vuint32*)(0x040000B4+(3*12))) = (uint32)dest;
 (*(vuint32*)(0x040000B8+(3*12))) = (1 << (24)) | ((1 << (31)) | (1 << (26)) | 0) | (size>>2);
 while((*(vuint32*)(0x040000B8+(3*12))) & (1 << (31)));
}

static inline void dmaFillHalfWords( const void* src, void* dest, uint32 size) {
 (*(vuint32*)(0x040000B0+(3*12))) = (uint32)src;
 (*(vuint32*)(0x040000B4+(3*12))) = (uint32)dest;
 (*(vuint32*)(0x040000B8+(3*12))) = (1 << (24)) | ((1 << (31)) | 0 | 0) | (size>>1);
 while((*(vuint32*)(0x040000B8+(3*12))) & (1 << (31)));
}

static inline int dmaBusy(uint8 channel) {
 return ((*(vuint32*)(0x040000B8+(channel*12))) & (1 << (31)))>>31;
}
# 48 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h" 1
# 47 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
enum IRQ_MASKS {
 IRQ_VBLANK = (1 << (0)),
 IRQ_HBLANK = (1 << (1)),
 IRQ_VCOUNT = (1 << (2)),
 IRQ_TIMER0 = (1 << (3)),
 IRQ_TIMER1 = (1 << (4)),
 IRQ_TIMER2 = (1 << (5)),
 IRQ_TIMER3 = (1 << (6)),
 IRQ_NETWORK = (1 << (7)),
 IRQ_DMA0 = (1 << (8)),
 IRQ_DMA1 = (1 << (9)),
 IRQ_DMA2 = (1 << (10)),
 IRQ_DMA3 = (1 << (11)),
 IRQ_KEYS = (1 << (12)),
 IRQ_CART = (1 << (13)),
 IRQ_IPC_SYNC = (1 << (16)),
 IRQ_FIFO_EMPTY = (1 << (17)),
 IRQ_FIFO_NOT_EMPTY = (1 << (18)),
 IRQ_CARD = (1 << (19)),
 IRQ_CARD_LINE = (1 << (20)),
 IRQ_GEOMETRY_FIFO = (1 << (21)),
 IRQ_LID = (1 << (22)),
 IRQ_SPI = (1 << (23)),
 IRQ_WIFI = (1 << (24)),
 IRQ_ALL = (~0)
};



typedef enum IRQ_MASKS IRQ_MASK;
# 112 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
enum IME_VALUE {
 IME_DISABLE = 0,
 IME_ENABLE = 1,
};







extern VoidFunctionPointer __irq_vector[];
extern vuint32 __irq_flags[];



struct IntTable{IntFn handler; u32 mask;};
# 137 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
void irqInit();
# 152 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
void irqSet(IRQ_MASK irq, VoidFunctionPointer handler);




void irqClear(IRQ_MASK irq);
# 167 "/home/lifning/hack/devkitPro/libnds/include/nds/interrupts.h"
void irqInitHandler(VoidFunctionPointer handler);





void irqEnable(uint32 irq);





void irqDisable(uint32 irq);
# 49 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/ipc.h" 1
# 36 "/home/lifning/hack/devkitPro/libnds/include/nds/ipc.h"
typedef struct sTransferSoundData {

  const void *data;
  u32 len;
  u32 rate;
  u8 vol;
  u8 pan;
  u8 format;
  u8 PADDING;
} TransferSoundData, * pTransferSoundData;



typedef struct sTransferSound {

  TransferSoundData data[16];
  u8 count;
  u8 PADDING[3];
} TransferSound, * pTransferSound;



typedef struct sTransferRegion {

 vint16 touchX, touchY;
 vint16 touchXpx, touchYpx;
 vint16 touchZ1, touchZ2;
 vuint16 tdiode1, tdiode2;
 vuint32 temperature;

 uint16 buttons;

 union {
  vuint8 curtime[8];

  struct {
   vu8 command;
   vu8 year;
   vu8 month;
   vu8 day;

   vu8 weekday;
   vu8 hours;
   vu8 minutes;
   vu8 seconds;
  } rtc;
 } time;
 vint32 unixTime;

 uint16 battery;
 uint16 aux;


 pTransferSound soundData;

 vuint32 mailAddr;
 vuint32 mailData;
 vuint8 mailRead;
 vuint8 mailBusy;
 vuint32 mailSize;
} TransferRegion, * pTransferRegion;


static inline
TransferRegion volatile * getIPC();

static inline
TransferRegion volatile * getIPC() {
 return (TransferRegion volatile *)(0x027FF000);
}
# 119 "/home/lifning/hack/devkitPro/libnds/include/nds/ipc.h"
enum IPC_SYNC_BITS {
 IPC_SYNC_IRQ_ENABLE = (1 << (14)),
 IPC_SYNC_IRQ_REQUEST = (1 << (13))
};


static inline void IPC_SendSync(unsigned int sync) {

 (*(vuint16*)0x04000180) = ((*(vuint16*)0x04000180) & 0xf0ff) | (((sync) & 0x0f) << 8) | IPC_SYNC_IRQ_REQUEST;
}


static inline int IPC_GetSync() {

 return (*(vuint16*)0x04000180) & 0x0f;
}
# 143 "/home/lifning/hack/devkitPro/libnds/include/nds/ipc.h"
enum IPC_CONTROL_BITS {
 IPC_FIFO_SEND_EMPTY = (1<<0),
 IPC_FIFO_SEND_FULL = (1<<1),
 IPC_FIFO_SEND_IRQ = (1<<2),
 IPC_FIFO_SEND_CLEAR = (1<<3),
 IPC_FIFO_RECV_EMPTY = (1<<8),
 IPC_FIFO_RECV_FULL = (1<<9),
 IPC_FIFO_RECV_IRQ = (1<<10),
 IPC_FIFO_ERROR = (1<<14),
 IPC_FIFO_ENABLE = (1<<15)
};
# 50 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/memory.h" 1
# 104 "/home/lifning/hack/devkitPro/libnds/include/nds/memory.h"
typedef struct sGBAHeader {
 uint32 entryPoint;
 uint8 logo[156];
 char title[0xC];
 char gamecode[0x4];
 uint16 makercode;
 uint8 is96h;
 uint8 unitcode;
 uint8 devicecode;
 uint8 unused[7];
 uint8 version;
 uint8 complement;
 uint16 checksum;
} __attribute__ ((__packed__)) tGBAHeader;




typedef struct sNDSHeader {
  char gameTitle[12];
  char gameCode[4];
  char makercode[2];
  uint8 unitCode;
  uint8 deviceType;
  uint8 deviceSize;
  uint8 reserved1[9];
  uint8 romversion;
  uint8 flags;

  uint32 arm9romSource;
  uint32 arm9executeAddress;
  uint32 arm9destination;
  uint32 arm9binarySize;

  uint32 arm7romSource;
  uint32 arm7executeAddress;
  uint32 arm7destination;
  uint32 arm7binarySize;

  uint32 filenameSource;
  uint32 filenameSize;
  uint32 fatSource;
  uint32 fatSize;

  uint32 arm9overlaySource;
  uint32 arm9overlaySize;
  uint32 arm7overlaySource;
  uint32 arm7overlaySize;

  uint32 cardControl13;
  uint32 cardControlBF;
  uint32 bannerOffset;

  uint16 secureCRC16;

  uint16 readTimeout;

  uint32 unknownRAM1;
  uint32 unknownRAM2;

  uint32 bfPrime1;
  uint32 bfPrime2;
  uint32 romSize;

  uint32 headerSize;
  uint32 zeros88[14];
  uint8 gbaLogo[156];
  uint16 logoCRC16;
  uint16 headerCRC16;

  uint32 debugRomSource;
  uint32 debugRomSize;
  uint32 debugRomDestination;
  uint32 offset_0x16C;

  uint8 zero[0x90];
} __attribute__ ((__packed__)) tNDSHeader;




typedef struct sNDSBanner {
  uint16 version;
  uint16 crc;
  uint8 reserved[28];
  uint8 icon[512];
  uint16 palette[16];
  uint16 titles[6][128];
} __attribute__ ((__packed__)) tNDSBanner;
# 204 "/home/lifning/hack/devkitPro/libnds/include/nds/memory.h"
static inline void sysSetCartOwner(bool arm9) {
  (*(vuint16*)0x04000204) = ((*(vuint16*)0x04000204) & ~(1 << (7))) | (arm9 ? 0 : (1 << (7)));
}

static inline void sysSetCardOwner(bool arm9) {
  (*(vuint16*)0x04000204) = ((*(vuint16*)0x04000204) & ~(1 << (11))) | (arm9 ? 0 : (1 << (11)));
}


static inline void sysSetBusOwners(bool arm9rom, bool arm9card) {
  uint16 pattern = (*(vuint16*)0x04000204) & ~((1 << (11))|(1 << (7)));
  pattern = pattern | (arm9card ? 0: (1 << (11)) ) |
                      (arm9rom ? 0: (1 << (7)) );
  (*(vuint16*)0x04000204) = pattern;
}
# 51 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h" 1
# 62 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
static inline
void SetYtrigger(int Yvalue) {
 (*(vu16*)0x04000004) = ((*(vu16*)0x04000004) & 0x007F ) | (Yvalue << 8) | (( Yvalue & 0x100 ) >> 2) ;
}
# 88 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
static inline
void powerON(int on) { *(vu16*)0x4000304 |= on;}







static inline void powerSET(int on) { *(vu16*)0x4000304 = on;}




static inline void powerOFF(int off) { *(vu16*)0x4000304 &= ~off;}
# 137 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
static inline void lcdSwap(void) { *(vu16*)0x4000304 ^= (1 << (15)); }


static inline void lcdMainOnTop(void) { *(vu16*)0x4000304 |= (1 << (15)); }


static inline void lcdMainOnBottom(void) { *(vu16*)0x4000304 &= ~(1 << (15)); }
# 173 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
typedef struct tPERSONAL_DATA {
  u8 RESERVED0[2];

  u8 theme;
  u8 birthMonth;
  u8 birthDay;

  u8 RESERVED1[1];

  s16 name[10];
  u16 nameLen;

  s16 message[26];
  u16 messageLen;

  u8 alarmHour;
  u8 alarmMinute;


  u8 RESERVED2[4];


  u16 calX1;
  u16 calY1;
  u8 calX1px;
  u8 calY1px;

  u16 calX2;
  u16 calY2;
  u8 calX2px;
  u8 calY2px;

  struct __attribute__ ((packed)) {
    unsigned language : 3;
    unsigned gbaScreen : 1;
    unsigned defaultBrightness : 2;
    unsigned autoMode : 1;
    unsigned RESERVED1 : 2;
 unsigned settingsLost : 1;
 unsigned RESERVED2 : 6;
  } _user_data;

  u16 RESERVED3;
  u32 rtcOffset;
  u32 RESERVED4;
} __attribute__ ((packed)) PERSONAL_DATA ;
# 238 "/home/lifning/hack/devkitPro/libnds/include/nds/system.h"
struct __argv {
 int argvMagic;
 char *commandLine;
 int length;
};
# 52 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/timers.h" 1
# 53 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2





# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/background.h" 1
# 59 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h" 1
# 35 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/video.h" 1
# 70 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/video.h"
typedef enum {
 VRAM_A_LCD = 0,
 VRAM_A_MAIN_BG = 1,
 VRAM_A_MAIN_BG_0x06000000 = 1 | ((0)<<3),
 VRAM_A_MAIN_BG_0x06020000 = 1 | ((1)<<3),
 VRAM_A_MAIN_BG_0x06040000 = 1 | ((2)<<3),
 VRAM_A_MAIN_BG_0x06060000 = 1 | ((3)<<3),
 VRAM_A_MAIN_SPRITE = 2,
 VRAM_A_MAIN_SPRITE_0x06400000 = 2,
 VRAM_A_MAIN_SPRITE_0x06420000 = 2 | ((1)<<3),
 VRAM_A_TEXTURE = 3,
 VRAM_A_TEXTURE_SLOT0 = 3 | ((0)<<3),
 VRAM_A_TEXTURE_SLOT1 = 3 | ((1)<<3),
 VRAM_A_TEXTURE_SLOT2 = 3 | ((2)<<3),
 VRAM_A_TEXTURE_SLOT3 = 3 | ((3)<<3)
} VRAM_A_TYPE;

typedef enum {
 VRAM_B_LCD = 0,
 VRAM_B_MAIN_BG = 1 | ((1)<<3),
 VRAM_B_MAIN_BG_0x06000000 = 1 | ((0)<<3),
 VRAM_B_MAIN_BG_0x06020000 = 1 | ((1)<<3),
 VRAM_B_MAIN_BG_0x06040000 = 1 | ((2)<<3),
 VRAM_B_MAIN_BG_0x06060000 = 1 | ((3)<<3),
 VRAM_B_MAIN_SPRITE = 2 | ((1)<<3),
 VRAM_B_MAIN_SPRITE_0x06400000 = 2,
 VRAM_B_MAIN_SPRITE_0x06420000 = 2 | ((1)<<3),
 VRAM_B_TEXTURE = 3 | ((1)<<3),
 VRAM_B_TEXTURE_SLOT0 = 3 | ((0)<<3),
 VRAM_B_TEXTURE_SLOT1 = 3 | ((1)<<3),
 VRAM_B_TEXTURE_SLOT2 = 3 | ((2)<<3),
 VRAM_B_TEXTURE_SLOT3 = 3 | ((3)<<3)
} VRAM_B_TYPE;

typedef enum {
 VRAM_C_LCD = 0,
 VRAM_C_MAIN_BG = 1 | ((2)<<3),
 VRAM_C_MAIN_BG_0x06000000 = 1 | ((0)<<3),
 VRAM_C_MAIN_BG_0x06020000 = 1 | ((1)<<3),
 VRAM_C_MAIN_BG_0x06040000 = 1 | ((2)<<3),
 VRAM_C_MAIN_BG_0x06060000 = 1 | ((3)<<3),
 VRAM_C_ARM7 = 2,
 VRAM_C_ARM7_0x06000000 = 2,
 VRAM_C_ARM7_0x06020000 = 2 | ((1)<<3),
 VRAM_C_SUB_BG = 4,
 VRAM_C_SUB_BG_0x06200000 = 4 | ((0)<<3),
 VRAM_C_SUB_BG_0x06220000 = 4 | ((1)<<3),
 VRAM_C_SUB_BG_0x06240000 = 4 | ((2)<<3),
 VRAM_C_SUB_BG_0x06260000 = 4 | ((3)<<3),
 VRAM_C_TEXTURE = 3 | ((2)<<3),
 VRAM_C_TEXTURE_SLOT0 = 3 | ((0)<<3),
 VRAM_C_TEXTURE_SLOT1 = 3 | ((1)<<3),
 VRAM_C_TEXTURE_SLOT2 = 3 | ((2)<<3),
 VRAM_C_TEXTURE_SLOT3 = 3 | ((3)<<3)
} VRAM_C_TYPE;

typedef enum {
 VRAM_D_LCD = 0,
 VRAM_D_MAIN_BG = 1 | ((3)<<3),
 VRAM_D_MAIN_BG_0x06000000 = 1 | ((0)<<3),
 VRAM_D_MAIN_BG_0x06020000 = 1 | ((1)<<3),
 VRAM_D_MAIN_BG_0x06040000 = 1 | ((2)<<3),
 VRAM_D_MAIN_BG_0x06060000 = 1 | ((3)<<3),
 VRAM_D_ARM7 = 2 | ((1)<<3),
 VRAM_D_ARM7_0x06000000 = 2,
 VRAM_D_ARM7_0x06020000 = 2 | ((1)<<3),
 VRAM_D_SUB_SPRITE = 4,
 VRAM_D_TEXTURE = 3 | ((3)<<3),
 VRAM_D_TEXTURE_SLOT0 = 3 | ((0)<<3),
 VRAM_D_TEXTURE_SLOT1 = 3 | ((1)<<3),
 VRAM_D_TEXTURE_SLOT2 = 3 | ((2)<<3),
 VRAM_D_TEXTURE_SLOT3 = 3 | ((3)<<3)
} VRAM_D_TYPE;

typedef enum {
 VRAM_E_LCD = 0,
 VRAM_E_MAIN_BG = 1,
 VRAM_E_MAIN_SPRITE = 2,
 VRAM_E_TEX_PALETTE = 3,
 VRAM_E_BG_EXT_PALETTE = 4,
 VRAM_E_OBJ_EXT_PALETTE = 5,
} VRAM_E_TYPE;

typedef enum {
 VRAM_F_LCD = 0,
 VRAM_F_MAIN_BG = 1,
 VRAM_F_MAIN_SPRITE = 2,
 VRAM_F_MAIN_SPRITE_0x06000000 = 2,
 VRAM_F_MAIN_SPRITE_0x06004000 = 2 | ((1)<<3),
 VRAM_F_MAIN_SPRITE_0x06010000 = 2 | ((2)<<3),
 VRAM_F_MAIN_SPRITE_0x06014000 = 2 | ((3)<<3),
 VRAM_F_TEX_PALETTE = 3,
 VRAM_F_BG_EXT_PALETTE = 4,
 VRAM_F_OBJ_EXT_PALETTE = 5,
} VRAM_F_TYPE;

typedef enum {
 VRAM_G_LCD = 0,
 VRAM_G_MAIN_BG = 1,
 VRAM_G_MAIN_SPRITE = 2,
 VRAM_G_MAIN_SPRITE_0x06000000 = 2,
 VRAM_G_MAIN_SPRITE_0x06004000 = 2 | ((1)<<3),
 VRAM_G_MAIN_SPRITE_0x06010000 = 2 | ((2)<<3),
 VRAM_G_MAIN_SPRITE_0x06014000 = 2 | ((3)<<3),
 VRAM_G_TEX_PALETTE = 3,
 VRAM_G_BG_EXT_PALETTE = 4,
 VRAM_G_OBJ_EXT_PALETTE = 5,
} VRAM_G_TYPE;

typedef enum {
 VRAM_H_LCD = 0,
 VRAM_H_SUB_BG = 1,
 VRAM_H_SUB_BG_EXT_PALETTE = 2,
} VRAM_H_TYPE;

typedef enum {
 VRAM_I_LCD = 0,
 VRAM_I_SUB_BG = 1,
 VRAM_I_SUB_SPRITE = 2,
 VRAM_I_SUB_SPRITE_EXT_PALETTE = 3,
}VRAM_I_TYPE;


typedef u16 _palette[256];
typedef _palette _ext_palette[16];







uint32 vramSetMainBanks(VRAM_A_TYPE a, VRAM_B_TYPE b, VRAM_C_TYPE c, VRAM_D_TYPE d);
void vramRestoreMainBanks(uint32 vramTemp);

void vramSetBankA(VRAM_A_TYPE a);
void vramSetBankB(VRAM_B_TYPE b);
void vramSetBankC(VRAM_C_TYPE c);
void vramSetBankD(VRAM_D_TYPE d);
void vramSetBankE(VRAM_E_TYPE e);
void vramSetBankF(VRAM_F_TYPE f);
void vramSetBankG(VRAM_G_TYPE g);
void vramSetBankH(VRAM_H_TYPE h);
void vramSetBankI(VRAM_I_TYPE i);
# 291 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/video.h"
static inline
void videoSetMode( uint32 mode) { (*(vuint32*)0x04000000) = mode; }
static inline
void videoSetModeSub( uint32 mode) { (*(vuint32*)0x04001000) = mode; }
# 366 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/video.h"
typedef struct {
 u16 x;
 u16 y;
} bg_scroll;

typedef struct {
    u16 xdx;
    u16 xdy;
    u16 ydx;
    u16 ydy;
    u32 centerX;
    u32 centerY;
} bg_rotation;

typedef struct {
    u16 control[4];
    bg_scroll scroll[4];
    bg_rotation bg2_rotation;
    bg_rotation bg3_rotation;
} bg_attribute;
# 36 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h" 1
# 54 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/math.h" 1
# 94 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/math.h"
static inline int32 divf32(int32 num, int32 den)
{
 (*(vuint16*)(0x04000280)) = 1;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 (*(vint64*) (0x04000290)) = ((int64)num) << 12;
 (*(vint32*) (0x04000298)) = den;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 return ((*(vint32*) (0x040002A0)));
}




static inline int32 mulf32(int32 a, int32 b)
{
 long long result = (long long)a*(long long)b;
 return (int32)(result >> 12);
}




static inline int32 sqrtf32(int32 a)
{
 (*(vuint16*)(0x040002B0)) = 1;

 while((*(vuint16*)(0x040002B0)) & (1<<15));

 (*(vint64*) (0x040002B8)) = ((int64)a) << 12;

 while((*(vuint16*)(0x040002B0)) & (1<<15));

 return (*(vint32*) (0x040002B4));
}






static inline int32 div32(int32 num, int32 den)
{
 (*(vuint16*)(0x04000280)) = 0;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 (*(vint32*) (0x04000290)) = num;
 (*(vint32*) (0x04000298)) = den;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 return ((*(vint32*) (0x040002A0)));
}




static inline int32 mod32(int32 num, int32 den)
{
 (*(vuint16*)(0x04000280)) = 0;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 (*(vint32*) (0x04000290)) = num;
 (*(vint32*) (0x04000298)) = den;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 return ((*(vint32*) (0x040002A8)));
}




static inline int32 div64(int64 num, int32 den)
{
 (*(vuint16*)(0x04000280)) = 1;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 (*(vint64*) (0x04000290)) = num;
 (*(vint32*) (0x04000298)) = den;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 return ((*(vint32*) (0x040002A0)));
}




static inline int32 mod64(int64 num, int32 den)
{
 (*(vuint16*)(0x04000280)) = 1;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 (*(vint64*) (0x04000290)) = num;
 (*(vint32*) (0x04000298)) = den;

 while((*(vuint16*)(0x04000280)) & (1<<15));

 return ((*(vint32*) (0x040002A8)));
}




static inline int32 sqrt32(int a)
{
 (*(vuint16*)(0x040002B0)) = 0;

 while((*(vuint16*)(0x040002B0)) & (1<<15));

 (*(vint32*) (0x040002B8)) = a;

 while((*(vuint16*)(0x040002B0)) & (1<<15));

 return (*(vint32*) (0x040002B4));
}







static inline void crossf32(int32 *a, int32 *b, int32 *result)
{
 result[0] = mulf32(a[1], b[2]) - mulf32(b[1], a[2]);
 result[1] = mulf32(a[2], b[0]) - mulf32(b[2], a[0]);
 result[2] = mulf32(a[0], b[1]) - mulf32(b[0], a[1]);
}



static inline int32 dotf32(int32 *a, int32 *b)
{
 return mulf32(a[0], b[0]) + mulf32(a[1], b[1]) + mulf32(a[2], b[2]);
}





static inline void normalizef32(int32* a)
{

 int32 magnitude = sqrtf32( mulf32(a[0], a[0]) + mulf32(a[1], a[1]) + mulf32(a[2], a[2]) );

 a[0] = divf32(a[0], magnitude);
 a[1] = divf32(a[1], magnitude);
 a[2] = divf32(a[2], magnitude);
}
# 55 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/trig_lut.h" 1
# 44 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/trig_lut.h"
extern short COS_bin[];
extern short SIN_bin[];
extern short TAN_bin[];
# 56 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/cache.h" 1
# 46 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/cache.h"
void IC_InvalidateAll();







void IC_InvalidateRange(const void *base, u32 size);





void DC_FlushAll();







void DC_FlushRange(const void *base, u32 size);





void DC_InvalidateAll();







void DC_InvalidateRange(const void *base, u32 size);
# 57 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h" 2
# 77 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
typedef uint16 fixed12d3;
# 90 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
typedef short int t16;






typedef short int v16;






typedef short int v10;
# 113 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
typedef unsigned short rgb;


typedef struct {
 int32 m[9];
} m3x3;


typedef struct {
 int32 m[16];
} m4x4;


typedef struct {
 int32 m[12];
} m4x3;


typedef struct {
 int32 x, y, z;
} GLvector;
# 143 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
typedef enum {
 GL_TRIANGLES = 0,
 GL_QUADS = 1,
 GL_TRIANGLE_STRIP = 2,
 GL_QUAD_STRIP = 3,
 GL_TRIANGLE = 0,
 GL_QUAD = 1
} GL_GLBEGIN_ENUM;




typedef enum {
 GL_PROJECTION = 0,
 GL_POSITION = 1,
 GL_MODELVIEW = 2,
 GL_TEXTURE = 3
} GL_MATRIX_MODE_ENUM;




typedef enum {
 GL_AMBIENT = 0x01,
 GL_DIFFUSE = 0x02,
 GL_AMBIENT_AND_DIFFUSE = 0x03,
 GL_SPECULAR = 0x04,
 GL_SHININESS = 0x08,
 GL_EMISSION = 0x10
} GL_MATERIALS_ENUM;




enum GL_POLY_FORMAT_ENUM {
 POLY_FORMAT_LIGHT0 = (1<<0),
 POLY_FORMAT_LIGHT1 = (1<<1),
 POLY_FORMAT_LIGHT2 = (1<<2),
 POLY_FORMAT_LIGHT3 = (1<<3),
 POLY_MODULATION = (0<<4),
 POLY_DECAL = (1<<4),
 POLY_TOON_HIGHLIGHT = (2<<4),
 POLY_SHADOW = (3<<4),
 POLY_CULL_FRONT = (1<<6),
 POLY_CULL_BACK = (2<<6),
 POLY_CULL_NONE = (3<<6),
 POLY_FOG = (1<<15)
};



enum GL_TEXTURE_SIZE_ENUM {
 TEXTURE_SIZE_8 = 0,
 TEXTURE_SIZE_16 = 1,
 TEXTURE_SIZE_32 = 2,
 TEXTURE_SIZE_64 = 3,
 TEXTURE_SIZE_128 = 4,
 TEXTURE_SIZE_256 = 5,
 TEXTURE_SIZE_512 = 6,
 TEXTURE_SIZE_1024 = 7
};




enum GL_TEXTURE_PARAM_ENUM {
 GL_TEXTURE_WRAP_S = (1 << 16),
 GL_TEXTURE_WRAP_T = (1 << 17),
 GL_TEXTURE_FLIP_S = (1 << 18),
 GL_TEXTURE_FLIP_T = (1 << 19),
 GL_TEXTURE_COLOR0_TRANSPARENT = (1<<29),
 TEXGEN_OFF = (0<<30),
 TEXGEN_TEXCOORD = (1<<30),
 TEXGEN_NORMAL = (2<<30),
 TEXGEN_POSITION = (3<<30)
};




typedef enum {
 GL_RGB32_A3 = 1,
 GL_RGB4 = 2,
 GL_RGB16 = 3,
 GL_RGB256 = 4,
 GL_COMPRESSED = 5,
 GL_RGB8_A5 = 6,
 GL_RGBA = 7,
 GL_RGB = 8
} GL_TEXTURE_TYPE_ENUM;




enum DISP3DCNT_ENUM {
 GL_TEXTURE_2D = (1<<0),
 GL_TOON_HIGHLIGHT = (1<<1),
 GL_ALPHA_TEST = (1<<2),
 GL_BLEND = (1<<3),
 GL_ANTIALIAS = (1<<4),
 GL_OUTLINE = (1<<5),
 GL_FOG_ONLY_ALPHA = (1<<6),
 GL_FOG = (1<<7),
 GL_COLOR_UNDERFLOW = (1<<12),
 GL_POLY_OVERFLOW = (1<<13),
 GL_CLEAR_BMP = (1<<14)
};




typedef enum {
 GL_GET_VERTEX_RAM_COUNT,
 GL_GET_POLYGON_RAM_COUNT,
 GL_GET_MATRIX_VECTOR,
 GL_GET_MATRIX_POSITION,
 GL_GET_MATRIX_PROJECTION,
 GL_GET_MATRIX_CLIP,
 GL_GET_TEXTURE_WIDTH,
 GL_GET_TEXTURE_HEIGHT
} GL_GET_ENUM;





enum GLFLUSH_ENUM {
 GL_TRANS_MANUALSORT = (1<<0),
 GL_WBUFFERING = (1<<1)
};
# 281 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
typedef struct {
 GL_MATRIX_MODE_ENUM matrixMode;


 uint32 clearColor;


 uint32 textures[2048];
 uint32 activeTexture;
 uint32* nextBlock;
 uint32 nextPBlock;
 int nameCount;

} gl_hidden_globals;


static gl_hidden_globals* glGlob = 0;
# 344 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
void glRotatef32i(int angle, int32 x, int32 y, int32 z);
# 355 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
int glTexImage2D(int target, int empty1, GL_TEXTURE_TYPE_ENUM type, int sizeX, int sizeY, int empty2, int param, const uint8* texture);





void glTexLoadPal(const u16* pal, u16 count, u32 addr );





int gluTexLoadPal(const u16* pal, u16 count, uint8 format);







void glTexParameter( uint8 sizeX, uint8 sizeY,
      const uint32* addr,
      GL_TEXTURE_TYPE_ENUM mode,
      uint32 param) ;


u32 glGetTexParameter();



void* glGetTexturePointer( int name);




void glBindTexture(int target, int name);


void glColorTable(uint8 format, uint32 addr);




int glGenTextures(int n, int *names);


void glResetTextures(void);





void glTexCoord2f32(int32 u, int32 v);




void glMaterialf(GL_MATERIALS_ENUM mode, rgb color);


void glInit_C(void);


gl_hidden_globals* glGetGlobals();
# 462 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline uint32 POLY_ALPHA(int n) { return (uint32)((n) << 16); };



static inline uint32 POLY_ID(int n) { return (uint32)((n)<<24); };



static inline void glBegin(GL_GLBEGIN_ENUM mode) { (*(vuint32*) 0x04000500) = mode; }


static inline void glEnd(void) { (*(vuint32*) 0x04000504) = 0; }




static inline void glClearDepth(fixed12d3 depth) { (*(vuint16*) 0x04000354) = depth; }






static inline void glColor3b(uint8 red, uint8 green, uint8 blue) { (*(vuint32*) 0x04000480) = (vuint32)((red>>3)|((green>>3)<<5)|((blue>>3)<<10)); }



static inline void glColor(rgb color) { (*(vuint32*) 0x04000480) = (vuint32)color; }





static inline void glVertex3v16(v16 x, v16 y, v16 z) {
 (*(vuint32*) 0x0400048C) = (y << 16) | (x & 0xFFFF);
 (*(vuint32*) 0x0400048C) = ((uint32)(uint16)z);
}





static inline void glTexCoord2t16(t16 u, t16 v) { (*(vuint32*) 0x04000488) = ((u & 0xFFFF) | ((v) << 16)); }



static inline void glPushMatrix(void) { (*(vuint32*)0x04000444) = 0; }




static inline void glPopMatrix(int32 num) { (*(vuint32*)0x04000448) = num; }




static inline void glRestoreMatrix(int32 index) { (*(vuint32*)0x04000450) = index; }




static inline void glStoreMatrix(int32 index) { (*(vuint32*)0x0400044C) = index; }




static inline void glScalev(const GLvector* v) {
 (*(vint32*) 0x0400046C) = v->x;
 (*(vint32*) 0x0400046C) = v->y;
 (*(vint32*) 0x0400046C) = v->z;
}




static inline void glTranslatev(const GLvector* v) {
 (*(vint32*) 0x04000470) = v->x;
 (*(vint32*) 0x04000470) = v->y;
 (*(vint32*) 0x04000470) = v->z;
}






static inline void glTranslate3f32(int32 x, int32 y, int32 z) {
 (*(vint32*) 0x04000470) = x;
 (*(vint32*) 0x04000470) = y;
 (*(vint32*) 0x04000470) = z;
}




static inline void glScalef32(int32 factor) {
 (*(vint32*) 0x0400046C) = factor;
 (*(vint32*) 0x0400046C) = factor;
 (*(vint32*) 0x0400046C) = factor;
}
# 570 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline void glLight(int id, rgb color, v10 x, v10 y, v10 z) {
 id = (id & 3) << 30;
 (*(vuint32*) 0x040004C8) = id | ((z & 0x3FF) << 20) | ((y & 0x3FF) << 10) | (x & 0x3FF);
 (*(vuint32*) 0x040004CC) = id | color;
}





static inline void glNormal(uint32 normal) { (*(vuint32*) 0x04000484) = normal; }


static inline void glLoadIdentity(void) { (*(vuint32*)0x04000454) = 0; }




static inline void glMatrixMode(GL_MATRIX_MODE_ENUM mode) { (*(vuint32*)0x04000440) = mode; }







static inline void glViewport(uint8 x1, uint8 y1, uint8 x2, uint8 y2) { (*(vuint32*) 0x04000580) = (x1) + (y1 << 8) + (x2 << 16) + (y2 << 24); }




static inline void glFlush(uint32 mode) { (*(vuint32*) 0x04000540) = mode; }


static inline void glMaterialShinyness(void) {
 uint32 shiny32[128/4];
 uint8 *shiny8 = (uint8*)shiny32;

 int i;

 for (i = 0; i < 128 * 2; i += 2)
  shiny8[i>>1] = i;

 for (i = 0; i < 128 / 4; i++)
  (*(vuint32*) 0x040004D0) = shiny32[i];
}






static inline void glCallList(const u32* list) {
 u32 count = *list++;


 DC_FlushRange(list, count*4);



 while(((*(vuint32*)(0x040000B8+(0*12))) & (1 << (31)))||((*(vuint32*)(0x040000B8+(1*12))) & (1 << (31)))||((*(vuint32*)(0x040000B8+(2*12))) & (1 << (31)))||((*(vuint32*)(0x040000B8+(3*12))) & (1 << (31))));


 (*(vuint32*)(0x040000B0+(0*12))) = (uint32)list;
 (*(vuint32*)(0x040000B4+(0*12))) = 0x4000400;
 (*(vuint32*)(0x040000B8+(0*12))) = ((1 << (31)) | (1 << (26)) | (1 << (22)) | (7<<27)) | count;
 while((*(vuint32*)(0x040000B8+(0*12))) & (1 << (31)));
}




static inline void glPolyFmt(uint32 params) { (*(vuint32*) 0x040004A4) = params; }



static inline void glEnable(int bits) { (*(vuint16*) 0x04000060) |= bits; }



static inline void glDisable(int bits) { (*(vuint16*) 0x04000060) &= ~bits; }



static inline void glLoadMatrix4x4(const m4x4 *m) {
 (*(vint32*) 0x04000458) = m->m[0];
 (*(vint32*) 0x04000458) = m->m[1];
 (*(vint32*) 0x04000458) = m->m[2];
 (*(vint32*) 0x04000458) = m->m[3];

 (*(vint32*) 0x04000458) = m->m[4];
 (*(vint32*) 0x04000458) = m->m[5];
 (*(vint32*) 0x04000458) = m->m[6];
 (*(vint32*) 0x04000458) = m->m[7];

 (*(vint32*) 0x04000458) = m->m[8];
 (*(vint32*) 0x04000458) = m->m[9];
 (*(vint32*) 0x04000458) = m->m[10];
 (*(vint32*) 0x04000458) = m->m[11];

 (*(vint32*) 0x04000458) = m->m[12];
 (*(vint32*) 0x04000458) = m->m[13];
 (*(vint32*) 0x04000458) = m->m[14];
 (*(vint32*) 0x04000458) = m->m[15];
}



static inline void glLoadMatrix4x3(const m4x3 * m) {
 (*(vint32*) 0x0400045C) = m->m[0];
 (*(vint32*) 0x0400045C) = m->m[1];
 (*(vint32*) 0x0400045C) = m->m[2];
 (*(vint32*) 0x0400045C) = m->m[3];

 (*(vint32*) 0x0400045C) = m->m[4];
 (*(vint32*) 0x0400045C) = m->m[5];
 (*(vint32*) 0x0400045C) = m->m[6];
 (*(vint32*) 0x0400045C) = m->m[7];

 (*(vint32*) 0x0400045C) = m->m[8];
 (*(vint32*) 0x0400045C) = m->m[9];
 (*(vint32*) 0x0400045C) = m->m[10];
 (*(vint32*) 0x0400045C) = m->m[11];
}



static inline void glMultMatrix4x4(const m4x4 * m) {
 (*(vint32*) 0x04000460) = m->m[0];
 (*(vint32*) 0x04000460) = m->m[1];
 (*(vint32*) 0x04000460) = m->m[2];
 (*(vint32*) 0x04000460) = m->m[3];

 (*(vint32*) 0x04000460) = m->m[4];
 (*(vint32*) 0x04000460) = m->m[5];
 (*(vint32*) 0x04000460) = m->m[6];
 (*(vint32*) 0x04000460) = m->m[7];

 (*(vint32*) 0x04000460) = m->m[8];
 (*(vint32*) 0x04000460) = m->m[9];
 (*(vint32*) 0x04000460) = m->m[10];
 (*(vint32*) 0x04000460) = m->m[11];

 (*(vint32*) 0x04000460) = m->m[12];
 (*(vint32*) 0x04000460) = m->m[13];
 (*(vint32*) 0x04000460) = m->m[14];
 (*(vint32*) 0x04000460) = m->m[15];
}



static inline void glMultMatrix4x3(const m4x3 * m) {
 (*(vint32*) 0x04000464) = m->m[0];
 (*(vint32*) 0x04000464) = m->m[1];
 (*(vint32*) 0x04000464) = m->m[2];
 (*(vint32*) 0x04000464) = m->m[3];

 (*(vint32*) 0x04000464) = m->m[4];
 (*(vint32*) 0x04000464) = m->m[5];
 (*(vint32*) 0x04000464) = m->m[6];
 (*(vint32*) 0x04000464) = m->m[7];

 (*(vint32*) 0x04000464) = m->m[8];
 (*(vint32*) 0x04000464) = m->m[9];
 (*(vint32*) 0x04000464) = m->m[10];
 (*(vint32*) 0x04000464) = m->m[11];

}



static inline void glMultMatrix3x3(const m3x3 * m) {
 (*(vint32*) 0x04000468) = m->m[0];
 (*(vint32*) 0x04000468) = m->m[1];
 (*(vint32*) 0x04000468) = m->m[2];

 (*(vint32*) 0x04000468) = m->m[3];
 (*(vint32*) 0x04000468) = m->m[4];
 (*(vint32*) 0x04000468) = m->m[5];

 (*(vint32*) 0x04000468) = m->m[6];
 (*(vint32*) 0x04000468) = m->m[7];
 (*(vint32*) 0x04000468) = m->m[8];
}



static inline void glRotateXi(int angle) {
 int32 sine = SIN_bin[angle & (0x1FF)];
 int32 cosine = COS_bin[angle & (0x1FF)];

 (*(vint32*) 0x04000468) = ((1) << 12);
 (*(vint32*) 0x04000468) = 0;
 (*(vint32*) 0x04000468) = 0;

 (*(vint32*) 0x04000468) = 0;
 (*(vint32*) 0x04000468) = cosine;
 (*(vint32*) 0x04000468) = sine;

 (*(vint32*) 0x04000468) = 0;
 (*(vint32*) 0x04000468) = -sine;
 (*(vint32*) 0x04000468) = cosine;
}



static inline void glRotateYi(int angle) {
 int32 sine = SIN_bin[angle & (0x1FF)];
 int32 cosine = COS_bin[angle & (0x1FF)];

 (*(vint32*) 0x04000468) = cosine;
 (*(vint32*) 0x04000468) = 0;
 (*(vint32*) 0x04000468) = -sine;

 (*(vint32*) 0x04000468) = 0;
 (*(vint32*) 0x04000468) = ((1) << 12);
 (*(vint32*) 0x04000468) = 0;

 (*(vint32*) 0x04000468) = sine;
 (*(vint32*) 0x04000468) = 0;
 (*(vint32*) 0x04000468) = cosine;
}



static inline void glRotateZi(int angle) {
 int32 sine = SIN_bin[angle & (0x1FF)];
 int32 cosine = COS_bin[angle & (0x1FF)];

 (*(vint32*) 0x04000468) = cosine;
 (*(vint32*) 0x04000468) = sine;
 (*(vint32*) 0x04000468) = 0;

 (*(vint32*) 0x04000468) = - sine;
 (*(vint32*) 0x04000468) = cosine;
 (*(vint32*) 0x04000468) = 0;

 (*(vint32*) 0x04000468) = 0;
 (*(vint32*) 0x04000468) = 0;
 (*(vint32*) 0x04000468) = ((1) << 12);
}
# 820 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline void glOrthof32(int32 left, int32 right, int32 bottom, int32 top, int32 zNear, int32 zFar) {
 (*(vint32*) 0x04000460) = divf32(((2) << 12), right - left);
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;

 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = divf32(((2) << 12), top - bottom);
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;

 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = divf32(((-2) << 12), zFar - zNear);
 (*(vint32*) 0x04000460) = 0;

 (*(vint32*) 0x04000460) = -divf32(right + left, right - left);
 (*(vint32*) 0x04000460) = -divf32(top + bottom, top - bottom);
 (*(vint32*) 0x04000460) = -divf32(zFar + zNear, zFar - zNear);
 (*(vint32*) 0x04000460) = ((int32)((1.0F) * (1 << 12)));
}
# 852 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline void gluLookAtf32(int32 eyex, int32 eyey, int32 eyez, int32 lookAtx, int32 lookAty, int32 lookAtz, int32 upx, int32 upy, int32 upz) {
 int32 side[3], forward[3], up[3], eye[3];

 forward[0] = eyex - lookAtx;
 forward[1] = eyey - lookAty;
 forward[2] = eyez - lookAtz;

 normalizef32(forward);

 up[0] = upx;
 up[1] = upy;
 up[2] = upz;
 eye[0] = eyex;
 eye[1] = eyey;
 eye[2] = eyez;

 crossf32(up, forward, side);

 normalizef32(side);


 crossf32(forward, side, up);

 glMatrixMode(GL_MODELVIEW);



 (*(vint32*) 0x04000464) = side[0];
 (*(vint32*) 0x04000464) = up[0];
 (*(vint32*) 0x04000464) = forward[0];

 (*(vint32*) 0x04000464) = side[1];
 (*(vint32*) 0x04000464) = up[1];
 (*(vint32*) 0x04000464) = forward[1];

 (*(vint32*) 0x04000464) = side[2];
 (*(vint32*) 0x04000464) = up[2];
 (*(vint32*) 0x04000464) = forward[2];

 (*(vint32*) 0x04000464) = -dotf32(eye,side);
 (*(vint32*) 0x04000464) = -dotf32(eye,up);
 (*(vint32*) 0x04000464) = -dotf32(eye,forward);

}
# 905 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline void glFrustumf32(int32 left, int32 right, int32 bottom, int32 top, int32 near, int32 far) {
# 928 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
 (*(vint32*) 0x04000460) = divf32(2*near, right - left);
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;

 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = divf32(2*near, top - bottom);
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;

 (*(vint32*) 0x04000460) = divf32(right + left, right - left);
 (*(vint32*) 0x04000460) = divf32(top + bottom, top - bottom);
 (*(vint32*) 0x04000460) = -divf32(far + near, far - near);
 (*(vint32*) 0x04000460) = ((int32)((-1.0F) * (1 << 12)));

 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = -divf32(2 * mulf32(far, near), far - near);
 (*(vint32*) 0x04000460) = 0;

}






static inline void gluPerspectivef32(int fovy, int32 aspect, int32 zNear, int32 zFar) {
 int32 xmin, xmax, ymin, ymax;

 ymax = mulf32(zNear, TAN_bin[(fovy>>1) & (0x1FF)]);
 ymin = -ymax;
 xmin = mulf32(ymin, aspect);
 xmax = mulf32(ymax, aspect);

 glFrustumf32(xmin, xmax, ymin, ymax, zNear, zFar);
}







static inline void gluPickMatrix(int x, int y, int width, int height, const int viewport[4]) {
 (*(vint32*) 0x04000460) = ((viewport[2]) << 12) / width;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = ((viewport[3]) << 12) / height;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = ((1) << 12);
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = ((viewport[2] + ((viewport[0] - x)<<1)) << 12) / width;
 (*(vint32*) 0x04000460) = ((viewport[3] + ((viewport[1] - y)<<1)) << 12) / height;
 (*(vint32*) 0x04000460) = 0;
 (*(vint32*) 0x04000460) = ((1) << 12);
}


static inline void glResetMatrixStack(void) {

 while((*(vuint32*) 0x04000600) & (1 << (14))){
  (*(vuint32*) 0x04000600) |= 1 << 15;
 }


 if(((*(vuint32*) 0x04000600)&(1<<13))!=0) {
  glMatrixMode(GL_PROJECTION);
  glPopMatrix(1);
 }


 glMatrixMode(GL_MODELVIEW);
 glPopMatrix(((*(vuint32*) 0x04000600) >> 8) & 0x1F);


 glMatrixMode(GL_MODELVIEW);
 glLoadIdentity();
 glMatrixMode(GL_PROJECTION);
 glLoadIdentity();
 glMatrixMode(GL_TEXTURE);
 glLoadIdentity();
}




static inline void glSetOutlineColor(int id, rgb color) { ((vuint16*) 0x04000330)[id] = color; }



static inline void glSetToonTable(const uint16 *table) {
 int i;
 for(i = 0; i < 32; i++ )
  ((vuint16*) 0x04000380)[i] = table[i];
}





static inline void glSetToonTableRange(int start, int end, rgb color) {
 int i;
 for(i = start; i <= end; i++ )
  ((vuint16*) 0x04000380)[i] = color;
}






static inline void glGetFixed(const GL_GET_ENUM param, int32* f) {
 int i;
 switch (param) {
  case GL_GET_MATRIX_VECTOR:
   while(((*(vuint32*) 0x04000600) & (1 << (27))));
   for(i = 0; i < 9; i++) f[i] = ((vint32*) (0x04000680))[i];
   break;
  case GL_GET_MATRIX_CLIP:
   while(((*(vuint32*) 0x04000600) & (1 << (27))));
   for(i = 0; i < 16; i++) f[i] = ((vint32*) (0x04000640))[i];
   break;
  case GL_GET_MATRIX_PROJECTION:
   glMatrixMode(GL_POSITION);
   glPushMatrix();
   glLoadIdentity();
   while(((*(vuint32*) 0x04000600) & (1 << (27))));
    for(i = 0; i < 16; i++) f[i] = ((vint32*) (0x04000640))[i];
   glPopMatrix(1);
   break;
  case GL_GET_MATRIX_POSITION:
   glMatrixMode(GL_PROJECTION);
   glPushMatrix();
   glLoadIdentity();
   while(((*(vuint32*) 0x04000600) & (1 << (27))));
    for(i = 0; i < 16; i++) f[i] = ((vint32*) (0x04000640))[i];
   glPopMatrix(1);
   break;
  default:
   break;
 }
}




static inline void glAlphaFunc(int alphaThreshold) { (*(vuint16*) 0x04000340) = alphaThreshold; }




static inline void glCutoffDepth(fixed12d3 wVal) { (*(uint16*)0x04000610) = wVal; }


static inline void glInit() {
 glGlob = glGetGlobals();
 glInit_C();
}






static inline void glClearColor(uint8 red, uint8 green, uint8 blue, uint8 alpha) {
 (*(vuint32*) 0x04000350) = glGlob->clearColor = ( glGlob->clearColor & 0xFFE08000) | (0x7FFF & ((red)|((green)<<5)|((blue)<<10))) | ((alpha & 0x1F) << 16);
}



static inline void glClearPolyID(uint8 ID) {
 (*(vuint32*) 0x04000350) = glGlob->clearColor = ( glGlob->clearColor & 0xC0FFFFFF) | (( ID & 0x3F ) << 24 );
}




static inline void glGetInt(GL_GET_ENUM param, int* i) {
 switch (param) {
  case GL_GET_POLYGON_RAM_COUNT:
   *i = (*(uint16*) 0x04000604);
   break;
  case GL_GET_VERTEX_RAM_COUNT:
   *i = (*(uint16*) 0x04000606);
   break;
  case GL_GET_TEXTURE_WIDTH:
   *i = 8 << (((glGlob->textures[glGlob->activeTexture]) >> 20) & 7);
   break;
  case GL_GET_TEXTURE_HEIGHT:
   *i = 8 << (((glGlob->textures[glGlob->activeTexture]) >> 23) & 7);
   break;
  default:
   break;
 }
}
# 1142 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline void glVertex3f(float x, float y, float z) {
 glVertex3v16(((v16)((x) * (1 << 12))), ((v16)((y) * (1 << 12))), ((v16)((z) * (1 << 12))));
}







static inline void glRotatef32(float angle, int32 x, int32 y, int32 z) {
    glRotatef32i((int)(angle * (512) / 360.0), x, y, z);
}







static inline void glRotatef(float angle, float x, float y, float z) {
 glRotatef32(angle, ((int32)((x) * (1 << 12))), ((int32)((y) * (1 << 12))), ((int32)((z) * (1 << 12))));
}






static inline void glColor3f(float r, float g, float b) {
 glColor3b((uint8)(r*255), (uint8)(g*255), (uint8)(b*255));
}







static inline void glScalef(float x, float y, float z) {
 (*(vint32*) 0x0400046C) = ((int32)((x) * (1 << 12)));
 (*(vint32*) 0x0400046C) = ((int32)((y) * (1 << 12)));
 (*(vint32*) 0x0400046C) = ((int32)((z) * (1 << 12)));
}







static inline void glTranslatef(float x, float y, float z) {
 (*(vint32*) 0x04000470) = ((int32)((x) * (1 << 12)));
 (*(vint32*) 0x04000470) = ((int32)((y) * (1 << 12)));
 (*(vint32*) 0x04000470) = ((int32)((z) * (1 << 12)));
}







static inline void glNormal3f(float x, float y, float z) {
 glNormal((((((x>.998) ? 0x1FF : ((v10)((x)*(1<<9))))) & 0x3FF) | (((((y>.998) ? 0x1FF : ((v10)((y)*(1<<9))))) & 0x3FF) << 10) | ((((z>.998) ? 0x1FF : ((v10)((z)*(1<<9))))) << 20)));
}




static inline void glRotateX(float angle) {
 glRotateXi((int)(angle * (512) / 360.0));
}




static inline void glRotateY(float angle) {
 glRotateYi((int)(angle * (512) / 360.0));
}




static inline void glRotateZ(float angle) {
 glRotateZi((int)(angle * (512) / 360.0));
}
# 1238 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline void glOrtho(float left, float right, float bottom, float top, float zNear, float zFar) {
 glOrthof32(((int32)((left) * (1 << 12))), ((int32)((right) * (1 << 12))), ((int32)((bottom) * (1 << 12))), ((int32)((top) * (1 << 12))), ((int32)((zNear) * (1 << 12))), ((int32)((zFar) * (1 << 12))));
}
# 1253 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline void gluLookAt( float eyex, float eyey, float eyez,
        float lookAtx, float lookAty, float lookAtz,
        float upx, float upy, float upz) {
 gluLookAtf32(((int32)((eyex) * (1 << 12))), ((int32)((eyey) * (1 << 12))), ((int32)((eyez) * (1 << 12))),
     ((int32)((lookAtx) * (1 << 12))), ((int32)((lookAty) * (1 << 12))), ((int32)((lookAtz) * (1 << 12))),
     ((int32)((upx) * (1 << 12))), ((int32)((upy) * (1 << 12))), ((int32)((upz) * (1 << 12))));
}
# 1269 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/videoGL.h"
static inline void glFrustum(float left, float right, float bottom, float top, float near, float far) {
 glFrustumf32(((int32)((left) * (1 << 12))), ((int32)((right) * (1 << 12))), ((int32)((bottom) * (1 << 12))), ((int32)((top) * (1 << 12))), ((int32)((near) * (1 << 12))), ((int32)((far) * (1 << 12))));
}







static inline void gluPerspective(float fovy, float aspect, float zNear, float zFar) {
 gluPerspectivef32((int)(fovy * (512) / 360.0), ((int32)((aspect) * (1 << 12))), ((int32)((zNear) * (1 << 12))), ((int32)((zFar) * (1 << 12))));
}






static inline void glTexCoord2f(float s, float t) {
 int x = ((glGlob->textures[glGlob->activeTexture]) >> 20) & 7;
 int y = ((glGlob->textures[glGlob->activeTexture]) >> 23) & 7;

 glTexCoord2t16(((t16)((s*(8 << x)) * (1 << 4))), ((t16)((t*(8<<y)) * (1 << 4))));
}
# 37 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h" 2
# 57 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
int BoxTest(v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth);
# 70 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
int BoxTestf(float x, float y, float z, float width, float height, float depth);
# 84 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
void BoxTest_Asynch(v16 x, v16 y, v16 z, v16 height, v16 width, v16 depth);
# 98 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/boxtest.h"
void BoxTestf_Asynch(float x, float y, float z, float width, float height, float depth);






int BoxTestResult(void);
# 60 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2

# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/console.h" 1
# 60 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/console.h"
void consoleInit(u16* font, u16* charBase, u16 numCharacters, u8 charStart, u16* map, u8 pal, u8 bitDepth);
# 70 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/console.h"
void consoleInitDefault(u16* map, u16* charBase, u8 bitDepth);







void consoleDemoInit(void);



void consoleClear(void);
# 62 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/exceptions.h" 1
# 54 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/exceptions.h"
extern VoidFunctionPointer exceptionC[] ;
extern unsigned long exceptionStack ;
extern signed long exceptionRegisters[];

void enterException(void);
void setExceptionHandler(VoidFunctionPointer handler);
void defaultExceptionHandler();

u32 getCPSR();
# 63 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/image.h" 1
# 51 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/image.h"
 typedef struct
 {
    unsigned char r,g,b;
 }__attribute__ ((packed)) RGB_24;


 typedef struct
 {
    short height,width;
    int bpp;
    unsigned short* palette;

    union
    {
       unsigned char* data8;
       unsigned short* data16;
       unsigned int* data32;
    } image;

 } sImage, *psImage;





void image24to16(sImage* img);
void image8to16(sImage* img);
void image8to16trans(sImage* img, u8 transperentColor);
void imageDestroy(sImage* img);
void imageTileData(sImage* img);






# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/pcx.h" 1
# 41 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/pcx.h"
typedef struct
{
   char manufacturer;
   char version;
   char encoding;
   char bitsPerPixel;
   short int xmin,ymin;
   short int xmax,ymax;
   short int hres;
   short int vres;
   char palette16[48];
   char reserved;
   char colorPlanes;
   short int bytesPerLine;
   short int paletteYype;
   char filler[58];
}__attribute__ ((packed)) PCXHeader, *pPCXHeader;





int loadPCX(unsigned char* pcx, sImage* image);
# 88 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/image.h" 2
# 64 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/input.h" 1
# 104 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/input.h"
typedef enum KEYPAD_BITS {
  KEY_A = (1 << (0)),
  KEY_B = (1 << (1)),
  KEY_SELECT = (1 << (2)),
  KEY_START = (1 << (3)),
  KEY_RIGHT = (1 << (4)),
  KEY_LEFT = (1 << (5)),
  KEY_UP = (1 << (6)),
  KEY_DOWN = (1 << (7)),
  KEY_R = (1 << (8)),
  KEY_L = (1 << (9)),
  KEY_X = (1 << (10)),
  KEY_Y = (1 << (11)),
  KEY_TOUCH = (1 << (12)),
  KEY_LID = (1 << (13))
} KEYPAD_BITS;
# 128 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/input.h"
void scanKeys();


uint32 keysHeld(void);


uint32 keysDown(void);


uint32 keysDownRepeat(void);





void keysSetRepeat( u8 setDelay, u8 setRepeat );


uint32 keysUp(void);


touchPosition touchReadXY();
# 65 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2


# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/rumble.h" 1
# 50 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/rumble.h"
typedef enum {
   RUMBLE,
   WARIOWARE
}RUMBLE_TYPE;





bool isRumbleInserted(void);





void setRumble(bool position);
# 68 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sound.h" 1
# 47 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sound.h"
void playSound( pTransferSoundData sound);
void setGenericSound( u32 rate, u8 vol, u8 pan, u8 format);
void playGenericSound(const void* data, u32 length);
# 69 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2



# 1 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sprite.h" 1
# 82 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sprite.h"
typedef enum
{
 OBJMODE_NORMAL,
 OBJMODE_BLENDED,
 OBJMODE_WINDOWED,
 OBJMODE_BITMAP,

} tObjMode;





typedef enum {
 OBJSHAPE_SQUARE,
 OBJSHAPE_WIDE,
 OBJSHAPE_TALL,
 OBJSHAPE_FORBIDDEN,
} tObjShape;





typedef enum {
 OBJSIZE_8,
 OBJSIZE_16,
 OBJSIZE_32,
 OBJSIZE_64,
} tObjSize;





typedef enum {
 OBJCOLOR_16,
 OBJCOLOR_256,
} tObjColMode;





typedef enum {
 OBJPRIORITY_0,
 OBJPRIORITY_1,
 OBJPRIORITY_2,
 OBJPRIORITY_3,
} tObjPriority;



typedef union {
 struct {

  struct {
   u16 posY :8;
   union {
    struct {
     u8 :1;
     bool isHidden :1;
     u8 :6;
    };
    struct {
     bool isRotoscale :1;
     bool rsDouble :1;
     tObjMode objMode :2;
     bool isMosaic :1;
     tObjColMode colMode :1;
     tObjShape objShape :2;
    };
   };
  };

  union {
   struct {
    u16 posX :9;
    u8 :7;
   };
   struct {
    u8 :8;
    union {
     struct {
      u8 :4;
      bool hFlip :1;
      bool vFlip :1;
      u8 :2;
     };
     struct {
      u8 :1;
      u8 rsMatrixIdx :5;
      tObjSize objSize :2;
     };
    };
   };
  };

  struct {
   u16 tileIdx :10;
   tObjPriority objPriority :2;
   u8 objPal :4;
  };

  u16 attribute3;
 };

 struct {
  uint16 attribute[3];
  uint16 filler;
 };

} SpriteEntry, * pSpriteEntry;


typedef struct sSpriteRotation {
  uint16 filler1[3];
  int16 hdx;

  uint16 filler2[3];
  int16 hdy;

  uint16 filler3[3];
  int16 vdx;

  uint16 filler4[3];
  int16 vdy;
} SpriteRotation, * pSpriteRotation;
# 218 "/home/lifning/hack/devkitPro/libnds/include/nds/arm9/sprite.h"
typedef union {
 SpriteEntry spriteBuffer[128];
 SpriteRotation matrixBuffer[32];
} tOAM;
# 73 "/home/lifning/hack/devkitPro/libnds/include/nds.h" 2
# 4 "/home/lifning/hack/nds-test/source/main.c" 2

void delay(int s) {
 while(s-- > 0) {
  int i = 60;
  while(--i) swiWaitForVBlank();
 }
}

int main(void) {
 SDL_Surface *screen;
 SDL_Joystick *stick;
 SDL_Event event;
 SDL_Rect rect = {8,8,240,176};

 consoleDemoInit();
 if(SDL_Init(0x00000020|0x00000200) < 0) {
  puts("# error initializing SDL");
  puts(SDL_GetError());
  return 1;
 }
 puts("* initialized SDL\n"); delay(1);

 screen = SDL_SetVideoMode(256, 192, 16, 0x00000000);
 if(!screen) {
  puts("# error setting video mode");
  puts(SDL_GetError());
  return 2;
 }
 puts("* set video mode\n"); delay(1);

 stick = SDL_JoystickOpen(0);
 if(stick == ((void *)0)) {
  puts("# error opening joystick");
  puts(SDL_GetError());
  return 3;
 }
 puts("* opened joystick"); delay(1);

 while(1)
 while(SDL_PollEvent(&event))
 switch(event.type) {
  case SDL_JOYBUTTONDOWN:
  switch(event.jbutton.which) {
   case 0:
   SDL_FillRect(screen, &rect, ((31)|((0)<<5)|((0)<<10))|0x8000);
   break;
   case 1:
   SDL_FillRect(screen, &rect, ((0)|((31)<<5)|((0)<<10))|0x8000);
   break;
   case 2:
   SDL_FillRect(screen, &rect, ((0)|((0)<<5)|((31)<<10))|0x8000);
   break;
   case 3:
   SDL_FillRect(screen, &rect, ((0)|((0)<<5)|((0)<<10))|0x8000);
   break;
   default: break;
  }
  SDL_Flip(screen);
  break;
  default: break;
 }

 return 0;
}