[lra] a patch to fix ppc bootstrap failure

Michael Meissner meissner@linux.vnet.ibm.com
Tue Dec 11 00:28:00 GMT 2012


On Thu, Dec 06, 2012 at 04:20:46PM -0500, Vladimir Makarov wrote:
> The following patch fixes the bug.

I decided to try and build all of Spec 2006 with LRA.  All 30 benchmarks build
with the LRA branch compiler if I use -fno-lra.  If I use -flra, 8 benchmarks
no longer build at -O3 -mcpu=power7.  There are 3 classes of failure.

The first failure dies in gen_add2_insn:
  1) gobmk
  2) h264ref
  3) xalancbmk

The second failure is 'Max. number of generated reload insns per insn is achieved (90):'
  1) astar
  2) povray

The third failure is 'internal compiler error: in check_rtl, at lra.c:2010'
  1) gamess
  2) dealII
  3) wrf

I looked at gobmk, and I'll include the .i file in the message.  It is dying
on a movti insn, where the address is a TOC relocation that has been split and
uses an unspec for the relocation.  The standard add insn doesn't support this,
but there are add recognizers for this case.  I can imagine we can add a PPC
specific constraint for this and use it in add{di,si}3 if we need to.

(gdb) r -O2 -quiet -mcpu=power7 -ftree-vectorize -g -da play_ascii.i
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /data/meissner/fsf-build-x86_64/lra-powerpc64-linux/gcc/cc1 -O2 -quiet -mcpu=power7 -ftree-vectorize -g -da play_ascii.i

Breakpoint 1, fancy_abort (file=0xda8850 "/home/meissner/fsf-src/lra/gcc/optabs.c", line=4692, function=0xda928a "gen_add2_insn") at /home/meissner/fsf-src/lra/gcc/diagnostic.c:1146
(gdb) where
#0  fancy_abort (file=0xda8850 "/home/meissner/fsf-src/lra/gcc/optabs.c", line=4692, function=0xda928a "gen_add2_insn") at /home/meissner/fsf-src/lra/gcc/diagnostic.c:1146
#1  0x00000000007fd200 in gen_add2_insn (x=0x7ffff141f600, y=0x7ffff1448528) at /home/meissner/fsf-src/lra/gcc/optabs.c:4692
#2  0x00000000007bad2d in lra_emit_add (x=0x7ffff141f600, y=0x7ffff1448528, z=0x7ffff1922dd0) at /home/meissner/fsf-src/lra/gcc/lra.c:314
#3  0x00000000007c7fc9 in process_address (nop=<value optimized out>, before=0x7fffffffc900, after=0x7fffffffc8f8) at /home/meissner/fsf-src/lra/gcc/lra-constraints.c:2414
#4  0x00000000007ca2ce in curr_insn_transform () at /home/meissner/fsf-src/lra/gcc/lra-constraints.c:2715
#5  0x00000000007cca75 in lra_constraints (first_p=<value optimized out>) at /home/meissner/fsf-src/lra/gcc/lra-constraints.c:3502
#6  0x00000000007bc37d in lra (f=<value optimized out>) at /home/meissner/fsf-src/lra/gcc/lra.c:2280
#7  0x0000000000787309 in do_reload () at /home/meissner/fsf-src/lra/gcc/ira.c:4624
#8  rest_of_handle_reload () at /home/meissner/fsf-src/lra/gcc/ira.c:4737
#9  0x000000000081409a in execute_one_pass (pass=0x13edaa0) at /home/meissner/fsf-src/lra/gcc/passes.c:2328
#10 0x0000000000814515 in execute_pass_list (pass=0x13edaa0) at /home/meissner/fsf-src/lra/gcc/passes.c:2386
#11 0x0000000000814527 in execute_pass_list (pass=0x13ee2e0) at /home/meissner/fsf-src/lra/gcc/passes.c:2387
#12 0x00000000005dc952 in expand_function (node=0x7ffff1729818) at /home/meissner/fsf-src/lra/gcc/cgraphunit.c:1641
#13 0x00000000005de4c1 in expand_all_functions () at /home/meissner/fsf-src/lra/gcc/cgraphunit.c:1745
#14 compile () at /home/meissner/fsf-src/lra/gcc/cgraphunit.c:2043
#15 0x00000000005deb7a in finalize_compilation_unit () at /home/meissner/fsf-src/lra/gcc/cgraphunit.c:2120
#16 0x00000000004c6643 in c_write_global_declarations () at /home/meissner/fsf-src/lra/gcc/c/c-decl.c:10120
#17 0x00000000008b739d in compile_file () at /home/meissner/fsf-src/lra/gcc/toplev.c:559
#18 0x00000000008b8568 in do_compile (argc=8, argv=0x7fffffffcd38) at /home/meissner/fsf-src/lra/gcc/toplev.c:1884
#19 toplev_main (argc=8, argv=0x7fffffffcd38) at /home/meissner/fsf-src/lra/gcc/toplev.c:1960
#20 0x0000003fdd21ecdd in __libc_start_main () from /lib64/libc.so.6
#21 0x00000000004a4d19 in _start ()
(gdb) up
#1  0x00000000007fd200 in gen_add2_insn (x=0x7ffff141f600, y=0x7ffff1448528) at /home/meissner/fsf-src/lra/gcc/optabs.c:4692
(gdb) print y
$1 = (rtx_def *) 0x7ffff1448528
(gdb) pr
(unspec:DI [
        (symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
        (reg:DI 2 2)
    ] UNSPEC_TOCREL)
(gdb) up
#2  0x00000000007bad2d in lra_emit_add (x=0x7ffff141f600, y=0x7ffff1448528, z=0x7ffff1922dd0) at /home/meissner/fsf-src/lra/gcc/lra.c:314
(gdb) up
#3  0x00000000007c7fc9 in process_address (nop=<value optimized out>, before=0x7fffffffc900, after=0x7fffffffc8f8) at /home/meissner/fsf-src/lra/gcc/lra-constraints.c:2414
(gdb) print addr
$6 = (rtx_def *) 0x7ffff1448510
(gdb) pr
(plus:DI (unspec:DI [
            (symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
            (reg:DI 2 2)
        ] UNSPEC_TOCREL)
    (const_int 400 [0x190]))
(gdb) up
#4  0x00000000007ca2ce in curr_insn_transform () at /home/meissner/fsf-src/lra/gcc/lra-constraints.c:2715
(gdb) up
#5  0x00000000007cca75 in lra_constraints (first_p=<value optimized out>) at /home/meissner/fsf-src/lra/gcc/lra-constraints.c:3502
(gdb) print curr_insn
$9 = (rtx) 0x7ffff16d25e8
(gdb) pr
(insn 78 77 80 2 (set (mem/c:TI (plus:DI (unspec:DI [
                        (symbol_ref:DI ("*.LANCHOR0") [flags 0x182])
                        (reg:DI 2 2)
                    ] UNSPEC_TOCREL)
                (const_int 400 [0x190])) [5 sgftree+0 S16 A64])
        (reg:TI 430 [ *tree_28(D) ])) interface/play_ascii.c:561 381 {*movti_ppc64}
     (expr_list:REG_DEAD (reg:TI 430 [ *tree_28(D) ])
        (nil)))
(gdb) 

I am planning on trying to revamp movti's shortly.  One of the things I put on
my do someday list back in the initial power7 days was allowing movti's in the
VSX registers.

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meissner@linux.vnet.ibm.com	fax +1 (978) 399-6899
-------------- next part --------------
# 1 "interface/play_ascii.c"
# 1 "/home/meissner/spec-build/spec-2006-base-dev48-power7-vsx-o3-flra-shared-at6.0-64bit/benchspec/CPU2006/445.gobmk/build/build_base_dev48-power7-vsx-64bit.0000//"
# 1 "<command-line>"
# 1 "interface/play_ascii.c"
# 23 "interface/play_ascii.c"
# 1 "./include/gnugo.h" 1
# 33 "./include/gnugo.h"
# 1 "/usr/include/stdio.h" 1 3 4
# 28 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/features.h" 1 3 4
# 347 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 353 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 354 "/usr/include/sys/cdefs.h" 2 3 4
# 348 "/usr/include/features.h" 2 3 4
# 371 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4



# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 5 "/usr/include/gnu/stubs.h" 2 3 4




# 1 "/usr/include/gnu/stubs-64.h" 1 3 4
# 10 "/usr/include/gnu/stubs.h" 2 3 4
# 372 "/usr/include/features.h" 2 3 4
# 29 "/usr/include/stdio.h" 2 3 4





# 1 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 1 3 4
# 213 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 35 "/usr/include/stdio.h" 2 3 4

# 1 "/usr/include/bits/types.h" 1 3 4
# 28 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/types.h" 2 3 4


typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;


typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;

typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;







typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
# 131 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 132 "/usr/include/bits/types.h" 2 3 4


typedef unsigned long int __dev_t;
typedef unsigned int __uid_t;
typedef unsigned int __gid_t;
typedef unsigned long int __ino_t;
typedef unsigned long int __ino64_t;
typedef unsigned int __mode_t;
typedef unsigned long int __nlink_t;
typedef long int __off_t;
typedef long int __off64_t;
typedef int __pid_t;
typedef struct { int __val[2]; } __fsid_t;
typedef long int __clock_t;
typedef unsigned long int __rlim_t;
typedef unsigned long int __rlim64_t;
typedef unsigned int __id_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;

typedef int __daddr_t;
typedef long int __swblk_t;
typedef int __key_t;


typedef int __clockid_t;


typedef void * __timer_t;


typedef long int __blksize_t;




typedef long int __blkcnt_t;
typedef long int __blkcnt64_t;


typedef unsigned long int __fsblkcnt_t;
typedef unsigned long int __fsblkcnt64_t;


typedef unsigned long int __fsfilcnt_t;
typedef unsigned long int __fsfilcnt64_t;

typedef long int __ssize_t;



typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;


typedef long int __intptr_t;


typedef unsigned int __socklen_t;
# 37 "/usr/include/stdio.h" 2 3 4
# 45 "/usr/include/stdio.h" 3 4
struct _IO_FILE;



typedef struct _IO_FILE FILE;





# 65 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 75 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 32 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 15 "/usr/include/_G_config.h" 3 4
# 1 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 1 3 4
# 16 "/usr/include/_G_config.h" 2 3 4




# 1 "/usr/include/wchar.h" 1 3 4
# 83 "/usr/include/wchar.h" 3 4
typedef struct
{
  int __count;
  union
  {

    unsigned int __wch;



    char __wchb[4];
  } __value;
} __mbstate_t;
# 21 "/usr/include/_G_config.h" 2 3 4

typedef struct
{
  __off_t __pos;
  __mbstate_t __state;
} _G_fpos_t;
typedef struct
{
  __off64_t __pos;
  __mbstate_t __state;
} _G_fpos64_t;
# 53 "/usr/include/_G_config.h" 3 4
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3 4
# 53 "/usr/include/libio.h" 3 4
# 1 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stdarg.h" 1 3 4
# 41 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4
# 170 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
# 180 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;





struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;



  int _pos;
# 203 "/usr/include/libio.h" 3 4
};


enum __codecvt_result
{
  __codecvt_ok,
  __codecvt_partial,
  __codecvt_error,
  __codecvt_noconv
};
# 271 "/usr/include/libio.h" 3 4
struct _IO_FILE {
  int _flags;




  char* _IO_read_ptr;
  char* _IO_read_end;
  char* _IO_read_base;
  char* _IO_write_base;
  char* _IO_write_ptr;
  char* _IO_write_end;
  char* _IO_buf_base;
  char* _IO_buf_end;

  char *_IO_save_base;
  char *_IO_backup_base;
  char *_IO_save_end;

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;



  int _flags2;

  __off_t _old_offset;



  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];



  _IO_lock_t *_lock;
# 319 "/usr/include/libio.h" 3 4
  __off64_t _offset;
# 328 "/usr/include/libio.h" 3 4
  void *__pad1;
  void *__pad2;
  void *__pad3;
  void *__pad4;
  size_t __pad5;

  int _mode;

  char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];

};


typedef struct _IO_FILE _IO_FILE;


struct _IO_FILE_plus;

extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 364 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);







typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
     size_t __n);







typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);


typedef int __io_close_fn (void *__cookie);
# 416 "/usr/include/libio.h" 3 4
extern int __underflow (_IO_FILE *);
extern int __uflow (_IO_FILE *);
extern int __overflow (_IO_FILE *, int);
# 460 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp);
extern int _IO_putc (int __c, _IO_FILE *__fp);
extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));

extern int _IO_peekc_locked (_IO_FILE *__fp);





extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
# 490 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
   __gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
    __gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);

extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
# 76 "/usr/include/stdio.h" 2 3 4
# 89 "/usr/include/stdio.h" 3 4


typedef _G_fpos_t fpos_t;




# 141 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 142 "/usr/include/stdio.h" 2 3 4



extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;









extern int remove (__const char *__filename) __attribute__ ((__nothrow__));

extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));




extern int renameat (int __oldfd, __const char *__old, int __newfd,
       __const char *__new) __attribute__ ((__nothrow__));








extern FILE *tmpfile (void) ;
# 188 "/usr/include/stdio.h" 3 4
extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) ;





extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) ;
# 206 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;








extern int fclose (FILE *__stream);




extern int fflush (FILE *__stream);

# 231 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 245 "/usr/include/stdio.h" 3 4






extern FILE *fopen (__const char *__restrict __filename,
      __const char *__restrict __modes) ;




extern FILE *freopen (__const char *__restrict __filename,
        __const char *__restrict __modes,
        FILE *__restrict __stream) ;
# 274 "/usr/include/stdio.h" 3 4

# 285 "/usr/include/stdio.h" 3 4
extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) ;
# 298 "/usr/include/stdio.h" 3 4
extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
  __attribute__ ((__nothrow__)) ;




extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) ;






extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));



extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
      int __modes, size_t __n) __attribute__ ((__nothrow__));





extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
         size_t __size) __attribute__ ((__nothrow__));


extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));








extern int fprintf (FILE *__restrict __stream,
      __const char *__restrict __format, ...);




extern int printf (__const char *__restrict __format, ...);

extern int sprintf (char *__restrict __s,
      __const char *__restrict __format, ...) __attribute__ ((__nothrow__));





extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg);




extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);

extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg) __attribute__ ((__nothrow__));





extern int snprintf (char *__restrict __s, size_t __maxlen,
       __const char *__restrict __format, ...)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
        __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));

# 396 "/usr/include/stdio.h" 3 4
extern int vdprintf (int __fd, __const char *__restrict __fmt,
       __gnuc_va_list __arg)
     __attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
     __attribute__ ((__format__ (__printf__, 2, 3)));








extern int fscanf (FILE *__restrict __stream,
     __const char *__restrict __format, ...) ;




extern int scanf (__const char *__restrict __format, ...) ;

extern int sscanf (__const char *__restrict __s,
     __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
# 427 "/usr/include/stdio.h" 3 4
extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf")

                               ;
extern int scanf (__const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf")
                              ;
extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__))

                      ;
# 447 "/usr/include/stdio.h" 3 4








extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
      __gnuc_va_list __arg)
     __attribute__ ((__format__ (__scanf__, 2, 0))) ;





extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__format__ (__scanf__, 1, 0))) ;


extern int vsscanf (__const char *__restrict __s,
      __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
# 478 "/usr/include/stdio.h" 3 4
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")



     __attribute__ ((__format__ (__scanf__, 2, 0))) ;
extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")

     __attribute__ ((__format__ (__scanf__, 1, 0))) ;
extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__))



     __attribute__ ((__format__ (__scanf__, 2, 0)));
# 506 "/usr/include/stdio.h" 3 4









extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);





extern int getchar (void);

# 534 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 545 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);











extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);





extern int putchar (int __c);

# 578 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);







extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);






extern int getw (FILE *__stream);


extern int putw (int __w, FILE *__stream);








extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
     ;






extern char *gets (char *__s) ;

# 640 "/usr/include/stdio.h" 3 4
extern __ssize_t __getdelim (char **__restrict __lineptr,
          size_t *__restrict __n, int __delimiter,
          FILE *__restrict __stream) ;
extern __ssize_t getdelim (char **__restrict __lineptr,
        size_t *__restrict __n, int __delimiter,
        FILE *__restrict __stream) ;







extern __ssize_t getline (char **__restrict __lineptr,
       size_t *__restrict __n,
       FILE *__restrict __stream) ;








extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);





extern int puts (__const char *__s);






extern int ungetc (int __c, FILE *__stream);






extern size_t fread (void *__restrict __ptr, size_t __size,
       size_t __n, FILE *__restrict __stream) ;




extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
        size_t __n, FILE *__restrict __s) ;

# 712 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
         size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
          size_t __n, FILE *__restrict __stream) ;








extern int fseek (FILE *__stream, long int __off, int __whence);




extern long int ftell (FILE *__stream) ;




extern void rewind (FILE *__stream);

# 748 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off_t __off, int __whence);




extern __off_t ftello (FILE *__stream) ;
# 767 "/usr/include/stdio.h" 3 4






extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);




extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
# 790 "/usr/include/stdio.h" 3 4

# 799 "/usr/include/stdio.h" 3 4


extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));

extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;

extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;








extern void perror (__const char *__s);






# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];
# 829 "/usr/include/stdio.h" 2 3 4




extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;




extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
# 848 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes) ;





extern int pclose (FILE *__stream);





extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
# 888 "/usr/include/stdio.h" 3 4
extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));



extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;


extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
# 909 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio.h" 1 3 4
# 36 "/usr/include/bits/stdio.h" 3 4
extern __inline int
vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg)
{
  return vfprintf (stdout, __fmt, __arg);
}



extern __inline int
getchar (void)
{
  return _IO_getc (stdin);
}




extern __inline int
fgetc_unlocked (FILE *__fp)
{
  return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}





extern __inline int
getc_unlocked (FILE *__fp)
{
  return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
}


extern __inline int
getchar_unlocked (void)
{
  return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
}




extern __inline int
putchar (int __c)
{
  return _IO_putc (__c, stdout);
}




extern __inline int
fputc_unlocked (int __c, FILE *__stream)
{
  return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}





extern __inline int
putc_unlocked (int __c, FILE *__stream)
{
  return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
}


extern __inline int
putchar_unlocked (int __c)
{
  return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
}
# 125 "/usr/include/bits/stdio.h" 3 4
extern __inline int
__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream)
{
  return (((__stream)->_flags & 0x10) != 0);
}


extern __inline int
__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream)
{
  return (((__stream)->_flags & 0x20) != 0);
}
# 910 "/usr/include/stdio.h" 2 3 4
# 918 "/usr/include/stdio.h" 3 4

# 34 "./include/gnugo.h" 2


# 1 "./include/config.h" 1
# 37 "./include/gnugo.h" 2



# 1 "./include/sgftree.h" 1
# 28 "./include/sgftree.h"
# 1 "./include/sgf_properties.h" 1
# 29 "./include/sgftree.h" 2
# 47 "./include/sgftree.h"
void *xalloc(unsigned int);






typedef struct SGFProperty_t {
  struct SGFProperty_t *next;
  short name;
  char *value;
} SGFProperty;


typedef struct SGFNode_t {
  SGFProperty *props;
  struct SGFNode_t *parent;
  struct SGFNode_t *child;
  struct SGFNode_t *next;
} SGFNode;



SGFNode *sgfPrev(SGFNode *node);
SGFNode *sgfRoot(SGFNode *node);
SGFNode *sgfNewNode(void);
void sgfFreeNode(SGFNode *node);

int sgfGetIntProperty(SGFNode *node, const char *name, int *value);
int sgfGetFloatProperty(SGFNode *node, const char *name, float *value);
int sgfGetCharProperty(SGFNode *node, const char *name, char **value);
void sgfAddProperty(SGFNode *node, const char *name, const char *value);
void sgfAddPropertyInt(SGFNode *node, const char *name, long val);
void sgfAddPropertyFloat(SGFNode *node, const char *name, float val);
void sgfOverwriteProperty(SGFNode *node, const char *name, const char *text);
void sgfOverwritePropertyFloat(SGFNode *node, const char *name, float val);
void sgfOverwritePropertyInt(SGFNode *node, const char *name, int val);
void *xrealloc(void *pt, unsigned int size);
SGFProperty *sgfMkProperty(const char *name, const char *value,
      SGFNode *node, SGFProperty *last);
void sgfFreeProperty(SGFProperty *prop);

SGFNode *sgfAddStone(SGFNode *node, int color, int movex, int movey);
SGFNode *sgfAddPlay(SGFNode *node, int who, int movex, int movey);
SGFNode *sgfAddPlayLast(SGFNode *node, int who, int movex, int movey);

void sgfWriteResult(SGFNode *node, float score, int overwrite);
void sgf_write_header(SGFNode *root, int overwrite, int seed, float komi,
        int level, int rules);

SGFNode *sgfLabel(SGFNode *node, const char *label, int i, int j);
SGFNode *sgfLabelInt(SGFNode *node, int num, int i, int j);
SGFNode *sgfCircle(SGFNode *node, int i, int j);
SGFNode *sgfSquare(SGFNode *node, int i, int j);
SGFNode *sgfTriangle(SGFNode *node, int i, int j);
SGFNode *sgfMark(SGFNode *node, int i, int j);
SGFNode *sgfAddComment(SGFNode *node, const char *comment);
SGFNode *sgfBoardText(SGFNode *node, int i, int j, const char *text);
SGFNode *sgfBoardChar(SGFNode *node, int i, int j, char c);
SGFNode *sgfBoardNumber(SGFNode *node, int i, int j, int number);
SGFNode *sgfStartVariant(SGFNode *node);
SGFNode *sgfStartVariantFirst(SGFNode *node);
SGFNode *sgfAddChild(SGFNode *node);

SGFNode *sgfCreateHeaderNode(int boardsize, float komi);


SGFNode *readsgffile(const char *filename);

SGFNode *readsgffilefuseki(const char *filename, int moves_per_game);


int writesgf(SGFNode *root, const char *filename);







typedef struct SGFTree_t {
  SGFNode *root;
  SGFNode *lastnode;
} SGFTree;


void sgftree_clear(SGFTree *tree);
int sgftree_readfile(SGFTree *tree, const char *infilename);

int sgftreeBack(SGFTree *tree);
int sgftreeForward(SGFTree *tree);

void sgftreeAddPlay(SGFTree *tree, int color, int movex, int movey);
void sgftreeAddPlayLast(SGFTree *tree, int color, int movex, int movey);
void sgftreeAddStone(SGFTree *tree, int color, int movex, int movey);
void sgftreeWriteResult(SGFTree *tree, float score, int overwrite);
SGFNode *sgftreeNodeCheck(SGFTree *tree);

void sgftreeCircle(SGFTree *tree, int i, int j);
void sgftreeSquare(SGFTree *tree, int i, int j);
void sgftreeTriangle(SGFTree *tree, int i, int j);
void sgftreeMark(SGFTree *tree, int i, int j);
void sgftreeAddComment(SGFTree *tree, const char *comment);
void sgftreeBoardText(SGFTree *tree, int i, int j, const char *text);
void sgftreeBoardChar(SGFTree *tree, int i, int j, char c);
void sgftreeBoardNumber(SGFTree *tree, int i, int j, int number);
void sgftreeStartVariant(SGFTree *tree);
void sgftreeStartVariantFirst(SGFTree *tree);
void sgftreeCreateHeaderNode(SGFTree *tree, int boardsize, float komi);
void sgftreeSetLastNode(SGFTree *tree, SGFNode *lastnode);







int get_moveX(SGFProperty *property, int boardsize);
int get_moveY(SGFProperty *property, int boardsize);
int get_moveXY(SGFProperty *property, int *i, int *j, int boardsize);

int show_sgf_properties(SGFNode *node);
int show_sgf_tree(SGFNode *node);
int is_markup_node(SGFNode *node);
int is_move_node(SGFNode *node);
int is_pass_node(SGFNode *node, int boardsize);
int find_move(SGFNode *node);
# 41 "./include/gnugo.h" 2
# 1 "./include/clock.h" 1
# 43 "./include/clock.h"
# 1 "./include/config.h" 1
# 44 "./include/clock.h" 2

# 1 "./include/gnugo.h" 1
# 46 "./include/clock.h" 2

# 1 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 1 3 4
# 148 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 325 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 3 4
typedef int wchar_t;
# 48 "./include/clock.h" 2
# 58 "./include/clock.h"
void clock_init(int time, int byo_time, int byo_stones);
void clock_enable(void);

void clock_init_autolevel(int min_level, int max_level);
void clock_enable_autolevel(void);


void clock_push_button(int color);
void clock_unpush_button(int color);


int clock_is_byoyomi(int color);
int clock_is_time_over(int color);
double clock_get_timer(int color);
double clock_get_btimer(int color);
double clock_get_time_left(int color);
double clock_get_btime_left(int color, int *stones);


void clock_adapt_level(int *p_level, int color);


void clock_print(int color);
void clock_report_autolevel(FILE *f, int color);
# 42 "./include/gnugo.h" 2



void init_gnugo(void);
# 134 "./include/gnugo.h"
typedef unsigned char Intersection;


void gnugo_clear_board(int boardsize);
void gnugo_set_komi(float new_komi);
void gnugo_add_stone(int i, int j, int color);
void gnugo_remove_stone(int i, int j);
int gnugo_is_pass(int i, int j);
void gnugo_play_move(int i, int j, int color);
int gnugo_undo_move(int n);
int gnugo_play_sgfnode(SGFNode *node, int to_move);
int gnugo_play_sgftree(SGFNode *root, int *until, SGFNode **curnode);
int gnugo_is_legal(int i, int j, int color);
int gnugo_is_suicide(int i, int j, int color);

int gnugo_placehand(int handicap);
int gnugo_sethand(int handicap, SGFNode *root);
void gnugo_recordboard(SGFNode *node);

int gnugo_genmove(int *i, int *j, int color);

int gnugo_attack(int m, int n, int *i, int *j);
int gnugo_find_defense(int m, int n, int *i, int *j);

void gnugo_who_wins(int color, FILE *outfile);
float gnugo_estimate_score(float *upper, float *lower);
void gnugo_examine_position(int color, int how_much);

float gnugo_get_komi(void);
void gnugo_get_board(int b[19][19]);
int gnugo_get_boardsize(void);
int gnugo_get_move_number(void);






typedef struct {
  int handicap;

  int to_move;
  SGFTree game_record;

  int computer_player;
} Gameinfo;

void gameinfo_clear(Gameinfo *ginfo, int boardsize, float komi);
void gameinfo_print(Gameinfo *ginfo);
void gameinfo_load_sgfheader(Gameinfo *gameinfo, SGFNode *head);
void gameinfo_play_move(Gameinfo *ginfo, int i, int j, int color);
int gameinfo_play_sgftree_rot(Gameinfo *gameinfo, SGFTree *tree,
          const char *untilstr, int orientation);
int gameinfo_play_sgftree(Gameinfo *gameinfo, SGFTree *tree,
      const char *untilstr);







extern int random_seed;


extern int quiet;
extern int verbose;
extern int allpats;
extern int printworms;
extern int printmoyo;
extern int printdragons;
extern int printboard;
extern int showstatistics;
extern int profile_patterns;
extern char outfilename[128];
extern int output_flags;
# 264 "./include/gnugo.h"
extern int debug;
extern int hashflags;
extern int fusekidb;
extern int disable_fuseki;
extern int josekidb;
extern int level;
extern int semeai_variations;
extern int urgent;
extern int showtime;
extern int showscore;
extern float score;
extern float lower_bound;
extern float upper_bound;
extern int chinese_rules;
extern int experimental_owl_ext;
extern int experimental_semeai;
extern int experimental_connections;
extern int alternate_connections;
extern int owl_threats;
extern int experimental_influence;
extern int allow_suicide;
extern int capture_all_dead;
extern int play_out_aftermath;
extern int play_mirror_go;
extern int mirror_stones_limit;
extern int gtp_version;



extern int mandated_depth;
extern int mandated_backfill_depth;
extern int mandated_backfill2_depth;
extern int mandated_superstring_depth;
extern int mandated_fourlib_depth;
extern int mandated_ko_depth;
extern int mandated_branch_depth;
extern int mandated_aa_depth;
extern int mandated_owl_distrust_depth;
extern int mandated_owl_branch_depth;
extern int mandated_owl_reading_depth;
extern int mandated_owl_node_limit;


extern float potential_moves[19][19];
# 324 "./include/gnugo.h"
void start_draw_board(void);
void draw_color_char(int m, int n, int c, int color);
void draw_char(int m, int n, int c);
void end_draw_board(void);
void showboard(int xo);
void simple_showboard(FILE *outfile);


int gprintf(const char *fmt, ...);
void mprintf(const char *fmt, ...);
void gfprintf(FILE *outfile, const char *fmt, ...);
const char *color_to_string(int color);
const char *location_to_string(int pos);
void location_to_buffer(int pos, char *buf);
const char *status_to_string(int status);
const char *safety_to_string(int status);
const char *result_to_string(int result);
const char *routine_to_string(int routine);
int string_to_location(int boardsize, char *str, int *m, int *n);
double gg_gettimeofday(void);



void debug_influence_move(int i, int j);
# 416 "./include/gnugo.h"
void reset_engine(void);
void examine_position(int color, int how_much);
void silent_examine_position(int color, int how_much);
# 427 "./include/gnugo.h"
void reset_owl_node_counter(void);
int get_owl_node_counter(void);
void reset_reading_node_counter(void);
int get_reading_node_counter(void);
void reset_trymove_counter(void);
int get_trymove_counter(void);
void reset_connection_node_counter(void);
int get_connection_node_counter(void);
# 444 "./include/gnugo.h"
void clear_board(void);
int test_gray_border(void);
void setup_board(Intersection new_board[19][19], int ko_pos,
   int *last, float new_komi, int w_captured, int b_captured);



void add_stone(int pos, int color);
void remove_stone(int pos);
void play_move(int pos, int color);
int undo_move(int n);
int get_last_move(void);
int get_last_player(void);
int get_last_opponent_move(int color);
int is_pass(int pos);
int is_legal(int pos, int color);
int is_suicide(int pos, int color);
int is_illegal_ko_capture(int pos, int color);
int trymove(int pos, int color, const char *message, int str,
     int komaster, int kom_pos);
int semeai_trymove(int pos, int color, const char *message,
     int str1, int str2, int owl_phase, int value);
int tryko(int pos, int color, const char *message,
   int komaster, int kom_pos);
void popgo(void);


void change_dragon_status(int dr, int status);
void who_wins(int color, FILE *outfile);


int genmove(int *i, int *j, int color);
int genmove_conservative(int *i, int *j, int color);


float aftermath_compute_score(int color, float komi, SGFTree *tree);
int aftermath_final_status(int color, int pos);



void make_worms(void);
void compute_worm_influence(void);


void make_dragons(int color, int stop_before_owl, int save_verbose);
void initialize_dragon_data(void);
void show_dragons(void);
int crude_status(int pos);
int dragon_status(int pos);
int same_dragon(int dr1, int dr2);


void print_moyo(void);


void sgffile_add_debuginfo(SGFNode *node, int value);
void sgffile_output(SGFTree *tree);

void sgffile_printsgf(int color_to_play, const char *filename);
void sgffile_printboard(SGFTree *tree);
void sgffile_recordboard(SGFNode *node);


void decide_string(int pos);
void decide_connection(int apos, int bpos);
void decide_owl(int pos);
void decide_dragon_data(int pos);
void decide_semeai(int apos, int bpos);
void decide_tactical_semeai(int apos, int bpos);
void decide_position(int color);
void decide_eye(int pos);
void decide_combination(int color);
void decide_surrounded(int pos);
# 24 "interface/play_ascii.c" 2


# 1 "/usr/include/stdlib.h" 1 3 4
# 33 "/usr/include/stdlib.h" 3 4
# 1 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 1 3 4
# 34 "/usr/include/stdlib.h" 2 3 4


# 96 "/usr/include/stdlib.h" 3 4


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



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







__extension__ typedef struct
  {
    long long int quot;
    long long int rem;
  } lldiv_t;


# 140 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ;




extern double atof (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern int atoi (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;

extern long int atol (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





__extension__ extern long long int atoll (__const char *__nptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;





extern double strtod (__const char *__restrict __nptr,
        char **__restrict __endptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern float strtof (__const char *__restrict __nptr,
       char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern long double strtold (__const char *__restrict __nptr,
       char **__restrict __endptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern long int strtol (__const char *__restrict __nptr,
   char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

extern unsigned long int strtoul (__const char *__restrict __nptr,
      char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




__extension__
extern long long int strtoq (__const char *__restrict __nptr,
        char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
           char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





__extension__
extern long long int strtoll (__const char *__restrict __nptr,
         char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
     char **__restrict __endptr, int __base)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;

# 277 "/usr/include/stdlib.h" 3 4

extern __inline double
__attribute__ ((__nothrow__)) atof (__const char *__nptr)
{
  return strtod (__nptr, (char **) ((void *)0));
}
extern __inline int
__attribute__ ((__nothrow__)) atoi (__const char *__nptr)
{
  return (int) strtol (__nptr, (char **) ((void *)0), 10);
}
extern __inline long int
__attribute__ ((__nothrow__)) atol (__const char *__nptr)
{
  return strtol (__nptr, (char **) ((void *)0), 10);
}




__extension__ extern __inline long long int
__attribute__ ((__nothrow__)) atoll (__const char *__nptr)
{
  return strtoll (__nptr, (char **) ((void *)0), 10);
}

# 311 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ;


extern long int a64l (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;




# 1 "/usr/include/sys/types.h" 1 3 4
# 29 "/usr/include/sys/types.h" 3 4






typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;




typedef __loff_t loff_t;



typedef __ino_t ino_t;
# 62 "/usr/include/sys/types.h" 3 4
typedef __dev_t dev_t;




typedef __gid_t gid_t;




typedef __mode_t mode_t;




typedef __nlink_t nlink_t;




typedef __uid_t uid_t;





typedef __off_t off_t;
# 100 "/usr/include/sys/types.h" 3 4
typedef __pid_t pid_t;




typedef __id_t id_t;




typedef __ssize_t ssize_t;





typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;





typedef __key_t key_t;
# 133 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/time.h" 1 3 4
# 74 "/usr/include/time.h" 3 4


typedef __time_t time_t;



# 92 "/usr/include/time.h" 3 4
typedef __clockid_t clockid_t;
# 104 "/usr/include/time.h" 3 4
typedef __timer_t timer_t;
# 134 "/usr/include/sys/types.h" 2 3 4
# 147 "/usr/include/sys/types.h" 3 4
# 1 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 1 3 4
# 148 "/usr/include/sys/types.h" 2 3 4



typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 195 "/usr/include/sys/types.h" 3 4
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));


typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef int register_t __attribute__ ((__mode__ (__word__)));
# 217 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 37 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/endian.h" 1 3 4
# 38 "/usr/include/endian.h" 2 3 4
# 61 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/byteswap.h" 1 3 4
# 62 "/usr/include/endian.h" 2 3 4
# 218 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/select.h" 1 3 4
# 31 "/usr/include/sys/select.h" 3 4
# 1 "/usr/include/bits/select.h" 1 3 4
# 32 "/usr/include/sys/select.h" 2 3 4


# 1 "/usr/include/bits/sigset.h" 1 3 4
# 24 "/usr/include/bits/sigset.h" 3 4
typedef int __sig_atomic_t;




typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3 4



typedef __sigset_t sigset_t;





# 1 "/usr/include/time.h" 1 3 4
# 120 "/usr/include/time.h" 3 4
struct timespec
  {
    __time_t tv_sec;
    long int tv_nsec;
  };
# 45 "/usr/include/sys/select.h" 2 3 4

# 1 "/usr/include/bits/time.h" 1 3 4
# 69 "/usr/include/bits/time.h" 3 4
struct timeval
  {
    __time_t tv_sec;
    __suseconds_t tv_usec;
  };
# 47 "/usr/include/sys/select.h" 2 3 4


typedef __suseconds_t suseconds_t;





typedef long int __fd_mask;
# 67 "/usr/include/sys/select.h" 3 4
typedef struct
  {






    __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];


  } fd_set;






typedef __fd_mask fd_mask;
# 99 "/usr/include/sys/select.h" 3 4

# 109 "/usr/include/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
     fd_set *__restrict __writefds,
     fd_set *__restrict __exceptfds,
     struct timeval *__restrict __timeout);
# 121 "/usr/include/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
      fd_set *__restrict __writefds,
      fd_set *__restrict __exceptfds,
      const struct timespec *__restrict __timeout,
      const __sigset_t *__restrict __sigmask);



# 221 "/usr/include/sys/types.h" 2 3 4


# 1 "/usr/include/sys/sysmacros.h" 1 3 4
# 30 "/usr/include/sys/sysmacros.h" 3 4
__extension__
extern unsigned int gnu_dev_major (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern unsigned int gnu_dev_minor (unsigned long long int __dev)
     __attribute__ ((__nothrow__));
__extension__
extern unsigned long long int gnu_dev_makedev (unsigned int __major,
            unsigned int __minor)
     __attribute__ ((__nothrow__));


__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
{
  return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}

__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
{
  return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}

__extension__ extern __inline unsigned long long int
__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
{
  return ((__minor & 0xff) | ((__major & 0xfff) << 8)
   | (((unsigned long long int) (__minor & ~0xff)) << 12)
   | (((unsigned long long int) (__major & ~0xfff)) << 32));
}
# 224 "/usr/include/sys/types.h" 2 3 4
# 235 "/usr/include/sys/types.h" 3 4
typedef __blkcnt_t blkcnt_t;



typedef __fsblkcnt_t fsblkcnt_t;



typedef __fsfilcnt_t fsfilcnt_t;
# 270 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
# 24 "/usr/include/bits/pthreadtypes.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 25 "/usr/include/bits/pthreadtypes.h" 2 3 4
# 51 "/usr/include/bits/pthreadtypes.h" 3 4
typedef unsigned long int pthread_t;


typedef union
{
  char __size[56];
  long int __align;
} pthread_attr_t;



typedef struct __pthread_internal_list
{
  struct __pthread_internal_list *__prev;
  struct __pthread_internal_list *__next;
} __pthread_list_t;
# 77 "/usr/include/bits/pthreadtypes.h" 3 4
typedef union
{
  struct __pthread_mutex_s
  {
    int __lock;
    unsigned int __count;
    int __owner;

    unsigned int __nusers;



    int __kind;

    int __spins;
    __pthread_list_t __list;
# 102 "/usr/include/bits/pthreadtypes.h" 3 4
  } __data;
  char __size[40];
  long int __align;
} pthread_mutex_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_mutexattr_t;




typedef union
{
  struct
  {
    int __lock;
    unsigned int __futex;
    __extension__ unsigned long long int __total_seq;
    __extension__ unsigned long long int __wakeup_seq;
    __extension__ unsigned long long int __woken_seq;
    void *__mutex;
    unsigned int __nwaiters;
    unsigned int __broadcast_seq;
  } __data;
  char __size[48];
  __extension__ long long int __align;
} pthread_cond_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_condattr_t;



typedef unsigned int pthread_key_t;



typedef int pthread_once_t;





typedef union
{

  struct
  {
    int __lock;
    unsigned int __nr_readers;
    unsigned int __readers_wakeup;
    unsigned int __writer_wakeup;
    unsigned int __nr_readers_queued;
    unsigned int __nr_writers_queued;
    int __writer;
    int __shared;
    unsigned long int __pad1;
    unsigned long int __pad2;


    unsigned int __flags;
  } __data;
# 188 "/usr/include/bits/pthreadtypes.h" 3 4
  char __size[56];
  long int __align;
} pthread_rwlock_t;

typedef union
{
  char __size[8];
  long int __align;
} pthread_rwlockattr_t;





typedef volatile int pthread_spinlock_t;




typedef union
{
  char __size[32];
  long int __align;
} pthread_barrier_t;

typedef union
{
  char __size[4];
  int __align;
} pthread_barrierattr_t;
# 271 "/usr/include/sys/types.h" 2 3 4



# 321 "/usr/include/stdlib.h" 2 3 4






extern long int random (void) __attribute__ ((__nothrow__));


extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__));





extern char *initstate (unsigned int __seed, char *__statebuf,
   size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));



extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));







struct random_data
  {
    int32_t *fptr;
    int32_t *rptr;
    int32_t *state;
    int rand_type;
    int rand_deg;
    int rand_sep;
    int32_t *end_ptr;
  };

extern int random_r (struct random_data *__restrict __buf,
       int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int srandom_r (unsigned int __seed, struct random_data *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
   size_t __statelen,
   struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));

extern int setstate_r (char *__restrict __statebuf,
         struct random_data *__restrict __buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern int rand (void) __attribute__ ((__nothrow__));

extern void srand (unsigned int __seed) __attribute__ ((__nothrow__));




extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__));







extern double drand48 (void) __attribute__ ((__nothrow__));
extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int lrand48 (void) __attribute__ ((__nothrow__));
extern long int nrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern long int mrand48 (void) __attribute__ ((__nothrow__));
extern long int jrand48 (unsigned short int __xsubi[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern void srand48 (long int __seedval) __attribute__ ((__nothrow__));
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





struct drand48_data
  {
    unsigned short int __x[3];
    unsigned short int __old_x[3];
    unsigned short int __c;
    unsigned short int __init;
    unsigned long long int __a;
  };


extern int drand48_r (struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int lrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int mrand48_r (struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
        struct drand48_data *__restrict __buffer,
        long int *__restrict __result)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));

extern int seed48_r (unsigned short int __seed16v[3],
       struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern int lcong48_r (unsigned short int __param[7],
        struct drand48_data *__buffer)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));









extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;

extern void *calloc (size_t __nmemb, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;










extern void *realloc (void *__ptr, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__));

extern void free (void *__ptr) __attribute__ ((__nothrow__));




extern void cfree (void *__ptr) __attribute__ ((__nothrow__));



# 1 "/usr/include/alloca.h" 1 3 4
# 25 "/usr/include/alloca.h" 3 4
# 1 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 1 3 4
# 26 "/usr/include/alloca.h" 2 3 4







extern void *alloca (size_t __size) __attribute__ ((__nothrow__));






# 498 "/usr/include/stdlib.h" 2 3 4




extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ;




extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));



extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 530 "/usr/include/stdlib.h" 3 4





extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));






extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
# 553 "/usr/include/stdlib.h" 3 4






extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));






extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;




extern char *__secure_getenv (__const char *__name)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;





extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));





extern int setenv (__const char *__name, __const char *__value, int __replace)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));


extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__));






extern int clearenv (void) __attribute__ ((__nothrow__));
# 604 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 615 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 637 "/usr/include/stdlib.h" 3 4
extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
# 658 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 707 "/usr/include/stdlib.h" 3 4





extern int system (__const char *__command) ;

# 729 "/usr/include/stdlib.h" 3 4
extern char *realpath (__const char *__restrict __name,
         char *__restrict __resolved) __attribute__ ((__nothrow__)) ;






typedef int (*__compar_fn_t) (__const void *, __const void *);
# 747 "/usr/include/stdlib.h" 3 4



extern void *bsearch (__const void *__key, __const void *__base,
        size_t __nmemb, size_t __size, __compar_fn_t __compar)
     __attribute__ ((__nonnull__ (1, 2, 5))) ;



extern void qsort (void *__base, size_t __nmemb, size_t __size,
     __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
# 766 "/usr/include/stdlib.h" 3 4
extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;



__extension__ extern long long int llabs (long long int __x)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;







extern div_t div (int __numer, int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;




__extension__ extern lldiv_t lldiv (long long int __numer,
        long long int __denom)
     __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ;

# 802 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;




extern char *gcvt (double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern char *qecvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ;




extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
     int *__restrict __sign, char *__restrict __buf,
     size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));

extern int qecvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
      int *__restrict __decpt, int *__restrict __sign,
      char *__restrict __buf, size_t __len)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5)));







extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int mbtowc (wchar_t *__restrict __pwc,
     __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ;


extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ;



extern size_t mbstowcs (wchar_t *__restrict __pwcs,
   __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__));

extern size_t wcstombs (char *__restrict __s,
   __const wchar_t *__restrict __pwcs, size_t __n)
     __attribute__ ((__nothrow__));








extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ;
# 907 "/usr/include/stdlib.h" 3 4
extern int posix_openpt (int __oflag) ;
# 942 "/usr/include/stdlib.h" 3 4
extern int getloadavg (double __loadavg[], int __nelem)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
# 958 "/usr/include/stdlib.h" 3 4

# 27 "interface/play_ascii.c" 2
# 1 "/usr/include/string.h" 1 3 4
# 28 "/usr/include/string.h" 3 4





# 1 "/home/meissner/fsf-install-ppc64/lra/lib/gcc/powerpc64-unknown-linux-gnu/4.8.0/include/stddef.h" 1 3 4
# 34 "/usr/include/string.h" 2 3 4









extern void *memcpy (void *__restrict __dest,
       __const void *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void *memmove (void *__dest, __const void *__src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));






extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
        int __c, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));





extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 94 "/usr/include/string.h" 3 4
extern void *memchr (__const void *__s, int __c, size_t __n)
      __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));


# 125 "/usr/include/string.h" 3 4


extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));

extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
        size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strcoll (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));

extern size_t strxfrm (char *__restrict __dest,
         __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));






# 1 "/usr/include/xlocale.h" 1 3 4
# 28 "/usr/include/xlocale.h" 3 4
typedef struct __locale_struct
{

  struct locale_data *__locales[13];


  const unsigned short int *__ctype_b;
  const int *__ctype_tolower;
  const int *__ctype_toupper;


  const char *__names[13];
} *__locale_t;


typedef __locale_t locale_t;
# 162 "/usr/include/string.h" 2 3 4


extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));

extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
    __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4)));




extern char *strdup (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));






extern char *strndup (__const char *__string, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
# 208 "/usr/include/string.h" 3 4

# 233 "/usr/include/string.h" 3 4
extern char *strchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 260 "/usr/include/string.h" 3 4
extern char *strrchr (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));


# 279 "/usr/include/string.h" 3 4



extern size_t strcspn (__const char *__s, __const char *__reject)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern size_t strspn (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 312 "/usr/include/string.h" 3 4
extern char *strpbrk (__const char *__s, __const char *__accept)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 340 "/usr/include/string.h" 3 4
extern char *strstr (__const char *__haystack, __const char *__needle)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));




extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));




extern char *__strtok_r (char *__restrict __s,
    __const char *__restrict __delim,
    char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));

extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
         char **__restrict __save_ptr)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
# 395 "/usr/include/string.h" 3 4


extern size_t strlen (__const char *__s)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern size_t strnlen (__const char *__string, size_t __maxlen)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));





extern char *strerror (int __errnum) __attribute__ ((__nothrow__));

# 425 "/usr/include/string.h" 3 4
extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__))

                        __attribute__ ((__nonnull__ (2)));
# 443 "/usr/include/string.h" 3 4
extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__));





extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));



extern void bcopy (__const void *__src, void *__dest, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));


extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));


extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 487 "/usr/include/string.h" 3 4
extern char *index (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 515 "/usr/include/string.h" 3 4
extern char *rindex (__const char *__s, int __c)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));




extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
# 534 "/usr/include/string.h" 3 4
extern int strcasecmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));


extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 557 "/usr/include/string.h" 3 4
extern char *strsep (char **__restrict __stringp,
       __const char *__restrict __delim)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));




extern char *strsignal (int __sig) __attribute__ ((__nothrow__));


extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));



extern char *__stpncpy (char *__restrict __dest,
   __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *stpncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
# 632 "/usr/include/string.h" 3 4
# 1 "/usr/include/bits/string.h" 1 3 4
# 633 "/usr/include/string.h" 2 3 4


# 1 "/usr/include/bits/string2.h" 1 3 4
# 80 "/usr/include/bits/string2.h" 3 4
typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2;
typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3;
typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4;
typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5;
typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6;
typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7;
typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8;
# 394 "/usr/include/bits/string2.h" 3 4
extern void *__rawmemchr (const void *__s, int __c);
# 969 "/usr/include/bits/string2.h" 3 4
extern __inline size_t __strcspn_c1 (__const char *__s, int __reject);
extern __inline size_t
__strcspn_c1 (__const char *__s, int __reject)
{
  register size_t __result = 0;
  while (__s[__result] != '\0' && __s[__result] != __reject)
    ++__result;
  return __result;
}

extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1,
         int __reject2);
extern __inline size_t
__strcspn_c2 (__const char *__s, int __reject1, int __reject2)
{
  register size_t __result = 0;
  while (__s[__result] != '\0' && __s[__result] != __reject1
  && __s[__result] != __reject2)
    ++__result;
  return __result;
}

extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1,
         int __reject2, int __reject3);
extern __inline size_t
__strcspn_c3 (__const char *__s, int __reject1, int __reject2,
       int __reject3)
{
  register size_t __result = 0;
  while (__s[__result] != '\0' && __s[__result] != __reject1
  && __s[__result] != __reject2 && __s[__result] != __reject3)
    ++__result;
  return __result;
}
# 1045 "/usr/include/bits/string2.h" 3 4
extern __inline size_t __strspn_c1 (__const char *__s, int __accept);
extern __inline size_t
__strspn_c1 (__const char *__s, int __accept)
{
  register size_t __result = 0;

  while (__s[__result] == __accept)
    ++__result;
  return __result;
}

extern __inline size_t __strspn_c2 (__const char *__s, int __accept1,
        int __accept2);
extern __inline size_t
__strspn_c2 (__const char *__s, int __accept1, int __accept2)
{
  register size_t __result = 0;

  while (__s[__result] == __accept1 || __s[__result] == __accept2)
    ++__result;
  return __result;
}

extern __inline size_t __strspn_c3 (__const char *__s, int __accept1,
        int __accept2, int __accept3);
extern __inline size_t
__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
{
  register size_t __result = 0;

  while (__s[__result] == __accept1 || __s[__result] == __accept2
  || __s[__result] == __accept3)
    ++__result;
  return __result;
}
# 1121 "/usr/include/bits/string2.h" 3 4
extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1,
         int __accept2);
extern __inline char *
__strpbrk_c2 (__const char *__s, int __accept1, int __accept2)
{

  while (*__s != '\0' && *__s != __accept1 && *__s != __accept2)
    ++__s;
  return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
}

extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1,
         int __accept2, int __accept3);
extern __inline char *
__strpbrk_c3 (__const char *__s, int __accept1, int __accept2,
       int __accept3)
{

  while (*__s != '\0' && *__s != __accept1 && *__s != __accept2
  && *__s != __accept3)
    ++__s;
  return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s;
}
# 1172 "/usr/include/bits/string2.h" 3 4
extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp);
extern __inline char *
__strtok_r_1c (char *__s, char __sep, char **__nextp)
{
  char *__result;
  if (__s == ((void *)0))
    __s = *__nextp;
  while (*__s == __sep)
    ++__s;
  __result = ((void *)0);
  if (*__s != '\0')
    {
      __result = __s++;
      while (*__s != '\0')
 if (*__s++ == __sep)
   {
     __s[-1] = '\0';
     break;
   }
    }
  *__nextp = __s;
  return __result;
}
# 1204 "/usr/include/bits/string2.h" 3 4
extern char *__strsep_g (char **__stringp, __const char *__delim);
# 1222 "/usr/include/bits/string2.h" 3 4
extern __inline char *__strsep_1c (char **__s, char __reject);
extern __inline char *
__strsep_1c (char **__s, char __reject)
{
  register char *__retval = *__s;
  if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0))
    *(*__s)++ = '\0';
  return __retval;
}

extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2);
extern __inline char *
__strsep_2c (char **__s, char __reject1, char __reject2)
{
  register char *__retval = *__s;
  if (__retval != ((void *)0))
    {
      register char *__cp = __retval;
      while (1)
 {
   if (*__cp == '\0')
     {
       __cp = ((void *)0);
   break;
     }
   if (*__cp == __reject1 || *__cp == __reject2)
     {
       *__cp++ = '\0';
       break;
     }
   ++__cp;
 }
      *__s = __cp;
    }
  return __retval;
}

extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2,
       char __reject3);
extern __inline char *
__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3)
{
  register char *__retval = *__s;
  if (__retval != ((void *)0))
    {
      register char *__cp = __retval;
      while (1)
 {
   if (*__cp == '\0')
     {
       __cp = ((void *)0);
   break;
     }
   if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3)
     {
       *__cp++ = '\0';
       break;
     }
   ++__cp;
 }
      *__s = __cp;
    }
  return __retval;
}
# 1303 "/usr/include/bits/string2.h" 3 4
extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
# 1322 "/usr/include/bits/string2.h" 3 4
extern char *__strndup (__const char *__string, size_t __n)
     __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
# 636 "/usr/include/string.h" 2 3 4
# 644 "/usr/include/string.h" 3 4

# 28 "interface/play_ascii.c" 2
# 1 "/usr/include/ctype.h" 1 3 4
# 30 "/usr/include/ctype.h" 3 4

# 48 "/usr/include/ctype.h" 3 4
enum
{
  _ISupper = (1 << (0)),
  _ISlower = (1 << (1)),
  _ISalpha = (1 << (2)),
  _ISdigit = (1 << (3)),
  _ISxdigit = (1 << (4)),
  _ISspace = (1 << (5)),
  _ISprint = (1 << (6)),
  _ISgraph = (1 << (7)),
  _ISblank = (1 << (8)),
  _IScntrl = (1 << (9)),
  _ISpunct = (1 << (10)),
  _ISalnum = (1 << (11))
};
# 81 "/usr/include/ctype.h" 3 4
extern __const unsigned short int **__ctype_b_loc (void)
     __attribute__ ((__nothrow__)) __attribute__ ((__const));
extern __const __int32_t **__ctype_tolower_loc (void)
     __attribute__ ((__nothrow__)) __attribute__ ((__const));
extern __const __int32_t **__ctype_toupper_loc (void)
     __attribute__ ((__nothrow__)) __attribute__ ((__const));
# 96 "/usr/include/ctype.h" 3 4






extern int isalnum (int) __attribute__ ((__nothrow__));
extern int isalpha (int) __attribute__ ((__nothrow__));
extern int iscntrl (int) __attribute__ ((__nothrow__));
extern int isdigit (int) __attribute__ ((__nothrow__));
extern int islower (int) __attribute__ ((__nothrow__));
extern int isgraph (int) __attribute__ ((__nothrow__));
extern int isprint (int) __attribute__ ((__nothrow__));
extern int ispunct (int) __attribute__ ((__nothrow__));
extern int isspace (int) __attribute__ ((__nothrow__));
extern int isupper (int) __attribute__ ((__nothrow__));
extern int isxdigit (int) __attribute__ ((__nothrow__));



extern int tolower (int __c) __attribute__ ((__nothrow__));


extern int toupper (int __c) __attribute__ ((__nothrow__));








extern int isblank (int) __attribute__ ((__nothrow__));


# 142 "/usr/include/ctype.h" 3 4
extern int isascii (int __c) __attribute__ ((__nothrow__));



extern int toascii (int __c) __attribute__ ((__nothrow__));



extern int _toupper (int) __attribute__ ((__nothrow__));
extern int _tolower (int) __attribute__ ((__nothrow__));
# 190 "/usr/include/ctype.h" 3 4
extern __inline int
__attribute__ ((__nothrow__)) tolower (int __c)
{
  return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
}

extern __inline int
__attribute__ ((__nothrow__)) toupper (int __c)
{
  return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
}
# 247 "/usr/include/ctype.h" 3 4
extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__));
extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__));

extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__));



extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));


extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__));
# 323 "/usr/include/ctype.h" 3 4

# 29 "interface/play_ascii.c" 2

# 1 "./include/liberty.h" 1
# 44 "./include/liberty.h"
# 1 "./include/hash.h" 1
# 54 "./include/hash.h"
typedef unsigned long Hashvalue;
typedef unsigned long Compacttype;
# 74 "./include/hash.h"
typedef struct {
  Hashvalue hashval[(64 / ( 8 * sizeof(long)))];
} Hash_data;


void hash_init(void);

void hashdata_recalc(Hash_data *hd, Intersection *board, int ko_pos);
int hashdata_compare(Hash_data *hd1, Hash_data *hd2);
void hashdata_invert_ko(Hash_data *hd, int pos);
void hashdata_invert_stone(Hash_data *hd, int pos, int color);
void hashdata_set_tomove(Hash_data *hd, int to_move);

int hashdata_diff_dump(Hash_data *key1, Hash_data *key2);
# 45 "./include/liberty.h" 2


extern Hash_data hashdata;
# 135 "./include/liberty.h"
struct board_state {
  int board_size;

  Intersection board[((19 + 2) * (19 + 1) + 1)];
  int board_ko_pos;
  int black_captured;
  int white_captured;

  Intersection initial_board[((19 + 2) * (19 + 1) + 1)];
  int initial_board_ko_pos;
  int initial_white_captured;
  int initial_black_captured;
  int move_history_color[500];
  int move_history_pos[500];
  int move_history_pointer;

  float komi;
  int move_number;
};



int find_origin(int str);
int chainlinks(int str, int adj[160]);
int chainlinks2(int str, int adj[160], int lib);
int chainlinks3(int str, int adj[160], int lib);
int extended_chainlinks(int str, int adj[160], int both_colors);





extern int position_number;



int is_edge_vertex(int pos);



int countlib(int str);
int findlib(int str, int maxlib, int *libs);
int fastlib(int pos, int color, int ignore_capture);
int approxlib(int pos, int color, int maxlib, int *libs);
int accuratelib(int pos, int color, int maxlib, int *libs);
int count_common_libs(int str1, int str2);
int find_common_libs(int str1, int str2, int maxlib, int *libs);
int have_common_lib(int str1, int str2, int *lib);


void start_timer(int n);
double time_report(int n, const char *occupation, int move, double mintime);

void update_random_seed(void);



int is_self_atari(int pos, int color);


int countstones(int str);
int findstones(int str, int maxstones, int *stones);


void incremental_order_moves(int move, int color, int string,
        int *number_edges, int *number_same_string,
        int *number_own, int *number_opponent,
        int *captured_stones, int *threatened_stones,
        int *saved_stones, int *number_open);


void transformation_init(void);


void dump_stack(void);
void report_worm(int m, int n);
void ascii_report_worm(char *string);
void report_dragon(FILE *outfile, int pos);
void ascii_report_dragon(char *string);
struct dragon_data2 * dragon2_func(int pos);



void rotate2(int i, int j, int *ri, int *rj, int rot);
void inv_rotate2(int i, int j, int *ri, int *rj, int rot);
int rotate1(int pos, int rot);
int inv_rotate1(int pos, int rot);
# 250 "./include/liberty.h"
extern int deltai[8];
extern int deltaj[8];
extern int delta[8];

void store_board(struct board_state *state);
void restore_board(struct board_state *state);


struct pattern;
struct pattern_db;
struct fullboard_pattern;
struct corner_pattern;
struct corner_db;
struct half_eye_data;
struct movelist;
struct tree_node_list;
struct match_node;





typedef void (*matchpat_callback_fn_ptr)(int anchor, int color,
                                         struct pattern *, int rotation,
                                         void *data);
typedef void (*fullboard_matchpat_callback_fn_ptr)(int move,
                                                   struct fullboard_pattern *,
                                                   int rotation);
typedef void (*corner_matchpat_callback_fn_ptr)(int move, int color,
      struct corner_pattern *pattern,
      int rotation);
void matchpat(matchpat_callback_fn_ptr callback, int color,
       struct pattern_db *pdb, void *callback_data,
       char goal[(19 + 1) * (19 + 1)]);
void matchpat_goal_anchor(matchpat_callback_fn_ptr callback, int color,
       struct pattern_db *pdb, void *callback_data,
       char goal[(19 + 1) * (19 + 1)], int anchor_in_goal);
void fullboard_matchpat(fullboard_matchpat_callback_fn_ptr callback,
   int color, struct fullboard_pattern *pattern);
void corner_matchpat(corner_matchpat_callback_fn_ptr callback, int color,
       struct corner_db *database);
void dfa_match_init(void);
void tree_match_init(void);
void tree_initialize_pointers(struct tree_node_list *tnl,
                              struct match_node *matches,
                              int tnl_size,
                              int matches_size);

void reading_cache_init(void);
void reading_cache_clear(void);


int attack(int str, int *move);
int find_defense(int str, int *move);
int attack_and_defend(int str,
        int *attack_code, int *attack_point,
        int *defend_code, int *defense_point);
int attack_either(int astr, int bstr);
int defend_both(int astr, int bstr);
int break_through(int apos, int bpos, int cpos);
int attack_threats(int pos, int max_points, int moves[], int codes[]);

int restricted_defend1(int str, int *move, int komaster, int kom_pos,
         int num_forbidden_moves, int *forbidden_moves);
int restricted_attack2(int str, int *move, int komaster, int kom_pos,
         int num_forbidden_moves, int *forbidden_moves);

int simple_ladder(int str, int *move);

void tune_move_ordering(int params[67]);
void draw_reading_shadow(void);


void purge_persistent_reading_cache(void);
void clear_persistent_reading_cache(void);
int search_persistent_reading_cache(int routine, int str, int *result,
        int *move);
void store_persistent_reading_cache(int routine, int str, int result,
        int move, int nodes);
void delete_persistent_reading_cache_entry(int routine, int str);
void reading_hotspots(float values[(19 + 1) * (19 + 1)]);
void purge_persistent_owl_cache(void);
void clear_persistent_owl_cache(void);
int search_persistent_owl_cache(int routine, int apos, int bpos, int cpos,
    int *result, int *move, int *move2,
    int *certain);
void store_persistent_owl_cache(int routine, int apos, int bpos, int cpos,
    int result, int move, int move2, int certain,
    int tactical_nodes, char goal[(19 + 1) * (19 + 1)],
    int goal_color);
void owl_hotspots(float values[(19 + 1) * (19 + 1)]);


int string_connect(int str1, int str2, int *move);
int disconnect(int str1, int str2, int *move);
int non_transitivity(int str1, int str2, int str3, int *move);


int liberty_of_string(int pos, int str);
int second_order_liberty_of_string(int pos, int str);
int neighbor_of_string(int pos, int str);
int has_neighbor(int pos, int color);
int same_string(int str1, int str2);
int adjacent_strings(int str1, int str2);
int is_ko(int pos, int color, int *ko_pos);
int is_ko_point(int pos);
int komaster_trymove(int pos, int color,
       const char *message, int str,
       int komaster, int kom_pos,
       int *new_komaster, int *new_kom_pos,
       int *is_conditional_ko, int consider_conditional_ko);
int does_capture_something(int pos, int color);
void mark_string(int str, char mx[(19 + 1) * (19 + 1)], char mark);
int move_in_stack(int pos, int cutoff);
void get_move_from_stack(int k, int *move, int *color);
int stones_on_board(int color);

int obvious_false_eye(int pos, int color);
int owl_topological_eye(int pos, int color);
int vital_chain(int pos);
int confirm_safety(int move, int color, int *defense_point,
     char safe_stones[(19 + 1) * (19 + 1)]);
float blunder_size(int move, int color, int *defense_point,
     char safe_stones[(19 + 1) * (19 + 1)]);
void set_depth_values(int level);
void modify_depth_values(int n);
void increase_depth_values(void);
void decrease_depth_values(void);
void set_temporary_depth_values(int d, int b, int f, int k,
    int br, int b2, int ss);
void restore_depth_values(void);

int safe_move(int move, int color);

void join_dragons(int d1, int d2);
int dragon_escape(char goal[(19 + 1) * (19 + 1)], int color, char escape_value[(19 + 1) * (19 + 1)]);
void compute_refined_dragon_weaknesses(void);
struct eyevalue;
float crude_dragon_weakness(int safety, struct eyevalue *genus, int has_lunch,
       float moyo_value, float escape_route);
int is_same_dragon(int d1, int d2);
int are_neighbor_dragons(int d1, int d2);
int first_worm_in_dragon(int w);
int next_worm_in_dragon(int w);
int lively_dragon_exists(int color);
void compute_dragon_influence(void);
void set_strength_data(int color, char safe_stones[(19 + 1) * (19 + 1)],
         float strength[(19 + 1) * (19 + 1)]);

void get_lively_stones(int color, char safe_stones[(19 + 1) * (19 + 1)]);
int is_same_worm(int w1, int w2);
int is_worm_origin(int w, int pos);
void propagate_worm(int pos);
void transform2(int i, int j, int *ti, int *tj, int trans);
void find_cuts(void);
void find_connections(void);
void modify_eye_spaces(void);


int movelist_move_known(int move, int max_points, int points[], int codes[]);
void movelist_change_point(int move, int code, int max_points,
      int points[], int codes[]);


int compute_surroundings(int pos, int apos, int showboard,
    int *surround_size);
int is_surrounded(int pos);
int does_surround(int move, int dragon);
void reset_surround_data(void);
int surround_map(int dr, int pos);


void clear_move_reasons(void);
void add_lunch(int eater, int food);
void remove_lunch(int eater, int food);
void add_attack_move(int pos, int ww, int code);
void add_defense_move(int pos, int ww, int code);
void add_attack_threat_move(int pos, int ww, int code);
void remove_attack_threat_move(int pos, int ww);
void add_defense_threat_move(int pos, int ww, int code);
void add_connection_move(int pos, int dr1, int dr2);
void add_cut_move(int pos, int dr1, int dr2);
void add_antisuji_move(int pos);
void add_semeai_move(int pos, int dr);
void add_semeai_threat(int pos, int dr);

void add_owl_attack_move(int pos, int dr, int code);
void add_owl_defense_move(int pos, int dr, int code);
void add_owl_attack_threat_move(int pos, int dr, int code);
void add_owl_defense_threat_move(int pos, int dr, int code);
void add_owl_prevent_threat_move(int pos, int dr);
void add_owl_uncertain_defense_move(int pos, int dr);
void add_owl_uncertain_attack_move(int pos, int dr);

void add_my_atari_atari_move(int pos, int size);
void add_your_atari_atari_move(int pos, int size);
void add_vital_eye_move(int pos, int eyespace, int color);
void add_invasion_move(int pos);
void add_expand_territory_move(int pos);
void add_expand_moyo_move(int pos);
void add_strategical_attack_move(int pos, int dr);
void add_strategical_defense_move(int pos, int dr);
void add_worthwhile_threat_move(int pos);
void add_replacement_move(int from, int to);
int set_minimum_move_value(int pos, float value);
void set_maximum_move_value(int pos, float value);
void set_minimum_territorial_value(int pos, float value);
void set_maximum_territorial_value(int pos, float value);
void add_shape_value(int pos, float value);
void add_followup_value(int pos, float value);
void add_reverse_followup_value(int pos, float value);
void record_top_move(int move, float val);
void remove_top_move(int move);
void scale_randomness(int pos, float scaling);




void add_either_move(int pos, int reason1, int target1,
       int reason2, int target2);
void add_all_move(int pos, int reason1, int target1,
    int reason2, int target2);

void add_gain_move(int pos, int target1, int target2);
void add_loss_move(int pos, int target1, int target2);


int get_attack_threats(int pos, int max_strings, int strings[]);
int get_defense_threats(int pos, int max_strings, int strings[]);
void get_saved_worms(int pos, char saved[(19 + 1) * (19 + 1)]);
void get_saved_dragons(int pos, char saved[(19 + 1) * (19 + 1)]);
void mark_safe_stones(int color, int move_pos,
        const char saved_dragons[(19 + 1) * (19 + 1)],
        const char saved_worms[(19 + 1) * (19 + 1)],
        char safe_stones[(19 + 1) * (19 + 1)]);


int owl_lively(int pos);
int owl_escape_value(int pos);
int owl_goal_dragon(int pos);
int owl_eyespace(int pos);
int owl_big_eyespace(int pos);
int owl_proper_eye(int pos);
int owl_eye_size(int pos);
int owl_strong_dragon(int pos);
void owl_reasons(int color);

void unconditional_life(int unconditional_territory[(19 + 1) * (19 + 1)], int color);
void find_superstring(int str, int *num_stones, int *stones);
void find_superstring_conservative(int str, int *num_stones, int *stones);
void find_superstring_liberties(int str, int *liberties, int *libs,
                                int liberty_cap);
void find_proper_superstring_liberties(int str, int *liberties, int *libs,
                                       int liberty_cap);
void find_superstring_stones_and_liberties(int str, int *num_stones,
        int *stones, int *liberties,
        int *libs, int liberty_cap);
void superstring_chainlinks(int str, int *num_adj, int adj[160],
                            int liberty_cap);
void proper_superstring_chainlinks(int str, int *num_adj,
                                   int adj[160], int liberty_cap);

int place_fixed_handicap(int handicap);
int place_free_handicap(int handicap);
int free_handicap_remaining_stones(void);
int free_handicap_total_stones(void);



void fuseki(int color);
void semeai(int color);
void new_semeai(int color);
void small_semeai(int save_verbose);
void shapes(int color);
void endgame_shapes(int color);

void combinations(int color);
int atari_atari(int color, int *attack_move, char defense_moves[(19 + 1) * (19 + 1)],
  int save_verbose);
int atari_atari_confirm_safety(int color, int tpos, int *move, int minsize,
          const char saved_dragons[(19 + 1) * (19 + 1)],
          const char saved_worms[(19 + 1) * (19 + 1)]);

int atari_atari_blunder_size(int color, int tpos, int *move,
        const char safe_stones[(19 + 1) * (19 + 1)]);

int review_move_reasons(int *move, float *val, int color,
   float pure_threat_value, float lower_bound,
   int allowed_moves[(19 + 1) * (19 + 1)]);
int fill_liberty(int *move, int color);
int aftermath_genmove(int *aftermath_move, int color,
        int under_control[(19 + 1) * (19 + 1)],
        int do_capture_dead_stones);

int owl_attack(int target, int *attack_point, int *certain, int *kworm);
int owl_defend(int target, int *defense_point, int *certain, int *kworm);
int owl_threaten_attack(int target, int *attack1, int *attack2);
int owl_threaten_defense(int target, int *defend1, int *defend2);
int owl_does_defend(int move, int target, int *kworm);
int owl_confirm_safety(int move, int target, int *defense_point, int *kworm);
int owl_does_attack(int move, int target, int *kworm);
int owl_connection_defends(int move, int target1, int target2);
int owl_substantial(int str);
void owl_analyze_semeai(int apos, int bpos,
   int *resulta, int *resultb, int *move,
   int owl);

int genmove_restricted(int *i, int *j, int color, int allowed_moves[(19 + 1) * (19 + 1)]);

void change_attack(int str, int move, int acode);
void change_defense(int str, int move, int dcode);
void change_attack_threat(int str, int move, int acode);
void change_defense_threat(int str, int move, int dcode);
int attack_move_known(int move, int str);
int defense_move_known(int move, int str);
int attack_threat_move_known(int move, int str);
int defense_threat_move_known(int move, int str);
void worm_reasons(int color);

int does_attack(int move, int str);
int does_defend(int move, int str);
int double_atari(int move, int color, float *value,
   char safe_stones[(19 + 1) * (19 + 1)]);
int play_attack_defend_n(int color, int do_attack, int num_moves, ...);
int play_attack_defend2_n(int color, int do_attack, int num_moves, ...);
int play_break_through_n(int color, int num_moves, ...);
int play_connect_n(int color, int do_connect, int num_moves, ...);
int cut_possible(int pos, int color);
int defend_against(int move, int color, int apos);
int somewhere(int color, int check_alive, int num_moves, ...);
int visible_along_edge(int color, int apos, int bpos);
# 611 "./include/liberty.h"
struct moyo_data
{
  int number;
  int segmentation[(19 + 1) * (19 + 1)];
  int size[19*19];
  int owner[19*19];
  float territorial_value[19*19];
};





struct influence_data;
extern struct influence_data initial_black_influence;
extern struct influence_data initial_white_influence;
extern struct influence_data move_influence;
extern struct influence_data followup_influence;
# 638 "./include/liberty.h"
void compute_influence(int color, const char safe_stones[(19 + 1) * (19 + 1)],
         const float strength[(19 + 1) * (19 + 1)],
         struct influence_data *q,
         int move, const char *trace_message);
void compute_followup_influence(const struct influence_data *base,
           struct influence_data *q,
                  int move, const char *trace_message);
void compute_escape_influence(int color, const char safe_stones[(19 + 1) * (19 + 1)],
         const float strength[(19 + 1) * (19 + 1)],
                              char escape_value[(19 + 1) * (19 + 1)]);

float influence_delta_territory(const struct influence_data *base,
                         const struct influence_data *q, int color,
    int move);
int retrieve_delta_territory_cache(int pos, int color, float *move_value,
              float *followup_value);
void store_delta_territory_cache(int pos, int color, float move_value,
     float followup_value);

int whose_territory(const struct influence_data *q, int pos);
int whose_moyo(const struct influence_data *q, int pos);
int whose_area(const struct influence_data *q, int pos);
float influence_territory(const struct influence_data *q, int pos, int color);
void influence_get_moyo_segmentation(const struct influence_data *q,
                struct moyo_data *moyo);
void influence_get_moyo_data(const struct influence_data *q,
        int moyo_color[(19 + 1) * (19 + 1)],
        float territory_value[(19 + 1) * (19 + 1)]);
void get_influence(const struct influence_data *q,
     float white_influence[(19 + 1) * (19 + 1)],
     float black_influence[(19 + 1) * (19 + 1)],
     int regions[(19 + 1) * (19 + 1)]);
float influence_score(const struct influence_data *q);
void resegment_initial_influence(void);
void influence_mark_non_territory(int pos, int color);

float estimate_score(float *upper, float *lower);


int is_eye_space(int pos);
int is_proper_eye_space(int pos);
int is_marginal_eye_space(int pos);
int max_eye_value(int pos);
void test_eyeshape(int eyesize, int *eye_vertices);



void goaldump(char goal[(19 + 1) * (19 + 1)]);
void move_considered(int move, float value);



void sgffile_begindump(struct SGFTree_t *tree);
void sgffile_enddump(const char *filename);
# 700 "./include/liberty.h"
extern int board_size;
extern Intersection board[((19 + 2) * (19 + 1) + 1)];
extern int board_ko_pos;
extern int black_captured;
extern int white_captured;

extern Intersection initial_board[((19 + 2) * (19 + 1) + 1)];
extern int initial_board_ko_pos;
extern int initial_white_captured;
extern int initial_black_captured;
extern int move_history_color[500];
extern int move_history_pos[500];
extern int move_history_pointer;

extern float komi;
extern int movenum;

extern Intersection shadow[(19 + 1) * (19 + 1)];


extern int disable_threat_computation;
extern int disable_endgame_patterns;
extern int doing_scoring;


extern int transformation[(2*19 - 1) * (2*19 - 1)][8];
extern const int transformation2[8][2][2];


extern int depth;
extern int backfill_depth;
extern int backfill2_depth;
extern int superstring_depth;
extern int branch_depth;
extern int fourlib_depth;
extern int ko_depth;
extern int aa_depth;
extern int owl_distrust_depth;
extern int owl_branch_depth;
extern int owl_reading_depth;
extern int owl_node_limit;
extern int level;
extern int semeai_variations;
extern float best_move_values[10];
extern int best_moves[10];

extern int chinese_rules;
extern int experimental_owl_ext;
extern int experimental_semeai;
extern int experimental_connections;
extern int alternate_connections;
extern int owl_threats;
extern int experimental_influence;

extern int thrashing_dragon;


extern char *rgoal;
extern int goallib;

extern int stackp;
extern int count_variations;
extern SGFTree *sgf_dumptree;
# 776 "./include/liberty.h"
extern int close_worms[(19 + 1) * (19 + 1)][4];
extern int number_close_worms[(19 + 1) * (19 + 1)];
extern int close_black_worms[(19 + 1) * (19 + 1)][4];
extern int number_close_black_worms[(19 + 1) * (19 + 1)];
extern int close_white_worms[(19 + 1) * (19 + 1)][4];
extern int number_close_white_worms[(19 + 1) * (19 + 1)];

extern int false_eye_territory[(19 + 1) * (19 + 1)];

struct stats_data {
  int nodes;
  int position_entered;
  int position_hits;
  int read_result_entered;
  int read_result_hits;
  int hash_collisions;
};

extern struct stats_data stats;


struct eyevalue {




  unsigned char a;
  unsigned char b;
  unsigned char c;
  unsigned char d;

};


struct half_eye_data {
  float value;
  char type;
  int num_attacks;
  int attack_point[4];
  int num_defends;
  int defense_point[4];
};


extern struct half_eye_data half_eye[(19 + 1) * (19 + 1)];







struct worm_data {
  int color;
  int size;
  float effective_size;
  int origin;

  int liberties;
  int liberties2;
  int liberties3;
  int liberties4;
  int lunch;

  int cutstone;
  int cutstone2;
  int genus;
  int inessential;
  int invincible;
  int unconditional_status;
# 854 "./include/liberty.h"
  int attack_points[10];
  int attack_codes[10];
  int defense_points[10];
  int defense_codes[10];
  int attack_threat_points[10];
  int attack_threat_codes[10];
  int defense_threat_points[10];
  int defense_threat_codes[10];
};

extern struct worm_data worm[(19 + 1) * (19 + 1)];





struct surround_data {
  int dragon_number;
  char surround_map[(19 + 1) * (19 + 1)];
};

extern struct surround_data surroundings[10];
extern int surround_pointer;





struct dragon_data {
  int color;
  int id;
  int origin;

  int size;
  float effective_size;
  int crude_status;
  int owl_threat_status;
  int owl_status;
  int owl_attack_point;
  int owl_attack_code;




  int owl_attack_certain;
  int owl_second_attack_point;
  int owl_defense_point;
  int owl_defense_code;
  int owl_defense_certain;
  int owl_second_defense_point;
  int status;
  int owl_attack_kworm;
  int owl_defense_kworm;
};

extern struct dragon_data dragon[(19 + 1) * (19 + 1)];







struct dragon_data2 {
  int origin;
  int adjacent[10];
  int neighbors;
  int hostile_neighbors;
  int moyo_size;
  float moyo_territorial_value;
  int safety;
  float weakness;
  float weakness_pre_owl;
  int escape_route;
  struct eyevalue genus;
  int heye;
  int lunch;

  int semeai;
  int semeai_margin_of_safety;
  int surround_status;
  int surround_size;
};


extern int number_of_dragons;
extern struct dragon_data2 *dragon2;
# 954 "./include/liberty.h"
struct aftermath_data {
  int white_captured;
  int black_captured;
  int white_prisoners;
  int black_prisoners;
  int white_territory;
  int black_territory;
  int white_area;
  int black_area;
  int white_control[(19 + 1) * (19 + 1)];
  int black_control[(19 + 1) * (19 + 1)];
  int final_status[(19 + 1) * (19 + 1)];
};

struct eye_data {
  int color;
  int esize;
  int msize;
  int origin;
  struct eyevalue value;
  int attack_point;
  int defense_point;





  char marginal;
  char type;
  char neighbors;
  char marginal_neighbors;
  char cut;
};

extern struct eye_data white_eye[(19 + 1) * (19 + 1)];
extern struct eye_data black_eye[(19 + 1) * (19 + 1)];





void compute_eyes(int pos, struct eyevalue *value,
                  int *attack_point, int *defense_point,
                  struct eye_data eye[(19 + 1) * (19 + 1)],
                  struct half_eye_data heye[(19 + 1) * (19 + 1)],
                  int add_moves, int color);
void compute_eyes_pessimistic(int pos, struct eyevalue *value,
                              char *pessimistic_min,
                              int *attack_point, int *defense_point,
                              struct eye_data eye[(19 + 1) * (19 + 1)],
                              struct half_eye_data heye[(19 + 1) * (19 + 1)]);
void propagate_eye(int pos, struct eye_data eye[(19 + 1) * (19 + 1)]);
int find_eye_dragons(int origin, struct eye_data eye[(19 + 1) * (19 + 1)], int eye_color,
       int dragons[], int max_dragons);
float topological_eye(int pos, int color,
        struct eye_data my_eye[(19 + 1) * (19 + 1)],
        struct half_eye_data heye[(19 + 1) * (19 + 1)]);
void add_false_eye(int pos, struct eye_data eye[(19 + 1) * (19 + 1)],
     struct half_eye_data heye[(19 + 1) * (19 + 1)]);
void make_domains(struct eye_data b_eye[(19 + 1) * (19 + 1)],
                  struct eye_data w_eye[(19 + 1) * (19 + 1)],
    int owl_call);
void find_half_and_false_eyes(int color, struct eye_data eye[(19 + 1) * (19 + 1)],
         struct half_eye_data heye[(19 + 1) * (19 + 1)],
         char find_mask[(19 + 1) * (19 + 1)]);

void set_eyevalue(struct eyevalue *e, int a, int b, int c, int d);
int min_eye_threat(struct eyevalue *e);
int min_eyes(struct eyevalue *e);
int max_eyes(struct eyevalue *e);
int max_eye_threat(struct eyevalue *e);
void add_eyevalues(struct eyevalue *e1, struct eyevalue *e2,
     struct eyevalue *sum);
int eye_move_urgency(struct eyevalue *e);
char *eyevalue_to_string(struct eyevalue *e);

int is_halfeye(struct half_eye_data heye[(19 + 1) * (19 + 1)], int pos);
int is_false_eye(struct half_eye_data heye[(19 + 1) * (19 + 1)], int pos);



void abortgo(const char *file, int line, const char *msg, int i, int j);
# 31 "interface/play_ascii.c" 2
# 1 "interface/interface.h" 1
# 32 "interface/interface.h"
# 1 "./include/sgftree.h" 1
# 33 "interface/interface.h" 2

void play_ascii(SGFTree *tree, Gameinfo *gameinfo,
  char *filename, char *until);
void play_ascii_emacs(SGFTree *tree, Gameinfo *gameinfo,
        char *filename, char *until);
void play_gtp(FILE *gtp_input, int gtp_initial_orientation);
void play_gmp(Gameinfo *gameinfo);
void play_solo(Gameinfo *gameinfo, int benchmark);
void play_replay(Gameinfo *gameinfo, int color_to_test);

void load_and_analyze_sgf_file(Gameinfo *gameinfo);
void load_and_score_sgf_file(SGFTree *tree, Gameinfo *gameinfo,
        const char *scoringmode);
# 32 "interface/play_ascii.c" 2
# 46 "interface/play_ascii.c"
static int opt_showboard = 1;
static int showdead = 0;
static int emacs = 0;
static SGFTree sgftree;
static int last_move_i;
static int last_move_j;




static int current_score_estimate = 4711;

static void endgame(Gameinfo *gameinfo);
static void showcapture(char *line);
static void showdefense(char *line);
static void ascii_goto(Gameinfo *gameinfo, char *line);
static void ascii_free_handicap(Gameinfo *gameinfo, char *handicap);


static int sgf_initialized;





static void
make_letterbar(int boardsize, char *letterbar)
{
  int i, letteroffset;
  char spaces[64];
  char letter[64];

  if (boardsize <= 25)
    strcpy(spaces, " ");
  strcpy(letterbar, "   ");

  for (i = 0; i < boardsize; i++) {
    letteroffset = 'A';
    if (i+letteroffset >= 'I')
      letteroffset++;
    strcat(letterbar, spaces);
    sprintf(letter, "%c", i+letteroffset);
    strcat(letterbar, letter);
  }
}







static int hspot_size;
static char hspots[19][19];






static void
set_handicap_spots(int boardsize)
{
  if (hspot_size == boardsize)
    return;

  hspot_size = boardsize;

  memset(hspots, '.', sizeof(hspots));

  if (boardsize == 5) {

    hspots[1][1] = '+';
    hspots[boardsize-2][1] = '+';
    hspots[1][boardsize-2] = '+';
    hspots[boardsize-2][boardsize-2] = '+';

    hspots[boardsize/2][boardsize/2] = '+';
    return;
  }

  if (!(boardsize%2)) {

    if (boardsize > 2 && boardsize < 12) {

      hspots[2][2] = '+';
      hspots[boardsize-3][2] = '+';
      hspots[2][boardsize-3] = '+';
      hspots[boardsize-3][boardsize-3] = '+';
    }
    else {

      hspots[3][3] = '+';
      hspots[boardsize-4][3] = '+';
      hspots[3][boardsize-4] = '+';
      hspots[boardsize-4][boardsize-4] = '+';
    }
  }
  else {

    if (boardsize > 2 && boardsize < 12) {

      hspots[2][2] = '+';
      hspots[boardsize-3][2] = '+';
      hspots[2][boardsize-3] = '+';
      hspots[boardsize-3][boardsize-3] = '+';


      hspots[boardsize/2][boardsize/2] = '+';
    }
    else {

      hspots[3][3] = '+';
      hspots[boardsize-4][3] = '+';
      hspots[3][boardsize-4] = '+';
      hspots[boardsize-4][boardsize-4] = '+';


      hspots[3][boardsize/2] = '+';
      hspots[boardsize/2][3] = '+';
      hspots[boardsize/2][boardsize-4] = '+';
      hspots[boardsize-4][boardsize/2] = '+';


      hspots[boardsize/2][boardsize/2] = '+';
    }
  }

  return;
}






static void
ascii_showboard(void)
{
  int i, j;
  char letterbar[64];
  int last_pos_was_move;
  int pos_is_move;
  int dead;

  make_letterbar(board_size, letterbar);
  set_handicap_spots(board_size);

  printf("\n");
  printf("    White has captured %d pieces\n", black_captured);
  printf("    Black has captured %d pieces\n", white_captured);
  if (showscore) {
    if (current_score_estimate == 4711)
      printf("    No score estimate is available yet.\n");
    else if (current_score_estimate < 0)
      printf("    Estimated score: Black is ahead by %d\n",
      -current_score_estimate);
    else if (current_score_estimate > 0)
      printf("    Estimated score: White is ahead by %d\n",
      current_score_estimate);
    else
      printf("    Estimated score: Even!\n");
  }

  printf("\n");

  fflush(stdout);
  printf("%s%s\n", (emacs ? "EMACS1\n" : ""), letterbar);
  fflush(stdout);

  for (i = 0; i < board_size; i++) {
    printf(" %2d", board_size - i);
    last_pos_was_move = 0;
    for (j = 0; j < board_size; j++) {
      if (last_move_i == i && last_move_j == j)
 pos_is_move = 128;
      else
 pos_is_move = 0;
      dead = (dragon_status(((19 + 2) + (i) * (19 + 1) + (j)))==0) && showdead;
      switch (board[((19 + 2) + (i) * (19 + 1) + (j))] + pos_is_move + last_pos_was_move) {
 case 0 +128:
 case 0:
   printf(" %c", hspots[i][j]);
   last_pos_was_move = 0;
   break;
 case 2:
   printf(" %c", dead ? 'x' : 'X');
   last_pos_was_move = 0;
   break;
 case 1:
   printf(" %c", dead ? 'o' : 'O');
   last_pos_was_move = 0;
   break;
 case 2 +128:
   printf("(%c)", 'X');
   last_pos_was_move = 256;
   break;
 case 1 +128:
   printf("(%c)", 'O');
   last_pos_was_move = 256;
   break;
 case 0 +256:
   printf("%c", hspots[i][j]);
   last_pos_was_move = 0;
   break;
 case 2 +256:
   printf("%c", dead ? 'x' : 'X');
   last_pos_was_move = 0;
   break;
 case 1 +256:
   printf("%c", dead ? 'o' : 'O');
   last_pos_was_move = 0;
   break;
 default:
   fprintf(stderr, "Illegal board value %d\n", (int) board[((19 + 2) + (i) * (19 + 1) + (j))]);
   exit(1);
   break;
      }
    }

    if (last_pos_was_move == 0) {
      if (board_size > 10)
 printf(" %2d", board_size - i);
      else
 printf(" %1d", board_size - i);
    }
    else {
      if (board_size > 10)
 printf("%2d", board_size - i);
      else
 printf("%1d", board_size - i);
    }
    printf("\n");
  }

  fflush(stdout);
  printf("%s\n\n", letterbar);
  fflush(stdout);

}





static void
show_commands(void)
{
  printf("\nCommands:\n");
  printf(" back                Take back your last move\n");
  printf(" boardsize           Set boardsize (on move 1 only)\n");
  printf(" comment             Write a comment to outputfile\n");
  printf(" depth <num>         Set depth for reading\n");
  printf(" display             Display game board\n");
  printf(" exit                Exit GNU Go\n");
  printf(" force <move>        Force a move for current color\n");
  printf(" forward             Go to next node in game tree\n");
  printf(" goto <movenum>      Go to movenum in game tree\n");
  printf(" level <amount>      Playing level (default = 10)\n");
  printf(" handicap <num>      Set fixed handicap (on move 1 only)\n");
  printf(" freehandicap <num>  Place free handicap (on move 1 only)\n");
  printf("                     Omit <num> to place handicap yourself\n");
  printf(" help                Display this help menu\n");
  printf(" helpdebug           Display debug help menu\n");
  printf(" info                Display program settings\n");
  printf(" komi                Set komi (on move 1 only)\n");
  printf(" last                Goto last node in game tree\n");
  printf(" pass                Pass on your move\n");
  printf(" play <num>          Play <num> moves\n");
  printf(" playblack           Play as Black (switch if White)\n");
  printf(" playwhite           Play as White (switch if Black)\n");
  printf(" quit                Exit GNU Go\n");
  printf(" resign              Resign the current game\n");
  printf(" save <file>         Save the current game\n");
  printf(" load <file>         Load a game from file\n");
  printf(" score               Toggle display of score On/Off\n");
  printf(" showboard           Toggle display of board On/Off\n");
  printf(" switch              Switch the color you are playing\n");
  printf(" undo                Take the last move back (same as back)\n");
  printf(" <move>              A move of the format <letter><number>");
  printf("\n");
}

enum commands {INVALID=-1, END, EXIT, QUIT, RESIGN,
        PASS, MOVE, FORCE, SWITCH,
        PLAY, PLAYBLACK, PLAYWHITE,
        SETHANDICAP, SETBOARDSIZE, SETKOMI,
        SETDEPTH,
               INFO, DISPLAY, SHOWBOARD, HELP, UNDO, COMMENT, SCORE,
               CMD_DEAD, CMD_BACK, CMD_FORWARD, CMD_LAST,
               CMD_CAPTURE, CMD_DEFEND,
               CMD_HELPDEBUG, CMD_SHOWAREA, CMD_SHOWMOYO, CMD_SHOWTERRI,
               CMD_GOTO, CMD_SAVE, CMD_LOAD, CMD_SHOWDRAGONS, CMD_LISTDRAGONS,
        SETHURRY, SETLEVEL, NEW, COUNT, FREEHANDICAP
};






static int
get_command(char *command)
{
  char c;
  int d;


  if (!((sscanf(command, "%c%d", &c, &d) != 2)
 || ((c = (__extension__ ({ int __res; if (sizeof ((int) c) > 1) { if (__builtin_constant_p ((int) c)) { int __c = ((int) c); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ((int) c); } else __res = (*__ctype_toupper_loc ())[(int) ((int) c)]; __res; }))) < 'A')
 || ((c = (__extension__ ({ int __res; if (sizeof ((int) c) > 1) { if (__builtin_constant_p ((int) c)) { int __c = ((int) c); __res = __c < -128 || __c > 255 ? __c : (*__ctype_toupper_loc ())[__c]; } else __res = toupper ((int) c); } else __res = (*__ctype_toupper_loc ())[(int) ((int) c)]; __res; }))) > 'Z')
 || (c == 'I')))
    return MOVE;


  if (command[0] == '?')
    return HELP;


  while (command[0] == ' ')
    command++;

  if (!(__extension__ (__builtin_constant_p (9) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (9))) || (__builtin_constant_p ("playblack") && strlen ("playblack") < ((size_t) (9)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("playblack") && (__s1_len = strlen (command), __s2_len = strlen ("playblack"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("playblack") + 1) - (size_t)(const void *)("playblack") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "playblack") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("playblack") && ((size_t)(const void *)(("playblack") + 1) - (size_t)(const void *)("playblack") == 1) ? __builtin_strcmp (command, "playblack") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("playblack"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("playblack") && ((size_t)(const void *)(("playblack") + 1) - (size_t)(const void *)("playblack") == 1) && (__s2_len = strlen ("playblack"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "playblack") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("playblack"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("playblack"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("playblack"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("playblack"))[3]); } } __result; }))) : __builtin_strcmp (command, "playblack")))); }) : strncmp (command, "playblack", 9)))) return PLAYBLACK;
  if (!(__extension__ (__builtin_constant_p (9) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (9))) || (__builtin_constant_p ("playwhite") && strlen ("playwhite") < ((size_t) (9)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("playwhite") && (__s1_len = strlen (command), __s2_len = strlen ("playwhite"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("playwhite") + 1) - (size_t)(const void *)("playwhite") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "playwhite") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("playwhite") && ((size_t)(const void *)(("playwhite") + 1) - (size_t)(const void *)("playwhite") == 1) ? __builtin_strcmp (command, "playwhite") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("playwhite"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("playwhite") && ((size_t)(const void *)(("playwhite") + 1) - (size_t)(const void *)("playwhite") == 1) && (__s2_len = strlen ("playwhite"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "playwhite") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("playwhite"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("playwhite"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("playwhite"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("playwhite"))[3]); } } __result; }))) : __builtin_strcmp (command, "playwhite")))); }) : strncmp (command, "playwhite", 9)))) return PLAYWHITE;
  if (!(__extension__ (__builtin_constant_p (9) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (9))) || (__builtin_constant_p ("showboard") && strlen ("showboard") < ((size_t) (9)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("showboard") && (__s1_len = strlen (command), __s2_len = strlen ("showboard"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("showboard") + 1) - (size_t)(const void *)("showboard") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "showboard") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("showboard") && ((size_t)(const void *)(("showboard") + 1) - (size_t)(const void *)("showboard") == 1) ? __builtin_strcmp (command, "showboard") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("showboard"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("showboard") && ((size_t)(const void *)(("showboard") + 1) - (size_t)(const void *)("showboard") == 1) && (__s2_len = strlen ("showboard"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "showboard") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("showboard"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("showboard"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("showboard"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("showboard"))[3]); } } __result; }))) : __builtin_strcmp (command, "showboard")))); }) : strncmp (command, "showboard", 9)))) return SHOWBOARD;
  if (!(__extension__ (__builtin_constant_p (9) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (9))) || (__builtin_constant_p ("showdragons") && strlen ("showdragons") < ((size_t) (9)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("showdragons") && (__s1_len = strlen (command), __s2_len = strlen ("showdragons"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("showdragons") + 1) - (size_t)(const void *)("showdragons") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "showdragons") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("showdragons") && ((size_t)(const void *)(("showdragons") + 1) - (size_t)(const void *)("showdragons") == 1) ? __builtin_strcmp (command, "showdragons") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("showdragons"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("showdragons") && ((size_t)(const void *)(("showdragons") + 1) - (size_t)(const void *)("showdragons") == 1) && (__s2_len = strlen ("showdragons"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "showdragons") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("showdragons"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("showdragons"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("showdragons"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("showdragons"))[3]); } } __result; }))) : __builtin_strcmp (command, "showdragons")))); }) : strncmp (command, "showdragons", 9)))) return CMD_SHOWDRAGONS;
  if (!(__extension__ (__builtin_constant_p (9) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (9))) || (__builtin_constant_p ("listdragons") && strlen ("listdragons") < ((size_t) (9)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("listdragons") && (__s1_len = strlen (command), __s2_len = strlen ("listdragons"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("listdragons") + 1) - (size_t)(const void *)("listdragons") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "listdragons") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("listdragons") && ((size_t)(const void *)(("listdragons") + 1) - (size_t)(const void *)("listdragons") == 1) ? __builtin_strcmp (command, "listdragons") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("listdragons"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("listdragons") && ((size_t)(const void *)(("listdragons") + 1) - (size_t)(const void *)("listdragons") == 1) && (__s2_len = strlen ("listdragons"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "listdragons") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("listdragons"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("listdragons"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("listdragons"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("listdragons"))[3]); } } __result; }))) : __builtin_strcmp (command, "listdragons")))); }) : strncmp (command, "listdragons", 9)))) return CMD_LISTDRAGONS;
  if (!(__extension__ (__builtin_constant_p (9) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (9))) || (__builtin_constant_p ("boardsize") && strlen ("boardsize") < ((size_t) (9)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("boardsize") && (__s1_len = strlen (command), __s2_len = strlen ("boardsize"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("boardsize") + 1) - (size_t)(const void *)("boardsize") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "boardsize") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("boardsize") && ((size_t)(const void *)(("boardsize") + 1) - (size_t)(const void *)("boardsize") == 1) ? __builtin_strcmp (command, "boardsize") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("boardsize"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("boardsize") && ((size_t)(const void *)(("boardsize") + 1) - (size_t)(const void *)("boardsize") == 1) && (__s2_len = strlen ("boardsize"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "boardsize") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("boardsize"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("boardsize"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("boardsize"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("boardsize"))[3]); } } __result; }))) : __builtin_strcmp (command, "boardsize")))); }) : strncmp (command, "boardsize", 9)))) return SETBOARDSIZE;
  if (!(__extension__ (__builtin_constant_p (9) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (9))) || (__builtin_constant_p ("freehandicap") && strlen ("freehandicap") < ((size_t) (9)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("freehandicap") && (__s1_len = strlen (command), __s2_len = strlen ("freehandicap"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("freehandicap") + 1) - (size_t)(const void *)("freehandicap") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "freehandicap") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("freehandicap") && ((size_t)(const void *)(("freehandicap") + 1) - (size_t)(const void *)("freehandicap") == 1) ? __builtin_strcmp (command, "freehandicap") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("freehandicap"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("freehandicap") && ((size_t)(const void *)(("freehandicap") + 1) - (size_t)(const void *)("freehandicap") == 1) && (__s2_len = strlen ("freehandicap"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "freehandicap") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("freehandicap"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("freehandicap"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("freehandicap"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("freehandicap"))[3]); } } __result; }))) : __builtin_strcmp (command, "freehandicap")))); }) : strncmp (command, "freehandicap", 9)))) return FREEHANDICAP;
  if (!(__extension__ (__builtin_constant_p (5) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (5))) || (__builtin_constant_p ("handicap") && strlen ("handicap") < ((size_t) (5)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("handicap") && (__s1_len = strlen (command), __s2_len = strlen ("handicap"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("handicap") + 1) - (size_t)(const void *)("handicap") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "handicap") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("handicap") && ((size_t)(const void *)(("handicap") + 1) - (size_t)(const void *)("handicap") == 1) ? __builtin_strcmp (command, "handicap") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("handicap"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("handicap") && ((size_t)(const void *)(("handicap") + 1) - (size_t)(const void *)("handicap") == 1) && (__s2_len = strlen ("handicap"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "handicap") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("handicap"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("handicap"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("handicap"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("handicap"))[3]); } } __result; }))) : __builtin_strcmp (command, "handicap")))); }) : strncmp (command, "handicap", 5)))) return SETHANDICAP;
  if (!(__extension__ (__builtin_constant_p (7) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (7))) || (__builtin_constant_p ("display") && strlen ("display") < ((size_t) (7)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("display") && (__s1_len = strlen (command), __s2_len = strlen ("display"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("display") + 1) - (size_t)(const void *)("display") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "display") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("display") && ((size_t)(const void *)(("display") + 1) - (size_t)(const void *)("display") == 1) ? __builtin_strcmp (command, "display") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("display"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("display") && ((size_t)(const void *)(("display") + 1) - (size_t)(const void *)("display") == 1) && (__s2_len = strlen ("display"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "display") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("display"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("display"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("display"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("display"))[3]); } } __result; }))) : __builtin_strcmp (command, "display")))); }) : strncmp (command, "display", 7)))) return DISPLAY;
  if (!(__extension__ (__builtin_constant_p (7) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (7))) || (__builtin_constant_p ("helpdebug") && strlen ("helpdebug") < ((size_t) (7)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("helpdebug") && (__s1_len = strlen (command), __s2_len = strlen ("helpdebug"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("helpdebug") + 1) - (size_t)(const void *)("helpdebug") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "helpdebug") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("helpdebug") && ((size_t)(const void *)(("helpdebug") + 1) - (size_t)(const void *)("helpdebug") == 1) ? __builtin_strcmp (command, "helpdebug") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("helpdebug"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("helpdebug") && ((size_t)(const void *)(("helpdebug") + 1) - (size_t)(const void *)("helpdebug") == 1) && (__s2_len = strlen ("helpdebug"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "helpdebug") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("helpdebug"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("helpdebug"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("helpdebug"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("helpdebug"))[3]); } } __result; }))) : __builtin_strcmp (command, "helpdebug")))); }) : strncmp (command, "helpdebug", 7)))) return CMD_HELPDEBUG;
  if (!(__extension__ (__builtin_constant_p (6) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (6))) || (__builtin_constant_p ("resign") && strlen ("resign") < ((size_t) (6)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("resign") && (__s1_len = strlen (command), __s2_len = strlen ("resign"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("resign") + 1) - (size_t)(const void *)("resign") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "resign") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("resign") && ((size_t)(const void *)(("resign") + 1) - (size_t)(const void *)("resign") == 1) ? __builtin_strcmp (command, "resign") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("resign"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("resign") && ((size_t)(const void *)(("resign") + 1) - (size_t)(const void *)("resign") == 1) && (__s2_len = strlen ("resign"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "resign") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("resign"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("resign"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("resign"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("resign"))[3]); } } __result; }))) : __builtin_strcmp (command, "resign")))); }) : strncmp (command, "resign", 6)))) return RESIGN;
  if (!(__extension__ (__builtin_constant_p (6) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (6))) || (__builtin_constant_p ("showmoyo") && strlen ("showmoyo") < ((size_t) (6)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("showmoyo") && (__s1_len = strlen (command), __s2_len = strlen ("showmoyo"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("showmoyo") + 1) - (size_t)(const void *)("showmoyo") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "showmoyo") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("showmoyo") && ((size_t)(const void *)(("showmoyo") + 1) - (size_t)(const void *)("showmoyo") == 1) ? __builtin_strcmp (command, "showmoyo") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("showmoyo"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("showmoyo") && ((size_t)(const void *)(("showmoyo") + 1) - (size_t)(const void *)("showmoyo") == 1) && (__s2_len = strlen ("showmoyo"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "showmoyo") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("showmoyo"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("showmoyo"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("showmoyo"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("showmoyo"))[3]); } } __result; }))) : __builtin_strcmp (command, "showmoyo")))); }) : strncmp (command, "showmoyo", 6)))) return CMD_SHOWMOYO;
  if (!(__extension__ (__builtin_constant_p (6) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (6))) || (__builtin_constant_p ("showterri") && strlen ("showterri") < ((size_t) (6)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("showterri") && (__s1_len = strlen (command), __s2_len = strlen ("showterri"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("showterri") + 1) - (size_t)(const void *)("showterri") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "showterri") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("showterri") && ((size_t)(const void *)(("showterri") + 1) - (size_t)(const void *)("showterri") == 1) ? __builtin_strcmp (command, "showterri") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("showterri"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("showterri") && ((size_t)(const void *)(("showterri") + 1) - (size_t)(const void *)("showterri") == 1) && (__s2_len = strlen ("showterri"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "showterri") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("showterri"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("showterri"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("showterri"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("showterri"))[3]); } } __result; }))) : __builtin_strcmp (command, "showterri")))); }) : strncmp (command, "showterri", 6)))) return CMD_SHOWTERRI;
  if (!(__extension__ (__builtin_constant_p (6) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (6))) || (__builtin_constant_p ("showarea") && strlen ("showarea") < ((size_t) (6)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("showarea") && (__s1_len = strlen (command), __s2_len = strlen ("showarea"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("showarea") + 1) - (size_t)(const void *)("showarea") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "showarea") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("showarea") && ((size_t)(const void *)(("showarea") + 1) - (size_t)(const void *)("showarea") == 1) ? __builtin_strcmp (command, "showarea") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("showarea"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("showarea") && ((size_t)(const void *)(("showarea") + 1) - (size_t)(const void *)("showarea") == 1) && (__s2_len = strlen ("showarea"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "showarea") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("showarea"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("showarea"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("showarea"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("showarea"))[3]); } } __result; }))) : __builtin_strcmp (command, "showarea")))); }) : strncmp (command, "showarea", 6)))) return CMD_SHOWAREA;
  if (!(__extension__ (__builtin_constant_p (5) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (5))) || (__builtin_constant_p ("depth") && strlen ("depth") < ((size_t) (5)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("depth") && (__s1_len = strlen (command), __s2_len = strlen ("depth"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("depth") + 1) - (size_t)(const void *)("depth") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "depth") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("depth") && ((size_t)(const void *)(("depth") + 1) - (size_t)(const void *)("depth") == 1) ? __builtin_strcmp (command, "depth") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("depth"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("depth") && ((size_t)(const void *)(("depth") + 1) - (size_t)(const void *)("depth") == 1) && (__s2_len = strlen ("depth"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "depth") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("depth"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("depth"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("depth"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("depth"))[3]); } } __result; }))) : __builtin_strcmp (command, "depth")))); }) : strncmp (command, "depth", 5)))) return SETDEPTH;
  if (!(__extension__ (__builtin_constant_p (5) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (5))) || (__builtin_constant_p ("switch") && strlen ("switch") < ((size_t) (5)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("switch") && (__s1_len = strlen (command), __s2_len = strlen ("switch"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("switch") + 1) - (size_t)(const void *)("switch") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "switch") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("switch") && ((size_t)(const void *)(("switch") + 1) - (size_t)(const void *)("switch") == 1) ? __builtin_strcmp (command, "switch") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("switch"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("switch") && ((size_t)(const void *)(("switch") + 1) - (size_t)(const void *)("switch") == 1) && (__s2_len = strlen ("switch"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "switch") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("switch"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("switch"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("switch"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("switch"))[3]); } } __result; }))) : __builtin_strcmp (command, "switch")))); }) : strncmp (command, "switch", 5)))) return SWITCH;
  if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (4))) || (__builtin_constant_p ("komi") && strlen ("komi") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("komi") && (__s1_len = strlen (command), __s2_len = strlen ("komi"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("komi") + 1) - (size_t)(const void *)("komi") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "komi") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("komi") && ((size_t)(const void *)(("komi") + 1) - (size_t)(const void *)("komi") == 1) ? __builtin_strcmp (command, "komi") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("komi"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("komi") && ((size_t)(const void *)(("komi") + 1) - (size_t)(const void *)("komi") == 1) && (__s2_len = strlen ("komi"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "komi") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("komi"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("komi"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("komi"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("komi"))[3]); } } __result; }))) : __builtin_strcmp (command, "komi")))); }) : strncmp (command, "komi", 4)))) return SETKOMI;
  if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (4))) || (__builtin_constant_p ("play") && strlen ("play") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("play") && (__s1_len = strlen (command), __s2_len = strlen ("play"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("play") + 1) - (size_t)(const void *)("play") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "play") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("play") && ((size_t)(const void *)(("play") + 1) - (size_t)(const void *)("play") == 1) ? __builtin_strcmp (command, "play") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("play"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("play") && ((size_t)(const void *)(("play") + 1) - (size_t)(const void *)("play") == 1) && (__s2_len = strlen ("play"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "play") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("play"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("play"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("play"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("play"))[3]); } } __result; }))) : __builtin_strcmp (command, "play")))); }) : strncmp (command, "play", 4)))) return PLAY;
  if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (4))) || (__builtin_constant_p ("info") && strlen ("info") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("info") && (__s1_len = strlen (command), __s2_len = strlen ("info"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("info") + 1) - (size_t)(const void *)("info") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "info") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("info") && ((size_t)(const void *)(("info") + 1) - (size_t)(const void *)("info") == 1) ? __builtin_strcmp (command, "info") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("info"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("info") && ((size_t)(const void *)(("info") + 1) - (size_t)(const void *)("info") == 1) && (__s2_len = strlen ("info"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "info") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("info"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("info"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("info"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("info"))[3]); } } __result; }))) : __builtin_strcmp (command, "info")))); }) : strncmp (command, "info", 4)))) return INFO;
  if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (4))) || (__builtin_constant_p ("force") && strlen ("force") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("force") && (__s1_len = strlen (command), __s2_len = strlen ("force"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("force") + 1) - (size_t)(const void *)("force") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "force") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("force") && ((size_t)(const void *)(("force") + 1) - (size_t)(const void *)("force") == 1) ? __builtin_strcmp (command, "force") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("force"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("force") && ((size_t)(const void *)(("force") + 1) - (size_t)(const void *)("force") == 1) && (__s2_len = strlen ("force"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "force") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("force"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("force"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("force"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("force"))[3]); } } __result; }))) : __builtin_strcmp (command, "force")))); }) : strncmp (command, "force", 4)))) return FORCE;
  if (!(__extension__ (__builtin_constant_p (5) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (5))) || (__builtin_constant_p ("hurry") && strlen ("hurry") < ((size_t) (5)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("hurry") && (__s1_len = strlen (command), __s2_len = strlen ("hurry"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("hurry") + 1) - (size_t)(const void *)("hurry") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "hurry") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("hurry") && ((size_t)(const void *)(("hurry") + 1) - (size_t)(const void *)("hurry") == 1) ? __builtin_strcmp (command, "hurry") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("hurry"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("hurry") && ((size_t)(const void *)(("hurry") + 1) - (size_t)(const void *)("hurry") == 1) && (__s2_len = strlen ("hurry"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "hurry") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("hurry"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("hurry"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("hurry"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("hurry"))[3]); } } __result; }))) : __builtin_strcmp (command, "hurry")))); }) : strncmp (command, "hurry", 5)))) return SETHURRY;
  if (!(__extension__ (__builtin_constant_p (5) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (5))) || (__builtin_constant_p ("level") && strlen ("level") < ((size_t) (5)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("level") && (__s1_len = strlen (command), __s2_len = strlen ("level"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("level") + 1) - (size_t)(const void *)("level") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "level") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("level") && ((size_t)(const void *)(("level") + 1) - (size_t)(const void *)("level") == 1) ? __builtin_strcmp (command, "level") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("level"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("level") && ((size_t)(const void *)(("level") + 1) - (size_t)(const void *)("level") == 1) && (__s2_len = strlen ("level"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "level") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("level"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("level"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("level"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("level"))[3]); } } __result; }))) : __builtin_strcmp (command, "level")))); }) : strncmp (command, "level", 5)))) return SETLEVEL;
  if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (4))) || (__builtin_constant_p ("pass") && strlen ("pass") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("pass") && (__s1_len = strlen (command), __s2_len = strlen ("pass"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("pass") + 1) - (size_t)(const void *)("pass") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "pass") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("pass") && ((size_t)(const void *)(("pass") + 1) - (size_t)(const void *)("pass") == 1) ? __builtin_strcmp (command, "pass") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("pass"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("pass") && ((size_t)(const void *)(("pass") + 1) - (size_t)(const void *)("pass") == 1) && (__s2_len = strlen ("pass"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "pass") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("pass"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("pass"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("pass"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("pass"))[3]); } } __result; }))) : __builtin_strcmp (command, "pass")))); }) : strncmp (command, "pass", 4)))) return PASS;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("save") && strlen ("save") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("save") && (__s1_len = strlen (command), __s2_len = strlen ("save"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("save") + 1) - (size_t)(const void *)("save") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "save") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("save") && ((size_t)(const void *)(("save") + 1) - (size_t)(const void *)("save") == 1) ? __builtin_strcmp (command, "save") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("save"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("save") && ((size_t)(const void *)(("save") + 1) - (size_t)(const void *)("save") == 1) && (__s2_len = strlen ("save"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "save") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("save"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("save"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("save"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("save"))[3]); } } __result; }))) : __builtin_strcmp (command, "save")))); }) : strncmp (command, "save", 3)))) return CMD_SAVE;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("load") && strlen ("load") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("load") && (__s1_len = strlen (command), __s2_len = strlen ("load"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("load") + 1) - (size_t)(const void *)("load") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "load") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("load") && ((size_t)(const void *)(("load") + 1) - (size_t)(const void *)("load") == 1) ? __builtin_strcmp (command, "load") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("load"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("load") && ((size_t)(const void *)(("load") + 1) - (size_t)(const void *)("load") == 1) && (__s2_len = strlen ("load"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "load") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("load"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("load"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("load"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("load"))[3]); } } __result; }))) : __builtin_strcmp (command, "load")))); }) : strncmp (command, "load", 3)))) return CMD_LOAD;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("end") && strlen ("end") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("end") && (__s1_len = strlen (command), __s2_len = strlen ("end"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("end") + 1) - (size_t)(const void *)("end") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "end") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("end") && ((size_t)(const void *)(("end") + 1) - (size_t)(const void *)("end") == 1) ? __builtin_strcmp (command, "end") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("end"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("end") && ((size_t)(const void *)(("end") + 1) - (size_t)(const void *)("end") == 1) && (__s2_len = strlen ("end"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "end") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("end"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("end"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("end"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("end"))[3]); } } __result; }))) : __builtin_strcmp (command, "end")))); }) : strncmp (command, "end", 3)))) return END;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("move") && strlen ("move") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("move") && (__s1_len = strlen (command), __s2_len = strlen ("move"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("move") + 1) - (size_t)(const void *)("move") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "move") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("move") && ((size_t)(const void *)(("move") + 1) - (size_t)(const void *)("move") == 1) ? __builtin_strcmp (command, "move") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("move"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("move") && ((size_t)(const void *)(("move") + 1) - (size_t)(const void *)("move") == 1) && (__s2_len = strlen ("move"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "move") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("move"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("move"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("move"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("move"))[3]); } } __result; }))) : __builtin_strcmp (command, "move")))); }) : strncmp (command, "move", 3)))) return MOVE;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("undo") && strlen ("undo") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("undo") && (__s1_len = strlen (command), __s2_len = strlen ("undo"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "undo") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("undo") && ((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) ? __builtin_strcmp (command, "undo") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("undo"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("undo") && ((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) && (__s2_len = strlen ("undo"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "undo") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("undo"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("undo"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("undo"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("undo"))[3]); } } __result; }))) : __builtin_strcmp (command, "undo")))); }) : strncmp (command, "undo", 3)))) return UNDO;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("comment") && strlen ("comment") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("comment") && (__s1_len = strlen (command), __s2_len = strlen ("comment"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("comment") + 1) - (size_t)(const void *)("comment") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "comment") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("comment") && ((size_t)(const void *)(("comment") + 1) - (size_t)(const void *)("comment") == 1) ? __builtin_strcmp (command, "comment") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("comment"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("comment") && ((size_t)(const void *)(("comment") + 1) - (size_t)(const void *)("comment") == 1) && (__s2_len = strlen ("comment"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "comment") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("comment"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("comment"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("comment"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("comment"))[3]); } } __result; }))) : __builtin_strcmp (command, "comment")))); }) : strncmp (command, "comment", 3)))) return COMMENT;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("score") && strlen ("score") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("score") && (__s1_len = strlen (command), __s2_len = strlen ("score"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("score") + 1) - (size_t)(const void *)("score") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "score") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("score") && ((size_t)(const void *)(("score") + 1) - (size_t)(const void *)("score") == 1) ? __builtin_strcmp (command, "score") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("score"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("score") && ((size_t)(const void *)(("score") + 1) - (size_t)(const void *)("score") == 1) && (__s2_len = strlen ("score"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "score") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("score"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("score"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("score"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("score"))[3]); } } __result; }))) : __builtin_strcmp (command, "score")))); }) : strncmp (command, "score", 3)))) return SCORE;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("dead") && strlen ("dead") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("dead") && (__s1_len = strlen (command), __s2_len = strlen ("dead"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("dead") + 1) - (size_t)(const void *)("dead") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "dead") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("dead") && ((size_t)(const void *)(("dead") + 1) - (size_t)(const void *)("dead") == 1) ? __builtin_strcmp (command, "dead") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("dead"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("dead") && ((size_t)(const void *)(("dead") + 1) - (size_t)(const void *)("dead") == 1) && (__s2_len = strlen ("dead"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "dead") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("dead"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("dead"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("dead"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("dead"))[3]); } } __result; }))) : __builtin_strcmp (command, "dead")))); }) : strncmp (command, "dead", 3)))) return CMD_DEAD;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("capture") && strlen ("capture") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("capture") && (__s1_len = strlen (command), __s2_len = strlen ("capture"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("capture") + 1) - (size_t)(const void *)("capture") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "capture") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("capture") && ((size_t)(const void *)(("capture") + 1) - (size_t)(const void *)("capture") == 1) ? __builtin_strcmp (command, "capture") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("capture"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("capture") && ((size_t)(const void *)(("capture") + 1) - (size_t)(const void *)("capture") == 1) && (__s2_len = strlen ("capture"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "capture") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("capture"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("capture"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("capture"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("capture"))[3]); } } __result; }))) : __builtin_strcmp (command, "capture")))); }) : strncmp (command, "capture", 3)))) return CMD_CAPTURE;
  if (!(__extension__ (__builtin_constant_p (3) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (3))) || (__builtin_constant_p ("defend") && strlen ("defend") < ((size_t) (3)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("defend") && (__s1_len = strlen (command), __s2_len = strlen ("defend"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("defend") + 1) - (size_t)(const void *)("defend") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "defend") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("defend") && ((size_t)(const void *)(("defend") + 1) - (size_t)(const void *)("defend") == 1) ? __builtin_strcmp (command, "defend") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("defend"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("defend") && ((size_t)(const void *)(("defend") + 1) - (size_t)(const void *)("defend") == 1) && (__s2_len = strlen ("defend"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "defend") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("defend"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("defend"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("defend"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("defend"))[3]); } } __result; }))) : __builtin_strcmp (command, "defend")))); }) : strncmp (command, "defend", 3)))) return CMD_DEFEND;
  if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (4))) || (__builtin_constant_p ("exit") && strlen ("exit") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("exit") && (__s1_len = strlen (command), __s2_len = strlen ("exit"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("exit") + 1) - (size_t)(const void *)("exit") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "exit") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("exit") && ((size_t)(const void *)(("exit") + 1) - (size_t)(const void *)("exit") == 1) ? __builtin_strcmp (command, "exit") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("exit"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("exit") && ((size_t)(const void *)(("exit") + 1) - (size_t)(const void *)("exit") == 1) && (__s2_len = strlen ("exit"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "exit") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("exit"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("exit"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("exit"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("exit"))[3]); } } __result; }))) : __builtin_strcmp (command, "exit")))); }) : strncmp (command, "exit", 4)))) return EXIT;
  if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (4))) || (__builtin_constant_p ("quit") && strlen ("quit") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("quit") && (__s1_len = strlen (command), __s2_len = strlen ("quit"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("quit") + 1) - (size_t)(const void *)("quit") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "quit") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("quit") && ((size_t)(const void *)(("quit") + 1) - (size_t)(const void *)("quit") == 1) ? __builtin_strcmp (command, "quit") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("quit"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("quit") && ((size_t)(const void *)(("quit") + 1) - (size_t)(const void *)("quit") == 1) && (__s2_len = strlen ("quit"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "quit") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("quit"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("quit"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("quit"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("quit"))[3]); } } __result; }))) : __builtin_strcmp (command, "quit")))); }) : strncmp (command, "quit", 4)))) return QUIT;
  if (!(__extension__ (__builtin_constant_p (1) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (1))) || (__builtin_constant_p ("help") && strlen ("help") < ((size_t) (1)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("help") && (__s1_len = strlen (command), __s2_len = strlen ("help"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "help") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp (command, "help") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("help"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s2_len = strlen ("help"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "help") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("help"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("help"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("help"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("help"))[3]); } } __result; }))) : __builtin_strcmp (command, "help")))); }) : strncmp (command, "help", 1)))) return HELP;
  if (!(__extension__ (__builtin_constant_p (2) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (2))) || (__builtin_constant_p ("back") && strlen ("back") < ((size_t) (2)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("back") && (__s1_len = strlen (command), __s2_len = strlen ("back"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("back") + 1) - (size_t)(const void *)("back") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "back") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("back") && ((size_t)(const void *)(("back") + 1) - (size_t)(const void *)("back") == 1) ? __builtin_strcmp (command, "back") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("back"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("back") && ((size_t)(const void *)(("back") + 1) - (size_t)(const void *)("back") == 1) && (__s2_len = strlen ("back"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "back") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("back"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("back"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("back"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("back"))[3]); } } __result; }))) : __builtin_strcmp (command, "back")))); }) : strncmp (command, "back", 2)))) return CMD_BACK;
  if (!(__extension__ (__builtin_constant_p (2) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (2))) || (__builtin_constant_p ("forward") && strlen ("forward") < ((size_t) (2)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("forward") && (__s1_len = strlen (command), __s2_len = strlen ("forward"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("forward") + 1) - (size_t)(const void *)("forward") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "forward") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("forward") && ((size_t)(const void *)(("forward") + 1) - (size_t)(const void *)("forward") == 1) ? __builtin_strcmp (command, "forward") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("forward"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("forward") && ((size_t)(const void *)(("forward") + 1) - (size_t)(const void *)("forward") == 1) && (__s2_len = strlen ("forward"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "forward") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("forward"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("forward"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("forward"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("forward"))[3]); } } __result; }))) : __builtin_strcmp (command, "forward")))); }) : strncmp (command, "forward", 2)))) return CMD_FORWARD;
  if (!(__extension__ (__builtin_constant_p (2) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (2))) || (__builtin_constant_p ("last") && strlen ("last") < ((size_t) (2)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("last") && (__s1_len = strlen (command), __s2_len = strlen ("last"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("last") + 1) - (size_t)(const void *)("last") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "last") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("last") && ((size_t)(const void *)(("last") + 1) - (size_t)(const void *)("last") == 1) ? __builtin_strcmp (command, "last") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("last"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("last") && ((size_t)(const void *)(("last") + 1) - (size_t)(const void *)("last") == 1) && (__s2_len = strlen ("last"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "last") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("last"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("last"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("last"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("last"))[3]); } } __result; }))) : __builtin_strcmp (command, "last")))); }) : strncmp (command, "last", 2)))) return CMD_LAST;
  if (!(__extension__ (__builtin_constant_p (2) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (2))) || (__builtin_constant_p ("goto") && strlen ("goto") < ((size_t) (2)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("goto") && (__s1_len = strlen (command), __s2_len = strlen ("goto"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("goto") + 1) - (size_t)(const void *)("goto") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "goto") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("goto") && ((size_t)(const void *)(("goto") + 1) - (size_t)(const void *)("goto") == 1) ? __builtin_strcmp (command, "goto") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("goto"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("goto") && ((size_t)(const void *)(("goto") + 1) - (size_t)(const void *)("goto") == 1) && (__s2_len = strlen ("goto"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "goto") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("goto"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("goto"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("goto"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("goto"))[3]); } } __result; }))) : __builtin_strcmp (command, "goto")))); }) : strncmp (command, "goto", 2)))) return CMD_GOTO;
  if (!(__extension__ (__builtin_constant_p (2) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (2))) || (__builtin_constant_p ("game") && strlen ("game") < ((size_t) (2)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("game") && (__s1_len = strlen (command), __s2_len = strlen ("game"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("game") + 1) - (size_t)(const void *)("game") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "game") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("game") && ((size_t)(const void *)(("game") + 1) - (size_t)(const void *)("game") == 1) ? __builtin_strcmp (command, "game") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("game"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("game") && ((size_t)(const void *)(("game") + 1) - (size_t)(const void *)("game") == 1) && (__s2_len = strlen ("game"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "game") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("game"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("game"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("game"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("game"))[3]); } } __result; }))) : __builtin_strcmp (command, "game")))); }) : strncmp (command, "game", 2)))) return NEW;
  if (!(__extension__ (__builtin_constant_p (2) && ((__builtin_constant_p (command) && strlen (command) < ((size_t) (2))) || (__builtin_constant_p ("count") && strlen ("count") < ((size_t) (2)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (command) && __builtin_constant_p ("count") && (__s1_len = strlen (command), __s2_len = strlen ("count"), (!((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("count") + 1) - (size_t)(const void *)("count") == 1) || __s2_len >= 4)) ? __builtin_strcmp (command, "count") : (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) && (__s1_len = strlen (command), __s1_len < 4) ? (__builtin_constant_p ("count") && ((size_t)(const void *)(("count") + 1) - (size_t)(const void *)("count") == 1) ? __builtin_strcmp (command, "count") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("count"); register int __result = (((__const unsigned char *) (__const char *) (command))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (command))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (command))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("count") && ((size_t)(const void *)(("count") + 1) - (size_t)(const void *)("count") == 1) && (__s2_len = strlen ("count"), __s2_len < 4) ? (__builtin_constant_p (command) && ((size_t)(const void *)((command) + 1) - (size_t)(const void *)(command) == 1) ? __builtin_strcmp (command, "count") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (command); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("count"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("count"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("count"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("count"))[3]); } } __result; }))) : __builtin_strcmp (command, "count")))); }) : strncmp (command, "count", 2)))) return COUNT;


  return INVALID;
}






static void
init_sgf(Gameinfo *ginfo)
{
  if (sgf_initialized)
    return;
  sgf_initialized = 1;

  sgf_write_header(sgftree.root, 1, random_seed, komi, level, chinese_rules);
  sgfOverwritePropertyInt(sgftree.root, "HA", ginfo->handicap);
  if (ginfo->handicap > 0)
    gnugo_recordboard(sgftree.root);
}






static void
computer_move(Gameinfo *gameinfo, int *passes)
{
  int i, j;
  int move_val;

  init_sgf(gameinfo);


  move_val = gnugo_genmove(&i, &j, gameinfo->to_move);
  if (showscore) {
    gnugo_estimate_score(&lower_bound, &upper_bound);
    current_score_estimate = (int) ((lower_bound + upper_bound) / 2.0);
  }

  last_move_i = i;
  last_move_j = j;

  mprintf("%s(%d): %m\n", color_to_string(gameinfo->to_move),
   movenum+1, i, j);
  if (is_pass(((19 + 2) + (i) * (19 + 1) + (j))))
    (*passes)++;
  else
    *passes = 0;

  gnugo_play_move(i, j, gameinfo->to_move);
  sgffile_add_debuginfo(sgftree.lastnode, move_val);
  sgftreeAddPlay(&sgftree, gameinfo->to_move, i, j);
  sgffile_output(&sgftree);

  gameinfo->to_move = (1 +2 -(gameinfo->to_move));
}






static void
do_move(Gameinfo *gameinfo, char *command, int *passes, int force)
{
  int i, j;

  if (!string_to_location(board_size, command, &i, &j)) {
    printf("\nInvalid move: %s\n", command);
    return;
  }

  if (!gnugo_is_legal(i, j, gameinfo->to_move)) {
    printf("\nIllegal move: %s", command);
    return;
  }

  *passes = 0;
  (!(verbose)) ? (void)0 : (void)gprintf("\nyour move: %m\n\n", i, j);
  init_sgf(gameinfo);
  gnugo_play_move(i, j, gameinfo->to_move);
  sgffile_add_debuginfo(sgftree.lastnode, 0);
  sgftreeAddPlay(&sgftree, gameinfo->to_move, i, j);
  sgffile_output(&sgftree);

  last_move_i = i;
  last_move_j = j;

  if (opt_showboard && !emacs) {
    ascii_showboard();
    printf("GNU Go is thinking...\n");
  }
  if (force) {
    gameinfo->computer_player = (1 +2 -(gameinfo->computer_player));
    gameinfo->to_move = (1 +2 -(gameinfo->to_move));
    sgftreeAddComment(&sgftree, "forced");
    return;
  }
  gameinfo->to_move = (1 +2 -(gameinfo->to_move));
  computer_move(gameinfo, passes);
}






static void
do_pass(Gameinfo *gameinfo, int *passes, int force)
{
  (*passes)++;
  init_sgf(gameinfo);
  gnugo_play_move(-1, -1, gameinfo->to_move);
  sgffile_add_debuginfo(sgftree.lastnode, 0);
  sgftreeAddPlay(&sgftree, gameinfo->to_move, -1, -1);
  sgffile_output(&sgftree);

  gameinfo->to_move = (1 +2 -(gameinfo->to_move));
  if (force) {
    gameinfo->computer_player = (1 +2 -(gameinfo->computer_player));
    sgftreeAddComment(&sgftree, "forced");
    return;
  }
  computer_move(gameinfo, passes);
}






void
play_ascii(SGFTree *tree, Gameinfo *gameinfo, char *filename, char *until)
{
  int m, num;
  int sz;
  float fnum;
  int passes = 0;
  int tmp;
  char line[80];
  char *line_ptr = line;
  char *command;
  char *tmpstring;
  int state = 1;

  setbuf(stdout, ((void *)0));

  sgftree = *tree;

  if (filename) {
    gameinfo_load_sgfheader(gameinfo, sgftree.root);
    gameinfo->to_move = gameinfo_play_sgftree(gameinfo, &sgftree, until);
    sgf_initialized = 1;
  }
  else {
    if (sgfGetIntProperty(sgftree.root, "SZ", &sz))
      gnugo_clear_board(sz);
    if (gameinfo->handicap == 0)
      gameinfo->to_move = 2;
    else {
      gameinfo->handicap = gnugo_placehand(gameinfo->handicap);
      gameinfo->to_move = 1;
    }
    sgf_initialized = 0;
  }

  while (state == 1) {

    current_score_estimate = 4711;

    printf("\nBeginning ASCII mode game.\n\n");
    gameinfo_print(gameinfo);


    if (gameinfo->computer_player == gameinfo->to_move)
      computer_move(gameinfo, &passes);


    while (passes < 2) {

      if (opt_showboard)
 ascii_showboard();


      mprintf("%s(%d): ", color_to_string(gameinfo->to_move), movenum + 1);


      line_ptr = line;
      if (!fgets(line, 80, stdin)) {
 printf("\nThanks! for playing GNU Go.\n\n");
 return ;
      }
      while (command = strtok(line_ptr, ";"), line_ptr = 0, command) {


 switch (get_command(command)) {
 case RESIGN:
   printf("\nGNU Go wins by resignation.");
   sgftreeWriteResult(&sgftree,
        gameinfo->to_move == 1 ? -1000.0 : 1000.0,
        1);
          sgffile_output(&sgftree);
 case END:
 case EXIT:
 case QUIT:
   printf("\nThanks! for playing GNU Go.\n\n");
   return ;
   break;
 case HELP:
   show_commands();
   break;
 case CMD_HELPDEBUG:
   printf("capture <pos>    try to capture indicated group\ndead             Toggle display of dead stones\ndefend <pos>     try to defend indicated group\nlistdragons      print dragon info \nshowarea         display area\nshowdragons      display dragons\nshowmoyo         display moyo\nshowterri        display territory\n");
   break;
 case SHOWBOARD:
   opt_showboard = !opt_showboard;
   break;
 case INFO:
   printf("\n");
   gameinfo_print(gameinfo);
   break;
 case SETBOARDSIZE:
   if (sgf_initialized) {
     printf("Boardsize cannot be changed after record is started!\n");
     break;
   }
   command += 10;
   if (sscanf(command, "%d", &num) != 1) {
     printf("\nInvalid command syntax!\n");
     break;
   }
   if (num < 5 || num > 19) {
     printf("\nInvalid board size: %d\n", num);
     break;
   }
   sz = num;

   gnugo_clear_board(sz);

   gameinfo->handicap = gnugo_placehand(gameinfo->handicap);
   sgfOverwritePropertyInt(sgftree.root, "SZ", sz);
   sgfOverwritePropertyInt(sgftree.root, "HA", gameinfo->handicap);
   break;
 case SETHANDICAP:
   if (sgf_initialized) {
     printf("Handicap cannot be changed after game is started!\n");
     break;
   }
   command += 9;
   if (sscanf(command, "%d", &num) != 1) {
     printf("\nInvalid command syntax!\n");
     break;
   }
   if (num < 0 || num > 9) {
     printf("\nInvalid handicap: %d\n", num);
     break;
   }

   gnugo_clear_board(board_size);


   gameinfo->handicap = gnugo_placehand(num);
   printf("\nSet handicap to %d\n", gameinfo->handicap);
          gameinfo->to_move = (gameinfo->handicap ? 1 : 2);
   break;
 case FREEHANDICAP:
   if (sgf_initialized) {
     printf("Handicap cannot be changed after game is started!\n");
     break;
   }
   while (*command && *command != ' ')
     command++;
   ascii_free_handicap(gameinfo, command);
   break;
 case SETKOMI:
   if (sgf_initialized) {
     printf("Komi cannot be modified after game record is started!\n");
     break;
   }
   command += 5;
   if (sscanf(command, "%f", &fnum) != 1) {
     printf("\nInvalid command syntax!\n");
     break;
   }
   komi = fnum;
   printf("\nSet Komi to %.1f\n", komi);
   break;
 case SETDEPTH:
   {
     command += 6;
     if (sscanf(command, "%d", &num) != 1) {
       printf("\nInvalid command syntax!\n");
       break;
     }
     mandated_depth = num;
     printf("\nSet depth to %d\n", mandated_depth);
     break;
   }
 case SETLEVEL:
   {
     command += 6;
     if (sscanf(command, "%d", &num) != 1) {
       printf("\nInvalid command syntax!\n");
       break;
     }
     level = num;
     printf("\nSet level to %d\n", level);
     break;
   }



 case SETHURRY:
   {
     command += 6;
     if (sscanf(command, "%d", &num) != 1) {
       printf("\nInvalid command syntax!\n");
       break;
     }
     level = 10 - num;
     printf("\nSet hurry to %d\n", 10 - level);
     break;
   }
 case DISPLAY:
   if (!opt_showboard)
     ascii_showboard();
   break;
 case FORCE:
   command += 6;
   switch (get_command(command)) {
   case MOVE:
     do_move(gameinfo, command, &passes, 1);
     break;
   case PASS:
     do_pass(gameinfo, &passes, 1);
     break;
   default:
     printf("Illegal forced move: %s %d\n", command,
     get_command(command));
     break;
   }
   break;
 case MOVE:
   do_move(gameinfo, command, &passes, 0);
   break;
 case PASS:
   do_pass(gameinfo, &passes, 0);
   break;
 case PLAY:
   command += 5;
   if (sscanf(command, "%d", &num) != 1) {
     printf("\nInvalid command syntax!\n");
     break;
   }
   if (num >= 0)
     for (m = 0; m < num; m++) {
       gameinfo->computer_player
  = (1 +2 -(gameinfo->computer_player));
       computer_move(gameinfo, &passes);
       if (passes >= 2)
  break;
     }
   else {
     printf("\nInvalid number of moves specified: %d\n", num);
     break;
   }
   break;
 case PLAYBLACK:
   if (gameinfo->computer_player == 1)
     gameinfo->computer_player = 2;
   if (gameinfo->computer_player == gameinfo->to_move)
     computer_move(gameinfo, &passes);
   break;
 case PLAYWHITE:
   if (gameinfo->computer_player == 2)
     gameinfo->computer_player = 1;
   if (gameinfo->computer_player == gameinfo->to_move)
     computer_move(gameinfo, &passes);
   break;
 case SWITCH:
   gameinfo->computer_player = (1 +2 -(gameinfo->computer_player));
   computer_move(gameinfo, &passes);
   break;
 case UNDO:
 case CMD_BACK:
   if (gnugo_undo_move(1)) {
            sgftreeAddComment(&sgftree, "undone");
     sgftreeBack(&sgftree);
     gameinfo->to_move = (1 +2 -(gameinfo->to_move));
   }
   else
     printf("\nCan't undo.\n");
   break;
 case CMD_FORWARD:
         if (sgftreeForward(&sgftree))
           gameinfo->to_move = gnugo_play_sgfnode(sgftree.lastnode,
        gameinfo->to_move);
   else
     printf("\nEnd of game tree.\n");
   break;
 case CMD_LAST:
         while (sgftreeForward(&sgftree))
           gameinfo->to_move = gnugo_play_sgfnode(sgftree.lastnode,
        gameinfo->to_move);
   break;
 case COMMENT:
   printf("\nEnter comment. Press ENTER when ready.\n");
   fgets(line, 80, stdin);
   sgftreeAddComment(&sgftree, line);
   break;
 case SCORE:
   showscore = !showscore;
   if (!showscore)
     current_score_estimate = 4711;
   break;
 case CMD_DEAD:
   showdead = !showdead;
   break;
 case CMD_CAPTURE:
   strtok(command, " ");
   showcapture(strtok(((void *)0), " "));
   break;
 case CMD_DEFEND:
   strtok(command, " ");
   showdefense(strtok(((void *)0), " "));
   break;
 case CMD_SHOWMOYO:
   tmp = printmoyo;
   printmoyo = 0x02;
   examine_position(gameinfo->to_move, 4);
   print_moyo();
   printmoyo = tmp;
   break;
 case CMD_SHOWTERRI:
   tmp = printmoyo;
   printmoyo = 0x01;
   examine_position(gameinfo->to_move, 4);
   print_moyo();
   printmoyo = tmp;
   break;
 case CMD_SHOWAREA:
   tmp = printmoyo;
   printmoyo = 0x04;
   examine_position(gameinfo->to_move, 4);
   print_moyo();
   printmoyo = tmp;
   break;
 case CMD_SHOWDRAGONS:
   examine_position(gameinfo->to_move, 4);
   showboard(1);
   break;
 case CMD_GOTO:
   strtok(command, " ");
   ascii_goto(gameinfo, strtok(((void *)0), " "));
   break;
 case CMD_SAVE:
   strtok(command, " ");
   tmpstring = strtok(((void *)0), " ");
   if (tmpstring) {

     tmpstring[strlen(tmpstring)-1] = 0;

     init_sgf(gameinfo);
     writesgf(sgftree.root, tmpstring);
     printf("You may resume the game");
     printf(" with -l %s --mode ascii\n", tmpstring);
     printf("or load %s\n", tmpstring);
   }
   else
     printf("Please specify filename\n");
   break;
 case CMD_LOAD:
   strtok(command, " ");
   tmpstring = strtok(((void *)0), " ");
   if (tmpstring) {

     tmpstring[strlen(tmpstring)-1] = 0;
     if (!sgftree_readfile(&sgftree, tmpstring)) {
       fprintf(stderr, "Cannot open or parse '%s'\n", tmpstring);
       break;
     }

            sgf_initialized = 1;
            gameinfo_load_sgfheader(gameinfo, sgftree.root);
            gameinfo_play_sgftree(gameinfo, &sgftree, ((void *)0));
     sgfOverwritePropertyInt(sgftree.root, "HA", gameinfo->handicap);
   }
   else
     printf("Please specify a filename\n");
   break;

 case CMD_LISTDRAGONS:
   examine_position(gameinfo->to_move, 4);
   show_dragons();
   break;
 case COUNT:
 case NEW:
 case INVALID:
 default:
   printf("\nInvalid command: %s", command);
   break;
 }
      }
    }



    if (passes >= 2)
      gnugo_who_wins(gameinfo->computer_player, stdout);
    printf("\nIf you disagree, we may count the game together.\n");
    printf("You may optionally save the game as an SGF file.\n");

    sgftreeWriteResult(&sgftree, estimate_score(((void *)0), ((void *)0)), 1);

    state = 0;
    while (state == 0) {
      printf("\n");
      printf("Type \"save <filename>\" to save,\n");
      printf("     \"count\" to recount,\n");
      printf("     \"quit\" to quit\n");
      printf(" or  \"game\" to play again\n");
      line_ptr = line;
      if (!fgets(line, 80, stdin))
 break;
      command = strtok(line_ptr, "");
      switch (get_command(command)) {
      case CMD_SAVE:
 strtok(command, " ");
 tmpstring = strtok(((void *)0), " ");
 if (tmpstring) {

   tmpstring[strlen(tmpstring)-1] = 0;
          init_sgf(gameinfo);
   writesgf(sgftree.root, tmpstring);
 }
 else
   printf("Please specify filename\n");
 break;

      case NEW:
 state = 1;
 break;

      case COUNT:
 endgame(gameinfo);
 break;

      case QUIT:
 state = 2;
 break;

      default:
 state = 0;
      }
    }
    sgffile_output(&sgftree);
    passes = 0;


    update_random_seed();


    sgfFreeNode(sgftree.root);
    sgftree_clear(&sgftree);
    sgftreeCreateHeaderNode(&sgftree, board_size, komi);
    sgf_initialized = 0;

    gameinfo_clear(gameinfo, board_size, komi);
  }
  printf("\nThanks for playing GNU Go.\n\n");
}

void
play_ascii_emacs(SGFTree *tree, Gameinfo *gameinfo,
   char *filename, char *until)
{
  emacs = 1;
  play_ascii(tree, gameinfo, filename, until);
}






static void
endgame(Gameinfo *gameinfo)
{
  char line[12];
  int done = 0;
  int i, j;
  int xyzzy = 1;

  printf("\nGame over. Let's count!.\n");
  showdead = 1;
  ascii_showboard();
  while (!done) {
    printf("Dead stones are marked with small letters (x,o).\n");
    printf("\nIf you don't agree, enter the location of a group\n");
    printf("to toggle its state or \"done\".\n");

    if (!fgets(line, 12, stdin))
      return;

    for (i = 0; i < 12; i++)
      line[i] = (((*__ctype_b_loc ())[(int) (((int) line[i]))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ((int) line[i]) > 1) { if (__builtin_constant_p ((int) line[i])) { int __c = ((int) line[i]); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ((int) line[i]); } else __res = (*__ctype_tolower_loc ())[(int) ((int) line[i])]; __res; })) : line[i]);
    if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (4))) || (__builtin_constant_p ("done") && strlen ("done") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("done") && (__s1_len = strlen (line), __s2_len = strlen ("done"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("done") + 1) - (size_t)(const void *)("done") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "done") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("done") && ((size_t)(const void *)(("done") + 1) - (size_t)(const void *)("done") == 1) ? __builtin_strcmp (line, "done") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("done"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("done") && ((size_t)(const void *)(("done") + 1) - (size_t)(const void *)("done") == 1) && (__s2_len = strlen ("done"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "done") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("done"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("done"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("done"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("done"))[3]); } } __result; }))) : __builtin_strcmp (line, "done")))); }) : strncmp (line, "done", 4))))
      done = 1;
    else if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (4))) || (__builtin_constant_p ("quit") && strlen ("quit") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("quit") && (__s1_len = strlen (line), __s2_len = strlen ("quit"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("quit") + 1) - (size_t)(const void *)("quit") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "quit") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("quit") && ((size_t)(const void *)(("quit") + 1) - (size_t)(const void *)("quit") == 1) ? __builtin_strcmp (line, "quit") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("quit"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("quit") && ((size_t)(const void *)(("quit") + 1) - (size_t)(const void *)("quit") == 1) && (__s2_len = strlen ("quit"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "quit") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("quit"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("quit"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("quit"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("quit"))[3]); } } __result; }))) : __builtin_strcmp (line, "quit")))); }) : strncmp (line, "quit", 4))))
      return;
    else if (!(__extension__ (__builtin_constant_p (5) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (5))) || (__builtin_constant_p ("xyzzy") && strlen ("xyzzy") < ((size_t) (5)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("xyzzy") && (__s1_len = strlen (line), __s2_len = strlen ("xyzzy"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("xyzzy") + 1) - (size_t)(const void *)("xyzzy") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "xyzzy") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("xyzzy") && ((size_t)(const void *)(("xyzzy") + 1) - (size_t)(const void *)("xyzzy") == 1) ? __builtin_strcmp (line, "xyzzy") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("xyzzy"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("xyzzy") && ((size_t)(const void *)(("xyzzy") + 1) - (size_t)(const void *)("xyzzy") == 1) && (__s2_len = strlen ("xyzzy"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "xyzzy") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("xyzzy"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("xyzzy"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("xyzzy"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("xyzzy"))[3]); } } __result; }))) : __builtin_strcmp (line, "xyzzy")))); }) : strncmp (line, "xyzzy", 5)))) {
      if (xyzzy) {
 printf("\nYou are in a debris room filled with stuff washed in from the\n");
 printf("surface.  A low wide passage with cobbles becomes plugged\n");
 printf("with mud and debris here, but an awkward canyon leads\n");
 printf("upward and west.  A note on the wall says:\n");
 printf("   Magic Word \"XYZZY\"\n\n");
 xyzzy = 0;
      }
      else {
 printf("You are inside a building, a well house for a large spring.\n\n");
 xyzzy = 1;
      }
    }
    else if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (4))) || (__builtin_constant_p ("help") && strlen ("help") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("help") && (__s1_len = strlen (line), __s2_len = strlen ("help"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "help") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) ? __builtin_strcmp (line, "help") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("help"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("help") && ((size_t)(const void *)(("help") + 1) - (size_t)(const void *)("help") == 1) && (__s2_len = strlen ("help"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "help") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("help"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("help"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("help"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("help"))[3]); } } __result; }))) : __builtin_strcmp (line, "help")))); }) : strncmp (line, "help", 4)))) {
      printf("\nIf there are dead stones on the board I will remove them.\n");
      printf("You must tell me where they are. Type the coordinates of a\n");
      printf("dead group, or type \"done\"\n");
    }
    else if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (4))) || (__builtin_constant_p ("undo") && strlen ("undo") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("undo") && (__s1_len = strlen (line), __s2_len = strlen ("undo"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "undo") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("undo") && ((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) ? __builtin_strcmp (line, "undo") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("undo"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("undo") && ((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) && (__s2_len = strlen ("undo"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "undo") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("undo"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("undo"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("undo"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("undo"))[3]); } } __result; }))) : __builtin_strcmp (line, "undo")))); }) : strncmp (line, "undo", 4)))) {
      printf("UNDO not allowed anymore. The status of the stones now\n");
      printf("toggles after entering the location of it.\n");
      ascii_showboard();
    }
    else {
      if (!string_to_location(board_size, line, &i, &j)
   || board[((19 + 2) + (i) * (19 + 1) + (j))] == 0)
 printf("\ninvalid!\n");
      else {
 int status = dragon_status(((19 + 2) + (i) * (19 + 1) + (j)));
 status = (status == 0) ? 1 : 0;
 change_dragon_status(((19 + 2) + (i) * (19 + 1) + (j)), status);
 ascii_showboard();
      }
    }
  }
  gnugo_who_wins(gameinfo->computer_player, stdout);
}


static void
showcapture(char *line)
{
  int i, j, x, y;
  if (line)
    if (!string_to_location(board_size, line, &i, &j)
 || board[((19 + 2) + (i) * (19 + 1) + (j))] == 0) {
      printf("\ninvalid point!\n");
      return;
    }

  if (gnugo_attack(i, j, &x, &y))
    mprintf("\nSuccessfull attack of %m at %m\n", i, j, x, y);
  else
    mprintf("\n%m cannot be attacked\n", i, j);
}


static void
showdefense(char *line)
{
  int i, j, x, y;
  if (line)
    if (!string_to_location(board_size, line, &i, &j)
 || board[((19 + 2) + (i) * (19 + 1) + (j))] == 0) {
      printf("\ninvalid point!\n");
      return;
    }

    if (gnugo_attack(i, j, &x, &y)) {
      if (gnugo_find_defense(i, j, &x, &y))
        mprintf("\nSuccessfull defense of %m at %m\n", i, j, x, y);
      else
        mprintf("\n%m cannot be defended\n", i, j);
    }
    else
      mprintf("\nThere is no need to defend %m\n", i, j);
}


static void
ascii_goto(Gameinfo *gameinfo, char *line)
{
  const char *movenumber = line;

  if (!line)
    return;

  if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (4))) || (__builtin_constant_p ("last") && strlen ("last") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("last") && (__s1_len = strlen (line), __s2_len = strlen ("last"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("last") + 1) - (size_t)(const void *)("last") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "last") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("last") && ((size_t)(const void *)(("last") + 1) - (size_t)(const void *)("last") == 1) ? __builtin_strcmp (line, "last") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("last"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("last") && ((size_t)(const void *)(("last") + 1) - (size_t)(const void *)("last") == 1) && (__s2_len = strlen ("last"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "last") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("last"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("last"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("last"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("last"))[3]); } } __result; }))) : __builtin_strcmp (line, "last")))); }) : strncmp (line, "last", 4))))
    movenumber = "9999";
  else if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (4))) || (__builtin_constant_p ("first") && strlen ("first") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("first") && (__s1_len = strlen (line), __s2_len = strlen ("first"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("first") + 1) - (size_t)(const void *)("first") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "first") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("first") && ((size_t)(const void *)(("first") + 1) - (size_t)(const void *)("first") == 1) ? __builtin_strcmp (line, "first") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("first"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("first") && ((size_t)(const void *)(("first") + 1) - (size_t)(const void *)("first") == 1) && (__s2_len = strlen ("first"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "first") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("first"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("first"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("first"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("first"))[3]); } } __result; }))) : __builtin_strcmp (line, "first")))); }) : strncmp (line, "first", 4))))
    movenumber = "1";

  printf("goto %s\n", movenumber);
  gameinfo_play_sgftree(gameinfo, &sgftree, movenumber);
}


static void
ascii_free_handicap(Gameinfo *gameinfo, char *handicap)
{
  int handi;
  int i;
  char line[80];
  int stones[19*19];
  int x, y, pos;

  if (sscanf(handicap, "%d", &handi) == 1) {

    if (handi < 0 || handi == 1) {
      printf("\nInvalid command syntax!\n");
      return;
    }

    gnugo_clear_board(board_size);
    handi = place_free_handicap(handi);
    printf("\nPlaced %d stones of free handicap.\n", handi);
  }
  else {
    gnugo_clear_board(board_size);
    handi = 0;

    while (1) {
      ascii_showboard();
      printf("\nType in coordinates of next handicap stone, or one of the following commands:\n");
      printf("  undo        take back the last stone placed\n");
      printf("  clear       remove all the stones placed so far\n");
      printf("  done        finish placing handicap\n\n");
      printf("You have placed %d handicap stone(s) so far.\n\n", handi);

      if (!fgets(line, 80, stdin))
        return;
      for (i = 0; i < 80; i++)
        line[i] = (((*__ctype_b_loc ())[(int) (((int) line[i]))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ((int) line[i]) > 1) { if (__builtin_constant_p ((int) line[i])) { int __c = ((int) line[i]); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ((int) line[i]); } else __res = (*__ctype_tolower_loc ())[(int) ((int) line[i])]; __res; })) : line[i]);

      if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (4))) || (__builtin_constant_p ("undo") && strlen ("undo") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("undo") && (__s1_len = strlen (line), __s2_len = strlen ("undo"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "undo") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("undo") && ((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) ? __builtin_strcmp (line, "undo") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("undo"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("undo") && ((size_t)(const void *)(("undo") + 1) - (size_t)(const void *)("undo") == 1) && (__s2_len = strlen ("undo"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "undo") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("undo"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("undo"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("undo"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("undo"))[3]); } } __result; }))) : __builtin_strcmp (line, "undo")))); }) : strncmp (line, "undo", 4)))) {
        if (!handi)
   printf("\nNothing to undo.\n");
 else {
   remove_stone(stones[--handi]);
   gprintf("\nRemoved the stone at %m.\n", ((stones[handi]) / (19 + 1) - 1),
    ((stones[handi]) % (19 + 1) - 1));
 }
      }
      else if (!(__extension__ (__builtin_constant_p (5) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (5))) || (__builtin_constant_p ("clear") && strlen ("clear") < ((size_t) (5)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("clear") && (__s1_len = strlen (line), __s2_len = strlen ("clear"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("clear") + 1) - (size_t)(const void *)("clear") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "clear") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("clear") && ((size_t)(const void *)(("clear") + 1) - (size_t)(const void *)("clear") == 1) ? __builtin_strcmp (line, "clear") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("clear"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("clear") && ((size_t)(const void *)(("clear") + 1) - (size_t)(const void *)("clear") == 1) && (__s2_len = strlen ("clear"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "clear") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("clear"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("clear"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("clear"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("clear"))[3]); } } __result; }))) : __builtin_strcmp (line, "clear")))); }) : strncmp (line, "clear", 5)))) {
        gnugo_clear_board(board_size);
        handi = 0;
      }
      else if (!(__extension__ (__builtin_constant_p (4) && ((__builtin_constant_p (line) && strlen (line) < ((size_t) (4))) || (__builtin_constant_p ("done") && strlen ("done") < ((size_t) (4)))) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (line) && __builtin_constant_p ("done") && (__s1_len = strlen (line), __s2_len = strlen ("done"), (!((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("done") + 1) - (size_t)(const void *)("done") == 1) || __s2_len >= 4)) ? __builtin_strcmp (line, "done") : (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) && (__s1_len = strlen (line), __s1_len < 4) ? (__builtin_constant_p ("done") && ((size_t)(const void *)(("done") + 1) - (size_t)(const void *)("done") == 1) ? __builtin_strcmp (line, "done") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("done"); register int __result = (((__const unsigned char *) (__const char *) (line))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (line))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (line))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("done") && ((size_t)(const void *)(("done") + 1) - (size_t)(const void *)("done") == 1) && (__s2_len = strlen ("done"), __s2_len < 4) ? (__builtin_constant_p (line) && ((size_t)(const void *)((line) + 1) - (size_t)(const void *)(line) == 1) ? __builtin_strcmp (line, "done") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (line); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("done"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("done"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("done"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("done"))[3]); } } __result; }))) : __builtin_strcmp (line, "done")))); }) : strncmp (line, "done", 4)))) {
 if (handi == 1)
   printf ("\nHandicap cannot be one stone. Either add "
    "some more, or delete the only stone.\n");
 else
   break;
      }
      else if (string_to_location(board_size, line, &x, &y)) {
 pos = ((19 + 2) + (x) * (19 + 1) + (y));
 if (board[pos] != 0)
   printf("\nThere's already a stone there.\n");
 else {
   add_stone(pos, 2);
   stones[handi++] = pos;
 }
      }
      else
 printf("\nInvalid command: %s", line);
    }
  }
  gameinfo->handicap = handi;
  gameinfo->to_move = (handi ? 1 : 2);
}


More information about the Gcc-patches mailing list