Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / sys / net / i4b / driver / i4b_tel.c
1 /*
2  * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23  * SUCH DAMAGE.
24  *
25  *---------------------------------------------------------------------------
26  *
27  *      i4b_tel.c - device driver for ISDN telephony
28  *      --------------------------------------------
29  *
30  * $FreeBSD: src/sys/i4b/driver/i4b_tel.c,v 1.10.2.4 2001/12/16 15:12:57 hm Exp $
31  * $DragonFly: src/sys/net/i4b/driver/i4b_tel.c,v 1.2 2003/06/17 04:28:39 dillon Exp $
32  *
33  *      last edit-date: [Sat Aug 11 18:07:05 2001]
34  *
35  *---------------------------------------------------------------------------*/
36
37 #include "i4btel.h"
38
39 #if NI4BTEL > 0
40
41 #undef I4BTELDEBUG
42
43 #include <sys/param.h>
44 #include <sys/systm.h>
45
46 #include <sys/ioccom.h>
47 #include <sys/poll.h>
48
49 #include <sys/conf.h>
50 #include <sys/uio.h>
51 #include <sys/kernel.h>
52 #include <sys/mbuf.h>
53 #include <sys/socket.h>
54 #include <net/if.h>
55 #include <sys/tty.h>
56
57 #ifdef DEVFS
58 #include <sys/devfsext.h>
59 #endif
60
61 #include <machine/i4b_ioctl.h>
62 #include <machine/i4b_tel_ioctl.h>
63 #include <machine/i4b_debug.h>
64
65 #include <i4b/include/i4b_global.h>
66 #include <i4b/include/i4b_mbuf.h>
67 #include <i4b/include/i4b_l3l4.h>
68
69 #include <i4b/layer4/i4b_l4.h>
70
71 /* minor number: lower 6 bits = unit number */
72
73 #define UNITBITS        6
74 #define UNITMASK        0x3f
75 #define UNIT(n)         (minor(n) & UNITMASK)
76
77 /* minor number: upper 2 bits = function number */
78
79 #define FUNCMASK        0x03
80 #define FUNC(n)         (((minor(n)) >> UNITBITS) & FUNCMASK)
81
82 #define FUNCTEL         0       /* 0 = normal i4btel device     */
83 #define FUNCDIAL        1       /* 1 = i4bteld dialout device   */
84
85 #define NOFUNCS         2       /* number of device classes     */
86
87 typedef struct {
88
89         /* used only in func = FUNCTEL */
90
91         drvr_link_t             drvr_linktab;   /* driver linktab */
92         isdn_link_t             *isdn_linktab;  /* isdn linktab */
93         int                     audiofmt;       /* audio format conversion */
94         u_char                  *rcvttab;       /* conversion table on read */
95         u_char                  *wcvttab;       /* conversion table on write */
96         call_desc_t             *cdp;           /* call descriptor pointer */
97
98         /* used only in func = FUNCDIAL */
99
100         char                    result;         /* result code for dial dev */  
101
102         /* used in func = FUNCDIAL and func = FUNCTEL*/
103         
104         int                     devstate;       /* state of this unit   */
105 #define ST_IDLE         0x00            /* idle */
106 #define ST_CONNECTED    0x01            /* isdn connected state */
107 #define ST_ISOPEN       0x02            /* userland opened */
108 #define ST_RDWAITDATA   0x04            /* userland read waiting */
109 #define ST_WRWAITEMPTY  0x08            /* userland write waiting */
110 #define ST_TONE         0x10            /* tone generator */
111
112         struct selinfo          selp;           /* select / poll */
113
114         struct i4b_tel_tones    tones;
115         int                     toneidx;
116         int                     toneomega;
117         int                     tonefreq;
118
119 } tel_sc_t;
120
121 static tel_sc_t tel_sc[NI4BTEL][NOFUNCS];
122         
123 /* forward decl */
124
125 static void tel_rx_data_rdy(int unit);
126 static void tel_tx_queue_empty(int unit);
127 static void tel_init_linktab(int unit);
128 static void tel_connect(int unit, void *cdp);
129 static void tel_disconnect(int unit, void *cdp);
130 static void tel_tone(tel_sc_t *sc);
131
132 /* audio format conversion tables */
133 static unsigned char a2u_tab[];
134 static unsigned char u2a_tab[];
135 static unsigned char bitreverse[];
136 static u_char sinetab[];
137
138 #define PDEVSTATIC      static
139
140 PDEVSTATIC d_open_t     i4btelopen;
141 PDEVSTATIC d_close_t    i4btelclose;
142 PDEVSTATIC d_read_t     i4btelread;
143 PDEVSTATIC d_read_t     i4btelwrite;
144 PDEVSTATIC d_ioctl_t    i4btelioctl;
145
146 #ifdef OS_USES_POLL
147 PDEVSTATIC d_poll_t i4btelpoll;
148 #define POLLFIELD i4btelpoll
149 #else
150 PDEVSTATIC d_select_t i4btelsel;
151 #define POLLFIELD i4btelsel
152 #endif
153
154 #define CDEV_MAJOR 56
155
156 static struct cdevsw i4btel_cdevsw = {
157         /* open */      i4btelopen,
158         /* close */     i4btelclose,
159         /* read */      i4btelread,
160         /* write */     i4btelwrite,
161         /* ioctl */     i4btelioctl,
162         /* poll */      POLLFIELD,
163         /* mmap */      nommap,
164         /* strategy */  nostrategy,
165         /* name */      "i4btel",
166         /* maj */       CDEV_MAJOR,
167         /* dump */      nodump,
168         /* psize */     nopsize,
169         /* flags */     0,
170         /* bmaj */      -1
171 };
172
173 PDEVSTATIC void i4btelinit(void *unused);
174 PDEVSTATIC void i4btelattach(void *);
175
176 PSEUDO_SET(i4btelattach, i4b_tel);
177
178 /*===========================================================================*
179  *                      DEVICE DRIVER ROUTINES
180  *===========================================================================*/
181
182 /*---------------------------------------------------------------------------*
183  *      initialization at kernel load time
184  *---------------------------------------------------------------------------*/
185 PDEVSTATIC void
186 i4btelinit(void *unused)
187 {
188         cdevsw_add(&i4btel_cdevsw);
189 }
190
191 SYSINIT(i4bteldev, SI_SUB_DRIVERS,
192         SI_ORDER_MIDDLE+CDEV_MAJOR, &i4btelinit, NULL);
193
194 /*---------------------------------------------------------------------------*
195  *      interface attach routine
196  *---------------------------------------------------------------------------*/
197 PDEVSTATIC void
198 i4btelattach(void *dummy)
199 {
200         int i, j;
201
202         printf("i4btel: %d ISDN telephony interface device(s) attached\n", NI4BTEL);
203         
204         for(i=0; i < NI4BTEL; i++)
205         {
206                 for(j=0; j < NOFUNCS; j++)
207                 {
208                         tel_sc[i][j].devstate = ST_IDLE;
209                         tel_sc[i][j].audiofmt = CVT_NONE;
210                         tel_sc[i][j].rcvttab = 0;
211                         tel_sc[i][j].wcvttab = 0;
212                         tel_sc[i][j].result = 0;
213
214                         switch(j)
215                         {
216                                 case FUNCTEL:   /* normal i4btel device */
217                                         make_dev(&i4btel_cdevsw, i,
218                                                 UID_ROOT, GID_WHEEL,
219                                                 0600, "i4btel%d", i);
220                                         break;
221                                 
222                                 case FUNCDIAL:  /* i4bteld dialout device */
223                                         make_dev(&i4btel_cdevsw, i+(1<<UNITBITS),
224                                                 UID_ROOT, GID_WHEEL,
225                                                 0600, "i4bteld%d", i);
226                                         break;
227                         }
228                 }
229                 tel_init_linktab(i);            
230         }
231 }
232
233 /*---------------------------------------------------------------------------*
234  *      open tel device
235  *---------------------------------------------------------------------------*/
236 PDEVSTATIC int
237 i4btelopen(dev_t dev, int flag, int fmt, struct proc *p)
238 {
239         int unit = UNIT(dev);
240         int func = FUNC(dev);
241         
242         tel_sc_t *sc;
243         
244         if(unit >= NI4BTEL)
245                 return(ENXIO);
246
247         sc = &tel_sc[unit][func];               
248
249         if(sc->devstate & ST_ISOPEN)
250                 return(EBUSY);
251
252         sc->devstate |= ST_ISOPEN;              
253
254         if(func == FUNCDIAL)
255         {
256                 sc->result = 0;
257         }
258         
259         return(0);
260 }
261
262 /*---------------------------------------------------------------------------*
263  *      close tel device
264  *---------------------------------------------------------------------------*/
265 PDEVSTATIC int
266 i4btelclose(dev_t dev, int flag, int fmt, struct proc *p)
267 {
268         int unit = UNIT(dev);
269         int func = FUNC(dev);
270         tel_sc_t *sc;
271         int error = 0;
272         int x;
273         
274         if(unit > NI4BTEL)
275                 return(ENXIO);
276
277         sc = &tel_sc[unit][func];               
278
279         x = splimp();
280         sc->devstate &= ~ST_TONE;               
281
282         if((func == FUNCTEL) &&
283            (sc->isdn_linktab != NULL && sc->isdn_linktab->tx_queue != NULL))
284         {
285                 while(!(IF_QEMPTY(sc->isdn_linktab->tx_queue)))
286                 {
287                         sc->devstate |= ST_WRWAITEMPTY;
288         
289                         if((error = tsleep((caddr_t) &sc->isdn_linktab->tx_queue,
290                                         TTIPRI | PCATCH, "wtcl", 0)) != 0)
291                         {
292                                 break;
293                         }
294                 }
295                 sc->devstate &= ~ST_WRWAITEMPTY;                
296         }
297
298         sc->devstate &= ~ST_ISOPEN;             
299         splx(x);
300         wakeup((caddr_t) &sc->tones);
301
302         return(error);
303 }
304
305 /*---------------------------------------------------------------------------*
306  *      i4btelioctl - device driver ioctl routine
307  *---------------------------------------------------------------------------*/
308 PDEVSTATIC int
309 i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
310 {
311         int unit = UNIT(dev);
312         int func = FUNC(dev);
313         int error = 0;
314         struct mbuf *m;
315         int s;
316
317         tel_sc_t *sc = &tel_sc[unit][func];
318
319         if(func == FUNCTEL)
320         {
321                 switch(cmd)
322                 {
323                         case I4B_TEL_GETAUDIOFMT:
324                                 *(int *)data = sc->audiofmt;
325                                 break;
326                         
327                         case I4B_TEL_SETAUDIOFMT:
328                                 switch (*(int *)data)
329                                 {
330                                         case CVT_NONE:
331                                                 sc->rcvttab = 0;
332                                                 sc->wcvttab = 0;
333                                                 break;
334                                         case CVT_ALAW2ULAW:
335                                                 /* ISDN: a-law */
336                                                 /* user: u-law */ 
337                                                 sc->rcvttab = a2u_tab;
338                                                 sc->wcvttab = u2a_tab;
339                                                 break;
340                                         case CVT_ULAW2ALAW:
341                                                 /* ISDN: u-law */
342                                                 /* user: a-law */ 
343                                                 sc->rcvttab = u2a_tab;
344                                                 sc->wcvttab = a2u_tab;
345                                                 break;
346                                         default:
347                                                 error = ENODEV;
348                                                 break;
349                                 }
350                                 if(error == 0)
351                                         sc->audiofmt = *(int *)data;
352                                 break;
353         
354                         case I4B_TEL_EMPTYINPUTQUEUE:
355                                 s = splimp();
356                                 while((sc->devstate & ST_CONNECTED)     &&
357                                         (sc->devstate & ST_ISOPEN)      &&
358                                         !IF_QEMPTY(sc->isdn_linktab->rx_queue))
359                                 {
360                                         IF_DEQUEUE(sc->isdn_linktab->rx_queue, m);
361                                         if(m)
362                                                 i4b_Bfreembuf(m);
363                                 }
364                                 splx(s);
365                                 break;
366
367                         case I4B_TEL_VR_REQ:
368                         {
369                                 msg_vr_req_t *mvr;
370
371                                 mvr = (msg_vr_req_t *)data;
372
373                                 mvr->version = VERSION;
374                                 mvr->release = REL;
375                                 mvr->step = STEP;                       
376                                 break;
377                         }
378                         case I4B_TEL_TONES:
379                         {
380                                 struct i4b_tel_tones *tt;
381
382                                 tt = (struct i4b_tel_tones *)data;
383                                 s = splimp();
384                                 while ((sc->devstate & ST_TONE) && 
385                                     sc->tones.duration[sc->toneidx] != 0) {
386                                         if((error = tsleep((caddr_t) &sc->tones,
387                                             TTIPRI | PCATCH, "rtone", 0 )) != 0) {
388                                                 splx(s);
389                                                 return(error);
390                                         }
391                                 } 
392                                 if(!(sc->devstate & ST_ISOPEN)) {
393                                         splx(s);
394                                         return (EIO);
395                                 }
396                                 if(!(sc->devstate & ST_CONNECTED)) {
397                                         splx(s);
398                                         return (EIO);
399                                 }
400
401                                 sc->tones = *tt;
402                                 sc->toneidx = 0;
403                                 sc->tonefreq = tt->frequency[0];
404                                 sc->devstate |= ST_TONE;
405                                 splx(s);
406                                 tel_tone(sc);
407                                 break;
408                         }
409         
410                         default:
411                                 error = ENOTTY;
412                                 break;
413                 }
414         }
415         else if(func == FUNCDIAL)
416         {
417                 switch(cmd)
418                 {
419                         default:
420                                 error = ENOTTY;
421                                 break;
422                 }
423         }               
424         return(error);
425 }
426
427 /*---------------------------------------------------------------------------*
428  *      read from tel device
429  *---------------------------------------------------------------------------*/
430 PDEVSTATIC int
431 i4btelread(dev_t dev, struct uio *uio, int ioflag)
432 {
433         int unit = UNIT(dev);
434         int func = FUNC(dev);
435
436         struct mbuf *m;
437         int s;
438         int error = 0;
439
440         tel_sc_t *sc = &tel_sc[unit][func];
441         
442         if(!(sc->devstate & ST_ISOPEN))
443                 return(EIO);
444
445         if(func == FUNCTEL)
446         {
447                 s = splimp();
448                 IF_LOCK(sc->isdn_linktab->rx_queue);
449
450                 while((sc->devstate & ST_ISOPEN)        &&
451                       (sc->devstate & ST_CONNECTED)     &&
452                       IF_QEMPTY(sc->isdn_linktab->rx_queue))            
453                 {
454                         sc->devstate |= ST_RDWAITDATA;
455
456                         NDBGL4(L4_TELDBG, "i4btel%d, queue empty!", unit);
457
458 #if defined (__FreeBSD__) && __FreeBSD__ > 4
459                         if((error = msleep((caddr_t) &sc->isdn_linktab->rx_queue,
460                                         &sc->isdn_linktab->rx_queue->ifq_mtx,
461                                         TTIPRI | PCATCH,
462                                         "rtel", 0 )) != 0)
463 #else
464                         if((error = tsleep((caddr_t) &sc->isdn_linktab->rx_queue,
465                                                 TTIPRI | PCATCH,
466                                                 "rtel", 0 )) != 0)
467 #endif                                          
468                         {
469                                 sc->devstate &= ~ST_RDWAITDATA;
470                                 IF_UNLOCK(sc->isdn_linktab->rx_queue);
471                                 splx(s);
472                                 return(error);
473                         }
474                 }
475         
476                 if(!(sc->devstate & ST_ISOPEN))
477                 {
478                         IF_UNLOCK(sc->isdn_linktab->rx_queue);
479                         splx(s);
480                         return(EIO);
481                 }
482         
483                 if(!(sc->devstate & ST_CONNECTED))
484                 {
485                         IF_UNLOCK(sc->isdn_linktab->rx_queue);
486                         splx(s);
487                         return(EIO);
488                 }
489                 
490         
491                 _IF_DEQUEUE(sc->isdn_linktab->rx_queue, m);
492                 IF_UNLOCK(sc->isdn_linktab->rx_queue);
493                 
494                 if(m && m->m_len > 0)
495                 {
496                         register int i;
497
498                         for(i = 0; i < m->m_len; i++)
499                         {
500                                 /* always reverse bit order from line */
501                                 mtod(m,u_char *)[i] = bitreverse[mtod(m,u_char *)[i]];
502
503                                 /* convert if necessary */
504                                 if(sc->rcvttab)
505                                         mtod(m,u_char *)[i] = sc->rcvttab[mtod(m,u_char *)[i]];
506                         }
507                         error = uiomove(m->m_data, m->m_len, uio);
508
509                         NDBGL4(L4_TELDBG, "i4btel%d, mbuf (%d bytes), uiomove %d!", unit, m->m_len, error);
510                 }
511                 else
512                 {
513                         NDBGL4(L4_TELDBG, "i4btel%d, empty mbuf from queue!", unit);
514                         error = EIO;
515                 }
516                         
517                 if(m)
518                         i4b_Bfreembuf(m);
519         
520                 splx(s);
521         }
522         else if(func == FUNCDIAL)
523         {
524                 s = splimp();
525                 while((sc->result == 0) && (sc->devstate & ST_ISOPEN))
526                 {
527                         sc->devstate |= ST_RDWAITDATA;
528         
529                         if((error = tsleep((caddr_t) &sc->result,
530                                                 TTIPRI | PCATCH,
531                                                 "rtel1", 0 )) != 0)
532                         {
533                                 sc->devstate &= ~ST_RDWAITDATA;
534                                 splx(s);
535                                 return(error);
536                         }
537                 }
538         
539                 if(!(sc->devstate & ST_ISOPEN))
540                 {
541                         splx(s);
542                         return(EIO);
543                 }
544         
545                 if(sc->result != 0)
546                 {
547                         error = uiomove(&sc->result, 1, uio);
548                         sc->result = 0;
549                 }
550                 else
551                 {
552                         error = EIO;
553                 }
554
555                 splx(s);                        
556         }
557         return(error);
558 }
559
560 /*---------------------------------------------------------------------------*
561  *      write to tel device
562  *---------------------------------------------------------------------------*/
563 PDEVSTATIC int
564 i4btelwrite(dev_t dev, struct uio * uio, int ioflag)
565 {
566         int unit = UNIT(dev);
567         int func = FUNC(dev);
568         struct mbuf *m;
569         int s;
570         int error = 0;
571         tel_sc_t *sc = &tel_sc[unit][func];
572         
573         if(!(sc->devstate & ST_ISOPEN))
574         {
575                 return(EIO);
576         }
577
578         if(func == FUNCTEL)
579         {
580                 s = splimp();
581                 
582                 if(!(sc->devstate & ST_CONNECTED)) {
583                         splx(s);
584                         return(EIO);
585                 }
586                         
587                 sc->devstate &= ~ST_TONE;               
588                 IF_LOCK(sc->isdn_linktab->tx_queue);
589                 while((_IF_QFULL(sc->isdn_linktab->tx_queue)) &&
590                       (sc->devstate & ST_ISOPEN))
591                 {
592                         sc->devstate |= ST_WRWAITEMPTY;
593
594 #if defined (__FreeBSD__) && __FreeBSD__ > 4    
595                         if((error = msleep((caddr_t) &sc->isdn_linktab->tx_queue,
596                                         &sc->isdn_linktab->tx_queue->ifq_mtx,
597                                         TTIPRI | PCATCH, "wtel", 0)) != 0)
598 #else
599                         if((error = tsleep((caddr_t) &sc->isdn_linktab->tx_queue,
600                                         TTIPRI | PCATCH, "wtel", 0)) != 0)
601 #endif                                  
602                         {
603                                 sc->devstate &= ~ST_WRWAITEMPTY;
604                                 IF_UNLOCK(sc->isdn_linktab->tx_queue);
605                                 splx(s);
606                                 return(error);
607                         }
608                 }
609                 IF_UNLOCK(sc->isdn_linktab->tx_queue);
610         
611                 if(!(sc->devstate & ST_ISOPEN))
612                 {
613                         splx(s);
614                         return(EIO);
615                 }
616         
617                 if(!(sc->devstate & ST_CONNECTED))
618                 {
619                         splx(s);
620                         return(EIO);
621                 }
622
623                 if((m = i4b_Bgetmbuf(BCH_MAX_DATALEN)) != NULL)
624                 {
625                         register int i;
626                         
627                         m->m_len = min(BCH_MAX_DATALEN, uio->uio_resid);
628         
629                         error = uiomove(m->m_data, m->m_len, uio);
630         
631                         for(i = 0; i < m->m_len; i++)
632                         {
633                                 /* convert if necessary */
634                                 if(sc->wcvttab)
635                                         mtod(m,u_char *)[i] = sc->wcvttab[mtod(m,u_char *)[i]];
636
637                                 /* always reverse bitorder to line */
638                                 mtod(m,u_char *)[i] = bitreverse[mtod(m,u_char *)[i]];
639                         }
640
641 #if defined (__FreeBSD__) && __FreeBSD__ > 4                    
642                         (void) IF_HANDOFF(sc->isdn_linktab->tx_queue, m, NULL);
643 #else
644                         if(IF_QFULL(sc->isdn_linktab->tx_queue))
645                                 m_freem(m);
646                         else
647                                 IF_ENQUEUE(sc->isdn_linktab->tx_queue, m);
648 #endif                  
649                         (*sc->isdn_linktab->bch_tx_start)(sc->isdn_linktab->unit, sc->isdn_linktab->channel);
650                 }
651         
652                 splx(s);
653         }
654         else if(func == FUNCDIAL)
655         {
656 #define CMDBUFSIZ 80 
657                 char cmdbuf[CMDBUFSIZ];
658                 int len = min(CMDBUFSIZ-1, uio->uio_resid);
659         
660                 error = uiomove(cmdbuf, len, uio);
661
662                 if(cmdbuf[0] == CMD_DIAL)
663                 {
664                         i4b_l4_dialoutnumber(BDRV_TEL, unit, len-1, &cmdbuf[1]);
665                 }
666                 else if(cmdbuf[0] == CMD_HUP)
667                 {
668                         i4b_l4_drvrdisc(BDRV_TEL, unit);
669                 }
670                 else if(cmdbuf[0] == CMD_KEYP)
671                 {
672                         i4b_l4_keypad(BDRV_TEL, unit, len-1, &cmdbuf[1]);
673                 }
674         }
675         else
676         {
677                 error = EIO;
678         }               
679         
680         return(error);
681 }
682
683 /*---------------------------------------------------------------------------*
684  *      
685  *---------------------------------------------------------------------------*/
686 #define NTONESAMP 32
687 static void
688 tel_tone(tel_sc_t *sc)
689 {
690         struct mbuf *m;
691         u_char *p;
692         int i;
693
694         if((m = i4b_Bgetmbuf(NTONESAMP)) == NULL) {
695                 printf("no mbuf in tel_tone\n");
696                 return;
697         }
698         p = m->m_data;
699         m->m_len = 0;
700         for (i = 0; i < NTONESAMP && (sc->devstate & ST_TONE); i++) {
701
702                 if (sc->tones.duration[sc->toneidx] > 0) {
703                         if (--sc->tones.duration[sc->toneidx] == 0) {
704                                 sc->toneidx++;
705                                 if (sc->toneidx == I4B_TEL_MAXTONES) {
706                                         sc->devstate &= ~ST_TONE;
707                                         sc->toneomega = 0;
708                                         sc->tonefreq = 0;
709                                 } else if (sc->tones.frequency[sc->toneidx] == 0 &&
710                                            sc->tones.duration[sc->toneidx] == 0) {
711                                         sc->devstate &= ~ST_TONE;
712                                         sc->toneomega = 0;
713                                         sc->tonefreq = 0;
714                                 } else {
715                                         sc->tonefreq = sc->tones.frequency[sc->toneidx];
716                                 }
717                                 if (sc->tones.duration[sc->toneidx] == 0) {
718                                         wakeup((caddr_t) &sc->tones);
719                                 }
720                         }
721                 }
722
723                 sc->toneomega += sc->tonefreq;
724                 if (sc->toneomega >= 8000)
725                         sc->toneomega -= 8000;
726                 *p++ = bitreverse[sinetab[sc->toneomega]];
727                 m->m_len++;
728         }
729         IF_ENQUEUE(sc->isdn_linktab->tx_queue, m);
730         (*sc->isdn_linktab->bch_tx_start)(sc->isdn_linktab->unit, sc->isdn_linktab->channel);
731 }
732
733
734 #ifdef OS_USES_POLL
735 /*---------------------------------------------------------------------------*
736  *      device driver poll
737  *---------------------------------------------------------------------------*/
738 PDEVSTATIC int
739 i4btelpoll(dev_t dev, int events, struct proc *p)
740 {
741         int revents = 0;        /* Events we found */
742         int s;
743         int unit = UNIT(dev);
744         int func = FUNC(dev);   
745
746         tel_sc_t *sc = &tel_sc[unit][func];
747         
748         s = splhigh();
749
750         if(!(sc->devstate & ST_ISOPEN))
751         {
752                 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
753                 splx(s);
754                 return(0);
755         }
756
757         if(func == FUNCTEL)
758         {
759                 /*
760                  * Writes are OK if we are connected and the
761                  * transmit queue can take them
762                  */
763                  
764                 if((events & (POLLOUT|POLLWRNORM))      &&
765                         (sc->devstate & ST_CONNECTED)   &&
766                         (sc->isdn_linktab != NULL)      &&
767                         (!_IF_QFULL(sc->isdn_linktab->tx_queue)))
768                 {
769                         NDBGL4(L4_TELDBG, "i4btel%d, POLLOUT", unit);
770                         revents |= (events & (POLLOUT|POLLWRNORM));
771                 }
772                 
773                 /* ... while reads are OK if we have any data */
774         
775                 if((events & (POLLIN|POLLRDNORM))       &&
776                         (sc->devstate & ST_CONNECTED)   &&
777                         (sc->isdn_linktab != NULL)      &&
778                         (!IF_QEMPTY(sc->isdn_linktab->rx_queue)))
779                 {
780                         NDBGL4(L4_TELDBG, "i4btel%d, POLLIN", unit);
781                         revents |= (events & (POLLIN|POLLRDNORM));
782                 }
783                         
784                 if(revents == 0)
785                 {
786                         NDBGL4(L4_TELDBG, "i4btel%d, selrecord", unit);
787                         selrecord(p, &sc->selp);
788                 }
789         }
790         else if(func == FUNCDIAL)
791         {
792                 if(events & (POLLOUT|POLLWRNORM))
793                 {
794                         NDBGL4(L4_TELDBG, "i4bteld%d,  POLLOUT", unit);
795                         revents |= (events & (POLLOUT|POLLWRNORM));
796                 }
797
798                 if(events & (POLLIN|POLLRDNORM))
799                 {
800                         NDBGL4(L4_TELDBG, "i4bteld%d,  POLLIN, result = %d", unit, sc->result);
801                         if(sc->result != 0)
802                                 revents |= (events & (POLLIN|POLLRDNORM));
803                 }
804                         
805                 if(revents == 0)
806                 {
807                         NDBGL4(L4_TELDBG, "i4bteld%d,  selrecord", unit);
808                         selrecord(p, &sc->selp);
809                 }
810         }
811         splx(s);
812         return(revents);
813 }
814
815 #else /* OS_USES_POLL */
816
817 /*---------------------------------------------------------------------------*
818  *      device driver select
819  *---------------------------------------------------------------------------*/
820 PDEVSTATIC int
821 i4btelsel(dev_t dev, int rw, struct proc *p)
822 {
823         int s;
824         int unit = UNIT(dev);
825         int func = FUNC(dev);   
826
827         tel_sc_t *sc = &tel_sc[unit][func];
828         
829         s = splhigh();
830
831         if (!(sc->devstate & ST_ISOPEN))
832         {
833                 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
834                 splx(s);
835                 return(0);
836         }
837
838         if (func == FUNCTEL)
839         {
840                 /* Don't even bother if we're not connected */
841                 if (!(sc->devstate & ST_CONNECTED) || sc->isdn_linktab == NULL)
842                 {
843                         splx(s);
844                         return 0;
845                 }
846
847                 if (rw == FREAD)
848                 {
849                         if (!IF_QEMPTY(sc->isdn_linktab->rx_queue))
850                         {
851                                 NDBGL4(L4_TELDBG, "i4btel%d, FREAD", unit);
852                                 splx(s);
853                                 return 1;
854                         }
855                 }
856                 else if (rw == FWRITE)
857                 {
858                         if (!_IF_QFULL(sc->isdn_linktab->tx_queue))
859                         {
860                                 NDBGL4(L4_TELDBG, "i4btel%d, FWRITE", unit);
861                                 splx(s);
862                                 return 1;
863                         }
864                 }
865         }
866         else if (func == FUNCDIAL)
867         {
868                 if (rw == FWRITE)
869                 {
870                         NDBGL4(L4_TELDBG, "i4bteld%d,  FWRITE", unit);
871                         splx(s);
872                         return 1;
873                 }
874
875                 if (rw == FREAD)
876                 {
877                         NDBGL4(L4_TELDBG, "i4bteld%d,  FREAD, result = %d", unit, sc->result);
878                         if (sc->result != 0)
879                         {
880                                 splx(s);
881                                 return 1;
882                         }
883                 }
884         }
885
886         NDBGL4(L4_TELDBG, "i4bteld%d,  selrecord", unit);
887         selrecord(p, &sc->selp);
888         splx(s);
889         return 0;
890 }
891
892 #endif /* OS_USES_POLL */
893
894 /*===========================================================================*
895  *                      ISDN INTERFACE ROUTINES
896  *===========================================================================*/
897
898 /*---------------------------------------------------------------------------*
899 *       this routine is called from L4 handler at connect time
900  *---------------------------------------------------------------------------*/
901 static void
902 tel_connect(int unit, void *cdp)
903 {
904         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
905
906         /* audio device */
907         
908         sc->cdp = (call_desc_t *)cdp;
909
910         sc->devstate |= ST_CONNECTED;
911
912         /* dialer device */
913         
914         sc = &tel_sc[unit][FUNCDIAL];
915
916         if(sc->devstate == ST_ISOPEN)
917         {
918                 sc->result = RSP_CONN;
919
920                 if(sc->devstate & ST_RDWAITDATA)
921                 {
922                         sc->devstate &= ~ST_RDWAITDATA;
923                         wakeup((caddr_t) &sc->result);
924                 }
925                 selwakeup(&sc->selp);
926         }
927 }
928
929 /*---------------------------------------------------------------------------*
930  *      this routine is called from L4 handler at disconnect time
931  *---------------------------------------------------------------------------*/
932 static void
933 tel_disconnect(int unit, void *cdp)
934 {
935 /*      call_desc_t *cd = (call_desc_t *)cdp; */
936
937         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
938         
939         /* audio device */
940         
941         sc->devstate &= ~ST_CONNECTED;
942
943         if(sc->devstate & ST_RDWAITDATA)
944         {
945                 sc->devstate &= ~ST_RDWAITDATA;
946                 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
947         }
948
949         if(sc->devstate & ST_WRWAITEMPTY)
950         {
951                 sc->devstate &= ~ST_WRWAITEMPTY;
952                 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
953         }
954
955         /* dialer device */
956         
957         sc = &tel_sc[unit][FUNCDIAL];
958
959         if(sc->devstate & ST_ISOPEN)
960         {
961                 sc->result = RSP_HUP;
962
963                 if(sc->devstate & ST_RDWAITDATA)
964                 {
965                         sc->devstate &= ~ST_RDWAITDATA;
966                         wakeup((caddr_t) &sc->result);
967                 }
968                 selwakeup(&sc->selp);
969
970                 if (sc->devstate & ST_TONE) {
971                         sc->devstate &= ~ST_TONE;
972                         wakeup((caddr_t) &sc->tones);
973                 }
974         }
975 }
976
977 /*---------------------------------------------------------------------------*
978  *      feedback from daemon in case of dial problems
979  *---------------------------------------------------------------------------*/
980 static void
981 tel_dialresponse(int unit, int status, cause_t cause)
982 {       
983         tel_sc_t *sc = &tel_sc[unit][FUNCDIAL];
984
985         NDBGL4(L4_TELDBG, "i4btel%d,  status=%d, cause=0x%4x", unit, status, cause);
986
987         if((sc->devstate == ST_ISOPEN) && status)
988         {       
989                 sc->result = RSP_NOA;
990
991                 if(sc->devstate & ST_RDWAITDATA)
992                 {
993                         sc->devstate &= ~ST_RDWAITDATA;
994                         wakeup((caddr_t) &sc->result);
995                 }
996                 selwakeup(&sc->selp);
997         }
998 }
999         
1000 /*---------------------------------------------------------------------------*
1001  *      interface up/down
1002  *---------------------------------------------------------------------------*/
1003 static void
1004 tel_updown(int unit, int updown)
1005 {
1006 }
1007         
1008 /*---------------------------------------------------------------------------*
1009  *      this routine is called from the HSCX interrupt handler
1010  *      when a new frame (mbuf) has been received and was put on
1011  *      the rx queue.
1012  *---------------------------------------------------------------------------*/
1013 static void
1014 tel_rx_data_rdy(int unit)
1015 {
1016         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1017         
1018         if(sc->devstate & ST_RDWAITDATA)
1019         {
1020                 sc->devstate &= ~ST_RDWAITDATA;
1021                 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
1022         }
1023         selwakeup(&sc->selp);
1024 }
1025
1026 /*---------------------------------------------------------------------------*
1027  *      this routine is called from the HSCX interrupt handler
1028  *      when the last frame has been sent out and there is no
1029  *      further frame (mbuf) in the tx queue.
1030  *---------------------------------------------------------------------------*/
1031 static void
1032 tel_tx_queue_empty(int unit)
1033 {
1034         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1035
1036         if(sc->devstate & ST_WRWAITEMPTY)
1037         {
1038                 sc->devstate &= ~ST_WRWAITEMPTY;
1039                 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
1040         }
1041         if(sc->devstate & ST_TONE) {
1042                 tel_tone(sc);
1043         } else {
1044                 selwakeup(&sc->selp);
1045         }
1046 }
1047
1048 /*---------------------------------------------------------------------------*
1049  *      this routine is called from the HSCX interrupt handler
1050  *      each time a packet is received or transmitted.
1051  *---------------------------------------------------------------------------*/
1052 static void
1053 tel_activity(int unit, int rxtx)
1054 {
1055         if(tel_sc[unit][FUNCTEL].cdp)
1056                 tel_sc[unit][FUNCTEL].cdp->last_active_time = SECOND;
1057 }
1058
1059 /*---------------------------------------------------------------------------*
1060  *      return this drivers linktab address
1061  *---------------------------------------------------------------------------*/
1062 drvr_link_t *
1063 tel_ret_linktab(int unit)
1064 {
1065         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1066         
1067         tel_init_linktab(unit);
1068         return(&sc->drvr_linktab);
1069 }
1070
1071 /*---------------------------------------------------------------------------*
1072  *      setup the isdn_linktab for this driver
1073  *---------------------------------------------------------------------------*/
1074 void
1075 tel_set_linktab(int unit, isdn_link_t *ilt)
1076 {
1077         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1078         sc->isdn_linktab = ilt;
1079 }
1080
1081 /*---------------------------------------------------------------------------*
1082  *      initialize this drivers linktab
1083  *---------------------------------------------------------------------------*/
1084 static void
1085 tel_init_linktab(int unit)
1086 {
1087         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1088         
1089         sc->drvr_linktab.unit = unit;
1090         sc->drvr_linktab.bch_rx_data_ready = tel_rx_data_rdy;
1091         sc->drvr_linktab.bch_tx_queue_empty = tel_tx_queue_empty;
1092         sc->drvr_linktab.bch_activity = tel_activity;   
1093         sc->drvr_linktab.line_connected = tel_connect;
1094         sc->drvr_linktab.line_disconnected = tel_disconnect;
1095         sc->drvr_linktab.dial_response = tel_dialresponse;
1096         sc->drvr_linktab.updown_ind = tel_updown;       
1097 }
1098
1099 /*===========================================================================*
1100  *      AUDIO FORMAT CONVERSION (produced by running g711conv)
1101  *===========================================================================*/
1102
1103 /*---------------------------------------------------------------------------*
1104  *      A-law to u-law conversion
1105  *---------------------------------------------------------------------------*/
1106 static unsigned char a2u_tab[256] = {
1107 /* 00 */        0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, 
1108 /* 08 */        0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, 
1109 /* 10 */        0x39, 0x3a, 0x37, 0x38, 0x3d, 0x3e, 0x3b, 0x3c, 
1110 /* 18 */        0x31, 0x32, 0x30, 0x30, 0x35, 0x36, 0x33, 0x34, 
1111 /* 20 */        0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, 
1112 /* 28 */        0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, 
1113 /* 30 */        0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 
1114 /* 38 */        0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 
1115 /* 40 */        0x62, 0x63, 0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 
1116 /* 48 */        0x5d, 0x5d, 0x5c, 0x5c, 0x5f, 0x5f, 0x5e, 0x5e, 
1117 /* 50 */        0x74, 0x76, 0x70, 0x72, 0x7c, 0x7e, 0x78, 0x7a, 
1118 /* 58 */        0x6a, 0x6b, 0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 
1119 /* 60 */        0x48, 0x49, 0x46, 0x47, 0x4c, 0x4d, 0x4a, 0x4b, 
1120 /* 68 */        0x40, 0x41, 0x3f, 0x3f, 0x44, 0x45, 0x42, 0x43, 
1121 /* 70 */        0x56, 0x57, 0x54, 0x55, 0x5a, 0x5b, 0x58, 0x59, 
1122 /* 78 */        0x4f, 0x4f, 0x4e, 0x4e, 0x52, 0x53, 0x50, 0x51, 
1123 /* 80 */        0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad, 
1124 /* 88 */        0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5, 
1125 /* 90 */        0xb9, 0xba, 0xb7, 0xb8, 0xbd, 0xbe, 0xbb, 0xbc, 
1126 /* 98 */        0xb1, 0xb2, 0xb0, 0xb0, 0xb5, 0xb6, 0xb3, 0xb4, 
1127 /* a0 */        0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d, 
1128 /* a8 */        0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85, 
1129 /* b0 */        0x9a, 0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 
1130 /* b8 */        0x92, 0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 
1131 /* c0 */        0xe2, 0xe3, 0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 
1132 /* c8 */        0xdd, 0xdd, 0xdc, 0xdc, 0xdf, 0xdf, 0xde, 0xde, 
1133 /* d0 */        0xf4, 0xf6, 0xf0, 0xf2, 0xfc, 0xfe, 0xf8, 0xfa, 
1134 /* d8 */        0xea, 0xeb, 0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 
1135 /* e0 */        0xc8, 0xc9, 0xc6, 0xc7, 0xcc, 0xcd, 0xca, 0xcb, 
1136 /* e8 */        0xc0, 0xc1, 0xbf, 0xbf, 0xc4, 0xc5, 0xc2, 0xc3, 
1137 /* f0 */        0xd6, 0xd7, 0xd4, 0xd5, 0xda, 0xdb, 0xd8, 0xd9, 
1138 /* f8 */        0xcf, 0xcf, 0xce, 0xce, 0xd2, 0xd3, 0xd0, 0xd1
1139 };
1140
1141 /*---------------------------------------------------------------------------*
1142  *      u-law to A-law conversion
1143  *---------------------------------------------------------------------------*/
1144 static unsigned char u2a_tab[256] = {
1145 /* 00 */        0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, 
1146 /* 08 */        0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, 
1147 /* 10 */        0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, 
1148 /* 18 */        0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, 
1149 /* 20 */        0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, 
1150 /* 28 */        0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, 
1151 /* 30 */        0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 0x12, 
1152 /* 38 */        0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 0x6a, 
1153 /* 40 */        0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 0x62, 0x63, 
1154 /* 48 */        0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 0x7a, 0x78, 
1155 /* 50 */        0x7e, 0x7f, 0x7c, 0x7d, 0x72, 0x73, 0x70, 0x71, 
1156 /* 58 */        0x76, 0x77, 0x74, 0x75, 0x4b, 0x49, 0x4f, 0x4d, 
1157 /* 60 */        0x42, 0x43, 0x40, 0x41, 0x46, 0x47, 0x44, 0x45, 
1158 /* 68 */        0x5a, 0x5b, 0x58, 0x59, 0x5e, 0x5f, 0x5c, 0x5d, 
1159 /* 70 */        0x52, 0x52, 0x53, 0x53, 0x50, 0x50, 0x51, 0x51, 
1160 /* 78 */        0x56, 0x56, 0x57, 0x57, 0x54, 0x54, 0x55, 0x55, 
1161 /* 80 */        0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad, 
1162 /* 88 */        0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5, 
1163 /* 90 */        0xba, 0xbb, 0xb8, 0xb9, 0xbe, 0xbf, 0xbc, 0xbd, 
1164 /* 98 */        0xb2, 0xb3, 0xb0, 0xb1, 0xb6, 0xb7, 0xb4, 0xb5, 
1165 /* a0 */        0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d, 
1166 /* a8 */        0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85, 
1167 /* b0 */        0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 0x92, 
1168 /* b8 */        0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 0xea, 
1169 /* c0 */        0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 0xe2, 0xe3, 
1170 /* c8 */        0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 0xfa, 0xf8, 
1171 /* d0 */        0xfe, 0xff, 0xfc, 0xfd, 0xf2, 0xf3, 0xf0, 0xf1, 
1172 /* d8 */        0xf6, 0xf7, 0xf4, 0xf5, 0xcb, 0xc9, 0xcf, 0xcd, 
1173 /* e0 */        0xc2, 0xc3, 0xc0, 0xc1, 0xc6, 0xc7, 0xc4, 0xc5, 
1174 /* e8 */        0xda, 0xdb, 0xd8, 0xd9, 0xde, 0xdf, 0xdc, 0xdd, 
1175 /* f0 */        0xd2, 0xd2, 0xd3, 0xd3, 0xd0, 0xd0, 0xd1, 0xd1, 
1176 /* f8 */        0xd6, 0xd6, 0xd7, 0xd7, 0xd4, 0xd4, 0xd5, 0xd5
1177 };
1178   
1179 /*---------------------------------------------------------------------------*
1180  *      reverse bits in a byte
1181  *---------------------------------------------------------------------------*/
1182 static unsigned char bitreverse[256] = {
1183 /* 00 */        0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 
1184 /* 08 */        0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 
1185 /* 10 */        0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 
1186 /* 18 */        0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 
1187 /* 20 */        0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 
1188 /* 28 */        0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 
1189 /* 30 */        0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 
1190 /* 38 */        0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 
1191 /* 40 */        0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 
1192 /* 48 */        0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 
1193 /* 50 */        0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 
1194 /* 58 */        0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 
1195 /* 60 */        0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 
1196 /* 68 */        0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 
1197 /* 70 */        0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 
1198 /* 78 */        0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 
1199 /* 80 */        0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 
1200 /* 88 */        0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 
1201 /* 90 */        0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 
1202 /* 98 */        0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 
1203 /* a0 */        0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 
1204 /* a8 */        0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 
1205 /* b0 */        0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 
1206 /* b8 */        0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 
1207 /* c0 */        0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 
1208 /* c8 */        0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 
1209 /* d0 */        0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 
1210 /* d8 */        0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 
1211 /* e0 */        0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 
1212 /* e8 */        0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 
1213 /* f0 */        0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 
1214 /* f8 */        0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
1215 };
1216
1217 static u_char sinetab[8000] = { 213, 213, 213, 213, 213, 213, 213, 212,
1218 212, 212, 212, 212, 212, 215, 215, 215, 215, 215, 215, 214, 214,
1219 214, 214, 214, 214, 209, 209, 209, 209, 209, 209, 209, 208, 208,
1220 208, 208, 208, 208, 211, 211, 211, 211, 211, 211, 210, 210, 210,
1221 210, 210, 210, 221, 221, 221, 221, 221, 221, 220, 220, 220, 220,
1222 220, 220, 220, 223, 223, 223, 223, 223, 223, 222, 222, 222, 222,
1223 222, 222, 217, 217, 217, 217, 217, 217, 216, 216, 216, 216, 216,
1224 216, 216, 219, 219, 219, 219, 219, 219, 218, 218, 218, 218, 218,
1225 218, 197, 197, 197, 197, 197, 197, 196, 196, 196, 196, 196, 196,
1226 196, 199, 199, 199, 199, 199, 199, 198, 198, 198, 198, 198, 198,
1227 193, 193, 193, 193, 193, 193, 192, 192, 192, 192, 192, 192, 192,
1228 195, 195, 195, 195, 195, 195, 194, 194, 194, 194, 194, 194, 205,
1229 205, 205, 205, 205, 205, 204, 204, 204, 204, 204, 204, 204, 207,
1230 207, 207, 207, 207, 207, 206, 206, 206, 206, 206, 206, 201, 201,
1231 201, 201, 201, 201, 200, 200, 200, 200, 200, 200, 200, 203, 203,
1232 203, 203, 203, 203, 202, 202, 202, 202, 202, 202, 245, 245, 245,
1233 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 244, 244, 244,
1234 244, 244, 244, 244, 244, 244, 244, 244, 244, 247, 247, 247, 247,
1235 247, 247, 247, 247, 247, 247, 247, 247, 247, 246, 246, 246, 246,
1236 246, 246, 246, 246, 246, 246, 246, 246, 246, 241, 241, 241, 241,
1237 241, 241, 241, 241, 241, 241, 241, 241, 240, 240, 240, 240, 240,
1238 240, 240, 240, 240, 240, 240, 240, 240, 243, 243, 243, 243, 243,
1239 243, 243, 243, 243, 243, 243, 243, 243, 242, 242, 242, 242, 242,
1240 242, 242, 242, 242, 242, 242, 242, 242, 253, 253, 253, 253, 253,
1241 253, 253, 253, 253, 253, 253, 253, 253, 252, 252, 252, 252, 252,
1242 252, 252, 252, 252, 252, 252, 252, 255, 255, 255, 255, 255, 255,
1243 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254, 254,
1244 254, 254, 254, 254, 254, 254, 254, 249, 249, 249, 249, 249, 249,
1245 249, 249, 249, 249, 249, 249, 249, 248, 248, 248, 248, 248, 248,
1246 248, 248, 248, 248, 248, 248, 248, 251, 251, 251, 251, 251, 251,
1247 251, 251, 251, 251, 251, 251, 251, 250, 250, 250, 250, 250, 250,
1248 250, 250, 250, 250, 250, 250, 250, 229, 229, 229, 229, 229, 229,
1249 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1250 229, 229, 229, 229, 229, 229, 229, 228, 228, 228, 228, 228, 228,
1251 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1252 228, 228, 228, 228, 228, 228, 228, 228, 231, 231, 231, 231, 231,
1253 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1254 231, 231, 231, 231, 231, 231, 231, 231, 231, 230, 230, 230, 230,
1255 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1256 230, 230, 230, 230, 230, 230, 230, 230, 230, 225, 225, 225, 225,
1257 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1258 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 224, 224,
1259 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1260 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 227,
1261 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1262 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1263 227, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1264 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1265 226, 226, 226, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1266 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1267 237, 237, 237, 237, 237, 236, 236, 236, 236, 236, 236, 236, 236,
1268 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1269 236, 236, 236, 236, 236, 236, 236, 236, 239, 239, 239, 239, 239,
1270 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1271 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 238, 238,
1272 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1273 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1274 238, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1275 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1276 233, 233, 233, 233, 233, 232, 232, 232, 232, 232, 232, 232, 232,
1277 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1278 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 235, 235, 235,
1279 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1280 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1281 235, 235, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1282 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1283 234, 234, 234, 234, 234, 234, 234, 149, 149, 149, 149, 149, 149,
1284 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1285 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1286 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1287 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1288 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148,
1289 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1290 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1291 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1292 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1293 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 151, 151, 151,
1294 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1295 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1296 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1297 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1298 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1299 151, 151, 151, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1300 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1301 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1302 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1303 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1304 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1305 150, 150, 150, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1306 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1307 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1308 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1309 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1310 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1311 145, 145, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144,
1312 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1313 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1314 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1315 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1316 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1317 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1318 144, 144, 144, 144, 144, 144, 144, 144, 144, 147, 147, 147, 147,
1319 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1320 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1321 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1322 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1323 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1324 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1325 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1326 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 146, 146, 146,
1327 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1328 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1329 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1330 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1331 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1332 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1333 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1334 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1335 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1336 146, 146, 146, 146, 146, 146, 157, 157, 157, 157, 157, 157, 157,
1337 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1338 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1339 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1340 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1341 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1342 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1343 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1344 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1345 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1346 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1347 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1348 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1349 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1350 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1351 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1352 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1353 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1354 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1355 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1356 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1357 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1358 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1359 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1360 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1361 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1362 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1363 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1364 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1365 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1366 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1367 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1368 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1369 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1370 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1371 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1372 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1373 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1374 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1375 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1376 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1377 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1378 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1379 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1380 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1381 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1382 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1383 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1384 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1385 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1386 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1387 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1388 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1389 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1390 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1391 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1392 156, 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, 157, 157,
1393 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1394 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1395 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1396 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1397 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1398 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1399 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1400 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1401 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1402 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1403 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1404 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1405 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1406 157, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1407 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1408 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1409 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1410 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1411 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1412 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1413 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1414 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1415 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 147, 147, 147,
1416 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1417 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1418 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1419 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1420 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1421 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1422 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1423 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 144, 144,
1424 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1425 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1426 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1427 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1428 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1429 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1430 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145,
1431 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1432 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1433 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1434 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1435 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1436 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1437 145, 145, 145, 145, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1438 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1439 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1440 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1441 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1442 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1443 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1444 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1445 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1446 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1447 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1448 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 148, 148, 148,
1449 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1450 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1451 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1452 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1453 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1454 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1455 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1456 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1457 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1458 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1459 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1460 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1461 234, 234, 234, 234, 234, 235, 235, 235, 235, 235, 235, 235, 235,
1462 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1463 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 232, 232, 232,
1464 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1465 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1466 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1467 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1468 233, 233, 233, 233, 233, 233, 238, 238, 238, 238, 238, 238, 238,
1469 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1470 238, 238, 238, 238, 238, 238, 238, 238, 238, 239, 239, 239, 239,
1471 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1472 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 236,
1473 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1474 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1475 236, 236, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1476 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1477 237, 237, 237, 237, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1478 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1479 226, 226, 226, 226, 226, 226, 227, 227, 227, 227, 227, 227, 227,
1480 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1481 227, 227, 227, 227, 227, 227, 227, 227, 224, 224, 224, 224, 224,
1482 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1483 224, 224, 224, 224, 224, 224, 224, 224, 224, 225, 225, 225, 225,
1484 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1485 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 230, 230,
1486 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1487 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 231, 231,
1488 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1489 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 228,
1490 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1491 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1492 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1493 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1494 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
1495 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
1496 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
1497 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
1498 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
1499 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
1500 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 253,
1501 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 242,
1502 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 243,
1503 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 240,
1504 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241,
1505 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 246, 246,
1506 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 247, 247,
1507 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 244, 244,
1508 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 245, 245, 245,
1509 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 202, 202, 202,
1510 202, 202, 202, 203, 203, 203, 203, 203, 203, 200, 200, 200, 200,
1511 200, 200, 200, 201, 201, 201, 201, 201, 201, 206, 206, 206, 206,
1512 206, 206, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 204,
1513 204, 204, 205, 205, 205, 205, 205, 205, 194, 194, 194, 194, 194,
1514 194, 195, 195, 195, 195, 195, 195, 192, 192, 192, 192, 192, 192,
1515 192, 193, 193, 193, 193, 193, 193, 198, 198, 198, 198, 198, 198,
1516 199, 199, 199, 199, 199, 199, 196, 196, 196, 196, 196, 196, 196,
1517 197, 197, 197, 197, 197, 197, 218, 218, 218, 218, 218, 218, 219,
1518 219, 219, 219, 219, 219, 216, 216, 216, 216, 216, 216, 216, 217,
1519 217, 217, 217, 217, 217, 222, 222, 222, 222, 222, 222, 223, 223,
1520 223, 223, 223, 223, 220, 220, 220, 220, 220, 220, 220, 221, 221,
1521 221, 221, 221, 221, 210, 210, 210, 210, 210, 210, 211, 211, 211,
1522 211, 211, 211, 208, 208, 208, 208, 208, 208, 209, 209, 209, 209,
1523 209, 209, 209, 214, 214, 214, 214, 214, 214, 215, 215, 215, 215,
1524 215, 215, 212, 212, 212, 212, 212, 212, 213, 213, 213, 213, 213,
1525 213, 213, 90, 90, 90, 85, 85, 85, 85, 85, 85, 84, 84, 84, 84, 84,
1526 84, 87, 87, 87, 87, 87, 87, 86, 86, 86, 86, 86, 86, 81, 81, 81,
1527 81, 81, 81, 81, 80, 80, 80, 80, 80, 80, 83, 83, 83, 83, 83, 83,
1528 82, 82, 82, 82, 82, 82, 93, 93, 93, 93, 93, 93, 93, 92, 92, 92,
1529 92, 92, 92, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 89,
1530 89, 89, 89, 89, 89, 88, 88, 88, 88, 88, 88, 88, 91, 91, 91, 91,
1531 91, 91, 90, 90, 90, 90, 90, 90, 69, 69, 69, 69, 69, 69, 68, 68,
1532 68, 68, 68, 68, 68, 71, 71, 71, 71, 71, 71, 70, 70, 70, 70, 70,
1533 70, 65, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 64, 64, 67, 67,
1534 67, 67, 67, 67, 66, 66, 66, 66, 66, 66, 77, 77, 77, 77, 77, 77,
1535 76, 76, 76, 76, 76, 76, 76, 79, 79, 79, 79, 79, 79, 78, 78, 78,
1536 78, 78, 78, 73, 73, 73, 73, 73, 73, 73, 72, 72, 72, 72, 72, 72,
1537 75, 75, 75, 75, 75, 75, 74, 74, 74, 74, 74, 74, 117, 117, 117, 117,
1538 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116,
1539 116, 116, 116, 116, 116, 116, 116, 116, 116, 119, 119, 119, 119,
1540 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118,
1541 118, 118, 118, 118, 118, 118, 118, 118, 113, 113, 113, 113, 113,
1542 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112,
1543 112, 112, 112, 112, 112, 112, 112, 115, 115, 115, 115, 115, 115,
1544 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114,
1545 114, 114, 114, 114, 114, 114, 114, 125, 125, 125, 125, 125, 125,
1546 125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 124,
1547 124, 124, 124, 124, 124, 124, 124, 127, 127, 127, 127, 127, 127,
1548 127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126,
1549 126, 126, 126, 126, 126, 126, 121, 121, 121, 121, 121, 121, 121,
1550 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120,
1551 120, 120, 120, 120, 120, 120, 123, 123, 123, 123, 123, 123, 123,
1552 123, 123, 123, 123, 123, 123, 122, 122, 122, 122, 122, 122, 122,
1553 122, 122, 122, 122, 122, 122, 101, 101, 101, 101, 101, 101, 101,
1554 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1555 101, 101, 101, 101, 101, 101, 101, 100, 100, 100, 100, 100, 100,
1556 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1557 100, 100, 100, 100, 100, 100, 100, 103, 103, 103, 103, 103, 103,
1558 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1559 103, 103, 103, 103, 103, 103, 103, 103, 102, 102, 102, 102, 102,
1560 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1561 102, 102, 102, 102, 102, 102, 102, 102, 102, 97, 97, 97, 97, 97,
1562 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1563 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1564 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1565 96, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1566 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 98, 98, 98,
1567 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1568 98, 98, 98, 98, 98, 98, 98, 98, 98, 109, 109, 109, 109, 109, 109,
1569 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1570 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 108, 108, 108,
1571 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1572 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 111,
1573 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1574 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1575 111, 111, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1576 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1577 110, 110, 110, 110, 110, 110, 105, 105, 105, 105, 105, 105, 105,
1578 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1579 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 104,
1580 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1581 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1582 104, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1583 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1584 107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 106,
1585 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1586 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 21,
1587 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1588 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1589 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1590 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1591 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1592 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1593 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1594 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1595 20, 20, 20, 20, 20, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1596 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1597 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1598 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1599 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 22, 22, 22,
1600 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1601 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1602 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1603 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1604 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 17, 17, 17, 17, 17, 17,
1605 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1606 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1607 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1608 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1609 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 16, 16,
1610 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1611 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1612 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1613 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1614 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1615 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 19, 19, 19, 19, 19, 19,
1616 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1617 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1618 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1619 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1620 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1621 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1622 19, 19, 19, 19, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1623 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1624 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1625 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1626 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1627 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1628 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1629 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1630 18, 18, 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1631 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1632 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1633 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1634 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1635 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1636 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1637 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1638 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1639 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1640 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1641 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 28, 28, 28, 28, 28, 28,
1642 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1643 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1644 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1645 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1646 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1647 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1648 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1649 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1650 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1651 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1652 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1653 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1654 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1655 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1656 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1657 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1658 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1659 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1660 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1661 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1662 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1663 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1664 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1665 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1666 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1667 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1668 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1669 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1670 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1671 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1672 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1673 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1674 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1675 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1676 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1677 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1678 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1679 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1680 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1681 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1682 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1683 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1684 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1685 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 18, 18, 18, 18, 18,
1686 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1687 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1688 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1689 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1690 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1691 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1692 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1693 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19,
1694 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1695 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1696 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1697 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1698 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1699 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1700 19, 19, 19, 19, 19, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1701 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1702 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1703 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1704 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1705 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1706 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1707 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1708 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1709 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1710 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1711 17, 17, 17, 17, 17, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1712 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1713 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1714 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1715 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1716 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1717 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1718 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1719 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1720 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 20, 20, 20, 20, 20, 20,
1721 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1722 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1723 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1724 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
1725 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1726 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1727 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1728 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1729 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1730 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1731 106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 107,
1732 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1733 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 104, 104,
1734 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1735 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1736 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1737 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1738 105, 105, 105, 105, 105, 105, 110, 110, 110, 110, 110, 110, 110,
1739 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1740 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111,
1741 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1742 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1743 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1744 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1745 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1746 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1747 109, 109, 109, 109, 109, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1748 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1749 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1750 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 96, 96,
1751 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1752 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97,
1753 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1754 97, 97, 97, 97, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1755 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1756 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1757 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1758 103, 103, 103, 103, 103, 100, 100, 100, 100, 100, 100, 100, 100,
1759 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1760 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 101, 101,
1761 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1762 101, 101, 101, 101, 101, 101, 122, 122, 122, 122, 122, 122, 122,
1763 122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 123,
1764 123, 123, 123, 123, 123, 123, 120, 120, 120, 120, 120, 120, 120,
1765 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121,
1766 121, 121, 121, 121, 121, 121, 126, 126, 126, 126, 126, 126, 126,
1767 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127,
1768 127, 127, 127, 127, 127, 124, 124, 124, 124, 124, 124, 124, 124,
1769 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125,
1770 125, 125, 125, 125, 125, 114, 114, 114, 114, 114, 114, 114, 114,
1771 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115,
1772 115, 115, 115, 115, 115, 112, 112, 112, 112, 112, 112, 112, 112,
1773 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1774 113, 113, 113, 113, 118, 118, 118, 118, 118, 118, 118, 118, 118,
1775 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119,
1776 119, 119, 119, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
1777 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
1778 117, 117, 117, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 72,
1779 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 78, 78, 78, 78,
1780 78, 78, 79, 79, 79, 79, 79, 79, 76, 76, 76, 76, 76, 76, 76, 77,
1781 77, 77, 77, 77, 77, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67,
1782 67, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 70, 70,
1783 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 68, 68, 68, 68, 68, 68,
1784 68, 69, 69, 69, 69, 69, 69, 90, 90, 90, 90, 90, 90, 91, 91, 91,
1785 91, 91, 91, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89,
1786 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 92, 92, 92, 92,
1787 92, 92, 93, 93, 93, 93, 93, 93, 93, 82, 82, 82, 82, 82, 82, 83,
1788 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81,
1789 81, 81, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 84, 84,
1790 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 90, 90, 90 };
1791
1792 /*===========================================================================*/
1793
1794 #endif /* NI4BTEL > 0 */