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