Remove the priority part of the priority|flags argument to tsleep(). Only
[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.3 2003/07/19 21:14:36 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                                         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                                             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                                                 PCATCH, "rtel", 0 )) != 0)
466 #endif                                          
467                         {
468                                 sc->devstate &= ~ST_RDWAITDATA;
469                                 IF_UNLOCK(sc->isdn_linktab->rx_queue);
470                                 splx(s);
471                                 return(error);
472                         }
473                 }
474         
475                 if(!(sc->devstate & ST_ISOPEN))
476                 {
477                         IF_UNLOCK(sc->isdn_linktab->rx_queue);
478                         splx(s);
479                         return(EIO);
480                 }
481         
482                 if(!(sc->devstate & ST_CONNECTED))
483                 {
484                         IF_UNLOCK(sc->isdn_linktab->rx_queue);
485                         splx(s);
486                         return(EIO);
487                 }
488                 
489         
490                 _IF_DEQUEUE(sc->isdn_linktab->rx_queue, m);
491                 IF_UNLOCK(sc->isdn_linktab->rx_queue);
492                 
493                 if(m && m->m_len > 0)
494                 {
495                         register int i;
496
497                         for(i = 0; i < m->m_len; i++)
498                         {
499                                 /* always reverse bit order from line */
500                                 mtod(m,u_char *)[i] = bitreverse[mtod(m,u_char *)[i]];
501
502                                 /* convert if necessary */
503                                 if(sc->rcvttab)
504                                         mtod(m,u_char *)[i] = sc->rcvttab[mtod(m,u_char *)[i]];
505                         }
506                         error = uiomove(m->m_data, m->m_len, uio);
507
508                         NDBGL4(L4_TELDBG, "i4btel%d, mbuf (%d bytes), uiomove %d!", unit, m->m_len, error);
509                 }
510                 else
511                 {
512                         NDBGL4(L4_TELDBG, "i4btel%d, empty mbuf from queue!", unit);
513                         error = EIO;
514                 }
515                         
516                 if(m)
517                         i4b_Bfreembuf(m);
518         
519                 splx(s);
520         }
521         else if(func == FUNCDIAL)
522         {
523                 s = splimp();
524                 while((sc->result == 0) && (sc->devstate & ST_ISOPEN))
525                 {
526                         sc->devstate |= ST_RDWAITDATA;
527         
528                         if((error = tsleep((caddr_t) &sc->result,
529                                                 PCATCH, "rtel1", 0 )) != 0)
530                         {
531                                 sc->devstate &= ~ST_RDWAITDATA;
532                                 splx(s);
533                                 return(error);
534                         }
535                 }
536         
537                 if(!(sc->devstate & ST_ISOPEN))
538                 {
539                         splx(s);
540                         return(EIO);
541                 }
542         
543                 if(sc->result != 0)
544                 {
545                         error = uiomove(&sc->result, 1, uio);
546                         sc->result = 0;
547                 }
548                 else
549                 {
550                         error = EIO;
551                 }
552
553                 splx(s);                        
554         }
555         return(error);
556 }
557
558 /*---------------------------------------------------------------------------*
559  *      write to tel device
560  *---------------------------------------------------------------------------*/
561 PDEVSTATIC int
562 i4btelwrite(dev_t dev, struct uio * uio, int ioflag)
563 {
564         int unit = UNIT(dev);
565         int func = FUNC(dev);
566         struct mbuf *m;
567         int s;
568         int error = 0;
569         tel_sc_t *sc = &tel_sc[unit][func];
570         
571         if(!(sc->devstate & ST_ISOPEN))
572         {
573                 return(EIO);
574         }
575
576         if(func == FUNCTEL)
577         {
578                 s = splimp();
579                 
580                 if(!(sc->devstate & ST_CONNECTED)) {
581                         splx(s);
582                         return(EIO);
583                 }
584                         
585                 sc->devstate &= ~ST_TONE;               
586                 IF_LOCK(sc->isdn_linktab->tx_queue);
587                 while((_IF_QFULL(sc->isdn_linktab->tx_queue)) &&
588                       (sc->devstate & ST_ISOPEN))
589                 {
590                         sc->devstate |= ST_WRWAITEMPTY;
591
592 #if defined (__FreeBSD__) && __FreeBSD__ > 4    
593                         if((error = msleep((caddr_t) &sc->isdn_linktab->tx_queue,
594                                         &sc->isdn_linktab->tx_queue->ifq_mtx,
595                                         TTIPRI | PCATCH, "wtel", 0)) != 0)
596 #else
597                         if((error = tsleep((caddr_t) &sc->isdn_linktab->tx_queue,
598                                         PCATCH, "wtel", 0)) != 0)
599 #endif                                  
600                         {
601                                 sc->devstate &= ~ST_WRWAITEMPTY;
602                                 IF_UNLOCK(sc->isdn_linktab->tx_queue);
603                                 splx(s);
604                                 return(error);
605                         }
606                 }
607                 IF_UNLOCK(sc->isdn_linktab->tx_queue);
608         
609                 if(!(sc->devstate & ST_ISOPEN))
610                 {
611                         splx(s);
612                         return(EIO);
613                 }
614         
615                 if(!(sc->devstate & ST_CONNECTED))
616                 {
617                         splx(s);
618                         return(EIO);
619                 }
620
621                 if((m = i4b_Bgetmbuf(BCH_MAX_DATALEN)) != NULL)
622                 {
623                         register int i;
624                         
625                         m->m_len = min(BCH_MAX_DATALEN, uio->uio_resid);
626         
627                         error = uiomove(m->m_data, m->m_len, uio);
628         
629                         for(i = 0; i < m->m_len; i++)
630                         {
631                                 /* convert if necessary */
632                                 if(sc->wcvttab)
633                                         mtod(m,u_char *)[i] = sc->wcvttab[mtod(m,u_char *)[i]];
634
635                                 /* always reverse bitorder to line */
636                                 mtod(m,u_char *)[i] = bitreverse[mtod(m,u_char *)[i]];
637                         }
638
639 #if defined (__FreeBSD__) && __FreeBSD__ > 4                    
640                         (void) IF_HANDOFF(sc->isdn_linktab->tx_queue, m, NULL);
641 #else
642                         if(IF_QFULL(sc->isdn_linktab->tx_queue))
643                                 m_freem(m);
644                         else
645                                 IF_ENQUEUE(sc->isdn_linktab->tx_queue, m);
646 #endif                  
647                         (*sc->isdn_linktab->bch_tx_start)(sc->isdn_linktab->unit, sc->isdn_linktab->channel);
648                 }
649         
650                 splx(s);
651         }
652         else if(func == FUNCDIAL)
653         {
654 #define CMDBUFSIZ 80 
655                 char cmdbuf[CMDBUFSIZ];
656                 int len = min(CMDBUFSIZ-1, uio->uio_resid);
657         
658                 error = uiomove(cmdbuf, len, uio);
659
660                 if(cmdbuf[0] == CMD_DIAL)
661                 {
662                         i4b_l4_dialoutnumber(BDRV_TEL, unit, len-1, &cmdbuf[1]);
663                 }
664                 else if(cmdbuf[0] == CMD_HUP)
665                 {
666                         i4b_l4_drvrdisc(BDRV_TEL, unit);
667                 }
668                 else if(cmdbuf[0] == CMD_KEYP)
669                 {
670                         i4b_l4_keypad(BDRV_TEL, unit, len-1, &cmdbuf[1]);
671                 }
672         }
673         else
674         {
675                 error = EIO;
676         }               
677         
678         return(error);
679 }
680
681 /*---------------------------------------------------------------------------*
682  *      
683  *---------------------------------------------------------------------------*/
684 #define NTONESAMP 32
685 static void
686 tel_tone(tel_sc_t *sc)
687 {
688         struct mbuf *m;
689         u_char *p;
690         int i;
691
692         if((m = i4b_Bgetmbuf(NTONESAMP)) == NULL) {
693                 printf("no mbuf in tel_tone\n");
694                 return;
695         }
696         p = m->m_data;
697         m->m_len = 0;
698         for (i = 0; i < NTONESAMP && (sc->devstate & ST_TONE); i++) {
699
700                 if (sc->tones.duration[sc->toneidx] > 0) {
701                         if (--sc->tones.duration[sc->toneidx] == 0) {
702                                 sc->toneidx++;
703                                 if (sc->toneidx == I4B_TEL_MAXTONES) {
704                                         sc->devstate &= ~ST_TONE;
705                                         sc->toneomega = 0;
706                                         sc->tonefreq = 0;
707                                 } else if (sc->tones.frequency[sc->toneidx] == 0 &&
708                                            sc->tones.duration[sc->toneidx] == 0) {
709                                         sc->devstate &= ~ST_TONE;
710                                         sc->toneomega = 0;
711                                         sc->tonefreq = 0;
712                                 } else {
713                                         sc->tonefreq = sc->tones.frequency[sc->toneidx];
714                                 }
715                                 if (sc->tones.duration[sc->toneidx] == 0) {
716                                         wakeup((caddr_t) &sc->tones);
717                                 }
718                         }
719                 }
720
721                 sc->toneomega += sc->tonefreq;
722                 if (sc->toneomega >= 8000)
723                         sc->toneomega -= 8000;
724                 *p++ = bitreverse[sinetab[sc->toneomega]];
725                 m->m_len++;
726         }
727         IF_ENQUEUE(sc->isdn_linktab->tx_queue, m);
728         (*sc->isdn_linktab->bch_tx_start)(sc->isdn_linktab->unit, sc->isdn_linktab->channel);
729 }
730
731
732 #ifdef OS_USES_POLL
733 /*---------------------------------------------------------------------------*
734  *      device driver poll
735  *---------------------------------------------------------------------------*/
736 PDEVSTATIC int
737 i4btelpoll(dev_t dev, int events, struct proc *p)
738 {
739         int revents = 0;        /* Events we found */
740         int s;
741         int unit = UNIT(dev);
742         int func = FUNC(dev);   
743
744         tel_sc_t *sc = &tel_sc[unit][func];
745         
746         s = splhigh();
747
748         if(!(sc->devstate & ST_ISOPEN))
749         {
750                 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
751                 splx(s);
752                 return(0);
753         }
754
755         if(func == FUNCTEL)
756         {
757                 /*
758                  * Writes are OK if we are connected and the
759                  * transmit queue can take them
760                  */
761                  
762                 if((events & (POLLOUT|POLLWRNORM))      &&
763                         (sc->devstate & ST_CONNECTED)   &&
764                         (sc->isdn_linktab != NULL)      &&
765                         (!_IF_QFULL(sc->isdn_linktab->tx_queue)))
766                 {
767                         NDBGL4(L4_TELDBG, "i4btel%d, POLLOUT", unit);
768                         revents |= (events & (POLLOUT|POLLWRNORM));
769                 }
770                 
771                 /* ... while reads are OK if we have any data */
772         
773                 if((events & (POLLIN|POLLRDNORM))       &&
774                         (sc->devstate & ST_CONNECTED)   &&
775                         (sc->isdn_linktab != NULL)      &&
776                         (!IF_QEMPTY(sc->isdn_linktab->rx_queue)))
777                 {
778                         NDBGL4(L4_TELDBG, "i4btel%d, POLLIN", unit);
779                         revents |= (events & (POLLIN|POLLRDNORM));
780                 }
781                         
782                 if(revents == 0)
783                 {
784                         NDBGL4(L4_TELDBG, "i4btel%d, selrecord", unit);
785                         selrecord(p, &sc->selp);
786                 }
787         }
788         else if(func == FUNCDIAL)
789         {
790                 if(events & (POLLOUT|POLLWRNORM))
791                 {
792                         NDBGL4(L4_TELDBG, "i4bteld%d,  POLLOUT", unit);
793                         revents |= (events & (POLLOUT|POLLWRNORM));
794                 }
795
796                 if(events & (POLLIN|POLLRDNORM))
797                 {
798                         NDBGL4(L4_TELDBG, "i4bteld%d,  POLLIN, result = %d", unit, sc->result);
799                         if(sc->result != 0)
800                                 revents |= (events & (POLLIN|POLLRDNORM));
801                 }
802                         
803                 if(revents == 0)
804                 {
805                         NDBGL4(L4_TELDBG, "i4bteld%d,  selrecord", unit);
806                         selrecord(p, &sc->selp);
807                 }
808         }
809         splx(s);
810         return(revents);
811 }
812
813 #else /* OS_USES_POLL */
814
815 /*---------------------------------------------------------------------------*
816  *      device driver select
817  *---------------------------------------------------------------------------*/
818 PDEVSTATIC int
819 i4btelsel(dev_t dev, int rw, struct proc *p)
820 {
821         int s;
822         int unit = UNIT(dev);
823         int func = FUNC(dev);   
824
825         tel_sc_t *sc = &tel_sc[unit][func];
826         
827         s = splhigh();
828
829         if (!(sc->devstate & ST_ISOPEN))
830         {
831                 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
832                 splx(s);
833                 return(0);
834         }
835
836         if (func == FUNCTEL)
837         {
838                 /* Don't even bother if we're not connected */
839                 if (!(sc->devstate & ST_CONNECTED) || sc->isdn_linktab == NULL)
840                 {
841                         splx(s);
842                         return 0;
843                 }
844
845                 if (rw == FREAD)
846                 {
847                         if (!IF_QEMPTY(sc->isdn_linktab->rx_queue))
848                         {
849                                 NDBGL4(L4_TELDBG, "i4btel%d, FREAD", unit);
850                                 splx(s);
851                                 return 1;
852                         }
853                 }
854                 else if (rw == FWRITE)
855                 {
856                         if (!_IF_QFULL(sc->isdn_linktab->tx_queue))
857                         {
858                                 NDBGL4(L4_TELDBG, "i4btel%d, FWRITE", unit);
859                                 splx(s);
860                                 return 1;
861                         }
862                 }
863         }
864         else if (func == FUNCDIAL)
865         {
866                 if (rw == FWRITE)
867                 {
868                         NDBGL4(L4_TELDBG, "i4bteld%d,  FWRITE", unit);
869                         splx(s);
870                         return 1;
871                 }
872
873                 if (rw == FREAD)
874                 {
875                         NDBGL4(L4_TELDBG, "i4bteld%d,  FREAD, result = %d", unit, sc->result);
876                         if (sc->result != 0)
877                         {
878                                 splx(s);
879                                 return 1;
880                         }
881                 }
882         }
883
884         NDBGL4(L4_TELDBG, "i4bteld%d,  selrecord", unit);
885         selrecord(p, &sc->selp);
886         splx(s);
887         return 0;
888 }
889
890 #endif /* OS_USES_POLL */
891
892 /*===========================================================================*
893  *                      ISDN INTERFACE ROUTINES
894  *===========================================================================*/
895
896 /*---------------------------------------------------------------------------*
897 *       this routine is called from L4 handler at connect time
898  *---------------------------------------------------------------------------*/
899 static void
900 tel_connect(int unit, void *cdp)
901 {
902         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
903
904         /* audio device */
905         
906         sc->cdp = (call_desc_t *)cdp;
907
908         sc->devstate |= ST_CONNECTED;
909
910         /* dialer device */
911         
912         sc = &tel_sc[unit][FUNCDIAL];
913
914         if(sc->devstate == ST_ISOPEN)
915         {
916                 sc->result = RSP_CONN;
917
918                 if(sc->devstate & ST_RDWAITDATA)
919                 {
920                         sc->devstate &= ~ST_RDWAITDATA;
921                         wakeup((caddr_t) &sc->result);
922                 }
923                 selwakeup(&sc->selp);
924         }
925 }
926
927 /*---------------------------------------------------------------------------*
928  *      this routine is called from L4 handler at disconnect time
929  *---------------------------------------------------------------------------*/
930 static void
931 tel_disconnect(int unit, void *cdp)
932 {
933 /*      call_desc_t *cd = (call_desc_t *)cdp; */
934
935         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
936         
937         /* audio device */
938         
939         sc->devstate &= ~ST_CONNECTED;
940
941         if(sc->devstate & ST_RDWAITDATA)
942         {
943                 sc->devstate &= ~ST_RDWAITDATA;
944                 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
945         }
946
947         if(sc->devstate & ST_WRWAITEMPTY)
948         {
949                 sc->devstate &= ~ST_WRWAITEMPTY;
950                 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
951         }
952
953         /* dialer device */
954         
955         sc = &tel_sc[unit][FUNCDIAL];
956
957         if(sc->devstate & ST_ISOPEN)
958         {
959                 sc->result = RSP_HUP;
960
961                 if(sc->devstate & ST_RDWAITDATA)
962                 {
963                         sc->devstate &= ~ST_RDWAITDATA;
964                         wakeup((caddr_t) &sc->result);
965                 }
966                 selwakeup(&sc->selp);
967
968                 if (sc->devstate & ST_TONE) {
969                         sc->devstate &= ~ST_TONE;
970                         wakeup((caddr_t) &sc->tones);
971                 }
972         }
973 }
974
975 /*---------------------------------------------------------------------------*
976  *      feedback from daemon in case of dial problems
977  *---------------------------------------------------------------------------*/
978 static void
979 tel_dialresponse(int unit, int status, cause_t cause)
980 {       
981         tel_sc_t *sc = &tel_sc[unit][FUNCDIAL];
982
983         NDBGL4(L4_TELDBG, "i4btel%d,  status=%d, cause=0x%4x", unit, status, cause);
984
985         if((sc->devstate == ST_ISOPEN) && status)
986         {       
987                 sc->result = RSP_NOA;
988
989                 if(sc->devstate & ST_RDWAITDATA)
990                 {
991                         sc->devstate &= ~ST_RDWAITDATA;
992                         wakeup((caddr_t) &sc->result);
993                 }
994                 selwakeup(&sc->selp);
995         }
996 }
997         
998 /*---------------------------------------------------------------------------*
999  *      interface up/down
1000  *---------------------------------------------------------------------------*/
1001 static void
1002 tel_updown(int unit, int updown)
1003 {
1004 }
1005         
1006 /*---------------------------------------------------------------------------*
1007  *      this routine is called from the HSCX interrupt handler
1008  *      when a new frame (mbuf) has been received and was put on
1009  *      the rx queue.
1010  *---------------------------------------------------------------------------*/
1011 static void
1012 tel_rx_data_rdy(int unit)
1013 {
1014         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1015         
1016         if(sc->devstate & ST_RDWAITDATA)
1017         {
1018                 sc->devstate &= ~ST_RDWAITDATA;
1019                 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
1020         }
1021         selwakeup(&sc->selp);
1022 }
1023
1024 /*---------------------------------------------------------------------------*
1025  *      this routine is called from the HSCX interrupt handler
1026  *      when the last frame has been sent out and there is no
1027  *      further frame (mbuf) in the tx queue.
1028  *---------------------------------------------------------------------------*/
1029 static void
1030 tel_tx_queue_empty(int unit)
1031 {
1032         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1033
1034         if(sc->devstate & ST_WRWAITEMPTY)
1035         {
1036                 sc->devstate &= ~ST_WRWAITEMPTY;
1037                 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
1038         }
1039         if(sc->devstate & ST_TONE) {
1040                 tel_tone(sc);
1041         } else {
1042                 selwakeup(&sc->selp);
1043         }
1044 }
1045
1046 /*---------------------------------------------------------------------------*
1047  *      this routine is called from the HSCX interrupt handler
1048  *      each time a packet is received or transmitted.
1049  *---------------------------------------------------------------------------*/
1050 static void
1051 tel_activity(int unit, int rxtx)
1052 {
1053         if(tel_sc[unit][FUNCTEL].cdp)
1054                 tel_sc[unit][FUNCTEL].cdp->last_active_time = SECOND;
1055 }
1056
1057 /*---------------------------------------------------------------------------*
1058  *      return this drivers linktab address
1059  *---------------------------------------------------------------------------*/
1060 drvr_link_t *
1061 tel_ret_linktab(int unit)
1062 {
1063         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1064         
1065         tel_init_linktab(unit);
1066         return(&sc->drvr_linktab);
1067 }
1068
1069 /*---------------------------------------------------------------------------*
1070  *      setup the isdn_linktab for this driver
1071  *---------------------------------------------------------------------------*/
1072 void
1073 tel_set_linktab(int unit, isdn_link_t *ilt)
1074 {
1075         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1076         sc->isdn_linktab = ilt;
1077 }
1078
1079 /*---------------------------------------------------------------------------*
1080  *      initialize this drivers linktab
1081  *---------------------------------------------------------------------------*/
1082 static void
1083 tel_init_linktab(int unit)
1084 {
1085         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1086         
1087         sc->drvr_linktab.unit = unit;
1088         sc->drvr_linktab.bch_rx_data_ready = tel_rx_data_rdy;
1089         sc->drvr_linktab.bch_tx_queue_empty = tel_tx_queue_empty;
1090         sc->drvr_linktab.bch_activity = tel_activity;   
1091         sc->drvr_linktab.line_connected = tel_connect;
1092         sc->drvr_linktab.line_disconnected = tel_disconnect;
1093         sc->drvr_linktab.dial_response = tel_dialresponse;
1094         sc->drvr_linktab.updown_ind = tel_updown;       
1095 }
1096
1097 /*===========================================================================*
1098  *      AUDIO FORMAT CONVERSION (produced by running g711conv)
1099  *===========================================================================*/
1100
1101 /*---------------------------------------------------------------------------*
1102  *      A-law to u-law conversion
1103  *---------------------------------------------------------------------------*/
1104 static unsigned char a2u_tab[256] = {
1105 /* 00 */        0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, 
1106 /* 08 */        0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, 
1107 /* 10 */        0x39, 0x3a, 0x37, 0x38, 0x3d, 0x3e, 0x3b, 0x3c, 
1108 /* 18 */        0x31, 0x32, 0x30, 0x30, 0x35, 0x36, 0x33, 0x34, 
1109 /* 20 */        0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, 
1110 /* 28 */        0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, 
1111 /* 30 */        0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 
1112 /* 38 */        0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 
1113 /* 40 */        0x62, 0x63, 0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 
1114 /* 48 */        0x5d, 0x5d, 0x5c, 0x5c, 0x5f, 0x5f, 0x5e, 0x5e, 
1115 /* 50 */        0x74, 0x76, 0x70, 0x72, 0x7c, 0x7e, 0x78, 0x7a, 
1116 /* 58 */        0x6a, 0x6b, 0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 
1117 /* 60 */        0x48, 0x49, 0x46, 0x47, 0x4c, 0x4d, 0x4a, 0x4b, 
1118 /* 68 */        0x40, 0x41, 0x3f, 0x3f, 0x44, 0x45, 0x42, 0x43, 
1119 /* 70 */        0x56, 0x57, 0x54, 0x55, 0x5a, 0x5b, 0x58, 0x59, 
1120 /* 78 */        0x4f, 0x4f, 0x4e, 0x4e, 0x52, 0x53, 0x50, 0x51, 
1121 /* 80 */        0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad, 
1122 /* 88 */        0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5, 
1123 /* 90 */        0xb9, 0xba, 0xb7, 0xb8, 0xbd, 0xbe, 0xbb, 0xbc, 
1124 /* 98 */        0xb1, 0xb2, 0xb0, 0xb0, 0xb5, 0xb6, 0xb3, 0xb4, 
1125 /* a0 */        0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d, 
1126 /* a8 */        0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85, 
1127 /* b0 */        0x9a, 0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 
1128 /* b8 */        0x92, 0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 
1129 /* c0 */        0xe2, 0xe3, 0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 
1130 /* c8 */        0xdd, 0xdd, 0xdc, 0xdc, 0xdf, 0xdf, 0xde, 0xde, 
1131 /* d0 */        0xf4, 0xf6, 0xf0, 0xf2, 0xfc, 0xfe, 0xf8, 0xfa, 
1132 /* d8 */        0xea, 0xeb, 0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 
1133 /* e0 */        0xc8, 0xc9, 0xc6, 0xc7, 0xcc, 0xcd, 0xca, 0xcb, 
1134 /* e8 */        0xc0, 0xc1, 0xbf, 0xbf, 0xc4, 0xc5, 0xc2, 0xc3, 
1135 /* f0 */        0xd6, 0xd7, 0xd4, 0xd5, 0xda, 0xdb, 0xd8, 0xd9, 
1136 /* f8 */        0xcf, 0xcf, 0xce, 0xce, 0xd2, 0xd3, 0xd0, 0xd1
1137 };
1138
1139 /*---------------------------------------------------------------------------*
1140  *      u-law to A-law conversion
1141  *---------------------------------------------------------------------------*/
1142 static unsigned char u2a_tab[256] = {
1143 /* 00 */        0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, 
1144 /* 08 */        0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, 
1145 /* 10 */        0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, 
1146 /* 18 */        0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, 
1147 /* 20 */        0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, 
1148 /* 28 */        0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, 
1149 /* 30 */        0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 0x12, 
1150 /* 38 */        0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 0x6a, 
1151 /* 40 */        0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 0x62, 0x63, 
1152 /* 48 */        0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 0x7a, 0x78, 
1153 /* 50 */        0x7e, 0x7f, 0x7c, 0x7d, 0x72, 0x73, 0x70, 0x71, 
1154 /* 58 */        0x76, 0x77, 0x74, 0x75, 0x4b, 0x49, 0x4f, 0x4d, 
1155 /* 60 */        0x42, 0x43, 0x40, 0x41, 0x46, 0x47, 0x44, 0x45, 
1156 /* 68 */        0x5a, 0x5b, 0x58, 0x59, 0x5e, 0x5f, 0x5c, 0x5d, 
1157 /* 70 */        0x52, 0x52, 0x53, 0x53, 0x50, 0x50, 0x51, 0x51, 
1158 /* 78 */        0x56, 0x56, 0x57, 0x57, 0x54, 0x54, 0x55, 0x55, 
1159 /* 80 */        0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad, 
1160 /* 88 */        0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5, 
1161 /* 90 */        0xba, 0xbb, 0xb8, 0xb9, 0xbe, 0xbf, 0xbc, 0xbd, 
1162 /* 98 */        0xb2, 0xb3, 0xb0, 0xb1, 0xb6, 0xb7, 0xb4, 0xb5, 
1163 /* a0 */        0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d, 
1164 /* a8 */        0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85, 
1165 /* b0 */        0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 0x92, 
1166 /* b8 */        0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 0xea, 
1167 /* c0 */        0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 0xe2, 0xe3, 
1168 /* c8 */        0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 0xfa, 0xf8, 
1169 /* d0 */        0xfe, 0xff, 0xfc, 0xfd, 0xf2, 0xf3, 0xf0, 0xf1, 
1170 /* d8 */        0xf6, 0xf7, 0xf4, 0xf5, 0xcb, 0xc9, 0xcf, 0xcd, 
1171 /* e0 */        0xc2, 0xc3, 0xc0, 0xc1, 0xc6, 0xc7, 0xc4, 0xc5, 
1172 /* e8 */        0xda, 0xdb, 0xd8, 0xd9, 0xde, 0xdf, 0xdc, 0xdd, 
1173 /* f0 */        0xd2, 0xd2, 0xd3, 0xd3, 0xd0, 0xd0, 0xd1, 0xd1, 
1174 /* f8 */        0xd6, 0xd6, 0xd7, 0xd7, 0xd4, 0xd4, 0xd5, 0xd5
1175 };
1176   
1177 /*---------------------------------------------------------------------------*
1178  *      reverse bits in a byte
1179  *---------------------------------------------------------------------------*/
1180 static unsigned char bitreverse[256] = {
1181 /* 00 */        0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 
1182 /* 08 */        0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 
1183 /* 10 */        0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 
1184 /* 18 */        0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 
1185 /* 20 */        0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 
1186 /* 28 */        0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 
1187 /* 30 */        0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 
1188 /* 38 */        0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 
1189 /* 40 */        0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 
1190 /* 48 */        0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 
1191 /* 50 */        0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 
1192 /* 58 */        0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 
1193 /* 60 */        0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 
1194 /* 68 */        0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 
1195 /* 70 */        0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 
1196 /* 78 */        0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 
1197 /* 80 */        0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 
1198 /* 88 */        0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 
1199 /* 90 */        0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 
1200 /* 98 */        0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 
1201 /* a0 */        0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 
1202 /* a8 */        0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 
1203 /* b0 */        0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 
1204 /* b8 */        0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 
1205 /* c0 */        0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 
1206 /* c8 */        0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 
1207 /* d0 */        0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 
1208 /* d8 */        0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 
1209 /* e0 */        0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 
1210 /* e8 */        0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 
1211 /* f0 */        0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 
1212 /* f8 */        0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
1213 };
1214
1215 static u_char sinetab[8000] = { 213, 213, 213, 213, 213, 213, 213, 212,
1216 212, 212, 212, 212, 212, 215, 215, 215, 215, 215, 215, 214, 214,
1217 214, 214, 214, 214, 209, 209, 209, 209, 209, 209, 209, 208, 208,
1218 208, 208, 208, 208, 211, 211, 211, 211, 211, 211, 210, 210, 210,
1219 210, 210, 210, 221, 221, 221, 221, 221, 221, 220, 220, 220, 220,
1220 220, 220, 220, 223, 223, 223, 223, 223, 223, 222, 222, 222, 222,
1221 222, 222, 217, 217, 217, 217, 217, 217, 216, 216, 216, 216, 216,
1222 216, 216, 219, 219, 219, 219, 219, 219, 218, 218, 218, 218, 218,
1223 218, 197, 197, 197, 197, 197, 197, 196, 196, 196, 196, 196, 196,
1224 196, 199, 199, 199, 199, 199, 199, 198, 198, 198, 198, 198, 198,
1225 193, 193, 193, 193, 193, 193, 192, 192, 192, 192, 192, 192, 192,
1226 195, 195, 195, 195, 195, 195, 194, 194, 194, 194, 194, 194, 205,
1227 205, 205, 205, 205, 205, 204, 204, 204, 204, 204, 204, 204, 207,
1228 207, 207, 207, 207, 207, 206, 206, 206, 206, 206, 206, 201, 201,
1229 201, 201, 201, 201, 200, 200, 200, 200, 200, 200, 200, 203, 203,
1230 203, 203, 203, 203, 202, 202, 202, 202, 202, 202, 245, 245, 245,
1231 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 244, 244, 244,
1232 244, 244, 244, 244, 244, 244, 244, 244, 244, 247, 247, 247, 247,
1233 247, 247, 247, 247, 247, 247, 247, 247, 247, 246, 246, 246, 246,
1234 246, 246, 246, 246, 246, 246, 246, 246, 246, 241, 241, 241, 241,
1235 241, 241, 241, 241, 241, 241, 241, 241, 240, 240, 240, 240, 240,
1236 240, 240, 240, 240, 240, 240, 240, 240, 243, 243, 243, 243, 243,
1237 243, 243, 243, 243, 243, 243, 243, 243, 242, 242, 242, 242, 242,
1238 242, 242, 242, 242, 242, 242, 242, 242, 253, 253, 253, 253, 253,
1239 253, 253, 253, 253, 253, 253, 253, 253, 252, 252, 252, 252, 252,
1240 252, 252, 252, 252, 252, 252, 252, 255, 255, 255, 255, 255, 255,
1241 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254, 254,
1242 254, 254, 254, 254, 254, 254, 254, 249, 249, 249, 249, 249, 249,
1243 249, 249, 249, 249, 249, 249, 249, 248, 248, 248, 248, 248, 248,
1244 248, 248, 248, 248, 248, 248, 248, 251, 251, 251, 251, 251, 251,
1245 251, 251, 251, 251, 251, 251, 251, 250, 250, 250, 250, 250, 250,
1246 250, 250, 250, 250, 250, 250, 250, 229, 229, 229, 229, 229, 229,
1247 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1248 229, 229, 229, 229, 229, 229, 229, 228, 228, 228, 228, 228, 228,
1249 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1250 228, 228, 228, 228, 228, 228, 228, 228, 231, 231, 231, 231, 231,
1251 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1252 231, 231, 231, 231, 231, 231, 231, 231, 231, 230, 230, 230, 230,
1253 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1254 230, 230, 230, 230, 230, 230, 230, 230, 230, 225, 225, 225, 225,
1255 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1256 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 224, 224,
1257 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1258 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 227,
1259 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1260 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1261 227, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1262 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1263 226, 226, 226, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1264 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1265 237, 237, 237, 237, 237, 236, 236, 236, 236, 236, 236, 236, 236,
1266 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1267 236, 236, 236, 236, 236, 236, 236, 236, 239, 239, 239, 239, 239,
1268 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1269 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 238, 238,
1270 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1271 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1272 238, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1273 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1274 233, 233, 233, 233, 233, 232, 232, 232, 232, 232, 232, 232, 232,
1275 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1276 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 235, 235, 235,
1277 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1278 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1279 235, 235, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1280 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1281 234, 234, 234, 234, 234, 234, 234, 149, 149, 149, 149, 149, 149,
1282 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1283 149, 149, 149, 149, 149, 149, 149, 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, 148, 148, 148, 148, 148, 148,
1287 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1288 148, 148, 148, 148, 148, 148, 148, 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, 151, 151, 151,
1292 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1293 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 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, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1298 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1299 150, 150, 150, 150, 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, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1304 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1305 145, 145, 145, 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, 144, 144, 144, 144, 144,
1310 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1311 144, 144, 144, 144, 144, 144, 144, 144, 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, 147, 147, 147, 147,
1317 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1318 147, 147, 147, 147, 147, 147, 147, 147, 147, 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, 146, 146, 146,
1325 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1326 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 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, 157, 157, 157, 157, 157, 157, 157,
1335 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1336 157, 157, 157, 157, 157, 157, 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 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1349 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
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, 157, 157, 157, 157, 157, 157,
1391 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1392 157, 157, 157, 157, 157, 157, 157, 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, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1405 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1406 146, 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, 147, 147, 147,
1414 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1415 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 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, 144, 144,
1422 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1423 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 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, 145,
1429 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1430 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 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, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1436 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1437 150, 150, 150, 150, 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, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1442 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1443 151, 151, 151, 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, 148, 148, 148,
1447 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1448 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 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 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1453 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
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 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1458 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1459 234, 234, 234, 234, 234, 235, 235, 235, 235, 235, 235, 235, 235,
1460 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1461 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 232, 232, 232,
1462 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1463 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1464 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1465 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1466 233, 233, 233, 233, 233, 233, 238, 238, 238, 238, 238, 238, 238,
1467 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1468 238, 238, 238, 238, 238, 238, 238, 238, 238, 239, 239, 239, 239,
1469 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1470 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 236,
1471 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1472 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1473 236, 236, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1474 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1475 237, 237, 237, 237, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1476 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1477 226, 226, 226, 226, 226, 226, 227, 227, 227, 227, 227, 227, 227,
1478 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1479 227, 227, 227, 227, 227, 227, 227, 227, 224, 224, 224, 224, 224,
1480 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1481 224, 224, 224, 224, 224, 224, 224, 224, 224, 225, 225, 225, 225,
1482 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1483 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 230, 230,
1484 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1485 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 231, 231,
1486 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1487 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 228,
1488 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1489 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1490 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1491 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1492 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
1493 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
1494 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
1495 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
1496 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
1497 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
1498 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 253,
1499 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 242,
1500 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 243,
1501 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 240,
1502 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241,
1503 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 246, 246,
1504 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 247, 247,
1505 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 244, 244,
1506 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 245, 245, 245,
1507 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 202, 202, 202,
1508 202, 202, 202, 203, 203, 203, 203, 203, 203, 200, 200, 200, 200,
1509 200, 200, 200, 201, 201, 201, 201, 201, 201, 206, 206, 206, 206,
1510 206, 206, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 204,
1511 204, 204, 205, 205, 205, 205, 205, 205, 194, 194, 194, 194, 194,
1512 194, 195, 195, 195, 195, 195, 195, 192, 192, 192, 192, 192, 192,
1513 192, 193, 193, 193, 193, 193, 193, 198, 198, 198, 198, 198, 198,
1514 199, 199, 199, 199, 199, 199, 196, 196, 196, 196, 196, 196, 196,
1515 197, 197, 197, 197, 197, 197, 218, 218, 218, 218, 218, 218, 219,
1516 219, 219, 219, 219, 219, 216, 216, 216, 216, 216, 216, 216, 217,
1517 217, 217, 217, 217, 217, 222, 222, 222, 222, 222, 222, 223, 223,
1518 223, 223, 223, 223, 220, 220, 220, 220, 220, 220, 220, 221, 221,
1519 221, 221, 221, 221, 210, 210, 210, 210, 210, 210, 211, 211, 211,
1520 211, 211, 211, 208, 208, 208, 208, 208, 208, 209, 209, 209, 209,
1521 209, 209, 209, 214, 214, 214, 214, 214, 214, 215, 215, 215, 215,
1522 215, 215, 212, 212, 212, 212, 212, 212, 213, 213, 213, 213, 213,
1523 213, 213, 90, 90, 90, 85, 85, 85, 85, 85, 85, 84, 84, 84, 84, 84,
1524 84, 87, 87, 87, 87, 87, 87, 86, 86, 86, 86, 86, 86, 81, 81, 81,
1525 81, 81, 81, 81, 80, 80, 80, 80, 80, 80, 83, 83, 83, 83, 83, 83,
1526 82, 82, 82, 82, 82, 82, 93, 93, 93, 93, 93, 93, 93, 92, 92, 92,
1527 92, 92, 92, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 89,
1528 89, 89, 89, 89, 89, 88, 88, 88, 88, 88, 88, 88, 91, 91, 91, 91,
1529 91, 91, 90, 90, 90, 90, 90, 90, 69, 69, 69, 69, 69, 69, 68, 68,
1530 68, 68, 68, 68, 68, 71, 71, 71, 71, 71, 71, 70, 70, 70, 70, 70,
1531 70, 65, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 64, 64, 67, 67,
1532 67, 67, 67, 67, 66, 66, 66, 66, 66, 66, 77, 77, 77, 77, 77, 77,
1533 76, 76, 76, 76, 76, 76, 76, 79, 79, 79, 79, 79, 79, 78, 78, 78,
1534 78, 78, 78, 73, 73, 73, 73, 73, 73, 73, 72, 72, 72, 72, 72, 72,
1535 75, 75, 75, 75, 75, 75, 74, 74, 74, 74, 74, 74, 117, 117, 117, 117,
1536 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116,
1537 116, 116, 116, 116, 116, 116, 116, 116, 116, 119, 119, 119, 119,
1538 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118,
1539 118, 118, 118, 118, 118, 118, 118, 118, 113, 113, 113, 113, 113,
1540 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112,
1541 112, 112, 112, 112, 112, 112, 112, 115, 115, 115, 115, 115, 115,
1542 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114,
1543 114, 114, 114, 114, 114, 114, 114, 125, 125, 125, 125, 125, 125,
1544 125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 124,
1545 124, 124, 124, 124, 124, 124, 124, 127, 127, 127, 127, 127, 127,
1546 127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126,
1547 126, 126, 126, 126, 126, 126, 121, 121, 121, 121, 121, 121, 121,
1548 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120,
1549 120, 120, 120, 120, 120, 120, 123, 123, 123, 123, 123, 123, 123,
1550 123, 123, 123, 123, 123, 123, 122, 122, 122, 122, 122, 122, 122,
1551 122, 122, 122, 122, 122, 122, 101, 101, 101, 101, 101, 101, 101,
1552 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1553 101, 101, 101, 101, 101, 101, 101, 100, 100, 100, 100, 100, 100,
1554 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1555 100, 100, 100, 100, 100, 100, 100, 103, 103, 103, 103, 103, 103,
1556 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1557 103, 103, 103, 103, 103, 103, 103, 103, 102, 102, 102, 102, 102,
1558 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1559 102, 102, 102, 102, 102, 102, 102, 102, 102, 97, 97, 97, 97, 97,
1560 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1561 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1562 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1563 96, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1564 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 98, 98, 98,
1565 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1566 98, 98, 98, 98, 98, 98, 98, 98, 98, 109, 109, 109, 109, 109, 109,
1567 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1568 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 108, 108, 108,
1569 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1570 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 111,
1571 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1572 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1573 111, 111, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1574 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1575 110, 110, 110, 110, 110, 110, 105, 105, 105, 105, 105, 105, 105,
1576 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1577 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 104,
1578 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1579 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1580 104, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1581 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1582 107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 106,
1583 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1584 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 21,
1585 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1586 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 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 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1590 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
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, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1594 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1595 23, 23, 23, 23, 23, 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, 22, 22, 22,
1598 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1599 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 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, 17, 17, 17, 17, 17, 17,
1603 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1604 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 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, 16, 16,
1608 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1609 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 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, 19, 19, 19, 19, 19, 19,
1614 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1615 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 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, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1621 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1622 18, 18, 18, 18, 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, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1629 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1630 29, 29, 29, 29, 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, 28, 28, 28, 28, 28, 28,
1640 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1641 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 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, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1673 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1674 29, 29, 29, 29, 29, 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, 18, 18, 18, 18, 18,
1684 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1685 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 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, 19, 19, 19, 19, 19,
1692 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1693 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 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, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1699 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1700 16, 16, 16, 16, 16, 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, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1705 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1706 17, 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, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1710 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1711 22, 22, 22, 22, 22, 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, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1715 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1716 23, 23, 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, 20, 20, 20, 20, 20, 20,
1719 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1720 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 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, 21,
1723 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1724 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 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 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1728 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1729 106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 107,
1730 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1731 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 104, 104,
1732 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1733 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1734 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1735 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1736 105, 105, 105, 105, 105, 105, 110, 110, 110, 110, 110, 110, 110,
1737 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1738 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111,
1739 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1740 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1741 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1742 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1743 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1744 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1745 109, 109, 109, 109, 109, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1746 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1747 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1748 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 96, 96,
1749 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1750 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97,
1751 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1752 97, 97, 97, 97, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1753 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1754 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1755 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1756 103, 103, 103, 103, 103, 100, 100, 100, 100, 100, 100, 100, 100,
1757 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1758 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 101, 101,
1759 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1760 101, 101, 101, 101, 101, 101, 122, 122, 122, 122, 122, 122, 122,
1761 122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 123,
1762 123, 123, 123, 123, 123, 123, 120, 120, 120, 120, 120, 120, 120,
1763 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121,
1764 121, 121, 121, 121, 121, 121, 126, 126, 126, 126, 126, 126, 126,
1765 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127,
1766 127, 127, 127, 127, 127, 124, 124, 124, 124, 124, 124, 124, 124,
1767 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125,
1768 125, 125, 125, 125, 125, 114, 114, 114, 114, 114, 114, 114, 114,
1769 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115,
1770 115, 115, 115, 115, 115, 112, 112, 112, 112, 112, 112, 112, 112,
1771 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1772 113, 113, 113, 113, 118, 118, 118, 118, 118, 118, 118, 118, 118,
1773 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119,
1774 119, 119, 119, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
1775 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
1776 117, 117, 117, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 72,
1777 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 78, 78, 78, 78,
1778 78, 78, 79, 79, 79, 79, 79, 79, 76, 76, 76, 76, 76, 76, 76, 77,
1779 77, 77, 77, 77, 77, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67,
1780 67, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 70, 70,
1781 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 68, 68, 68, 68, 68, 68,
1782 68, 69, 69, 69, 69, 69, 69, 90, 90, 90, 90, 90, 90, 91, 91, 91,
1783 91, 91, 91, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89,
1784 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 92, 92, 92, 92,
1785 92, 92, 93, 93, 93, 93, 93, 93, 93, 82, 82, 82, 82, 82, 82, 83,
1786 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81,
1787 81, 81, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 84, 84,
1788 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 90, 90, 90 };
1789
1790 /*===========================================================================*/
1791
1792 #endif /* NI4BTEL > 0 */