public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/10098: gcc internal error: illegal instruction
@ 2003-03-15 15:46 dfrankow
  0 siblings, 0 replies; 2+ messages in thread
From: dfrankow @ 2003-03-15 15:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10098
>Category:       c
>Synopsis:       gcc internal error: illegal instruction
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 15 15:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     dan
>Release:        gcc version 3.2 20020927 (prerelease)
>Organization:
>Environment:
Latest Cygwin (as of 3/13/2003) on Windows 98 SE.
>Description:
Trying to compile wxWindows 2.4.0 on Win98SE with Cygwin's latest gcc.

I did "configure", "make" and the compile line below fails.

Here is the error message:

src/png/pngread.c: In function `png_read_info':
src/png/pngread.c:509: internal error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make: *** [pngread.o] Error 1

I attach pngread.i.

I must admit, Win98SE is not a very stable development platform, so it might just be something wild unrelated to gcc.  On the other hand, I've tried rebooting several times, and this file just cannot be compiled by me.
>How-To-Repeat:
The compile line that fails:

gcc -c   -I./lib/wx/include/msw-2.4 -I./include -I./src/png -D_WIN32_IE=0x400    -D__WIN95__ -D__WXMSW__ -DWXUSINGDLL=1  -fno-pcc-struct-return -O2 -MMD -Wall -UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1 -o pngread.o ./src/png/pngread.c
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="pngread.i"
Content-Disposition: inline; filename="pngread.i"

# 1 "src/png/pngread.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "src/png/pngread.c"
# 15 "src/png/pngread.c"
# 1 "src/png/png.h" 1
# 327 "src/png/png.h"
# 1 "/usr/include/zlib.h" 1 3
# 34 "/usr/include/zlib.h" 3
# 1 "/usr/include/zconf.h" 1 3
# 214 "/usr/include/zconf.h" 3
typedef unsigned char Byte;

typedef unsigned int uInt;
typedef unsigned long uLong;





   typedef Byte Bytef;

typedef char charf;
typedef int intf;
typedef uInt uIntf;
typedef uLong uLongf;


   typedef void *voidpf;
   typedef void *voidp;
# 35 "/usr/include/zlib.h" 2 3
# 63 "/usr/include/zlib.h" 3
typedef voidpf (*alloc_func) (voidpf opaque, uInt items, uInt size);
typedef void (*free_func) (voidpf opaque, voidpf address);

struct internal_state;

typedef struct z_stream_s {
    Bytef *next_in;
    uInt avail_in;
    uLong total_in;

    Bytef *next_out;
    uInt avail_out;
    uLong total_out;

    char *msg;
    struct internal_state *state;

    alloc_func zalloc;
    free_func zfree;
    voidpf opaque;

    int data_type;
    uLong adler;
    uLong reserved;
} z_stream;

typedef z_stream *z_streamp;
# 171 "/usr/include/zlib.h" 3
extern const char * zlibVersion (void);
# 201 "/usr/include/zlib.h" 3
extern int deflate (z_streamp strm, int flush);
# 279 "/usr/include/zlib.h" 3
extern int deflateEnd (z_streamp strm);
# 314 "/usr/include/zlib.h" 3
extern int inflate (z_streamp strm, int flush);
# 383 "/usr/include/zlib.h" 3
extern int inflateEnd (z_streamp strm);
# 444 "/usr/include/zlib.h" 3
extern int deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength);
# 480 "/usr/include/zlib.h" 3
extern int deflateCopy (z_streamp dest, z_streamp source);
# 498 "/usr/include/zlib.h" 3
extern int deflateReset (z_streamp strm);
# 509 "/usr/include/zlib.h" 3
extern int deflateParams (z_streamp strm, int level, int strategy);
# 553 "/usr/include/zlib.h" 3
extern int inflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength);
# 572 "/usr/include/zlib.h" 3
extern int inflateSync (z_streamp strm);
# 587 "/usr/include/zlib.h" 3
extern int inflateReset (z_streamp strm);
# 608 "/usr/include/zlib.h" 3
extern int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
# 623 "/usr/include/zlib.h" 3
extern int compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level);
# 638 "/usr/include/zlib.h" 3
extern int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
# 657 "/usr/include/zlib.h" 3
typedef voidp gzFile;

extern gzFile gzopen (const char *path, const char *mode);
# 675 "/usr/include/zlib.h" 3
extern gzFile gzdopen (int fd, const char *mode);
# 688 "/usr/include/zlib.h" 3
extern int gzsetparams (gzFile file, int level, int strategy);







extern int gzread (gzFile file, voidp buf, unsigned len);







extern int gzwrite (gzFile file, const voidp buf, unsigned len);







extern int gzprintf (gzFile file, const char *format, ...);






extern int gzputs (gzFile file, const char *s);






extern char * gzgets (gzFile file, char *buf, int len);
# 735 "/usr/include/zlib.h" 3
extern int gzputc (gzFile file, int c);





extern int gzgetc (gzFile file);





extern int gzflush (gzFile file, int flush);
# 757 "/usr/include/zlib.h" 3
extern long gzseek (gzFile file, long offset, int whence);
# 775 "/usr/include/zlib.h" 3
extern int gzrewind (gzFile file);






extern long gztell (gzFile file);
# 791 "/usr/include/zlib.h" 3
extern int gzeof (gzFile file);





extern int gzclose (gzFile file);






extern const char * gzerror (gzFile file, int *errnum);
# 821 "/usr/include/zlib.h" 3
extern uLong adler32 (uLong adler, const Bytef *buf, uInt len);
# 838 "/usr/include/zlib.h" 3
extern uLong crc32 (uLong crc, const Bytef *buf, uInt len);
# 860 "/usr/include/zlib.h" 3
extern int deflateInit_ (z_streamp strm, int level, const char *version, int stream_size);

extern int inflateInit_ (z_streamp strm, const char *version, int stream_size);

extern int deflateInit2_ (z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size);



extern int inflateInit2_ (z_streamp strm, int windowBits, const char *version, int stream_size);
# 882 "/usr/include/zlib.h" 3
    struct internal_state {int dummy;};


extern const char * zError (int err);
extern int inflateSyncPoint (z_streamp z);
extern const uLongf * get_crc_table (void);
# 328 "src/png/png.h" 2


# 1 "src/png/pngconf.h" 1
# 194 "src/png/pngconf.h"
# 1 "/usr/include/stdio.h" 1 3
# 29 "/usr/include/stdio.h" 3
# 1 "/usr/include/_ansi.h" 1 3
# 15 "/usr/include/_ansi.h" 3
# 1 "/usr/include/newlib.h" 1 3
# 16 "/usr/include/_ansi.h" 2 3
# 1 "/usr/include/sys/config.h" 1 3



# 1 "/usr/include/machine/ieeefp.h" 1 3
# 5 "/usr/include/sys/config.h" 2 3
# 17 "/usr/include/_ansi.h" 2 3
# 30 "/usr/include/stdio.h" 2 3




# 1 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 1 3
# 203 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 3
typedef unsigned int size_t;
# 35 "/usr/include/stdio.h" 2 3


# 1 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stdarg.h" 1 3
# 44 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 38 "/usr/include/stdio.h" 2 3







# 1 "/usr/include/sys/reent.h" 1 3
# 14 "/usr/include/sys/reent.h" 3
# 1 "/usr/include/sys/_types.h" 1 3
# 12 "/usr/include/sys/_types.h" 3
typedef long _off_t;
__extension__ typedef long long _off64_t;


typedef int _ssize_t;





# 1 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 1 3
# 323 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 3
typedef unsigned int wint_t;
# 23 "/usr/include/sys/_types.h" 2 3


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

typedef int _flock_t;
# 15 "/usr/include/sys/reent.h" 2 3




typedef unsigned long __ULong;
# 40 "/usr/include/sys/reent.h" 3
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;
};
# 68 "/usr/include/sys/reent.h" 3
struct _atexit {
        struct _atexit *_next;
        int _ind;
        void (*_fns[32])(void);
        void *_fnargs[32];
        __ULong _fntypes;
};
# 91 "/usr/include/sys/reent.h" 3
struct __sbuf {
        unsigned char *_base;
        int _size;
};






typedef long _fpos_t;



typedef _off64_t _fpos64_t;
# 156 "/usr/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;

  _ssize_t __attribute__((__cdecl__)) (*_read) (void * _cookie, char *_buf, int _n);
  _ssize_t __attribute__((__cdecl__)) (*_write) (void * _cookie, const char *_buf, int _n);

  _fpos_t __attribute__((__cdecl__)) (*_seek) (void * _cookie, _fpos_t _offset, int _whence);
  int __attribute__((__cdecl__)) (*_close) (void * _cookie);


  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;

};


struct __sFILE64 {
  unsigned char *_p;
  int _r;
  int _w;
  short _flags;
  short _file;
  struct __sbuf _bf;
  int _lbfsize;

  struct _reent *_data;


  void * _cookie;

  _ssize_t __attribute__((__cdecl__)) (*_read) (void * _cookie, char *_buf, int _n);
  _ssize_t __attribute__((__cdecl__)) (*_write) (void * _cookie, const char *_buf, int _n);

  _fpos_t __attribute__((__cdecl__)) (*_seek) (void * _cookie, _fpos_t _offset, int _whence);
  int __attribute__((__cdecl__)) (*_close) (void * _cookie);


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


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


  struct __sbuf _lb;


  int _blksize;
  int _flags2;

  _off64_t _offset;
  _fpos64_t __attribute__((__cdecl__)) (*_seek64) (void * _cookie, _fpos64_t _offset, int _whence);


  _flock_t _lock;

};
typedef struct __sFILE64 __FILE;




struct _glue
{
  struct _glue *_next;
  int _niobs;
  __FILE *_iobs;
};
# 280 "/usr/include/sys/reent.h" 3
struct _rand48 {
  unsigned short _seed[3];
  unsigned short _mult[3];
  unsigned short _add;




};
# 530 "/usr/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 __attribute__((__cdecl__)) (*__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];
};
# 726 "/usr/include/sys/reent.h" 3
extern struct _reent *_impure_ptr ;

void _reclaim_reent (struct _reent *);
# 46 "/usr/include/stdio.h" 2 3
# 1 "/usr/include/sys/types.h" 1 3
# 24 "/usr/include/sys/types.h" 3
typedef short int __int16_t;
typedef unsigned short int __uint16_t;





typedef int __int32_t;
typedef unsigned int __uint32_t;






__extension__ typedef long long __int64_t;
__extension__ typedef unsigned long long __uint64_t;
# 55 "/usr/include/sys/types.h" 3
# 1 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 1 3
# 149 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 3
typedef int ptrdiff_t;
# 296 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 3
typedef short unsigned int wchar_t;
# 56 "/usr/include/sys/types.h" 2 3
# 1 "/usr/include/machine/types.h" 1 3
# 36 "/usr/include/machine/types.h" 3
typedef long int __off_t;
typedef int __pid_t;

__extension__ typedef long long int __loff_t;
# 57 "/usr/include/sys/types.h" 2 3
# 78 "/usr/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;
# 166 "/usr/include/sys/types.h" 3
typedef int pid_t;
typedef long key_t;
typedef _ssize_t ssize_t;
# 187 "/usr/include/sys/types.h" 3
typedef unsigned short nlink_t;
# 209 "/usr/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;
# 245 "/usr/include/sys/types.h" 3
typedef unsigned long clockid_t;




typedef unsigned long timer_t;




typedef long useconds_t;


# 1 "/usr/include/sys/features.h" 1 3
# 259 "/usr/include/sys/types.h" 2 3
# 363 "/usr/include/sys/types.h" 3
# 1 "/usr/include/cygwin/types.h" 1 3
# 20 "/usr/include/cygwin/types.h" 3
# 1 "/usr/include/sys/sysmacros.h" 1 3
# 21 "/usr/include/cygwin/types.h" 2 3



typedef struct timespec timespec_t;




typedef struct timespec timestruc_t;




typedef long __off32_t;
typedef long long __off64_t;



typedef __off32_t off_t;





typedef short __dev16_t;
typedef unsigned long __dev32_t;



typedef __dev16_t dev_t;





typedef long blksize_t;




typedef long __blkcnt32_t;
typedef long long __blkcnt64_t;



typedef __blkcnt32_t blkcnt_t;





typedef unsigned short __uid16_t;
typedef unsigned long __uid32_t;



typedef __uid16_t uid_t;





typedef unsigned short __gid16_t;
typedef unsigned long __gid32_t;



typedef __gid16_t gid_t;
# 97 "/usr/include/cygwin/types.h" 3
typedef unsigned long ino_t;
# 106 "/usr/include/cygwin/types.h" 3
typedef unsigned long vm_offset_t;




typedef unsigned long vm_size_t;




typedef char int8_t;



typedef __int16_t int16_t;



typedef __int32_t int32_t;



typedef __int64_t int64_t;




typedef unsigned char uint8_t;



typedef __uint16_t uint16_t;



typedef __uint32_t uint32_t;



typedef __uint64_t uint64_t;




typedef unsigned char u_int8_t;



typedef __uint16_t u_int16_t;



typedef __uint32_t u_int32_t;



typedef __uint64_t u_int64_t;




typedef unsigned long uintptr_t;




typedef long intptr_t;




typedef __int32_t register_t;




typedef char *addr_t;




typedef unsigned mode_t;





typedef struct __pthread_t {char __dummy;} *pthread_t;
typedef struct __pthread_mutex_t {char __dummy;} *pthread_mutex_t;

typedef struct __pthread_key_t {char __dummy;} *pthread_key_t;
typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t;
typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t;
typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t;
typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t;


typedef struct
{
  pthread_mutex_t mutex;
  int state;
}
pthread_once_t;
typedef struct __pthread_rwlock_t {char __dummy;} *pthread_rwlock_t;
typedef struct __pthread_rwlockattr_t {char __dummy;} *pthread_rwlockattr_t;
# 364 "/usr/include/sys/types.h" 2 3
# 47 "/usr/include/stdio.h" 2 3



typedef __FILE FILE;





typedef _fpos_t fpos_t;
# 65 "/usr/include/stdio.h" 3
# 1 "/usr/include/sys/stdio.h" 1 3
# 66 "/usr/include/stdio.h" 2 3
# 170 "/usr/include/stdio.h" 3
FILE * __attribute__((__cdecl__)) tmpfile (void);
char * __attribute__((__cdecl__)) tmpnam (char *);
int __attribute__((__cdecl__)) fclose (FILE *);
int __attribute__((__cdecl__)) fflush (FILE *);
FILE * __attribute__((__cdecl__)) freopen (const char *, const char *, FILE *);
void __attribute__((__cdecl__)) setbuf (FILE *, char *);
int __attribute__((__cdecl__)) setvbuf (FILE *, char *, int, size_t);
int __attribute__((__cdecl__)) fprintf (FILE *, const char *, ...);
int __attribute__((__cdecl__)) fscanf (FILE *, const char *, ...);
int __attribute__((__cdecl__)) printf (const char *, ...);
int __attribute__((__cdecl__)) scanf (const char *, ...);
int __attribute__((__cdecl__)) sscanf (const char *, const char *, ...);
int __attribute__((__cdecl__)) vfprintf (FILE *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) vprintf (const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) vsprintf (char *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) fgetc (FILE *);
char * __attribute__((__cdecl__)) fgets (char *, int, FILE *);
int __attribute__((__cdecl__)) fputc (int, FILE *);
int __attribute__((__cdecl__)) fputs (const char *, FILE *);
int __attribute__((__cdecl__)) getc (FILE *);
int __attribute__((__cdecl__)) getchar (void);
char * __attribute__((__cdecl__)) gets (char *);
int __attribute__((__cdecl__)) putc (int, FILE *);
int __attribute__((__cdecl__)) putchar (int);
int __attribute__((__cdecl__)) puts (const char *);
int __attribute__((__cdecl__)) ungetc (int, FILE *);
size_t __attribute__((__cdecl__)) fread (void *, size_t _size, size_t _n, FILE *);
size_t __attribute__((__cdecl__)) fwrite (const void * , size_t _size, size_t _n, FILE *);
int __attribute__((__cdecl__)) fgetpos (FILE *, fpos_t *);
int __attribute__((__cdecl__)) fseek (FILE *, long, int);
int __attribute__((__cdecl__)) fsetpos (FILE *, const fpos_t *);
long __attribute__((__cdecl__)) ftell ( FILE *);
void __attribute__((__cdecl__)) rewind (FILE *);
void __attribute__((__cdecl__)) clearerr (FILE *);
int __attribute__((__cdecl__)) feof (FILE *);
int __attribute__((__cdecl__)) ferror (FILE *);
void __attribute__((__cdecl__)) perror (const char *);

FILE * __attribute__((__cdecl__)) fopen (const char *_name, const char *_type);
int __attribute__((__cdecl__)) sprintf (char *, const char *, ...);
int __attribute__((__cdecl__)) remove (const char *);
int __attribute__((__cdecl__)) rename (const char *, const char *);


int __attribute__((__cdecl__)) asprintf (char **, const char *, ...);
int __attribute__((__cdecl__)) fseeko (FILE *, off_t, int);
off_t __attribute__((__cdecl__)) ftello ( FILE *);
int __attribute__((__cdecl__)) vfiprintf (FILE *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) iprintf (const char *, ...);
int __attribute__((__cdecl__)) fiprintf (FILE *, const char *, ...);
int __attribute__((__cdecl__)) siprintf (char *, const char *, ...);
char * __attribute__((__cdecl__)) tempnam (const char *, const char *);
int __attribute__((__cdecl__)) vasprintf (char **, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) vsnprintf (char *, size_t, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) vfscanf (FILE *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) vscanf (const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) vsscanf (const char *, const char *, __gnuc_va_list);

int __attribute__((__cdecl__)) fcloseall (void);
int __attribute__((__cdecl__)) snprintf (char *, size_t, const char *, ...);
# 239 "/usr/include/stdio.h" 3
FILE * __attribute__((__cdecl__)) fdopen (int, const char *);

int __attribute__((__cdecl__)) fileno (FILE *);
int __attribute__((__cdecl__)) getw (FILE *);
int __attribute__((__cdecl__)) pclose (FILE *);
FILE * __attribute__((__cdecl__)) popen (const char *, const char *);
int __attribute__((__cdecl__)) putw (int, FILE *);
void __attribute__((__cdecl__)) setbuffer (FILE *, char *, int);
int __attribute__((__cdecl__)) setlinebuf (FILE *);
int __attribute__((__cdecl__)) getc_unlocked (FILE *);
int __attribute__((__cdecl__)) getchar_unlocked (void);
void __attribute__((__cdecl__)) flockfile (FILE *);
int __attribute__((__cdecl__)) ftrylockfile (FILE *);
void __attribute__((__cdecl__)) funlockfile (FILE *);
int __attribute__((__cdecl__)) putc_unlocked (int, FILE *);
int __attribute__((__cdecl__)) putchar_unlocked (int);






int __attribute__((__cdecl__)) _asprintf_r (struct _reent *, char **, const char *, ...);
int __attribute__((__cdecl__)) _fcloseall_r (struct _reent *);
FILE * __attribute__((__cdecl__)) _fdopen_r (struct _reent *, int, const char *);
FILE * __attribute__((__cdecl__)) _fopen_r (struct _reent *, const char *, const char *);
int __attribute__((__cdecl__)) _fscanf_r (struct _reent *, FILE *, const char *, ...);
int __attribute__((__cdecl__)) _getchar_r (struct _reent *);
char * __attribute__((__cdecl__)) _gets_r (struct _reent *, char *);
int __attribute__((__cdecl__)) _iprintf_r (struct _reent *, const char *, ...);
int __attribute__((__cdecl__)) _mkstemp_r (struct _reent *, char *);
char * __attribute__((__cdecl__)) _mktemp_r (struct _reent *, char *);
void __attribute__((__cdecl__)) _perror_r (struct _reent *, const char *);
int __attribute__((__cdecl__)) _printf_r (struct _reent *, const char *, ...);
int __attribute__((__cdecl__)) _putchar_r (struct _reent *, int);
int __attribute__((__cdecl__)) _puts_r (struct _reent *, const char *);
int __attribute__((__cdecl__)) _remove_r (struct _reent *, const char *);
int __attribute__((__cdecl__)) _rename_r (struct _reent *, const char *_old, const char *_new);

int __attribute__((__cdecl__)) _scanf_r (struct _reent *, const char *, ...);
int __attribute__((__cdecl__)) _sprintf_r (struct _reent *, char *, const char *, ...);
int __attribute__((__cdecl__)) _snprintf_r (struct _reent *, char *, size_t, const char *, ...);
int __attribute__((__cdecl__)) _sscanf_r (struct _reent *, const char *, const char *, ...);
char * __attribute__((__cdecl__)) _tempnam_r (struct _reent *, const char *, const char *);
FILE * __attribute__((__cdecl__)) _tmpfile_r (struct _reent *);
char * __attribute__((__cdecl__)) _tmpnam_r (struct _reent *, char *);
int __attribute__((__cdecl__)) _vasprintf_r (struct _reent *, char **, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) _vfprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) _vprintf_r (struct _reent *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) _vsprintf_r (struct _reent *, char *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) _vsnprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) _vfscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) _vscanf_r (struct _reent *, const char *, __gnuc_va_list);
int __attribute__((__cdecl__)) _vsscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list);

ssize_t __attribute__((__cdecl__)) __getdelim (char **, size_t *, int, FILE *);
ssize_t __attribute__((__cdecl__)) __getline (char **, size_t *, FILE *);
# 319 "/usr/include/stdio.h" 3
int __attribute__((__cdecl__)) __srget (FILE *);
int __attribute__((__cdecl__)) __swbuf (int, FILE *);






FILE *__attribute__((__cdecl__)) 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));
# 344 "/usr/include/stdio.h" 3
static __inline__ int __sgetc(FILE *__p)
  {
    int __c = (--(__p)->_r < 0 ? __srget(__p) : (int)(*(__p)->_p++));
    if ((__p->_flags & 0x4000) && (__c == '\r'))
      {
      int __c2 = (--(__p)->_r < 0 ? __srget(__p) : (int)(*(__p)->_p++));
      if (__c2 == '\n')
        __c = __c2;
      else
        ungetc(__c2, __p);
      }
    return __c;
  }
# 426 "/usr/include/stdio.h" 3

# 195 "src/png/pngconf.h" 2
# 261 "src/png/pngconf.h"
# 1 "/usr/include/setjmp.h" 1 3
# 10 "/usr/include/setjmp.h" 3
# 1 "/usr/include/machine/setjmp.h" 1 3


# 189 "/usr/include/machine/setjmp.h" 3
typedef int jmp_buf[(13 * 4)];





# 1 "/usr/include/signal.h" 1 3




# 1 "/usr/include/sys/signal.h" 1 3
# 19 "/usr/include/sys/signal.h" 3
typedef unsigned long sigset_t;
# 109 "/usr/include/sys/signal.h" 3
typedef void (*_sig_func_ptr)(int);

struct sigaction
{
        _sig_func_ptr sa_handler;
        sigset_t sa_mask;
        int sa_flags;
};
# 139 "/usr/include/sys/signal.h" 3
int __attribute__((__cdecl__)) sigprocmask (int how, const sigset_t *set, sigset_t *oset);


int __attribute__((__cdecl__)) pthread_sigmask (int how, const sigset_t *set, sigset_t *oset);
# 153 "/usr/include/sys/signal.h" 3
int __attribute__((__cdecl__)) kill (int, int);
int __attribute__((__cdecl__)) killpg (pid_t, int);
int __attribute__((__cdecl__)) sigaction (int, const struct sigaction *, struct sigaction *);
int __attribute__((__cdecl__)) sigaddset (sigset_t *, const int);
int __attribute__((__cdecl__)) sigdelset (sigset_t *, const int);
int __attribute__((__cdecl__)) sigismember (const sigset_t *, int);
int __attribute__((__cdecl__)) sigfillset (sigset_t *);
int __attribute__((__cdecl__)) sigemptyset (sigset_t *);
int __attribute__((__cdecl__)) sigpending (sigset_t *);
int __attribute__((__cdecl__)) sigsuspend (const sigset_t *);
int __attribute__((__cdecl__)) sigpause (int);







int __attribute__((__cdecl__)) pthread_kill (pthread_t thread, int sig);
# 6 "/usr/include/signal.h" 2 3



typedef int sig_atomic_t;





struct _reent;

_sig_func_ptr __attribute__((__cdecl__)) _signal_r (struct _reent *, int, _sig_func_ptr);
int __attribute__((__cdecl__)) _raise_r (struct _reent *, int);


_sig_func_ptr __attribute__((__cdecl__)) signal (int, _sig_func_ptr);
int __attribute__((__cdecl__)) raise (int);



# 196 "/usr/include/machine/setjmp.h" 2 3






typedef int sigjmp_buf[(13 * 4)+2];
# 11 "/usr/include/setjmp.h" 2 3



void __attribute__((__cdecl__)) longjmp (jmp_buf __jmpb, int __retval);
int __attribute__((__cdecl__)) setjmp (jmp_buf __jmpb);


# 262 "src/png/pngconf.h" 2
# 274 "src/png/pngconf.h"
# 1 "/usr/include/string.h" 1 3
# 14 "/usr/include/string.h" 3
# 1 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 1 3
# 15 "/usr/include/string.h" 2 3







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


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


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


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

int __attribute__((__cdecl__)) bcmp (const void *, const void *, size_t);
void __attribute__((__cdecl__)) bcopy (const void *, void *, size_t);
void __attribute__((__cdecl__)) bzero (void *, size_t);
int __attribute__((__cdecl__)) ffs (int);
char *__attribute__((__cdecl__)) index (const char *, int);
void * __attribute__((__cdecl__)) memccpy (void *, const void *, int, size_t);
void * __attribute__((__cdecl__)) mempcpy (void *, const void *, size_t);
char *__attribute__((__cdecl__)) rindex (const char *, int);
int __attribute__((__cdecl__)) strcasecmp (const char *, const char *);
char *__attribute__((__cdecl__)) strdup (const char *);
char *__attribute__((__cdecl__)) _strdup_r (struct _reent *, const char *);
char *__attribute__((__cdecl__)) strndup (const char *, size_t);
char *__attribute__((__cdecl__)) _strndup_r (struct _reent *, const char *, size_t);
char *__attribute__((__cdecl__)) strerror_r (int, char *, size_t);
size_t __attribute__((__cdecl__)) strlcat (char *, const char *, size_t);
size_t __attribute__((__cdecl__)) strlcpy (char *, const char *, size_t);
int __attribute__((__cdecl__)) strncasecmp (const char *, const char *, size_t);
size_t __attribute__((__cdecl__)) strnlen (const char *, size_t);
char *__attribute__((__cdecl__)) strsep (char **, const char *);
char *__attribute__((__cdecl__)) strlwr (char *);
char *__attribute__((__cdecl__)) strupr (char *);


const char *__attribute__((__cdecl__)) strsignal (int __signo);

int __attribute__((__cdecl__)) strtosigno (const char *__name);
# 98 "/usr/include/string.h" 3

# 275 "src/png/pngconf.h" 2





# 1 "/usr/include/stdlib.h" 1 3
# 14 "/usr/include/stdlib.h" 3
# 1 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 1 3
# 15 "/usr/include/stdlib.h" 2 3


# 1 "/usr/include/machine/stdlib.h" 1 3
# 18 "/usr/include/stdlib.h" 2 3

# 1 "/usr/include/alloca.h" 1 3
# 20 "/usr/include/stdlib.h" 2 3




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

typedef struct
{
  long quot;
  long rem;
} ldiv_t;
# 45 "/usr/include/stdlib.h" 3
extern __attribute__((dllimport)) int __mb_cur_max;



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

float __attribute__((__cdecl__)) atoff (const char *__nptr);

int __attribute__((__cdecl__)) atoi (const char *__nptr);
long __attribute__((__cdecl__)) atol (const char *__nptr);
void * __attribute__((__cdecl__)) bsearch (const void * __key, const void * __base, size_t __nmemb, size_t __size, int (* __attribute__((__cdecl__)) _compar) (const void *, const void *));




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


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


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






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

int __attribute__((__cdecl__)) system (const char *__string);


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

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

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




char * __attribute__((__cdecl__)) realpath (const char *, char *);
void __attribute__((__cdecl__)) unsetenv (const char *__string);
void __attribute__((__cdecl__)) _unsetenv_r (struct _reent *, const char *__string);
int __attribute__((__cdecl__)) random (void);
long __attribute__((__cdecl__)) srandom (unsigned __seed);
char * __attribute__((__cdecl__)) ptsname (int);
int __attribute__((__cdecl__)) grantpt (int);
int __attribute__((__cdecl__)) unlockpt (int);




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







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

void __attribute__((__cdecl__)) __eprintf (const char *, const char *, unsigned int, const char *);
# 213 "/usr/include/stdlib.h" 3

# 281 "src/png/pngconf.h" 2
# 305 "src/png/pngconf.h"
# 1 "/usr/include/math.h" 1 3






# 1 "/usr/include/machine/ieeefp.h" 1 3
# 8 "/usr/include/math.h" 2 3









union __dmath
{
  __ULong i[2];
  double d;
};




extern __attribute__((dllimport)) const union __dmath __infinity[];
# 35 "/usr/include/math.h" 3
extern double atan (double);
extern double cos (double);
extern double sin (double);
extern double tan (double);
extern double tanh (double);
extern double frexp (double, int *);
extern double modf (double, double *);
extern double ceil (double);
extern double fabs (double);
extern double floor (double);






extern double acos (double);
extern double asin (double);
extern double atan2 (double, double);
extern double cosh (double);
extern double sinh (double);
extern double exp (double);
extern double ldexp (double, int);
extern double log (double);
extern double log10 (double);
extern double pow (double, double);
extern double sqrt (double);
extern double fmod (double, double);
# 72 "/usr/include/math.h" 3
typedef float float_t;
typedef double double_t;
# 82 "/usr/include/math.h" 3
extern int __fpclassifyf (float x);
extern int __fpclassifyd (double x);
# 121 "/usr/include/math.h" 3
extern double infinity (void);
extern double nan (void);
extern int isnan (double);
extern int isinf (double);
extern int finite (double);
extern double copysign (double, double);
extern int ilogb (double);

extern double asinh (double);
extern double cbrt (double);
extern double nextafter (double, double);
extern double rint (double);
extern double scalbn (double, int);

extern double exp2 (double);
extern double scalbln (double, long int);
extern double tgamma (double);
extern double nearbyint (double);
extern long int lrint (double);
extern double round (double);
extern long int lround (double);
extern double trunc (double);
extern double remquo (double, double, int *);
extern double copysign (double, double);
extern double fdim (double, double);
extern double fmax (double, double);
extern double fmin (double, double);
extern double fma (double, double, double);
extern void sincos (double, double *, double *);


extern double log1p (double);
extern double expm1 (double);



extern double acosh (double);
extern double atanh (double);
extern double remainder (double, double);
extern double gamma (double);
extern double gamma_r (double, int *);
extern double lgamma (double);
extern double lgamma_r (double, int *);
extern double erf (double);
extern double erfc (double);
extern double y0 (double);
extern double y1 (double);
extern double yn (int, double);
extern double j0 (double);
extern double j1 (double);
extern double jn (int, double);



extern double hypot (double, double);


extern double cabs();
extern double drem (double, double);
# 189 "/usr/include/math.h" 3
extern float atanf (float);
extern float cosf (float);
extern float sinf (float);
extern float tanf (float);
extern float tanhf (float);
extern float frexpf (float, int *);
extern float modff (float, float *);
extern float ceilf (float);
extern float fabsf (float);
extern float floorf (float);


extern float acosf (float);
extern float asinf (float);
extern float atan2f (float, float);
extern float coshf (float);
extern float sinhf (float);
extern float expf (float);
extern float ldexpf (float, int);
extern float logf (float);
extern float log10f (float);
extern float powf (float, float);
extern float sqrtf (float);
extern float fmodf (float, float);
# 221 "/usr/include/math.h" 3
extern float exp2f (float);
extern float scalblnf (float, long int);
extern float tgammaf (float);
extern float nearbyintf (float);
extern long int lrintf (float);
extern float roundf (float);
extern long int lroundf (float);
extern float truncf (float);
extern float remquof (float, float, int *);
extern float copysignf (float, float);
extern float fdimf (float, float);
extern float fmaxf (float, float);
extern float fminf (float, float);
extern float fmaf (float, float, float);

extern float infinityf (void);
extern float nanf (void);
extern int isnanf (float);
extern int isinff (float);
extern int finitef (float);
extern float copysignf (float, float);
extern int ilogbf (float);

extern float asinhf (float);
extern float cbrtf (float);
extern float nextafterf (float, float);
extern float rintf (float);
extern float scalbnf (float, int);
extern float log1pf (float);
extern float expm1f (float);
extern void sincosf (float, float *, float *);


extern float acoshf (float);
extern float atanhf (float);
extern float remainderf (float, float);
extern float gammaf (float);
extern float gammaf_r (float, int *);
extern float lgammaf (float);
extern float lgammaf_r (float, int *);
extern float erff (float);
extern float erfcf (float);
extern float y0f (float);
extern float y1f (float);
extern float ynf (int, float);
extern float j0f (float);
extern float j1f (float);
extern float jnf (int, float);

extern float hypotf (float, float);

extern float cabsf();
extern float dremf (float, float);






extern int *__signgam (void);
# 290 "/usr/include/math.h" 3
struct exception

{
  int type;
  char *name;
  double arg1;
  double arg2;
  double retval;
  int err;
};




extern int matherr (struct exception *e);
# 345 "/usr/include/math.h" 3
enum __fdlibm_version
{
  __fdlibm_ieee = -1,
  __fdlibm_svid,
  __fdlibm_xopen,
  __fdlibm_posix
};




extern __attribute__((dllimport)) const enum __fdlibm_version __fdlib_version;
# 365 "/usr/include/math.h" 3

# 306 "src/png/pngconf.h" 2
# 970 "src/png/pngconf.h"
# 1 "/usr/include/time.h" 1 3
# 18 "/usr/include/time.h" 3
# 1 "/usr/include/machine/time.h" 1 3
# 19 "/usr/include/time.h" 2 3
# 27 "/usr/include/time.h" 3
# 1 "/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include/stddef.h" 1 3
# 28 "/usr/include/time.h" 2 3





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;
};

clock_t __attribute__((__cdecl__)) clock (void);
double __attribute__((__cdecl__)) difftime (time_t _time2, time_t _time1);
time_t __attribute__((__cdecl__)) mktime (struct tm *_timeptr);
time_t __attribute__((__cdecl__)) time (time_t *_timer);

char *__attribute__((__cdecl__)) asctime (const struct tm *_tblock);
char *__attribute__((__cdecl__)) ctime (const time_t *_time);
struct tm *__attribute__((__cdecl__)) gmtime (const time_t *_timer);
struct tm *__attribute__((__cdecl__)) localtime (const time_t *_timer);

size_t __attribute__((__cdecl__)) strftime (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t);

char *__attribute__((__cdecl__)) asctime_r (const struct tm *, char *);
char *__attribute__((__cdecl__)) ctime_r (const time_t *, char *);
struct tm *__attribute__((__cdecl__)) gmtime_r (const time_t *, struct tm *);
struct tm *__attribute__((__cdecl__)) localtime_r (const time_t *, struct tm *);








char *__attribute__((__cdecl__)) strptime (const char *, const char *, struct tm *);
void __attribute__((__cdecl__)) tzset (void);
void __attribute__((__cdecl__)) _tzset_r (struct _reent *);
# 98 "/usr/include/time.h" 3
extern __attribute__((dllimport)) time_t _timezone;
extern __attribute__((dllimport)) int _daylight;
extern __attribute__((dllimport)) char *_tzname[2];
# 117 "/usr/include/time.h" 3
char *__attribute__((__cdecl__)) timezone (void);
# 171 "/usr/include/time.h" 3
int __attribute__((__cdecl__)) nanosleep (const struct timespec *rqtp, struct timespec *rmtp);
# 971 "src/png/pngconf.h" 2
# 983 "src/png/pngconf.h"
typedef unsigned long png_uint_32;
typedef long png_int_32;
typedef unsigned short png_uint_16;
typedef short png_int_16;
typedef unsigned char png_byte;



typedef size_t png_size_t;
# 1054 "src/png/pngconf.h"
typedef png_int_32 png_fixed_point;


typedef void * png_voidp;
typedef png_byte * png_bytep;
typedef png_uint_32 * png_uint_32p;
typedef png_int_32 * png_int_32p;
typedef png_uint_16 * png_uint_16p;
typedef png_int_16 * png_int_16p;
typedef const char * png_const_charp;
typedef char * png_charp;
typedef png_fixed_point * png_fixed_point_p;





typedef FILE * png_FILE_p;




typedef double * png_doublep;



typedef png_byte * * png_bytepp;
typedef png_uint_32 * * png_uint_32pp;
typedef png_int_32 * * png_int_32pp;
typedef png_uint_16 * * png_uint_16pp;
typedef png_int_16 * * png_int_16pp;
typedef const char * * png_const_charpp;
typedef char * * png_charpp;
typedef png_fixed_point * * png_fixed_point_pp;

typedef double * * png_doublepp;



typedef char * * * png_charppp;





typedef charf * png_zcharp;
typedef charf * * png_zcharpp;
typedef z_stream * png_zstreamp;
# 331 "src/png/png.h" 2
# 412 "src/png/png.h"
typedef struct png_color_struct
{
   png_byte red;
   png_byte green;
   png_byte blue;
} png_color;
typedef png_color * png_colorp;
typedef png_color * * png_colorpp;

typedef struct png_color_16_struct
{
   png_byte index;
   png_uint_16 red;
   png_uint_16 green;
   png_uint_16 blue;
   png_uint_16 gray;
} png_color_16;
typedef png_color_16 * png_color_16p;
typedef png_color_16 * * png_color_16pp;

typedef struct png_color_8_struct
{
   png_byte red;
   png_byte green;
   png_byte blue;
   png_byte gray;
   png_byte alpha;
} png_color_8;
typedef png_color_8 * png_color_8p;
typedef png_color_8 * * png_color_8pp;





typedef struct png_sPLT_entry_struct
{
   png_uint_16 red;
   png_uint_16 green;
   png_uint_16 blue;
   png_uint_16 alpha;
   png_uint_16 frequency;
} png_sPLT_entry;
typedef png_sPLT_entry * png_sPLT_entryp;
typedef png_sPLT_entry * * png_sPLT_entrypp;






typedef struct png_sPLT_struct
{
   png_charp name;
   png_byte depth;
   png_sPLT_entryp entries;
   png_int_32 nentries;
} png_sPLT_t;
typedef png_sPLT_t * png_sPLT_tp;
typedef png_sPLT_t * * png_sPLT_tpp;
# 482 "src/png/png.h"
typedef struct png_text_struct
{
   int compression;




   png_charp key;
   png_charp text;

   png_size_t text_length;







} png_text;
typedef png_text * png_textp;
typedef png_text * * png_textpp;
# 521 "src/png/png.h"
typedef struct png_time_struct
{
   png_uint_16 year;
   png_byte month;
   png_byte day;
   png_byte hour;
   png_byte minute;
   png_byte second;
} png_time;
typedef png_time * png_timep;
typedef png_time * * png_timepp;







typedef struct png_unknown_chunk_t
{
    png_byte name[5];
    png_byte *data;
    png_size_t size;


    png_byte location;
}
png_unknown_chunk;
typedef png_unknown_chunk * png_unknown_chunkp;
typedef png_unknown_chunk * * png_unknown_chunkpp;
# 592 "src/png/png.h"
typedef struct png_info_struct
{

   png_uint_32 width;
   png_uint_32 height;
   png_uint_32 valid;
   png_uint_32 rowbytes;
   png_colorp palette;
   png_uint_16 num_palette;
   png_uint_16 num_trans;
   png_byte bit_depth;
   png_byte color_type;

   png_byte compression_type;
   png_byte filter_type;
   png_byte interlace_type;


   png_byte channels;
   png_byte pixel_depth;
   png_byte spare_byte;
   png_byte signature[8];
# 626 "src/png/png.h"
   float gamma;





   png_byte srgb_intent;
# 644 "src/png/png.h"
   int num_text;
   int max_text;
   png_textp text;






   png_time mod_time;
# 663 "src/png/png.h"
   png_color_8 sig_bit;
# 677 "src/png/png.h"
   png_bytep trans;
   png_color_16 trans_values;
# 688 "src/png/png.h"
   png_color_16 background;
# 697 "src/png/png.h"
   png_int_32 x_offset;
   png_int_32 y_offset;
   png_byte offset_unit_type;







   png_uint_32 x_pixels_per_unit;
   png_uint_32 y_pixels_per_unit;
   png_byte phys_unit_type;
# 719 "src/png/png.h"
   png_uint_16p hist;
# 730 "src/png/png.h"
   float x_white;
   float y_white;
   float x_red;
   float y_red;
   float x_green;
   float y_green;
   float x_blue;
   float y_blue;
# 753 "src/png/png.h"
   png_charp pcal_purpose;
   png_int_32 pcal_X0;
   png_int_32 pcal_X1;
   png_charp pcal_units;
   png_charpp pcal_params;
   png_byte pcal_type;
   png_byte pcal_nparams;




   png_uint_32 free_me;




   png_unknown_chunkp unknown_chunks;
   png_size_t unknown_chunks_num;




   png_charp iccp_name;
   png_charp iccp_profile;

   png_uint_32 iccp_proflen;
   png_byte iccp_compression;




   png_sPLT_tp splt_palettes;
   png_uint_32 splt_palettes_num;
# 796 "src/png/png.h"
   png_byte scal_unit;

   double scal_pixel_width;
   double scal_pixel_height;


   png_charp scal_s_width;
   png_charp scal_s_height;






   png_bytepp row_pointers;



   png_fixed_point int_gamma;



   png_fixed_point int_x_white;
   png_fixed_point int_y_white;
   png_fixed_point int_x_red;
   png_fixed_point int_y_red;
   png_fixed_point int_x_green;
   png_fixed_point int_y_green;
   png_fixed_point int_x_blue;
   png_fixed_point int_y_blue;


} png_info;

typedef png_info * png_infop;
typedef png_info * * png_infopp;
# 928 "src/png/png.h"
typedef struct png_row_info_struct
{
   png_uint_32 width;
   png_uint_32 rowbytes;
   png_byte color_type;
   png_byte bit_depth;
   png_byte channels;
   png_byte pixel_depth;
} png_row_info;

typedef png_row_info * png_row_infop;
typedef png_row_info * * png_row_infopp;







typedef struct png_struct_def png_struct;
typedef png_struct * png_structp;

typedef void (__attribute__((__cdecl__)) *png_error_ptr) (png_structp, png_const_charp);
typedef void (__attribute__((__cdecl__)) *png_rw_ptr) (png_structp, png_bytep, png_size_t);
typedef void (__attribute__((__cdecl__)) *png_flush_ptr) (png_structp);
typedef void (__attribute__((__cdecl__)) *png_read_status_ptr) (png_structp, png_uint_32, int);

typedef void (__attribute__((__cdecl__)) *png_write_status_ptr) (png_structp, png_uint_32, int);



typedef void (__attribute__((__cdecl__)) *png_progressive_info_ptr) (png_structp, png_infop);
typedef void (__attribute__((__cdecl__)) *png_progressive_end_ptr) (png_structp, png_infop);
typedef void (__attribute__((__cdecl__)) *png_progressive_row_ptr) (png_structp, png_bytep, png_uint_32, int);






typedef void (__attribute__((__cdecl__)) *png_user_transform_ptr) (png_structp, png_row_infop, png_bytep);




typedef int (__attribute__((__cdecl__)) *png_user_chunk_ptr) (png_structp, png_unknown_chunkp);


typedef void (__attribute__((__cdecl__)) *png_unknown_chunk_ptr) (png_structp);
# 999 "src/png/png.h"
typedef png_voidp (*png_malloc_ptr) (png_structp, png_size_t);
typedef void (*png_free_ptr) (png_structp, png_voidp);
# 1009 "src/png/png.h"
struct png_struct_def
{

   jmp_buf jmpbuf;

   png_error_ptr error_fn;
   png_error_ptr warning_fn;
   png_voidp error_ptr;
   png_rw_ptr write_data_fn;
   png_rw_ptr read_data_fn;
   png_voidp io_ptr;


   png_user_transform_ptr read_user_transform_fn;



   png_user_transform_ptr write_user_transform_fn;






   png_voidp user_transform_ptr;
   png_byte user_transform_depth;
   png_byte user_transform_channels;



   png_uint_32 mode;
   png_uint_32 flags;
   png_uint_32 transformations;

   z_stream zstream;
   png_bytep zbuf;
   png_size_t zbuf_size;
   int zlib_level;
   int zlib_method;
   int zlib_window_bits;
   int zlib_mem_level;
   int zlib_strategy;

   png_uint_32 width;
   png_uint_32 height;
   png_uint_32 num_rows;
   png_uint_32 usr_width;
   png_uint_32 rowbytes;
   png_uint_32 irowbytes;
   png_uint_32 iwidth;
   png_uint_32 row_number;
   png_bytep prev_row;
   png_bytep row_buf;
   png_bytep sub_row;
   png_bytep up_row;
   png_bytep avg_row;
   png_bytep paeth_row;
   png_row_info row_info;

   png_uint_32 idat_size;
   png_uint_32 crc;
   png_colorp palette;
   png_uint_16 num_palette;
   png_uint_16 num_trans;
   png_byte chunk_name[5];
   png_byte compression;
   png_byte filter;
   png_byte interlaced;
   png_byte pass;
   png_byte do_filter;
   png_byte color_type;
   png_byte bit_depth;
   png_byte usr_bit_depth;
   png_byte pixel_depth;
   png_byte channels;
   png_byte usr_channels;
   png_byte sig_bytes;





   png_uint_16 filler;




   png_byte background_gamma_type;

   float background_gamma;

   png_color_16 background;

   png_color_16 background_1;




   png_flush_ptr output_flush_fn;
   png_uint_32 flush_dist;
   png_uint_32 flush_rows;



   int gamma_shift;

   float gamma;
   float screen_gamma;




   png_bytep gamma_table;
   png_bytep gamma_from_1;
   png_bytep gamma_to_1;
   png_uint_16pp gamma_16_table;
   png_uint_16pp gamma_16_from_1;
   png_uint_16pp gamma_16_to_1;



   png_color_8 sig_bit;



   png_color_8 shift;




   png_bytep trans;
   png_color_16 trans_values;


   png_read_status_ptr read_row_fn;
   png_write_status_ptr write_row_fn;

   png_progressive_info_ptr info_fn;
   png_progressive_row_ptr row_fn;
   png_progressive_end_ptr end_fn;
   png_bytep save_buffer_ptr;
   png_bytep save_buffer;
   png_bytep current_buffer_ptr;
   png_bytep current_buffer;
   png_uint_32 push_length;
   png_uint_32 skip_length;
   png_size_t save_buffer_size;
   png_size_t save_buffer_max;
   png_size_t buffer_size;
   png_size_t current_buffer_size;
   int process_mode;
   int cur_palette;


     png_size_t current_text_size;
     png_size_t current_text_left;
     png_charp current_text;
     png_charp current_text_ptr;
# 1181 "src/png/png.h"
   png_bytep palette_lookup;
   png_bytep dither_index;



   png_uint_16p hist;



   png_byte heuristic_method;
   png_byte num_prev_filters;
   png_bytep prev_filters;
   png_uint_16p filter_weights;
   png_uint_16p inv_filter_weights;
   png_uint_16p filter_costs;
   png_uint_16p inv_filter_costs;



   png_charp time_buffer;





   png_uint_32 free_me;



   png_voidp user_chunk_ptr;
   png_user_chunk_ptr read_user_chunk_fn;



   int num_chunk_list;
   png_bytep chunk_list;




   png_byte rgb_to_gray_status;

   png_uint_16 rgb_to_gray_red_coeff;
   png_uint_16 rgb_to_gray_green_coeff;
   png_uint_16 rgb_to_gray_blue_coeff;
# 1236 "src/png/png.h"
   png_uint_32 mng_features_permitted;





   png_fixed_point int_gamma;




   png_byte filter_type;
# 1257 "src/png/png.h"
   png_byte mmx_bitdepth_threshold;
   png_uint_32 mmx_rowbytes_threshold;
   png_uint_32 asm_flags;




   png_voidp mem_ptr;
   png_malloc_ptr malloc_fn;
   png_free_ptr free_fn;



   png_bytep big_row_buf;



   png_bytep dither_sort;
   png_bytep index_to_palette;

   png_bytep palette_to_index;



};





typedef png_structp version_1_2_5rc3;

typedef png_struct * * png_structpp;
# 1298 "src/png/png.h"
extern png_uint_32 __attribute__((__cdecl__)) png_access_version_number (void);




extern void __attribute__((__cdecl__)) png_set_sig_bytes (png_structp png_ptr, int num_bytes);







extern int __attribute__((__cdecl__)) png_sig_cmp (png_bytep sig, png_size_t start, png_size_t num_to_check);





extern int __attribute__((__cdecl__)) png_check_sig (png_bytep sig, int num);


extern png_structp __attribute__((__cdecl__)) png_create_read_struct
   (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn);



extern png_structp __attribute__((__cdecl__)) png_create_write_struct
   (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn);


extern png_uint_32 __attribute__((__cdecl__)) png_get_compression_buffer_size
   (png_structp png_ptr);

extern void __attribute__((__cdecl__)) png_set_compression_buffer_size
   (png_structp png_ptr, png_uint_32 size);


extern int __attribute__((__cdecl__)) png_reset_zstream (png_structp png_ptr);



extern png_structp __attribute__((__cdecl__)) png_create_read_struct_2
   (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn);


extern png_structp __attribute__((__cdecl__)) png_create_write_struct_2
   (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn);





extern void __attribute__((__cdecl__)) png_write_chunk (png_structp png_ptr, png_bytep chunk_name, png_bytep data, png_size_t length);



extern void __attribute__((__cdecl__)) png_write_chunk_start (png_structp png_ptr, png_bytep chunk_name, png_uint_32 length);



extern void __attribute__((__cdecl__)) png_write_chunk_data (png_structp png_ptr, png_bytep data, png_size_t length);



extern void __attribute__((__cdecl__)) png_write_chunk_end (png_structp png_ptr);


extern png_infop __attribute__((__cdecl__)) png_create_info_struct
   (png_structp png_ptr);


extern void __attribute__((__cdecl__)) png_info_init (png_infop info_ptr);


extern void __attribute__((__cdecl__)) png_info_init_3 (png_infopp info_ptr, png_size_t png_info_struct_size);



extern void __attribute__((__cdecl__)) png_write_info_before_PLTE (png_structp png_ptr, png_infop info_ptr);

extern void __attribute__((__cdecl__)) png_write_info (png_structp png_ptr, png_infop info_ptr);



extern void __attribute__((__cdecl__)) png_read_info (png_structp png_ptr, png_infop info_ptr);



extern png_charp __attribute__((__cdecl__)) png_convert_to_rfc1123
   (png_structp png_ptr, png_timep ptime);






extern void __attribute__((__cdecl__)) png_convert_from_struct_tm (png_timep ptime, struct tm * ttime);



extern void __attribute__((__cdecl__)) png_convert_from_time_t (png_timep ptime, time_t ttime);






extern void __attribute__((__cdecl__)) png_set_expand (png_structp png_ptr);
extern void __attribute__((__cdecl__)) png_set_gray_1_2_4_to_8 (png_structp png_ptr);
extern void __attribute__((__cdecl__)) png_set_palette_to_rgb (png_structp png_ptr);
extern void __attribute__((__cdecl__)) png_set_tRNS_to_alpha (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_bgr (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_gray_to_rgb (png_structp png_ptr);





extern void __attribute__((__cdecl__)) png_set_rgb_to_gray (png_structp png_ptr, int error_action, double red, double green );


extern void __attribute__((__cdecl__)) png_set_rgb_to_gray_fixed (png_structp png_ptr, int error_action, png_fixed_point red, png_fixed_point green );

extern png_byte __attribute__((__cdecl__)) png_get_rgb_to_gray_status (png_structp png_ptr);



extern void __attribute__((__cdecl__)) png_build_grayscale_palette (int bit_depth, png_colorp palette);



extern void __attribute__((__cdecl__)) png_set_strip_alpha (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_swap_alpha (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_invert_alpha (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_filler (png_structp png_ptr, png_uint_32 filler, int flags);
# 1462 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_swap (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_packing (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_packswap (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_shift (png_structp png_ptr, png_color_8p true_bits);






extern int __attribute__((__cdecl__)) png_set_interlace_handling (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_invert_mono (png_structp png_ptr);





extern void __attribute__((__cdecl__)) png_set_background (png_structp png_ptr, png_color_16p background_color, int background_gamma_code, int need_expand, double background_gamma);
# 1507 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_strip_16 (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_dither (png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_dither);







extern void __attribute__((__cdecl__)) png_set_gamma (png_structp png_ptr, double screen_gamma, double default_file_gamma);
# 1529 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted);





extern void __attribute__((__cdecl__)) png_set_flush (png_structp png_ptr, int nrows);

extern void __attribute__((__cdecl__)) png_write_flush (png_structp png_ptr);



extern void __attribute__((__cdecl__)) png_start_read_image (png_structp png_ptr);


extern void __attribute__((__cdecl__)) png_read_update_info (png_structp png_ptr, png_infop info_ptr);



extern void __attribute__((__cdecl__)) png_read_rows (png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows);



extern void __attribute__((__cdecl__)) png_read_row (png_structp png_ptr, png_bytep row, png_bytep display_row);




extern void __attribute__((__cdecl__)) png_read_image (png_structp png_ptr, png_bytepp image);



extern void __attribute__((__cdecl__)) png_write_row (png_structp png_ptr, png_bytep row);



extern void __attribute__((__cdecl__)) png_write_rows (png_structp png_ptr, png_bytepp row, png_uint_32 num_rows);



extern void __attribute__((__cdecl__)) png_write_image (png_structp png_ptr, png_bytepp image);



extern void __attribute__((__cdecl__)) png_write_end (png_structp png_ptr, png_infop info_ptr);



extern void __attribute__((__cdecl__)) png_read_end (png_structp png_ptr, png_infop info_ptr);



extern void __attribute__((__cdecl__)) png_destroy_info_struct (png_structp png_ptr, png_infopp info_ptr_ptr);



extern void __attribute__((__cdecl__)) png_destroy_read_struct (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr);



extern void png_read_destroy (png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr);



extern void __attribute__((__cdecl__)) png_destroy_write_struct
   (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr);


extern void png_write_destroy (png_structp png_ptr);


extern void __attribute__((__cdecl__)) png_set_crc_action (png_structp png_ptr, int crit_action, int ancil_action);
# 1630 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_filter (png_structp png_ptr, int method, int filters);
# 1687 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_filter_heuristics (png_structp png_ptr, int heuristic_method, int num_weights, png_doublep filter_weights, png_doublep filter_costs);
# 1708 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_compression_level (png_structp png_ptr, int level);


extern void __attribute__((__cdecl__)) png_set_compression_mem_level
   (png_structp png_ptr, int mem_level);

extern void __attribute__((__cdecl__)) png_set_compression_strategy
   (png_structp png_ptr, int strategy);

extern void __attribute__((__cdecl__)) png_set_compression_window_bits
   (png_structp png_ptr, int window_bits);

extern void __attribute__((__cdecl__)) png_set_compression_method (png_structp png_ptr, int method);
# 1734 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_init_io (png_structp png_ptr, png_FILE_p fp);
# 1745 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_error_fn (png_structp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn);



extern png_voidp __attribute__((__cdecl__)) png_get_error_ptr (png_structp png_ptr);






extern void __attribute__((__cdecl__)) png_set_write_fn (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn);



extern void __attribute__((__cdecl__)) png_set_read_fn (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn);



extern png_voidp __attribute__((__cdecl__)) png_get_io_ptr (png_structp png_ptr);

extern void __attribute__((__cdecl__)) png_set_read_status_fn (png_structp png_ptr, png_read_status_ptr read_row_fn);


extern void __attribute__((__cdecl__)) png_set_write_status_fn (png_structp png_ptr, png_write_status_ptr write_row_fn);




extern void __attribute__((__cdecl__)) png_set_mem_fn (png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn);


extern png_voidp __attribute__((__cdecl__)) png_get_mem_ptr (png_structp png_ptr);




extern void __attribute__((__cdecl__)) png_set_read_user_transform_fn (png_structp png_ptr, png_user_transform_ptr read_user_transform_fn);





extern void __attribute__((__cdecl__)) png_set_write_user_transform_fn (png_structp png_ptr, png_user_transform_ptr write_user_transform_fn);






extern void __attribute__((__cdecl__)) png_set_user_transform_info (png_structp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels);



extern png_voidp __attribute__((__cdecl__)) png_get_user_transform_ptr
   (png_structp png_ptr);



extern void __attribute__((__cdecl__)) png_set_read_user_chunk_fn (png_structp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn);

extern png_voidp __attribute__((__cdecl__)) png_get_user_chunk_ptr (png_structp png_ptr);







extern void __attribute__((__cdecl__)) png_set_progressive_read_fn (png_structp png_ptr, png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn);





extern png_voidp __attribute__((__cdecl__)) png_get_progressive_ptr
   (png_structp png_ptr);


extern void __attribute__((__cdecl__)) png_process_data (png_structp png_ptr, png_infop info_ptr, png_bytep buffer, png_size_t buffer_size);





extern void __attribute__((__cdecl__)) png_progressive_combine_row (png_structp png_ptr, png_bytep old_row, png_bytep new_row);



extern png_voidp __attribute__((__cdecl__)) png_malloc (png_structp png_ptr, png_uint_32 size);






extern png_voidp __attribute__((__cdecl__)) png_malloc_warn (png_structp png_ptr, png_uint_32 size);




extern void __attribute__((__cdecl__)) png_free (png_structp png_ptr, png_voidp ptr);
# 1858 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_free_data (png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num);




extern void __attribute__((__cdecl__)) png_data_freer (png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask);
# 1886 "src/png/png.h"
extern png_voidp __attribute__((__cdecl__)) png_malloc_default (png_structp png_ptr, png_uint_32 size);

extern void __attribute__((__cdecl__)) png_free_default (png_structp png_ptr, png_voidp ptr);



extern png_voidp __attribute__((__cdecl__)) png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2, png_uint_32 size);


extern png_voidp __attribute__((__cdecl__)) png_memset_check (png_structp png_ptr, png_voidp s1, int value, png_uint_32 size);
# 1904 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_error (png_structp png_ptr, png_const_charp error_message);



extern void __attribute__((__cdecl__)) png_chunk_error (png_structp png_ptr, png_const_charp error_message);



extern void __attribute__((__cdecl__)) png_warning (png_structp png_ptr, png_const_charp warning_message);



extern void __attribute__((__cdecl__)) png_chunk_warning (png_structp png_ptr, png_const_charp warning_message);
# 1932 "src/png/png.h"
extern png_uint_32 __attribute__((__cdecl__)) png_get_valid (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag);



extern png_uint_32 __attribute__((__cdecl__)) png_get_rowbytes (png_structp png_ptr, png_infop info_ptr);





extern png_bytepp __attribute__((__cdecl__)) png_get_rows (png_structp png_ptr, png_infop info_ptr);



extern void __attribute__((__cdecl__)) png_set_rows (png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers);




extern png_byte __attribute__((__cdecl__)) png_get_channels (png_structp png_ptr, png_infop info_ptr);




extern png_uint_32 __attribute__((__cdecl__)) png_get_image_width (png_structp png_ptr, png_infop info_ptr);



extern png_uint_32 __attribute__((__cdecl__)) png_get_image_height (png_structp png_ptr, png_infop info_ptr);



extern png_byte __attribute__((__cdecl__)) png_get_bit_depth (png_structp png_ptr, png_infop info_ptr);



extern png_byte __attribute__((__cdecl__)) png_get_color_type (png_structp png_ptr, png_infop info_ptr);



extern png_byte __attribute__((__cdecl__)) png_get_filter_type (png_structp png_ptr, png_infop info_ptr);



extern png_byte __attribute__((__cdecl__)) png_get_interlace_type (png_structp png_ptr, png_infop info_ptr);



extern png_byte __attribute__((__cdecl__)) png_get_compression_type (png_structp png_ptr, png_infop info_ptr);



extern png_uint_32 __attribute__((__cdecl__)) png_get_pixels_per_meter (png_structp png_ptr, png_infop info_ptr);

extern png_uint_32 __attribute__((__cdecl__)) png_get_x_pixels_per_meter (png_structp png_ptr, png_infop info_ptr);

extern png_uint_32 __attribute__((__cdecl__)) png_get_y_pixels_per_meter (png_structp png_ptr, png_infop info_ptr);




extern float __attribute__((__cdecl__)) png_get_pixel_aspect_ratio (png_structp png_ptr, png_infop info_ptr);




extern png_int_32 __attribute__((__cdecl__)) png_get_x_offset_pixels (png_structp png_ptr, png_infop info_ptr);

extern png_int_32 __attribute__((__cdecl__)) png_get_y_offset_pixels (png_structp png_ptr, png_infop info_ptr);

extern png_int_32 __attribute__((__cdecl__)) png_get_x_offset_microns (png_structp png_ptr, png_infop info_ptr);

extern png_int_32 __attribute__((__cdecl__)) png_get_y_offset_microns (png_structp png_ptr, png_infop info_ptr);





extern png_bytep __attribute__((__cdecl__)) png_get_signature (png_structp png_ptr, png_infop info_ptr);



extern png_uint_32 __attribute__((__cdecl__)) png_get_bKGD (png_structp png_ptr, png_infop info_ptr, png_color_16p *background);




extern void __attribute__((__cdecl__)) png_set_bKGD (png_structp png_ptr, png_infop info_ptr, png_color_16p background);





extern png_uint_32 __attribute__((__cdecl__)) png_get_cHRM (png_structp png_ptr, png_infop info_ptr, double *white_x, double *white_y, double *red_x, double *red_y, double *green_x, double *green_y, double *blue_x, double *blue_y);





extern png_uint_32 __attribute__((__cdecl__)) png_get_cHRM_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point *int_blue_x, png_fixed_point *int_blue_y);
# 2041 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_cHRM (png_structp png_ptr, png_infop info_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y);




extern void __attribute__((__cdecl__)) png_set_cHRM_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y);
# 2056 "src/png/png.h"
extern png_uint_32 __attribute__((__cdecl__)) png_get_gAMA (png_structp png_ptr, png_infop info_ptr, double *file_gamma);


extern png_uint_32 __attribute__((__cdecl__)) png_get_gAMA_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_file_gamma);





extern void __attribute__((__cdecl__)) png_set_gAMA (png_structp png_ptr, png_infop info_ptr, double file_gamma);


extern void __attribute__((__cdecl__)) png_set_gAMA_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point int_file_gamma);




extern png_uint_32 __attribute__((__cdecl__)) png_get_hIST (png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist);




extern void __attribute__((__cdecl__)) png_set_hIST (png_structp png_ptr, png_infop info_ptr, png_uint_16p hist);



extern png_uint_32 __attribute__((__cdecl__)) png_get_IHDR (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method);




extern void __attribute__((__cdecl__)) png_set_IHDR (png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_method, int compression_method, int filter_method);





extern png_uint_32 __attribute__((__cdecl__)) png_get_oFFs (png_structp png_ptr, png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type);





extern void __attribute__((__cdecl__)) png_set_oFFs (png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type);





extern png_uint_32 __attribute__((__cdecl__)) png_get_pCAL (png_structp png_ptr, png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, png_charp *units, png_charpp *params);





extern void __attribute__((__cdecl__)) png_set_pCAL (png_structp png_ptr, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params);





extern png_uint_32 __attribute__((__cdecl__)) png_get_pHYs (png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type);




extern void __attribute__((__cdecl__)) png_set_pHYs (png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type);



extern png_uint_32 __attribute__((__cdecl__)) png_get_PLTE (png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette);


extern void __attribute__((__cdecl__)) png_set_PLTE (png_structp png_ptr, png_infop info_ptr, png_colorp palette, int num_palette);



extern png_uint_32 __attribute__((__cdecl__)) png_get_sBIT (png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit);




extern void __attribute__((__cdecl__)) png_set_sBIT (png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit);




extern png_uint_32 __attribute__((__cdecl__)) png_get_sRGB (png_structp png_ptr, png_infop info_ptr, int *intent);




extern void __attribute__((__cdecl__)) png_set_sRGB (png_structp png_ptr, png_infop info_ptr, int intent);

extern void __attribute__((__cdecl__)) png_set_sRGB_gAMA_and_cHRM (png_structp png_ptr, png_infop info_ptr, int intent);




extern png_uint_32 __attribute__((__cdecl__)) png_get_iCCP (png_structp png_ptr, png_infop info_ptr, png_charpp name, int *compression_type, png_charpp profile, png_uint_32 *proflen);






extern void __attribute__((__cdecl__)) png_set_iCCP (png_structp png_ptr, png_infop info_ptr, png_charp name, int compression_type, png_charp profile, png_uint_32 proflen);






extern png_uint_32 __attribute__((__cdecl__)) png_get_sPLT (png_structp png_ptr, png_infop info_ptr, png_sPLT_tpp entries);




extern void __attribute__((__cdecl__)) png_set_sPLT (png_structp png_ptr, png_infop info_ptr, png_sPLT_tp entries, int nentries);





extern png_uint_32 __attribute__((__cdecl__)) png_get_text (png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, int *num_text);
# 2193 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_text (png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text);




extern png_uint_32 __attribute__((__cdecl__)) png_get_tIME (png_structp png_ptr, png_infop info_ptr, png_timep *mod_time);




extern void __attribute__((__cdecl__)) png_set_tIME (png_structp png_ptr, png_infop info_ptr, png_timep mod_time);




extern png_uint_32 __attribute__((__cdecl__)) png_get_tRNS (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values);





extern void __attribute__((__cdecl__)) png_set_tRNS (png_structp png_ptr, png_infop info_ptr, png_bytep trans, int num_trans, png_color_16p trans_values);
# 2224 "src/png/png.h"
extern png_uint_32 __attribute__((__cdecl__)) png_get_sCAL (png_structp png_ptr, png_infop info_ptr, int *unit, double *width, double *height);
# 2236 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_sCAL (png_structp png_ptr, png_infop info_ptr, int unit, double width, double height);



extern void __attribute__((__cdecl__)) png_set_sCAL_s (png_structp png_ptr, png_infop info_ptr, int unit, png_charp swidth, png_charp sheight);
# 2255 "src/png/png.h"
extern void __attribute__((__cdecl__)) png_set_keep_unknown_chunks (png_structp png_ptr, int keep, png_bytep chunk_list, int num_chunks);

extern void __attribute__((__cdecl__)) png_set_unknown_chunks (png_structp png_ptr, png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns);

extern void __attribute__((__cdecl__)) png_set_unknown_chunk_location
   (png_structp png_ptr, png_infop info_ptr, int chunk, int location);
extern png_uint_32 __attribute__((__cdecl__)) png_get_unknown_chunks (png_structp png_ptr, png_infop info_ptr, png_unknown_chunkpp entries);



 int __attribute__((__cdecl__)) png_handle_as_unknown (png_structp png_ptr, png_bytep chunk_name);






extern void __attribute__((__cdecl__)) png_set_invalid (png_structp png_ptr, png_infop info_ptr, int mask);




extern void __attribute__((__cdecl__)) png_read_png (png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params);



extern void __attribute__((__cdecl__)) png_write_png (png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params);
# 2338 "src/png/png.h"
extern png_bytep __attribute__((__cdecl__)) png_sig_bytes (void);

extern png_charp __attribute__((__cdecl__)) png_get_copyright (png_structp png_ptr);
extern png_charp __attribute__((__cdecl__)) png_get_header_ver (png_structp png_ptr);
extern png_charp __attribute__((__cdecl__)) png_get_header_version (png_structp png_ptr);
extern png_charp __attribute__((__cdecl__)) png_get_libpng_ver (png_structp png_ptr);


extern png_uint_32 __attribute__((__cdecl__)) png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features_permitted);
# 2381 "src/png/png.h"
extern png_uint_32 __attribute__((__cdecl__)) png_get_mmx_flagmask
   (int flag_select, int *compilerID);


extern png_uint_32 __attribute__((__cdecl__)) png_get_asm_flagmask
   (int flag_select);


extern png_uint_32 __attribute__((__cdecl__)) png_get_asm_flags
   (png_structp png_ptr);


extern png_byte __attribute__((__cdecl__)) png_get_mmx_bitdepth_threshold
   (png_structp png_ptr);


extern png_uint_32 __attribute__((__cdecl__)) png_get_mmx_rowbytes_threshold
   (png_structp png_ptr);


extern void __attribute__((__cdecl__)) png_set_asm_flags
   (png_structp png_ptr, png_uint_32 asm_flags);


extern void __attribute__((__cdecl__)) png_set_mmx_thresholds
   (png_structp png_ptr, png_byte mmx_bitdepth_threshold, png_uint_32 mmx_rowbytes_threshold);







extern int __attribute__((__cdecl__)) png_mmx_support (void);




extern void __attribute__((__cdecl__)) png_set_strip_error_numbers (png_structp png_ptr, png_uint_32 strip_mode);
# 2651 "src/png/png.h"
 png_int_32 png_get_int_32 (png_bytep buf);

 png_uint_32 png_get_uint_32 (png_bytep buf);
 png_uint_16 png_get_uint_16 (png_bytep buf);





extern void __attribute__((__cdecl__)) png_read_init (png_structp png_ptr);



extern void __attribute__((__cdecl__)) png_read_init_3 (png_structpp ptr_ptr, png_const_charp user_png_ver, png_size_t png_struct_size);

extern void __attribute__((__cdecl__)) png_read_init_2 (png_structp png_ptr, png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t png_info_size);






extern void __attribute__((__cdecl__)) png_write_init (png_structp png_ptr);



extern void __attribute__((__cdecl__)) png_write_init_3 (png_structpp ptr_ptr, png_const_charp user_png_ver, png_size_t png_struct_size);

extern void __attribute__((__cdecl__)) png_write_init_2 (png_structp png_ptr, png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t png_info_size);




 png_voidp png_create_struct (int type);


 void png_destroy_struct (png_voidp struct_ptr);

 png_voidp png_create_struct_2 (int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr);

 void png_destroy_struct_2 (png_voidp struct_ptr, png_free_ptr free_fn, png_voidp mem_ptr);



 void png_info_destroy (png_structp png_ptr, png_infop info_ptr);




 voidpf png_zalloc (voidpf png_ptr, uInt items, uInt size);


 void png_zfree (voidpf png_ptr, voidpf ptr);




 void __attribute__((__cdecl__)) png_default_read_data (png_structp png_ptr, png_bytep data, png_size_t length);



 void __attribute__((__cdecl__)) png_push_fill_buffer (png_structp png_ptr, png_bytep buffer, png_size_t length);



 void __attribute__((__cdecl__)) png_default_write_data (png_structp png_ptr, png_bytep data, png_size_t length);




 void __attribute__((__cdecl__)) png_default_flush (png_structp png_ptr);
# 2732 "src/png/png.h"
 void png_reset_crc (png_structp png_ptr);


 void png_write_data (png_structp png_ptr, png_bytep data, png_size_t length);



 void png_read_data (png_structp png_ptr, png_bytep data, png_size_t length);



 void png_crc_read (png_structp png_ptr, png_bytep buf, png_size_t length);





 png_charp png_decompress_chunk (png_structp png_ptr, int comp_type, png_charp chunkdata, png_size_t chunklength, png_size_t prefix_length, png_size_t *data_length);





 int png_crc_finish (png_structp png_ptr, png_uint_32 skip);


 int png_crc_error (png_structp png_ptr);





 void png_calculate_crc (png_structp png_ptr, png_bytep ptr, png_size_t length);



 void png_flush (png_structp png_ptr);







 void png_save_uint_32 (png_bytep buf, png_uint_32 i);


 void png_save_int_32 (png_bytep buf, png_int_32 i);






 void png_save_uint_16 (png_bytep buf, unsigned int i);


 void png_write_sig (png_structp png_ptr);






 void png_write_IHDR (png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int compression_method, int filter_method, int interlace_method);




 void png_write_PLTE (png_structp png_ptr, png_colorp palette, png_uint_32 num_pal);


 void png_write_IDAT (png_structp png_ptr, png_bytep data, png_size_t length);


 void png_write_IEND (png_structp png_ptr);



 void png_write_gAMA (png_structp png_ptr, double file_gamma);


 void png_write_gAMA_fixed (png_structp png_ptr, png_fixed_point file_gamma);





 void png_write_sBIT (png_structp png_ptr, png_color_8p sbit, int color_type);





 void png_write_cHRM (png_structp png_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y);





 void png_write_cHRM_fixed (png_structp png_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y);
# 2841 "src/png/png.h"
 void png_write_sRGB (png_structp png_ptr, int intent);




 void png_write_iCCP (png_structp png_ptr, png_charp name, int compression_type, png_charp profile, int proflen);






 void png_write_sPLT (png_structp png_ptr, png_sPLT_tp palette);




 void png_write_tRNS (png_structp png_ptr, png_bytep trans, png_color_16p values, int number, int color_type);




 void png_write_bKGD (png_structp png_ptr, png_color_16p values, int color_type);




 void png_write_hIST (png_structp png_ptr, png_uint_16p hist, int num_hist);





 png_size_t png_check_keyword (png_structp png_ptr, png_charp key, png_charpp new_key);




 void png_write_tEXt (png_structp png_ptr, png_charp key, png_charp text, png_size_t text_len);




 void png_write_zTXt (png_structp png_ptr, png_charp key, png_charp text, png_size_t text_len, int compression);
# 2895 "src/png/png.h"
 int png_set_text_2 (png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text);




 void png_write_oFFs (png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset, int unit_type);




 void png_write_pCAL (png_structp png_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params);





 void png_write_pHYs (png_structp png_ptr, png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, int unit_type);





 void png_write_tIME (png_structp png_ptr, png_timep mod_time);





 void png_write_sCAL (png_structp png_ptr, int unit, double width, double height);
# 2934 "src/png/png.h"
 void png_write_finish_row (png_structp png_ptr);


 void png_write_start_row (png_structp png_ptr);


 void png_build_gamma_table (png_structp png_ptr);



 void png_combine_row (png_structp png_ptr, png_bytep row, int mask);
# 2953 "src/png/png.h"
 void png_do_read_interlace (png_structp png_ptr);






 void png_do_write_interlace (png_row_infop row_info, png_bytep row, int pass);




 void png_read_filter_row (png_structp png_ptr, png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter);



 void png_write_find_filter (png_structp png_ptr, png_row_infop row_info);



 void png_write_filtered_row (png_structp png_ptr, png_bytep filtered_row);


 void png_read_finish_row (png_structp png_ptr);


 void png_read_start_row (png_structp png_ptr);

 void png_read_transform_info (png_structp png_ptr, png_infop info_ptr);




 void png_do_read_filler (png_row_infop row_info, png_bytep row, png_uint_32 filler, png_uint_32 flags);




 void png_do_read_swap_alpha (png_row_infop row_info, png_bytep row);




 void png_do_write_swap_alpha (png_row_infop row_info, png_bytep row);




 void png_do_read_invert_alpha (png_row_infop row_info, png_bytep row);




 void png_do_write_invert_alpha (png_row_infop row_info, png_bytep row);





 void png_do_strip_filler (png_row_infop row_info, png_bytep row, png_uint_32 flags);




 void png_do_swap (png_row_infop row_info, png_bytep row);



 void png_do_packswap (png_row_infop row_info, png_bytep row);



 int png_do_rgb_to_gray (png_structp png_ptr, png_row_infop row_info, png_bytep row);




 void png_do_gray_to_rgb (png_row_infop row_info, png_bytep row);




 void png_do_unpack (png_row_infop row_info, png_bytep row);



 void png_do_unshift (png_row_infop row_info, png_bytep row, png_color_8p sig_bits);




 void png_do_invert (png_row_infop row_info, png_bytep row);



 void png_do_chop (png_row_infop row_info, png_bytep row);



 void png_do_dither (png_row_infop row_info, png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup);
# 3062 "src/png/png.h"
 void png_do_bgr (png_row_infop row_info, png_bytep row);



 void png_do_pack (png_row_infop row_info, png_bytep row, png_uint_32 bit_depth);




 void png_do_shift (png_row_infop row_info, png_bytep row, png_color_8p bit_depth);





 void png_do_background (png_row_infop row_info, png_bytep row, png_color_16p trans_values, png_color_16p background, png_color_16p background_1, png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, png_uint_16pp gamma_16_to_1, int gamma_shift);
# 3090 "src/png/png.h"
 void png_do_gamma (png_row_infop row_info, png_bytep row, png_bytep gamma_table, png_uint_16pp gamma_16_table, int gamma_shift);





 void png_do_expand_palette (png_row_infop row_info, png_bytep row, png_colorp palette, png_bytep trans, int num_trans);

 void png_do_expand (png_row_infop row_info, png_bytep row, png_color_16p trans_value);
# 3107 "src/png/png.h"
 void png_handle_IHDR (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);

 void png_handle_PLTE (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);

 void png_handle_IEND (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);



 void png_handle_bKGD (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_cHRM (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_gAMA (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_hIST (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




extern void png_handle_iCCP (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);
# 3145 "src/png/png.h"
 void png_handle_oFFs (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_pCAL (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_pHYs (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_sBIT (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_sCAL (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




extern void png_handle_sPLT (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_sRGB (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_tEXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_tIME (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_tRNS (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);




 void png_handle_zTXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);



 void png_handle_unknown (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);


 void png_check_chunk_name (png_structp png_ptr, png_bytep chunk_name);



 void png_do_read_transformations (png_structp png_ptr);
 void png_do_write_transformations (png_structp png_ptr);

 void png_init_read_transformations (png_structp png_ptr);


 void png_push_read_chunk (png_structp png_ptr, png_infop info_ptr);

 void png_push_read_sig (png_structp png_ptr, png_infop info_ptr);

 void png_push_check_crc (png_structp png_ptr);
 void png_push_crc_skip (png_structp png_ptr, png_uint_32 length);

 void png_push_crc_finish (png_structp png_ptr);
 void png_push_save_buffer (png_structp png_ptr);
 void png_push_restore_buffer (png_structp png_ptr, png_bytep buffer, png_size_t buffer_length);

 void png_push_read_IDAT (png_structp png_ptr);
 void png_process_IDAT_data (png_structp png_ptr, png_bytep buffer, png_size_t buffer_length);

 void png_push_process_row (png_structp png_ptr);
 void png_push_handle_unknown (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);

 void png_push_have_info (png_structp png_ptr, png_infop info_ptr);

 void png_push_have_end (png_structp png_ptr, png_infop info_ptr);

 void png_push_have_row (png_structp png_ptr, png_bytep row);
 void png_push_read_end (png_structp png_ptr, png_infop info_ptr);

 void png_process_some_data (png_structp png_ptr, png_infop info_ptr);

 void png_read_push_finish_row (png_structp png_ptr);

 void png_push_handle_tEXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);

 void png_push_read_tEXt (png_structp png_ptr, png_infop info_ptr);



 void png_push_handle_zTXt (png_structp png_ptr, png_infop info_ptr, png_uint_32 length);

 void png_push_read_zTXt (png_structp png_ptr, png_infop info_ptr);
# 3261 "src/png/png.h"
 void png_do_read_intrapixel (png_row_infop row_info, png_bytep row);

 void png_do_write_intrapixel (png_row_infop row_info, png_bytep row);





 void png_init_mmx_flags (png_structp png_ptr);
# 16 "src/png/pngread.c" 2


png_structp __attribute__((__cdecl__))
png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
   png_error_ptr error_fn, png_error_ptr warn_fn)
{


   return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn,
      warn_fn, (png_voidp)((void *)0), (png_malloc_ptr)((void *)0), (png_free_ptr)((void *)0)));
}


png_structp __attribute__((__cdecl__))
png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
   png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
   png_malloc_ptr malloc_fn, png_free_ptr free_fn)
{


   png_structp png_ptr;







   int i;

   ;

   png_ptr = (png_structp)png_create_struct_2(0x0001,
      (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);



   if (png_ptr == ((void *)0))
      return (((void *)0));



   png_init_mmx_flags(png_ptr);







   if (setjmp(png_ptr->jmpbuf))

   {
      png_free(png_ptr, png_ptr->zbuf);
      png_ptr->zbuf=((void *)0);

      png_destroy_struct_2((png_voidp)png_ptr,
         (png_free_ptr)free_fn, (png_voidp)mem_ptr);



      return (((void *)0));
   }






   png_set_mem_fn(png_ptr, mem_ptr, malloc_fn, free_fn);


   png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn);

   i=0;
   do
   {
     if(user_png_ver[i] != png_get_header_ver(((void *)0))[i])
        png_ptr->flags |= 0x20000L;
   } while (png_get_header_ver(((void *)0))[i++]);

   if (png_ptr->flags & 0x20000L)
   {





     if (user_png_ver == ((void *)0) || user_png_ver[0] != png_get_header_ver(((void *)0))[0] ||
         (user_png_ver[0] == '1' && user_png_ver[2] != png_get_header_ver(((void *)0))[2]) ||
         (user_png_ver[0] == '0' && user_png_ver[2] < '9'))
     {

        char msg[80];
        if (user_png_ver)
        {
          sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
             user_png_ver);
          png_warning(png_ptr, msg);
        }
        sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
           png_get_header_ver(((void *)0)));
        png_warning(png_ptr, msg);


        png_ptr->flags=0;

        png_error(png_ptr,
           "Incompatible libpng version in application and library");
     }
   }


   png_ptr->zbuf_size = 8192;
   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
     (png_uint_32)png_ptr->zbuf_size);
   png_ptr->zstream.zalloc = png_zalloc;
   png_ptr->zstream.zfree = png_zfree;
   png_ptr->zstream.opaque = (voidpf)png_ptr;

   switch (inflateInit_((&png_ptr->zstream), "1.1.4", sizeof(z_stream)))
   {
     case 0: break;
     case (-4):
     case (-2): png_error(png_ptr, "zlib memory error"); break;
     case (-6): png_error(png_ptr, "zlib version error"); break;
     default: png_error(png_ptr, "Unknown zlib error");
   }

   png_ptr->zstream.next_out = png_ptr->zbuf;
   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;

   png_set_read_fn(png_ptr, (png_voidp)((void *)0), (png_rw_ptr)((void *)0));
# 159 "src/png/pngread.c"
   if (setjmp(png_ptr->jmpbuf))
      abort();


   return (png_ptr);
}





void __attribute__((__cdecl__))
png_read_init(png_structp png_ptr)
{

   png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
}

void __attribute__((__cdecl__))
png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
   png_size_t png_struct_size, png_size_t png_info_size)
{


   if(sizeof(png_struct) > png_struct_size || sizeof(png_info) > png_info_size)
   {
      char msg[80];
      png_ptr->warning_fn=((void *)0);
      if (user_png_ver)
      {
        sprintf(msg, "Application was compiled with png.h from libpng-%.20s",
           user_png_ver);
        png_warning(png_ptr, msg);
      }
      sprintf(msg, "Application  is  running with png.c from libpng-%.20s",
         png_get_header_ver(((void *)0)));
      png_warning(png_ptr, msg);
   }

   if(sizeof(png_struct) > png_struct_size)
     {
       png_ptr->error_fn=((void *)0);

       png_ptr->flags=0;

       png_error(png_ptr,
       "The png struct allocated by the application for reading is too small.");
     }
   if(sizeof(png_info) > png_info_size)
     {
       png_ptr->error_fn=((void *)0);

       png_ptr->flags=0;

       png_error(png_ptr,
         "The info struct allocated by application for reading is too small.");
     }
   png_read_init_3(&png_ptr, user_png_ver, png_struct_size);
}

void __attribute__((__cdecl__))
png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
   png_size_t png_struct_size)
{

   jmp_buf tmp_jmp;


   int i=0;

   png_structp png_ptr=*ptr_ptr;

   do
   {
     if(user_png_ver[i] != png_get_header_ver(((void *)0))[i])
     {



       png_ptr->warning_fn=((void *)0);
       png_warning(png_ptr,
        "Application uses deprecated png_read_init() and should be recompiled.");
       break;

     }
   } while (png_get_header_ver(((void *)0))[i++]);

   ;



   memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf));


   if(sizeof(png_struct) > png_struct_size)
     {
       png_destroy_struct(png_ptr);
       *ptr_ptr = (png_structp)png_create_struct(0x0001);
       png_ptr = *ptr_ptr;
     }


   memset(png_ptr, 0, sizeof (png_struct));



   memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf));



   png_ptr->zbuf_size = 8192;
   png_ptr->zbuf = (png_bytep)png_malloc(png_ptr,
     (png_uint_32)png_ptr->zbuf_size);
   png_ptr->zstream.zalloc = png_zalloc;
   png_ptr->zstream.zfree = png_zfree;
   png_ptr->zstream.opaque = (voidpf)png_ptr;

   switch (inflateInit_((&png_ptr->zstream), "1.1.4", sizeof(z_stream)))
   {
     case 0: break;
     case (-4):
     case (-2): png_error(png_ptr, "zlib memory"); break;
     case (-6): png_error(png_ptr, "zlib version"); break;
     default: png_error(png_ptr, "Unknown zlib error");
   }

   png_ptr->zstream.next_out = png_ptr->zbuf;
   png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;

   png_set_read_fn(png_ptr, (png_voidp)((void *)0), (png_rw_ptr)((void *)0));
}
# 299 "src/png/pngread.c"
void __attribute__((__cdecl__))
png_read_info(png_structp png_ptr, png_infop info_ptr)
{
   ;

   if (png_ptr->sig_bytes < 8)
   {
      png_size_t num_checked = png_ptr->sig_bytes,
                 num_to_check = 8 - num_checked;

      png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check);
      png_ptr->sig_bytes = 8;

      if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
      {
         if (num_checked < 4 &&
             png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
            png_error(png_ptr, "Not a PNG file");
         else
            png_error(png_ptr, "PNG file corrupted by ASCII conversion");
      }
      if (num_checked < 3)
         png_ptr->mode |= 0x1000;
   }

   for(;;)
   {

      const png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'};
      const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'};
      const png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'};
      const png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'};

      const png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'};


      const png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'};


      const png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'};


      const png_byte png_hIST[5] = {104, 73, 83, 84, '\0'};


      const png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'};





      const png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'};


      const png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'};


      const png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'};


      const png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'};


      const png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'};


      const png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'};


      const png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'};


      const png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'};


      const png_byte png_tIME[5] = {116, 73, 77, 69, '\0'};


      const png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'};


      const png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'};


      png_byte chunk_length[4];
      png_uint_32 length;

      png_read_data(png_ptr, chunk_length, 4);
      length = png_get_uint_32(chunk_length);

      png_reset_crc(png_ptr);
      png_crc_read(png_ptr, png_ptr->chunk_name, 4);

      ;


      if (length > ((png_uint_32)0x7fffffffL))
         png_error(png_ptr, "Invalid chunk length.");




      if (!memcmp(png_ptr->chunk_name, png_IHDR, 4))
         png_handle_IHDR(png_ptr, info_ptr, length);
      else if (!memcmp(png_ptr->chunk_name, png_IEND, 4))
         png_handle_IEND(png_ptr, info_ptr, length);

      else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name))
      {
         if (!memcmp(png_ptr->chunk_name, png_IDAT, 4))
            png_ptr->mode |= 0x04;
         png_handle_unknown(png_ptr, info_ptr, length);
         if (!memcmp(png_ptr->chunk_name, png_PLTE, 4))
            png_ptr->mode |= 0x02;
         else if (!memcmp(png_ptr->chunk_name, png_IDAT, 4))
         {
            if (!(png_ptr->mode & 0x01))
               png_error(png_ptr, "Missing IHDR before IDAT");
            else if (png_ptr->color_type == (2 | 1) &&
                     !(png_ptr->mode & 0x02))
               png_error(png_ptr, "Missing PLTE before IDAT");
            break;
         }
      }

      else if (!memcmp(png_ptr->chunk_name, png_PLTE, 4))
         png_handle_PLTE(png_ptr, info_ptr, length);
      else if (!memcmp(png_ptr->chunk_name, png_IDAT, 4))
      {
         if (!(png_ptr->mode & 0x01))
            png_error(png_ptr, "Missing IHDR before IDAT");
         else if (png_ptr->color_type == (2 | 1) &&
                  !(png_ptr->mode & 0x02))
            png_error(png_ptr, "Missing PLTE before IDAT");

         png_ptr->idat_size = length;
         png_ptr->mode |= 0x04;
         break;
      }

      else if (!memcmp(png_ptr->chunk_name, png_bKGD, 4))
         png_handle_bKGD(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_cHRM, 4))
         png_handle_cHRM(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_gAMA, 4))
         png_handle_gAMA(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_hIST, 4))
         png_handle_hIST(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_oFFs, 4))
         png_handle_oFFs(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_pCAL, 4))
         png_handle_pCAL(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_sCAL, 4))
         png_handle_sCAL(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_pHYs, 4))
         png_handle_pHYs(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_sBIT, 4))
         png_handle_sBIT(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_sRGB, 4))
         png_handle_sRGB(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_iCCP, 4))
         png_handle_iCCP(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_sPLT, 4))
         png_handle_sPLT(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_tEXt, 4))
         png_handle_tEXt(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_tIME, 4))
         png_handle_tIME(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_tRNS, 4))
         png_handle_tRNS(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_zTXt, 4))
         png_handle_zTXt(png_ptr, info_ptr, length);





      else
         png_handle_unknown(png_ptr, info_ptr, length);
   }
}


void __attribute__((__cdecl__))
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
{
   ;
   if (!(png_ptr->flags & 0x0040))
      png_read_start_row(png_ptr);
   else
      png_warning(png_ptr,
      "Ignoring extra png_read_update_info() call; row buffer not reallocated");
   png_read_transform_info(png_ptr, info_ptr);
}






void __attribute__((__cdecl__))
png_start_read_image(png_structp png_ptr)
{
   ;
   if (!(png_ptr->flags & 0x0040))
      png_read_start_row(png_ptr);
}

void __attribute__((__cdecl__))
png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
{

   const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'};
   const int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
   const int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};

   int ret;
   ;

   if (!(png_ptr->flags & 0x0040))
      png_read_start_row(png_ptr);
   if (png_ptr->row_number == 0 && png_ptr->pass == 0)
   {
# 581 "src/png/pngread.c"
   }



   if (png_ptr->interlaced && (png_ptr->transformations & 0x0002))
   {
      switch (png_ptr->pass)
      {
         case 0:
            if (png_ptr->row_number & 0x07)
            {
               if (dsp_row != ((void *)0))
                  png_combine_row(png_ptr, dsp_row,
                     png_pass_dsp_mask[png_ptr->pass]);
               png_read_finish_row(png_ptr);
               return;
            }
            break;
         case 1:
            if ((png_ptr->row_number & 0x07) || png_ptr->width < 5)
            {
               if (dsp_row != ((void *)0))
                  png_combine_row(png_ptr, dsp_row,
                     png_pass_dsp_mask[png_ptr->pass]);
               png_read_finish_row(png_ptr);
               return;
            }
            break;
         case 2:
            if ((png_ptr->row_number & 0x07) != 4)
            {
               if (dsp_row != ((void *)0) && (png_ptr->row_number & 4))
                  png_combine_row(png_ptr, dsp_row,
                     png_pass_dsp_mask[png_ptr->pass]);
               png_read_finish_row(png_ptr);
               return;
            }
            break;
         case 3:
            if ((png_ptr->row_number & 3) || png_ptr->width < 3)
            {
               if (dsp_row != ((void *)0))
                  png_combine_row(png_ptr, dsp_row,
                     png_pass_dsp_mask[png_ptr->pass]);
               png_read_finish_row(png_ptr);
               return;
            }
            break;
         case 4:
            if ((png_ptr->row_number & 3) != 2)
            {
               if (dsp_row != ((void *)0) && (png_ptr->row_number & 2))
                  png_combine_row(png_ptr, dsp_row,
                     png_pass_dsp_mask[png_ptr->pass]);
               png_read_finish_row(png_ptr);
               return;
            }
            break;
         case 5:
            if ((png_ptr->row_number & 1) || png_ptr->width < 2)
            {
               if (dsp_row != ((void *)0))
                  png_combine_row(png_ptr, dsp_row,
                     png_pass_dsp_mask[png_ptr->pass]);
               png_read_finish_row(png_ptr);
               return;
            }
            break;
         case 6:
            if (!(png_ptr->row_number & 1))
            {
               png_read_finish_row(png_ptr);
               return;
            }
            break;
      }
   }


   if (!(png_ptr->mode & 0x04))
      png_error(png_ptr, "Invalid attempt to read row data");

   png_ptr->zstream.next_out = png_ptr->row_buf;
   png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
   do
   {
      if (!(png_ptr->zstream.avail_in))
      {
         while (!png_ptr->idat_size)
         {
            png_byte chunk_length[4];

            png_crc_finish(png_ptr, 0);

            png_read_data(png_ptr, chunk_length, 4);
            png_ptr->idat_size = png_get_uint_32(chunk_length);

            if (png_ptr->idat_size > ((png_uint_32)0x7fffffffL))
              png_error(png_ptr, "Invalid chunk length.");

            png_reset_crc(png_ptr);
            png_crc_read(png_ptr, png_ptr->chunk_name, 4);
            if (memcmp(png_ptr->chunk_name, png_IDAT, 4))
               png_error(png_ptr, "Not enough image data");
         }
         png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;
         png_ptr->zstream.next_in = png_ptr->zbuf;
         if (png_ptr->zbuf_size > png_ptr->idat_size)
            png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size;
         png_crc_read(png_ptr, png_ptr->zbuf,
            (png_size_t)png_ptr->zstream.avail_in);
         png_ptr->idat_size -= png_ptr->zstream.avail_in;
      }
      ret = inflate(&png_ptr->zstream, 1);
      if (ret == 1)
      {
         if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in ||
            png_ptr->idat_size)
            png_error(png_ptr, "Extra compressed data");
         png_ptr->mode |= 0x08;
         png_ptr->flags |= 0x0020;
         break;
      }
      if (ret != 0)
         png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :
                   "Decompression error");

   } while (png_ptr->zstream.avail_out);

   png_ptr->row_info.color_type = png_ptr->color_type;
   png_ptr->row_info.width = png_ptr->iwidth;
   png_ptr->row_info.channels = png_ptr->channels;
   png_ptr->row_info.bit_depth = png_ptr->bit_depth;
   png_ptr->row_info.pixel_depth = png_ptr->pixel_depth;
   png_ptr->row_info.rowbytes = ((png_ptr->row_info.width *
      (png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3);

   if(png_ptr->row_buf[0])
   png_read_filter_row(png_ptr, &(png_ptr->row_info),
      png_ptr->row_buf + 1, png_ptr->prev_row + 1,
      (int)(png_ptr->row_buf[0]));

   png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
      png_ptr->rowbytes + 1);


   if((png_ptr->mng_features_permitted & 0x04) &&
      (png_ptr->filter_type == 64))
   {

      png_do_read_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1);
   }


   if (png_ptr->transformations)
      png_do_read_transformations(png_ptr);



   if (png_ptr->interlaced &&
      (png_ptr->transformations & 0x0002))
   {
      if (png_ptr->pass < 6)




         png_do_read_interlace(png_ptr);

      if (dsp_row != ((void *)0))
         png_combine_row(png_ptr, dsp_row,
            png_pass_dsp_mask[png_ptr->pass]);
      if (row != ((void *)0))
         png_combine_row(png_ptr, row,
            png_pass_mask[png_ptr->pass]);
   }
   else

   {
      if (row != ((void *)0))
         png_combine_row(png_ptr, row, 0xff);
      if (dsp_row != ((void *)0))
         png_combine_row(png_ptr, dsp_row, 0xff);
   }
   png_read_finish_row(png_ptr);

   if (png_ptr->read_row_fn != ((void *)0))
      (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass);
}
# 795 "src/png/pngread.c"
void __attribute__((__cdecl__))
png_read_rows(png_structp png_ptr, png_bytepp row,
   png_bytepp display_row, png_uint_32 num_rows)
{
   png_uint_32 i;
   png_bytepp rp;
   png_bytepp dp;

   ;
   rp = row;
   dp = display_row;
   if (rp != ((void *)0) && dp != ((void *)0))
      for (i = 0; i < num_rows; i++)
      {
         png_bytep rptr = *rp++;
         png_bytep dptr = *dp++;

         png_read_row(png_ptr, rptr, dptr);
      }
   else if(rp != ((void *)0))
      for (i = 0; i < num_rows; i++)
      {
         png_bytep rptr = *rp;
         png_read_row(png_ptr, rptr, (png_bytep)((void *)0));
         rp++;
      }
   else if(dp != ((void *)0))
      for (i = 0; i < num_rows; i++)
      {
         png_bytep dptr = *dp;
         png_read_row(png_ptr, (png_bytep)((void *)0), dptr);
         dp++;
      }
}
# 842 "src/png/pngread.c"
void __attribute__((__cdecl__))
png_read_image(png_structp png_ptr, png_bytepp image)
{
   png_uint_32 i,image_height;
   int pass, j;
   png_bytepp rp;

   ;


   pass = png_set_interlace_handling(png_ptr);
# 861 "src/png/pngread.c"
   image_height=png_ptr->height;
   png_ptr->num_rows = image_height;

   for (j = 0; j < pass; j++)
   {
      rp = image;
      for (i = 0; i < image_height; i++)
      {
         png_read_row(png_ptr, *rp, (png_bytep)((void *)0));
         rp++;
      }
   }
}





void __attribute__((__cdecl__))
png_read_end(png_structp png_ptr, png_infop info_ptr)
{
   png_byte chunk_length[4];
   png_uint_32 length;

   ;
   png_crc_finish(png_ptr, 0);

   do
   {

      const png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'};
      const png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'};
      const png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'};
      const png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'};

      const png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'};


      const png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'};


      const png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'};


      const png_byte png_hIST[5] = {104, 73, 83, 84, '\0'};


      const png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'};





      const png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'};


      const png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'};


      const png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'};


      const png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'};


      const png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'};


      const png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'};


      const png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'};


      const png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'};


      const png_byte png_tIME[5] = {116, 73, 77, 69, '\0'};


      const png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'};


      const png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'};



      png_read_data(png_ptr, chunk_length, 4);
      length = png_get_uint_32(chunk_length);

      png_reset_crc(png_ptr);
      png_crc_read(png_ptr, png_ptr->chunk_name, 4);

      ;

      if (length > ((png_uint_32)0x7fffffffL))
         png_error(png_ptr, "Invalid chunk length.");

      if (!memcmp(png_ptr->chunk_name, png_IHDR, 4))
         png_handle_IHDR(png_ptr, info_ptr, length);
      else if (!memcmp(png_ptr->chunk_name, png_IEND, 4))
         png_handle_IEND(png_ptr, info_ptr, length);

      else if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name))
      {
         if (!memcmp(png_ptr->chunk_name, png_IDAT, 4))
         {
            if (length > 0 || png_ptr->mode & 0x08)
               png_error(png_ptr, "Too many IDAT's found");
         }
         else
            png_ptr->mode |= 0x08;
         png_handle_unknown(png_ptr, info_ptr, length);
         if (!memcmp(png_ptr->chunk_name, png_PLTE, 4))
            png_ptr->mode |= 0x02;
      }

      else if (!memcmp(png_ptr->chunk_name, png_IDAT, 4))
      {



         if (length > 0 || png_ptr->mode & 0x08)
            png_error(png_ptr, "Too many IDAT's found");
         png_crc_finish(png_ptr, length);
      }
      else if (!memcmp(png_ptr->chunk_name, png_PLTE, 4))
         png_handle_PLTE(png_ptr, info_ptr, length);

      else if (!memcmp(png_ptr->chunk_name, png_bKGD, 4))
         png_handle_bKGD(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_cHRM, 4))
         png_handle_cHRM(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_gAMA, 4))
         png_handle_gAMA(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_hIST, 4))
         png_handle_hIST(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_oFFs, 4))
         png_handle_oFFs(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_pCAL, 4))
         png_handle_pCAL(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_sCAL, 4))
         png_handle_sCAL(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_pHYs, 4))
         png_handle_pHYs(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_sBIT, 4))
         png_handle_sBIT(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_sRGB, 4))
         png_handle_sRGB(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_iCCP, 4))
         png_handle_iCCP(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_sPLT, 4))
         png_handle_sPLT(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_tEXt, 4))
         png_handle_tEXt(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_tIME, 4))
         png_handle_tIME(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_tRNS, 4))
         png_handle_tRNS(png_ptr, info_ptr, length);


      else if (!memcmp(png_ptr->chunk_name, png_zTXt, 4))
         png_handle_zTXt(png_ptr, info_ptr, length);





      else
         png_handle_unknown(png_ptr, info_ptr, length);
   } while (!(png_ptr->mode & 0x10));
}


void __attribute__((__cdecl__))
png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
   png_infopp end_info_ptr_ptr)
{
   png_structp png_ptr = ((void *)0);
   png_infop info_ptr = ((void *)0), end_info_ptr = ((void *)0);

   png_free_ptr free_fn = ((void *)0);
   png_voidp mem_ptr = ((void *)0);


   ;
   if (png_ptr_ptr != ((void *)0))
      png_ptr = *png_ptr_ptr;

   if (info_ptr_ptr != ((void *)0))
      info_ptr = *info_ptr_ptr;

   if (end_info_ptr_ptr != ((void *)0))
      end_info_ptr = *end_info_ptr_ptr;


   free_fn = png_ptr->free_fn;
   mem_ptr = png_ptr->mem_ptr;


   png_read_destroy(png_ptr, info_ptr, end_info_ptr);

   if (info_ptr != ((void *)0))
   {

      png_free_data(png_ptr, info_ptr, 0x4000, -1);



      png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn,
          (png_voidp)mem_ptr);



      *info_ptr_ptr = ((void *)0);
   }

   if (end_info_ptr != ((void *)0))
   {

      png_free_data(png_ptr, end_info_ptr, 0x4000, -1);


      png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn,
         (png_voidp)mem_ptr);



      *end_info_ptr_ptr = ((void *)0);
   }

   if (png_ptr != ((void *)0))
   {

      png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn,
          (png_voidp)mem_ptr);



      *png_ptr_ptr = ((void *)0);
   }
}


void
png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)
{

   jmp_buf tmp_jmp;

   png_error_ptr error_fn;
   png_error_ptr warning_fn;
   png_voidp error_ptr;

   png_free_ptr free_fn;


   ;
   if (info_ptr != ((void *)0))
      png_info_destroy(png_ptr, info_ptr);

   if (end_info_ptr != ((void *)0))
      png_info_destroy(png_ptr, end_info_ptr);

   png_free(png_ptr, png_ptr->zbuf);
   png_free(png_ptr, png_ptr->big_row_buf);
   png_free(png_ptr, png_ptr->prev_row);

   png_free(png_ptr, png_ptr->palette_lookup);
   png_free(png_ptr, png_ptr->dither_index);


   png_free(png_ptr, png_ptr->gamma_table);


   png_free(png_ptr, png_ptr->gamma_from_1);
   png_free(png_ptr, png_ptr->gamma_to_1);


   if (png_ptr->free_me & 0x1000)
      png_zfree(png_ptr, png_ptr->palette);
   png_ptr->free_me &= ~0x1000;
# 1179 "src/png/pngread.c"
   if (png_ptr->free_me & 0x2000)
      png_free(png_ptr, png_ptr->trans);
   png_ptr->free_me &= ~0x2000;
# 1190 "src/png/pngread.c"
   if (png_ptr->free_me & 0x0008)
      png_free(png_ptr, png_ptr->hist);
   png_ptr->free_me &= ~0x0008;







   if (png_ptr->gamma_16_table != ((void *)0))
   {
      int i;
      int istop = (1 << (8 - png_ptr->gamma_shift));
      for (i = 0; i < istop; i++)
      {
         png_free(png_ptr, png_ptr->gamma_16_table[i]);
      }
   png_free(png_ptr, png_ptr->gamma_16_table);
   }

   if (png_ptr->gamma_16_from_1 != ((void *)0))
   {
      int i;
      int istop = (1 << (8 - png_ptr->gamma_shift));
      for (i = 0; i < istop; i++)
      {
         png_free(png_ptr, png_ptr->gamma_16_from_1[i]);
      }
   png_free(png_ptr, png_ptr->gamma_16_from_1);
   }
   if (png_ptr->gamma_16_to_1 != ((void *)0))
   {
      int i;
      int istop = (1 << (8 - png_ptr->gamma_shift));
      for (i = 0; i < istop; i++)
      {
         png_free(png_ptr, png_ptr->gamma_16_to_1[i]);
      }
   png_free(png_ptr, png_ptr->gamma_16_to_1);
   }



   png_free(png_ptr, png_ptr->time_buffer);


   inflateEnd(&png_ptr->zstream);

   png_free(png_ptr, png_ptr->save_buffer);




   png_free(png_ptr, png_ptr->current_text);







   memcpy(tmp_jmp, png_ptr->jmpbuf, sizeof (jmp_buf));


   error_fn = png_ptr->error_fn;
   warning_fn = png_ptr->warning_fn;
   error_ptr = png_ptr->error_ptr;

   free_fn = png_ptr->free_fn;


   memset(png_ptr, 0, sizeof (png_struct));

   png_ptr->error_fn = error_fn;
   png_ptr->warning_fn = warning_fn;
   png_ptr->error_ptr = error_ptr;

   png_ptr->free_fn = free_fn;



   memcpy(png_ptr->jmpbuf, tmp_jmp, sizeof (jmp_buf));


}

void __attribute__((__cdecl__))
png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn)
{
   png_ptr->read_row_fn = read_row_fn;
}


void __attribute__((__cdecl__))
png_read_png(png_structp png_ptr, png_infop info_ptr,
                           int transforms,
                           voidp params)
{
   int row;



   if (transforms & 0x0400)
       png_set_invert_alpha(png_ptr);





   png_read_info(png_ptr, info_ptr);





   if (transforms & 0x0001)
       png_set_strip_16(png_ptr);






   if (transforms & 0x0002)
       png_set_strip_alpha(png_ptr);
# 1329 "src/png/pngread.c"
   if (transforms & 0x0008)
       png_set_packswap(png_ptr);
# 1339 "src/png/pngread.c"
   if (transforms & 0x0010)
       if ((png_ptr->bit_depth < 8) ||
           (png_ptr->color_type == (2 | 1)) ||
           (png_get_valid(png_ptr, info_ptr, 0x0010)))
         png_set_expand(png_ptr);






   if (transforms & 0x0020)
       png_set_invert_mono(png_ptr);







   if ((transforms & 0x0040)
       && png_get_valid(png_ptr, info_ptr, 0x0002))
   {
      png_color_8p sig_bit;

      png_get_sBIT(png_ptr, info_ptr, &sig_bit);
      png_set_shift(png_ptr, sig_bit);
   }




   if (transforms & 0x0080)
       png_set_bgr(png_ptr);




   if (transforms & 0x0100)
       png_set_swap_alpha(png_ptr);




   if (transforms & 0x0200)
       png_set_swap(png_ptr);
# 1393 "src/png/pngread.c"
   png_read_update_info(png_ptr, info_ptr);




   png_free_data(png_ptr, info_ptr, 0x0040, 0);

   if(info_ptr->row_pointers == ((void *)0))
   {
      info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
         info_ptr->height * sizeof(png_bytep));

      info_ptr->free_me |= 0x0040;

      for (row = 0; row < (int)info_ptr->height; row++)
      {
         info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
            png_get_rowbytes(png_ptr, info_ptr));
      }
   }

   png_read_image(png_ptr, info_ptr->row_pointers);
   info_ptr->valid |= 0x8000L;


   png_read_end(png_ptr, info_ptr);

   if(transforms == 0 || params == ((void *)0))
                                    return;

}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c/10098: gcc internal error: illegal instruction
@ 2003-03-15 16:26 Giovanni Bajo
  0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Bajo @ 2003-03-15 16:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/10098; it has been noted by GNATS.

From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<dfrankow@winternet.com>
Cc:  
Subject: Re: c/10098: gcc internal error: illegal instruction
Date: Sat, 15 Mar 2003 17:22:27 +0100

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 r=10098
 
 I cannot reproduce this on the same version of the submitter (cygwin 3.2
 20020927), or mingw 3.2.2.
 
 Giovanni Bajo
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-15 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-15 15:46 c/10098: gcc internal error: illegal instruction dfrankow
2003-03-15 16:26 Giovanni Bajo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).