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