3a07253252d3190c5499e24fde7e30940257d564
[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 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_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         { 1, NULL, i4btelfilt_detach, i4btelfilt_read };
690 PDEVSTATIC struct filterops i4btelfiltops_write =
691         { 1, 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         crit_enter();
720         klist = &sc->selp.si_note;
721         SLIST_INSERT_HEAD(klist, kn, kn_selnext);
722         crit_exit();
723
724         return (0);
725 }
726
727 PDEVSTATIC void
728 i4btelfilt_detach(struct knote *kn)
729 {
730         cdev_t dev = (cdev_t)kn->kn_hook;
731         int unit = UNIT(dev);
732         int func = FUNC(dev);
733         tel_sc_t *sc = &tel_sc[unit][func];
734         struct klist *klist;
735
736         crit_enter();
737         klist = &sc->selp.si_note;
738         SLIST_REMOVE(klist, kn, knote, kn_selnext);
739         crit_exit();
740 }
741
742 PDEVSTATIC int
743 i4btelfilt_read(struct knote *kn, long hint)
744 {
745         cdev_t dev = (cdev_t)kn->kn_hook;
746         int unit = UNIT(dev);
747         int func = FUNC(dev);
748         tel_sc_t *sc = &tel_sc[unit][func];
749         int ready = 0;
750
751         crit_enter();
752
753         if (!(sc->devstate & ST_ISOPEN)) {
754                 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
755                 crit_exit();
756                 return (0);
757         }
758
759         switch (func) {
760         case FUNCTEL:
761                 /* reads are OK if we have any data */
762                 if ((sc->devstate & ST_CONNECTED)   &&
763                    (sc->isdn_linktab != NULL)      &&
764                    (!IF_QEMPTY(sc->isdn_linktab->rx_queue)))
765                 {
766                         NDBGL4(L4_TELDBG, "i4btel%d, filt readable", unit);
767                         ready = 1;
768                 }
769
770                 break;
771         case FUNCDIAL:
772                 NDBGL4(L4_TELDBG, "i4bteld%d, filt readable, result = %d", unit, sc->result);
773                 if(sc->result != 0)
774                         ready = 1;
775                 break;
776         }
777
778         crit_exit();
779
780         return (ready);
781 }
782
783 PDEVSTATIC int
784 i4btelfilt_write(struct knote *kn, long hint)
785 {
786         cdev_t dev = (cdev_t)kn->kn_hook;
787         int unit = UNIT(dev);
788         int func = FUNC(dev);
789         tel_sc_t *sc = &tel_sc[unit][func];
790         int ready = 0;
791
792         crit_enter();
793
794         if (!(sc->devstate & ST_ISOPEN)) {
795                 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
796                 crit_exit();
797                 return (0);
798         }
799
800         switch (func) {
801         case FUNCTEL:
802                 /*
803                  * Writes are OK if we are connected and the
804                  * transmit queue can take them
805                  */
806                 if ((sc->devstate & ST_CONNECTED)   &&
807                    (sc->isdn_linktab != NULL)      &&
808                    (!IF_QFULL(sc->isdn_linktab->tx_queue)))
809                 {
810                         NDBGL4(L4_TELDBG, "i4btel%d, filt writable", unit);
811                         ready = 1;
812                 }
813                 break;
814         case FUNCDIAL:
815                 NDBGL4(L4_TELDBG, "i4bteld%d, filt writable", unit);
816                 ready = 1;
817                 break;
818         }
819
820         crit_exit();
821
822         return (ready);
823 }
824
825 /*===========================================================================*
826  *                      ISDN INTERFACE ROUTINES
827  *===========================================================================*/
828
829 /*---------------------------------------------------------------------------*
830 *       this routine is called from L4 handler at connect time
831  *---------------------------------------------------------------------------*/
832 static void
833 tel_connect(int unit, void *cdp)
834 {
835         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
836
837         /* audio device */
838         
839         sc->cdp = (call_desc_t *)cdp;
840
841         sc->devstate |= ST_CONNECTED;
842
843         /* dialer device */
844         
845         sc = &tel_sc[unit][FUNCDIAL];
846
847         if(sc->devstate == ST_ISOPEN)
848         {
849                 sc->result = RSP_CONN;
850
851                 if(sc->devstate & ST_RDWAITDATA)
852                 {
853                         sc->devstate &= ~ST_RDWAITDATA;
854                         wakeup((caddr_t) &sc->result);
855                 }
856                 KNOTE(&sc->selp.si_note, 0);
857         }
858 }
859
860 /*---------------------------------------------------------------------------*
861  *      this routine is called from L4 handler at disconnect time
862  *---------------------------------------------------------------------------*/
863 static void
864 tel_disconnect(int unit, void *cdp)
865 {
866 /*      call_desc_t *cd = (call_desc_t *)cdp; */
867
868         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
869         
870         /* audio device */
871         
872         sc->devstate &= ~ST_CONNECTED;
873
874         if(sc->devstate & ST_RDWAITDATA)
875         {
876                 sc->devstate &= ~ST_RDWAITDATA;
877                 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
878         }
879
880         if(sc->devstate & ST_WRWAITEMPTY)
881         {
882                 sc->devstate &= ~ST_WRWAITEMPTY;
883                 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
884         }
885
886         /* dialer device */
887         
888         sc = &tel_sc[unit][FUNCDIAL];
889
890         if(sc->devstate & ST_ISOPEN)
891         {
892                 sc->result = RSP_HUP;
893
894                 if(sc->devstate & ST_RDWAITDATA)
895                 {
896                         sc->devstate &= ~ST_RDWAITDATA;
897                         wakeup((caddr_t) &sc->result);
898                 }
899                 KNOTE(&sc->selp.si_note, 0);
900
901                 if (sc->devstate & ST_TONE) {
902                         sc->devstate &= ~ST_TONE;
903                         wakeup((caddr_t) &sc->tones);
904                 }
905         }
906 }
907
908 /*---------------------------------------------------------------------------*
909  *      feedback from daemon in case of dial problems
910  *---------------------------------------------------------------------------*/
911 static void
912 tel_dialresponse(int unit, int status, cause_t cause)
913 {       
914         tel_sc_t *sc = &tel_sc[unit][FUNCDIAL];
915
916         NDBGL4(L4_TELDBG, "i4btel%d,  status=%d, cause=0x%4x", unit, status, cause);
917
918         if((sc->devstate == ST_ISOPEN) && status)
919         {       
920                 sc->result = RSP_NOA;
921
922                 if(sc->devstate & ST_RDWAITDATA)
923                 {
924                         sc->devstate &= ~ST_RDWAITDATA;
925                         wakeup((caddr_t) &sc->result);
926                 }
927                 KNOTE(&sc->selp.si_note, 0);
928         }
929 }
930         
931 /*---------------------------------------------------------------------------*
932  *      interface up/down
933  *---------------------------------------------------------------------------*/
934 static void
935 tel_updown(int unit, int updown)
936 {
937 }
938         
939 /*---------------------------------------------------------------------------*
940  *      this routine is called from the HSCX interrupt handler
941  *      when a new frame (mbuf) has been received and was put on
942  *      the rx queue.
943  *---------------------------------------------------------------------------*/
944 static void
945 tel_rx_data_rdy(int unit)
946 {
947         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
948         
949         if(sc->devstate & ST_RDWAITDATA)
950         {
951                 sc->devstate &= ~ST_RDWAITDATA;
952                 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
953         }
954         KNOTE(&sc->selp.si_note, 0);
955 }
956
957 /*---------------------------------------------------------------------------*
958  *      this routine is called from the HSCX interrupt handler
959  *      when the last frame has been sent out and there is no
960  *      further frame (mbuf) in the tx queue.
961  *---------------------------------------------------------------------------*/
962 static void
963 tel_tx_queue_empty(int unit)
964 {
965         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
966
967         if(sc->devstate & ST_WRWAITEMPTY)
968         {
969                 sc->devstate &= ~ST_WRWAITEMPTY;
970                 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
971         }
972         if(sc->devstate & ST_TONE) {
973                 tel_tone(sc);
974         } else {
975                 KNOTE(&sc->selp.si_note, 0);
976         }
977 }
978
979 /*---------------------------------------------------------------------------*
980  *      this routine is called from the HSCX interrupt handler
981  *      each time a packet is received or transmitted.
982  *---------------------------------------------------------------------------*/
983 static void
984 tel_activity(int unit, int rxtx)
985 {
986         if(tel_sc[unit][FUNCTEL].cdp)
987                 tel_sc[unit][FUNCTEL].cdp->last_active_time = SECOND;
988 }
989
990 /*---------------------------------------------------------------------------*
991  *      return this drivers linktab address
992  *---------------------------------------------------------------------------*/
993 drvr_link_t *
994 tel_ret_linktab(int unit)
995 {
996         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
997         
998         tel_init_linktab(unit);
999         return(&sc->drvr_linktab);
1000 }
1001
1002 /*---------------------------------------------------------------------------*
1003  *      setup the isdn_linktab for this driver
1004  *---------------------------------------------------------------------------*/
1005 void
1006 tel_set_linktab(int unit, isdn_link_t *ilt)
1007 {
1008         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1009         sc->isdn_linktab = ilt;
1010 }
1011
1012 /*---------------------------------------------------------------------------*
1013  *      initialize this drivers linktab
1014  *---------------------------------------------------------------------------*/
1015 static void
1016 tel_init_linktab(int unit)
1017 {
1018         tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1019         
1020         sc->drvr_linktab.unit = unit;
1021         sc->drvr_linktab.bch_rx_data_ready = tel_rx_data_rdy;
1022         sc->drvr_linktab.bch_tx_queue_empty = tel_tx_queue_empty;
1023         sc->drvr_linktab.bch_activity = tel_activity;   
1024         sc->drvr_linktab.line_connected = tel_connect;
1025         sc->drvr_linktab.line_disconnected = tel_disconnect;
1026         sc->drvr_linktab.dial_response = tel_dialresponse;
1027         sc->drvr_linktab.updown_ind = tel_updown;       
1028 }
1029
1030 /*===========================================================================*
1031  *      AUDIO FORMAT CONVERSION (produced by running g711conv)
1032  *===========================================================================*/
1033
1034 /*---------------------------------------------------------------------------*
1035  *      A-law to u-law conversion
1036  *---------------------------------------------------------------------------*/
1037 static unsigned char a2u_tab[256] = {
1038 /* 00 */        0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, 
1039 /* 08 */        0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, 
1040 /* 10 */        0x39, 0x3a, 0x37, 0x38, 0x3d, 0x3e, 0x3b, 0x3c, 
1041 /* 18 */        0x31, 0x32, 0x30, 0x30, 0x35, 0x36, 0x33, 0x34, 
1042 /* 20 */        0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, 
1043 /* 28 */        0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, 
1044 /* 30 */        0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 
1045 /* 38 */        0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 
1046 /* 40 */        0x62, 0x63, 0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 
1047 /* 48 */        0x5d, 0x5d, 0x5c, 0x5c, 0x5f, 0x5f, 0x5e, 0x5e, 
1048 /* 50 */        0x74, 0x76, 0x70, 0x72, 0x7c, 0x7e, 0x78, 0x7a, 
1049 /* 58 */        0x6a, 0x6b, 0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 
1050 /* 60 */        0x48, 0x49, 0x46, 0x47, 0x4c, 0x4d, 0x4a, 0x4b, 
1051 /* 68 */        0x40, 0x41, 0x3f, 0x3f, 0x44, 0x45, 0x42, 0x43, 
1052 /* 70 */        0x56, 0x57, 0x54, 0x55, 0x5a, 0x5b, 0x58, 0x59, 
1053 /* 78 */        0x4f, 0x4f, 0x4e, 0x4e, 0x52, 0x53, 0x50, 0x51, 
1054 /* 80 */        0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad, 
1055 /* 88 */        0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5, 
1056 /* 90 */        0xb9, 0xba, 0xb7, 0xb8, 0xbd, 0xbe, 0xbb, 0xbc, 
1057 /* 98 */        0xb1, 0xb2, 0xb0, 0xb0, 0xb5, 0xb6, 0xb3, 0xb4, 
1058 /* a0 */        0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d, 
1059 /* a8 */        0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85, 
1060 /* b0 */        0x9a, 0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 
1061 /* b8 */        0x92, 0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 
1062 /* c0 */        0xe2, 0xe3, 0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 
1063 /* c8 */        0xdd, 0xdd, 0xdc, 0xdc, 0xdf, 0xdf, 0xde, 0xde, 
1064 /* d0 */        0xf4, 0xf6, 0xf0, 0xf2, 0xfc, 0xfe, 0xf8, 0xfa, 
1065 /* d8 */        0xea, 0xeb, 0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 
1066 /* e0 */        0xc8, 0xc9, 0xc6, 0xc7, 0xcc, 0xcd, 0xca, 0xcb, 
1067 /* e8 */        0xc0, 0xc1, 0xbf, 0xbf, 0xc4, 0xc5, 0xc2, 0xc3, 
1068 /* f0 */        0xd6, 0xd7, 0xd4, 0xd5, 0xda, 0xdb, 0xd8, 0xd9, 
1069 /* f8 */        0xcf, 0xcf, 0xce, 0xce, 0xd2, 0xd3, 0xd0, 0xd1
1070 };
1071
1072 /*---------------------------------------------------------------------------*
1073  *      u-law to A-law conversion
1074  *---------------------------------------------------------------------------*/
1075 static unsigned char u2a_tab[256] = {
1076 /* 00 */        0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, 
1077 /* 08 */        0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, 
1078 /* 10 */        0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, 
1079 /* 18 */        0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, 
1080 /* 20 */        0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, 
1081 /* 28 */        0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, 
1082 /* 30 */        0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 0x12, 
1083 /* 38 */        0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 0x6a, 
1084 /* 40 */        0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 0x62, 0x63, 
1085 /* 48 */        0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 0x7a, 0x78, 
1086 /* 50 */        0x7e, 0x7f, 0x7c, 0x7d, 0x72, 0x73, 0x70, 0x71, 
1087 /* 58 */        0x76, 0x77, 0x74, 0x75, 0x4b, 0x49, 0x4f, 0x4d, 
1088 /* 60 */        0x42, 0x43, 0x40, 0x41, 0x46, 0x47, 0x44, 0x45, 
1089 /* 68 */        0x5a, 0x5b, 0x58, 0x59, 0x5e, 0x5f, 0x5c, 0x5d, 
1090 /* 70 */        0x52, 0x52, 0x53, 0x53, 0x50, 0x50, 0x51, 0x51, 
1091 /* 78 */        0x56, 0x56, 0x57, 0x57, 0x54, 0x54, 0x55, 0x55, 
1092 /* 80 */        0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad, 
1093 /* 88 */        0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5, 
1094 /* 90 */        0xba, 0xbb, 0xb8, 0xb9, 0xbe, 0xbf, 0xbc, 0xbd, 
1095 /* 98 */        0xb2, 0xb3, 0xb0, 0xb1, 0xb6, 0xb7, 0xb4, 0xb5, 
1096 /* a0 */        0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d, 
1097 /* a8 */        0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85, 
1098 /* b0 */        0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 0x92, 
1099 /* b8 */        0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 0xea, 
1100 /* c0 */        0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 0xe2, 0xe3, 
1101 /* c8 */        0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 0xfa, 0xf8, 
1102 /* d0 */        0xfe, 0xff, 0xfc, 0xfd, 0xf2, 0xf3, 0xf0, 0xf1, 
1103 /* d8 */        0xf6, 0xf7, 0xf4, 0xf5, 0xcb, 0xc9, 0xcf, 0xcd, 
1104 /* e0 */        0xc2, 0xc3, 0xc0, 0xc1, 0xc6, 0xc7, 0xc4, 0xc5, 
1105 /* e8 */        0xda, 0xdb, 0xd8, 0xd9, 0xde, 0xdf, 0xdc, 0xdd, 
1106 /* f0 */        0xd2, 0xd2, 0xd3, 0xd3, 0xd0, 0xd0, 0xd1, 0xd1, 
1107 /* f8 */        0xd6, 0xd6, 0xd7, 0xd7, 0xd4, 0xd4, 0xd5, 0xd5
1108 };
1109   
1110 /*---------------------------------------------------------------------------*
1111  *      reverse bits in a byte
1112  *---------------------------------------------------------------------------*/
1113 static unsigned char bitreverse[256] = {
1114 /* 00 */        0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 
1115 /* 08 */        0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 
1116 /* 10 */        0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 
1117 /* 18 */        0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 
1118 /* 20 */        0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 
1119 /* 28 */        0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 
1120 /* 30 */        0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 
1121 /* 38 */        0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 
1122 /* 40 */        0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 
1123 /* 48 */        0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 
1124 /* 50 */        0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 
1125 /* 58 */        0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 
1126 /* 60 */        0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 
1127 /* 68 */        0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 
1128 /* 70 */        0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 
1129 /* 78 */        0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 
1130 /* 80 */        0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 
1131 /* 88 */        0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 
1132 /* 90 */        0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 
1133 /* 98 */        0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 
1134 /* a0 */        0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 
1135 /* a8 */        0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 
1136 /* b0 */        0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 
1137 /* b8 */        0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 
1138 /* c0 */        0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 
1139 /* c8 */        0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 
1140 /* d0 */        0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 
1141 /* d8 */        0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 
1142 /* e0 */        0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 
1143 /* e8 */        0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 
1144 /* f0 */        0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 
1145 /* f8 */        0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
1146 };
1147
1148 static u_char sinetab[8000] = { 213, 213, 213, 213, 213, 213, 213, 212,
1149 212, 212, 212, 212, 212, 215, 215, 215, 215, 215, 215, 214, 214,
1150 214, 214, 214, 214, 209, 209, 209, 209, 209, 209, 209, 208, 208,
1151 208, 208, 208, 208, 211, 211, 211, 211, 211, 211, 210, 210, 210,
1152 210, 210, 210, 221, 221, 221, 221, 221, 221, 220, 220, 220, 220,
1153 220, 220, 220, 223, 223, 223, 223, 223, 223, 222, 222, 222, 222,
1154 222, 222, 217, 217, 217, 217, 217, 217, 216, 216, 216, 216, 216,
1155 216, 216, 219, 219, 219, 219, 219, 219, 218, 218, 218, 218, 218,
1156 218, 197, 197, 197, 197, 197, 197, 196, 196, 196, 196, 196, 196,
1157 196, 199, 199, 199, 199, 199, 199, 198, 198, 198, 198, 198, 198,
1158 193, 193, 193, 193, 193, 193, 192, 192, 192, 192, 192, 192, 192,
1159 195, 195, 195, 195, 195, 195, 194, 194, 194, 194, 194, 194, 205,
1160 205, 205, 205, 205, 205, 204, 204, 204, 204, 204, 204, 204, 207,
1161 207, 207, 207, 207, 207, 206, 206, 206, 206, 206, 206, 201, 201,
1162 201, 201, 201, 201, 200, 200, 200, 200, 200, 200, 200, 203, 203,
1163 203, 203, 203, 203, 202, 202, 202, 202, 202, 202, 245, 245, 245,
1164 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 244, 244, 244,
1165 244, 244, 244, 244, 244, 244, 244, 244, 244, 247, 247, 247, 247,
1166 247, 247, 247, 247, 247, 247, 247, 247, 247, 246, 246, 246, 246,
1167 246, 246, 246, 246, 246, 246, 246, 246, 246, 241, 241, 241, 241,
1168 241, 241, 241, 241, 241, 241, 241, 241, 240, 240, 240, 240, 240,
1169 240, 240, 240, 240, 240, 240, 240, 240, 243, 243, 243, 243, 243,
1170 243, 243, 243, 243, 243, 243, 243, 243, 242, 242, 242, 242, 242,
1171 242, 242, 242, 242, 242, 242, 242, 242, 253, 253, 253, 253, 253,
1172 253, 253, 253, 253, 253, 253, 253, 253, 252, 252, 252, 252, 252,
1173 252, 252, 252, 252, 252, 252, 252, 255, 255, 255, 255, 255, 255,
1174 255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254, 254,
1175 254, 254, 254, 254, 254, 254, 254, 249, 249, 249, 249, 249, 249,
1176 249, 249, 249, 249, 249, 249, 249, 248, 248, 248, 248, 248, 248,
1177 248, 248, 248, 248, 248, 248, 248, 251, 251, 251, 251, 251, 251,
1178 251, 251, 251, 251, 251, 251, 251, 250, 250, 250, 250, 250, 250,
1179 250, 250, 250, 250, 250, 250, 250, 229, 229, 229, 229, 229, 229,
1180 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1181 229, 229, 229, 229, 229, 229, 229, 228, 228, 228, 228, 228, 228,
1182 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1183 228, 228, 228, 228, 228, 228, 228, 228, 231, 231, 231, 231, 231,
1184 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1185 231, 231, 231, 231, 231, 231, 231, 231, 231, 230, 230, 230, 230,
1186 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1187 230, 230, 230, 230, 230, 230, 230, 230, 230, 225, 225, 225, 225,
1188 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1189 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 224, 224,
1190 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1191 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 227,
1192 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1193 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1194 227, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1195 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1196 226, 226, 226, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1197 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1198 237, 237, 237, 237, 237, 236, 236, 236, 236, 236, 236, 236, 236,
1199 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1200 236, 236, 236, 236, 236, 236, 236, 236, 239, 239, 239, 239, 239,
1201 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1202 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 238, 238,
1203 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1204 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1205 238, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1206 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1207 233, 233, 233, 233, 233, 232, 232, 232, 232, 232, 232, 232, 232,
1208 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1209 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 235, 235, 235,
1210 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1211 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1212 235, 235, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1213 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1214 234, 234, 234, 234, 234, 234, 234, 149, 149, 149, 149, 149, 149,
1215 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1216 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1217 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1218 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1219 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148,
1220 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1221 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1222 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1223 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1224 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 151, 151, 151,
1225 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1226 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1227 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1228 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1229 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1230 151, 151, 151, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1231 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1232 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1233 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1234 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1235 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1236 150, 150, 150, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1237 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1238 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1239 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1240 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1241 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1242 145, 145, 145, 145, 145, 145, 145, 145, 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, 144, 144, 144, 144,
1245 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1246 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1247 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1248 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1249 144, 144, 144, 144, 144, 144, 144, 144, 144, 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, 147, 147, 147,
1253 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1254 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1255 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1256 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1257 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 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, 146, 146, 146, 146, 146, 146, 146,
1263 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1264 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1265 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1266 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1267 146, 146, 146, 146, 146, 146, 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 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1277 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1278 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1279 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1280 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
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, 156, 156, 156, 156, 156, 156,
1319 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1320 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1321 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1322 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1323 156, 156, 156, 156, 156, 156, 156, 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, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1333 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1334 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1335 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1336 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1337 157, 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, 146, 146, 146,
1342 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1343 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1344 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1345 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1346 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 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, 147, 147,
1350 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1351 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1352 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1353 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1354 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 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, 144,
1357 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1358 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1359 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1360 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1361 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145,
1362 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1363 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1364 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1365 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1366 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1367 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1368 145, 145, 145, 145, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1369 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1370 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1371 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1372 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1373 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1374 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1375 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1376 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1377 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1378 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1379 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 148, 148, 148,
1380 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1381 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1382 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1383 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1384 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1385 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1386 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1387 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1388 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1389 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1390 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1391 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1392 234, 234, 234, 234, 234, 235, 235, 235, 235, 235, 235, 235, 235,
1393 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1394 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 232, 232, 232,
1395 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1396 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1397 232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1398 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1399 233, 233, 233, 233, 233, 233, 238, 238, 238, 238, 238, 238, 238,
1400 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1401 238, 238, 238, 238, 238, 238, 238, 238, 238, 239, 239, 239, 239,
1402 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1403 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 236,
1404 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1405 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1406 236, 236, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1407 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1408 237, 237, 237, 237, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1409 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1410 226, 226, 226, 226, 226, 226, 227, 227, 227, 227, 227, 227, 227,
1411 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1412 227, 227, 227, 227, 227, 227, 227, 227, 224, 224, 224, 224, 224,
1413 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1414 224, 224, 224, 224, 224, 224, 224, 224, 224, 225, 225, 225, 225,
1415 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1416 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 230, 230,
1417 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1418 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 231, 231,
1419 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1420 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 228,
1421 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1422 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1423 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1424 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1425 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
1426 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
1427 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
1428 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
1429 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
1430 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
1431 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 253,
1432 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 242,
1433 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 243,
1434 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 240,
1435 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241,
1436 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 246, 246,
1437 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 247, 247,
1438 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 244, 244,
1439 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 245, 245, 245,
1440 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 202, 202, 202,
1441 202, 202, 202, 203, 203, 203, 203, 203, 203, 200, 200, 200, 200,
1442 200, 200, 200, 201, 201, 201, 201, 201, 201, 206, 206, 206, 206,
1443 206, 206, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 204,
1444 204, 204, 205, 205, 205, 205, 205, 205, 194, 194, 194, 194, 194,
1445 194, 195, 195, 195, 195, 195, 195, 192, 192, 192, 192, 192, 192,
1446 192, 193, 193, 193, 193, 193, 193, 198, 198, 198, 198, 198, 198,
1447 199, 199, 199, 199, 199, 199, 196, 196, 196, 196, 196, 196, 196,
1448 197, 197, 197, 197, 197, 197, 218, 218, 218, 218, 218, 218, 219,
1449 219, 219, 219, 219, 219, 216, 216, 216, 216, 216, 216, 216, 217,
1450 217, 217, 217, 217, 217, 222, 222, 222, 222, 222, 222, 223, 223,
1451 223, 223, 223, 223, 220, 220, 220, 220, 220, 220, 220, 221, 221,
1452 221, 221, 221, 221, 210, 210, 210, 210, 210, 210, 211, 211, 211,
1453 211, 211, 211, 208, 208, 208, 208, 208, 208, 209, 209, 209, 209,
1454 209, 209, 209, 214, 214, 214, 214, 214, 214, 215, 215, 215, 215,
1455 215, 215, 212, 212, 212, 212, 212, 212, 213, 213, 213, 213, 213,
1456 213, 213, 90, 90, 90, 85, 85, 85, 85, 85, 85, 84, 84, 84, 84, 84,
1457 84, 87, 87, 87, 87, 87, 87, 86, 86, 86, 86, 86, 86, 81, 81, 81,
1458 81, 81, 81, 81, 80, 80, 80, 80, 80, 80, 83, 83, 83, 83, 83, 83,
1459 82, 82, 82, 82, 82, 82, 93, 93, 93, 93, 93, 93, 93, 92, 92, 92,
1460 92, 92, 92, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 89,
1461 89, 89, 89, 89, 89, 88, 88, 88, 88, 88, 88, 88, 91, 91, 91, 91,
1462 91, 91, 90, 90, 90, 90, 90, 90, 69, 69, 69, 69, 69, 69, 68, 68,
1463 68, 68, 68, 68, 68, 71, 71, 71, 71, 71, 71, 70, 70, 70, 70, 70,
1464 70, 65, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 64, 64, 67, 67,
1465 67, 67, 67, 67, 66, 66, 66, 66, 66, 66, 77, 77, 77, 77, 77, 77,
1466 76, 76, 76, 76, 76, 76, 76, 79, 79, 79, 79, 79, 79, 78, 78, 78,
1467 78, 78, 78, 73, 73, 73, 73, 73, 73, 73, 72, 72, 72, 72, 72, 72,
1468 75, 75, 75, 75, 75, 75, 74, 74, 74, 74, 74, 74, 117, 117, 117, 117,
1469 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116,
1470 116, 116, 116, 116, 116, 116, 116, 116, 116, 119, 119, 119, 119,
1471 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118,
1472 118, 118, 118, 118, 118, 118, 118, 118, 113, 113, 113, 113, 113,
1473 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112,
1474 112, 112, 112, 112, 112, 112, 112, 115, 115, 115, 115, 115, 115,
1475 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114,
1476 114, 114, 114, 114, 114, 114, 114, 125, 125, 125, 125, 125, 125,
1477 125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 124,
1478 124, 124, 124, 124, 124, 124, 124, 127, 127, 127, 127, 127, 127,
1479 127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126,
1480 126, 126, 126, 126, 126, 126, 121, 121, 121, 121, 121, 121, 121,
1481 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120,
1482 120, 120, 120, 120, 120, 120, 123, 123, 123, 123, 123, 123, 123,
1483 123, 123, 123, 123, 123, 123, 122, 122, 122, 122, 122, 122, 122,
1484 122, 122, 122, 122, 122, 122, 101, 101, 101, 101, 101, 101, 101,
1485 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1486 101, 101, 101, 101, 101, 101, 101, 100, 100, 100, 100, 100, 100,
1487 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1488 100, 100, 100, 100, 100, 100, 100, 103, 103, 103, 103, 103, 103,
1489 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1490 103, 103, 103, 103, 103, 103, 103, 103, 102, 102, 102, 102, 102,
1491 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1492 102, 102, 102, 102, 102, 102, 102, 102, 102, 97, 97, 97, 97, 97,
1493 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1494 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1495 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1496 96, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1497 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 98, 98, 98,
1498 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1499 98, 98, 98, 98, 98, 98, 98, 98, 98, 109, 109, 109, 109, 109, 109,
1500 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1501 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 108, 108, 108,
1502 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1503 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 111,
1504 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1505 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1506 111, 111, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1507 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1508 110, 110, 110, 110, 110, 110, 105, 105, 105, 105, 105, 105, 105,
1509 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1510 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 104,
1511 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1512 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1513 104, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1514 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1515 107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 106,
1516 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1517 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 21,
1518 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1519 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1520 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1521 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1522 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1523 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1524 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1525 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1526 20, 20, 20, 20, 20, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1527 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1528 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1529 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1530 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 22, 22, 22,
1531 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1532 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1533 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1534 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1535 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 17, 17, 17, 17, 17, 17,
1536 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1537 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1538 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1539 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1540 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 16, 16,
1541 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1542 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1543 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1544 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1545 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1546 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 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, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1549 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1550 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1551 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1552 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1553 19, 19, 19, 19, 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, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1557 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1558 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1559 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1560 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1561 18, 18, 18, 18, 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, 29, 29, 29, 29, 29, 29,
1568 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1569 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1570 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1571 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1572 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 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, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1601 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1602 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1603 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1604 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1605 28, 28, 28, 28, 28, 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, 29, 29, 29, 29, 29,
1612 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1613 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1614 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1615 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
1616 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 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, 18, 18, 18, 18, 18,
1620 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1621 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1622 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1623 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
1624 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 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, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1627 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1628 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1629 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1630 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
1631 19, 19, 19, 19, 19, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1632 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1633 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1634 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1635 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1636 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1637 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1638 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1639 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1640 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1641 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
1642 17, 17, 17, 17, 17, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1643 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1644 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1645 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1646 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
1647 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1648 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1649 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1650 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
1651 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 20, 20, 20, 20, 20, 20,
1652 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1653 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1654 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
1655 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
1656 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1657 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1658 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1659 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1660 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1661 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1662 106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 107,
1663 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1664 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 104, 104,
1665 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1666 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1667 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1668 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1669 105, 105, 105, 105, 105, 105, 110, 110, 110, 110, 110, 110, 110,
1670 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1671 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111,
1672 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1673 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1674 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1675 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1676 108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1677 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1678 109, 109, 109, 109, 109, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1679 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
1680 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1681 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 96, 96,
1682 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
1683 96, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97,
1684 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
1685 97, 97, 97, 97, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1686 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1687 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1688 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1689 103, 103, 103, 103, 103, 100, 100, 100, 100, 100, 100, 100, 100,
1690 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1691 100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 101, 101,
1692 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1693 101, 101, 101, 101, 101, 101, 122, 122, 122, 122, 122, 122, 122,
1694 122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 123,
1695 123, 123, 123, 123, 123, 123, 120, 120, 120, 120, 120, 120, 120,
1696 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121,
1697 121, 121, 121, 121, 121, 121, 126, 126, 126, 126, 126, 126, 126,
1698 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127,
1699 127, 127, 127, 127, 127, 124, 124, 124, 124, 124, 124, 124, 124,
1700 124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125,
1701 125, 125, 125, 125, 125, 114, 114, 114, 114, 114, 114, 114, 114,
1702 114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115,
1703 115, 115, 115, 115, 115, 112, 112, 112, 112, 112, 112, 112, 112,
1704 112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1705 113, 113, 113, 113, 118, 118, 118, 118, 118, 118, 118, 118, 118,
1706 118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119,
1707 119, 119, 119, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
1708 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
1709 117, 117, 117, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 72,
1710 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 78, 78, 78, 78,
1711 78, 78, 79, 79, 79, 79, 79, 79, 76, 76, 76, 76, 76, 76, 76, 77,
1712 77, 77, 77, 77, 77, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67,
1713 67, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 70, 70,
1714 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 68, 68, 68, 68, 68, 68,
1715 68, 69, 69, 69, 69, 69, 69, 90, 90, 90, 90, 90, 90, 91, 91, 91,
1716 91, 91, 91, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89,
1717 94, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 92, 92, 92, 92,
1718 92, 92, 93, 93, 93, 93, 93, 93, 93, 82, 82, 82, 82, 82, 82, 83,
1719 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81,
1720 81, 81, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 84, 84,
1721 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 90, 90, 90 };
1722
1723 /*===========================================================================*/
1724
1725 #endif /* NI4BTEL > 0 */