Merge from vendor branch BINUTILS:
[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.7 2003/08/07 21:17:25 dillon Exp $
32  *
33  *      last edit-date: [Sat Aug 11 18:07:05 2001]
34  *
35  *---------------------------------------------------------------------------*/
36
37 #include "use_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 <net/i4b/include/machine/i4b_ioctl.h>
62 #include <net/i4b/include/machine/i4b_tel_ioctl.h>
63 #include <net/i4b/include/machine/i4b_debug.h>
64
65 #include "../include/i4b_global.h"
66 #include "../include/i4b_mbuf.h"
67 #include "../include/i4b_l3l4.h"
68 #include "../layer4/i4b_l4.h"
69
70 /* minor number: lower 6 bits = unit number */
71
72 #define UNITBITS        6
73 #define UNITMASK        0x3f
74 #define UNIT(n)         (minor(n) & UNITMASK)
75
76 /* minor number: upper 2 bits = function number */
77
78 #define FUNCMASK        0x03
79 #define FUNC(n)         (((minor(n)) >> UNITBITS) & FUNCMASK)
80
81 #define FUNCTEL         0       /* 0 = normal i4btel device     */
82 #define FUNCDIAL        1       /* 1 = i4bteld dialout device   */
83
84 #define NOFUNCS         2       /* number of device classes     */
85
86 typedef struct {
87
88         /* used only in func = FUNCTEL */
89
90         drvr_link_t             drvr_linktab;   /* driver linktab */
91         isdn_link_t             *isdn_linktab;  /* isdn linktab */
92         int                     audiofmt;       /* audio format conversion */
93         u_char                  *rcvttab;       /* conversion table on read */
94         u_char                  *wcvttab;       /* conversion table on write */
95         call_desc_t             *cdp;           /* call descriptor pointer */
96
97         /* used only in func = FUNCDIAL */
98
99         char                    result;         /* result code for dial dev */  
100
101         /* used in func = FUNCDIAL and func = FUNCTEL*/
102         
103         int                     devstate;       /* state of this unit   */
104 #define ST_IDLE         0x00            /* idle */
105 #define ST_CONNECTED    0x01            /* isdn connected state */
106 #define ST_ISOPEN       0x02            /* userland opened */
107 #define ST_RDWAITDATA   0x04            /* userland read waiting */
108 #define ST_WRWAITEMPTY  0x08            /* userland write waiting */
109 #define ST_TONE         0x10            /* tone generator */
110
111         struct selinfo          selp;           /* select / poll */
112
113         struct i4b_tel_tones    tones;
114         int                     toneidx;
115         int                     toneomega;
116         int                     tonefreq;
117
118 } tel_sc_t;
119
120 static tel_sc_t tel_sc[NI4BTEL][NOFUNCS];
121         
122 /* forward decl */
123
124 static void tel_rx_data_rdy(int unit);
125 static void tel_tx_queue_empty(int unit);
126 static void tel_init_linktab(int unit);
127 static void tel_connect(int unit, void *cdp);
128 static void tel_disconnect(int unit, void *cdp);
129 static void tel_tone(tel_sc_t *sc);
130
131 /* audio format conversion tables */
132 static unsigned char a2u_tab[];
133 static unsigned char u2a_tab[];
134 static unsigned char bitreverse[];
135 static u_char sinetab[];
136
137 #define PDEVSTATIC      static
138
139 PDEVSTATIC d_open_t     i4btelopen;
140 PDEVSTATIC d_close_t    i4btelclose;
141 PDEVSTATIC d_read_t     i4btelread;
142 PDEVSTATIC d_read_t     i4btelwrite;
143 PDEVSTATIC d_ioctl_t    i4btelioctl;
144
145 #ifdef OS_USES_POLL
146 PDEVSTATIC d_poll_t i4btelpoll;
147 #define POLLFIELD i4btelpoll
148 #else
149 PDEVSTATIC d_select_t i4btelsel;
150 #define POLLFIELD i4btelsel
151 #endif
152
153 #define CDEV_MAJOR 56
154
155 static struct cdevsw i4btel_cdevsw = {
156         /* name */      "i4btel",
157         /* maj */       CDEV_MAJOR,
158         /* flags */     0,
159         /* port */      NULL,
160         /* autoq */     0,
161
162         /* open */      i4btelopen,
163         /* close */     i4btelclose,
164         /* read */      i4btelread,
165         /* write */     i4btelwrite,
166         /* ioctl */     i4btelioctl,
167         /* poll */      POLLFIELD,
168         /* mmap */      nommap,
169         /* strategy */  nostrategy,
170         /* dump */      nodump,
171         /* psize */     nopsize
172 };
173
174 PDEVSTATIC void i4btelinit(void *unused);
175 PDEVSTATIC void i4btelattach(void *);
176
177 PSEUDO_SET(i4btelattach, i4b_tel);
178
179 /*===========================================================================*
180  *                      DEVICE DRIVER ROUTINES
181  *===========================================================================*/
182
183 /*---------------------------------------------------------------------------*
184  *      initialization at kernel load time
185  *---------------------------------------------------------------------------*/
186 PDEVSTATIC void
187 i4btelinit(void *unused)
188 {
189         cdevsw_add(&i4btel_cdevsw);
190 }
191
192 SYSINIT(i4bteldev, SI_SUB_DRIVERS,
193         SI_ORDER_MIDDLE+CDEV_MAJOR, &i4btelinit, NULL);
194
195 /*---------------------------------------------------------------------------*
196  *      interface attach routine
197  *---------------------------------------------------------------------------*/
198 PDEVSTATIC void
199 i4btelattach(void *dummy)
200 {
201         int i, j;
202
203         printf("i4btel: %d ISDN telephony interface device(s) attached\n", NI4BTEL);
204         
205         for(i=0; i < NI4BTEL; i++)
206         {
207                 for(j=0; j < NOFUNCS; j++)
208                 {
209                         tel_sc[i][j].devstate = ST_IDLE;
210                         tel_sc[i][j].audiofmt = CVT_NONE;
211                         tel_sc[i][j].rcvttab = 0;
212                         tel_sc[i][j].wcvttab = 0;
213                         tel_sc[i][j].result = 0;
214
215                         switch(j)
216                         {
217                                 case FUNCTEL:   /* normal i4btel device */
218                                         make_dev(&i4btel_cdevsw, i,
219                                                 UID_ROOT, GID_WHEEL,
220                                                 0600, "i4btel%d", i);
221                                         break;
222                                 
223                                 case FUNCDIAL:  /* i4bteld dialout device */
224                                         make_dev(&i4btel_cdevsw, i+(1<<UNITBITS),
225                                                 UID_ROOT, GID_WHEEL,
226                                                 0600, "i4bteld%d", i);
227                                         break;
228                         }
229                 }
230                 tel_init_linktab(i);            
231         }
232 }
233
234 /*---------------------------------------------------------------------------*
235  *      open tel device
236  *---------------------------------------------------------------------------*/
237 PDEVSTATIC int
238 i4btelopen(dev_t dev, int flag, int fmt, struct thread *td)
239 {
240         int unit = UNIT(dev);
241         int func = FUNC(dev);
242         
243         tel_sc_t *sc;
244         
245         if(unit >= NI4BTEL)
246                 return(ENXIO);
247
248         sc = &tel_sc[unit][func];               
249
250         if(sc->devstate & ST_ISOPEN)
251                 return(EBUSY);
252
253         sc->devstate |= ST_ISOPEN;              
254
255         if(func == FUNCDIAL)
256         {
257                 sc->result = 0;
258         }
259         
260         return(0);
261 }
262
263 /*---------------------------------------------------------------------------*
264  *      close tel device
265  *---------------------------------------------------------------------------*/
266 PDEVSTATIC int
267 i4btelclose(dev_t dev, int flag, int fmt, struct thread *td)
268 {
269         int unit = UNIT(dev);
270         int func = FUNC(dev);
271         tel_sc_t *sc;
272         int error = 0;
273         int x;
274         
275         if(unit > NI4BTEL)
276                 return(ENXIO);
277
278         sc = &tel_sc[unit][func];               
279
280         x = splimp();
281         sc->devstate &= ~ST_TONE;               
282
283         if((func == FUNCTEL) &&
284            (sc->isdn_linktab != NULL && sc->isdn_linktab->tx_queue != NULL))
285         {
286                 while(!(IF_QEMPTY(sc->isdn_linktab->tx_queue)))
287                 {
288                         sc->devstate |= ST_WRWAITEMPTY;
289         
290                         if((error = tsleep((caddr_t) &sc->isdn_linktab->tx_queue,
291                                         PCATCH, "wtcl", 0)) != 0)
292                         {
293                                 break;
294                         }
295                 }
296                 sc->devstate &= ~ST_WRWAITEMPTY;                
297         }
298
299         sc->devstate &= ~ST_ISOPEN;             
300         splx(x);
301         wakeup((caddr_t) &sc->tones);
302
303         return(error);
304 }
305
306 /*---------------------------------------------------------------------------*
307  *      i4btelioctl - device driver ioctl routine
308  *---------------------------------------------------------------------------*/
309 PDEVSTATIC int
310 i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
311 {
312         int unit = UNIT(dev);
313         int func = FUNC(dev);
314         int error = 0;
315         struct mbuf *m;
316         int s;
317
318         tel_sc_t *sc = &tel_sc[unit][func];
319
320         if(func == FUNCTEL)
321         {
322                 switch(cmd)
323                 {
324                         case I4B_TEL_GETAUDIOFMT:
325                                 *(int *)data = sc->audiofmt;
326                                 break;
327                         
328                         case I4B_TEL_SETAUDIOFMT:
329                                 switch (*(int *)data)
330                                 {
331                                         case CVT_NONE:
332                                                 sc->rcvttab = 0;
333                                                 sc->wcvttab = 0;
334                                                 break;
335                                         case CVT_ALAW2ULAW:
336                                                 /* ISDN: a-law */
337                                                 /* user: u-law */ 
338                                                 sc->rcvttab = a2u_tab;
339                                                 sc->wcvttab = u2a_tab;
340                                                 break;
341                                         case CVT_ULAW2ALAW:
342                                                 /* ISDN: u-law */
343                                                 /* user: a-law */ 
344                                                 sc->rcvttab = u2a_tab;
345                                                 sc->wcvttab = a2u_tab;
346                                                 break;
347                                         default:
348                                                 error = ENODEV;
349                                                 break;
350                                 }
351                                 if(error == 0)
352                                         sc->audiofmt = *(int *)data;
353                                 break;
354         
355                         case I4B_TEL_EMPTYINPUTQUEUE:
356                                 s = splimp();
357                                 while((sc->devstate & ST_CONNECTED)     &&
358                                         (sc->devstate & ST_ISOPEN)      &&
359                                         !IF_QEMPTY(sc->isdn_linktab->rx_queue))
360                                 {
361                                         IF_DEQUEUE(sc->isdn_linktab->rx_queue, m);
362                                         if(m)
363                                                 i4b_Bfreembuf(m);
364                                 }
365                                 splx(s);
366                                 break;
367
368                         case I4B_TEL_VR_REQ:
369                         {
370                                 msg_vr_req_t *mvr;
371
372                                 mvr = (msg_vr_req_t *)data;
373
374                                 mvr->version = VERSION;
375                                 mvr->release = REL;
376                                 mvr->step = STEP;                       
377                                 break;
378                         }
379                         case I4B_TEL_TONES:
380                         {
381                                 struct i4b_tel_tones *tt;
382
383                                 tt = (struct i4b_tel_tones *)data;
384                                 s = splimp();
385                                 while ((sc->devstate & ST_TONE) && 
386                                     sc->tones.duration[sc->toneidx] != 0) {
387                                         if((error = tsleep((caddr_t) &sc->tones,
388                                             PCATCH, "rtone", 0 )) != 0) {
389                                                 splx(s);
390                                                 return(error);
391                                         }
392                                 } 
393                                 if(!(sc->devstate & ST_ISOPEN)) {
394                                         splx(s);
395                                         return (EIO);
396                                 }
397                                 if(!(sc->devstate & ST_CONNECTED)) {
398                                         splx(s);
399                                         return (EIO);
400                                 }
401
402                                 sc->tones = *tt;
403                                 sc->toneidx = 0;
404                                 sc->tonefreq = tt->frequency[0];
405                                 sc->devstate |= ST_TONE;
406                                 splx(s);
407                                 tel_tone(sc);
408                                 break;
409                         }
410         
411                         default:
412                                 error = ENOTTY;
413                                 break;
414                 }
415         }
416         else if(func == FUNCDIAL)
417         {
418                 switch(cmd)
419                 {
420                         default:
421                                 error = ENOTTY;
422                                 break;
423                 }
424         }               
425         return(error);
426 }
427
428 /*---------------------------------------------------------------------------*
429  *      read from tel device
430  *---------------------------------------------------------------------------*/
431 PDEVSTATIC int
432 i4btelread(dev_t dev, struct uio *uio, int ioflag)
433 {
434         int unit = UNIT(dev);
435         int func = FUNC(dev);
436
437         struct mbuf *m;
438         int s;
439         int error = 0;
440
441         tel_sc_t *sc = &tel_sc[unit][func];
442         
443         if(!(sc->devstate & ST_ISOPEN))
444                 return(EIO);
445
446         if(func == FUNCTEL)
447         {
448                 s = splimp();
449                 IF_LOCK(sc->isdn_linktab->rx_queue);
450
451                 while((sc->devstate & ST_ISOPEN)        &&
452                       (sc->devstate & ST_CONNECTED)     &&
453                       IF_QEMPTY(sc->isdn_linktab->rx_queue))            
454                 {
455                         sc->devstate |= ST_RDWAITDATA;
456
457                         NDBGL4(L4_TELDBG, "i4btel%d, queue empty!", unit);
458
459 #if defined (__FreeBSD__) && __FreeBSD__ > 4
460                         if((error = msleep((caddr_t) &sc->isdn_linktab->rx_queue,
461                                         &sc->isdn_linktab->rx_queue->ifq_mtx,
462                                         TTIPRI | PCATCH,
463                                         "rtel", 0 )) != 0)
464 #else
465                         if((error = tsleep((caddr_t) &sc->isdn_linktab->rx_queue,
466                                                 PCATCH, "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                         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                                                 PCATCH, "rtel1", 0 )) != 0)
531                         {
532                                 sc->devstate &= ~ST_RDWAITDATA;
533                                 splx(s);
534                                 return(error);
535                         }
536                 }
537         
538                 if(!(sc->devstate & ST_ISOPEN))
539                 {
540                         splx(s);
541                         return(EIO);
542                 }
543         
544                 if(sc->result != 0)
545                 {
546                         error = uiomove(&sc->result, 1, uio);
547                         sc->result = 0;
548                 }
549                 else
550                 {
551                         error = EIO;
552                 }
553
554                 splx(s);                        
555         }
556         return(error);
557 }
558
559 /*---------------------------------------------------------------------------*
560  *      write to tel device
561  *---------------------------------------------------------------------------*/
562 PDEVSTATIC int
563 i4btelwrite(dev_t dev, struct uio * uio, int ioflag)
564 {
565         int unit = UNIT(dev);
566         int func = FUNC(dev);
567         struct mbuf *m;
568         int s;
569         int error = 0;
570         tel_sc_t *sc = &tel_sc[unit][func];
571         
572         if(!(sc->devstate & ST_ISOPEN))
573         {
574                 return(EIO);
575         }
576
577         if(func == FUNCTEL)
578         {
579                 s = splimp();
580                 
581                 if(!(sc->devstate & ST_CONNECTED)) {
582                         splx(s);
583                         return(EIO);
584                 }
585                         
586                 sc->devstate &= ~ST_TONE;               
587                 IF_LOCK(sc->isdn_linktab->tx_queue);
588                 while((_IF_QFULL(sc->isdn_linktab->tx_queue)) &&
589                       (sc->devstate & ST_ISOPEN))
590                 {
591                         sc->devstate |= ST_WRWAITEMPTY;
592
593 #if defined (__FreeBSD__) && __FreeBSD__ > 4    
594                         if((error = msleep((caddr_t) &sc->isdn_linktab->tx_queue,
595                                         &sc->isdn_linktab->tx_queue->ifq_mtx,
596                                         TTIPRI | PCATCH, "wtel", 0)) != 0)
597 #else
598                         if((error = tsleep((caddr_t) &sc->isdn_linktab->tx_queue,
599                                         PCATCH, "wtel", 0)) != 0)
600 #endif                                  
601                         {
602                                 sc->devstate &= ~ST_WRWAITEMPTY;
603                                 IF_UNLOCK(sc->isdn_linktab->tx_queue);
604                                 splx(s);
605                                 return(error);
606                         }
607                 }
608                 IF_UNLOCK(sc->isdn_linktab->tx_queue);
609         
610                 if(!(sc->devstate & ST_ISOPEN))
611                 {
612                         splx(s);
613                         return(EIO);
614                 }
615         
616                 if(!(sc->devstate & ST_CONNECTED))
617                 {
618                         splx(s);
619                         return(EIO);
620                 }
621
622                 if((m = i4b_Bgetmbuf(BCH_MAX_DATALEN)) != NULL)
623                 {
624                         int i;
625                         
626                         m->m_len = min(BCH_MAX_DATALEN, uio->uio_resid);
627         
628                         error = uiomove(m->m_data, m->m_len, uio);
629         
630                         for(i = 0; i < m->m_len; i++)
631                         {
632                                 /* convert if necessary */
633                                 if(sc->wcvttab)
634                                         mtod(m,u_char *)[i] = sc->wcvttab[mtod(m,u_char *)[i]];
635
636                                 /* always reverse bitorder to line */
637                                 mtod(m,u_char *)[i] = bitreverse[mtod(m,u_char *)[i]];
638                         }
639
640 #if defined (__FreeBSD__) && __FreeBSD__ > 4                    
641                         (void) IF_HANDOFF(sc->isdn_linktab->tx_queue, m, NULL);
642 #else
643                         if(IF_QFULL(sc->isdn_linktab->tx_queue))
644                                 m_freem(m);
645                         else
646                                 IF_ENQUEUE(sc->isdn_linktab->tx_queue, m);
647 #endif                  
648                         (*sc->isdn_linktab->bch_tx_start)(sc->isdn_linktab->unit, sc->isdn_linktab->channel);
649                 }
650         
651                 splx(s);
652         }
653         else if(func == FUNCDIAL)
654         {
655 #define CMDBUFSIZ 80 
656                 char cmdbuf[CMDBUFSIZ];
657                 int len = min(CMDBUFSIZ-1, uio->uio_resid);
658         
659                 error = uiomove(cmdbuf, len, uio);
660
661                 if(cmdbuf[0] == CMD_DIAL)
662                 {
663                         i4b_l4_dialoutnumber(BDRV_TEL, unit, len-1, &cmdbuf[1]);
664                 }
665                 else if(cmdbuf[0] == CMD_HUP)
666                 {
667                         i4b_l4_drvrdisc(BDRV_TEL, unit);
668                 }
669                 else if(cmdbuf[0] == CMD_KEYP)
670                 {
671                         i4b_l4_keypad(BDRV_TEL, unit, len-1, &cmdbuf[1]);
672                 }
673         }
674         else
675         {
676                 error = EIO;
677         }               
678         
679         return(error);
680 }
681
682 /*---------------------------------------------------------------------------*
683  *      
684  *---------------------------------------------------------------------------*/
685 #define NTONESAMP 32
686 static void
687 tel_tone(tel_sc_t *sc)
688 {
689         struct mbuf *m;
690         u_char *p;
691         int i;
692
693         if((m = i4b_Bgetmbuf(NTONESAMP)) == NULL) {
694                 printf("no mbuf in tel_tone\n");
695                 return;
696         }
697         p = m->m_data;
698         m->m_len = 0;
699         for (i = 0; i < NTONESAMP && (sc->devstate & ST_TONE); i++) {
700
701                 if (sc->tones.duration[sc->toneidx] > 0) {
702                         if (--sc->tones.duration[sc->toneidx] == 0) {
703                                 sc->toneidx++;
704                                 if (sc->toneidx == I4B_TEL_MAXTONES) {
705                                         sc->devstate &= ~ST_TONE;
706                                         sc->toneomega = 0;
707                                         sc->tonefreq = 0;
708                                 } else if (sc->tones.frequency[sc->toneidx] == 0 &&
709                                            sc->tones.duration[sc->toneidx] == 0) {
710                                         sc->devstate &= ~ST_TONE;
711                                         sc->toneomega = 0;
712                                         sc->tonefreq = 0;
713                                 } else {
714                                         sc->tonefreq = sc->tones.frequency[sc->toneidx];
715                                 }
716                                 if (sc->tones.duration[sc->toneidx] == 0) {
717                                         wakeup((caddr_t) &sc->tones);
718                                 }
719                         }
720                 }
721
722                 sc->toneomega += sc->tonefreq;
723                 if (sc->toneomega >= 8000)
724                         sc->toneomega -= 8000;
725                 *p++ = bitreverse[sinetab[sc->toneomega]];
726                 m->m_len++;
727         }
728         IF_ENQUEUE(sc->isdn_linktab->tx_queue, m);
729         (*sc->isdn_linktab->bch_tx_start)(sc->isdn_linktab->unit, sc->isdn_linktab->channel);
730 }
731
732
733 #ifdef OS_USES_POLL
734 /*---------------------------------------------------------------------------*
735  *      device driver poll
736  *---------------------------------------------------------------------------*/
737 PDEVSTATIC int
738 i4btelpoll(dev_t dev, int events, struct thread *td)
739 {
740         int revents = 0;        /* Events we found */
741         int s;
742         int unit = UNIT(dev);
743         int func = FUNC(dev);   
744
745         tel_sc_t *sc = &tel_sc[unit][func];
746         
747         s = splhigh();
748
749         if(!(sc->devstate & ST_ISOPEN))
750         {
751                 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
752                 splx(s);
753                 return(0);
754         }
755
756         if(func == FUNCTEL)
757         {
758                 /*
759                  * Writes are OK if we are connected and the
760                  * transmit queue can take them
761                  */
762                  
763                 if((events & (POLLOUT|POLLWRNORM))      &&
764                         (sc->devstate & ST_CONNECTED)   &&
765                         (sc->isdn_linktab != NULL)      &&
766                         (!_IF_QFULL(sc->isdn_linktab->tx_queue)))
767                 {
768                         NDBGL4(L4_TELDBG, "i4btel%d, POLLOUT", unit);
769                         revents |= (events & (POLLOUT|POLLWRNORM));
770                 }
771                 
772                 /* ... while reads are OK if we have any data */
773         
774                 if((events & (POLLIN|POLLRDNORM))       &&
775                         (sc->devstate & ST_CONNECTED)   &&
776                         (sc->isdn_linktab != NULL)      &&
777                         (!IF_QEMPTY(sc->isdn_linktab->rx_queue)))
778                 {
779                         NDBGL4(L4_TELDBG, "i4btel%d, POLLIN", unit);
780                         revents |= (events & (POLLIN|POLLRDNORM));
781                 }
782                         
783                 if(revents == 0)
784                 {
785                         NDBGL4(L4_TELDBG, "i4btel%d, selrecord", unit);
786                         selrecord(td, &sc->selp);
787                 }
788         }
789         else if(func == FUNCDIAL)
790         {
791                 if(events & (POLLOUT|POLLWRNORM))
792                 {
793                         NDBGL4(L4_TELDBG, "i4bteld%d,  POLLOUT", unit);
794                         revents |= (events & (POLLOUT|POLLWRNORM));
795                 }
796
797                 if(events & (POLLIN|POLLRDNORM))
798                 {
799                         NDBGL4(L4_TELDBG, "i4bteld%d,  POLLIN, result = %d", unit, sc->result);
800                         if(sc->result != 0)
801                                 revents |= (events & (POLLIN|POLLRDNORM));
802                 }
803                         
804                 if(revents == 0)
805                 {
806                         NDBGL4(L4_TELDBG, "i4bteld%d,  selrecord", unit);
807                         selrecord(td, &sc->selp);
808                 }
809         }
810         splx(s);
811         return(revents);
812 }
813
814 #else /* OS_USES_POLL */
815
816 /*---------------------------------------------------------------------------*
817  *      device driver select
818  *---------------------------------------------------------------------------*/
819 PDEVSTATIC int
820 i4btelsel(dev_t dev, int rw, struct thread *td)
821 {
822         int s;
823         int unit = UNIT(dev);
824         int func = FUNC(dev);   
825
826         tel_sc_t *sc = &tel_sc[unit][func];
827         
828         s = splhigh();
829
830         if (!(sc->devstate & ST_ISOPEN))
831         {
832                 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
833                 splx(s);
834                 return(0);
835         }
836
837         if (func == FUNCTEL)
838         {
839                 /* Don't even bother if we're not connected */
840                 if (!(sc->devstate & ST_CONNECTED) || sc->isdn_linktab == NULL)
841                 {
842                         splx(s);
843                         return 0;
844                 }
845
846                 if (rw == FREAD)
847                 {
848                         if (!IF_QEMPTY(sc->isdn_linktab->rx_queue))
849                         {
850                                 NDBGL4(L4_TELDBG, "i4btel%d, FREAD", unit);
851                                 splx(s);
852                                 return 1;
853                         }
854                 }
855                 else if (rw == FWRITE)
856                 {
857                         if (!_IF_QFULL(sc->isdn_linktab->tx_queue))
858                         {
859                                 NDBGL4(L4_TELDBG, "i4btel%d, FWRITE", unit);
860                                 splx(s);
861                                 return 1;
862                         }
863                 }
864         }
865         else if (func == FUNCDIAL)
866         {
867                 if (rw == FWRITE)
868                 {
869                         NDBGL4(L4_TELDBG, "i4bteld%d,  FWRITE", unit);
870                         splx(s);
871                         return 1;
872                 }
873
874                 if (rw == FREAD)
875                 {
876                         NDBGL4(L4_TELDBG, "i4bteld%d,  FREAD, result = %d", unit, sc->result);
877                         if (sc->result != 0)
878                         {
879                                 splx(s);
880                                 return 1;
881                         }
882                 }
883         }
884
885         NDBGL4(L4_TELDBG, "i4bteld%d,  selrecord", unit);
886         selrecord(p, &sc->selp);
887         splx(s);
888         return 0;
889 }
890
891 #endif /* OS_USES_POLL */
892
893 /*===========================================================================*
894  *                      ISDN INTERFACE ROUTINES
895  *===========================================================================*/
896
897 /*---------------------------------------------------------------------------*
898 *       this routine is called from L4 handler at connect time
899  *---------------------------------------------------------------------------*/
900 static void
901 tel_connect(int unit, void *cdp)
902 {
903         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
904
905         /* audio device */
906         
907         sc->cdp = (call_desc_t *)cdp;
908
909         sc->devstate |= ST_CONNECTED;
910
911         /* dialer device */
912         
913         sc = &tel_sc[unit][FUNCDIAL];
914
915         if(sc->devstate == ST_ISOPEN)
916         {
917                 sc->result = RSP_CONN;
918
919                 if(sc->devstate & ST_RDWAITDATA)
920                 {
921                         sc->devstate &= ~ST_RDWAITDATA;
922                         wakeup((caddr_t) &sc->result);
923                 }
924                 selwakeup(&sc->selp);
925         }
926 }
927
928 /*---------------------------------------------------------------------------*
929  *      this routine is called from L4 handler at disconnect time
930  *---------------------------------------------------------------------------*/
931 static void
932 tel_disconnect(int unit, void *cdp)
933 {
934 /*      call_desc_t *cd = (call_desc_t *)cdp; */
935
936         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
937         
938         /* audio device */
939         
940         sc->devstate &= ~ST_CONNECTED;
941
942         if(sc->devstate & ST_RDWAITDATA)
943         {
944                 sc->devstate &= ~ST_RDWAITDATA;
945                 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
946         }
947
948         if(sc->devstate & ST_WRWAITEMPTY)
949         {
950                 sc->devstate &= ~ST_WRWAITEMPTY;
951                 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
952         }
953
954         /* dialer device */
955         
956         sc = &tel_sc[unit][FUNCDIAL];
957
958         if(sc->devstate & ST_ISOPEN)
959         {
960                 sc->result = RSP_HUP;
961
962                 if(sc->devstate & ST_RDWAITDATA)
963                 {
964                         sc->devstate &= ~ST_RDWAITDATA;
965                         wakeup((caddr_t) &sc->result);
966                 }
967                 selwakeup(&sc->selp);
968
969                 if (sc->devstate & ST_TONE) {
970                         sc->devstate &= ~ST_TONE;
971                         wakeup((caddr_t) &sc->tones);
972                 }
973         }
974 }
975
976 /*---------------------------------------------------------------------------*
977  *      feedback from daemon in case of dial problems
978  *---------------------------------------------------------------------------*/
979 static void
980 tel_dialresponse(int unit, int status, cause_t cause)
981 {       
982         tel_sc_t *sc = &tel_sc[unit][FUNCDIAL];
983
984         NDBGL4(L4_TELDBG, "i4btel%d,  status=%d, cause=0x%4x", unit, status, cause);
985
986         if((sc->devstate == ST_ISOPEN) && status)
987         {       
988                 sc->result = RSP_NOA;
989
990                 if(sc->devstate & ST_RDWAITDATA)
991                 {
992                         sc->devstate &= ~ST_RDWAITDATA;
993                         wakeup((caddr_t) &sc->result);
994                 }
995                 selwakeup(&sc->selp);
996         }
997 }
998         
999 /*---------------------------------------------------------------------------*
1000  *      interface up/down
1001  *---------------------------------------------------------------------------*/
1002 static void
1003 tel_updown(int unit, int updown)
1004 {
1005 }
1006         
1007 /*---------------------------------------------------------------------------*
1008  *      this routine is called from the HSCX interrupt handler
1009  *      when a new frame (mbuf) has been received and was put on
1010  *      the rx queue.
1011  *---------------------------------------------------------------------------*/
1012 static void
1013 tel_rx_data_rdy(int unit)
1014 {
1015         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1016         
1017         if(sc->devstate & ST_RDWAITDATA)
1018         {
1019                 sc->devstate &= ~ST_RDWAITDATA;
1020                 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
1021         }
1022         selwakeup(&sc->selp);
1023 }
1024
1025 /*---------------------------------------------------------------------------*
1026  *      this routine is called from the HSCX interrupt handler
1027  *      when the last frame has been sent out and there is no
1028  *      further frame (mbuf) in the tx queue.
1029  *---------------------------------------------------------------------------*/
1030 static void
1031 tel_tx_queue_empty(int unit)
1032 {
1033         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1034
1035         if(sc->devstate & ST_WRWAITEMPTY)
1036         {
1037                 sc->devstate &= ~ST_WRWAITEMPTY;
1038                 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
1039         }
1040         if(sc->devstate & ST_TONE) {
1041                 tel_tone(sc);
1042         } else {
1043                 selwakeup(&sc->selp);
1044         }
1045 }
1046
1047 /*---------------------------------------------------------------------------*
1048  *      this routine is called from the HSCX interrupt handler
1049  *      each time a packet is received or transmitted.
1050  *---------------------------------------------------------------------------*/
1051 static void
1052 tel_activity(int unit, int rxtx)
1053 {
1054         if(tel_sc[unit][FUNCTEL].cdp)
1055                 tel_sc[unit][FUNCTEL].cdp->last_active_time = SECOND;
1056 }
1057
1058 /*---------------------------------------------------------------------------*
1059  *      return this drivers linktab address
1060  *---------------------------------------------------------------------------*/
1061 drvr_link_t *
1062 tel_ret_linktab(int unit)
1063 {
1064         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1065         
1066         tel_init_linktab(unit);
1067         return(&sc->drvr_linktab);
1068 }
1069
1070 /*---------------------------------------------------------------------------*
1071  *      setup the isdn_linktab for this driver
1072  *---------------------------------------------------------------------------*/
1073 void
1074 tel_set_linktab(int unit, isdn_link_t *ilt)
1075 {
1076         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1077         sc->isdn_linktab = ilt;
1078 }
1079
1080 /*---------------------------------------------------------------------------*
1081  *      initialize this drivers linktab
1082  *---------------------------------------------------------------------------*/
1083 static void
1084 tel_init_linktab(int unit)
1085 {
1086         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1087         
1088         sc->drvr_linktab.unit = unit;
1089         sc->drvr_linktab.bch_rx_data_ready = tel_rx_data_rdy;
1090         sc->drvr_linktab.bch_tx_queue_empty = tel_tx_queue_empty;
1091         sc->drvr_linktab.bch_activity = tel_activity;   
1092         sc->drvr_linktab.line_connected = tel_connect;
1093         sc->drvr_linktab.line_disconnected = tel_disconnect;
1094         sc->drvr_linktab.dial_response = tel_dialresponse;
1095         sc->drvr_linktab.updown_ind = tel_updown;       
1096 }
1097
1098 /*===========================================================================*
1099  *      AUDIO FORMAT CONVERSION (produced by running g711conv)
1100  *===========================================================================*/
1101
1102 /*---------------------------------------------------------------------------*
1103  *      A-law to u-law conversion
1104  *---------------------------------------------------------------------------*/
1105 static unsigned char a2u_tab[256] = {
1106 /* 00 */        0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, 
1107 /* 08 */        0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, 
1108 /* 10 */        0x39, 0x3a, 0x37, 0x38, 0x3d, 0x3e, 0x3b, 0x3c, 
1109 /* 18 */        0x31, 0x32, 0x30, 0x30, 0x35, 0x36, 0x33, 0x34, 
1110 /* 20 */        0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, 
1111 /* 28 */        0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, 
1112 /* 30 */        0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 
1113 /* 38 */        0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 
1114 /* 40 */        0x62, 0x63, 0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 
1115 /* 48 */        0x5d, 0x5d, 0x5c, 0x5c, 0x5f, 0x5f, 0x5e, 0x5e, 
1116 /* 50 */        0x74, 0x76, 0x70, 0x72, 0x7c, 0x7e, 0x78, 0x7a, 
1117 /* 58 */        0x6a, 0x6b, 0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 
1118 /* 60 */        0x48, 0x49, 0x46, 0x47, 0x4c, 0x4d, 0x4a, 0x4b, 
1119 /* 68 */        0x40, 0x41, 0x3f, 0x3f, 0x44, 0x45, 0x42, 0x43, 
1120 /* 70 */        0x56, 0x57, 0x54, 0x55, 0x5a, 0x5b, 0x58, 0x59, 
1121 /* 78 */        0x4f, 0x4f, 0x4e, 0x4e, 0x52, 0x53, 0x50, 0x51, 
1122 /* 80 */        0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad, 
1123 /* 88 */        0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5, 
1124 /* 90 */        0xb9, 0xba, 0xb7, 0xb8, 0xbd, 0xbe, 0xbb, 0xbc, 
1125 /* 98 */        0xb1, 0xb2, 0xb0, 0xb0, 0xb5, 0xb6, 0xb3, 0xb4, 
1126 /* a0 */        0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d, 
1127 /* a8 */        0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85, 
1128 /* b0 */        0x9a, 0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 
1129 /* b8 */        0x92, 0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 
1130 /* c0 */        0xe2, 0xe3, 0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 
1131 /* c8 */        0xdd, 0xdd, 0xdc, 0xdc, 0xdf, 0xdf, 0xde, 0xde, 
1132 /* d0 */        0xf4, 0xf6, 0xf0, 0xf2, 0xfc, 0xfe, 0xf8, 0xfa, 
1133 /* d8 */        0xea, 0xeb, 0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 
1134 /* e0 */        0xc8, 0xc9, 0xc6, 0xc7, 0xcc, 0xcd, 0xca, 0xcb, 
1135 /* e8 */        0xc0, 0xc1, 0xbf, 0xbf, 0xc4, 0xc5, 0xc2, 0xc3, 
1136 /* f0 */        0xd6, 0xd7, 0xd4, 0xd5, 0xda, 0xdb, 0xd8, 0xd9, 
1137 /* f8 */        0xcf, 0xcf, 0xce, 0xce, 0xd2, 0xd3, 0xd0, 0xd1
1138 };
1139
1140 /*---------------------------------------------------------------------------*
1141  *      u-law to A-law conversion
1142  *---------------------------------------------------------------------------*/
1143 static unsigned char u2a_tab[256] = {
1144 /* 00 */        0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, 
1145 /* 08 */        0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, 
1146 /* 10 */        0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, 
1147 /* 18 */        0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, 
1148 /* 20 */        0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, 
1149 /* 28 */        0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, 
1150 /* 30 */        0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 0x12, 
1151 /* 38 */        0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 0x6a, 
1152 /* 40 */        0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 0x62, 0x63, 
1153 /* 48 */        0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 0x7a, 0x78, 
1154 /* 50 */        0x7e, 0x7f, 0x7c, 0x7d, 0x72, 0x73, 0x70, 0x71, 
1155 /* 58 */        0x76, 0x77, 0x74, 0x75, 0x4b, 0x49, 0x4f, 0x4d, 
1156 /* 60 */        0x42, 0x43, 0x40, 0x41, 0x46, 0x47, 0x44, 0x45, 
1157 /* 68 */        0x5a, 0x5b, 0x58, 0x59, 0x5e, 0x5f, 0x5c, 0x5d, 
1158 /* 70 */        0x52, 0x52, 0x53, 0x53, 0x50, 0x50, 0x51, 0x51, 
1159 /* 78 */        0x56, 0x56, 0x57, 0x57, 0x54, 0x54, 0x55, 0x55, 
1160 /* 80 */        0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad, 
1161 /* 88 */        0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5, 
1162 /* 90 */        0xba, 0xbb, 0xb8, 0xb9, 0xbe, 0xbf, 0xbc, 0xbd, 
1163 /* 98 */        0xb2, 0xb3, 0xb0, 0xb1, 0xb6, 0xb7, 0xb4, 0xb5, 
1164 /* a0 */        0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d, 
1165 /* a8 */        0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85, 
1166 /* b0 */        0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 0x92, 
1167 /* b8 */        0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 0xea, 
1168 /* c0 */        0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 0xe2, 0xe3, 
1169 /* c8 */        0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 0xfa, 0xf8, 
1170 /* d0 */        0xfe, 0xff, 0xfc, 0xfd, 0xf2, 0xf3, 0xf0, 0xf1, 
1171 /* d8 */        0xf6, 0xf7, 0xf4, 0xf5, 0xcb, 0xc9, 0xcf, 0xcd, 
1172 /* e0 */        0xc2, 0xc3, 0xc0, 0xc1, 0xc6, 0xc7, 0xc4, 0xc5, 
1173 /* e8 */        0xda, 0xdb, 0xd8, 0xd9, 0xde, 0xdf, 0xdc, 0xdd, 
1174 /* f0 */        0xd2, 0xd2, 0xd3, 0xd3, 0xd0, 0xd0, 0xd1, 0xd1, 
1175 /* f8 */        0xd6, 0xd6, 0xd7, 0xd7, 0xd4, 0xd4, 0xd5, 0xd5
1176 };
1177   
1178 /*---------------------------------------------------------------------------*
1179  *      reverse bits in a byte
1180  *---------------------------------------------------------------------------*/
1181 static unsigned char bitreverse[256] = {
1182 /* 00 */        0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 
1183 /* 08 */        0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 
1184 /* 10 */        0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 
1185 /* 18 */        0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 
1186 /* 20 */        0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 
1187 /* 28 */        0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 
1188 /* 30 */        0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 
1189 /* 38 */        0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 
1190 /* 40 */        0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 
1191 /* 48 */        0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 
1192 /* 50 */        0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 
1193 /* 58 */        0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 
1194 /* 60 */        0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 
1195 /* 68 */        0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 
1196 /* 70 */        0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 
1197 /* 78 */        0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 
1198 /* 80 */        0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 
1199 /* 88 */        0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 
1200 /* 90 */        0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 
1201 /* 98 */        0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 
1202 /* a0 */        0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 
1203 /* a8 */        0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 
1204 /* b0 */        0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 
1205 /* b8 */        0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 
1206 /* c0 */        0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 
1207 /* c8 */        0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 
1208 /* d0 */        0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 
1209 /* d8 */        0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 
1210 /* e0 */        0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 
1211 /* e8 */        0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 
1212 /* f0 */        0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 
1213 /* f8 */        0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
1214 };
1215
1216 static u_char sinetab[8000] = { 213, 213, 213, 213, 213, 213, 213, 212,
1217 212, 212, 212, 212, 212, 215, 215, 215, 215, 215, 215, 214, 214,
1218 214, 214, 214, 214, 209, 209, 209, 209, 209, 209, 209, 208, 208,
1219 208, 208, 208, 208, 211, 211, 211, 211, 211, 211, 210, 210, 210,
1220 210, 210, 210, 221, 221, 221, 221, 221, 221, 220, 220, 220, 220,
1221 220, 220, 220, 223, 223, 223, 223, 223, 223, 222, 222, 222, 222,
1222 222, 222, 217, 217, 217, 217, 217, 217, 216, 216, 216, 216, 216,
1223 216, 216, 219, 219, 219, 219, 219, 219, 218, 218, 218, 218, 218,
1224 218, 197, 197, 197, 197, 197, 197, 196, 196, 196, 196, 196, 196,
1225 196, 199, 199, 199, 199, 199, 199, 198, 198, 198, 198, 198, 198,
1226 193, 193, 193, 193, 193, 193, 192, 192, 192, 192, 192, 192, 192,
1227 195, 195, 195, 195, 195, 195, 194, 194, 194, 194, 194, 194, 205,
1228 205, 205, 205, 205, 205, 204, 204, 204, 204, 204, 204, 204, 207,
1229 207, 207, 207, 207, 207, 206, 206, 206, 206, 206, 206, 201, 201,
1230 201, 201, 201, 201, 200, 200, 200, 200, 200, 200, 200, 203, 203,
1231 203, 203, 203, 203, 202, 202, 202, 202, 202, 202, 245, 245, 245,
1232 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 244, 244, 244,
1233 244, 244, 244, 244, 244, 244, 244, 244, 244, 247, 247, 247, 247,
1234 247, 247, 247, 247, 247, 247, 247, 247, 247, 246, 246, 246, 246,
1235 246, 246, 246, 246, 246, 246, 246, 246, 246, 241, 241, 241, 241,
1236 241, 241, 241, 241, 241, 241, 241, 241, 240, 240, 240, 240, 240,
1237 240, 240, 240, 240, 240, 240, 240, 240, 243, 243, 243, 243, 243,
1238 243, 243, 243, 243, 243, 243, 243, 243, 242, 242, 242, 242, 242,
1239 242, 242, 242, 242, 242, 242, 242, 242, 253, 253, 253, 253, 253,
1240 253, 253, 253, 253, 253, 253, 253, 253, 252, 252, 252, 252, 252,
1241 252, 252, 252, 252, 252, 252, 252, 255, 255, 255, 255, 255, 255,
1242 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254, 254,
1243 254, 254, 254, 254, 254, 254, 254, 249, 249, 249, 249, 249, 249,
1244 249, 249, 249, 249, 249, 249, 249, 248, 248, 248, 248, 248, 248,
1245 248, 248, 248, 248, 248, 248, 248, 251, 251, 251, 251, 251, 251,
1246 251, 251, 251, 251, 251, 251, 251, 250, 250, 250, 250, 250, 250,
1247 250, 250, 250, 250, 250, 250, 250, 229, 229, 229, 229, 229, 229,
1248 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1249 229, 229, 229, 229, 229, 229, 229, 228, 228, 228, 228, 228, 228,
1250 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1251 228, 228, 228, 228, 228, 228, 228, 228, 231, 231, 231, 231, 231,
1252 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1253 231, 231, 231, 231, 231, 231, 231, 231, 231, 230, 230, 230, 230,
1254 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1255 230, 230, 230, 230, 230, 230, 230, 230, 230, 225, 225, 225, 225,
1256 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1257 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 224, 224,
1258 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1259 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 227,
1260 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1261 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1262 227, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1263 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1264 226, 226, 226, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1265 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1266 237, 237, 237, 237, 237, 236, 236, 236, 236, 236, 236, 236, 236,
1267 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1268 236, 236, 236, 236, 236, 236, 236, 236, 239, 239, 239, 239, 239,
1269 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1270 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 238, 238,
1271 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1272 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1273 238, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1274 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1275 233, 233, 233, 233, 233, 232, 232, 232, 232, 232, 232, 232, 232,
1276 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1277 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 235, 235, 235,
1278 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1279 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1280 235, 235, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1281 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1282 234, 234, 234, 234, 234, 234, 234, 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, 149, 149, 149, 149, 149, 149,
1287 149, 149, 149, 149, 149, 149, 149, 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, 148, 148, 148,
1292 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 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, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1298 151, 151, 151, 151, 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, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1304 150, 150, 150, 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, 145, 145, 145, 145, 145,
1310 145, 145, 145, 145, 145, 145, 145, 145, 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, 144, 144, 144, 144,
1317 144, 144, 144, 144, 144, 144, 144, 144, 144, 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, 147, 147, 147,
1325 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 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, 146, 146, 146, 146, 146, 146, 146,
1335 146, 146, 146, 146, 146, 146, 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 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
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, 156, 156, 156, 156, 156, 156,
1391 156, 156, 156, 156, 156, 156, 156, 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, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1405 157, 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, 146, 146, 146,
1414 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 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, 147, 147,
1422 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 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, 144,
1429 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 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, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1436 145, 145, 145, 145, 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, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1442 150, 150, 150, 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, 151, 151, 151,
1447 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 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 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
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 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1458 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1459 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1460 234, 234, 234, 234, 234, 235, 235, 235, 235, 235, 235, 235, 235,
1461 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1462 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 232, 232, 232,
1463 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1464 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1465 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1466 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1467 233, 233, 233, 233, 233, 233, 238, 238, 238, 238, 238, 238, 238,
1468 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1469 238, 238, 238, 238, 238, 238, 238, 238, 238, 239, 239, 239, 239,
1470 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1471 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 236,
1472 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1473 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1474 236, 236, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1475 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1476 237, 237, 237, 237, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1477 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1478 226, 226, 226, 226, 226, 226, 227, 227, 227, 227, 227, 227, 227,
1479 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1480 227, 227, 227, 227, 227, 227, 227, 227, 224, 224, 224, 224, 224,
1481 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1482 224, 224, 224, 224, 224, 224, 224, 224, 224, 225, 225, 225, 225,
1483 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1484 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 230, 230,
1485 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1486 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 231, 231,
1487 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1488 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 228,
1489 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1490 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1491 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1492 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1493 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
1494 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
1495 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
1496 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
1497 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
1498 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
1499 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 253,
1500 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 242,
1501 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 243,
1502 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 240,
1503 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241,
1504 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 246, 246,
1505 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 247, 247,
1506 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 244, 244,
1507 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 245, 245, 245,
1508 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 202, 202, 202,
1509 202, 202, 202, 203, 203, 203, 203, 203, 203, 200, 200, 200, 200,
1510 200, 200, 200, 201, 201, 201, 201, 201, 201, 206, 206, 206, 206,
1511 206, 206, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 204,
1512 204, 204, 205, 205, 205, 205, 205, 205, 194, 194, 194, 194, 194,
1513 194, 195, 195, 195, 195, 195, 195, 192, 192, 192, 192, 192, 192,
1514 192, 193, 193, 193, 193, 193, 193, 198, 198, 198, 198, 198, 198,
1515 199, 199, 199, 199, 199, 199, 196, 196, 196, 196, 196, 196, 196,
1516 197, 197, 197, 197, 197, 197, 218, 218, 218, 218, 218, 218, 219,
1517 219, 219, 219, 219, 219, 216, 216, 216, 216, 216, 216, 216, 217,
1518 217, 217, 217, 217, 217, 222, 222, 222, 222, 222, 222, 223, 223,
1519 223, 223, 223, 223, 220, 220, 220, 220, 220, 220, 220, 221, 221,
1520 221, 221, 221, 221, 210, 210, 210, 210, 210, 210, 211, 211, 211,
1521 211, 211, 211, 208, 208, 208, 208, 208, 208, 209, 209, 209, 209,
1522 209, 209, 209, 214, 214, 214, 214, 214, 214, 215, 215, 215, 215,
1523 215, 215, 212, 212, 212, 212, 212, 212, 213, 213, 213, 213, 213,
1524 213, 213, 90, 90, 90, 85, 85, 85, 85, 85, 85, 84, 84, 84, 84, 84,
1525 84, 87, 87, 87, 87, 87, 87, 86, 86, 86, 86, 86, 86, 81, 81, 81,
1526 81, 81, 81, 81, 80, 80, 80, 80, 80, 80, 83, 83, 83, 83, 83, 83,
1527 82, 82, 82, 82, 82, 82, 93, 93, 93, 93, 93, 93, 93, 92, 92, 92,
1528 92, 92, 92, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 89,
1529 89, 89, 89, 89, 89, 88, 88, 88, 88, 88, 88, 88, 91, 91, 91, 91,
1530 91, 91, 90, 90, 90, 90, 90, 90, 69, 69, 69, 69, 69, 69, 68, 68,
1531 68, 68, 68, 68, 68, 71, 71, 71, 71, 71, 71, 70, 70, 70, 70, 70,
1532 70, 65, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 64, 64, 67, 67,
1533 67, 67, 67, 67, 66, 66, 66, 66, 66, 66, 77, 77, 77, 77, 77, 77,
1534 76, 76, 76, 76, 76, 76, 76, 79, 79, 79, 79, 79, 79, 78, 78, 78,
1535 78, 78, 78, 73, 73, 73, 73, 73, 73, 73, 72, 72, 72, 72, 72, 72,
1536 75, 75, 75, 75, 75, 75, 74, 74, 74, 74, 74, 74, 117, 117, 117, 117,
1537 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116,
1538 116, 116, 116, 116, 116, 116, 116, 116, 116, 119, 119, 119, 119,
1539 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118,
1540 118, 118, 118, 118, 118, 118, 118, 118, 113, 113, 113, 113, 113,
1541 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112,
1542 112, 112, 112, 112, 112, 112, 112, 115, 115, 115, 115, 115, 115,
1543 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114,
1544 114, 114, 114, 114, 114, 114, 114, 125, 125, 125, 125, 125, 125,
1545 125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 124,
1546 124, 124, 124, 124, 124, 124, 124, 127, 127, 127, 127, 127, 127,
1547 127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126,
1548 126, 126, 126, 126, 126, 126, 121, 121, 121, 121, 121, 121, 121,
1549 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120,
1550 120, 120, 120, 120, 120, 120, 123, 123, 123, 123, 123, 123, 123,
1551 123, 123, 123, 123, 123, 123, 122, 122, 122, 122, 122, 122, 122,
1552 122, 122, 122, 122, 122, 122, 101, 101, 101, 101, 101, 101, 101,
1553 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1554 101, 101, 101, 101, 101, 101, 101, 100, 100, 100, 100, 100, 100,
1555 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1556 100, 100, 100, 100, 100, 100, 100, 103, 103, 103, 103, 103, 103,
1557 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1558 103, 103, 103, 103, 103, 103, 103, 103, 102, 102, 102, 102, 102,
1559 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1560 102, 102, 102, 102, 102, 102, 102, 102, 102, 97, 97, 97, 97, 97,
1561 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1562 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1563 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1564 96, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1565 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 98, 98, 98,
1566 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1567 98, 98, 98, 98, 98, 98, 98, 98, 98, 109, 109, 109, 109, 109, 109,
1568 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1569 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 108, 108, 108,
1570 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1571 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 111,
1572 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1573 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1574 111, 111, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1575 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1576 110, 110, 110, 110, 110, 110, 105, 105, 105, 105, 105, 105, 105,
1577 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1578 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 104,
1579 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1580 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1581 104, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1582 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1583 107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 106,
1584 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1585 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 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 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
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, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1594 20, 20, 20, 20, 20, 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, 23, 23, 23,
1598 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 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, 22, 22, 22, 22, 22, 22,
1603 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 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, 17, 17,
1608 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 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, 16, 16, 16, 16, 16, 16,
1614 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 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, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1621 19, 19, 19, 19, 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, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1629 18, 18, 18, 18, 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, 29, 29, 29, 29, 29, 29,
1640 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 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, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1673 28, 28, 28, 28, 28, 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, 29, 29, 29, 29, 29,
1684 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 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, 18, 18, 18, 18, 18,
1692 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 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, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1699 19, 19, 19, 19, 19, 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, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1705 16, 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, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1710 17, 17, 17, 17, 17, 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, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1715 22, 22, 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, 23, 23, 23, 23, 23, 23,
1719 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 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, 20,
1723 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 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 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1728 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1729 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1730 106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 107,
1731 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1732 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 104, 104,
1733 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1734 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1735 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1736 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1737 105, 105, 105, 105, 105, 105, 110, 110, 110, 110, 110, 110, 110,
1738 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1739 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111,
1740 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1741 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1742 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1743 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1744 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1745 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1746 109, 109, 109, 109, 109, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1747 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1748 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1749 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 96, 96,
1750 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1751 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97,
1752 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1753 97, 97, 97, 97, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1754 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1755 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1756 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1757 103, 103, 103, 103, 103, 100, 100, 100, 100, 100, 100, 100, 100,
1758 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1759 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 101, 101,
1760 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1761 101, 101, 101, 101, 101, 101, 122, 122, 122, 122, 122, 122, 122,
1762 122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 123,
1763 123, 123, 123, 123, 123, 123, 120, 120, 120, 120, 120, 120, 120,
1764 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121,
1765 121, 121, 121, 121, 121, 121, 126, 126, 126, 126, 126, 126, 126,
1766 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127,
1767 127, 127, 127, 127, 127, 124, 124, 124, 124, 124, 124, 124, 124,
1768 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125,
1769 125, 125, 125, 125, 125, 114, 114, 114, 114, 114, 114, 114, 114,
1770 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115,
1771 115, 115, 115, 115, 115, 112, 112, 112, 112, 112, 112, 112, 112,
1772 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1773 113, 113, 113, 113, 118, 118, 118, 118, 118, 118, 118, 118, 118,
1774 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119,
1775 119, 119, 119, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
1776 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
1777 117, 117, 117, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 72,
1778 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 78, 78, 78, 78,
1779 78, 78, 79, 79, 79, 79, 79, 79, 76, 76, 76, 76, 76, 76, 76, 77,
1780 77, 77, 77, 77, 77, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67,
1781 67, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 70, 70,
1782 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 68, 68, 68, 68, 68, 68,
1783 68, 69, 69, 69, 69, 69, 69, 90, 90, 90, 90, 90, 90, 91, 91, 91,
1784 91, 91, 91, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89,
1785 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 92, 92, 92, 92,
1786 92, 92, 93, 93, 93, 93, 93, 93, 93, 82, 82, 82, 82, 82, 82, 83,
1787 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81,
1788 81, 81, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 84, 84,
1789 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 90, 90, 90 };
1790
1791 /*===========================================================================*/
1792
1793 #endif /* NI4BTEL > 0 */