Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / net / i4b / driver / i4b_tel.c
CommitLineData
984263bc
MD
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 *
32 * last edit-date: [Sat Aug 11 18:07:05 2001]
33 *
34 *---------------------------------------------------------------------------*/
35
36#include "i4btel.h"
37
38#if NI4BTEL > 0
39
40#undef I4BTELDEBUG
41
42#include <sys/param.h>
43#include <sys/systm.h>
44
45#include <sys/ioccom.h>
46#include <sys/poll.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/tty.h>
55
56#ifdef DEVFS
57#include <sys/devfsext.h>
58#endif
59
60#include <machine/i4b_ioctl.h>
61#include <machine/i4b_tel_ioctl.h>
62#include <machine/i4b_debug.h>
63
64#include <i4b/include/i4b_global.h>
65#include <i4b/include/i4b_mbuf.h>
66#include <i4b/include/i4b_l3l4.h>
67
68#include <i4b/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
86typedef 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
120static tel_sc_t tel_sc[NI4BTEL][NOFUNCS];
121
122/* forward decl */
123
124static void tel_rx_data_rdy(int unit);
125static void tel_tx_queue_empty(int unit);
126static void tel_init_linktab(int unit);
127static void tel_connect(int unit, void *cdp);
128static void tel_disconnect(int unit, void *cdp);
129static void tel_tone(tel_sc_t *sc);
130
131/* audio format conversion tables */
132static unsigned char a2u_tab[];
133static unsigned char u2a_tab[];
134static unsigned char bitreverse[];
135static u_char sinetab[];
136
137#define PDEVSTATIC static
138
139PDEVSTATIC d_open_t i4btelopen;
140PDEVSTATIC d_close_t i4btelclose;
141PDEVSTATIC d_read_t i4btelread;
142PDEVSTATIC d_read_t i4btelwrite;
143PDEVSTATIC d_ioctl_t i4btelioctl;
144
145#ifdef OS_USES_POLL
146PDEVSTATIC d_poll_t i4btelpoll;
147#define POLLFIELD i4btelpoll
148#else
149PDEVSTATIC d_select_t i4btelsel;
150#define POLLFIELD i4btelsel
151#endif
152
153#define CDEV_MAJOR 56
154
155static struct cdevsw i4btel_cdevsw = {
156 /* open */ i4btelopen,
157 /* close */ i4btelclose,
158 /* read */ i4btelread,
159 /* write */ i4btelwrite,
160 /* ioctl */ i4btelioctl,
161 /* poll */ POLLFIELD,
162 /* mmap */ nommap,
163 /* strategy */ nostrategy,
164 /* name */ "i4btel",
165 /* maj */ CDEV_MAJOR,
166 /* dump */ nodump,
167 /* psize */ nopsize,
168 /* flags */ 0,
169 /* bmaj */ -1
170};
171
172PDEVSTATIC void i4btelinit(void *unused);
173PDEVSTATIC void i4btelattach(void *);
174
175PSEUDO_SET(i4btelattach, i4b_tel);
176
177/*===========================================================================*
178 * DEVICE DRIVER ROUTINES
179 *===========================================================================*/
180
181/*---------------------------------------------------------------------------*
182 * initialization at kernel load time
183 *---------------------------------------------------------------------------*/
184PDEVSTATIC void
185i4btelinit(void *unused)
186{
187 cdevsw_add(&i4btel_cdevsw);
188}
189
190SYSINIT(i4bteldev, SI_SUB_DRIVERS,
191 SI_ORDER_MIDDLE+CDEV_MAJOR, &i4btelinit, NULL);
192
193/*---------------------------------------------------------------------------*
194 * interface attach routine
195 *---------------------------------------------------------------------------*/
196PDEVSTATIC void
197i4btelattach(void *dummy)
198{
199 int i, j;
200
201 printf("i4btel: %d ISDN telephony interface device(s) attached\n", NI4BTEL);
202
203 for(i=0; i < NI4BTEL; i++)
204 {
205 for(j=0; j < NOFUNCS; j++)
206 {
207 tel_sc[i][j].devstate = ST_IDLE;
208 tel_sc[i][j].audiofmt = CVT_NONE;
209 tel_sc[i][j].rcvttab = 0;
210 tel_sc[i][j].wcvttab = 0;
211 tel_sc[i][j].result = 0;
212
213 switch(j)
214 {
215 case FUNCTEL: /* normal i4btel device */
216 make_dev(&i4btel_cdevsw, i,
217 UID_ROOT, GID_WHEEL,
218 0600, "i4btel%d", i);
219 break;
220
221 case FUNCDIAL: /* i4bteld dialout device */
222 make_dev(&i4btel_cdevsw, i+(1<<UNITBITS),
223 UID_ROOT, GID_WHEEL,
224 0600, "i4bteld%d", i);
225 break;
226 }
227 }
228 tel_init_linktab(i);
229 }
230}
231
232/*---------------------------------------------------------------------------*
233 * open tel device
234 *---------------------------------------------------------------------------*/
235PDEVSTATIC int
236i4btelopen(dev_t dev, int flag, int fmt, struct proc *p)
237{
238 int unit = UNIT(dev);
239 int func = FUNC(dev);
240
241 tel_sc_t *sc;
242
243 if(unit >= NI4BTEL)
244 return(ENXIO);
245
246 sc = &tel_sc[unit][func];
247
248 if(sc->devstate & ST_ISOPEN)
249 return(EBUSY);
250
251 sc->devstate |= ST_ISOPEN;
252
253 if(func == FUNCDIAL)
254 {
255 sc->result = 0;
256 }
257
258 return(0);
259}
260
261/*---------------------------------------------------------------------------*
262 * close tel device
263 *---------------------------------------------------------------------------*/
264PDEVSTATIC int
265i4btelclose(dev_t dev, int flag, int fmt, struct proc *p)
266{
267 int unit = UNIT(dev);
268 int func = FUNC(dev);
269 tel_sc_t *sc;
270 int error = 0;
271 int x;
272
273 if(unit > NI4BTEL)
274 return(ENXIO);
275
276 sc = &tel_sc[unit][func];
277
278 x = splimp();
279 sc->devstate &= ~ST_TONE;
280
281 if((func == FUNCTEL) &&
282 (sc->isdn_linktab != NULL && sc->isdn_linktab->tx_queue != NULL))
283 {
284 while(!(IF_QEMPTY(sc->isdn_linktab->tx_queue)))
285 {
286 sc->devstate |= ST_WRWAITEMPTY;
287
288 if((error = tsleep((caddr_t) &sc->isdn_linktab->tx_queue,
289 TTIPRI | PCATCH, "wtcl", 0)) != 0)
290 {
291 break;
292 }
293 }
294 sc->devstate &= ~ST_WRWAITEMPTY;
295 }
296
297 sc->devstate &= ~ST_ISOPEN;
298 splx(x);
299 wakeup((caddr_t) &sc->tones);
300
301 return(error);
302}
303
304/*---------------------------------------------------------------------------*
305 * i4btelioctl - device driver ioctl routine
306 *---------------------------------------------------------------------------*/
307PDEVSTATIC int
308i4btelioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
309{
310 int unit = UNIT(dev);
311 int func = FUNC(dev);
312 int error = 0;
313 struct mbuf *m;
314 int s;
315
316 tel_sc_t *sc = &tel_sc[unit][func];
317
318 if(func == FUNCTEL)
319 {
320 switch(cmd)
321 {
322 case I4B_TEL_GETAUDIOFMT:
323 *(int *)data = sc->audiofmt;
324 break;
325
326 case I4B_TEL_SETAUDIOFMT:
327 switch (*(int *)data)
328 {
329 case CVT_NONE:
330 sc->rcvttab = 0;
331 sc->wcvttab = 0;
332 break;
333 case CVT_ALAW2ULAW:
334 /* ISDN: a-law */
335 /* user: u-law */
336 sc->rcvttab = a2u_tab;
337 sc->wcvttab = u2a_tab;
338 break;
339 case CVT_ULAW2ALAW:
340 /* ISDN: u-law */
341 /* user: a-law */
342 sc->rcvttab = u2a_tab;
343 sc->wcvttab = a2u_tab;
344 break;
345 default:
346 error = ENODEV;
347 break;
348 }
349 if(error == 0)
350 sc->audiofmt = *(int *)data;
351 break;
352
353 case I4B_TEL_EMPTYINPUTQUEUE:
354 s = splimp();
355 while((sc->devstate & ST_CONNECTED) &&
356 (sc->devstate & ST_ISOPEN) &&
357 !IF_QEMPTY(sc->isdn_linktab->rx_queue))
358 {
359 IF_DEQUEUE(sc->isdn_linktab->rx_queue, m);
360 if(m)
361 i4b_Bfreembuf(m);
362 }
363 splx(s);
364 break;
365
366 case I4B_TEL_VR_REQ:
367 {
368 msg_vr_req_t *mvr;
369
370 mvr = (msg_vr_req_t *)data;
371
372 mvr->version = VERSION;
373 mvr->release = REL;
374 mvr->step = STEP;
375 break;
376 }
377 case I4B_TEL_TONES:
378 {
379 struct i4b_tel_tones *tt;
380
381 tt = (struct i4b_tel_tones *)data;
382 s = splimp();
383 while ((sc->devstate & ST_TONE) &&
384 sc->tones.duration[sc->toneidx] != 0) {
385 if((error = tsleep((caddr_t) &sc->tones,
386 TTIPRI | PCATCH, "rtone", 0 )) != 0) {
387 splx(s);
388 return(error);
389 }
390 }
391 if(!(sc->devstate & ST_ISOPEN)) {
392 splx(s);
393 return (EIO);
394 }
395 if(!(sc->devstate & ST_CONNECTED)) {
396 splx(s);
397 return (EIO);
398 }
399
400 sc->tones = *tt;
401 sc->toneidx = 0;
402 sc->tonefreq = tt->frequency[0];
403 sc->devstate |= ST_TONE;
404 splx(s);
405 tel_tone(sc);
406 break;
407 }
408
409 default:
410 error = ENOTTY;
411 break;
412 }
413 }
414 else if(func == FUNCDIAL)
415 {
416 switch(cmd)
417 {
418 default:
419 error = ENOTTY;
420 break;
421 }
422 }
423 return(error);
424}
425
426/*---------------------------------------------------------------------------*
427 * read from tel device
428 *---------------------------------------------------------------------------*/
429PDEVSTATIC int
430i4btelread(dev_t dev, struct uio *uio, int ioflag)
431{
432 int unit = UNIT(dev);
433 int func = FUNC(dev);
434
435 struct mbuf *m;
436 int s;
437 int error = 0;
438
439 tel_sc_t *sc = &tel_sc[unit][func];
440
441 if(!(sc->devstate & ST_ISOPEN))
442 return(EIO);
443
444 if(func == FUNCTEL)
445 {
446 s = splimp();
447 IF_LOCK(sc->isdn_linktab->rx_queue);
448
449 while((sc->devstate & ST_ISOPEN) &&
450 (sc->devstate & ST_CONNECTED) &&
451 IF_QEMPTY(sc->isdn_linktab->rx_queue))
452 {
453 sc->devstate |= ST_RDWAITDATA;
454
455 NDBGL4(L4_TELDBG, "i4btel%d, queue empty!", unit);
456
457#if defined (__FreeBSD__) && __FreeBSD__ > 4
458 if((error = msleep((caddr_t) &sc->isdn_linktab->rx_queue,
459 &sc->isdn_linktab->rx_queue->ifq_mtx,
460 TTIPRI | PCATCH,
461 "rtel", 0 )) != 0)
462#else
463 if((error = tsleep((caddr_t) &sc->isdn_linktab->rx_queue,
464 TTIPRI | PCATCH,
465 "rtel", 0 )) != 0)
466#endif
467 {
468 sc->devstate &= ~ST_RDWAITDATA;
469 IF_UNLOCK(sc->isdn_linktab->rx_queue);
470 splx(s);
471 return(error);
472 }
473 }
474
475 if(!(sc->devstate & ST_ISOPEN))
476 {
477 IF_UNLOCK(sc->isdn_linktab->rx_queue);
478 splx(s);
479 return(EIO);
480 }
481
482 if(!(sc->devstate & ST_CONNECTED))
483 {
484 IF_UNLOCK(sc->isdn_linktab->rx_queue);
485 splx(s);
486 return(EIO);
487 }
488
489
490 _IF_DEQUEUE(sc->isdn_linktab->rx_queue, m);
491 IF_UNLOCK(sc->isdn_linktab->rx_queue);
492
493 if(m && m->m_len > 0)
494 {
495 register int i;
496
497 for(i = 0; i < m->m_len; i++)
498 {
499 /* always reverse bit order from line */
500 mtod(m,u_char *)[i] = bitreverse[mtod(m,u_char *)[i]];
501
502 /* convert if necessary */
503 if(sc->rcvttab)
504 mtod(m,u_char *)[i] = sc->rcvttab[mtod(m,u_char *)[i]];
505 }
506 error = uiomove(m->m_data, m->m_len, uio);
507
508 NDBGL4(L4_TELDBG, "i4btel%d, mbuf (%d bytes), uiomove %d!", unit, m->m_len, error);
509 }
510 else
511 {
512 NDBGL4(L4_TELDBG, "i4btel%d, empty mbuf from queue!", unit);
513 error = EIO;
514 }
515
516 if(m)
517 i4b_Bfreembuf(m);
518
519 splx(s);
520 }
521 else if(func == FUNCDIAL)
522 {
523 s = splimp();
524 while((sc->result == 0) && (sc->devstate & ST_ISOPEN))
525 {
526 sc->devstate |= ST_RDWAITDATA;
527
528 if((error = tsleep((caddr_t) &sc->result,
529 TTIPRI | PCATCH,
530 "rtel1", 0 )) != 0)
531 {
532 sc->devstate &= ~ST_RDWAITDATA;
533 splx(s);
534 return(error);
535 }
536 }
537
538 if(!(sc->devstate & ST_ISOPEN))
539 {
540 splx(s);
541 return(EIO);
542 }
543
544 if(sc->result != 0)
545 {
546 error = uiomove(&sc->result, 1, uio);
547 sc->result = 0;
548 }
549 else
550 {
551 error = EIO;
552 }
553
554 splx(s);
555 }
556 return(error);
557}
558
559/*---------------------------------------------------------------------------*
560 * write to tel device
561 *---------------------------------------------------------------------------*/
562PDEVSTATIC int
563i4btelwrite(dev_t dev, struct uio * uio, int ioflag)
564{
565 int unit = UNIT(dev);
566 int func = FUNC(dev);
567 struct mbuf *m;
568 int s;
569 int error = 0;
570 tel_sc_t *sc = &tel_sc[unit][func];
571
572 if(!(sc->devstate & ST_ISOPEN))
573 {
574 return(EIO);
575 }
576
577 if(func == FUNCTEL)
578 {
579 s = splimp();
580
581 if(!(sc->devstate & ST_CONNECTED)) {
582 splx(s);
583 return(EIO);
584 }
585
586 sc->devstate &= ~ST_TONE;
587 IF_LOCK(sc->isdn_linktab->tx_queue);
588 while((_IF_QFULL(sc->isdn_linktab->tx_queue)) &&
589 (sc->devstate & ST_ISOPEN))
590 {
591 sc->devstate |= ST_WRWAITEMPTY;
592
593#if defined (__FreeBSD__) && __FreeBSD__ > 4
594 if((error = msleep((caddr_t) &sc->isdn_linktab->tx_queue,
595 &sc->isdn_linktab->tx_queue->ifq_mtx,
596 TTIPRI | PCATCH, "wtel", 0)) != 0)
597#else
598 if((error = tsleep((caddr_t) &sc->isdn_linktab->tx_queue,
599 TTIPRI | PCATCH, "wtel", 0)) != 0)
600#endif
601 {
602 sc->devstate &= ~ST_WRWAITEMPTY;
603 IF_UNLOCK(sc->isdn_linktab->tx_queue);
604 splx(s);
605 return(error);
606 }
607 }
608 IF_UNLOCK(sc->isdn_linktab->tx_queue);
609
610 if(!(sc->devstate & ST_ISOPEN))
611 {
612 splx(s);
613 return(EIO);
614 }
615
616 if(!(sc->devstate & ST_CONNECTED))
617 {
618 splx(s);
619 return(EIO);
620 }
621
622 if((m = i4b_Bgetmbuf(BCH_MAX_DATALEN)) != NULL)
623 {
624 register int i;
625
626 m->m_len = min(BCH_MAX_DATALEN, uio->uio_resid);
627
628 error = uiomove(m->m_data, m->m_len, uio);
629
630 for(i = 0; i < m->m_len; i++)
631 {
632 /* convert if necessary */
633 if(sc->wcvttab)
634 mtod(m,u_char *)[i] = sc->wcvttab[mtod(m,u_char *)[i]];
635
636 /* always reverse bitorder to line */
637 mtod(m,u_char *)[i] = bitreverse[mtod(m,u_char *)[i]];
638 }
639
640#if defined (__FreeBSD__) && __FreeBSD__ > 4
641 (void) IF_HANDOFF(sc->isdn_linktab->tx_queue, m, NULL);
642#else
643 if(IF_QFULL(sc->isdn_linktab->tx_queue))
644 m_freem(m);
645 else
646 IF_ENQUEUE(sc->isdn_linktab->tx_queue, m);
647#endif
648 (*sc->isdn_linktab->bch_tx_start)(sc->isdn_linktab->unit, sc->isdn_linktab->channel);
649 }
650
651 splx(s);
652 }
653 else if(func == FUNCDIAL)
654 {
655#define CMDBUFSIZ 80
656 char cmdbuf[CMDBUFSIZ];
657 int len = min(CMDBUFSIZ-1, uio->uio_resid);
658
659 error = uiomove(cmdbuf, len, uio);
660
661 if(cmdbuf[0] == CMD_DIAL)
662 {
663 i4b_l4_dialoutnumber(BDRV_TEL, unit, len-1, &cmdbuf[1]);
664 }
665 else if(cmdbuf[0] == CMD_HUP)
666 {
667 i4b_l4_drvrdisc(BDRV_TEL, unit);
668 }
669 else if(cmdbuf[0] == CMD_KEYP)
670 {
671 i4b_l4_keypad(BDRV_TEL, unit, len-1, &cmdbuf[1]);
672 }
673 }
674 else
675 {
676 error = EIO;
677 }
678
679 return(error);
680}
681
682/*---------------------------------------------------------------------------*
683 *
684 *---------------------------------------------------------------------------*/
685#define NTONESAMP 32
686static void
687tel_tone(tel_sc_t *sc)
688{
689 struct mbuf *m;
690 u_char *p;
691 int i;
692
693 if((m = i4b_Bgetmbuf(NTONESAMP)) == NULL) {
694 printf("no mbuf in tel_tone\n");
695 return;
696 }
697 p = m->m_data;
698 m->m_len = 0;
699 for (i = 0; i < NTONESAMP && (sc->devstate & ST_TONE); i++) {
700
701 if (sc->tones.duration[sc->toneidx] > 0) {
702 if (--sc->tones.duration[sc->toneidx] == 0) {
703 sc->toneidx++;
704 if (sc->toneidx == I4B_TEL_MAXTONES) {
705 sc->devstate &= ~ST_TONE;
706 sc->toneomega = 0;
707 sc->tonefreq = 0;
708 } else if (sc->tones.frequency[sc->toneidx] == 0 &&
709 sc->tones.duration[sc->toneidx] == 0) {
710 sc->devstate &= ~ST_TONE;
711 sc->toneomega = 0;
712 sc->tonefreq = 0;
713 } else {
714 sc->tonefreq = sc->tones.frequency[sc->toneidx];
715 }
716 if (sc->tones.duration[sc->toneidx] == 0) {
717 wakeup((caddr_t) &sc->tones);
718 }
719 }
720 }
721
722 sc->toneomega += sc->tonefreq;
723 if (sc->toneomega >= 8000)
724 sc->toneomega -= 8000;
725 *p++ = bitreverse[sinetab[sc->toneomega]];
726 m->m_len++;
727 }
728 IF_ENQUEUE(sc->isdn_linktab->tx_queue, m);
729 (*sc->isdn_linktab->bch_tx_start)(sc->isdn_linktab->unit, sc->isdn_linktab->channel);
730}
731
732
733#ifdef OS_USES_POLL
734/*---------------------------------------------------------------------------*
735 * device driver poll
736 *---------------------------------------------------------------------------*/
737PDEVSTATIC int
738i4btelpoll(dev_t dev, int events, struct proc *p)
739{
740 int revents = 0; /* Events we found */
741 int s;
742 int unit = UNIT(dev);
743 int func = FUNC(dev);
744
745 tel_sc_t *sc = &tel_sc[unit][func];
746
747 s = splhigh();
748
749 if(!(sc->devstate & ST_ISOPEN))
750 {
751 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
752 splx(s);
753 return(0);
754 }
755
756 if(func == FUNCTEL)
757 {
758 /*
759 * Writes are OK if we are connected and the
760 * transmit queue can take them
761 */
762
763 if((events & (POLLOUT|POLLWRNORM)) &&
764 (sc->devstate & ST_CONNECTED) &&
765 (sc->isdn_linktab != NULL) &&
766 (!_IF_QFULL(sc->isdn_linktab->tx_queue)))
767 {
768 NDBGL4(L4_TELDBG, "i4btel%d, POLLOUT", unit);
769 revents |= (events & (POLLOUT|POLLWRNORM));
770 }
771
772 /* ... while reads are OK if we have any data */
773
774 if((events & (POLLIN|POLLRDNORM)) &&
775 (sc->devstate & ST_CONNECTED) &&
776 (sc->isdn_linktab != NULL) &&
777 (!IF_QEMPTY(sc->isdn_linktab->rx_queue)))
778 {
779 NDBGL4(L4_TELDBG, "i4btel%d, POLLIN", unit);
780 revents |= (events & (POLLIN|POLLRDNORM));
781 }
782
783 if(revents == 0)
784 {
785 NDBGL4(L4_TELDBG, "i4btel%d, selrecord", unit);
786 selrecord(p, &sc->selp);
787 }
788 }
789 else if(func == FUNCDIAL)
790 {
791 if(events & (POLLOUT|POLLWRNORM))
792 {
793 NDBGL4(L4_TELDBG, "i4bteld%d, POLLOUT", unit);
794 revents |= (events & (POLLOUT|POLLWRNORM));
795 }
796
797 if(events & (POLLIN|POLLRDNORM))
798 {
799 NDBGL4(L4_TELDBG, "i4bteld%d, POLLIN, result = %d", unit, sc->result);
800 if(sc->result != 0)
801 revents |= (events & (POLLIN|POLLRDNORM));
802 }
803
804 if(revents == 0)
805 {
806 NDBGL4(L4_TELDBG, "i4bteld%d, selrecord", unit);
807 selrecord(p, &sc->selp);
808 }
809 }
810 splx(s);
811 return(revents);
812}
813
814#else /* OS_USES_POLL */
815
816/*---------------------------------------------------------------------------*
817 * device driver select
818 *---------------------------------------------------------------------------*/
819PDEVSTATIC int
820i4btelsel(dev_t dev, int rw, struct proc *p)
821{
822 int s;
823 int unit = UNIT(dev);
824 int func = FUNC(dev);
825
826 tel_sc_t *sc = &tel_sc[unit][func];
827
828 s = splhigh();
829
830 if (!(sc->devstate & ST_ISOPEN))
831 {
832 NDBGL4(L4_TELDBG, "i4btel%d, !ST_ISOPEN", unit);
833 splx(s);
834 return(0);
835 }
836
837 if (func == FUNCTEL)
838 {
839 /* Don't even bother if we're not connected */
840 if (!(sc->devstate & ST_CONNECTED) || sc->isdn_linktab == NULL)
841 {
842 splx(s);
843 return 0;
844 }
845
846 if (rw == FREAD)
847 {
848 if (!IF_QEMPTY(sc->isdn_linktab->rx_queue))
849 {
850 NDBGL4(L4_TELDBG, "i4btel%d, FREAD", unit);
851 splx(s);
852 return 1;
853 }
854 }
855 else if (rw == FWRITE)
856 {
857 if (!_IF_QFULL(sc->isdn_linktab->tx_queue))
858 {
859 NDBGL4(L4_TELDBG, "i4btel%d, FWRITE", unit);
860 splx(s);
861 return 1;
862 }
863 }
864 }
865 else if (func == FUNCDIAL)
866 {
867 if (rw == FWRITE)
868 {
869 NDBGL4(L4_TELDBG, "i4bteld%d, FWRITE", unit);
870 splx(s);
871 return 1;
872 }
873
874 if (rw == FREAD)
875 {
876 NDBGL4(L4_TELDBG, "i4bteld%d, FREAD, result = %d", unit, sc->result);
877 if (sc->result != 0)
878 {
879 splx(s);
880 return 1;
881 }
882 }
883 }
884
885 NDBGL4(L4_TELDBG, "i4bteld%d, selrecord", unit);
886 selrecord(p, &sc->selp);
887 splx(s);
888 return 0;
889}
890
891#endif /* OS_USES_POLL */
892
893/*===========================================================================*
894 * ISDN INTERFACE ROUTINES
895 *===========================================================================*/
896
897/*---------------------------------------------------------------------------*
898* this routine is called from L4 handler at connect time
899 *---------------------------------------------------------------------------*/
900static void
901tel_connect(int unit, void *cdp)
902{
903 tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
904
905 /* audio device */
906
907 sc->cdp = (call_desc_t *)cdp;
908
909 sc->devstate |= ST_CONNECTED;
910
911 /* dialer device */
912
913 sc = &tel_sc[unit][FUNCDIAL];
914
915 if(sc->devstate == ST_ISOPEN)
916 {
917 sc->result = RSP_CONN;
918
919 if(sc->devstate & ST_RDWAITDATA)
920 {
921 sc->devstate &= ~ST_RDWAITDATA;
922 wakeup((caddr_t) &sc->result);
923 }
924 selwakeup(&sc->selp);
925 }
926}
927
928/*---------------------------------------------------------------------------*
929 * this routine is called from L4 handler at disconnect time
930 *---------------------------------------------------------------------------*/
931static void
932tel_disconnect(int unit, void *cdp)
933{
934/* call_desc_t *cd = (call_desc_t *)cdp; */
935
936 tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
937
938 /* audio device */
939
940 sc->devstate &= ~ST_CONNECTED;
941
942 if(sc->devstate & ST_RDWAITDATA)
943 {
944 sc->devstate &= ~ST_RDWAITDATA;
945 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
946 }
947
948 if(sc->devstate & ST_WRWAITEMPTY)
949 {
950 sc->devstate &= ~ST_WRWAITEMPTY;
951 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
952 }
953
954 /* dialer device */
955
956 sc = &tel_sc[unit][FUNCDIAL];
957
958 if(sc->devstate & ST_ISOPEN)
959 {
960 sc->result = RSP_HUP;
961
962 if(sc->devstate & ST_RDWAITDATA)
963 {
964 sc->devstate &= ~ST_RDWAITDATA;
965 wakeup((caddr_t) &sc->result);
966 }
967 selwakeup(&sc->selp);
968
969 if (sc->devstate & ST_TONE) {
970 sc->devstate &= ~ST_TONE;
971 wakeup((caddr_t) &sc->tones);
972 }
973 }
974}
975
976/*---------------------------------------------------------------------------*
977 * feedback from daemon in case of dial problems
978 *---------------------------------------------------------------------------*/
979static void
980tel_dialresponse(int unit, int status, cause_t cause)
981{
982 tel_sc_t *sc = &tel_sc[unit][FUNCDIAL];
983
984 NDBGL4(L4_TELDBG, "i4btel%d, status=%d, cause=0x%4x", unit, status, cause);
985
986 if((sc->devstate == ST_ISOPEN) && status)
987 {
988 sc->result = RSP_NOA;
989
990 if(sc->devstate & ST_RDWAITDATA)
991 {
992 sc->devstate &= ~ST_RDWAITDATA;
993 wakeup((caddr_t) &sc->result);
994 }
995 selwakeup(&sc->selp);
996 }
997}
998
999/*---------------------------------------------------------------------------*
1000 * interface up/down
1001 *---------------------------------------------------------------------------*/
1002static void
1003tel_updown(int unit, int updown)
1004{
1005}
1006
1007/*---------------------------------------------------------------------------*
1008 * this routine is called from the HSCX interrupt handler
1009 * when a new frame (mbuf) has been received and was put on
1010 * the rx queue.
1011 *---------------------------------------------------------------------------*/
1012static void
1013tel_rx_data_rdy(int unit)
1014{
1015 tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1016
1017 if(sc->devstate & ST_RDWAITDATA)
1018 {
1019 sc->devstate &= ~ST_RDWAITDATA;
1020 wakeup((caddr_t) &sc->isdn_linktab->rx_queue);
1021 }
1022 selwakeup(&sc->selp);
1023}
1024
1025/*---------------------------------------------------------------------------*
1026 * this routine is called from the HSCX interrupt handler
1027 * when the last frame has been sent out and there is no
1028 * further frame (mbuf) in the tx queue.
1029 *---------------------------------------------------------------------------*/
1030static void
1031tel_tx_queue_empty(int unit)
1032{
1033 tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1034
1035 if(sc->devstate & ST_WRWAITEMPTY)
1036 {
1037 sc->devstate &= ~ST_WRWAITEMPTY;
1038 wakeup((caddr_t) &sc->isdn_linktab->tx_queue);
1039 }
1040 if(sc->devstate & ST_TONE) {
1041 tel_tone(sc);
1042 } else {
1043 selwakeup(&sc->selp);
1044 }
1045}
1046
1047/*---------------------------------------------------------------------------*
1048 * this routine is called from the HSCX interrupt handler
1049 * each time a packet is received or transmitted.
1050 *---------------------------------------------------------------------------*/
1051static void
1052tel_activity(int unit, int rxtx)
1053{
1054 if(tel_sc[unit][FUNCTEL].cdp)
1055 tel_sc[unit][FUNCTEL].cdp->last_active_time = SECOND;
1056}
1057
1058/*---------------------------------------------------------------------------*
1059 * return this drivers linktab address
1060 *---------------------------------------------------------------------------*/
1061drvr_link_t *
1062tel_ret_linktab(int unit)
1063{
1064 tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1065
1066 tel_init_linktab(unit);
1067 return(&sc->drvr_linktab);
1068}
1069
1070/*---------------------------------------------------------------------------*
1071 * setup the isdn_linktab for this driver
1072 *---------------------------------------------------------------------------*/
1073void
1074tel_set_linktab(int unit, isdn_link_t *ilt)
1075{
1076 tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1077 sc->isdn_linktab = ilt;
1078}
1079
1080/*---------------------------------------------------------------------------*
1081 * initialize this drivers linktab
1082 *---------------------------------------------------------------------------*/
1083static void
1084tel_init_linktab(int unit)
1085{
1086 tel_sc_t *sc = &tel_sc[unit][FUNCTEL];
1087
1088 sc->drvr_linktab.unit = unit;
1089 sc->drvr_linktab.bch_rx_data_ready = tel_rx_data_rdy;
1090 sc->drvr_linktab.bch_tx_queue_empty = tel_tx_queue_empty;
1091 sc->drvr_linktab.bch_activity = tel_activity;
1092 sc->drvr_linktab.line_connected = tel_connect;
1093 sc->drvr_linktab.line_disconnected = tel_disconnect;
1094 sc->drvr_linktab.dial_response = tel_dialresponse;
1095 sc->drvr_linktab.updown_ind = tel_updown;
1096}
1097
1098/*===========================================================================*
1099 * AUDIO FORMAT CONVERSION (produced by running g711conv)
1100 *===========================================================================*/
1101
1102/*---------------------------------------------------------------------------*
1103 * A-law to u-law conversion
1104 *---------------------------------------------------------------------------*/
1105static unsigned char a2u_tab[256] = {
1106/* 00 */ 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d,
1107/* 08 */ 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25,
1108/* 10 */ 0x39, 0x3a, 0x37, 0x38, 0x3d, 0x3e, 0x3b, 0x3c,
1109/* 18 */ 0x31, 0x32, 0x30, 0x30, 0x35, 0x36, 0x33, 0x34,
1110/* 20 */ 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d,
1111/* 28 */ 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05,
1112/* 30 */ 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d,
1113/* 38 */ 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15,
1114/* 40 */ 0x62, 0x63, 0x60, 0x61, 0x66, 0x67, 0x64, 0x65,
1115/* 48 */ 0x5d, 0x5d, 0x5c, 0x5c, 0x5f, 0x5f, 0x5e, 0x5e,
1116/* 50 */ 0x74, 0x76, 0x70, 0x72, 0x7c, 0x7e, 0x78, 0x7a,
1117/* 58 */ 0x6a, 0x6b, 0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d,
1118/* 60 */ 0x48, 0x49, 0x46, 0x47, 0x4c, 0x4d, 0x4a, 0x4b,
1119/* 68 */ 0x40, 0x41, 0x3f, 0x3f, 0x44, 0x45, 0x42, 0x43,
1120/* 70 */ 0x56, 0x57, 0x54, 0x55, 0x5a, 0x5b, 0x58, 0x59,
1121/* 78 */ 0x4f, 0x4f, 0x4e, 0x4e, 0x52, 0x53, 0x50, 0x51,
1122/* 80 */ 0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad,
1123/* 88 */ 0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5,
1124/* 90 */ 0xb9, 0xba, 0xb7, 0xb8, 0xbd, 0xbe, 0xbb, 0xbc,
1125/* 98 */ 0xb1, 0xb2, 0xb0, 0xb0, 0xb5, 0xb6, 0xb3, 0xb4,
1126/* a0 */ 0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d,
1127/* a8 */ 0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85,
1128/* b0 */ 0x9a, 0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d,
1129/* b8 */ 0x92, 0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95,
1130/* c0 */ 0xe2, 0xe3, 0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5,
1131/* c8 */ 0xdd, 0xdd, 0xdc, 0xdc, 0xdf, 0xdf, 0xde, 0xde,
1132/* d0 */ 0xf4, 0xf6, 0xf0, 0xf2, 0xfc, 0xfe, 0xf8, 0xfa,
1133/* d8 */ 0xea, 0xeb, 0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed,
1134/* e0 */ 0xc8, 0xc9, 0xc6, 0xc7, 0xcc, 0xcd, 0xca, 0xcb,
1135/* e8 */ 0xc0, 0xc1, 0xbf, 0xbf, 0xc4, 0xc5, 0xc2, 0xc3,
1136/* f0 */ 0xd6, 0xd7, 0xd4, 0xd5, 0xda, 0xdb, 0xd8, 0xd9,
1137/* f8 */ 0xcf, 0xcf, 0xce, 0xce, 0xd2, 0xd3, 0xd0, 0xd1
1138};
1139
1140/*---------------------------------------------------------------------------*
1141 * u-law to A-law conversion
1142 *---------------------------------------------------------------------------*/
1143static unsigned char u2a_tab[256] = {
1144/* 00 */ 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d,
1145/* 08 */ 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25,
1146/* 10 */ 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d,
1147/* 18 */ 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35,
1148/* 20 */ 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d,
1149/* 28 */ 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05,
1150/* 30 */ 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, 0x12,
1151/* 38 */ 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, 0x6a,
1152/* 40 */ 0x68, 0x69, 0x6e, 0x6f, 0x6c, 0x6d, 0x62, 0x63,
1153/* 48 */ 0x60, 0x61, 0x66, 0x67, 0x64, 0x65, 0x7a, 0x78,
1154/* 50 */ 0x7e, 0x7f, 0x7c, 0x7d, 0x72, 0x73, 0x70, 0x71,
1155/* 58 */ 0x76, 0x77, 0x74, 0x75, 0x4b, 0x49, 0x4f, 0x4d,
1156/* 60 */ 0x42, 0x43, 0x40, 0x41, 0x46, 0x47, 0x44, 0x45,
1157/* 68 */ 0x5a, 0x5b, 0x58, 0x59, 0x5e, 0x5f, 0x5c, 0x5d,
1158/* 70 */ 0x52, 0x52, 0x53, 0x53, 0x50, 0x50, 0x51, 0x51,
1159/* 78 */ 0x56, 0x56, 0x57, 0x57, 0x54, 0x54, 0x55, 0x55,
1160/* 80 */ 0xaa, 0xab, 0xa8, 0xa9, 0xae, 0xaf, 0xac, 0xad,
1161/* 88 */ 0xa2, 0xa3, 0xa0, 0xa1, 0xa6, 0xa7, 0xa4, 0xa5,
1162/* 90 */ 0xba, 0xbb, 0xb8, 0xb9, 0xbe, 0xbf, 0xbc, 0xbd,
1163/* 98 */ 0xb2, 0xb3, 0xb0, 0xb1, 0xb6, 0xb7, 0xb4, 0xb5,
1164/* a0 */ 0x8a, 0x8b, 0x88, 0x89, 0x8e, 0x8f, 0x8c, 0x8d,
1165/* a8 */ 0x82, 0x83, 0x80, 0x81, 0x86, 0x87, 0x84, 0x85,
1166/* b0 */ 0x9b, 0x98, 0x99, 0x9e, 0x9f, 0x9c, 0x9d, 0x92,
1167/* b8 */ 0x93, 0x90, 0x91, 0x96, 0x97, 0x94, 0x95, 0xea,
1168/* c0 */ 0xe8, 0xe9, 0xee, 0xef, 0xec, 0xed, 0xe2, 0xe3,
1169/* c8 */ 0xe0, 0xe1, 0xe6, 0xe7, 0xe4, 0xe5, 0xfa, 0xf8,
1170/* d0 */ 0xfe, 0xff, 0xfc, 0xfd, 0xf2, 0xf3, 0xf0, 0xf1,
1171/* d8 */ 0xf6, 0xf7, 0xf4, 0xf5, 0xcb, 0xc9, 0xcf, 0xcd,
1172/* e0 */ 0xc2, 0xc3, 0xc0, 0xc1, 0xc6, 0xc7, 0xc4, 0xc5,
1173/* e8 */ 0xda, 0xdb, 0xd8, 0xd9, 0xde, 0xdf, 0xdc, 0xdd,
1174/* f0 */ 0xd2, 0xd2, 0xd3, 0xd3, 0xd0, 0xd0, 0xd1, 0xd1,
1175/* f8 */ 0xd6, 0xd6, 0xd7, 0xd7, 0xd4, 0xd4, 0xd5, 0xd5
1176};
1177
1178/*---------------------------------------------------------------------------*
1179 * reverse bits in a byte
1180 *---------------------------------------------------------------------------*/
1181static unsigned char bitreverse[256] = {
1182/* 00 */ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
1183/* 08 */ 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
1184/* 10 */ 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
1185/* 18 */ 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
1186/* 20 */ 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
1187/* 28 */ 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
1188/* 30 */ 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
1189/* 38 */ 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
1190/* 40 */ 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
1191/* 48 */ 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
1192/* 50 */ 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
1193/* 58 */ 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
1194/* 60 */ 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
1195/* 68 */ 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
1196/* 70 */ 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
1197/* 78 */ 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
1198/* 80 */ 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
1199/* 88 */ 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
1200/* 90 */ 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
1201/* 98 */ 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
1202/* a0 */ 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
1203/* a8 */ 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
1204/* b0 */ 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
1205/* b8 */ 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
1206/* c0 */ 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
1207/* c8 */ 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
1208/* d0 */ 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
1209/* d8 */ 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
1210/* e0 */ 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
1211/* e8 */ 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
1212/* f0 */ 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
1213/* f8 */ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
1214};
1215
1216static u_char sinetab[8000] = { 213, 213, 213, 213, 213, 213, 213, 212,
1217212, 212, 212, 212, 212, 215, 215, 215, 215, 215, 215, 214, 214,
1218214, 214, 214, 214, 209, 209, 209, 209, 209, 209, 209, 208, 208,
1219208, 208, 208, 208, 211, 211, 211, 211, 211, 211, 210, 210, 210,
1220210, 210, 210, 221, 221, 221, 221, 221, 221, 220, 220, 220, 220,
1221220, 220, 220, 223, 223, 223, 223, 223, 223, 222, 222, 222, 222,
1222222, 222, 217, 217, 217, 217, 217, 217, 216, 216, 216, 216, 216,
1223216, 216, 219, 219, 219, 219, 219, 219, 218, 218, 218, 218, 218,
1224218, 197, 197, 197, 197, 197, 197, 196, 196, 196, 196, 196, 196,
1225196, 199, 199, 199, 199, 199, 199, 198, 198, 198, 198, 198, 198,
1226193, 193, 193, 193, 193, 193, 192, 192, 192, 192, 192, 192, 192,
1227195, 195, 195, 195, 195, 195, 194, 194, 194, 194, 194, 194, 205,
1228205, 205, 205, 205, 205, 204, 204, 204, 204, 204, 204, 204, 207,
1229207, 207, 207, 207, 207, 206, 206, 206, 206, 206, 206, 201, 201,
1230201, 201, 201, 201, 200, 200, 200, 200, 200, 200, 200, 203, 203,
1231203, 203, 203, 203, 202, 202, 202, 202, 202, 202, 245, 245, 245,
1232245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 244, 244, 244,
1233244, 244, 244, 244, 244, 244, 244, 244, 244, 247, 247, 247, 247,
1234247, 247, 247, 247, 247, 247, 247, 247, 247, 246, 246, 246, 246,
1235246, 246, 246, 246, 246, 246, 246, 246, 246, 241, 241, 241, 241,
1236241, 241, 241, 241, 241, 241, 241, 241, 240, 240, 240, 240, 240,
1237240, 240, 240, 240, 240, 240, 240, 240, 243, 243, 243, 243, 243,
1238243, 243, 243, 243, 243, 243, 243, 243, 242, 242, 242, 242, 242,
1239242, 242, 242, 242, 242, 242, 242, 242, 253, 253, 253, 253, 253,
1240253, 253, 253, 253, 253, 253, 253, 253, 252, 252, 252, 252, 252,
1241252, 252, 252, 252, 252, 252, 252, 255, 255, 255, 255, 255, 255,
1242255, 255, 255, 255, 255, 255, 255, 254, 254, 254, 254, 254, 254,
1243254, 254, 254, 254, 254, 254, 254, 249, 249, 249, 249, 249, 249,
1244249, 249, 249, 249, 249, 249, 249, 248, 248, 248, 248, 248, 248,
1245248, 248, 248, 248, 248, 248, 248, 251, 251, 251, 251, 251, 251,
1246251, 251, 251, 251, 251, 251, 251, 250, 250, 250, 250, 250, 250,
1247250, 250, 250, 250, 250, 250, 250, 229, 229, 229, 229, 229, 229,
1248229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1249229, 229, 229, 229, 229, 229, 229, 228, 228, 228, 228, 228, 228,
1250228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1251228, 228, 228, 228, 228, 228, 228, 228, 231, 231, 231, 231, 231,
1252231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1253231, 231, 231, 231, 231, 231, 231, 231, 231, 230, 230, 230, 230,
1254230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1255230, 230, 230, 230, 230, 230, 230, 230, 230, 225, 225, 225, 225,
1256225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1257225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 224, 224,
1258224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1259224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 227,
1260227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1261227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1262227, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1263226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1264226, 226, 226, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1265237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1266237, 237, 237, 237, 237, 236, 236, 236, 236, 236, 236, 236, 236,
1267236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1268236, 236, 236, 236, 236, 236, 236, 236, 239, 239, 239, 239, 239,
1269239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1270239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 238, 238,
1271238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1272238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1273238, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1274233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1275233, 233, 233, 233, 233, 232, 232, 232, 232, 232, 232, 232, 232,
1276232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1277232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 235, 235, 235,
1278235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1279235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1280235, 235, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1281234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1282234, 234, 234, 234, 234, 234, 234, 149, 149, 149, 149, 149, 149,
1283149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1284149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1285149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1286149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1287149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148,
1288148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1289148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1290148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1291148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1292148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 151, 151, 151,
1293151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1294151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1295151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1296151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1297151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1298151, 151, 151, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1299150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1300150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1301150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1302150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1303150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1304150, 150, 150, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1305145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1306145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1307145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1308145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1309145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1310145, 145, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144,
1311144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1312144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1313144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1314144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1315144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1316144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1317144, 144, 144, 144, 144, 144, 144, 144, 144, 147, 147, 147, 147,
1318147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1319147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1320147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1321147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1322147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1323147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1324147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1325147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 146, 146, 146,
1326146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1327146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1328146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1329146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1330146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1331146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1332146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1333146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1334146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1335146, 146, 146, 146, 146, 146, 157, 157, 157, 157, 157, 157, 157,
1336157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1337157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1338157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1339157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1340157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1341157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1342157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1343157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1344157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1345157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1346157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1347157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1348157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1349156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1350156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1351156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1352156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1353156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1354156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1355156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1356156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1357156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1358156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1359156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1360156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1361156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1362156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1363156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1364156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1365156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1366156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1367156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1368156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1369156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1370156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1371156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1372156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1373156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1374156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1375156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1376156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1377156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1378156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1379156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1380156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1381156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1382156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1383156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1384156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1385156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1386156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1387156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1388156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1389156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1390156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
1391156, 156, 156, 156, 156, 156, 156, 157, 157, 157, 157, 157, 157,
1392157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1393157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1394157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1395157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1396157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1397157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1398157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1399157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1400157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1401157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1402157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1403157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1404157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
1405157, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1406146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1407146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1408146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1409146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1410146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1411146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1412146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1413146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
1414146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 147, 147, 147,
1415147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1416147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1417147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1418147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1419147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1420147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1421147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147,
1422147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 144, 144,
1423144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1424144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1425144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1426144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1427144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1428144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1429144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145,
1430145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1431145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1432145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1433145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1434145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1435145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
1436145, 145, 145, 145, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1437150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1438150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1439150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1440150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1441150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1442150, 150, 150, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1443151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1444151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1445151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1446151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
1447151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 148, 148, 148,
1448148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1449148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1450148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1451148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1452148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
1453149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1454149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1455149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1456149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1457149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
1458234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1459234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
1460234, 234, 234, 234, 234, 235, 235, 235, 235, 235, 235, 235, 235,
1461235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
1462235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 232, 232, 232,
1463232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1464232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1465232, 232, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1466233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
1467233, 233, 233, 233, 233, 233, 238, 238, 238, 238, 238, 238, 238,
1468238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1469238, 238, 238, 238, 238, 238, 238, 238, 238, 239, 239, 239, 239,
1470239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
1471239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 236,
1472236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1473236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1474236, 236, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1475237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1476237, 237, 237, 237, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1477226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
1478226, 226, 226, 226, 226, 226, 227, 227, 227, 227, 227, 227, 227,
1479227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
1480227, 227, 227, 227, 227, 227, 227, 227, 224, 224, 224, 224, 224,
1481224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
1482224, 224, 224, 224, 224, 224, 224, 224, 224, 225, 225, 225, 225,
1483225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225,
1484225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 230, 230,
1485230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
1486230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 231, 231,
1487231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
1488231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 228,
1489228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1490228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228,
1491229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1492229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
1493250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
1494251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
1495248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
1496249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
1497254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
1498255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
1499252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252, 253,
1500253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 242,
1501242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 243,
1502243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 240,
1503240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241,
1504241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 246, 246,
1505246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 246, 247, 247,
1506247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, 244, 244,
1507244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 245, 245, 245,
1508245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 202, 202, 202,
1509202, 202, 202, 203, 203, 203, 203, 203, 203, 200, 200, 200, 200,
1510200, 200, 200, 201, 201, 201, 201, 201, 201, 206, 206, 206, 206,
1511206, 206, 207, 207, 207, 207, 207, 207, 204, 204, 204, 204, 204,
1512204, 204, 205, 205, 205, 205, 205, 205, 194, 194, 194, 194, 194,
1513194, 195, 195, 195, 195, 195, 195, 192, 192, 192, 192, 192, 192,
1514192, 193, 193, 193, 193, 193, 193, 198, 198, 198, 198, 198, 198,
1515199, 199, 199, 199, 199, 199, 196, 196, 196, 196, 196, 196, 196,
1516197, 197, 197, 197, 197, 197, 218, 218, 218, 218, 218, 218, 219,
1517219, 219, 219, 219, 219, 216, 216, 216, 216, 216, 216, 216, 217,
1518217, 217, 217, 217, 217, 222, 222, 222, 222, 222, 222, 223, 223,
1519223, 223, 223, 223, 220, 220, 220, 220, 220, 220, 220, 221, 221,
1520221, 221, 221, 221, 210, 210, 210, 210, 210, 210, 211, 211, 211,
1521211, 211, 211, 208, 208, 208, 208, 208, 208, 209, 209, 209, 209,
1522209, 209, 209, 214, 214, 214, 214, 214, 214, 215, 215, 215, 215,
1523215, 215, 212, 212, 212, 212, 212, 212, 213, 213, 213, 213, 213,
1524213, 213, 90, 90, 90, 85, 85, 85, 85, 85, 85, 84, 84, 84, 84, 84,
152584, 87, 87, 87, 87, 87, 87, 86, 86, 86, 86, 86, 86, 81, 81, 81,
152681, 81, 81, 81, 80, 80, 80, 80, 80, 80, 83, 83, 83, 83, 83, 83,
152782, 82, 82, 82, 82, 82, 93, 93, 93, 93, 93, 93, 93, 92, 92, 92,
152892, 92, 92, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 89,
152989, 89, 89, 89, 89, 88, 88, 88, 88, 88, 88, 88, 91, 91, 91, 91,
153091, 91, 90, 90, 90, 90, 90, 90, 69, 69, 69, 69, 69, 69, 68, 68,
153168, 68, 68, 68, 68, 71, 71, 71, 71, 71, 71, 70, 70, 70, 70, 70,
153270, 65, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 64, 64, 67, 67,
153367, 67, 67, 67, 66, 66, 66, 66, 66, 66, 77, 77, 77, 77, 77, 77,
153476, 76, 76, 76, 76, 76, 76, 79, 79, 79, 79, 79, 79, 78, 78, 78,
153578, 78, 78, 73, 73, 73, 73, 73, 73, 73, 72, 72, 72, 72, 72, 72,
153675, 75, 75, 75, 75, 75, 74, 74, 74, 74, 74, 74, 117, 117, 117, 117,
1537117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116,
1538116, 116, 116, 116, 116, 116, 116, 116, 116, 119, 119, 119, 119,
1539119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118,
1540118, 118, 118, 118, 118, 118, 118, 118, 113, 113, 113, 113, 113,
1541113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112,
1542112, 112, 112, 112, 112, 112, 112, 115, 115, 115, 115, 115, 115,
1543115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114,
1544114, 114, 114, 114, 114, 114, 114, 125, 125, 125, 125, 125, 125,
1545125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 124,
1546124, 124, 124, 124, 124, 124, 124, 127, 127, 127, 127, 127, 127,
1547127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126,
1548126, 126, 126, 126, 126, 126, 121, 121, 121, 121, 121, 121, 121,
1549121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120,
1550120, 120, 120, 120, 120, 120, 123, 123, 123, 123, 123, 123, 123,
1551123, 123, 123, 123, 123, 123, 122, 122, 122, 122, 122, 122, 122,
1552122, 122, 122, 122, 122, 122, 101, 101, 101, 101, 101, 101, 101,
1553101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1554101, 101, 101, 101, 101, 101, 101, 100, 100, 100, 100, 100, 100,
1555100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1556100, 100, 100, 100, 100, 100, 100, 103, 103, 103, 103, 103, 103,
1557103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1558103, 103, 103, 103, 103, 103, 103, 103, 102, 102, 102, 102, 102,
1559102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1560102, 102, 102, 102, 102, 102, 102, 102, 102, 97, 97, 97, 97, 97,
156197, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
156297, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
156396, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
156496, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
156599, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 98, 98, 98,
156698, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
156798, 98, 98, 98, 98, 98, 98, 98, 98, 109, 109, 109, 109, 109, 109,
1568109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1569109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 108, 108, 108,
1570108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1571108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 111,
1572111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1573111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1574111, 111, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1575110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1576110, 110, 110, 110, 110, 110, 105, 105, 105, 105, 105, 105, 105,
1577105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1578105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 104,
1579104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1580104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1581104, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1582107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1583107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 106,
1584106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1585106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 21,
158621, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
158721, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
158821, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
158921, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
159020, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
159120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
159220, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
159320, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
159420, 20, 20, 20, 20, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
159523, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
159623, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
159723, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
159823, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 22, 22, 22,
159922, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
160022, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
160122, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
160222, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
160322, 22, 22, 22, 22, 22, 22, 22, 22, 22, 17, 17, 17, 17, 17, 17,
160417, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
160517, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
160617, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
160717, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
160817, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 16, 16,
160916, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
161016, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
161116, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
161216, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
161316, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
161416, 16, 16, 16, 16, 16, 16, 16, 16, 16, 19, 19, 19, 19, 19, 19,
161519, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
161619, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
161719, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
161819, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
161919, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
162019, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
162119, 19, 19, 19, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
162218, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
162318, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
162418, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
162518, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
162618, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
162718, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
162818, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
162918, 18, 18, 18, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163029, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163129, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163229, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163329, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163429, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163529, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163629, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163729, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163829, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
163929, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
164029, 29, 29, 29, 29, 29, 29, 29, 29, 29, 28, 28, 28, 28, 28, 28,
164128, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
164228, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
164328, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
164428, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
164528, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
164628, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
164728, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
164828, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
164928, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165028, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165128, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165228, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165328, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165428, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165528, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165628, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165728, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165828, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
165928, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166028, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166128, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166228, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166328, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166428, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166528, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166628, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166728, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166828, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
166928, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
167028, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
167128, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
167228, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
167328, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
167429, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
167529, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
167629, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
167729, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
167829, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
167929, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
168029, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
168129, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
168229, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
168329, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
168429, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 18, 18, 18, 18, 18,
168518, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
168618, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
168718, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
168818, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
168918, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
169018, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
169118, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
169218, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19,
169319, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
169419, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
169519, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
169619, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
169719, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
169819, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
169919, 19, 19, 19, 19, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
170016, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
170116, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
170216, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
170316, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
170416, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
170516, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
170617, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
170717, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
170817, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
170917, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
171017, 17, 17, 17, 17, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
171122, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
171222, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
171322, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
171422, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
171522, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
171623, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
171723, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
171823, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
171923, 23, 23, 23, 23, 23, 23, 23, 23, 23, 20, 20, 20, 20, 20, 20,
172020, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
172120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
172220, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
172320, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,
172421, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
172521, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
172621, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
172721, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
1728106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1729106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1730106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 107, 107, 107,
1731107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
1732107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 104, 104,
1733104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1734104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1735104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1736105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1737105, 105, 105, 105, 105, 105, 110, 110, 110, 110, 110, 110, 110,
1738110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1739110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 111,
1740111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1741111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
1742108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1743108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1744108, 108, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1745109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
1746109, 109, 109, 109, 109, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
174798, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
174898, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
174999, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 96, 96,
175096, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
175196, 96, 96, 96, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 97, 97,
175297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
175397, 97, 97, 97, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1754102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
1755102, 102, 102, 102, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1756103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
1757103, 103, 103, 103, 103, 100, 100, 100, 100, 100, 100, 100, 100,
1758100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
1759100, 100, 100, 100, 100, 101, 101, 101, 101, 101, 101, 101, 101,
1760101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1761101, 101, 101, 101, 101, 101, 122, 122, 122, 122, 122, 122, 122,
1762122, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 123, 123,
1763123, 123, 123, 123, 123, 123, 120, 120, 120, 120, 120, 120, 120,
1764120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 121, 121, 121,
1765121, 121, 121, 121, 121, 121, 126, 126, 126, 126, 126, 126, 126,
1766126, 126, 126, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127,
1767127, 127, 127, 127, 127, 124, 124, 124, 124, 124, 124, 124, 124,
1768124, 124, 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125,
1769125, 125, 125, 125, 125, 114, 114, 114, 114, 114, 114, 114, 114,
1770114, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115,
1771115, 115, 115, 115, 115, 112, 112, 112, 112, 112, 112, 112, 112,
1772112, 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1773113, 113, 113, 113, 118, 118, 118, 118, 118, 118, 118, 118, 118,
1774118, 118, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119,
1775119, 119, 119, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
1776116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
1777117, 117, 117, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 72,
177872, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 78, 78, 78, 78,
177978, 78, 79, 79, 79, 79, 79, 79, 76, 76, 76, 76, 76, 76, 76, 77,
178077, 77, 77, 77, 77, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67,
178167, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 70, 70,
178270, 70, 70, 70, 71, 71, 71, 71, 71, 71, 68, 68, 68, 68, 68, 68,
178368, 69, 69, 69, 69, 69, 69, 90, 90, 90, 90, 90, 90, 91, 91, 91,
178491, 91, 91, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89,
178594, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 95, 92, 92, 92, 92,
178692, 92, 93, 93, 93, 93, 93, 93, 93, 82, 82, 82, 82, 82, 82, 83,
178783, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81,
178881, 81, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 84, 84,
178984, 84, 84, 84, 85, 85, 85, 85, 85, 85, 90, 90, 90 };
1790
1791/*===========================================================================*/
1792
1793#endif /* NI4BTEL > 0 */