1 // generated by scripts/build-jcm800-preamp.py
2 // DO NOT MODIFY!
3 #include <iostream>
4 #include <cmath>
5 
6 #include <float.h>
7 #include <Eigen/Core>
8 
9 #include "gx_compiler.h"
10 #include "gx_resampler.h"
11 #include "gx_pluginlv2.h"
12 
13 namespace jcm800pre {
14 
15 using namespace Eigen;
16 
17 #define N_(x) (x)
18 
19 #define creal double
20 
sign(creal v)21 static inline int sign(creal v) {
22     return v < 0 ? -1 : 1;
23 }
24 
Heaviside(creal v)25 static inline int Heaviside(creal v) {
26     return v < 0 ? 0 : 1;  // Heaviside(0) == 1/2 in sympy but shouldn't matter
27 }
28 
29 static Matrix<creal, 7, 1> g_x;
30 creal g_v_data[8];
31 static Map<Matrix<creal, 8, 1> >g_v(g_v_data);
32 static int g_info;
33 static int g_nfev;
34 
35 
36 static creal x0_data[] = {-101.11169547,-4.28127308,-514.34759921,-230.31382521,-1133.65846006,-4.20085902,-20.3466745};
37 
38 #define real realtype  // real conflicts with Eigen::real of new eigen library version
39 typedef double real;
40 #ifndef _INTPP_H
41 #define _INTPP_H 1
42 
43 #ifndef NO_INTPP_INCLUDES
44 typedef double real;
45 typedef double treal;
46 //typedef float real;
47 //typedef float treal;
48 #endif
49 
50 template<typename M>
51 struct splinecoeffs {
52     real *x0;
53     real *xe;
54     real *stepi; // 1/h
55     int *k;
56     int *n;
57     int *nmap;
58     M **map;
59     treal **t;
60     treal **c;
61     int (*eval)(splinecoeffs *p, real *x, real *res);
62 };
63 
64 template<typename M>
65 struct splinedata {
66     splinecoeffs<M> *sc;
67     int m;
68     int n_input;
69     int n_output;
70     int n_state;
71     const char *func_id;
72     template<int K0> static int splev(splinecoeffs<M> *p, real *x, real *res);
73     template<int K0> static int splev_pp(splinecoeffs<M> *p, real *x, real *res);
74     template<int K0, int K1> static int splev(splinecoeffs<M> *p, real *x, real *res);
75     template<int K0, int K1> static int splevgr(splinecoeffs<M> *p, real xi[2], real res[1], real grad[2]);
76     template<int K0, int K1, int K2> static int splev(splinecoeffs<M> *p, real *x, real *res);
77     template<int K0, int K1, int K2, int K3> static int splev(splinecoeffs<M> *p, real *x, real *res);
78     union retval {
79 	char c[4];
80 	int i;
81     };
82 };
83 
84 template<typename M>
85 class SplineCalc {
86   protected:
87     splinedata<M> *sd;
88     real *s0;
89     real *temp;
90   public:
91     SplineCalc(splinedata<M> *sd_, real *s0_);
92     ~SplineCalc();
93     void reset();
94     void calc(real *in, real *out);
95 };
96 
97 //#define CHECK_BOUNDS
98 
99 #ifdef CHECK_BOUNDS
100 template<typename M>
101 void report(splinedata<M> *sd, real *t, int i);
102 template<typename M>
check(splinedata<M> * sd,creal * t,int i)103 static inline void check(splinedata<M> *sd, creal *t, int i) { if (i) report(sd, t, i); }
104 #else
105 #define check(sd, t, i) i
106 #endif
107 
108 #endif /* !_INTPP_H */
109 
110 } // end namespace jcm800pre
111 #define NO_INTPP_INCLUDES
112 #include <cstdio>
113 #include <cstdlib>
114 
115 #ifndef NO_INTPP_INCLUDES
116 #include "intpp.h"
117 #include "intpp_inst.cc"
118 #endif
119 
120 namespace jcm800pre {
121 
122 #define always_inline inline __attribute__((always_inline))
123 
124 /****************************************************************
125  ** fpbspl evaluates the k non-zero b-splines of order k
126  ** at t[0] <= x < t[1] using the stable recurrence relation
127  ** of de boor and cox.
128  **
129  ** t: knot array
130  ** K: order (> 0)
131  ** h[K]: output array
132  */
fpbspl(treal * t,real x,real * h)133 template<int K> static always_inline void fpbspl(treal *t, real x, real *h)
134 {
135     real hh[K-1];
136     h[0] = 1;
137     for (int j = 0; j < K-1; j++) {
138 	for (int i = 0; i <= j; i++) {
139 	    hh[i] = h[i];
140 	}
141 	h[0] = 0;
142 	for (int i = 0; i <= j; i++) {
143 	    int li = i+1;
144 	    int lj = i-j;
145 	    real f = hh[i]/(t[li]-t[lj]);
146 	    h[i] = h[i]+f*(t[li]-x);
147 	    h[i+1] = f*(x-t[lj]);
148 	}
149     }
150 }
151 
fpbspl(treal * t,real x,real * h)152 template<> always_inline void fpbspl<2>(treal *t, real x, real *h)
153 {
154     h[0] = (t[1]-x)/(t[1]-t[0]);
155     h[1] = 1-h[0];
156 }
157 
158 
159 /****************************************************************
160  ** search for knot interval
161  ** n: len(map)
162  ** k: order
163  ** returns index l: t[l] <= x < t[l+1]
164  */
find_index(int n,int k,real xi,real x0,real xe,real stepi,char * cl)165 static always_inline int find_index(int n, int k, real xi, real x0, real xe, real stepi, char* cl)
166 {
167     int l;
168     if (k % 2) {
169 	l = static_cast<int>((xi - x0) * stepi + 0.5);
170     } else {
171 	l = static_cast<int>((xi - x0) * stepi);
172     }
173     if (l < 0) {
174 	*cl = -1;
175 	return 0;
176     }
177     if (l > n-2) {
178 	*cl = 1;
179 	return n-2;
180     }
181     return l;
182 }
183 
184 template<int K, typename M>
forward(int i,splinecoeffs<M> * p,real * xi,int ll,typename splinedata<M>::retval * cl,real * h)185 static always_inline int forward(int i, splinecoeffs<M> *p, real *xi, int ll,
186 			  typename splinedata<M>::retval *cl, real *h)
187 {
188     int l = p->map[i][find_index(p->nmap[i], K, xi[i], p->x0[i], p->xe[i], p->stepi[i], &cl->c[i])];
189     fpbspl<K>(p->t[i]+l, xi[i], h);
190     return ll*p->n[i] + l-K+1;
191 }
192 
193 /****************************************************************
194  ** evaluate the spline function at x
195  **
196  ** t[n+k]: knot array
197  ** c[m][n]: coefficents
198  ** k: order (k > 0), order = degree + 1
199  ** x: function argument
200  ** res: output array (size m)
201  */
202 template<>
203 template<int K0>
splev(splinecoeffs<unsigned short> * p,real xi[1],real * res)204 always_inline int splinedata<unsigned short>::splev(splinecoeffs<unsigned short> *p, real xi[1], real *res)
205 {
206     real h[K0];
207     retval cl;
208     cl.i = 0;
209     int ll = 0;
210     ll = forward<K0>(0, p, xi, ll, &cl, h);
211     treal *c = p->c[0]+ll;
212     real sp = 0;
213     for (int j = 0; j < K0; j++) {
214 	sp += c[j]*h[j];
215     }
216     *res = sp;
217     return cl.i;
218 }
219 
220 template<>
221 template<int K0>
splev(splinecoeffs<unsigned char> * p,real xi[1],real * res)222 always_inline int splinedata<unsigned char>::splev(splinecoeffs<unsigned char> *p, real xi[1], real *res)
223 {
224     real h[K0];
225     retval cl;
226     cl.i = 0;
227     int ll = 0;
228     ll = forward<K0>(0, p, xi, ll, &cl, h);
229     treal *c = p->c[0]+ll;
230     real sp = 0;
231     for (int j = 0; j < K0; j++) {
232 	sp += c[j]*h[j];
233     }
234     *res = sp;
235     return cl.i;
236 }
237 
238 template<>
239 template<>
splev_pp(splinecoeffs<unsigned short> * p,real xi[1],real * res)240 always_inline int splinedata<unsigned short>::splev_pp<4>(splinecoeffs<unsigned short> *p, real xi[1], real *res)
241 {
242     retval cl;
243     cl.i = 0;
244     int l = p->map[0][find_index(p->nmap[0], 4, xi[0], p->x0[0], p->xe[0], p->stepi[0], &cl.c[0])];
245     treal x = xi[0] - p->t[0][l];
246     treal *c = p->c[0] + (l-3)*4;
247     *res = ((c[0] * x + c[1]) * x + c[2]) * x + c[3];
248     return cl.i;
249 }
250 
251 template<>
252 template<>
splev_pp(splinecoeffs<unsigned char> * p,real xi[1],real * res)253 always_inline int splinedata<unsigned char>::splev_pp<4>(splinecoeffs<unsigned char> *p, real xi[1], real *res)
254 {
255     retval cl;
256     cl.i = 0;
257     int l = p->map[0][find_index(p->nmap[0], 4, xi[0], p->x0[0], p->xe[0], p->stepi[0], &cl.c[0])];
258     treal x = xi[0] - p->t[0][l];
259     treal *c = p->c[0] + (l-3)*4;
260     *res = ((c[0] * x + c[1]) * x + c[2]) * x + c[3];
261     return cl.i;
262 }
263 
264 template<>
265 template<>
splev_pp(splinecoeffs<unsigned short> * p,real xi[1],real * res)266 always_inline int splinedata<unsigned short>::splev_pp<2>(splinecoeffs<unsigned short> *p, real xi[1], real *res)
267 {
268     retval cl;
269     cl.i = 0;
270     int l = p->map[0][find_index(p->nmap[0], 2, xi[0], p->x0[0], p->xe[0], p->stepi[0], &cl.c[0])];
271     treal x = xi[0] - p->t[0][l];
272     treal *c = p->c[0] + (l-1)*2;
273     *res = c[0] * x + c[1];
274     return cl.i;
275 }
276 
277 template<>
278 template<>
splev_pp(splinecoeffs<unsigned char> * p,real xi[1],real * res)279 always_inline int splinedata<unsigned char>::splev_pp<2>(splinecoeffs<unsigned char> *p, real xi[1], real *res)
280 {
281     retval cl;
282     cl.i = 0;
283     int l = p->map[0][find_index(p->nmap[0], 2, xi[0], p->x0[0], p->xe[0], p->stepi[0], &cl.c[0])];
284     treal x = xi[0] - p->t[0][l];
285     treal *c = p->c[0] + (l-1)*2;
286     *res = c[0] * x + c[1];
287     return cl.i;
288 }
289 
290 /****************************************************************
291  ** evaluate the X-dim spline function
292  **
293  ** t: array of pointers to knot arrays
294  ** c[m][n[0]]...[n[X-1]]: coefficents
295  ** k: orders (2 <= k[i] <= 5), order = degree + 1
296  ** x: function arguments
297  ** res[m]: output array
298  */
299 template<typename M>
300 template<int K0, int K1>
splev(splinecoeffs<M> * p,real xi[2],real * res)301 int splinedata<M>::splev(splinecoeffs<M> *p, real xi[2], real *res)
302 {
303     real h[2][6];
304     retval cl;
305     cl.i = 0;
306     int ll = 0;
307     ll = forward<K0>(0, p, xi, ll, &cl, h[0]);
308     ll = forward<K1>(1, p, xi, ll, &cl, h[1]);
309     treal *c = p->c[0]+ll;
310     int j[2];
311     real sp = 0;
312     for (j[0] = 0; j[0] < K0; j[0]++) {
313 	for (j[1] = 0; j[1] < K1; j[1]++) {
314 	    sp += c[j[1]]*h[0][j[0]]*h[1][j[1]];
315 	}
316 	c += p->n[1];
317     }
318     *res = sp;
319     return cl.i;
320 }
321 
322 template<int K, int S>
deriv(real * t,real * wrk)323 static inline void deriv(real *t, real *wrk) {
324     for (int i = 0; i < K-1; i++, wrk += S) {
325 	real fac = t[i+1] - t[i+1-(K-1)];
326 	if (fac > 0) {
327 	    wrk[0] = (K-1) * (wrk[S] - wrk[0]) / fac;
328 	}
329     }
330 }
331 
332 template<int K0, int K1, int S0, int S1>
deriv2d(real * t,real * c)333 static inline void deriv2d(real *t, real *c) {
334     for (int i = 0; i < K0; i++) {
335 	deriv<K1, S1>(t, c);
336 	c += S0;
337     }
338 }
339 
340 template<int K0, int K1>
copy2d(real * c,real * wrk,int n)341 static inline void copy2d(real *c, real *wrk, int n)  {
342     int j[2];
343     for (j[0] = 0; j[0] < K0; j[0]++) {
344 	for (j[1] = 0; j[1] < K1; j[1]++) {
345 	    *wrk++ = *c++;
346 	}
347 	c += n - K1;
348     }
349 }
350 
351 template<int K0, int K1, int S>
eval2d(real * c,real * h0,real * h1)352 static inline real eval2d(real *c, real *h0, real *h1) {
353     int j[2];
354     real sp = 0;
355     for (j[0] = 0; j[0] < K0; j[0]++) {
356 	for (j[1] = 0; j[1] < K1; j[1]++) {
357 	    sp += *c++ * h0[j[0]] * h1[j[1]];
358 	}
359 	c += S;
360     }
361     return sp;
362 }
363 
364 template<typename M>
365 template<int K0, int K1>
splevgr(splinecoeffs<M> * p,real xi[2],real res[1],real grad[2])366 int splinedata<M>::splevgr(splinecoeffs<M> *p, real xi[2], real res[1], real grad[2])
367 {
368     real h0[K0];
369     real h1[K1];
370     retval cl;
371     cl.i = 0;
372     int ll = 0;
373 //  ll = forward<K0>(0, p, xi, ll, &cl, h0);
374     int l[2];
375     l[0] = p->map[0][find_index(p->nmap[0], K0, xi[0], p->x0[0], p->xe[0], p->stepi[0], &cl.c[0])];
376     fpbspl<K0>(p->t[0]+l[0], xi[0], h0);
377     ll = l[0]-(K0-1);
378 //  ll = forward<K1>(1, p, xi, ll, &cl, h1);
379     l[1] = p->map[1][find_index(p->nmap[1], K1, xi[1], p->x0[1], p->xe[1], p->stepi[1], &cl.c[1])];
380     fpbspl<K1>(p->t[1]+l[1], xi[1], h1);
381     ll = ll*p->n[1] + l[1]-(K1-1);
382 //
383     treal wrk[K0*K1];
384     copy2d<K0, K1>(p->c[0]+ll, wrk, p->n[1]);
385     res[0] = eval2d<K0, K1, 0>(wrk, h0, h1);
386 
387     deriv2d<K1, K0, 1, K1>(p->t[0]+l[0], wrk);
388     real hx[6];
389     fpbspl<K0-1>(p->t[0]+l[0], xi[0], hx);
390     grad[0] = eval2d<K0-1, K1, 0>(wrk, hx, h1);
391 
392     copy2d<K0, K1>(p->c[0]+ll, wrk, p->n[1]);
393     deriv2d<K0, K1, K1, 1>(p->t[1]+l[1], wrk);
394     fpbspl<K1-1>(p->t[1]+l[1], xi[1], hx);
395     grad[1] = eval2d<K0, K1-1, 1>(wrk, h0, hx);
396     return cl.i;
397 }
398 
399 template<typename M>
400 template<int K0, int K1, int K2>
splev(splinecoeffs<M> * p,real xi[3],real * res)401 int splinedata<M>::splev(splinecoeffs<M> *p, real xi[3], real *res)
402 {
403     real h[3][6];
404     retval cl;
405     cl.i = 0;
406     int ll = 0;
407     ll = forward<K0>(0, p, xi, ll, &cl, h[0]);
408     ll = forward<K1>(1, p, xi, ll, &cl, h[1]);
409     ll = forward<K2>(2, p, xi, ll, &cl, h[2]);
410     treal *cc = p->c[0];
411     int lc = ll;
412     int j[3];
413     real sp = 0;
414     for (j[0] = 0; j[0] < K0; j[0]++) {
415 	for (j[1] = 0; j[1] < K1; j[1]++) {
416 	    for (j[2] = 0; j[2] < K2; j[2]++) {
417 		sp += cc[lc]*h[0][j[0]]*h[1][j[1]]*h[2][j[2]];
418 		lc += 1;
419 	    }
420 	    lc += p->n[2]-K2;
421 	}
422 	lc += (p->n[1]-K1)*p->n[2];
423     }
424     *res = sp;
425     return cl.i;
426 }
427 
428 template<typename M>
429 template<int K0, int K1, int K2, int K3>
splev(splinecoeffs<M> * p,real xi[4],real * res)430 int splinedata<M>::splev(splinecoeffs<M> *p, real xi[4], real *res)
431 {
432     real h[4][6];
433     retval cl;
434     cl.i = 0;
435     int ll = 0;
436     ll = forward<K0>(0, p, xi, ll, &cl, h[0]);
437     ll = forward<K1>(1, p, xi, ll, &cl, h[1]);
438     ll = forward<K2>(2, p, xi, ll, &cl, h[2]);
439     ll = forward<K3>(3, p, xi, ll, &cl, h[3]);
440     treal *cc = p->c[0];
441     int lc = ll;
442     int j[4];
443     real sp = 0;
444     for (j[0] = 0; j[0] < K0; j[0]++) {
445 	for (j[1] = 0; j[1] < K1; j[1]++) {
446 	    for (j[2] = 0; j[2] < K2; j[2]++) {
447 		for (j[3] = 0; j[3] < K3; j[3]++) {
448 		    sp += cc[lc]*h[0][j[0]]*h[1][j[1]]*h[2][j[2]]*h[3][j[3]];
449 		    lc += 1;
450 		}
451 		lc += p->n[3]-K3;
452 	    }
453 	    lc += (p->n[2]-K2)*p->n[3];
454 	}
455 	lc += (p->n[1]-K1)*p->n[2]*p->n[3];
456     }
457     *res = sp;
458     return cl.i;
459 }
460 
461 template<typename M>
SplineCalc(splinedata<M> * sd_,real * s0_)462 SplineCalc<M>::SplineCalc(splinedata<M> *sd_, real *s0_)
463     : sd(sd_),
464       s0(s0_),
465       temp(new real[sd->n_input+sd->n_state]) {
466 }
467 
468 template<typename M>
~SplineCalc()469 SplineCalc<M>::~SplineCalc() {
470     delete[] temp;
471 }
472 
473 #ifdef CHECK_BOUNDS
report(splinedata * sd,real * t,int i)474 void report(splinedata *sd, real *t, int i)
475 {
476     printf("%s:", sd->func_id);
477     splinedata::retval cl;
478     cl.i = i;
479     for (int n = 0; n < 4; n++) {
480 	if (cl.c[n] < 0) {
481 	    printf(" %d:L[%g]", n, t[n]);
482 	} else if (cl.c[n] > 0) {
483 	    printf(" %d:U[%g]", n, t[n]);
484 	}
485     }
486     printf("\n");
487 }
488 #endif
489 
490 template<typename M>
calc(real * in,real * out)491 void SplineCalc<M>::calc(real *in, real *out)
492 {
493     for (int i = 0; i < sd->n_input; i++) {
494 	temp[i] = in[i];
495     }
496     real t[sd->m];
497     for (int i = 0; i < sd->m; i++) {
498 	splinecoeffs<M> *p = &sd->sc[i];
499 	check(sd, temp, (*p->eval)(p, temp, &t[i]));
500     }
501     for (int i = 0; i < sd->n_output; i++) {
502 	out[i] = t[i];
503     }
504     for (int i = 0; i < sd->n_state; i++) {
505 	temp[i+sd->n_input] = t[i+sd->n_output];
506     }
507 }
508 
509 template<typename M>
reset()510 void SplineCalc<M>::reset()
511 {
512     for (int i = 0; i < sd->n_state; i++) {
513 	temp[i+sd->n_input] = s0[i];
514     }
515 }
516 
517 template int splinedata<unsigned char>::splev_pp<4>(splinecoeffs<unsigned char> *p, real xi[2], real *res);
518 
519 #ifndef NO_INTPP_INCLUDES
520 #include "intpp.h"
521 #endif
522 namespace AmpData {
523 namespace nonlin_0 {
524 typedef unsigned char maptype;
525 real x0_0[1] = {-119.508269216};
526 real xe_0[1] = {148.877449521};
527 real hi_0[1] = {1.31899715702};
528 int k_0[1] = {4};
529 int nmap_0[1] = {355};
530 int n_0[1] = {39};
531 treal t0_0[43] = {
532   -215.79354119211405,-215.79354119211405,-215.79354119211405,-215.79354119211405,-118.75011746798432,-70.22840560591945,-58.09797764040323,-56.5816741447137,-55.82352239686894,-55.065370649024175,
533   -54.30721890117941,-53.54906715333465,-52.03276365764512,-49.000156666266065,-45.96754967488702,-39.902335692128915,-33.837121709370805,-21.706693743854586,-9.57626577833837,-3.5110517955802605,
534   -1.9947482998907333,-0.47844480420120616,2.554162187177848,8.619376169935958,14.684590152694065,20.749804135452173,26.815018118210283,29.847625109589334,32.880232100968385,35.91283909234744,
535   38.945446083726495,45.010660066484604,51.075874049242714,63.20630201475893,75.33672998027515,87.46715794579137,99.59758591130759,123.85844184234001,148.11929777337244,172.38015370440488,
536   172.38015370440488,172.38015370440488,172.38015370440488};
537 maptype a0_0[354] = {
538   3,4,4,4,4,4,4,4,4,4,
539   4,4,4,4,4,4,4,4,4,4,
540   4,4,4,4,4,4,4,4,4,4,
541   4,4,4,4,4,4,4,4,4,4,
542   4,4,4,4,4,4,4,4,4,4,
543   4,4,4,4,4,4,4,4,4,4,
544   4,4,4,4,4,5,5,5,5,5,
545   5,5,5,5,5,5,5,5,5,5,
546   5,6,6,7,8,9,10,11,11,12,
547   12,12,12,13,13,13,13,14,14,14,
548   14,14,14,14,14,15,15,15,15,15,
549   15,15,15,16,16,16,16,16,16,16,
550   16,16,16,16,16,16,16,16,16,17,
551   17,17,17,17,17,17,17,17,17,17,
552   17,17,17,17,17,18,18,18,18,18,
553   18,18,18,19,19,20,20,21,21,21,
554   21,22,22,22,22,22,22,22,22,23,
555   23,23,23,23,23,23,23,24,24,24,
556   24,24,24,24,24,25,25,25,25,25,
557   25,25,25,26,26,26,26,27,27,27,
558   27,28,28,28,28,29,29,29,29,30,
559   30,30,30,30,30,30,30,31,31,31,
560   31,31,31,31,31,32,32,32,32,32,
561   32,32,32,32,32,32,32,32,32,32,
562   32,33,33,33,33,33,33,33,33,33,
563   33,33,33,33,33,33,33,34,34,34,
564   34,34,34,34,34,34,34,34,34,34,
565   34,34,34,35,35,35,35,35,35,35,
566   35,35,35,35,35,35,35,35,35,36,
567   36,36,36,36,36,36,36,36,36,36,
568   36,36,36,36,36,36,36,36,36,36,
569   36,36,36,36,36,36,36,36,36,36,
570   36,37,37,37,37,37,37,37,37,37,
571   37,37,37,37,37,37,37,37,37,37,
572   37,37,37,37,37,37,37,37,37,37,
573   37,37,37,38};
574 treal c0_0[144] = {
575   -1.6873137730947968e-08,2.283373705907306e-06,-7.08366044887381e-05,0.00016094985081404104,1.0773629819818119e-07,-2.6289074572326475e-06,-0.00010436838272959129,-0.0006301219261502878,-4.3813060254044074e-06,1.3053741397540291e-05,
576   0.00040146240593189064,0.0004238755997537633,0.006950938857027557,-0.00014638761001061073,-0.001215934482642564,-0.0006058448954747285,0.03812445957054991,0.03147281105169455,0.04628443088943314,0.02144656244395482,
577   -0.014607563382236495,0.11818518802884288,0.15974790447129264,0.09124148997352426,-0.015591328547518634,0.08496093889885559,0.3137634956694214,0.27392108803937953,-0.009927806034353953,0.049499159930285946,
578   0.41570465461211475,0.5538420679993398,-0.003613308257829718,0.026918809438658223,0.4736410716559274,0.8931347516741054,-0.0007786511779558718,0.010482193611605111,0.5303523433233364,1.660612560301017,
579   -0.0001771877081884625,0.0033981645932615705,0.5724460146582606,3.3436478532585276,-5.90972253293622e-05,0.0017861425453452849,0.5881679807322562,5.105961793530823,-2.0878100771578455e-05,0.0007108305931157232,
580   0.6033126571262213,8.725847190649315,1.6272671169467374e-06,0.0003309401469160916,0.6096312195854904,12.406558431601251,-3.0490891639089684e-05,0.00039015848654441857,0.6183784546147153,19.85324757556291,
581   0.0002813674649289688,-0.0007194442073525958,0.6143840778983787,27.357428628715304,0.0022374857272430527,0.004400217440388554,0.6367087551787501,31.120112155359543,-0.002443033099687247,0.01457833972971075,
582   0.6654860077589153,32.103473174672544,-7.445119777083006e-05,0.003465200842287768,0.6928454914028523,33.1375530858228,-7.304069647906582e-05,0.0027878571736586763,0.7118085588595104,35.26847315413927,
583   -9.203191801796418e-06,0.0014588348128730133,0.7375656544766893,39.672003944499636,9.846820433221443e-06,0.001291376830066232,0.7542462765889886,44.19710994426894,5.541887360394889e-05,0.0014705460489980809,
584   0.770997929854389,48.821477677302184,7.87978917166114e-05,0.0024789280302722062,0.7949523352645198,53.56420687160392,3.6233408602374344e-05,0.0031958171422493816,0.8121616071490032,55.9999805241572,
585   -2.454176271533914e-05,0.0035254622069965445,0.8325446058945382,58.493349029632526,-6.88566870740012e-05,0.0033021856434226346,0.8532501785003934,61.04986778901328,-6.210649668334695e-05,0.002675739831551187,
586   0.871378877089742,63.66588906101117,-3.604600421055791e-05,0.001545672255239319,0.8969826447055279,69.03556317416984,-1.3518555506066317e-05,0.0008897920689580184,0.9117542569791581,74.52477263891492,
587   -4.171710256724323e-06,0.000397834477665508,0.9273737180494612,85.69154238626115,-2.214325453001808e-06,0.0002460205853789093,0.9351839555119544,96.99207639859175,-1.225126751269013e-06,0.0001654384391793668,
588   0.9401751295701202,108.36850678476425,-6.209590726258885e-07,0.00012085450376467978,0.9436479854915386,119.79539048410334,-2.850430075249797e-07,7.565950796454724e-05,0.9484155836185306,142.7513648625841,
589   -1.8920535850098484e-07,5.4913345945412075e-05,0.9515833928157438,165.80120074168525};
590 maptype *map_0[1] = {a0_0};
591 treal *t_0[1] = {t0_0};
592 treal *c_0[1] = {c0_0};
593 real x0_1[2] = {-119.508269216};
594 real xe_1[2] = {124.61659359};
595 real hi_1[2] = {1.31899715702};
596 int k_1[2] = {4};
597 int nmap_1[2] = {323};
598 int n_1[2] = {48};
599 treal t0_1[52] = {
600   -215.79354119211405,-215.79354119211405,-215.79354119211405,-215.79354119211405,-118.75011746798432,-70.22840560591945,-58.09797764040323,-56.5816741447137,-55.82352239686894,-55.065370649024175,
601   -54.30721890117941,-53.54906715333465,-52.03276365764512,-49.000156666266065,-45.96754967488702,-39.902335692128915,-33.837121709370805,-21.706693743854586,-9.57626577833837,-3.5110517955802605,
602   -2.752900047735497,-1.9947482998907333,-0.47844480420120616,2.554162187177848,5.586769178556903,8.619376169935958,11.651983161315012,14.684590152694065,17.71719714407312,20.749804135452173,
603   23.782411126831228,26.815018118210283,29.847625109589334,31.363928605278858,32.880232100968385,34.39653559665791,35.91283909234744,38.945446083726495,41.97805307510555,45.010660066484604,
604   48.04326705786366,51.075874049242714,57.14108803200082,63.20630201475893,75.33672998027515,87.46715794579137,99.59758591130759,123.85844184234001,172.38015370440488,172.38015370440488,
605   172.38015370440488,172.38015370440488};
606 maptype a0_1[322] = {
607   3,4,4,4,4,4,4,4,4,4,
608   4,4,4,4,4,4,4,4,4,4,
609   4,4,4,4,4,4,4,4,4,4,
610   4,4,4,4,4,4,4,4,4,4,
611   4,4,4,4,4,4,4,4,4,4,
612   4,4,4,4,4,4,4,4,4,4,
613   4,4,4,4,4,5,5,5,5,5,
614   5,5,5,5,5,5,5,5,5,5,
615   5,6,6,7,8,9,10,11,11,12,
616   12,12,12,13,13,13,13,14,14,14,
617   14,14,14,14,14,15,15,15,15,15,
618   15,15,15,16,16,16,16,16,16,16,
619   16,16,16,16,16,16,16,16,16,17,
620   17,17,17,17,17,17,17,17,17,17,
621   17,17,17,17,17,18,18,18,18,18,
622   18,18,18,19,20,21,21,22,22,22,
623   22,23,23,23,23,24,24,24,24,25,
624   25,25,25,26,26,26,26,27,27,27,
625   27,28,28,28,28,29,29,29,29,30,
626   30,30,30,31,31,31,31,32,32,33,
627   33,34,34,35,35,36,36,36,36,37,
628   37,37,37,38,38,38,38,39,39,39,
629   39,40,40,40,40,41,41,41,41,41,
630   41,41,41,42,42,42,42,42,42,42,
631   42,43,43,43,43,43,43,43,43,43,
632   43,43,43,43,43,43,43,44,44,44,
633   44,44,44,44,44,44,44,44,44,44,
634   44,44,44,45,45,45,45,45,45,45,
635   45,45,45,45,45,45,45,45,45,46,
636   46,46,46,46,46,46,46,46,46,46,
637   46,46,46,46,46,46,46,46,46,46,
638   46,46,46,46,46,46,46,46,46,46,
639   46,47};
640 treal c0_1[180] = {
641   1.0848462380964293e-07,-1.468078678975303e-05,0.0004554388467900852,-0.0010348154739325075,-6.926827699175401e-07,1.6902371157982944e-05,0.0006710289999751239,0.004051323541752485,2.816929130984947e-05,-8.392809016328463e-05,
642   -0.0025811736249478504,-0.0027252776403900265,-0.0446905647929792,0.0009411885870580284,0.00781776308031648,0.003895235708224949,-0.2451185155078063,-0.202352190272743,-0.2975824428460169,-0.1378891432531651,
643   0.09391838287499231,-0.7598632831568145,-1.0270877858299128,-0.5866306558994957,0.10024296672209858,-0.5462501247625271,-2.0173199489274425,-1.7611561080801312,0.0638315030566027,-0.31825198347401656,
644   -2.672743733302461,-3.5608880938752137,0.023229400313225696,-0.17307008664425141,-3.0452404195173335,-5.742346215974677,0.00500927083550711,-0.06740162395110483,-3.4098685149075125,-10.676790074493017,
645   0.0011289600690984286,-0.02182817467869464,-3.6804674260715875,-21.497745510124755,0.0003955061366950978,-0.01155709808308764,-3.781711837658065,-32.828417357041296,8.065543929835555e-05,-0.004360610031438406,
646   -3.8782561434877505,-56.102212462956054,7.077390934567486e-05,-0.0028930325367847536,-3.9222510378184667,-79.76708299563707,-8.396783874579635e-05,-0.00031747910931770134,-3.9611959180739635,-127.64503998619958,
647   0.0010273344018808912,-0.0033731765672955936,-4.005965150904645,-175.8926371084096,0.12607956503023027,0.015319832370473666,-3.933506127080011,-200.0845426084335,-0.10427536142116145,0.30208216015600353,
648   -3.6928672516766516,-203.00298830956112,-0.0022972441895976986,0.06491251760020961,-3.414629595286053,-205.6745482707608,-0.0029323318617046723,0.05446255941479127,-3.2336207487100004,-210.7109265064872,
649   -0.0006268694165330165,0.02778472910024383,-2.984197046537335,-220.09813400834423,-0.00047699613857886777,0.022081583374464628,-2.8329721186922416,-228.90998625697446,-0.0001790534620116404,0.017741957900319367,
650   -2.712202969000859,-237.31150291731925,-2.904731792126768e-05,0.016112961558137993,-2.6095343035585663,-245.3783748469969,0.0001587550867705028,0.015848694259911453,-2.512607162668699,-253.1446907929159,
651   0.0004013802026051694,0.0172930196180831,-2.4121013694560083,-260.6142573945086,0.000731603729069995,0.020944704843947833,-2.296141378918027,-267.7589795778188,0.001100295647572758,0.027600704595037797,
652   -2.1489222308540006,-274.5092472790924,0.0011320046972310152,0.03761099741527707,-1.9511607674177924,-280.74156108060157,0.000699100446660465,0.04790977349256718,-1.6918098796545378,-286.2811960086408,
653   0.0002823183542081732,0.05108991884589529,-1.5416963000895396,-288.7339029896136,-0.000268385091836766,0.05237415976804479,-1.3848133560089262,-290.95313351651595,-0.000667354611794246,0.05115330000921566,
654   -1.2278343068488093,-292.9334490799787,-0.0010856376846818574,0.048117563617031234,-1.0773095493122127,-294.679934641371,-0.0011223717443227808,0.03824062631901892,-0.8154190987493068,-297.53474649344264,
655   -0.0008682804034554786,0.02802948912274021,-0.614447883341131,-299.6872073270599,-0.0006109637917904033,0.02013002945675068,-0.46839899059551743,-301.3170236603891,-0.0004477728214474514,0.014571590257361577,
656   -0.36316261603832334,-302.56940354366094,-0.0002492843938587625,0.010497833290748378,-0.2871369069164824,-303.5492107932738,-0.000128473559440053,0.005961943716801739,-0.18730483725720898,-304.96019598427785,
657   -5.509644364222013e-05,0.0036242848294101957,-0.1291623098368094,-305.9055839607225,-1.903179046664134e-05,0.0016192545071359696,-0.06555593363048545,-307.03741931311396,-1.0521608343926757e-05,0.0009266632172047965,
658   -0.03467286206923881,-307.6283429185529,-4.137357935808846e-06,0.0005437683809126627,-0.016835897490056075,-307.9313642448178,-1.3662724279523318e-06,0.00024264084646534635,0.00224306347819632,-308.07884150099943,
659 };
660 maptype *map_1[2] = {a0_1};
661 treal *t_1[2] = {t0_1};
662 treal *c_1[1] = {c0_1};
663 splinecoeffs<maptype> sc[2] = {
664 	{x0_0, xe_0, hi_0, k_0, n_0, nmap_0, map_0, t_0, c_0, splinedata<unsigned char>::splev_pp<4>},
665 	{x0_1, xe_1, hi_1, k_1, n_1, nmap_1, map_1, t_1, c_1, splinedata<unsigned char>::splev_pp<4>},
666 };
667 splinedata<maptype> sd = {
668 	sc,
669 	2, /* number of calculated values */
670 	2, /* number of input values */
671 	2, /* number of output values */
672 	0, /* number of state values */
673 	"nonlin_0",
674 };
675 }; /* ! namespace nonlin_0 */
676 } // namespace AmpData
677 
678 // nonlin_0: 2420 bytes
679 // data size sum: 2436 bytes
680 #ifndef NO_INTPP_INCLUDES
681 #include "intpp.h"
682 #endif
683 namespace AmpData {
684 namespace nonlin_1 {
685 typedef unsigned char maptype;
686 real x0_0[1] = {-84.3557465684};
687 real xe_0[1] = {477.417648954};
688 real hi_0[1] = {5.01625748471};
689 int k_0[1] = {4};
690 int nmap_0[1] = {2819};
691 int n_0[1] = {97};
692 treal t0_0[101] = {
693   -288.2926463625786,-288.2926463625786,-288.2926463625786,-288.2926463625786,-84.15639476023611,-58.639363309943306,-45.880847584796896,-39.5015897222237,-38.704182489402044,-38.305478872991216,
694   -37.906775256580396,-37.508071640169575,-37.30871983196416,-37.10936802375875,-36.910016215553334,-36.71066440734792,-36.51131259914251,-36.31196079093709,-36.11260898273168,-35.913257174526265,
695   -35.71390536632086,-35.514553558115445,-35.31520174991003,-35.115849941704624,-34.7171463252938,-34.31844270888297,-33.91973909247214,-33.521035476061314,-33.122331859650494,-32.72362824323967,
696   -32.324924626828846,-31.527517394007194,-30.730110161185543,-29.932702928363895,-29.135295695542244,-28.337888462720592,-27.540481229898944,-26.743073997077293,-25.148259531433993,-23.55344506579069,
697   -21.95863060014739,-20.36381613450409,-18.76900166886079,-17.17418720321749,-13.984558271930888,-10.794929340644288,-9.997522107822636,-9.598818491411812,-9.200114875000986,-8.80141125859016,
698   -8.402707642179337,-7.605300409357685,-6.8078931765360355,-6.010485943714385,-5.213078710892734,-4.415671478071085,-2.820857012427784,-1.226042546784483,0.36877191885881744,1.963586384502118,
699   3.5584008501454187,5.153215315788719,6.748029781432019,8.34284424707532,11.532473178361922,13.127287644005222,14.722102109648523,16.316916575291824,17.911731040935123,21.101359972221726,
700   24.290988903508328,27.480617834794927,30.67024676608153,33.85987569736813,37.04950462865473,40.23913355994134,43.428762491227936,49.80802035380114,56.18727821637434,62.56653607894754,
701   68.94579394152075,75.32505180409395,81.70430966666714,94.46282539181355,107.22134111695996,119.97985684210636,132.73837256725278,145.49688829239918,171.013919742692,196.5309511929848,
702   222.0479826432776,247.56501409357043,273.0820455438632,324.11610844444886,375.15017134503444,426.1842342456201,477.2182971462057,528.2523600467913,528.2523600467913,528.2523600467913,
703   528.2523600467913};
704 maptype a0_0[2818] = {
705   3,4,4,4,4,4,4,4,4,4,
706   4,4,4,4,4,4,4,4,4,4,
707   4,4,4,4,4,4,4,4,4,4,
708   4,4,4,4,4,4,4,4,4,4,
709   4,4,4,4,4,4,4,4,4,4,
710   4,4,4,4,4,4,4,4,4,4,
711   4,4,4,4,4,4,4,4,4,4,
712   4,4,4,4,4,4,4,4,4,4,
713   4,4,4,4,4,4,4,4,4,4,
714   4,4,4,4,4,4,4,4,4,4,
715   4,4,4,4,4,4,4,4,4,4,
716   4,4,4,4,4,4,4,4,4,4,
717   4,4,4,4,4,4,4,4,4,5,
718   5,5,5,5,5,5,5,5,5,5,
719   5,5,5,5,5,5,5,5,5,5,
720   5,5,5,5,5,5,5,5,5,5,
721   5,5,5,5,5,5,5,5,5,5,
722   5,5,5,5,5,5,5,5,5,5,
723   5,5,5,5,5,5,5,5,5,5,
724   5,5,5,6,6,6,6,6,6,6,
725   6,6,6,6,6,6,6,6,6,6,
726   6,6,6,6,6,6,6,6,6,6,
727   6,6,6,6,6,7,7,7,7,8,
728   8,9,9,10,10,11,12,13,14,15,
729   16,17,18,19,20,21,22,23,23,24,
730   24,25,25,26,26,27,27,28,28,29,
731   29,30,30,30,30,31,31,31,31,32,
732   32,32,32,33,33,33,33,34,34,34,
733   34,35,35,35,35,36,36,36,36,37,
734   37,37,37,37,37,37,37,38,38,38,
735   38,38,38,38,38,39,39,39,39,39,
736   39,39,39,40,40,40,40,40,40,40,
737   40,41,41,41,41,41,41,41,41,42,
738   42,42,42,42,42,42,42,43,43,43,
739   43,43,43,43,43,43,43,43,43,43,
740   43,43,43,44,44,44,44,44,44,44,
741   44,44,44,44,44,44,44,44,44,45,
742   45,45,45,46,46,47,47,48,48,49,
743   49,50,50,50,50,51,51,51,51,52,
744   52,52,52,53,53,53,53,54,54,54,
745   54,55,55,55,55,55,55,55,55,56,
746   56,56,56,56,56,56,56,57,57,57,
747   57,57,57,57,57,58,58,58,58,58,
748   58,58,58,59,59,59,59,59,59,59,
749   59,60,60,60,60,60,60,60,60,61,
750   61,61,61,61,61,61,61,62,62,62,
751   62,62,62,62,62,63,63,63,63,63,
752   63,63,63,63,63,63,63,63,63,63,
753   63,64,64,64,64,64,64,64,64,65,
754   65,65,65,65,65,65,65,66,66,66,
755   66,66,66,66,66,67,67,67,67,67,
756   67,67,67,68,68,68,68,68,68,68,
757   68,68,68,68,68,68,68,68,68,69,
758   69,69,69,69,69,69,69,69,69,69,
759   69,69,69,69,69,70,70,70,70,70,
760   70,70,70,70,70,70,70,70,70,70,
761   70,71,71,71,71,71,71,71,71,71,
762   71,71,71,71,71,71,71,72,72,72,
763   72,72,72,72,72,72,72,72,72,72,
764   72,72,72,73,73,73,73,73,73,73,
765   73,73,73,73,73,73,73,73,73,74,
766   74,74,74,74,74,74,74,74,74,74,
767   74,74,74,74,74,75,75,75,75,75,
768   75,75,75,75,75,75,75,75,75,75,
769   75,76,76,76,76,76,76,76,76,76,
770   76,76,76,76,76,76,76,76,76,76,
771   76,76,76,76,76,76,76,76,76,76,
772   76,76,76,77,77,77,77,77,77,77,
773   77,77,77,77,77,77,77,77,77,77,
774   77,77,77,77,77,77,77,77,77,77,
775   77,77,77,77,77,78,78,78,78,78,
776   78,78,78,78,78,78,78,78,78,78,
777   78,78,78,78,78,78,78,78,78,78,
778   78,78,78,78,78,78,78,79,79,79,
779   79,79,79,79,79,79,79,79,79,79,
780   79,79,79,79,79,79,79,79,79,79,
781   79,79,79,79,79,79,79,79,79,80,
782   80,80,80,80,80,80,80,80,80,80,
783   80,80,80,80,80,80,80,80,80,80,
784   80,80,80,80,80,80,80,80,80,80,
785   80,81,81,81,81,81,81,81,81,81,
786   81,81,81,81,81,81,81,81,81,81,
787   81,81,81,81,81,81,81,81,81,81,
788   81,81,81,82,82,82,82,82,82,82,
789   82,82,82,82,82,82,82,82,82,82,
790   82,82,82,82,82,82,82,82,82,82,
791   82,82,82,82,82,82,82,82,82,82,
792   82,82,82,82,82,82,82,82,82,82,
793   82,82,82,82,82,82,82,82,82,82,
794   82,82,82,82,82,82,82,83,83,83,
795   83,83,83,83,83,83,83,83,83,83,
796   83,83,83,83,83,83,83,83,83,83,
797   83,83,83,83,83,83,83,83,83,83,
798   83,83,83,83,83,83,83,83,83,83,
799   83,83,83,83,83,83,83,83,83,83,
800   83,83,83,83,83,83,83,83,83,83,
801   83,84,84,84,84,84,84,84,84,84,
802   84,84,84,84,84,84,84,84,84,84,
803   84,84,84,84,84,84,84,84,84,84,
804   84,84,84,84,84,84,84,84,84,84,
805   84,84,84,84,84,84,84,84,84,84,
806   84,84,84,84,84,84,84,84,84,84,
807   84,84,84,84,84,85,85,85,85,85,
808   85,85,85,85,85,85,85,85,85,85,
809   85,85,85,85,85,85,85,85,85,85,
810   85,85,85,85,85,85,85,85,85,85,
811   85,85,85,85,85,85,85,85,85,85,
812   85,85,85,85,85,85,85,85,85,85,
813   85,85,85,85,85,85,85,85,85,86,
814   86,86,86,86,86,86,86,86,86,86,
815   86,86,86,86,86,86,86,86,86,86,
816   86,86,86,86,86,86,86,86,86,86,
817   86,86,86,86,86,86,86,86,86,86,
818   86,86,86,86,86,86,86,86,86,86,
819   86,86,86,86,86,86,86,86,86,86,
820   86,86,86,87,87,87,87,87,87,87,
821   87,87,87,87,87,87,87,87,87,87,
822   87,87,87,87,87,87,87,87,87,87,
823   87,87,87,87,87,87,87,87,87,87,
824   87,87,87,87,87,87,87,87,87,87,
825   87,87,87,87,87,87,87,87,87,87,
826   87,87,87,87,87,87,87,87,87,87,
827   87,87,87,87,87,87,87,87,87,87,
828   87,87,87,87,87,87,87,87,87,87,
829   87,87,87,87,87,87,87,87,87,87,
830   87,87,87,87,87,87,87,87,87,87,
831   87,87,87,87,87,87,87,87,87,87,
832   87,87,87,87,87,87,87,87,87,87,
833   87,88,88,88,88,88,88,88,88,88,
834   88,88,88,88,88,88,88,88,88,88,
835   88,88,88,88,88,88,88,88,88,88,
836   88,88,88,88,88,88,88,88,88,88,
837   88,88,88,88,88,88,88,88,88,88,
838   88,88,88,88,88,88,88,88,88,88,
839   88,88,88,88,88,88,88,88,88,88,
840   88,88,88,88,88,88,88,88,88,88,
841   88,88,88,88,88,88,88,88,88,88,
842   88,88,88,88,88,88,88,88,88,88,
843   88,88,88,88,88,88,88,88,88,88,
844   88,88,88,88,88,88,88,88,88,88,
845   88,88,88,88,88,88,88,88,88,89,
846   89,89,89,89,89,89,89,89,89,89,
847   89,89,89,89,89,89,89,89,89,89,
848   89,89,89,89,89,89,89,89,89,89,
849   89,89,89,89,89,89,89,89,89,89,
850   89,89,89,89,89,89,89,89,89,89,
851   89,89,89,89,89,89,89,89,89,89,
852   89,89,89,89,89,89,89,89,89,89,
853   89,89,89,89,89,89,89,89,89,89,
854   89,89,89,89,89,89,89,89,89,89,
855   89,89,89,89,89,89,89,89,89,89,
856   89,89,89,89,89,89,89,89,89,89,
857   89,89,89,89,89,89,89,89,89,89,
858   89,89,89,89,89,89,89,90,90,90,
859   90,90,90,90,90,90,90,90,90,90,
860   90,90,90,90,90,90,90,90,90,90,
861   90,90,90,90,90,90,90,90,90,90,
862   90,90,90,90,90,90,90,90,90,90,
863   90,90,90,90,90,90,90,90,90,90,
864   90,90,90,90,90,90,90,90,90,90,
865   90,90,90,90,90,90,90,90,90,90,
866   90,90,90,90,90,90,90,90,90,90,
867   90,90,90,90,90,90,90,90,90,90,
868   90,90,90,90,90,90,90,90,90,90,
869   90,90,90,90,90,90,90,90,90,90,
870   90,90,90,90,90,90,90,90,90,90,
871   90,90,90,90,90,91,91,91,91,91,
872   91,91,91,91,91,91,91,91,91,91,
873   91,91,91,91,91,91,91,91,91,91,
874   91,91,91,91,91,91,91,91,91,91,
875   91,91,91,91,91,91,91,91,91,91,
876   91,91,91,91,91,91,91,91,91,91,
877   91,91,91,91,91,91,91,91,91,91,
878   91,91,91,91,91,91,91,91,91,91,
879   91,91,91,91,91,91,91,91,91,91,
880   91,91,91,91,91,91,91,91,91,91,
881   91,91,91,91,91,91,91,91,91,91,
882   91,91,91,91,91,91,91,91,91,91,
883   91,91,91,91,91,91,91,91,91,91,
884   91,91,91,92,92,92,92,92,92,92,
885   92,92,92,92,92,92,92,92,92,92,
886   92,92,92,92,92,92,92,92,92,92,
887   92,92,92,92,92,92,92,92,92,92,
888   92,92,92,92,92,92,92,92,92,92,
889   92,92,92,92,92,92,92,92,92,92,
890   92,92,92,92,92,92,92,92,92,92,
891   92,92,92,92,92,92,92,92,92,92,
892   92,92,92,92,92,92,92,92,92,92,
893   92,92,92,92,92,92,92,92,92,92,
894   92,92,92,92,92,92,92,92,92,92,
895   92,92,92,92,92,92,92,92,92,92,
896   92,92,92,92,92,92,92,92,92,92,
897   92,92,92,92,92,92,92,92,92,92,
898   92,92,92,92,92,92,92,92,92,92,
899   92,92,92,92,92,92,92,92,92,92,
900   92,92,92,92,92,92,92,92,92,92,
901   92,92,92,92,92,92,92,92,92,92,
902   92,92,92,92,92,92,92,92,92,92,
903   92,92,92,92,92,92,92,92,92,92,
904   92,92,92,92,92,92,92,92,92,92,
905   92,92,92,92,92,92,92,92,92,92,
906   92,92,92,92,92,92,92,92,92,92,
907   92,92,92,92,92,92,92,92,92,92,
908   92,92,92,92,92,92,92,92,92,92,
909   92,92,92,92,92,92,92,92,92,93,
910   93,93,93,93,93,93,93,93,93,93,
911   93,93,93,93,93,93,93,93,93,93,
912   93,93,93,93,93,93,93,93,93,93,
913   93,93,93,93,93,93,93,93,93,93,
914   93,93,93,93,93,93,93,93,93,93,
915   93,93,93,93,93,93,93,93,93,93,
916   93,93,93,93,93,93,93,93,93,93,
917   93,93,93,93,93,93,93,93,93,93,
918   93,93,93,93,93,93,93,93,93,93,
919   93,93,93,93,93,93,93,93,93,93,
920   93,93,93,93,93,93,93,93,93,93,
921   93,93,93,93,93,93,93,93,93,93,
922   93,93,93,93,93,93,93,93,93,93,
923   93,93,93,93,93,93,93,93,93,93,
924   93,93,93,93,93,93,93,93,93,93,
925   93,93,93,93,93,93,93,93,93,93,
926   93,93,93,93,93,93,93,93,93,93,
927   93,93,93,93,93,93,93,93,93,93,
928   93,93,93,93,93,93,93,93,93,93,
929   93,93,93,93,93,93,93,93,93,93,
930   93,93,93,93,93,93,93,93,93,93,
931   93,93,93,93,93,93,93,93,93,93,
932   93,93,93,93,93,93,93,93,93,93,
933   93,93,93,93,93,93,93,93,93,93,
934   93,93,93,93,93,93,93,93,93,93,
935   93,93,93,93,93,94,94,94,94,94,
936   94,94,94,94,94,94,94,94,94,94,
937   94,94,94,94,94,94,94,94,94,94,
938   94,94,94,94,94,94,94,94,94,94,
939   94,94,94,94,94,94,94,94,94,94,
940   94,94,94,94,94,94,94,94,94,94,
941   94,94,94,94,94,94,94,94,94,94,
942   94,94,94,94,94,94,94,94,94,94,
943   94,94,94,94,94,94,94,94,94,94,
944   94,94,94,94,94,94,94,94,94,94,
945   94,94,94,94,94,94,94,94,94,94,
946   94,94,94,94,94,94,94,94,94,94,
947   94,94,94,94,94,94,94,94,94,94,
948   94,94,94,94,94,94,94,94,94,94,
949   94,94,94,94,94,94,94,94,94,94,
950   94,94,94,94,94,94,94,94,94,94,
951   94,94,94,94,94,94,94,94,94,94,
952   94,94,94,94,94,94,94,94,94,94,
953   94,94,94,94,94,94,94,94,94,94,
954   94,94,94,94,94,94,94,94,94,94,
955   94,94,94,94,94,94,94,94,94,94,
956   94,94,94,94,94,94,94,94,94,94,
957   94,94,94,94,94,94,94,94,94,94,
958   94,94,94,94,94,94,94,94,94,94,
959   94,94,94,94,94,94,94,94,94,94,
960   94,94,94,94,94,94,94,94,94,94,
961   94,95,95,95,95,95,95,95,95,95,
962   95,95,95,95,95,95,95,95,95,95,
963   95,95,95,95,95,95,95,95,95,95,
964   95,95,95,95,95,95,95,95,95,95,
965   95,95,95,95,95,95,95,95,95,95,
966   95,95,95,95,95,95,95,95,95,95,
967   95,95,95,95,95,95,95,95,95,95,
968   95,95,95,95,95,95,95,95,95,95,
969   95,95,95,95,95,95,95,95,95,95,
970   95,95,95,95,95,95,95,95,95,95,
971   95,95,95,95,95,95,95,95,95,95,
972   95,95,95,95,95,95,95,95,95,95,
973   95,95,95,95,95,95,95,95,95,95,
974   95,95,95,95,95,95,95,95,95,95,
975   95,95,95,95,95,95,95,95,95,95,
976   95,95,95,95,95,95,95,95,95,95,
977   95,95,95,95,95,95,95,95,95,95,
978   95,95,95,95,95,95,95,95,95,95,
979   95,95,95,95,95,95,95,95,95,95,
980   95,95,95,95,95,95,95,95,95,95,
981   95,95,95,95,95,95,95,95,95,95,
982   95,95,95,95,95,95,95,95,95,95,
983   95,95,95,95,95,95,95,95,95,95,
984   95,95,95,95,95,95,95,95,95,95,
985   95,95,95,95,95,95,95,95,95,95,
986   95,95,95,95,95,95,95,96};
987 treal c0_0[376] = {
988   -1.4098306912781866e-10,3.785479628582994e-08,-2.324316285693539e-06,9.634462871282249e-06,1.960181358648102e-08,-4.848446952761055e-08,-4.494217937028353e-06,-8.667118842496641e-05,-3.8377800906645655e-07,1.4520558117794282e-06,
989   3.1320756145940964e-05,9.275726642802674e-05,8.058124288697283e-06,-1.3237257479139876e-05,-0.000119040924651099,-6.831191554306465e-05,0.003638822081560925,0.00014097730069965273,0.0006958457504287977,0.0007255229802391752,
990   0.004670889111060192,0.008845846441063149,0.007862004002203824,0.0032150580837461157,0.019412623179141764,0.014432747582364111,0.01714326362430375,0.00805188350667582,0.02478657002351342,0.03765239677899713,
991   0.03790979904245813,0.018411627490388327,0.03409415836165908,0.06729988209938163,0.0797546521818247,0.041082765292381376,0.025629482570435055,0.08769007845529703,0.11065218107208565,0.05992668359129099,
992   0.020535568540425205,0.10301792953665312,0.14867016730453342,0.08567334873170579,0.008508184988790085,0.11529933769983304,0.19219210929059144,0.11956775812526615,-0.002017129445343131,0.12038770388601742,
993   0.2391767472013153,0.16253113598277213,-0.010668228781033587,0.11918134867907682,0.28693527102022465,0.21497981738085598,-0.015769209180709426,0.11280115658553257,0.33318140291674647,0.2768327668595422,
994   -0.017917922338409296,0.10337029549310106,0.376275572771012,0.34761099786708965,-0.017927268404173198,0.09265438484076285,0.41535344724845596,0.42658831324184804,-0.016771949403814695,0.08193288472309611,
995   0.450157735125656,0.5129299369683228,-0.014908007435508353,0.0719023294007556,0.4808250632269129,0.605792926721149,-0.013485932663309642,0.06298651468373057,0.5077153982018933,0.7043856450680901,
996   -0.01056455946308883,0.054921179498429167,0.531220510238437,0.8079959419870516,-0.007597694694493399,0.04228479530726693,0.5699768839302077,1.0278564232767526,-0.0055921681762785445,0.0331971102540273,
997   0.6000717926510764,1.2613485126383768,-0.004140082247370856,0.026508257227647908,0.6238765385851577,1.505522040732009,-0.003131611937591421,0.02155625993485283,0.643040035398887,1.7582153492909371,
998   -0.002381741262315317,0.01781050492071384,0.6587357069131958,2.0178259377903167,-0.0019408210578741607,0.014961678356793871,0.6718020949036164,2.2831465315515485,-0.0013465173267465796,0.012640241233051724,
999   0.6828070800639686,2.5532518243701197,-0.0008707301246721087,0.00941907326664953,0.7003973369971179,3.1050817954162833,-0.0006129355368492403,0.007336093768901817,0.7137580283784015,3.669131400390254,
1000   -0.0004409042020333111,0.005869816077890806,0.7242885164062246,4.242641149168397,-0.00032996881823149003,0.004815075478842343,0.7328087262154785,4.823702866857068,-0.00025047713097302743,0.004025716912052134,
1001   0.7398584380118525,5.410944244369379,-0.0002046610334437265,0.003426520084369212,0.7458009056934999,6.0033454981714325,-0.00014426760687552426,0.0029369255193348676,0.7508751632435607,6.600127544913067,
1002   -9.629140369029607e-05,0.002246685320228387,0.7591420607947615,7.8045187976839046,-7.098927230493294e-05,0.001785984549661238,0.7655734210384255,9.020533244497143,-5.255961182529003e-05,0.001446340394529043,
1003   0.7707283796170799,10.24573538917235,-4.7213527913433756e-05,0.0011948719067863356,0.7749406232020526,11.47836963045112,-1.974761181272241e-05,0.0009689814549151415,0.778391567844825,12.71710371077832,
1004   -5.4972617037243696e-05,0.0008745001239726269,0.7813315789339821,13.960878280377749,6.31178681843194e-05,0.0003484733747810334,0.7852324105878037,16.460149134814554,-0.0027661275165766067,0.000952441110106551,
1005   0.7893818450659309,18.97034262648757,0.03337280476381055,-0.0056647491557689856,0.785624216547036,19.599004505008278,-0.01078621129881676,0.034252824691541936,0.7970223856493744,19.913450386887725,
1006   -0.010582718433596582,0.02135132033491328,0.8191919593588541,20.23598745270275,-0.0009923009464007993,0.00869321600211588,0.8311708246498142,20.5653256229164,-0.001182329596975872,0.007506314074422235,
1007   0.8376296358754858,20.89803545814931,-0.00044052603991519946,0.0046779195577992295,0.8473454319002081,21.570140854252692,-0.00031459625000537306,0.003624083606375253,0.8539655092702291,22.248571360858524,
1008   -0.0001962409273418918,0.002871499630856695,0.8591451343249928,22.93167452589906,-0.0001517235006254813,0.0024020478263425374,0.8633502992099917,23.61848943530459,-9.808807298711842e-05,0.002039091575979201,
1009   0.8668916958913723,24.3083816408078,-6.16744044887281e-05,0.0015697947428584037,0.8726471999975167,25.695701475686946,-4.442835797282901e-05,0.0012747170455427246,0.8771836685453517,27.091154351545278,
1010   -3.348954139243773e-05,0.001062152081603185,0.8809105412336393,28.493161497868602,-2.6683222559134847e-05,0.0009019232664219256,0.8840428770102831,29.90061604105042,-2.2088178681282497e-05,0.0007742588984400619,
1011   0.8867160765738583,31.312686155853683,-1.667711339966583e-05,0.0006685792577981921,0.8890171357370091,32.72871346109606,-1.3575572323023186e-05,0.0005887885527133097,0.8910224041098471,34.14816368859959,
1012   3.870682341339684e-06,0.0005238369953528771,0.8927968354287474,35.57062158557842,1.652501762750896e-05,0.0005608751164921488,0.8962566645628054,38.42376718451725,1.025533165799457e-05,0.0006399381279642342,
1013   0.8981717388956004,39.85462385696781,4.217489203709734e-06,0.0006890041817986525,0.9002911553152158,41.288710377401316,-1.3606583009440145e-06,0.0007091825201709647,0.902521003693187,42.72627727870422,
1014   -6.5919455386986025e-06,0.0007026725275475353,0.90477265054668,44.16742907004963,-8.337302371781329e-06,0.0006395949469364391,0.909053985716819,47.060252983472736,-7.449588627944947e-06,0.0005598162443746847,
1015   0.9128796623531339,49.966034395389734,-6.315093844706993e-06,0.0004885319741330542,0.916223504160949,52.88323545568578,-5.222210236886068e-06,0.0004281035560404521,0.9191472313674356,55.810413718287215,
1016   -4.3340984409028905e-06,0.00037813281746995354,0.92171882622984,58.746338267744775,-3.584018510477514e-06,0.00033666032013550954,0.9239987511014315,61.689985681248636,-3.1164047298666206e-06,0.0003023652527416521,
1017   0.9260370055565125,64.64050761939896,-2.397927550774463e-06,0.0002725447286777092,0.9278707550661331,67.59719709834856,-1.7582332772723927e-06,0.0002266537341312325,0.9310552707849915,73.52679258666676,
1018   -1.3590446900958163e-06,0.00019300506375639925,0.9337323824710142,79.47500145791733,-1.0705780458318834e-06,0.00016699597418175295,0.9360289219228157,85.43902261536246,-8.554633498108393e-07,0.00014650749393263905,
1019   0.9380288413867284,91.41671043899811,-7.26565013231226e-07,0.00013013583003136704,0.9397936204862541,97.40637833182979,-5.433695525704639e-07,0.00011623099331138935,0.9413652579811407,103.40667142433091,
1020   -3.875120433256194e-07,9.543322636828125e-05,0.9440657792563745,115.43488643542663,-2.955848690540261e-07,8.060099087292065e-05,0.9463117145852102,127.49449432411251,-2.2764651014780293e-07,6.928731827309727e-05,
1021   0.9482240669344653,139.5805335437144,-1.889365693472967e-07,6.057402353461092e-05,0.9498809049060076,151.6892710006018,-1.3662970839616652e-07,5.334237296139283e-05,0.9513343090420538,163.81780929697055,
1022   -9.405186200125871e-08,4.288321926282487e-05,0.9537897005051623,188.12549895656414,-7.014801524368798e-08,3.5683446300890725e-05,0.9557944885812962,212.4897401795494,-5.297669610422804e-08,3.0313538967444306e-05,
1023   0.9574785357300128,236.90084688807764,-4.3382495941391207e-08,2.625811490557173e-05,0.9589220764010857,261.35171432750417,-3.079907645361472e-08,2.2937137365585694e-05,0.9601773932004939,285.8369354804065,
1024   -2.0795670460507038e-08,1.8221731350544535e-05,0.9622778974954699,334.89433445484354,-1.5313305483537226e-08,1.5037868687520437e-05,0.9639752700158608,384.0479791602135,-1.148795673562738e-08,1.2693368101732272e-05,
1025   0.9653905076984746,433.2806840883545,-9.203493258516892e-09,1.093453678179663e-05,0.9665963356825096,482.58001660466164};
1026 maptype *map_0[1] = {a0_0};
1027 treal *t_0[1] = {t0_0};
1028 treal *c_0[1] = {c0_0};
1029 real x0_1[2] = {-84.2062327123};
1030 real xe_1[2] = {426.234072198};
1031 real hi_1[2] = {20.0650299388};
1032 int k_1[2] = {4};
1033 int nmap_1[2] = {10243};
1034 int n_1[2] = {195};
1035 treal t0_1[199] = {
1036   -288.2926463625786,-288.2926463625786,-288.2926463625786,-288.2926463625786,-84.15639476023611,-58.639363309943306,-45.880847584796896,-42.6912186535103,-41.096404187866995,-39.5015897222237,
1037   -39.10288610581287,-38.704182489402044,-38.50483068119663,-38.305478872991216,-38.10612706478581,-38.0064511606831,-37.906775256580396,-37.80709935247769,-37.70742344837498,-37.60774754427228,
1038   -37.508071640169575,-37.408395736066865,-37.30871983196416,-37.258881879912806,-37.20904392786146,-37.1592059758101,-37.10936802375875,-37.05953007170739,-37.00969211965604,-36.95985416760469,
1039   -36.910016215553334,-36.86017826350198,-36.81034031145063,-36.760502359399275,-36.71066440734792,-36.660826455296565,-36.61098850324521,-36.56115055119386,-36.51131259914251,-36.46147464709115,
1040   -36.4116366950398,-36.36179874298845,-36.31196079093709,-36.26212283888574,-36.21228488683438,-36.162446934783034,-36.11260898273168,-36.062771030680324,-36.012933078628976,-35.96309512657762,
1041   -35.913257174526265,-35.81358127042356,-35.71390536632086,-35.61422946221815,-35.514553558115445,-35.41487765401274,-35.31520174991003,-35.21552584580733,-35.115849941704624,-35.016174037601914,
1042   -34.91649813349921,-34.81682222939651,-34.7171463252938,-34.617470421191086,-34.51779451708838,-34.41811861298568,-34.31844270888297,-34.21876680478026,-34.119090900677556,-33.91973909247214,
1043   -33.72038728426673,-33.521035476061314,-33.32168366785591,-33.122331859650494,-32.92298005144508,-32.72362824323967,-32.52427643503426,-32.324924626828846,-32.12557281862343,-31.92622101041802,
1044   -31.726869202212605,-31.527517394007194,-31.12881377759637,-30.730110161185543,-30.33140654477472,-29.932702928363895,-29.533999311953067,-29.135295695542244,-28.73659207913142,-28.337888462720592,
1045   -27.939184846309768,-27.540481229898944,-26.743073997077293,-25.94566676425564,-25.148259531433993,-24.35085229861234,-23.55344506579069,-22.756037832969042,-21.95863060014739,-21.16122336732574,
1046   -20.36381613450409,-18.76900166886079,-17.17418720321749,-15.57937273757419,-13.984558271930888,-10.794929340644288,-9.997522107822636,-9.598818491411812,-9.499142587309105,-9.399466683206398,
1047   -9.200114875000986,-9.000763066795574,-8.80141125859016,-8.602059450384749,-8.402707642179337,-8.004004025768511,-7.605300409357685,-7.20659679294686,-6.8078931765360355,-6.40918956012521,
1048   -6.010485943714385,-5.61178232730356,-5.213078710892734,-4.8143750944819095,-4.415671478071085,-3.618264245249434,-2.820857012427784,-2.0234497796061337,-1.226042546784483,-0.42863531396283283,
1049   0.36877191885881744,1.1661791516804678,1.963586384502118,2.760993617323768,3.5584008501454187,4.355808082967069,5.153215315788719,5.950622548610369,6.748029781432019,7.54543701425367,
1050   7.944140630664495,8.34284424707532,8.741547863486145,9.140251479896971,9.538955096307795,9.937658712718621,10.336362329129447,10.73506594554027,11.133769561951096,11.532473178361922,
1051   11.931176794772746,12.329880411183572,12.728584027594398,13.127287644005222,13.525991260416047,13.924694876826873,14.323398493237697,14.722102109648523,15.519509342470172,16.316916575291824,
1052   17.114323808113475,17.911731040935123,18.709138273756775,19.506545506578426,20.303952739400074,21.101359972221726,21.898767205043377,22.696174437865025,24.290988903508328,25.885803369151628,
1053   27.480617834794927,29.07543230043823,30.67024676608153,32.26506123172483,33.85987569736813,37.04950462865473,40.23913355994134,43.428762491227936,46.618391422514534,49.80802035380114,
1054   56.18727821637434,62.56653607894754,68.94579394152075,75.32505180409395,81.70430966666714,94.46282539181355,107.22134111695996,119.97985684210636,145.49688829239918,171.013919742692,
1055   196.5309511929848,222.0479826432776,273.0820455438632,324.11610844444886,426.1842342456201,528.2523600467913,528.2523600467913,528.2523600467913,528.2523600467913};
1056 maptype a0_1[10242] = {
1057   3,4,4,4,4,4,4,4,4,4,
1058   4,4,4,4,4,4,4,4,4,4,
1059   4,4,4,4,4,4,4,4,4,4,
1060   4,4,4,4,4,4,4,4,4,4,
1061   4,4,4,4,4,4,4,4,4,4,
1062   4,4,4,4,4,4,4,4,4,4,
1063   4,4,4,4,4,4,4,4,4,4,
1064   4,4,4,4,4,4,4,4,4,4,
1065   4,4,4,4,4,4,4,4,4,4,
1066   4,4,4,4,4,4,4,4,4,4,
1067   4,4,4,4,4,4,4,4,4,4,
1068   4,4,4,4,4,4,4,4,4,4,
1069   4,4,4,4,4,4,4,4,4,4,
1070   4,4,4,4,4,4,4,4,4,4,
1071   4,4,4,4,4,4,4,4,4,4,
1072   4,4,4,4,4,4,4,4,4,4,
1073   4,4,4,4,4,4,4,4,4,4,
1074   4,4,4,4,4,4,4,4,4,4,
1075   4,4,4,4,4,4,4,4,4,4,
1076   4,4,4,4,4,4,4,4,4,4,
1077   4,4,4,4,4,4,4,4,4,4,
1078   4,4,4,4,4,4,4,4,4,4,
1079   4,4,4,4,4,4,4,4,4,4,
1080   4,4,4,4,4,4,4,4,4,4,
1081   4,4,4,4,4,4,4,4,4,4,
1082   4,4,4,4,4,4,4,4,4,4,
1083   4,4,4,4,4,4,4,4,4,4,
1084   4,4,4,4,4,4,4,4,4,4,
1085   4,4,4,4,4,4,4,4,4,4,
1086   4,4,4,4,4,4,4,4,4,4,
1087   4,4,4,4,4,4,4,4,4,4,
1088   4,4,4,4,4,4,4,4,4,4,
1089   4,4,4,4,4,4,4,4,4,4,
1090   4,4,4,4,4,4,4,4,4,4,
1091   4,4,4,4,4,4,4,4,4,4,
1092   4,4,4,4,4,4,4,4,4,4,
1093   4,4,4,4,4,4,4,4,4,4,
1094   4,4,4,4,4,4,4,4,4,4,
1095   4,4,4,4,4,4,4,4,4,4,
1096   4,4,4,4,4,4,4,4,4,4,
1097   4,4,4,4,4,4,4,4,4,4,
1098   4,4,4,4,4,4,4,4,4,4,
1099   4,4,4,4,4,4,4,4,4,4,
1100   4,4,4,4,4,4,4,4,4,4,
1101   4,4,4,4,4,4,4,4,4,4,
1102   4,4,4,4,4,4,4,4,4,4,
1103   4,4,4,4,4,4,4,4,4,4,
1104   4,4,4,4,4,4,4,4,4,4,
1105   4,4,4,4,4,4,4,4,4,4,
1106   4,4,4,4,4,4,4,4,4,4,
1107   4,4,4,4,4,4,4,4,4,4,
1108   4,4,4,5,5,5,5,5,5,5,
1109   5,5,5,5,5,5,5,5,5,5,
1110   5,5,5,5,5,5,5,5,5,5,
1111   5,5,5,5,5,5,5,5,5,5,
1112   5,5,5,5,5,5,5,5,5,5,
1113   5,5,5,5,5,5,5,5,5,5,
1114   5,5,5,5,5,5,5,5,5,5,
1115   5,5,5,5,5,5,5,5,5,5,
1116   5,5,5,5,5,5,5,5,5,5,
1117   5,5,5,5,5,5,5,5,5,5,
1118   5,5,5,5,5,5,5,5,5,5,
1119   5,5,5,5,5,5,5,5,5,5,
1120   5,5,5,5,5,5,5,5,5,5,
1121   5,5,5,5,5,5,5,5,5,5,
1122   5,5,5,5,5,5,5,5,5,5,
1123   5,5,5,5,5,5,5,5,5,5,
1124   5,5,5,5,5,5,5,5,5,5,
1125   5,5,5,5,5,5,5,5,5,5,
1126   5,5,5,5,5,5,5,5,5,5,
1127   5,5,5,5,5,5,5,5,5,5,
1128   5,5,5,5,5,5,5,5,5,5,
1129   5,5,5,5,5,5,5,5,5,5,
1130   5,5,5,5,5,5,5,5,5,5,
1131   5,5,5,5,5,5,5,5,5,5,
1132   5,5,5,5,5,5,5,5,5,5,
1133   5,5,5,5,5,5,5,5,5,6,
1134   6,6,6,6,6,6,6,6,6,6,
1135   6,6,6,6,6,6,6,6,6,6,
1136   6,6,6,6,6,6,6,6,6,6,
1137   6,6,6,6,6,6,6,6,6,6,
1138   6,6,6,6,6,6,6,6,6,6,
1139   6,6,6,6,6,6,6,6,6,6,
1140   6,6,6,7,7,7,7,7,7,7,
1141   7,7,7,7,7,7,7,7,7,7,
1142   7,7,7,7,7,7,7,7,7,7,
1143   7,7,7,7,7,8,8,8,8,8,
1144   8,8,8,8,8,8,8,8,8,8,
1145   8,8,8,8,8,8,8,8,8,8,
1146   8,8,8,8,8,8,8,9,9,9,
1147   9,9,9,9,9,10,10,10,10,10,
1148   10,10,10,11,11,11,11,12,12,12,
1149   12,13,13,13,13,14,14,15,15,16,
1150   16,17,17,18,18,19,19,20,20,21,
1151   21,22,23,24,25,26,27,28,29,30,
1152   31,32,33,34,35,36,37,38,39,40,
1153   41,42,43,44,45,46,47,48,49,50,
1154   50,51,51,52,52,53,53,54,54,55,
1155   55,56,56,57,57,58,58,59,59,60,
1156   60,61,61,62,62,63,63,64,64,65,
1157   65,66,66,67,67,68,68,68,68,69,
1158   69,69,69,70,70,70,70,71,71,71,
1159   71,72,72,72,72,73,73,73,73,74,
1160   74,74,74,75,75,75,75,76,76,76,
1161   76,77,77,77,77,78,78,78,78,79,
1162   79,79,79,80,80,80,80,81,81,81,
1163   81,81,81,81,81,82,82,82,82,82,
1164   82,82,82,83,83,83,83,83,83,83,
1165   83,84,84,84,84,84,84,84,84,85,
1166   85,85,85,85,85,85,85,86,86,86,
1167   86,86,86,86,86,87,87,87,87,87,
1168   87,87,87,88,88,88,88,88,88,88,
1169   88,89,89,89,89,89,89,89,89,90,
1170   90,90,90,90,90,90,90,91,91,91,
1171   91,91,91,91,91,91,91,91,91,91,
1172   91,91,91,92,92,92,92,92,92,92,
1173   92,92,92,92,92,92,92,92,92,93,
1174   93,93,93,93,93,93,93,93,93,93,
1175   93,93,93,93,93,94,94,94,94,94,
1176   94,94,94,94,94,94,94,94,94,94,
1177   94,95,95,95,95,95,95,95,95,95,
1178   95,95,95,95,95,95,95,96,96,96,
1179   96,96,96,96,96,96,96,96,96,96,
1180   96,96,96,97,97,97,97,97,97,97,
1181   97,97,97,97,97,97,97,97,97,98,
1182   98,98,98,98,98,98,98,98,98,98,
1183   98,98,98,98,98,99,99,99,99,99,
1184   99,99,99,99,99,99,99,99,99,99,
1185   99,100,100,100,100,100,100,100,100,100,
1186   100,100,100,100,100,100,100,100,100,100,
1187   100,100,100,100,100,100,100,100,100,100,
1188   100,100,100,101,101,101,101,101,101,101,
1189   101,101,101,101,101,101,101,101,101,101,
1190   101,101,101,101,101,101,101,101,101,101,
1191   101,101,101,101,101,102,102,102,102,102,
1192   102,102,102,102,102,102,102,102,102,102,
1193   102,102,102,102,102,102,102,102,102,102,
1194   102,102,102,102,102,102,102,103,103,103,
1195   103,103,103,103,103,103,103,103,103,103,
1196   103,103,103,103,103,103,103,103,103,103,
1197   103,103,103,103,103,103,103,103,103,104,
1198   104,104,104,104,104,104,104,104,104,104,
1199   104,104,104,104,104,104,104,104,104,104,
1200   104,104,104,104,104,104,104,104,104,104,
1201   104,104,104,104,104,104,104,104,104,104,
1202   104,104,104,104,104,104,104,104,104,104,
1203   104,104,104,104,104,104,104,104,104,104,
1204   104,104,104,105,105,105,105,105,105,105,
1205   105,105,105,105,105,105,105,105,105,106,
1206   106,106,106,106,106,106,106,107,107,108,
1207   108,109,109,109,109,110,110,110,110,111,
1208   111,111,111,112,112,112,112,113,113,113,
1209   113,114,114,114,114,114,114,114,114,115,
1210   115,115,115,115,115,115,115,116,116,116,
1211   116,116,116,116,116,117,117,117,117,117,
1212   117,117,117,118,118,118,118,118,118,118,
1213   118,119,119,119,119,119,119,119,119,120,
1214   120,120,120,120,120,120,120,121,121,121,
1215   121,121,121,121,121,122,122,122,122,122,
1216   122,122,122,123,123,123,123,123,123,123,
1217   123,124,124,124,124,124,124,124,124,124,
1218   124,124,124,124,124,124,124,125,125,125,
1219   125,125,125,125,125,125,125,125,125,125,
1220   125,125,125,126,126,126,126,126,126,126,
1221   126,126,126,126,126,126,126,126,126,127,
1222   127,127,127,127,127,127,127,127,127,127,
1223   127,127,127,127,127,128,128,128,128,128,
1224   128,128,128,128,128,128,128,128,128,128,
1225   128,129,129,129,129,129,129,129,129,129,
1226   129,129,129,129,129,129,129,130,130,130,
1227   130,130,130,130,130,130,130,130,130,130,
1228   130,130,130,131,131,131,131,131,131,131,
1229   131,131,131,131,131,131,131,131,131,132,
1230   132,132,132,132,132,132,132,132,132,132,
1231   132,132,132,132,132,133,133,133,133,133,
1232   133,133,133,133,133,133,133,133,133,133,
1233   133,134,134,134,134,134,134,134,134,134,
1234   134,134,134,134,134,134,134,135,135,135,
1235   135,135,135,135,135,135,135,135,135,135,
1236   135,135,135,136,136,136,136,136,136,136,
1237   136,136,136,136,136,136,136,136,136,137,
1238   137,137,137,137,137,137,137,137,137,137,
1239   137,137,137,137,137,138,138,138,138,138,
1240   138,138,138,138,138,138,138,138,138,138,
1241   138,139,139,139,139,139,139,139,139,140,
1242   140,140,140,140,140,140,140,141,141,141,
1243   141,141,141,141,141,142,142,142,142,142,
1244   142,142,142,143,143,143,143,143,143,143,
1245   143,144,144,144,144,144,144,144,144,145,
1246   145,145,145,145,145,145,145,146,146,146,
1247   146,146,146,146,146,147,147,147,147,147,
1248   147,147,147,148,148,148,148,148,148,148,
1249   148,149,149,149,149,149,149,149,149,150,
1250   150,150,150,150,150,150,150,151,151,151,
1251   151,151,151,151,151,152,152,152,152,152,
1252   152,152,152,153,153,153,153,153,153,153,
1253   153,154,154,154,154,154,154,154,154,155,
1254   155,155,155,155,155,155,155,156,156,156,
1255   156,156,156,156,156,157,157,157,157,157,
1256   157,157,157,157,157,157,157,157,157,157,
1257   157,158,158,158,158,158,158,158,158,158,
1258   158,158,158,158,158,158,158,159,159,159,
1259   159,159,159,159,159,159,159,159,159,159,
1260   159,159,159,160,160,160,160,160,160,160,
1261   160,160,160,160,160,160,160,160,160,161,
1262   161,161,161,161,161,161,161,161,161,161,
1263   161,161,161,161,161,162,162,162,162,162,
1264   162,162,162,162,162,162,162,162,162,162,
1265   162,163,163,163,163,163,163,163,163,163,
1266   163,163,163,163,163,163,163,164,164,164,
1267   164,164,164,164,164,164,164,164,164,164,
1268   164,164,164,165,165,165,165,165,165,165,
1269   165,165,165,165,165,165,165,165,165,166,
1270   166,166,166,166,166,166,166,166,166,166,
1271   166,166,166,166,166,167,167,167,167,167,
1272   167,167,167,167,167,167,167,167,167,167,
1273   167,167,167,167,167,167,167,167,167,167,
1274   167,167,167,167,167,167,167,168,168,168,
1275   168,168,168,168,168,168,168,168,168,168,
1276   168,168,168,168,168,168,168,168,168,168,
1277   168,168,168,168,168,168,168,168,168,169,
1278   169,169,169,169,169,169,169,169,169,169,
1279   169,169,169,169,169,169,169,169,169,169,
1280   169,169,169,169,169,169,169,169,169,169,
1281   169,170,170,170,170,170,170,170,170,170,
1282   170,170,170,170,170,170,170,170,170,170,
1283   170,170,170,170,170,170,170,170,170,170,
1284   170,170,170,171,171,171,171,171,171,171,
1285   171,171,171,171,171,171,171,171,171,171,
1286   171,171,171,171,171,171,171,171,171,171,
1287   171,171,171,171,171,172,172,172,172,172,
1288   172,172,172,172,172,172,172,172,172,172,
1289   172,172,172,172,172,172,172,172,172,172,
1290   172,172,172,172,172,172,172,173,173,173,
1291   173,173,173,173,173,173,173,173,173,173,
1292   173,173,173,173,173,173,173,173,173,173,
1293   173,173,173,173,173,173,173,173,173,174,
1294   174,174,174,174,174,174,174,174,174,174,
1295   174,174,174,174,174,174,174,174,174,174,
1296   174,174,174,174,174,174,174,174,174,174,
1297   174,174,174,174,174,174,174,174,174,174,
1298   174,174,174,174,174,174,174,174,174,174,
1299   174,174,174,174,174,174,174,174,174,174,
1300   174,174,174,175,175,175,175,175,175,175,
1301   175,175,175,175,175,175,175,175,175,175,
1302   175,175,175,175,175,175,175,175,175,175,
1303   175,175,175,175,175,175,175,175,175,175,
1304   175,175,175,175,175,175,175,175,175,175,
1305   175,175,175,175,175,175,175,175,175,175,
1306   175,175,175,175,175,175,175,176,176,176,
1307   176,176,176,176,176,176,176,176,176,176,
1308   176,176,176,176,176,176,176,176,176,176,
1309   176,176,176,176,176,176,176,176,176,176,
1310   176,176,176,176,176,176,176,176,176,176,
1311   176,176,176,176,176,176,176,176,176,176,
1312   176,176,176,176,176,176,176,176,176,176,
1313   176,177,177,177,177,177,177,177,177,177,
1314   177,177,177,177,177,177,177,177,177,177,
1315   177,177,177,177,177,177,177,177,177,177,
1316   177,177,177,177,177,177,177,177,177,177,
1317   177,177,177,177,177,177,177,177,177,177,
1318   177,177,177,177,177,177,177,177,177,177,
1319   177,177,177,177,177,178,178,178,178,178,
1320   178,178,178,178,178,178,178,178,178,178,
1321   178,178,178,178,178,178,178,178,178,178,
1322   178,178,178,178,178,178,178,178,178,178,
1323   178,178,178,178,178,178,178,178,178,178,
1324   178,178,178,178,178,178,178,178,178,178,
1325   178,178,178,178,178,178,178,178,178,179,
1326   179,179,179,179,179,179,179,179,179,179,
1327   179,179,179,179,179,179,179,179,179,179,
1328   179,179,179,179,179,179,179,179,179,179,
1329   179,179,179,179,179,179,179,179,179,179,
1330   179,179,179,179,179,179,179,179,179,179,
1331   179,179,179,179,179,179,179,179,179,179,
1332   179,179,179,179,179,179,179,179,179,179,
1333   179,179,179,179,179,179,179,179,179,179,
1334   179,179,179,179,179,179,179,179,179,179,
1335   179,179,179,179,179,179,179,179,179,179,
1336   179,179,179,179,179,179,179,179,179,179,
1337   179,179,179,179,179,179,179,179,179,179,
1338   179,179,179,179,179,179,179,180,180,180,
1339   180,180,180,180,180,180,180,180,180,180,
1340   180,180,180,180,180,180,180,180,180,180,
1341   180,180,180,180,180,180,180,180,180,180,
1342   180,180,180,180,180,180,180,180,180,180,
1343   180,180,180,180,180,180,180,180,180,180,
1344   180,180,180,180,180,180,180,180,180,180,
1345   180,180,180,180,180,180,180,180,180,180,
1346   180,180,180,180,180,180,180,180,180,180,
1347   180,180,180,180,180,180,180,180,180,180,
1348   180,180,180,180,180,180,180,180,180,180,
1349   180,180,180,180,180,180,180,180,180,180,
1350   180,180,180,180,180,180,180,180,180,180,
1351   180,180,180,180,180,181,181,181,181,181,
1352   181,181,181,181,181,181,181,181,181,181,
1353   181,181,181,181,181,181,181,181,181,181,
1354   181,181,181,181,181,181,181,181,181,181,
1355   181,181,181,181,181,181,181,181,181,181,
1356   181,181,181,181,181,181,181,181,181,181,
1357   181,181,181,181,181,181,181,181,181,181,
1358   181,181,181,181,181,181,181,181,181,181,
1359   181,181,181,181,181,181,181,181,181,181,
1360   181,181,181,181,181,181,181,181,181,181,
1361   181,181,181,181,181,181,181,181,181,181,
1362   181,181,181,181,181,181,181,181,181,181,
1363   181,181,181,181,181,181,181,181,181,181,
1364   181,181,181,182,182,182,182,182,182,182,
1365   182,182,182,182,182,182,182,182,182,182,
1366   182,182,182,182,182,182,182,182,182,182,
1367   182,182,182,182,182,182,182,182,182,182,
1368   182,182,182,182,182,182,182,182,182,182,
1369   182,182,182,182,182,182,182,182,182,182,
1370   182,182,182,182,182,182,182,182,182,182,
1371   182,182,182,182,182,182,182,182,182,182,
1372   182,182,182,182,182,182,182,182,182,182,
1373   182,182,182,182,182,182,182,182,182,182,
1374   182,182,182,182,182,182,182,182,182,182,
1375   182,182,182,182,182,182,182,182,182,182,
1376   182,182,182,182,182,182,182,182,182,182,
1377   182,183,183,183,183,183,183,183,183,183,
1378   183,183,183,183,183,183,183,183,183,183,
1379   183,183,183,183,183,183,183,183,183,183,
1380   183,183,183,183,183,183,183,183,183,183,
1381   183,183,183,183,183,183,183,183,183,183,
1382   183,183,183,183,183,183,183,183,183,183,
1383   183,183,183,183,183,183,183,183,183,183,
1384   183,183,183,183,183,183,183,183,183,183,
1385   183,183,183,183,183,183,183,183,183,183,
1386   183,183,183,183,183,183,183,183,183,183,
1387   183,183,183,183,183,183,183,183,183,183,
1388   183,183,183,183,183,183,183,183,183,183,
1389   183,183,183,183,183,183,183,183,183,184,
1390   184,184,184,184,184,184,184,184,184,184,
1391   184,184,184,184,184,184,184,184,184,184,
1392   184,184,184,184,184,184,184,184,184,184,
1393   184,184,184,184,184,184,184,184,184,184,
1394   184,184,184,184,184,184,184,184,184,184,
1395   184,184,184,184,184,184,184,184,184,184,
1396   184,184,184,184,184,184,184,184,184,184,
1397   184,184,184,184,184,184,184,184,184,184,
1398   184,184,184,184,184,184,184,184,184,184,
1399   184,184,184,184,184,184,184,184,184,184,
1400   184,184,184,184,184,184,184,184,184,184,
1401   184,184,184,184,184,184,184,184,184,184,
1402   184,184,184,184,184,184,184,184,184,184,
1403   184,184,184,184,184,184,184,184,184,184,
1404   184,184,184,184,184,184,184,184,184,184,
1405   184,184,184,184,184,184,184,184,184,184,
1406   184,184,184,184,184,184,184,184,184,184,
1407   184,184,184,184,184,184,184,184,184,184,
1408   184,184,184,184,184,184,184,184,184,184,
1409   184,184,184,184,184,184,184,184,184,184,
1410   184,184,184,184,184,184,184,184,184,184,
1411   184,184,184,184,184,184,184,184,184,184,
1412   184,184,184,184,184,184,184,184,184,184,
1413   184,184,184,184,184,184,184,184,184,184,
1414   184,184,184,184,184,184,184,184,184,184,
1415   184,184,184,184,184,185,185,185,185,185,
1416   185,185,185,185,185,185,185,185,185,185,
1417   185,185,185,185,185,185,185,185,185,185,
1418   185,185,185,185,185,185,185,185,185,185,
1419   185,185,185,185,185,185,185,185,185,185,
1420   185,185,185,185,185,185,185,185,185,185,
1421   185,185,185,185,185,185,185,185,185,185,
1422   185,185,185,185,185,185,185,185,185,185,
1423   185,185,185,185,185,185,185,185,185,185,
1424   185,185,185,185,185,185,185,185,185,185,
1425   185,185,185,185,185,185,185,185,185,185,
1426   185,185,185,185,185,185,185,185,185,185,
1427   185,185,185,185,185,185,185,185,185,185,
1428   185,185,185,185,185,185,185,185,185,185,
1429   185,185,185,185,185,185,185,185,185,185,
1430   185,185,185,185,185,185,185,185,185,185,
1431   185,185,185,185,185,185,185,185,185,185,
1432   185,185,185,185,185,185,185,185,185,185,
1433   185,185,185,185,185,185,185,185,185,185,
1434   185,185,185,185,185,185,185,185,185,185,
1435   185,185,185,185,185,185,185,185,185,185,
1436   185,185,185,185,185,185,185,185,185,185,
1437   185,185,185,185,185,185,185,185,185,185,
1438   185,185,185,185,185,185,185,185,185,185,
1439   185,185,185,185,185,185,185,185,185,185,
1440   185,185,185,185,185,185,185,185,185,185,
1441   185,186,186,186,186,186,186,186,186,186,
1442   186,186,186,186,186,186,186,186,186,186,
1443   186,186,186,186,186,186,186,186,186,186,
1444   186,186,186,186,186,186,186,186,186,186,
1445   186,186,186,186,186,186,186,186,186,186,
1446   186,186,186,186,186,186,186,186,186,186,
1447   186,186,186,186,186,186,186,186,186,186,
1448   186,186,186,186,186,186,186,186,186,186,
1449   186,186,186,186,186,186,186,186,186,186,
1450   186,186,186,186,186,186,186,186,186,186,
1451   186,186,186,186,186,186,186,186,186,186,
1452   186,186,186,186,186,186,186,186,186,186,
1453   186,186,186,186,186,186,186,186,186,186,
1454   186,186,186,186,186,186,186,186,186,186,
1455   186,186,186,186,186,186,186,186,186,186,
1456   186,186,186,186,186,186,186,186,186,186,
1457   186,186,186,186,186,186,186,186,186,186,
1458   186,186,186,186,186,186,186,186,186,186,
1459   186,186,186,186,186,186,186,186,186,186,
1460   186,186,186,186,186,186,186,186,186,186,
1461   186,186,186,186,186,186,186,186,186,186,
1462   186,186,186,186,186,186,186,186,186,186,
1463   186,186,186,186,186,186,186,186,186,186,
1464   186,186,186,186,186,186,186,186,186,186,
1465   186,186,186,186,186,186,186,186,186,186,
1466   186,186,186,186,186,186,186,187,187,187,
1467   187,187,187,187,187,187,187,187,187,187,
1468   187,187,187,187,187,187,187,187,187,187,
1469   187,187,187,187,187,187,187,187,187,187,
1470   187,187,187,187,187,187,187,187,187,187,
1471   187,187,187,187,187,187,187,187,187,187,
1472   187,187,187,187,187,187,187,187,187,187,
1473   187,187,187,187,187,187,187,187,187,187,
1474   187,187,187,187,187,187,187,187,187,187,
1475   187,187,187,187,187,187,187,187,187,187,
1476   187,187,187,187,187,187,187,187,187,187,
1477   187,187,187,187,187,187,187,187,187,187,
1478   187,187,187,187,187,187,187,187,187,187,
1479   187,187,187,187,187,187,187,187,187,187,
1480   187,187,187,187,187,187,187,187,187,187,
1481   187,187,187,187,187,187,187,187,187,187,
1482   187,187,187,187,187,187,187,187,187,187,
1483   187,187,187,187,187,187,187,187,187,187,
1484   187,187,187,187,187,187,187,187,187,187,
1485   187,187,187,187,187,187,187,187,187,187,
1486   187,187,187,187,187,187,187,187,187,187,
1487   187,187,187,187,187,187,187,187,187,187,
1488   187,187,187,187,187,187,187,187,187,187,
1489   187,187,187,187,187,187,187,187,187,187,
1490   187,187,187,187,187,187,187,187,187,187,
1491   187,187,187,187,187,187,187,187,187,187,
1492   187,187,187,187,187,187,187,187,187,187,
1493   187,187,187,187,187,187,187,187,187,187,
1494   187,187,187,187,187,187,187,187,187,187,
1495   187,187,187,187,187,187,187,187,187,187,
1496   187,187,187,187,187,187,187,187,187,187,
1497   187,187,187,187,187,187,187,187,187,187,
1498   187,187,187,187,187,187,187,187,187,187,
1499   187,187,187,187,187,187,187,187,187,187,
1500   187,187,187,187,187,187,187,187,187,187,
1501   187,187,187,187,187,187,187,187,187,187,
1502   187,187,187,187,187,187,187,187,187,187,
1503   187,187,187,187,187,187,187,187,187,187,
1504   187,187,187,187,187,187,187,187,187,187,
1505   187,187,187,187,187,187,187,187,187,187,
1506   187,187,187,187,187,187,187,187,187,187,
1507   187,187,187,187,187,187,187,187,187,187,
1508   187,187,187,187,187,187,187,187,187,187,
1509   187,187,187,187,187,187,187,187,187,187,
1510   187,187,187,187,187,187,187,187,187,187,
1511   187,187,187,187,187,187,187,187,187,187,
1512   187,187,187,187,187,187,187,187,187,187,
1513   187,187,187,187,187,187,187,187,187,187,
1514   187,187,187,187,187,187,187,187,187,187,
1515   187,187,187,187,187,187,187,187,187,187,
1516   187,187,187,187,187,187,187,187,187,187,
1517   187,187,187,187,187,187,187,187,187,188,
1518   188,188,188,188,188,188,188,188,188,188,
1519   188,188,188,188,188,188,188,188,188,188,
1520   188,188,188,188,188,188,188,188,188,188,
1521   188,188,188,188,188,188,188,188,188,188,
1522   188,188,188,188,188,188,188,188,188,188,
1523   188,188,188,188,188,188,188,188,188,188,
1524   188,188,188,188,188,188,188,188,188,188,
1525   188,188,188,188,188,188,188,188,188,188,
1526   188,188,188,188,188,188,188,188,188,188,
1527   188,188,188,188,188,188,188,188,188,188,
1528   188,188,188,188,188,188,188,188,188,188,
1529   188,188,188,188,188,188,188,188,188,188,
1530   188,188,188,188,188,188,188,188,188,188,
1531   188,188,188,188,188,188,188,188,188,188,
1532   188,188,188,188,188,188,188,188,188,188,
1533   188,188,188,188,188,188,188,188,188,188,
1534   188,188,188,188,188,188,188,188,188,188,
1535   188,188,188,188,188,188,188,188,188,188,
1536   188,188,188,188,188,188,188,188,188,188,
1537   188,188,188,188,188,188,188,188,188,188,
1538   188,188,188,188,188,188,188,188,188,188,
1539   188,188,188,188,188,188,188,188,188,188,
1540   188,188,188,188,188,188,188,188,188,188,
1541   188,188,188,188,188,188,188,188,188,188,
1542   188,188,188,188,188,188,188,188,188,188,
1543   188,188,188,188,188,188,188,188,188,188,
1544   188,188,188,188,188,188,188,188,188,188,
1545   188,188,188,188,188,188,188,188,188,188,
1546   188,188,188,188,188,188,188,188,188,188,
1547   188,188,188,188,188,188,188,188,188,188,
1548   188,188,188,188,188,188,188,188,188,188,
1549   188,188,188,188,188,188,188,188,188,188,
1550   188,188,188,188,188,188,188,188,188,188,
1551   188,188,188,188,188,188,188,188,188,188,
1552   188,188,188,188,188,188,188,188,188,188,
1553   188,188,188,188,188,188,188,188,188,188,
1554   188,188,188,188,188,188,188,188,188,188,
1555   188,188,188,188,188,188,188,188,188,188,
1556   188,188,188,188,188,188,188,188,188,188,
1557   188,188,188,188,188,188,188,188,188,188,
1558   188,188,188,188,188,188,188,188,188,188,
1559   188,188,188,188,188,188,188,188,188,188,
1560   188,188,188,188,188,188,188,188,188,188,
1561   188,188,188,188,188,188,188,188,188,188,
1562   188,188,188,188,188,188,188,188,188,188,
1563   188,188,188,188,188,188,188,188,188,188,
1564   188,188,188,188,188,188,188,188,188,188,
1565   188,188,188,188,188,188,188,188,188,188,
1566   188,188,188,188,188,188,188,188,188,188,
1567   188,188,188,188,188,188,188,188,188,188,
1568   188,188,188,188,188,188,188,188,188,188,
1569   188,189,189,189,189,189,189,189,189,189,
1570   189,189,189,189,189,189,189,189,189,189,
1571   189,189,189,189,189,189,189,189,189,189,
1572   189,189,189,189,189,189,189,189,189,189,
1573   189,189,189,189,189,189,189,189,189,189,
1574   189,189,189,189,189,189,189,189,189,189,
1575   189,189,189,189,189,189,189,189,189,189,
1576   189,189,189,189,189,189,189,189,189,189,
1577   189,189,189,189,189,189,189,189,189,189,
1578   189,189,189,189,189,189,189,189,189,189,
1579   189,189,189,189,189,189,189,189,189,189,
1580   189,189,189,189,189,189,189,189,189,189,
1581   189,189,189,189,189,189,189,189,189,189,
1582   189,189,189,189,189,189,189,189,189,189,
1583   189,189,189,189,189,189,189,189,189,189,
1584   189,189,189,189,189,189,189,189,189,189,
1585   189,189,189,189,189,189,189,189,189,189,
1586   189,189,189,189,189,189,189,189,189,189,
1587   189,189,189,189,189,189,189,189,189,189,
1588   189,189,189,189,189,189,189,189,189,189,
1589   189,189,189,189,189,189,189,189,189,189,
1590   189,189,189,189,189,189,189,189,189,189,
1591   189,189,189,189,189,189,189,189,189,189,
1592   189,189,189,189,189,189,189,189,189,189,
1593   189,189,189,189,189,189,189,189,189,189,
1594   189,189,189,189,189,189,189,189,189,189,
1595   189,189,189,189,189,189,189,189,189,189,
1596   189,189,189,189,189,189,189,189,189,189,
1597   189,189,189,189,189,189,189,189,189,189,
1598   189,189,189,189,189,189,189,189,189,189,
1599   189,189,189,189,189,189,189,189,189,189,
1600   189,189,189,189,189,189,189,189,189,189,
1601   189,189,189,189,189,189,189,189,189,189,
1602   189,189,189,189,189,189,189,189,189,189,
1603   189,189,189,189,189,189,189,189,189,189,
1604   189,189,189,189,189,189,189,189,189,189,
1605   189,189,189,189,189,189,189,189,189,189,
1606   189,189,189,189,189,189,189,189,189,189,
1607   189,189,189,189,189,189,189,189,189,189,
1608   189,189,189,189,189,189,189,189,189,189,
1609   189,189,189,189,189,189,189,189,189,189,
1610   189,189,189,189,189,189,189,189,189,189,
1611   189,189,189,189,189,189,189,189,189,189,
1612   189,189,189,189,189,189,189,189,189,189,
1613   189,189,189,189,189,189,189,189,189,189,
1614   189,189,189,189,189,189,189,189,189,189,
1615   189,189,189,189,189,189,189,189,189,189,
1616   189,189,189,189,189,189,189,189,189,189,
1617   189,189,189,189,189,189,189,189,189,189,
1618   189,189,189,189,189,189,189,189,189,189,
1619   189,189,189,189,189,189,189,189,189,189,
1620   189,189,189,190,190,190,190,190,190,190,
1621   190,190,190,190,190,190,190,190,190,190,
1622   190,190,190,190,190,190,190,190,190,190,
1623   190,190,190,190,190,190,190,190,190,190,
1624   190,190,190,190,190,190,190,190,190,190,
1625   190,190,190,190,190,190,190,190,190,190,
1626   190,190,190,190,190,190,190,190,190,190,
1627   190,190,190,190,190,190,190,190,190,190,
1628   190,190,190,190,190,190,190,190,190,190,
1629   190,190,190,190,190,190,190,190,190,190,
1630   190,190,190,190,190,190,190,190,190,190,
1631   190,190,190,190,190,190,190,190,190,190,
1632   190,190,190,190,190,190,190,190,190,190,
1633   190,190,190,190,190,190,190,190,190,190,
1634   190,190,190,190,190,190,190,190,190,190,
1635   190,190,190,190,190,190,190,190,190,190,
1636   190,190,190,190,190,190,190,190,190,190,
1637   190,190,190,190,190,190,190,190,190,190,
1638   190,190,190,190,190,190,190,190,190,190,
1639   190,190,190,190,190,190,190,190,190,190,
1640   190,190,190,190,190,190,190,190,190,190,
1641   190,190,190,190,190,190,190,190,190,190,
1642   190,190,190,190,190,190,190,190,190,190,
1643   190,190,190,190,190,190,190,190,190,190,
1644   190,190,190,190,190,190,190,190,190,190,
1645   190,190,190,190,190,190,190,190,190,190,
1646   190,190,190,190,190,190,190,190,190,190,
1647   190,190,190,190,190,190,190,190,190,190,
1648   190,190,190,190,190,190,190,190,190,190,
1649   190,190,190,190,190,190,190,190,190,190,
1650   190,190,190,190,190,190,190,190,190,190,
1651   190,190,190,190,190,190,190,190,190,190,
1652   190,190,190,190,190,190,190,190,190,190,
1653   190,190,190,190,190,190,190,190,190,190,
1654   190,190,190,190,190,190,190,190,190,190,
1655   190,190,190,190,190,190,190,190,190,190,
1656   190,190,190,190,190,190,190,190,190,190,
1657   190,190,190,190,190,190,190,190,190,190,
1658   190,190,190,190,190,190,190,190,190,190,
1659   190,190,190,190,190,190,190,190,190,190,
1660   190,190,190,190,190,190,190,190,190,190,
1661   190,190,190,190,190,190,190,190,190,190,
1662   190,190,190,190,190,190,190,190,190,190,
1663   190,190,190,190,190,190,190,190,190,190,
1664   190,190,190,190,190,190,190,190,190,190,
1665   190,190,190,190,190,190,190,190,190,190,
1666   190,190,190,190,190,190,190,190,190,190,
1667   190,190,190,190,190,190,190,190,190,190,
1668   190,190,190,190,190,190,190,190,190,190,
1669   190,190,190,190,190,190,190,190,190,190,
1670   190,190,190,190,190,190,190,190,190,190,
1671   190,190,190,190,190,191,191,191,191,191,
1672   191,191,191,191,191,191,191,191,191,191,
1673   191,191,191,191,191,191,191,191,191,191,
1674   191,191,191,191,191,191,191,191,191,191,
1675   191,191,191,191,191,191,191,191,191,191,
1676   191,191,191,191,191,191,191,191,191,191,
1677   191,191,191,191,191,191,191,191,191,191,
1678   191,191,191,191,191,191,191,191,191,191,
1679   191,191,191,191,191,191,191,191,191,191,
1680   191,191,191,191,191,191,191,191,191,191,
1681   191,191,191,191,191,191,191,191,191,191,
1682   191,191,191,191,191,191,191,191,191,191,
1683   191,191,191,191,191,191,191,191,191,191,
1684   191,191,191,191,191,191,191,191,191,191,
1685   191,191,191,191,191,191,191,191,191,191,
1686   191,191,191,191,191,191,191,191,191,191,
1687   191,191,191,191,191,191,191,191,191,191,
1688   191,191,191,191,191,191,191,191,191,191,
1689   191,191,191,191,191,191,191,191,191,191,
1690   191,191,191,191,191,191,191,191,191,191,
1691   191,191,191,191,191,191,191,191,191,191,
1692   191,191,191,191,191,191,191,191,191,191,
1693   191,191,191,191,191,191,191,191,191,191,
1694   191,191,191,191,191,191,191,191,191,191,
1695   191,191,191,191,191,191,191,191,191,191,
1696   191,191,191,191,191,191,191,191,191,191,
1697   191,191,191,191,191,191,191,191,191,191,
1698   191,191,191,191,191,191,191,191,191,191,
1699   191,191,191,191,191,191,191,191,191,191,
1700   191,191,191,191,191,191,191,191,191,191,
1701   191,191,191,191,191,191,191,191,191,191,
1702   191,191,191,191,191,191,191,191,191,191,
1703   191,191,191,191,191,191,191,191,191,191,
1704   191,191,191,191,191,191,191,191,191,191,
1705   191,191,191,191,191,191,191,191,191,191,
1706   191,191,191,191,191,191,191,191,191,191,
1707   191,191,191,191,191,191,191,191,191,191,
1708   191,191,191,191,191,191,191,191,191,191,
1709   191,191,191,191,191,191,191,191,191,191,
1710   191,191,191,191,191,191,191,191,191,191,
1711   191,191,191,191,191,191,191,191,191,191,
1712   191,191,191,191,191,191,191,191,191,191,
1713   191,191,191,191,191,191,191,191,191,191,
1714   191,191,191,191,191,191,191,191,191,191,
1715   191,191,191,191,191,191,191,191,191,191,
1716   191,191,191,191,191,191,191,191,191,191,
1717   191,191,191,191,191,191,191,191,191,191,
1718   191,191,191,191,191,191,191,191,191,191,
1719   191,191,191,191,191,191,191,191,191,191,
1720   191,191,191,191,191,191,191,191,191,191,
1721   191,191,191,191,191,191,191,191,191,191,
1722   191,191,191,191,191,191,191,191,191,191,
1723   191,191,191,191,191,191,191,191,191,191,
1724   191,191,191,191,191,191,191,191,191,191,
1725   191,191,191,191,191,191,191,191,191,191,
1726   191,191,191,191,191,191,191,191,191,191,
1727   191,191,191,191,191,191,191,191,191,191,
1728   191,191,191,191,191,191,191,191,191,191,
1729   191,191,191,191,191,191,191,191,191,191,
1730   191,191,191,191,191,191,191,191,191,191,
1731   191,191,191,191,191,191,191,191,191,191,
1732   191,191,191,191,191,191,191,191,191,191,
1733   191,191,191,191,191,191,191,191,191,191,
1734   191,191,191,191,191,191,191,191,191,191,
1735   191,191,191,191,191,191,191,191,191,191,
1736   191,191,191,191,191,191,191,191,191,191,
1737   191,191,191,191,191,191,191,191,191,191,
1738   191,191,191,191,191,191,191,191,191,191,
1739   191,191,191,191,191,191,191,191,191,191,
1740   191,191,191,191,191,191,191,191,191,191,
1741   191,191,191,191,191,191,191,191,191,191,
1742   191,191,191,191,191,191,191,191,191,191,
1743   191,191,191,191,191,191,191,191,191,191,
1744   191,191,191,191,191,191,191,191,191,191,
1745   191,191,191,191,191,191,191,191,191,191,
1746   191,191,191,191,191,191,191,191,191,191,
1747   191,191,191,191,191,191,191,191,191,191,
1748   191,191,191,191,191,191,191,191,191,191,
1749   191,191,191,191,191,191,191,191,191,191,
1750   191,191,191,191,191,191,191,191,191,191,
1751   191,191,191,191,191,191,191,191,191,191,
1752   191,191,191,191,191,191,191,191,191,191,
1753   191,191,191,191,191,191,191,191,191,191,
1754   191,191,191,191,191,191,191,191,191,191,
1755   191,191,191,191,191,191,191,191,191,191,
1756   191,191,191,191,191,191,191,191,191,191,
1757   191,191,191,191,191,191,191,191,191,191,
1758   191,191,191,191,191,191,191,191,191,191,
1759   191,191,191,191,191,191,191,191,191,191,
1760   191,191,191,191,191,191,191,191,191,191,
1761   191,191,191,191,191,191,191,191,191,191,
1762   191,191,191,191,191,191,191,191,191,191,
1763   191,191,191,191,191,191,191,191,191,191,
1764   191,191,191,191,191,191,191,191,191,191,
1765   191,191,191,191,191,191,191,191,191,191,
1766   191,191,191,191,191,191,191,191,191,191,
1767   191,191,191,191,191,191,191,191,191,191,
1768   191,191,191,191,191,191,191,191,191,191,
1769   191,191,191,191,191,191,191,191,191,191,
1770   191,191,191,191,191,191,191,191,191,191,
1771   191,191,191,191,191,191,191,191,191,191,
1772   191,191,191,191,191,191,191,191,191,191,
1773   191,191,191,191,191,191,191,191,191,192,
1774   192,192,192,192,192,192,192,192,192,192,
1775   192,192,192,192,192,192,192,192,192,192,
1776   192,192,192,192,192,192,192,192,192,192,
1777   192,192,192,192,192,192,192,192,192,192,
1778   192,192,192,192,192,192,192,192,192,192,
1779   192,192,192,192,192,192,192,192,192,192,
1780   192,192,192,192,192,192,192,192,192,192,
1781   192,192,192,192,192,192,192,192,192,192,
1782   192,192,192,192,192,192,192,192,192,192,
1783   192,192,192,192,192,192,192,192,192,192,
1784   192,192,192,192,192,192,192,192,192,192,
1785   192,192,192,192,192,192,192,192,192,192,
1786   192,192,192,192,192,192,192,192,192,192,
1787   192,192,192,192,192,192,192,192,192,192,
1788   192,192,192,192,192,192,192,192,192,192,
1789   192,192,192,192,192,192,192,192,192,192,
1790   192,192,192,192,192,192,192,192,192,192,
1791   192,192,192,192,192,192,192,192,192,192,
1792   192,192,192,192,192,192,192,192,192,192,
1793   192,192,192,192,192,192,192,192,192,192,
1794   192,192,192,192,192,192,192,192,192,192,
1795   192,192,192,192,192,192,192,192,192,192,
1796   192,192,192,192,192,192,192,192,192,192,
1797   192,192,192,192,192,192,192,192,192,192,
1798   192,192,192,192,192,192,192,192,192,192,
1799   192,192,192,192,192,192,192,192,192,192,
1800   192,192,192,192,192,192,192,192,192,192,
1801   192,192,192,192,192,192,192,192,192,192,
1802   192,192,192,192,192,192,192,192,192,192,
1803   192,192,192,192,192,192,192,192,192,192,
1804   192,192,192,192,192,192,192,192,192,192,
1805   192,192,192,192,192,192,192,192,192,192,
1806   192,192,192,192,192,192,192,192,192,192,
1807   192,192,192,192,192,192,192,192,192,192,
1808   192,192,192,192,192,192,192,192,192,192,
1809   192,192,192,192,192,192,192,192,192,192,
1810   192,192,192,192,192,192,192,192,192,192,
1811   192,192,192,192,192,192,192,192,192,192,
1812   192,192,192,192,192,192,192,192,192,192,
1813   192,192,192,192,192,192,192,192,192,192,
1814   192,192,192,192,192,192,192,192,192,192,
1815   192,192,192,192,192,192,192,192,192,192,
1816   192,192,192,192,192,192,192,192,192,192,
1817   192,192,192,192,192,192,192,192,192,192,
1818   192,192,192,192,192,192,192,192,192,192,
1819   192,192,192,192,192,192,192,192,192,192,
1820   192,192,192,192,192,192,192,192,192,192,
1821   192,192,192,192,192,192,192,192,192,192,
1822   192,192,192,192,192,192,192,192,192,192,
1823   192,192,192,192,192,192,192,192,192,192,
1824   192,192,192,192,192,192,192,192,192,192,
1825   192,192,192,192,192,192,192,192,192,192,
1826   192,192,192,192,192,192,192,192,192,192,
1827   192,192,192,192,192,192,192,192,192,192,
1828   192,192,192,192,192,192,192,192,192,192,
1829   192,192,192,192,192,192,192,192,192,192,
1830   192,192,192,192,192,192,192,192,192,192,
1831   192,192,192,192,192,192,192,192,192,192,
1832   192,192,192,192,192,192,192,192,192,192,
1833   192,192,192,192,192,192,192,192,192,192,
1834   192,192,192,192,192,192,192,192,192,192,
1835   192,192,192,192,192,192,192,192,192,192,
1836   192,192,192,192,192,192,192,192,192,192,
1837   192,192,192,192,192,192,192,192,192,192,
1838   192,192,192,192,192,192,192,192,192,192,
1839   192,192,192,192,192,192,192,192,192,192,
1840   192,192,192,192,192,192,192,192,192,192,
1841   192,192,192,192,192,192,192,192,192,192,
1842   192,192,192,192,192,192,192,192,192,192,
1843   192,192,192,192,192,192,192,192,192,192,
1844   192,192,192,192,192,192,192,192,192,192,
1845   192,192,192,192,192,192,192,192,192,192,
1846   192,192,192,192,192,192,192,192,192,192,
1847   192,192,192,192,192,192,192,192,192,192,
1848   192,192,192,192,192,192,192,192,192,192,
1849   192,192,192,192,192,192,192,192,192,192,
1850   192,192,192,192,192,192,192,192,192,192,
1851   192,192,192,192,192,192,192,192,192,192,
1852   192,192,192,192,192,192,192,192,192,192,
1853   192,192,192,192,192,192,192,192,192,192,
1854   192,192,192,192,192,192,192,192,192,192,
1855   192,192,192,192,192,192,192,192,192,192,
1856   192,192,192,192,192,192,192,192,192,192,
1857   192,192,192,192,192,192,192,192,192,192,
1858   192,192,192,192,192,192,192,192,192,192,
1859   192,192,192,192,192,192,192,192,192,192,
1860   192,192,192,192,192,192,192,192,192,192,
1861   192,192,192,192,192,192,192,192,192,192,
1862   192,192,192,192,192,192,192,192,192,192,
1863   192,192,192,192,192,192,192,192,192,192,
1864   192,192,192,192,192,192,192,192,192,192,
1865   192,192,192,192,192,192,192,192,192,192,
1866   192,192,192,192,192,192,192,192,192,192,
1867   192,192,192,192,192,192,192,192,192,192,
1868   192,192,192,192,192,192,192,192,192,192,
1869   192,192,192,192,192,192,192,192,192,192,
1870   192,192,192,192,192,192,192,192,192,192,
1871   192,192,192,192,192,192,192,192,192,192,
1872   192,192,192,192,192,192,192,192,192,192,
1873   192,192,192,192,192,192,192,192,192,192,
1874   192,192,192,192,192,192,192,192,192,192,
1875   192,192,192,192,192,192,192,192,192,192,
1876   192,192,192,193,193,193,193,193,193,193,
1877   193,193,193,193,193,193,193,193,193,193,
1878   193,193,193,193,193,193,193,193,193,193,
1879   193,193,193,193,193,193,193,193,193,193,
1880   193,193,193,193,193,193,193,193,193,193,
1881   193,193,193,193,193,193,193,193,193,193,
1882   193,193,193,193,193,193,193,193,193,193,
1883   193,193,193,193,193,193,193,193,193,193,
1884   193,193,193,193,193,193,193,193,193,193,
1885   193,193,193,193,193,193,193,193,193,193,
1886   193,193,193,193,193,193,193,193,193,193,
1887   193,193,193,193,193,193,193,193,193,193,
1888   193,193,193,193,193,193,193,193,193,193,
1889   193,193,193,193,193,193,193,193,193,193,
1890   193,193,193,193,193,193,193,193,193,193,
1891   193,193,193,193,193,193,193,193,193,193,
1892   193,193,193,193,193,193,193,193,193,193,
1893   193,193,193,193,193,193,193,193,193,193,
1894   193,193,193,193,193,193,193,193,193,193,
1895   193,193,193,193,193,193,193,193,193,193,
1896   193,193,193,193,193,193,193,193,193,193,
1897   193,193,193,193,193,193,193,193,193,193,
1898   193,193,193,193,193,193,193,193,193,193,
1899   193,193,193,193,193,193,193,193,193,193,
1900   193,193,193,193,193,193,193,193,193,193,
1901   193,193,193,193,193,193,193,193,193,193,
1902   193,193,193,193,193,193,193,193,193,193,
1903   193,193,193,193,193,193,193,193,193,193,
1904   193,193,193,193,193,193,193,193,193,193,
1905   193,193,193,193,193,193,193,193,193,193,
1906   193,193,193,193,193,193,193,193,193,193,
1907   193,193,193,193,193,193,193,193,193,193,
1908   193,193,193,193,193,193,193,193,193,193,
1909   193,193,193,193,193,193,193,193,193,193,
1910   193,193,193,193,193,193,193,193,193,193,
1911   193,193,193,193,193,193,193,193,193,193,
1912   193,193,193,193,193,193,193,193,193,193,
1913   193,193,193,193,193,193,193,193,193,193,
1914   193,193,193,193,193,193,193,193,193,193,
1915   193,193,193,193,193,193,193,193,193,193,
1916   193,193,193,193,193,193,193,193,193,193,
1917   193,193,193,193,193,193,193,193,193,193,
1918   193,193,193,193,193,193,193,193,193,193,
1919   193,193,193,193,193,193,193,193,193,193,
1920   193,193,193,193,193,193,193,193,193,193,
1921   193,193,193,193,193,193,193,193,193,193,
1922   193,193,193,193,193,193,193,193,193,193,
1923   193,193,193,193,193,193,193,193,193,193,
1924   193,193,193,193,193,193,193,193,193,193,
1925   193,193,193,193,193,193,193,193,193,193,
1926   193,193,193,193,193,193,193,193,193,193,
1927   193,193,193,193,193,193,193,193,193,193,
1928   193,193,193,193,193,193,193,193,193,193,
1929   193,193,193,193,193,193,193,193,193,193,
1930   193,193,193,193,193,193,193,193,193,193,
1931   193,193,193,193,193,193,193,193,193,193,
1932   193,193,193,193,193,193,193,193,193,193,
1933   193,193,193,193,193,193,193,193,193,193,
1934   193,193,193,193,193,193,193,193,193,193,
1935   193,193,193,193,193,193,193,193,193,193,
1936   193,193,193,193,193,193,193,193,193,193,
1937   193,193,193,193,193,193,193,193,193,193,
1938   193,193,193,193,193,193,193,193,193,193,
1939   193,193,193,193,193,193,193,193,193,193,
1940   193,193,193,193,193,193,193,193,193,193,
1941   193,193,193,193,193,193,193,193,193,193,
1942   193,193,193,193,193,193,193,193,193,193,
1943   193,193,193,193,193,193,193,193,193,193,
1944   193,193,193,193,193,193,193,193,193,193,
1945   193,193,193,193,193,193,193,193,193,193,
1946   193,193,193,193,193,193,193,193,193,193,
1947   193,193,193,193,193,193,193,193,193,193,
1948   193,193,193,193,193,193,193,193,193,193,
1949   193,193,193,193,193,193,193,193,193,193,
1950   193,193,193,193,193,193,193,193,193,193,
1951   193,193,193,193,193,193,193,193,193,193,
1952   193,193,193,193,193,193,193,193,193,193,
1953   193,193,193,193,193,193,193,193,193,193,
1954   193,193,193,193,193,193,193,193,193,193,
1955   193,193,193,193,193,193,193,193,193,193,
1956   193,193,193,193,193,193,193,193,193,193,
1957   193,193,193,193,193,193,193,193,193,193,
1958   193,193,193,193,193,193,193,193,193,193,
1959   193,193,193,193,193,193,193,193,193,193,
1960   193,193,193,193,193,193,193,193,193,193,
1961   193,193,193,193,193,193,193,193,193,193,
1962   193,193,193,193,193,193,193,193,193,193,
1963   193,193,193,193,193,193,193,193,193,193,
1964   193,193,193,193,193,193,193,193,193,193,
1965   193,193,193,193,193,193,193,193,193,193,
1966   193,193,193,193,193,193,193,193,193,193,
1967   193,193,193,193,193,193,193,193,193,193,
1968   193,193,193,193,193,193,193,193,193,193,
1969   193,193,193,193,193,193,193,193,193,193,
1970   193,193,193,193,193,193,193,193,193,193,
1971   193,193,193,193,193,193,193,193,193,193,
1972   193,193,193,193,193,193,193,193,193,193,
1973   193,193,193,193,193,193,193,193,193,193,
1974   193,193,193,193,193,193,193,193,193,193,
1975   193,193,193,193,193,193,193,193,193,193,
1976   193,193,193,193,193,193,193,193,193,193,
1977   193,193,193,193,193,193,193,193,193,193,
1978   193,193,193,193,193,193,193,193,193,193,
1979   193,193,193,193,193,193,193,193,193,193,
1980   193,193,193,193,193,193,193,193,193,193,
1981   193,193,193,193,193,193,193,193,193,193,
1982   193,193,193,193,193,193,193,193,193,193,
1983   193,193,193,193,193,193,193,193,193,193,
1984   193,193,193,193,193,193,193,193,193,193,
1985   193,193,193,193,193,193,193,193,193,193,
1986   193,193,193,193,193,193,193,193,193,193,
1987   193,193,193,193,193,193,193,193,193,193,
1988   193,193,193,193,193,193,193,193,193,193,
1989   193,193,193,193,193,193,193,193,193,193,
1990   193,193,193,193,193,193,193,193,193,193,
1991   193,193,193,193,193,193,193,193,193,193,
1992   193,193,193,193,193,193,193,193,193,193,
1993   193,193,193,193,193,193,193,193,193,193,
1994   193,193,193,193,193,193,193,193,193,193,
1995   193,193,193,193,193,193,193,193,193,193,
1996   193,193,193,193,193,193,193,193,193,193,
1997   193,193,193,193,193,193,193,193,193,193,
1998   193,193,193,193,193,193,193,193,193,193,
1999   193,193,193,193,193,193,193,193,193,193,
2000   193,193,193,193,193,193,193,193,193,193,
2001   193,193,193,193,193,193,193,193,193,193,
2002   193,193,193,193,193,193,193,193,193,193,
2003   193,193,193,193,193,193,193,193,193,193,
2004   193,193,193,193,193,193,193,193,193,193,
2005   193,193,193,193,193,193,193,193,193,193,
2006   193,193,193,193,193,193,193,193,193,193,
2007   193,193,193,193,193,193,193,193,193,193,
2008   193,193,193,193,193,193,193,193,193,193,
2009   193,193,193,193,193,193,193,193,193,193,
2010   193,193,193,193,193,193,193,193,193,193,
2011   193,193,193,193,193,193,193,193,193,193,
2012   193,193,193,193,193,193,193,193,193,193,
2013   193,193,193,193,193,193,193,193,193,193,
2014   193,193,193,193,193,193,193,193,193,193,
2015   193,193,193,193,193,193,193,193,193,193,
2016   193,193,193,193,193,193,193,193,193,193,
2017   193,193,193,193,193,193,193,193,193,193,
2018   193,193,193,193,193,193,193,193,193,193,
2019   193,193,193,193,193,193,193,193,193,193,
2020   193,193,193,193,193,193,193,193,193,193,
2021   193,193,193,193,193,193,193,193,193,193,
2022   193,193,193,193,193,193,193,193,193,193,
2023   193,193,193,193,193,193,193,193,193,193,
2024   193,193,193,193,193,193,193,193,193,193,
2025   193,193,193,193,193,193,193,193,193,193,
2026   193,193,193,193,193,193,193,193,193,193,
2027   193,193,193,193,193,193,193,193,193,193,
2028   193,193,193,193,193,193,193,193,193,193,
2029   193,193,193,193,193,193,193,193,193,193,
2030   193,193,193,193,193,193,193,193,193,193,
2031   193,193,193,193,193,193,193,193,193,193,
2032   193,193,193,193,193,193,193,193,193,193,
2033   193,193,193,193,193,193,193,193,193,193,
2034   193,193,193,193,193,193,193,193,193,193,
2035   193,193,193,193,193,193,193,193,193,193,
2036   193,193,193,193,193,193,193,193,193,193,
2037   193,193,193,193,193,193,193,193,193,193,
2038   193,193,193,193,193,193,193,193,193,193,
2039   193,193,193,193,193,193,193,193,193,193,
2040   193,193,193,193,193,193,193,193,193,193,
2041   193,193,193,193,193,193,193,193,193,193,
2042   193,193,193,193,193,193,193,193,193,193,
2043   193,193,193,193,193,193,193,193,193,193,
2044   193,193,193,193,193,193,193,193,193,193,
2045   193,193,193,193,193,193,193,193,193,193,
2046   193,193,193,193,193,193,193,193,193,193,
2047   193,193,193,193,193,193,193,193,193,193,
2048   193,193,193,193,193,193,193,193,193,193,
2049   193,193,193,193,193,193,193,193,193,193,
2050   193,193,193,193,193,193,193,193,193,193,
2051   193,193,193,193,193,193,193,193,193,193,
2052   193,193,193,193,193,193,193,193,193,193,
2053   193,193,193,193,193,193,193,193,193,193,
2054   193,193,193,193,193,193,193,193,193,193,
2055   193,193,193,193,193,193,193,193,193,193,
2056   193,193,193,193,193,193,193,193,193,193,
2057   193,193,193,193,193,193,193,193,193,193,
2058   193,193,193,193,193,193,193,193,193,193,
2059   193,193,193,193,193,193,193,193,193,193,
2060   193,193,193,193,193,193,193,193,193,193,
2061   193,193,193,193,193,193,193,193,193,193,
2062   193,193,193,193,193,193,193,193,193,193,
2063   193,193,193,193,193,193,193,193,193,193,
2064   193,193,193,193,193,193,193,193,193,193,
2065   193,193,193,193,193,193,193,193,193,193,
2066   193,193,193,193,193,193,193,193,193,193,
2067   193,193,193,193,193,193,193,193,193,193,
2068   193,193,193,193,193,193,193,193,193,193,
2069   193,193,193,193,193,193,193,193,193,193,
2070   193,193,193,193,193,193,193,193,193,193,
2071   193,193,193,193,193,193,193,193,193,193,
2072   193,193,193,193,193,193,193,193,193,193,
2073   193,193,193,193,193,193,193,193,193,193,
2074   193,193,193,193,193,193,193,193,193,193,
2075   193,193,193,193,193,193,193,193,193,193,
2076   193,193,193,193,193,193,193,193,193,193,
2077   193,193,193,193,193,193,193,193,193,193,
2078   193,193,193,193,193,193,193,193,193,193,
2079   193,193,193,193,193,193,193,193,193,193,
2080   193,193,193,193,193,193,193,193,193,193,
2081   193,194};
2082 treal c0_1[768] = {
2083   4.758132187241876e-10,-1.277407818568957e-07,7.842343643041684e-06,-3.249730423203469e-05,-6.659405609327934e-08,1.636513989427078e-07,1.51730024076664e-05,0.0002928390839064367,1.3652402880314968e-06,-4.934196472261609e-06,
2084   -0.00010655714626325138,-0.00031986944119434904,-8.036914681457448e-05,4.732112257809819e-05,0.00043423711699868344,0.0003528011907137261,0.001031708537008783,-0.0007217221450096626,-0.0017168518954382972,-0.0003887246361204182,
2085   -0.011789414681082473,0.004214428952438226,0.0038533674452996126,-0.0007775134306049452,-0.10092424815904007,-0.052191358272135085,-0.07266093345089891,-0.03173443910946691,-0.18705435381703153,-0.17290794644579432,
2086   -0.16240884029350022,-0.07539774672947357,-0.3823221169606225,-0.3966456884425172,-0.38949193426340206,-0.17949243495638517,-0.5000679827535931,-0.6252955044415826,-0.593217758944445,-0.2759304445750457,
2087   -0.7443466542453533,-0.9243638742042699,-0.9021451581799735,-0.423001208804493,-0.9513162022909202,-1.3695244285706374,-1.3594359391593827,-0.6454778178096151,-1.0673903359450871,-1.6539943362233507,
2088   -1.6608079056117337,-0.7955295374202644,-1.216663740339414,-1.973173626520795,-2.022349151630617,-0.9785620193218263,-1.3536298863545688,-2.3369898014427184,-2.4519685881432873,-1.2009504160162128,
2089   -1.4738143026995427,-2.741762649671241,-2.958197830421928,-1.4699117749153536,-1.562815057862952,-3.1824739689744574,-3.54870147150378,-1.793472544837961,-1.6084985603056616,-3.6497989804878825,
2090   -4.229714454817882,-2.1803590302130664,-1.5923057425051776,-4.130784625227007,-5.00525116016424,-2.639814348749391,-1.5353024599628842,-4.606928168703397,-5.876190582689012,-3.1813346835435867,
2091   -1.4872167535380243,-4.836477159855271,-6.346830564655231,-3.485824828023705,-1.4124784494678153,-5.05883667161364,-6.83999274092102,-3.8143349116087966,-1.324190681413058,-5.270021771328088,
2092   -7.354761892745586,-4.167966237668229,-1.2201526402987273,-5.4680066263894345,-7.889923237157122,-4.547766221100498,-1.1028492821842337,-5.650436352737062,-8.444043665236556,-4.9547164302671085,
2093   -0.9740272918787632,-5.81532760167317,-9.01547385942861,-5.389721468813564,-0.8360551749729735,-5.960958178081245,-9.602379825462982,-5.853599031711619,-0.69144153101802,-6.085960011249016,
2094   -10.202773556549424,-6.347071426983463,-0.5428328314153126,-6.189340100856591,-10.814549374952538,-6.870758796956554,-0.3928779618852645,-6.270501130728513,-11.435522344819686,-7.425174202459737,
2095   -0.24413338870808318,-6.329241829807929,-12.063467730346302,-8.010720655868898,-0.09897088159728572,-6.365743154169634,-12.69615978327045,-8.627690109823265,0.04049532423209753,-6.380540672324211,
2096   -13.331408465448215,-9.27626433328757,0.17246210672753484,-6.374486060242061,-13.967092876159606,-9.956517540185265,0.29546987712551875,-6.348700585624777,-14.601190442156671,-10.668420581708274,
2097   0.40841482060540657,-6.304523744918373,-15.231801229637322,-11.41184647384948,0.5105430853054584,-6.243460070179188,-15.857167045355334,-12.186577007501413,0.6014300835524821,-6.167126804762385,
2098   -16.475685278957762,-12.992310179113149,0.6809486620060904,-6.077204673763392,-17.08591768408543,-13.828668183819053,0.7492295828039622,-5.97539341346391,-17.686594489650922,-14.69520572786125,
2099   0.8066190487374586,-5.8633732093941875,-18.276614372948107,-15.591418440346017,0.8536317621973758,-5.742772484970126,-18.855040905564877,-16.516751193136336,0.8909188387291441,-5.615142708468424,
2100   -19.421096138378747,-17.47060616941952,0.919189347906291,-5.4819379973697275,-19.97415191450633,-18.452350553961754,0.9393216829518062,-5.344506453428517,-20.51371973393187,-19.461323749469692,
2101   0.9517882073269205,-5.204064846441286,-21.03943892458501,-20.496844052518632,0.9586669931621209,-5.061759321321873,-21.551066577225633,-21.558214748292713,0.9568019924633494,-4.918425322406581,
2102   -22.048458540963445,-22.64472960545432,0.9390996294140703,-4.632315011468424,-23.000437218592587,-24.89034807690646,0.9074117420140406,-4.35149819765534,-23.895906922501812,-27.228030826813868,
2103   0.8668130679370982,-4.080156940319346,-24.7363397714617,-29.65221171452345,0.8206147406307873,-3.820955811615341,-25.523890328428188,-32.15750785854976,0.7715526841311134,-3.5755692630382034,
2104   -26.261145652462595,-34.73877432966058,0.7216089208322907,-3.3448536289772783,-26.950945060997334,-37.39113799281977,0.6722170809183882,-3.1290725641996744,-27.59623950739642,-40.11001526963585,
2105   0.624359607369657,-2.928061028318213,-28.199989774501496,-42.89111792041162,0.57867743706858,-2.7413602032688615,-28.76509446149904,-45.730450211511304,0.5355531113256744,-2.568319613097924,
2106   -29.29434159769127,-48.624300136579166,0.4951858346738723,-2.408174391398717,-29.79037813685116,-51.56922674710293,0.45762467013713537,-2.2601001040887962,-30.255692617788498,-54.562045135640396,
2107   0.42288693506746533,-2.1232576458819254,-30.692607764522457,-57.59981020252892,0.39070120887578375,-1.996802733123713,-31.103278507757565,-60.67980001382201,0.361604477451065,-1.8799722444375744,
2108   -31.489699558648727,-63.799499310830555,0.3329489110164922,-1.7718424847850052,-31.85369749339958,-66.95658354589249,0.31387788500953867,-1.67228153360826,-32.196993668774795,-70.14890368197416,
2109   0.2769571725739628,-1.5784233477097496,-32.52101061679124,-73.37447189440188,0.2370414298576837,-1.4127876082655146,-33.11731392958875,-79.91812832962906,0.2053914303716691,-1.2710236952803367,
2110   -33.65233656583274,-86.57439258604857,0.17827157083626777,-1.148188236176871,-34.134610838800846,-93.33193145856792,0.1555294279964258,-1.0415719561833863,-34.57114349268408,-100.18094581409619,
2111   0.13624319417159467,-0.9485567380826627,-34.967879246447495,-107.11292686455853,0.11986609364233064,-0.8670757567412967,-35.32982886732716,-114.12045416837498,0.10588933926891464,-0.795389189210945,
2112   -35.66124426038084,-121.19702838329417,0.09392616261924326,-0.732061495452141,-35.96574431631303,-128.3369326803239,0.08360125461384792,-0.6758884443843154,-36.246421682682126,-135.5351176770351,
2113   0.07481172149803667,-0.6258902605577801,-36.50593362139564,-142.78710563173624,0.06671196217014098,-0.5811487046909998,-36.74655902169238,-150.08891041047778,0.06144571340761554,-0.5412512538283535,
2114   -36.97031148295289,-157.43697038737002,0.05205463381114172,-0.5045033116055148,-37.178784546511196,-164.82809197337897,0.0425475829025917,-0.4422401993511847,-37.55625460814311,-179.72830677001144,
2115   0.035583294235618006,-0.39134857383277627,-37.88860946661102,-194.76972517071823,0.029938266180490333,-0.3487870095461223,-38.183704200338525,-209.93600608474796,0.025448839154870645,-0.3129775245604282,
2116   -38.447552113299224,-225.2135343358435,0.02180602146999261,-0.28253789194691503,-38.68498626348911,-240.59085180326693,0.01882159126876444,-0.25645547308806066,-38.89988486734999,-256.05822718268286,
2117   0.016389229604109032,-0.23394276357167235,-39.095408417787716,-271.6073263844652,0.014251730784279671,-0.21433942823163535,-39.27414014883227,-287.2309569721039,0.01288740242120183,-0.19729277842021803,
2118   -39.438259398255525,-302.92286778557286,0.010593037750441023,-0.1818780165657937,-39.58943616545382,-318.6775901946797,0.008378973144853608,-0.1565371218065303,-39.85929084448825,-350.35677050913574,
2119   0.006851161526608891,-0.13649276043855635,-40.09295499202336,-382.23614429322754,0.005664009912174691,-0.12010326317491435,-40.29756651716601,-414.28987284372425,0.0047596828494130715,-0.10655369576268947,
2120   -40.47830441559222,-446.4969406374878,0.004052674412552565,-0.09516747917251202,-40.639158339498834,-478.8399730620576,0.0034945094504017136,-0.0854725835059901,-40.78320203201602,-511.30439002885726,
2121   0.003053968967146449,-0.07711294217324828,-40.91284890614476,-543.8777869089324,0.002684662635651774,-0.06980717134360194,-41.030004067310074,-576.5494729676333,0.0023932127670595366,-0.06338486313353768,
2122   -41.13621235895637,-609.3101212165715,0.0015596372184436913,-0.051934672112731325,-41.32012562193839,-675.0662553138166,0.0028810043990807857,-0.04447267612134229,-41.4738774554964,-741.0899553833864,
2123   -0.0031306627025035646,-0.030688673647634238,-41.59374586336524,-807.3345221460247,0.008388011487938994,-0.045667152142642144,-41.715519238871714,-873.7595832397402,-0.19930101332082575,0.034596780211041595,
2124   -41.750829617464845,-1007.0090210893836,2.433625142411732,-0.44217542838109075,-42.07583577945931,-1040.380489140858,48.971722589839835,2.4687100074225015,-41.26784911401392,-1057.0723247039582,
2125   -43.20498994073569,17.11261218125022,-39.31606312133157,-1061.1127104170844,-0.7968980419427997,4.193122878976662,-37.192394716630716,-1064.9043421337747,-2.14365943913158,3.716533682126714,
2126   -35.61559037889096,-1072.1583871741286,-0.6441709722819802,2.4345065260242746,-34.389369391051865,-1079.127703293355,-0.5868080515311245,2.049256581670718,-33.49552310796814,-1085.8916396158936,
2127   -0.3875586308209203,1.6983128432440453,-32.74843836673607,-1092.4922418829885,-0.25912851530469183,1.4665313017247528,-32.11752096374823,-1098.9562798141626,-0.16048282422165924,1.1565848732233068,
2128   -31.0716750585307,-1111.5449485499355,-0.11489892294922227,0.9646296260563116,-30.22593916648484,-1123.7596531036963,-0.0846634234717707,0.8271977777516207,-29.511531100602596,-1135.6647846865267,
2129   -0.06545837616447249,0.7259309384038725,-28.8922930647199,-1147.3050096666695,-0.05191907988992061,0.6476354645004063,-28.344647172501556,-1158.7132228313324,-0.04212521232173599,0.5855344897619047,
2130   -27.852977852088003,-1169.914675687671,-0.034826883286433616,0.5351480662776548,-27.4061576641465,-1180.9293493299783,-0.028909545824213956,0.4934912533337983,-26.996035447435045,-1191.7734212375267,
2131   -0.02526236103962193,0.4589122319270726,-26.61630873357926,-1202.4602228522433,-0.019520877469643566,0.428695647810353,-26.262416261973208,-1213.0008917346343,-0.014146475223449013,0.3819973811543961,
2132   -25.615963777078623,-1233.6800405563704,-0.010428608822282597,0.34815587616806454,-25.033734288621403,-1253.870671945005,-0.007361956267790338,0.3232083318585971,-24.498383613283366,-1273.6166626304837,
2133   -0.004745205058638106,0.305596900331639,-23.996969773098773,-1292.9500690089515,-0.002320590723947715,0.29424531782669927,-23.51865124978753,-1311.893515947133,6.998293164097783e-05,0.28869395034361506,
2134   -23.053811261052765,-1330.4615368615189,0.002564141393466003,0.2888613650312088,-22.59326447521829,-1348.661208778152,0.0052742266236749874,0.2949953597105903,-22.12769289997762,-1366.4922662715633,
2135   0.008288885683037095,0.30761247908236716,-21.647169050769094,-1383.946799155879,0.011655771958827514,0.327441331269424,-21.14077254916363,-1401.0086076005714,0.015347815312938098,0.3553245218616905,
2136   -20.596330119553233,-1417.65229633277,0.019208550271511072,0.39203989867733363,-20.00037632506185,-1433.8422409694233,0.02288213382428557,0.4379910094328972,-19.338503675469234,-1449.5316644236761,
2137   0.02575399262336515,0.49273014647453195,-18.596339894008523,-1464.6622247985301,0.02699035030290703,0.5543394064502524,-17.76139905923897,-1479.164715930211,0.02674548419601983,0.5866228572721445,
2138   -17.306493278504565,-1486.1564189985259,0.02610752961738128,0.6186134210869795,-16.82596121569326,-1492.9616330814902,0.02458558314876305,0.6498409205089875,-16.320223882446932,-1499.5702123602714,
2139   0.022238045617284232,0.6792480032479301,-15.790311322013478,-1505.9722847297862,0.019039954330748825,0.7058471708764904,-15.238068867016892,-1512.1585531470448,0.015065685132781413,0.72862106682039,
2140   -14.666141193020682,-1518.120614869245,0.010444388317418436,0.7466412962588302,-14.077948753706217,-1523.8512786050258,0.005364981759812201,0.7591339424388913,-13.477590720535563,-1529.344856206654,
2141   5.626542738983064e-05,0.765551055327737,-12.869693298038676,-1534.5974049326608,-0.00523541868359845,0.7656183550158747,-12.259210516797047,-1539.6068991294126,-0.010272151508455337,0.7593562139281482,
2142   -11.651197641224528,-1544.3733163208788,-0.014847987524013714,0.747069582063925,-11.05058022850793,-1548.8986312654881,-0.018805983820875314,0.7293097430971838,-10.461942452372023,-1553.1867210301098,
2143   -0.02204823059374292,0.7068157018185445,-9.889354043864518,-1557.2431928266783,-0.024531787744151757,0.6804435739989891,-9.336248753696605,-1561.0751528025348,-0.026278125446918002,0.6511008365271409,
2144   -8.805357181808215,-1564.6909373402355,-0.02730153682087663,0.6196692855825904,-8.298696538496241,-1568.0998286265044,-0.027770088184381175,0.5870136211904199,-7.817587699704714,-1571.311773848647,
2145   -0.02682844206244422,0.5205814136674581,-6.934383407871695,-1577.1863978333915,-0.02467025269423413,0.4564018324296692,-6.155329901088271,-1582.3985123476052,-0.022015597233066158,0.3973851186279088,
2146   -5.474514011026212,-1587.0291187958235,-0.019242302436464593,0.3447189292223032,-4.882754875764231,-1591.153017984893,-0.016602655309313468,0.2986870758053675,-4.369698273714283,-1594.8371262269575,
2147   -0.01420543131965738,0.25896984352229346,-3.925018612809365,-1598.1400507581184,-0.012130710582860318,0.22498730248335558,-3.5391076842087386,-1601.1124235593193,-0.010244457455243031,0.19596795340923867,
2148   -3.2034349184656947,-1603.7976243131725,-0.009023080299305116,0.17146093999580522,-2.910444461316857,-1606.2326529675643,-0.006977522343578057,0.14987573151681596,-2.6542082752818588,-1608.4490126154064,
2149   -0.005051171062352146,0.11649217081315302,-2.229400891462962,-1612.3290864112505,-0.0037917873941223728,0.09232512877711892,-1.8963760413998256,-1615.608766235762,-0.002865646205514306,0.0741835366167481,
2150   -1.6308256131747267,-1618.413692025501,-0.0022096286505687637,0.060473014550837936,-1.416073397479023,-1620.8374993681507,-0.001707876074498925,0.04990117134395709,-1.2400470491804012,-1622.9510275607652,
2151   -0.0014083409577640446,0.041729934936546156,-1.0939124353813559,-1624.8086799025677,-0.0009903018095198516,0.03499180734054603,-0.9715554909684919,-1626.4528426366505,-0.0006461640125836153,0.02551572143349606,
2152   -0.7785589266301509,-1629.2278825654937,-0.00045485040217716123,0.019332651146817235,-0.6355092599268627,-1631.472574814074,-0.0003218345015424164,0.01498023914024238,-0.5260638723511945,-1633.3176884022605,
2153   -0.00024912556479836443,0.0119006412286247,-0.440323838628202,-1634.853675668811,-0.00016019485748280127,0.009516786901612763,-0.372010190230245,-1636.1451556128413,-9.450151686048652e-05,0.006451013989189905,
2154   -0.2701474708495888,-1638.1726066976096,-6.24634070532337e-05,0.004642465355817846,-0.19937930551465466,-1639.6579564272442,-4.1724745556267604e-05,0.003447054814115491,-0.1477741703661629,-1640.7571393392832,
2155   -3.099778109578605e-05,0.0026485360806544323,-0.10888882422367227,-1641.570383108307,-1.8922451071226797e-05,0.0020553075643215844,-0.07888179266714404,-1642.1652781348098,-1.0407470208263524e-05,0.0013310403956699026,
2156   -0.03567701896877518,-1642.876428999755,-7.0151441709385675e-06,0.0009326887787365337,-0.006795194699637968,-1643.1365629417298,-3.6965334785274006e-06,0.0006641802970792673,0.013578484515157922,-1643.0860059641059,
2157   -1.7553825060999973e-06,0.0003812066139933353,0.040253655202721984,-1642.3684795110685,-1.0198267500457514e-06,0.00024683016214699296,0.05627928937143526,-1641.1222799119394,-6.51456320227278e-07,0.00016876130838269098,
2158   0.06688394999541464,-1639.5424277680972,-3.360576856798921e-07,0.00011889161414749654,0.07422399866638607,-1637.7366879361261,-1.653971536144579e-07,6.744044693985803e-05,0.08373328079231387,-1633.6837531836497,
2159   -7.256835212030929e-08,4.2117780716443815e-05,0.08932448227380227,-1629.2568407564909,-2.479725332251944e-08,1.989703363624556e-05,0.09565421814668884,-1619.778043861927};
2160 maptype *map_1[2] = {a0_1};
2161 treal *t_1[2] = {t0_1};
2162 treal *c_1[1] = {c0_1};
2163 splinecoeffs<maptype> sc[2] = {
2164 	{x0_0, xe_0, hi_0, k_0, n_0, nmap_0, map_0, t_0, c_0, splinedata<unsigned char>::splev_pp<4>},
2165 	{x0_1, xe_1, hi_1, k_1, n_1, nmap_1, map_1, t_1, c_1, splinedata<unsigned char>::splev_pp<4>},
2166 };
2167 splinedata<maptype> sd = {
2168 	sc,
2169 	2, /* number of calculated values */
2170 	2, /* number of input values */
2171 	2, /* number of output values */
2172 	0, /* number of state values */
2173 	"nonlin_1",
2174 };
2175 }; /* ! namespace nonlin_1 */
2176 } // namespace AmpData
2177 
2178 // nonlin_1: 18904 bytes
2179 // data size sum: 18920 bytes
2180 #ifndef NO_INTPP_INCLUDES
2181 #include "intpp.h"
2182 #endif
2183 namespace AmpData {
2184 namespace nonlin_2 {
2185 typedef unsigned char maptype;
2186 real x0_0[1] = {-4.75089365365};
2187 real xe_0[1] = {11.2145908347};
2188 real hi_0[1] = {28.1858029632};
2189 int k_0[1] = {4};
2190 int nmap_0[1] = {451};
2191 int n_0[1] = {61};
2192 treal t0_0[65] = {
2193   -22.880588261487706,-22.880588261487706,-22.880588261487706,-22.880588261487706,-4.7154147992349715,-4.431583963887272,-4.1477531285395735,-3.863922293191875,-3.7220068755180256,-3.580091457844176,
2194   -3.438176040170326,-3.2962606224964768,-3.1543452048226275,-3.012429787148778,-2.870514369474929,-2.728598951801079,-2.5866835341272294,-2.44476811645338,-2.302852698779531,-2.160937281105681,
2195   -2.0190218634318313,-1.877106445757982,-1.7351910280841325,-1.593275610410283,-1.4513601927364337,-1.3094447750625842,-1.0256139397148851,-0.7417831043671862,-0.4579522690194872,-0.17412143367178823,
2196   -0.13864257925332585,-0.10316372483486348,-0.032206015997938736,0.10970940167591076,0.2516248193497602,0.39354023702360974,0.6773710723713087,0.9612019077190077,1.2450327430667065,1.5288635784144056,
2197   1.8126944137621046,2.0965252491098036,2.3803560844575027,2.6641869198052017,2.9480177551529003,3.2318485905005994,3.5156794258482984,3.799510261195997,4.0833410965436965,4.367171931891395,
2198   4.651002767239094,4.934833602586793,5.218664437934493,5.502495273282191,6.070156943977589,6.637818614672987,7.2054802853683855,7.7731419560637836,8.90846529745458,10.043788638845376,
2199   11.179111980236172,13.449758663017763,13.449758663017763,13.449758663017763,13.449758663017763};
2200 maptype a0_0[450] = {
2201   3,4,4,4,4,4,4,4,4,5,
2202   5,5,5,5,5,5,5,6,6,6,
2203   6,6,6,6,6,7,7,7,7,8,
2204   8,8,8,9,9,9,9,10,10,10,
2205   10,11,11,11,11,12,12,12,12,13,
2206   13,13,13,14,14,14,14,15,15,15,
2207   15,16,16,16,16,17,17,17,17,18,
2208   18,18,18,19,19,19,19,20,20,20,
2209   20,21,21,21,21,22,22,22,22,23,
2210   23,23,23,24,24,24,24,25,25,25,
2211   25,25,25,25,25,26,26,26,26,26,
2212   26,26,26,27,27,27,27,27,27,27,
2213   27,28,28,28,28,28,28,28,28,29,
2214   30,31,31,32,32,32,32,33,33,33,
2215   33,34,34,34,34,35,35,35,35,35,
2216   35,35,35,36,36,36,36,36,36,36,
2217   36,37,37,37,37,37,37,37,37,38,
2218   38,38,38,38,38,38,38,39,39,39,
2219   39,39,39,39,39,40,40,40,40,40,
2220   40,40,40,41,41,41,41,41,41,41,
2221   41,42,42,42,42,42,42,42,42,43,
2222   43,43,43,43,43,43,43,44,44,44,
2223   44,44,44,44,44,45,45,45,45,45,
2224   45,45,45,46,46,46,46,46,46,46,
2225   46,47,47,47,47,47,47,47,47,48,
2226   48,48,48,48,48,48,48,49,49,49,
2227   49,49,49,49,49,50,50,50,50,50,
2228   50,50,50,51,51,51,51,51,51,51,
2229   51,52,52,52,52,52,52,52,52,53,
2230   53,53,53,53,53,53,53,53,53,53,
2231   53,53,53,53,53,54,54,54,54,54,
2232   54,54,54,54,54,54,54,54,54,54,
2233   54,55,55,55,55,55,55,55,55,55,
2234   55,55,55,55,55,55,55,56,56,56,
2235   56,56,56,56,56,56,56,56,56,56,
2236   56,56,56,57,57,57,57,57,57,57,
2237   57,57,57,57,57,57,57,57,57,57,
2238   57,57,57,57,57,57,57,57,57,57,
2239   57,57,57,57,57,58,58,58,58,58,
2240   58,58,58,58,58,58,58,58,58,58,
2241   58,58,58,58,58,58,58,58,58,58,
2242   58,58,58,58,58,58,58,59,59,59,
2243   59,59,59,59,59,59,59,59,59,59,
2244   59,59,59,59,59,59,59,59,59,59,
2245   59,59,59,59,59,59,59,59,59,60,
2246 };
2247 treal c0_0[232] = {
2248   -0.000195288986670558,0.003874285259094822,-0.017419511850232897,0.0036391123722735786,-3.911625052543035,-0.006768089695319922,-0.06998597140009832,-0.20494510361710774,2.588056268956672,-3.3374875083861553,
2249   -1.019188831419784,-0.3147953728737259,-5.798723652671069,-1.1337769901516943,-2.2882715691002904,-0.8137634627107487,0.9229005861632151,-6.071346725015958,-4.333307851959838,-1.687172615767033,
2250   -6.274847934791513,-5.678425258545579,-6.000781650579467,-2.421774835240409,-2.106813393550019,-8.349918255063072,-7.991619879585479,-3.4056762837898646,-3.3440645061788614,-9.246886163182607,
2251   -10.488877728325859,-4.713999232062049,-1.8868443463090936,-10.67060909655061,-13.315477387127812,-6.398322771457918,-1.1830725989690192,-11.473926007026598,-16.45812833554519,-8.508293152161304,
2252   -0.21480164803790938,-11.977614733090123,-19.786263534774147,-11.078421443503954,0.5105725124286403,-12.069065729885116,-23.19885823634687,-14.12824022816317,1.072007089991766,-11.851691395822824,
2253   -26.59358247491643,-17.66212739109876,1.433794036344243,-11.395288394046295,-29.89268732145125,-21.671795668253864,1.6406125018892979,-10.784855955468093,-33.040391770878855,-26.13943178747002,
2254   1.7298676376958875,-10.086371330128417,-36.00234070848012,-31.04089047444895,1.7406621878272723,-9.349886665156154,-38.76064537989763,-36.34837280486629,1.7023663565404792,-8.6088062609124,
2255   -41.30926078737706,-42.03243745141675,1.6376973693433978,-7.884030163345347,-43.649848557152076,-48.06337402537929,1.5564891502040463,-7.186786644764148,-45.788629819161,-54.41206394524746,
2256   1.4834493612964401,-6.524117221196081,-47.73441846798475,-61.05046953394228,1.3631880314284788,-5.8925442140769135,-49.4965341616863,-67.95187513913834,1.3470273913985873,-5.312172017532418,
2257   -51.08665614561209,-75.0909759854829,0.8760266374453151,-4.165188288321739,-53.77662323811381,-89.9880922351998,1.8727369637506195,-3.41925817144292,-55.9293230124387,-105.56707276661317,
2258   -2.5246570414261105,-1.8246366810193646,-57.41770206888857,-121.67417360920557,1327.3238267799318,-3.9743632321226343,-59.0636370584169,-138.17580786122895,-1031.7622219061657,137.3014232173221,
2259   -54.333345707160404,-140.21704384450825,-33.59275323989736,27.484198220887777,-48.48694063389831,-142.01797810730113,-25.732235422049598,20.333203810605884,-45.0939273432094,-145.33211922671052,
2260   -5.3166326970335565,9.377800997799904,-40.87747768631475,-151.39567954363125,-4.471287869217019,7.114264548346018,-38.53699931602895,-157.02315094821859,-1.8985980494629013,5.210630491846168,
2261   -36.78790668861372,-162.3616438361954,-0.8927973101793615,3.593988480740467,-34.28888433070625,-172.4268302225494,-0.49416800307010306,2.833778261707306,-32.464485926777144,-181.8899555617798,
2262   -0.23820800727001548,2.4129979103668315,-30.97528906297494,-190.88738805305897,-0.051887750840627,2.2101655772969537,-29.663092708322345,-199.49018596899734,0.12020831289412044,2.1659835463007284,
2263   -28.421006646965516,-207.73262197222857,0.29540132328420354,2.268340023894156,-27.16240888383511,-215.6221399083563,0.47110162543185874,2.5198720369458694,-25.80336665478496,-223.14217730044857,
2264   0.609185387110233,2.9210115405858192,-24.259076123944563,-230.2521957397629,0.6298654487691794,3.439728332501145,-22.453702012336876,-236.88842379221887,0.44879420002418713,3.9760540419435735,
2265   -20.348874306241484,-242.96997034942552,0.07485206532557996,4.358198940019776,-17.983356320371776,-248.41503579771214,-0.34178558759495653,4.421934912706355,-15.491283594487912,-253.1664590637666,
2266   -0.6264525040894139,4.130907046195713,-13.063723316695883,-257.21494726485275,-0.7208488086061818,3.597487433571645,-10.870166655606972,-260.604373214559,-0.680120091453524,2.9836900750533872,
2267   -9.002225545762442,-263.41633080728263,-0.5699216517440676,2.4045729139713647,-7.472870360514456,-265.7466253164484,-0.47995754073240837,1.9192888984795866,-6.245625050358484,-267.6869755804271,
2268   -0.32092204477696457,1.510608649327067,-5.272114364207498,-269.3160331705012,-0.18618767911248998,0.9640832170238418,-3.867326644898429,-271.8807363082429,-0.11467972561685451,0.6470083900601576,
2269   -2.9527716915777917,-273.79946149622714,-0.07692796338424553,0.45171053614449724,-2.3290710703038036,-275.2881225501753,-0.0411070967008294,0.3207033674908116,-1.8906013032978302,-276.4787597315005,
2270   -0.019208247652961807,0.18069382834703096,-1.3213533635552355,-278.2719855225347,-0.011203512302054344,0.11527111262416341,-0.9853374578372892,-279.5673509539689,-0.006389022384987176,0.07711228555791973,
2271   -0.7669200953850905,-280.5538428762878};
2272 maptype *map_0[1] = {a0_0};
2273 treal *t_0[1] = {t0_0};
2274 treal *c_0[1] = {c0_0};
2275 real x0_1[2] = {-4.78637250807};
2276 real xe_1[2] = {12.3853930305};
2277 real hi_1[2] = {14.0929014816};
2278 int k_1[2] = {4};
2279 int nmap_1[2] = {243};
2280 int n_1[2] = {25};
2281 treal t0_1[29] = {
2282   -22.880588261487706,-22.880588261487706,-22.880588261487706,-22.880588261487706,-4.7154147992349715,-2.44476811645338,-0.17412143367178823,-0.10316372483486348,-0.032206015997938736,0.10970940167591076,
2283   0.39354023702360974,0.6773710723713087,0.9612019077190077,1.5288635784144056,2.0965252491098036,2.6641869198052017,3.2318485905005994,4.367171931891395,5.502495273282191,6.637818614672987,
2284   7.7731419560637836,8.90846529745458,10.043788638845376,11.179111980236172,12.314435321626966,13.449758663017763,13.449758663017763,13.449758663017763,13.449758663017763};
2285 maptype a0_1[242] = {
2286   3,4,4,4,4,4,4,4,4,4,
2287   4,4,4,4,4,4,4,4,4,4,
2288   4,4,4,4,4,4,4,4,4,4,
2289   4,4,4,5,5,5,5,5,5,5,
2290   5,5,5,5,5,5,5,5,5,5,
2291   5,5,5,5,5,5,5,5,5,5,
2292   5,5,5,5,5,6,7,8,8,9,
2293   9,9,9,10,10,10,10,11,11,11,
2294   11,12,12,12,12,12,12,12,12,13,
2295   13,13,13,13,13,13,13,14,14,14,
2296   14,14,14,14,14,15,15,15,15,15,
2297   15,15,15,16,16,16,16,16,16,16,
2298   16,16,16,16,16,16,16,16,16,17,
2299   17,17,17,17,17,17,17,17,17,17,
2300   17,17,17,17,17,18,18,18,18,18,
2301   18,18,18,18,18,18,18,18,18,18,
2302   18,19,19,19,19,19,19,19,19,19,
2303   19,19,19,19,19,19,19,20,20,20,
2304   20,20,20,20,20,20,20,20,20,20,
2305   20,20,20,21,21,21,21,21,21,21,
2306   21,21,21,21,21,21,21,21,21,22,
2307   22,22,22,22,22,22,22,22,22,22,
2308   22,22,22,22,22,23,23,23,23,23,
2309   23,23,23,23,23,23,23,23,23,23,
2310   23,24};
2311 treal c0_1[88] = {
2312   -6.36713549620182e-07,1.5160737693134769e-05,-8.260878166471392e-05,3.0323347755798663e-05,-0.00024411341807896697,-1.953729853071704e-05,-0.00016210976844749798,-0.0002841152100597304,4.079265842363113e-05,-0.0016824232674811633,
2313   -0.004026660881887453,-0.0036107963114564135,-6.657477252583585,-0.0014045461238867815,-0.011036077690245387,-0.020950656511001066,6.877363335753862,-1.418602543555714,-0.11179652730609937,-0.024119352142066425,
2314   -0.543466789153841,0.04540329187677823,-0.20923559998181623,-0.03673774827884677,0.15884805273658337,-0.18597565724712148,-0.22918498592674946,-0.06707040710458527,-0.000158610240520944,-0.05071773074238208,
2315   -0.29636586796108727,-0.14347023785330212,0.020447788838923116,-0.05085278617356736,-0.3251947126240388,-0.23167745391366554,0.0063615717881664625,-0.03344164721207264,-0.349120072067046,-0.32760689162074325,
2316   0.0035234959952906452,-0.02260798580351479,-0.3809373003865383,-0.5354015249270402,0.0020889306817305545,-0.016607524933389094,-0.4031984427286225,-0.7582856924455624,0.0015310232367928712,-0.013050107291114964,
2317   -0.42003394378605413,-0.9921354853038521,0.0008540032791263473,-0.010442797665701014,-0.43336996546332845,-1.234497859565131,0.00044321938261310733,-0.007534088096451751,-0.45377954347461635,-1.7387234999051162,
2318   0.00032202398681367554,-0.006024496165139314,-0.4691729206630146,-2.26297253804347,0.000229710864700529,-0.004927692118987451,-0.4816071956612905,-2.8029295899308724,0.0001731016159887567,-0.00414530379959073,
2319   -0.49190797970399575,-3.355724918582023,0.00013330936859535112,-0.003555724884397225,-0.5006511373216473,-3.9192893424003685,0.00010574464725677569,-0.003101677171020111,-0.5082094412681857,-4.49207836542927,
2320   8.520738916512169e-05,-0.00274151407224685,-0.514843352674877,-5.072903596231896,7.168736855737352e-05,-0.002451300258912455,-0.5207388759925508,-5.66082627992181};
2321 maptype *map_1[2] = {a0_1};
2322 treal *t_1[2] = {t0_1};
2323 treal *c_1[1] = {c0_1};
2324 splinecoeffs<maptype> sc[2] = {
2325 	{x0_0, xe_0, hi_0, k_0, n_0, nmap_0, map_0, t_0, c_0, splinedata<unsigned char>::splev_pp<4>},
2326 	{x0_1, xe_1, hi_1, k_1, n_1, nmap_1, map_1, t_1, c_1, splinedata<unsigned char>::splev_pp<4>},
2327 };
2328 splinedata<maptype> sd = {
2329 	sc,
2330 	2, /* number of calculated values */
2331 	2, /* number of input values */
2332 	2, /* number of output values */
2333 	0, /* number of state values */
2334 	"nonlin_2",
2335 };
2336 }; /* ! namespace nonlin_2 */
2337 } // namespace AmpData
2338 
2339 // nonlin_2: 2416 bytes
2340 // data size sum: 2432 bytes
2341 
2342 
2343 static const creal __attribute__((aligned(16))) mo_data[1*16] = { -0.0102546428492310,-0.0926671566150658,0.00748481645910352,-0.0140923636667521,0.000146229606693146,0.0922823518597244,0.0130923463909865,0,0,0,-6.05681847115581e-5,0.000595161081745525,0,0,-21.3106335449389,0 };
2344 static const Map<const Matrix<creal, 1, 16>, Aligned> Mo(mo_data);
2345 static const creal __attribute__((aligned(16))) moc_data[1*1] = { 0.991243408620221 };
2346 static const Map<const Matrix<creal, 1, 1>, Aligned> Moc(moc_data);
2347 static const creal __attribute__((aligned(16))) mp_data[8*8] = { -1.60878766662268,0.201098738795714,18.3957218365136,-3.91398582031719,-0.0123843269016959,-1.04506003104504,-24.3073622142207,1.77200291622517,-8.88487051956217,1.11060977505219,166.234892997965,-35.3691437462083,-0.000977781651230822,-5.92128424260976,-174.653665466717,3.68076212702878,1.04505825382188,-0.130632444077542,-13.4269526764931,2.85680017523035,-0.0102398010071506,0.397763818919637,17.2035996438699,-1.21549433886385,-1.84036955719718,0.230046482676040,25.2801788968119,-5.37876475830232,0.0273903892012099,-0.172407562001718,-32.6789072654108,2.68046580539187,0.0674042024831012,-0.00842551253086225,-0.262319945235929,0.0558128269821166,0.00219678736800143,-0.0979397222211214,0.718340583633752,0.0276587628679819,4.46885219353691,-0.558606977146733,-165.544595019239,35.2222717021849,0.00120351074120639,-9.02952049284388,173.869107367223,-13.5602699048151,1.81354621649064,-0.226693368766333,-23.4862546943112,4.99707877518569,-0.00778901763100761,-1.57796122950664,32.8564145535054,-2.48722216637614,0,0,0,0,1.00000000000000,0,0,0 };
2348 static const Map<const Matrix<creal, 8, 8>, Aligned> Mp(mp_data);
2349 static const creal __attribute__((aligned(16))) mx_data[7*16] = { 1.05970174364689,-0.108282638352014,-0.00216390308520815,0.0114004550526571,-0.00614983937551424,0.00735634823212811,-0.0373376868458086,0.713522975253478,0.136120723019377,-0.102112632757899,0.113894820137347,-0.0489364044915694,0.206120132777242,-0.416089362653296,-0.0433301281262144,0.0664125136110350,1.00099915170040,-0.00502767212096184,0.00451528271064754,-0.0174164531743976,0.0283669734091872,0.0839522390879246,-0.105966821882551,-0.00316747488536151,1.00956830159365,-0.00857286923940689,0.0523569880167113,-0.0541206842484787,-0.00113061827397934,-0.00185742158800730,0.000224251694312446,-0.000856211240495214,1.00005450259739,-0.00387940275141992,0.000605868723121882,-0.545624721365257,0.306950247693952,0.0301073642157915,-0.0692961838570507,0.0696324581496592,0.257432975682703,0.538969989890965,-0.0830857401055198,0.0447852476649801,0.0103831526772016,-0.0271123453953327,0.00934503192093945,-0.102249000232238,1.01250767475771,0,0,0,0,0,0,0,-0.00211533957944378,0.00141132471136906,0.000931758428019313,-0.00121834618938154,-0.000342312419688939,0.000825499399629477,-0.00246640352687999,-0.00221019875914748,0.00147461751870934,0.000973541761263861,-0.00127298054725860,-0.000357662778471990,0.000862519622708971,-0.00257700485411471,0.000307278441346321,-0.000309004853953255,-2.23695668047990e-5,2.14873885323795e-5,-3.73067441519218e-5,0.000244734225363349,-0.000321720947551207,7.14531190632612e-5,-7.18548354480381e-5,-5.20173748404662e-6,4.99656752844864e-6,-8.67512148539013e-6,5.69095647660407e-5,-7.48114618591209e-5,-0.000185944022067206,-0.0328978757987105,-0.00205975139324839,0.00928258649842950,-0.000657578027217151,-0.0327275668944848,0.00532525400921149,-0.00753019147704296,0.000217644735509446,0.00119267447325060,0.00834739377311968,-0.00139172521333547,0.000380292343123624,0.00128078974223338,-1360.53531039429,169.083565190700,76.3715942748210,-236.747433234904,188.837967496056,-44.3875870949356,1237.07312474557,8676.03975995143,-3217.70398451414,-3777.02751206018,5337.82542445813,1498.14652753079,-3011.78616932036,10648.3974067810 };
2350 static const Map<const Matrix<creal, 7, 16>, Aligned> Mx(mx_data);
2351 static const creal __attribute__((aligned(16))) mxc_data[7*1] = { 0.841296047660765,-6.14125311669919,-0.333988273569845,-0.217191975968813,0.0159661555945044,-6.13970274163824,-0.147713788505921 };
2352 static const Map<const Matrix<creal, 7, 1>, Aligned> Mxc(mxc_data);
2353 
2354 
2355 static Matrix<creal, 0, 1> last_pot;
2356 
2357 struct nonlin_param {
2358     Matrix<creal, 8, 1> *p;
2359     Matrix<creal, 8, 1> *i;
2360     Map<Matrix<creal, 8, 1> >*v;
2361     int *info;
2362     int *nfev;
2363     creal *fnorm;
2364     Array<creal, 8, 1> *p_val;
nonlin_paramjcm800pre::nonlin_param2365     inline nonlin_param(Matrix<creal, 8, 1> *p_, Matrix<creal, 8, 1> *i_, Map<Matrix<creal, 8, 1> >*v_, int *info_, int *nfev_, creal *fnorm_, Array<creal, 8, 1> *p_val_): p(p_), i(i_), v(v_), info(info_), nfev(nfev_), fnorm(fnorm_), p_val(p_val_) {}
2366 };
2367 
2368 
2369 
2370 namespace nonlin_0 {
nonlin(nonlin_param & par)2371 static inline int nonlin(nonlin_param& par) {
2372     real t[AmpData::nonlin_0::sd.m];
2373     real m[2+0];
2374     Map<Matrix<real, 2+0, 1> >mp(m);
2375     mp << last_pot.cast<real>(), (*par.p).head<2>().cast<real>();
2376     for (int j = 0; j < AmpData::nonlin_0::sd.m; j++) {
2377         splinecoeffs<AmpData::nonlin_0::maptype> *pc = &AmpData::nonlin_0::sd.sc[j];
2378         check(&AmpData::nonlin_0::sd, m, (*pc->eval)(pc, m, &t[j]));
2379     }
2380     (*par.i).head<2>() = Map<Matrix<real, 2, 1> >(t).cast<creal>();
2381     return 0;
2382 }
2383 
2384 
2385 
2386 
2387 } // end nonlin_0
2388 
2389 namespace nonlin_1 {
nonlin(nonlin_param & par)2390 static inline int nonlin(nonlin_param& par) {
2391     real t[AmpData::nonlin_1::sd.m];
2392     real m[2+0];
2393     Map<Matrix<real, 2+0, 1> >mp(m);
2394     mp << last_pot.cast<real>(), (*par.p).segment<2>(2).cast<real>();
2395     for (int j = 0; j < AmpData::nonlin_1::sd.m; j++) {
2396         splinecoeffs<AmpData::nonlin_1::maptype> *pc = &AmpData::nonlin_1::sd.sc[j];
2397         check(&AmpData::nonlin_1::sd, m, (*pc->eval)(pc, m, &t[j]));
2398     }
2399     (*par.i).segment<2>(2) = Map<Matrix<real, 2, 1> >(t).cast<creal>();
2400     return 0;
2401 }
2402 
2403 
2404 
2405 
2406 } // end nonlin_1
2407 
2408 namespace nonlin_2 {
nonlin(nonlin_param & par)2409 static inline int nonlin(nonlin_param& par) {
2410     real t[AmpData::nonlin_2::sd.m];
2411     real m[2+0];
2412     Map<Matrix<real, 2+0, 1> >mp(m);
2413     mp << last_pot.cast<real>(), (*par.p).segment<2>(4).cast<real>();
2414     for (int j = 0; j < AmpData::nonlin_2::sd.m; j++) {
2415         splinecoeffs<AmpData::nonlin_2::maptype> *pc = &AmpData::nonlin_2::sd.sc[j];
2416         check(&AmpData::nonlin_2::sd, m, (*pc->eval)(pc, m, &t[j]));
2417     }
2418     (*par.i).segment<2>(4) = Map<Matrix<real, 2, 1> >(t).cast<creal>();
2419     return 0;
2420 }
2421 
2422 
2423 
2424 
2425 } // end nonlin_2
2426 
2427 namespace nonlin {
2428 static const creal __attribute__((aligned(16))) kl_data[2*8] = { -0.0219270321823620,0.999759573727441,0.999759573727441,0.0219270321823619,1.00000000000000,0,0,0,0,1.00000000000000,0,0,551772.224409347,-13096.8526917654,-13096.8526917654,777788.180707371 };
2429 static const Map<const Matrix<creal, 2, 8>, Aligned> Kl(kl_data);
2430 static const creal __attribute__((aligned(16))) ku_data[6*2] = { 13096.8531048342,98362.8920522104,-431770.787790270,-8133.82959730492,0,0,-695224.597054545,-13096.8526917654,0,0,-7.46011600940896,51016.6019816278 };
2431 static const Map<const Matrix<creal, 6, 2>, Aligned> Ku(ku_data);
2432 static const creal __attribute__((aligned(16))) mpc_data[8*1] = { 0,0,0,0,0,0,347.381890451386,146.019756212607 };
2433 static const Map<const Matrix<creal, 8, 1>, Aligned> Mpc(mpc_data);
2434 static const creal __attribute__((aligned(16))) sam0_data[3*1] = { 0.984867796815516,0.990325823322304,0.572071777232610 };
2435 static const Map<const Array<creal, 3, 1>, Aligned> Sam0(sam0_data);
2436 static const creal __attribute__((aligned(16))) sam1_data[3*1] = { 0.529599326055711,0.294766829526201,-0.300692171196462 };
2437 static const Map<const Array<creal, 3, 1>, Aligned> Sam1(sam1_data);
2438 static const creal __attribute__((aligned(16))) sam2_data[3*1] = { 1.01047167427495,1.00954543304385,1.54972907825715 };
2439 static const Map<const Array<creal, 3, 1>, Aligned> Sam2(sam2_data);
2440 static const creal __attribute__((aligned(16))) spm0_data[3*1] = { 1.14429961087212e-7,3.70660566459397e-8,2.10374116872319e-7 };
2441 static const Map<const Array<creal, 3, 1>, Aligned> Spm0(spm0_data);
2442 static const creal __attribute__((aligned(16))) spm1_data[3*1] = { 0.000487812975465725,0.000184802678889708,-4.75770783104045e-6 };
2443 static const Map<const Array<creal, 3, 1>, Aligned> Spm1(spm1_data);
2444 static const creal __attribute__((aligned(16))) spm2_data[3*1] = { 9.83498403815797e-6,6.65101858921353e-6,1.00009613179018e-5 };
2445 static const Map<const Array<creal, 3, 1>, Aligned> Spm2(spm2_data);
2446 static const creal __attribute__((aligned(16))) ssm0_data[3*1] = { 0.00264912280520554,0.00263637203310291,0.00300240315205226 };
2447 static const Map<const Array<creal, 3, 1>, Aligned> Ssm0(ssm0_data);
2448 static const creal __attribute__((aligned(16))) ssm1_data[3*1] = { -0.138762806132000,-0.0809751016083964,0.00281682007847420 };
2449 static const Map<const Array<creal, 3, 1>, Aligned> Ssm1(ssm1_data);
2450 static const creal __attribute__((aligned(16))) ssm2_data[3*1] = { -0.00275908822697312,-0.00262552318516037,-0.00534179693076565 };
2451 static const Map<const Array<creal, 3, 1>, Aligned> Ssm2(ssm2_data);
2452 
2453 
2454 
2455 typedef int root_fcn(void*p, const creal *v, creal *fvec, int iflag);
fcn(void * p,const creal * v,creal * fvec,int iflag)2456 static int fcn(void *p, const creal *v, creal *fvec, int iflag) {
2457     nonlin_param& par = *static_cast<nonlin_param *>(p);
2458     const Map<const Matrix<creal, 2, 1> > Mv(v);
2459     Array<creal, 6, 1> pt;
2460     pt = (*par.p).head<6>() + Ku * Mv;
2461     Array<creal, 3, 1> PP1;
2462     PP1 << pt(1), pt(3), pt(5);
2463     Array<creal, 3, 1> PP0;
2464     PP0 << pt(0), pt(2), pt(4);
2465     pt.head<3>() = (Spm1 * PP1 + Ssm1) * PP1 + Sam1 + ((Spm2 * PP1 + Ssm2) * PP1 + Sam2) * PP0;
2466     Array<creal, 6, 1> res;
2467     splinedata<AmpData::nonlin_0::maptype>::splev_pp<4>(&AmpData::nonlin_0::sd.sc[0], &pt(0), &res(0));
2468     splinedata<AmpData::nonlin_0::maptype>::splev_pp<4>(&AmpData::nonlin_0::sd.sc[1], &pt(0), &res(3));
2469     splinedata<AmpData::nonlin_1::maptype>::splev_pp<4>(&AmpData::nonlin_1::sd.sc[0], &pt(1), &res(1));
2470     splinedata<AmpData::nonlin_1::maptype>::splev_pp<4>(&AmpData::nonlin_1::sd.sc[1], &pt(1), &res(4));
2471     splinedata<AmpData::nonlin_2::maptype>::splev_pp<4>(&AmpData::nonlin_2::sd.sc[0], &pt(2), &res(2));
2472     splinedata<AmpData::nonlin_2::maptype>::splev_pp<4>(&AmpData::nonlin_2::sd.sc[1], &pt(2), &res(5));
2473     pt.head<3>() = ((Spm0 * PP1 + Ssm0) * PP1 + Sam0) * res.head<3>();
2474     pt.tail<3>() = ((Spm0 * PP1 + Ssm0) * PP1 + Sam0) * res.tail<3>();
2475     (*par.i).head<6>() << pt(0), pt(3), pt(1), pt(4), pt(2), pt(5);
2476     (*par.i).segment<2>(6) = Mv;
2477     Map<Matrix<creal, 2, 1>, Aligned> Mfvec(fvec);
2478     Mfvec = (*par.p).segment<2>(6) + Kl * (*par.i).head<8>();
2479 
2480     return 0;
2481 }
2482 
2483 
2484 
2485 #if 0
2486 #define real_EPSILON FLT_EPSILON
2487 #define real_MIN FLT_MIN
2488 #define real_MAX FLT_MAX
2489 #else
2490 #define real_EPSILON DBL_EPSILON
2491 #define real_MIN DBL_MIN
2492 #define real_MAX DBL_MAX
2493 #endif
2494 
dpmpar(int i)2495 real inline dpmpar(int i)
2496 {
2497     switch(i) {
2498     case 1:
2499 	return real_EPSILON;
2500     case 2:
2501 	return real_MIN;
2502     default:
2503 	return real_MAX;
2504     }
2505 }
2506 
2507 template<int N>
enorm(const real * fvec)2508 real inline enorm(const real *fvec) {
2509     real s = 0;
2510     for (int i = 0; i < N; i++) {
2511 	s += fvec[i] * fvec[i];
2512     }
2513     return sqrt(s);
2514 }
2515 
enorm(int n,const real * fvec)2516 real inline enorm(int n, const real *fvec) {
2517     real s = 0;
2518     for (int i = 0; i < n; i++) {
2519 	s += fvec[i] * fvec[i];
2520     }
2521     return sqrt(s);
2522 }
2523 
2524 template<int N>
enorm2(const real * fvec)2525 real enorm2(const real *fvec) {
2526     real s = 0;
2527     for (int i = 0; i < N; i++) {
2528 	s += fvec[i] * fvec[i];
2529     }
2530     return s;
2531 }
2532 
2533 template<int N>
qform(real * q,int ldq,real * wa)2534 void qform(real *q, int	ldq, real *wa)
2535 {
2536     /* System generated locals */
2537     int q_dim1, q_offset;
2538 
2539     /* Local variables */
2540     int i, j, k, l;
2541     real sum, temp;
2542 
2543     /* Parameter adjustments */
2544 #pragma GCC diagnostic push
2545 #pragma GCC diagnostic ignored "-Warray-bounds"
2546     --wa;
2547     q_dim1 = ldq;
2548     q_offset = 1 + q_dim1 * 1;
2549     q -= q_offset;
2550 #pragma GCC diagnostic pop
2551 
2552     /* Function Body */
2553 
2554 /*     zero out upper triangle of q in the first min(m,n) columns. */
2555 
2556     if (N >= 2) {
2557         for (j = 2; j <= N; ++j) {
2558             for (i = 1; i <= j-1; ++i) {
2559                 q[i + j * q_dim1] = 0.;
2560             }
2561         }
2562     }
2563 
2564 /*     accumulate q from its factored form. */
2565 
2566     for (l = 1; l <= N; ++l) {
2567 	k = N - l + 1;
2568 	for (i = k; i <= N; ++i) {
2569 	    wa[i] = q[i + k * q_dim1];
2570 	    q[i + k * q_dim1] = 0.;
2571 	}
2572 	q[k + k * q_dim1] = 1.;
2573 	if (wa[k] != 0.) {
2574             for (j = k; j <= N; ++j) {
2575                 sum = 0.;
2576                 for (i = k; i <= N; ++i) {
2577                     sum += q[i + j * q_dim1] * wa[i];
2578                 }
2579                 temp = sum / wa[k];
2580                 for (i = k; i <= N; ++i) {
2581                     q[i + j * q_dim1] -= temp * wa[i];
2582                 }
2583             }
2584         }
2585     }
2586 } /* qform_ */
2587 
2588 template<int N>
r1updt(real * s,int ls,const real * u,real * v,real * w,int * sing)2589 void r1updt(real *s, int ls, const real *u, real *v, real *w, int *sing)
2590 {
2591     /* Initialized data */
2592 
2593 #define p5 .5
2594 #define p25 .25
2595 
2596     /* Local variables */
2597     int i, j, l, jj, nm1;
2598     real tan;
2599     int nmj;
2600     real cos, sin, tau, temp, giant, cotan;
2601 
2602     /* Parameter adjustments */
2603     --w;
2604     --u;
2605     --v;
2606     --s;
2607     (void)ls;
2608 
2609     /* Function Body */
2610 
2611 /*     giant is the largest magnitude. */
2612 
2613     giant = dpmpar(3);
2614 
2615 /*     initialize the diagonal element pointer. */
2616 
2617     jj = N * ((N << 1) - N + 1) / 2 - (N - N);
2618 
2619 /*     move the nontrivial part of the last column of s into w. */
2620 
2621     l = jj;
2622     for (i = N; i <= N; ++i) {
2623 	w[i] = s[l];
2624 	++l;
2625     }
2626 
2627 /*     rotate the vector v into a multiple of the n-th unit vector */
2628 /*     in such a way that a spike is introduced into w. */
2629 
2630     nm1 = N - 1;
2631     if (nm1 >= 1) {
2632         for (nmj = 1; nmj <= nm1; ++nmj) {
2633             j = N - nmj;
2634             jj -= N - j + 1;
2635             w[j] = 0.;
2636             if (v[j] != 0.) {
2637 
2638 /*        determine a givens rotation which eliminates the */
2639 /*        j-th element of v. */
2640 
2641                 if (fabs(v[N]) < fabs(v[j])) {
2642                     cotan = v[N] / v[j];
2643                     sin = p5 / sqrt(p25 + p25 * (cotan * cotan));
2644                     cos = sin * cotan;
2645                     tau = 1.;
2646                     if (fabs(cos) * giant > 1.) {
2647                         tau = 1. / cos;
2648                     }
2649                 } else {
2650                     tan = v[j] / v[N];
2651                     cos = p5 / sqrt(p25 + p25 * (tan * tan));
2652                     sin = cos * tan;
2653                     tau = sin;
2654                 }
2655 
2656 /*        apply the transformation to v and store the information */
2657 /*        necessary to recover the givens rotation. */
2658 
2659                 v[N] = sin * v[j] + cos * v[N];
2660                 v[j] = tau;
2661 
2662 /*        apply the transformation to s and extend the spike in w. */
2663 
2664                 l = jj;
2665                 for (i = j; i <= N; ++i) {
2666                     temp = cos * s[l] - sin * w[i];
2667                     w[i] = sin * s[l] + cos * w[i];
2668                     s[l] = temp;
2669                     ++l;
2670                 }
2671             }
2672         }
2673     }
2674 
2675 /*     add the spike from the rank 1 update to w. */
2676 
2677     for (i = 1; i <= N; ++i) {
2678 	w[i] += v[N] * u[i];
2679     }
2680 
2681 /*     eliminate the spike. */
2682 
2683     *sing = false;
2684     if (nm1 >= 1) {
2685         for (j = 1; j <= nm1; ++j) {
2686             if (w[j] != 0.) {
2687 
2688 /*        determine a givens rotation which eliminates the */
2689 /*        j-th element of the spike. */
2690 
2691                 if (fabs(s[jj]) < fabs(w[j])) {
2692                     cotan = s[jj] / w[j];
2693                     sin = p5 / sqrt(p25 + p25 * (cotan * cotan));
2694                     cos = sin * cotan;
2695                     tau = 1.;
2696                     if (fabs(cos) * giant > 1.) {
2697                         tau = 1. / cos;
2698                     }
2699                 } else {
2700                     tan = w[j] / s[jj];
2701                     cos = p5 / sqrt(p25 + p25 * (tan * tan));
2702                     sin = cos * tan;
2703                     tau = sin;
2704                 }
2705 
2706 /*        apply the transformation to s and reduce the spike in w. */
2707 
2708                 l = jj;
2709                 for (i = j; i <= N; ++i) {
2710                     temp = cos * s[l] + sin * w[i];
2711                     w[i] = -sin * s[l] + cos * w[i];
2712                     s[l] = temp;
2713                     ++l;
2714                 }
2715 
2716 /*        store the information necessary to recover the */
2717 /*        givens rotation. */
2718 
2719                 w[j] = tau;
2720             }
2721 
2722 /*        test for zero diagonal elements in the output s. */
2723 
2724             if (s[jj] == 0.) {
2725                 *sing = true;
2726             }
2727             jj += N - j + 1;
2728         }
2729     }
2730 
2731 /*     move w back into the last column of the output s. */
2732 
2733     l = jj;
2734     for (i = N; i <= N; ++i) {
2735 	s[l] = w[i];
2736 	++l;
2737     }
2738     if (s[jj] == 0.) {
2739 	*sing = true;
2740     }
2741 
2742 /*     last card of subroutine r1updt. */
2743 
2744 } /* __minpack_func__(r1updt) */
2745 
2746 template<int M, int N>
r1mpyq(real * a,int lda,const real * v,const real * w)2747 void r1mpyq(real *a, int lda, const real *v, const real *w)
2748 {
2749     /* System generated locals */
2750     int a_dim1, a_offset;
2751 
2752     /* Local variables */
2753     int i, j, nm1, nmj;
2754     real cos, sin, temp;
2755 
2756     /* Parameter adjustments */
2757     --w;
2758     --v;
2759     a_dim1 = lda;
2760     a_offset = 1 + a_dim1 * 1;
2761     a -= a_offset;
2762 
2763     /* Function Body */
2764 
2765 /*     apply the first set of givens rotations to a. */
2766 
2767     nm1 = N - 1;
2768     if (nm1 < 1) {
2769         return;
2770     }
2771     for (nmj = 1; nmj <= nm1; ++nmj) {
2772 	j = N - nmj;
2773 	if (fabs(v[j]) > 1.) {
2774 	    cos = 1. / v[j];
2775 	    sin = sqrt(1. - cos * cos);
2776 	} else {
2777 	    sin = v[j];
2778 	    cos = sqrt(1. - sin * sin);
2779 	}
2780 	for (i = 1; i <= M; ++i) {
2781 	    temp = cos * a[i + j * a_dim1] - sin * a[i + N * a_dim1];
2782 	    a[i + N * a_dim1] = sin * a[i + j * a_dim1] + cos * a[
2783 		    i + N * a_dim1];
2784 	    a[i + j * a_dim1] = temp;
2785 	}
2786     }
2787 
2788 /*     apply the second set of givens rotations to a. */
2789 
2790     for (j = 1; j <= nm1; ++j) {
2791 	if (fabs(w[j]) > 1.) {
2792 	    cos = 1. / w[j];
2793 	    sin = sqrt(1. - cos * cos);
2794 	} else {
2795 	    sin = w[j];
2796 	    cos = sqrt(1. - sin * sin);
2797 	}
2798 	for (i = 1; i <= M; ++i) {
2799 	    temp = cos * a[i + j * a_dim1] + sin * a[i + N * a_dim1];
2800 	    a[i + N * a_dim1] = -sin * a[i + j * a_dim1] + cos * a[i + N * a_dim1];
2801 	    a[i + j * a_dim1] = temp;
2802 	}
2803     }
2804 
2805 /*     last card of subroutine r1mpyq. */
2806 
2807 } /* r1mpyq_ */
2808 
2809 template<int N>
fdjac1(root_fcn * fcn_nn,void * p,real * x,const real * fvec,real * fjac,int ldfjac,int ml,int mu,real epsfcn,real * wa1,real * wa2)2810 int fdjac1(root_fcn *fcn_nn, void *p, real *x, const real *fvec, real *fjac, int ldfjac, int ml,
2811 	int mu, real epsfcn, real *wa1, real *wa2)
2812 {
2813     /* System generated locals */
2814     int fjac_dim1, fjac_offset;
2815 
2816     /* Local variables */
2817     real h;
2818     int i, j, k;
2819     real eps, temp;
2820     int msum;
2821     real epsmch;
2822     int iflag = 0;
2823 
2824     /* Parameter adjustments */
2825     --wa2;
2826     --wa1;
2827     --fvec;
2828     --x;
2829     fjac_dim1 = ldfjac;
2830     fjac_offset = 1 + fjac_dim1 * 1;
2831     fjac -= fjac_offset;
2832 
2833     /* Function Body */
2834 
2835 /*     epsmch is the machine precision. */
2836 
2837     epsmch = dpmpar(1);
2838 
2839     eps = sqrt((std::max(epsfcn,epsmch)));
2840     msum = ml + mu + 1;
2841     if (msum >= N) {
2842 
2843 /*        computation of dense approximate jacobian. */
2844 
2845         for (j = 1; j <= N; ++j) {
2846             temp = x[j];
2847             h = eps * fabs(temp);
2848             if (h == 0.) {
2849                 h = eps;
2850             }
2851             x[j] = temp + h;
2852             /* the last parameter of fcn_nn() is set to 2 to tell calls
2853                made to compute the function from calls made to compute
2854                the Jacobian (see fcn() in tlmfdrv.c) */
2855             iflag = fcn_nn(p, &x[1], &wa1[1], 2);
2856             if (iflag < 0) {
2857                 return iflag;
2858             }
2859             x[j] = temp;
2860             for (i = 1; i <= N; ++i) {
2861                 fjac[i + j * fjac_dim1] = (wa1[i] - fvec[i]) / h;
2862             }
2863         }
2864         return 0;
2865     }
2866 
2867 /*        computation of banded approximate jacobian. */
2868 
2869     for (k = 1; k <= msum; ++k) {
2870 	for (j = k; msum < 0 ? j >= N : j <= N; j += msum) {
2871 	    wa2[j] = x[j];
2872 	    h = eps * fabs(wa2[j]);
2873 	    if (h == 0.) {
2874 		h = eps;
2875 	    }
2876 	    x[j] = wa2[j] + h;
2877 	}
2878 	iflag = fcn_nn(p, &x[1], &wa1[1], 1);
2879 	if (iflag < 0) {
2880             return iflag;
2881 	}
2882 	for (j = k; msum < 0 ? j >= N : j <= N; j += msum) {
2883 	    x[j] = wa2[j];
2884 	    h = eps * fabs(wa2[j]);
2885 	    if (h == 0.) {
2886 		h = eps;
2887 	    }
2888 	    for (i = 1; i <= N; ++i) {
2889 		fjac[i + j * fjac_dim1] = 0.;
2890 		if (i >= j - mu && i <= j + ml) {
2891 		    fjac[i + j * fjac_dim1] = (wa1[i] - fvec[i]) / h;
2892 		}
2893 	    }
2894 	}
2895     }
2896     return 0;
2897 
2898 } /* fdjac1_ */
2899 
2900 template<int N>
qrfac(real * a,int lda,int pivot,int * ipvt,int lipvt,real * rdiag,real * acnorm,real * wa)2901 void qrfac(real *a, int lda, int pivot, int *ipvt, int lipvt, real *rdiag,
2902 	 real *acnorm, real *wa)
2903 {
2904 #ifdef USE_LAPACK
2905     int i, j, k;
2906     double t;
2907     double* tau = wa;
2908     const int ltau = N;
2909     int lwork = -1;
2910     int info = 0;
2911     double* work;
2912 
2913     if (pivot) {
2914         assert( lipvt >= N );
2915         /* set all columns free */
2916         memset(ipvt, 0, sizeof(int)*N);
2917     }
2918 
2919     /* query optimal size of work */
2920     lwork = -1;
2921     if (pivot) {
2922         dgeqp3_(&m,&n,a,&lda,ipvt,tau,tau,&lwork,&info);
2923         lwork = (int)tau[0];
2924         assert( lwork >= 3*n+1  );
2925     } else {
2926         dgeqrf_(&m,&n,a,&lda,tau,tau,&lwork,&info);
2927         lwork = (int)tau[0];
2928         assert( lwork >= 1 && lwork >= n );
2929     }
2930 
2931     assert( info == 0 );
2932 
2933     /* alloc work area */
2934     work = (double *)malloc(sizeof(double)*lwork);
2935     assert(work != NULL);
2936 
2937     /* set acnorm first (from the doc of qrfac, acnorm may point to the same area as rdiag) */
2938     if (acnorm != rdiag) {
2939         for (j = 0; j < n; ++j) {
2940             acnorm[j] = enorm<N>(&a[j * lda]);
2941         }
2942     }
2943 
2944     /* QR decomposition */
2945     if (pivot) {
2946         dgeqp3_(&m,&n,a,&lda,ipvt,tau,work,&lwork,&info);
2947     } else {
2948         dgeqrf_(&m,&n,a,&lda,tau,work,&lwork,&info);
2949     }
2950     assert(info == 0);
2951 
2952     /* set rdiag, before the diagonal is replaced */
2953     memset(rdiag, 0, sizeof(double)*n);
2954     for(i=0 ; i<n ; ++i) {
2955         rdiag[i] = a[i*lda+i];
2956     }
2957 
2958     /* modify lower trinagular part to look like qrfac's output */
2959     for(i=0 ; i<ltau ; ++i) {
2960         k = i*lda+i;
2961         t = tau[i];
2962         a[k] = t;
2963         for(j=i+1 ; j<m ; j++) {
2964             k++;
2965             a[k] *= t;
2966         }
2967     }
2968 
2969     free(work);
2970 #else /* !USE_LAPACK */
2971     /* Initialized data */
2972 
2973 #define p05 .05
2974 
2975     /* System generated locals */
2976     real d1;
2977 
2978     /* Local variables */
2979     int i, j, k, jp1;
2980     real sum;
2981     real temp;
2982     real epsmch;
2983     real ajnorm;
2984 
2985 /*     ********** */
2986 
2987 /*     subroutine qrfac */
2988 
2989 /*     this subroutine uses householder transformations with column */
2990 /*     pivoting (optional) to compute a qr factorization of the */
2991 /*     m by n matrix a. that is, qrfac determines an orthogonal */
2992 /*     matrix q, a permutation matrix p, and an upper trapezoidal */
2993 /*     matrix r with diagonal elements of nonincreasing magnitude, */
2994 /*     such that a*p = q*r. the householder transformation for */
2995 /*     column k, k = 1,2,...,min(m,n), is of the form */
2996 
2997 /*                           t */
2998 /*           i - (1/u(k))*u*u */
2999 
3000 /*     where u has zeros in the first k-1 positions. the form of */
3001 /*     this transformation and the method of pivoting first */
3002 /*     appeared in the corresponding linpack subroutine. */
3003 
3004 /*     the subroutine statement is */
3005 
3006 /*       subroutine qrfac(m,n,a,lda,pivot,ipvt,lipvt,rdiag,acnorm,wa) */
3007 
3008 /*     where */
3009 
3010 /*       m is a positive integer input variable set to the number */
3011 /*         of rows of a. */
3012 
3013 /*       n is a positive integer input variable set to the number */
3014 /*         of columns of a. */
3015 
3016 /*       a is an m by n array. on input a contains the matrix for */
3017 /*         which the qr factorization is to be computed. on output */
3018 /*         the strict upper trapezoidal part of a contains the strict */
3019 /*         upper trapezoidal part of r, and the lower trapezoidal */
3020 /*         part of a contains a factored form of q (the non-trivial */
3021 /*         elements of the u vectors described above). */
3022 
3023 /*       lda is a positive integer input variable not less than m */
3024 /*         which specifies the leading dimension of the array a. */
3025 
3026 /*       pivot is a logical input variable. if pivot is set true, */
3027 /*         then column pivoting is enforced. if pivot is set false, */
3028 /*         then no column pivoting is done. */
3029 
3030 /*       ipvt is an integer output array of length lipvt. ipvt */
3031 /*         defines the permutation matrix p such that a*p = q*r. */
3032 /*         column j of p is column ipvt(j) of the identity matrix. */
3033 /*         if pivot is false, ipvt is not referenced. */
3034 
3035 /*       lipvt is a positive integer input variable. if pivot is false, */
3036 /*         then lipvt may be as small as 1. if pivot is true, then */
3037 /*         lipvt must be at least n. */
3038 
3039 /*       rdiag is an output array of length n which contains the */
3040 /*         diagonal elements of r. */
3041 
3042 /*       acnorm is an output array of length n which contains the */
3043 /*         norms of the corresponding columns of the input matrix a. */
3044 /*         if this information is not needed, then acnorm can coincide */
3045 /*         with rdiag. */
3046 
3047 /*       wa is a work array of length n. if pivot is false, then wa */
3048 /*         can coincide with rdiag. */
3049 
3050 /*     subprograms called */
3051 
3052 /*       minpack-supplied ... dpmpar,enorm */
3053 
3054 /*       fortran-supplied ... dmax1,dsqrt,min0 */
3055 
3056 /*     argonne national laboratory. minpack project. march 1980. */
3057 /*     burton s. garbow, kenneth e. hillstrom, jorge j. more */
3058 
3059 /*     ********** */
3060     (void)lipvt;
3061 
3062 /*     epsmch is the machine precision. */
3063 
3064     epsmch = dpmpar(1);
3065 
3066 /*     compute the initial column norms and initialize several arrays. */
3067 
3068     for (j = 0; j < N; ++j) {
3069 	acnorm[j] = enorm<N>(&a[j * lda + 0]);
3070 	rdiag[j] = acnorm[j];
3071 	wa[j] = rdiag[j];
3072 	if (pivot) {
3073 	    ipvt[j] = j+1;
3074 	}
3075     }
3076 
3077 /*     reduce a to r with householder transformations. */
3078 
3079     for (j = 0; j < N; ++j) {
3080 	if (pivot) {
3081 
3082 /*        bring the column of largest norm into the pivot position. */
3083 
3084             int kmax = j;
3085             for (k = j; k < N; ++k) {
3086                 if (rdiag[k] > rdiag[kmax]) {
3087                     kmax = k;
3088                 }
3089             }
3090             if (kmax != j) {
3091                 for (i = 0; i < N; ++i) {
3092                     temp = a[i + j * lda];
3093                     a[i + j * lda] = a[i + kmax * lda];
3094                     a[i + kmax * lda] = temp;
3095                 }
3096                 rdiag[kmax] = rdiag[j];
3097                 wa[kmax] = wa[j];
3098                 k = ipvt[j];
3099                 ipvt[j] = ipvt[kmax];
3100                 ipvt[kmax] = k;
3101             }
3102         }
3103 
3104 /*        compute the householder transformation to reduce the */
3105 /*        j-th column of a to a multiple of the j-th unit vector. */
3106 
3107 	ajnorm = enorm(N - (j+1) + 1, &a[j + j * lda]);
3108 	if (ajnorm != 0.) {
3109             if (a[j + j * lda] < 0.) {
3110                 ajnorm = -ajnorm;
3111             }
3112             for (i = j; i < N; ++i) {
3113                 a[i + j * lda] /= ajnorm;
3114             }
3115             a[j + j * lda] += 1.;
3116 
3117 /*        apply the transformation to the remaining columns */
3118 /*        and update the norms. */
3119 
3120             jp1 = j + 1;
3121             if (N > jp1) {
3122                 for (k = jp1; k < N; ++k) {
3123                     sum = 0.;
3124                     for (i = j; i < N; ++i) {
3125                         sum += a[i + j * lda] * a[i + k * lda];
3126                     }
3127                     temp = sum / a[j + j * lda];
3128                     for (i = j; i < N; ++i) {
3129                         a[i + k * lda] -= temp * a[i + j * lda];
3130                     }
3131                     if (pivot && rdiag[k] != 0.) {
3132                         temp = a[j + k * lda] / rdiag[k];
3133                         /* Computing MAX */
3134                         d1 = 1. - temp * temp;
3135                         rdiag[k] *= sqrt((std::max((real)0.,d1)));
3136                         /* Computing 2nd power */
3137                         d1 = rdiag[k] / wa[k];
3138                         if (p05 * (d1 * d1) <= epsmch) {
3139                             rdiag[k] = enorm(N - (j+1), &a[jp1 + k * lda]);
3140                             wa[k] = rdiag[k];
3141                         }
3142                     }
3143                 }
3144             }
3145         }
3146 	rdiag[j] = -ajnorm;
3147     }
3148 
3149 /*     last card of subroutine qrfac. */
3150 #endif /* !USE_LAPACK */
3151 } /* qrfac_ */
3152 
3153 template<int N>
dogleg(const real * r,int lr,const real * diag,const real * qtb,real delta,real * x,real * wa1,real * wa2)3154 void dogleg(const real *r, int lr, const real *diag, const real *qtb, real delta, real *x,
3155 	    real *wa1, real *wa2)
3156 {
3157     /* System generated locals */
3158     real d1, d2, d3, d4;
3159 
3160     /* Local variables */
3161     int i, j, k, l, jj, jp1;
3162     real sum, temp, alpha, bnorm;
3163     real gnorm, qnorm, epsmch;
3164     real sgnorm;
3165 
3166     /* Parameter adjustments */
3167     --wa2;
3168     --wa1;
3169     --x;
3170     --qtb;
3171     --diag;
3172     --r;
3173     (void)lr;
3174 
3175     /* Function Body */
3176 
3177 /*     epsmch is the machine precision. */
3178 
3179     epsmch = dpmpar(1);
3180 
3181 /*     first, calculate the gauss-newton direction. */
3182 
3183     jj = N * (N + 1) / 2 + 1;
3184     for (k = 1; k <= N; ++k) {
3185 	j = N - k + 1;
3186 	jp1 = j + 1;
3187 	jj -= k;
3188 	l = jj + 1;
3189 	sum = 0.;
3190 	if (N >= jp1) {
3191             for (i = jp1; i <= N; ++i) {
3192                 sum += r[l] * x[i];
3193                 ++l;
3194             }
3195         }
3196 	temp = r[jj];
3197 	if (temp == 0.) {
3198             l = j;
3199             for (i = 1; i <= j; ++i) {
3200                 /* Computing MAX */
3201                 d2 = fabs(r[l]);
3202                 temp = std::max(temp,d2);
3203                 l = l + N - i;
3204             }
3205             temp = epsmch * temp;
3206             if (temp == 0.) {
3207                 temp = epsmch;
3208             }
3209         }
3210 	x[j] = (qtb[j] - sum) / temp;
3211     }
3212 
3213 /*     test whether the gauss-newton direction is acceptable. */
3214 
3215     for (j = 1; j <= N; ++j) {
3216 	wa1[j] = 0.;
3217 	wa2[j] = diag[j] * x[j];
3218     }
3219     qnorm = enorm<N>(&wa2[1]);
3220     if (qnorm <= delta) {
3221         return;
3222     }
3223 
3224 /*     the gauss-newton direction is not acceptable. */
3225 /*     next, calculate the scaled gradient direction. */
3226 
3227     l = 1;
3228     for (j = 1; j <= N; ++j) {
3229 	temp = qtb[j];
3230 	for (i = j; i <= N; ++i) {
3231 	    wa1[i] += r[l] * temp;
3232 	    ++l;
3233 	}
3234 	wa1[j] /= diag[j];
3235     }
3236 
3237 /*     calculate the norm of the scaled gradient and test for */
3238 /*     the special case in which the scaled gradient is zero. */
3239 
3240     gnorm = enorm<N>(&wa1[1]);
3241     sgnorm = 0.;
3242     alpha = delta / qnorm;
3243     if (gnorm != 0.) {
3244 
3245 /*     calculate the point along the scaled gradient */
3246 /*     at which the quadratic is minimized. */
3247 
3248         for (j = 1; j <= N; ++j) {
3249             wa1[j] = wa1[j] / gnorm / diag[j];
3250         }
3251         l = 1;
3252         for (j = 1; j <= N; ++j) {
3253             sum = 0.;
3254             for (i = j; i <= N; ++i) {
3255                 sum += r[l] * wa1[i];
3256                 ++l;
3257             }
3258             wa2[j] = sum;
3259         }
3260         temp = enorm<N>(&wa2[1]);
3261         sgnorm = gnorm / temp / temp;
3262 
3263 /*     test whether the scaled gradient direction is acceptable. */
3264 
3265         alpha = 0.;
3266         if (sgnorm < delta) {
3267 
3268 /*     the scaled gradient direction is not acceptable. */
3269 /*     finally, calculate the point along the dogleg */
3270 /*     at which the quadratic is minimized. */
3271 
3272             bnorm = enorm<N>(&qtb[1]);
3273             temp = bnorm / gnorm * (bnorm / qnorm) * (sgnorm / delta);
3274             /* Computing 2nd power */
3275             d1 = sgnorm / delta;
3276             /* Computing 2nd power */
3277             d2 = temp - delta / qnorm;
3278             /* Computing 2nd power */
3279             d3 = delta / qnorm;
3280             /* Computing 2nd power */
3281             d4 = sgnorm / delta;
3282             temp = temp - delta / qnorm * (d1 * d1)
3283                    + sqrt(d2 * d2
3284                           + (1. - d3 * d3) * (1. - d4 * d4));
3285             /* Computing 2nd power */
3286             d1 = sgnorm / delta;
3287             alpha = delta / qnorm * (1. - d1 * d1) / temp;
3288         }
3289     }
3290 
3291 /*     form appropriate convex combination of the gauss-newton */
3292 /*     direction and the scaled gradient direction. */
3293 
3294     temp = (1. - alpha) * std::min(sgnorm,delta);
3295     for (j = 1; j <= N; ++j) {
3296 	x[j] = temp * wa1[j] + alpha * x[j];
3297     }
3298 
3299 } /* dogleg_ */
3300 
3301 template<int N>
hybrdX(root_fcn * fcn_nn,void * p,real * x,real * fvec,real xtol,int maxfev,int ml,int mu,real epsfcn,real * diag,int mode,real factor,int nprint,int * nfev,real * fjac,int ldfjac,real * r,int lr,real * qtf,real * wa1,real * wa2,real * wa3,real * wa4)3302 int hybrdX(root_fcn *fcn_nn, void *p, real *x, real *
3303 	fvec, real xtol, int maxfev, int ml, int mu,
3304 	real epsfcn, real *diag, int mode, real
3305 	factor, int nprint, int *nfev, real *
3306 	fjac, int ldfjac, real *r, int lr, real *qtf,
3307 	real *wa1, real *wa2, real *wa3, real *wa4)
3308 {
3309     /* Initialized data */
3310 
3311 #define p1 .1
3312 #define p5 .5
3313 #define p001 .001
3314 #define p0001 1e-4
3315 
3316     /* System generated locals */
3317     int fjac_dim1, fjac_offset, i1;
3318     real d1, d2;
3319 
3320     /* Local variables */
3321     int i, j, l, jm1, iwa[1];
3322     real sum;
3323     int sing;
3324     int iter;
3325     real temp;
3326     int msum, iflag;
3327     real delta = 0.;
3328     int jeval;
3329     int ncsuc;
3330     real ratio;
3331     real fnorm;
3332     real pnorm, xnorm = 0., fnorm1;
3333     int nslow1, nslow2;
3334     int ncfail;
3335     real actred, epsmch, prered;
3336     int info;
3337 
3338     /* Parameter adjustments */
3339 #pragma GCC diagnostic push
3340 #pragma GCC diagnostic ignored "-Warray-bounds"
3341     --wa4;
3342     --wa3;
3343     --wa2;
3344     --wa1;
3345     --qtf;
3346     --diag;
3347     --fvec;
3348     --x;
3349     fjac_dim1 = ldfjac;
3350     fjac_offset = 1 + fjac_dim1 * 1;
3351     fjac -= fjac_offset;
3352     --r;
3353 #pragma GCC diagnostic pop
3354 
3355     /* Function Body */
3356 
3357 /*     epsmch is the machine precision. */
3358 
3359     epsmch = dpmpar(1);
3360 
3361     info = 0;
3362     iflag = 0;
3363     *nfev = 0;
3364 
3365 /*     check the input parameters for errors. */
3366 
3367     if (N <= 0 || xtol < 0. || maxfev <= 0 || ml < 0 || mu < 0 ||
3368 	    factor <= 0. || ldfjac < N || lr < N * (N + 1) / 2) {
3369 	goto TERMINATE;
3370     }
3371     if (mode == 2) {
3372         for (j = 1; j <= N; ++j) {
3373             if (diag[j] <= 0.) {
3374                 goto TERMINATE;
3375             }
3376         }
3377     }
3378 
3379 /*     evaluate the function at the starting point */
3380 /*     and calculate its norm. */
3381 
3382     iflag = fcn_nn(p, &x[1], &fvec[1], 1);
3383     *nfev = 1;
3384     if (iflag < 0) {
3385 	goto TERMINATE;
3386     }
3387     fnorm = enorm2<N>(&fvec[1]);
3388 
3389 /*     determine the number of calls to fcn needed to compute */
3390 /*     the jacobian matrix. */
3391 
3392 /* Computing MIN */
3393     i1 = ml + mu + 1;
3394     msum = std::min(i1,N);
3395 
3396 /*     initialize iteration counter and monitors. */
3397 
3398     iter = 1;
3399     ncsuc = 0;
3400     ncfail = 0;
3401     nslow1 = 0;
3402     nslow2 = 0;
3403 
3404 /*     beginning of the outer loop. */
3405 
3406     for (;;) {
3407         jeval = true;
3408 
3409 /*        calculate the jacobian matrix. */
3410 
3411         iflag = fdjac1<N>(fcn_nn, p, &x[1], &fvec[1], &fjac[fjac_offset], ldfjac,
3412 			  ml, mu, epsfcn, &wa1[1], &wa2[1]);
3413         *nfev += msum;
3414         if (iflag < 0) {
3415             goto TERMINATE;
3416         }
3417 
3418 /*        compute the qr factorization of the jacobian. */
3419 
3420         qrfac<N>(&fjac[fjac_offset], ldfjac, false, iwa, 1, &wa1[1], &wa2[1], &wa3[1]);
3421 
3422 /*        on the first iteration and if mode is 1, scale according */
3423 /*        to the norms of the columns of the initial jacobian. */
3424 
3425         if (iter == 1) {
3426             if (mode != 2) {
3427                 for (j = 1; j <= N; ++j) {
3428                     diag[j] = wa2[j];
3429                     if (wa2[j] == 0.) {
3430                         diag[j] = 1.;
3431                     }
3432                 }
3433             }
3434 
3435 /*        on the first iteration, calculate the norm of the scaled x */
3436 /*        and initialize the step bound delta. */
3437 
3438             for (j = 1; j <= N; ++j) {
3439                 wa3[j] = diag[j] * x[j];
3440             }
3441             xnorm = enorm<N>(&wa3[1]);
3442             delta = factor * xnorm;
3443             if (delta == 0.) {
3444                 delta = factor;
3445             }
3446         }
3447 
3448 /*        form (q transpose)*fvec and store in qtf. */
3449 
3450         for (i = 1; i <= N; ++i) {
3451             qtf[i] = fvec[i];
3452         }
3453         for (j = 1; j <= N; ++j) {
3454             if (fjac[j + j * fjac_dim1] != 0.) {
3455                 sum = 0.;
3456                 for (i = j; i <= N; ++i) {
3457                     sum += fjac[i + j * fjac_dim1] * qtf[i];
3458                 }
3459                 temp = -sum / fjac[j + j * fjac_dim1];
3460                 for (i = j; i <= N; ++i) {
3461                     qtf[i] += fjac[i + j * fjac_dim1] * temp;
3462                 }
3463             }
3464         }
3465 
3466 /*        copy the triangular factor of the qr factorization into r. */
3467 
3468         sing = false;
3469         for (j = 1; j <= N; ++j) {
3470             l = j;
3471             jm1 = j - 1;
3472             if (jm1 >= 1) {
3473                 for (i = 1; i <= jm1; ++i) {
3474                     r[l] = fjac[i + j * fjac_dim1];
3475                     l = l + N - i;
3476                 }
3477             }
3478             r[l] = wa1[j];
3479             if (wa1[j] == 0.) {
3480                 sing = true;
3481             }
3482         }
3483 
3484 /*        accumulate the orthogonal factor in fjac. */
3485 
3486         qform<N>(&fjac[fjac_offset], ldfjac, &wa1[1]);
3487 
3488 /*        rescale if necessary. */
3489 
3490         if (mode != 2) {
3491             for (j = 1; j <= N; ++j) {
3492                 /* Computing MAX */
3493                 d1 = diag[j], d2 = wa2[j];
3494                 diag[j] = std::max(d1,d2);
3495             }
3496         }
3497 
3498 /*        beginning of the inner loop. */
3499 
3500         for (;;) {
3501 
3502 /*           if requested, call fcn to enable printing of iterates. */
3503 
3504             if (nprint > 0) {
3505                 iflag = 0;
3506                 if ((iter - 1) % nprint == 0) {
3507                     iflag = fcn_nn(p, &x[1], &fvec[1], 0);
3508                 }
3509                 if (iflag < 0) {
3510                     goto TERMINATE;
3511                 }
3512             }
3513 
3514 /*           determine the direction p. */
3515 
3516             dogleg<N>(&r[1], lr, &diag[1], &qtf[1], delta, &wa1[1], &wa2[1], &wa3[1]);
3517 
3518 /*           store the direction p and x + p. calculate the norm of p. */
3519 
3520             for (j = 1; j <= N; ++j) {
3521                 wa1[j] = -wa1[j];
3522                 wa2[j] = x[j] + wa1[j];
3523                 wa3[j] = diag[j] * wa1[j];
3524             }
3525             pnorm = enorm<N>(&wa3[1]);
3526 
3527 /*           on the first iteration, adjust the initial step bound. */
3528 
3529             if (iter == 1) {
3530                 delta = std::min(delta,pnorm);
3531             }
3532 
3533 /*           evaluate the function at x + p and calculate its norm. */
3534 
3535             iflag = fcn_nn(p, &wa2[1], &wa4[1], 1);
3536             ++(*nfev);
3537             if (iflag < 0) {
3538                 goto TERMINATE;
3539             }
3540             fnorm1 = enorm2<N>(&wa4[1]);
3541 
3542 /*           compute the scaled actual reduction. */
3543 
3544             actred = -1.;
3545             if (fnorm1 < fnorm) {
3546                 /* already 2nd power */
3547                 actred = 1. - fnorm1 / fnorm;
3548             }
3549 
3550 /*           compute the scaled predicted reduction. */
3551 
3552             l = 1;
3553             for (i = 1; i <= N; ++i) {
3554                 sum = 0.;
3555                 for (j = i; j <= N; ++j) {
3556                     sum += r[l] * wa1[j];
3557                     ++l;
3558                 }
3559                 wa3[i] = qtf[i] + sum;
3560             }
3561             temp = enorm2<N>(&wa3[1]);
3562             prered = 0.;
3563             if (temp < fnorm) {
3564                 /* already 2nd power */
3565                 prered = 1. - temp / fnorm;
3566             }
3567 
3568 /*           compute the ratio of the actual to the predicted */
3569 /*           reduction. */
3570 
3571             ratio = 0.;
3572             if (prered > 0.) {
3573                 ratio = actred / prered;
3574             }
3575 
3576 /*           update the step bound. */
3577 
3578             if (ratio < p1) {
3579                 ncsuc = 0;
3580                 ++ncfail;
3581                 delta = p5 * delta;
3582             } else {
3583                 ncfail = 0;
3584                 ++ncsuc;
3585                 if (ratio >= p5 || ncsuc > 1) {
3586                     /* Computing MAX */
3587                     d1 = pnorm / p5;
3588                     delta = std::max(delta,d1);
3589                 }
3590                 if (fabs(ratio - 1.) <= p1) {
3591                     delta = pnorm / p5;
3592                 }
3593             }
3594 
3595 /*           test for successful iteration. */
3596 
3597             if (ratio >= p0001) {
3598 
3599 /*           successful iteration. update x, fvec, and their norms. */
3600 
3601                 for (j = 1; j <= N; ++j) {
3602                     x[j] = wa2[j];
3603                     wa2[j] = diag[j] * x[j];
3604                     fvec[j] = wa4[j];
3605                 }
3606                 xnorm = enorm<N>(&wa2[1]);
3607                 fnorm = fnorm1;
3608                 ++iter;
3609             }
3610 
3611 /*           determine the progress of the iteration. */
3612 
3613             ++nslow1;
3614             if (actred >= p001) {
3615                 nslow1 = 0;
3616             }
3617             if (jeval) {
3618                 ++nslow2;
3619             }
3620             if (actred >= p1) {
3621                 nslow2 = 0;
3622             }
3623 
3624 /*           test for convergence. */
3625 
3626             if (delta <= xtol * xnorm || fnorm == 0.) {
3627                 info = 1;
3628             }
3629             if (info != 0) {
3630                 goto TERMINATE;
3631             }
3632 
3633 /*           tests for termination and stringent tolerances. */
3634 
3635             if (*nfev >= maxfev) {
3636                 info = 2;
3637             }
3638             /* Computing MAX */
3639             d1 = p1 * delta;
3640             if (p1 * std::max(d1,pnorm) <= epsmch * xnorm) {
3641                 info = 3;
3642             }
3643             if (nslow2 == 5) {
3644                 info = 4;
3645             }
3646             if (nslow1 == 10) {
3647                 info = 5;
3648             }
3649             if (info != 0) {
3650                 goto TERMINATE;
3651             }
3652 
3653 /*           criterion for recalculating jacobian approximation */
3654 /*           by forward differences. */
3655 
3656             if (ncfail == 2) {
3657                 goto TERMINATE_INNER_LOOP;
3658             }
3659 
3660 /*           calculate the rank one modification to the jacobian */
3661 /*           and update qtf if necessary. */
3662 
3663             for (j = 1; j <= N; ++j) {
3664                 sum = 0.;
3665                 for (i = 1; i <= N; ++i) {
3666                     sum += fjac[i + j * fjac_dim1] * wa4[i];
3667                 }
3668                 wa2[j] = (sum - wa3[j]) / pnorm;
3669                 wa1[j] = diag[j] * (diag[j] * wa1[j] / pnorm);
3670                 if (ratio >= p0001) {
3671                     qtf[j] = sum;
3672                 }
3673             }
3674 
3675 /*           compute the qr factorization of the updated jacobian. */
3676 
3677             r1updt<N>(&r[1], lr, &wa1[1], &wa2[1], &wa3[1], &sing);
3678             r1mpyq<N, N>(&fjac[fjac_offset], ldfjac, &wa2[1], &wa3[1]);
3679             r1mpyq<1, N>(&qtf[1], 1, &wa2[1], &wa3[1]);
3680 
3681 /*           end of the inner loop. */
3682 
3683             jeval = false;
3684         }
3685 TERMINATE_INNER_LOOP:
3686         ;
3687 /*        end of the outer loop. */
3688 
3689     }
3690 TERMINATE:
3691 
3692 /*     termination, either normal or user imposed. */
3693 
3694     if (iflag < 0) {
3695 	info = iflag;
3696     }
3697     if (nprint > 0) {
3698 	fcn_nn(p, &x[1], &fvec[1], 0);
3699     }
3700     return info;
3701 
3702 /*     last card of subroutine hybrd. */
3703 
3704 } /* hybrd_ */
3705 
3706 
nonlin(struct nonlin_param & par)3707 static int nonlin(struct nonlin_param &par) {
3708     int maxfev, mode, nprint, ldfjac;
3709     creal xtol, epsfcn, factor;
3710     creal __attribute__((aligned(16))) fvec[2];
3711     creal __attribute__((aligned(16))) fjac[2*2];
3712     creal __attribute__((aligned(16))) qtf[2];
3713     creal __attribute__((aligned(16))) wa1[2];
3714     creal __attribute__((aligned(16))) wa2[2];
3715     creal __attribute__((aligned(16))) wa3[2];
3716     creal __attribute__((aligned(16))) wa4[2];
3717     creal diag[2] = {};
3718     int ml, mu, lr;
3719     creal r[(2*(2+1))/2];
3720     lr = (2*(2+1))/2;
3721     ml = 2-1; /* unbanded jacobian */
3722     mu = 2-1; /* unbanded jacobian */
3723     ldfjac = 2;
3724 
3725     /* parameter */
3726     xtol = 0.1;
3727     maxfev = 12;
3728     epsfcn = 0.;
3729     //mode = 2;  /* explicit variable scaling with diag */
3730     mode = 1;  /* automatic variable scaling */
3731     factor = 100000.0;
3732     nprint = 0;
3733     /**/
3734 
3735 
3736     (*par.p_val).head<8>() = (*par.p).head<8>();
3737 
3738     Matrix<creal, 8, 1> p2;
3739     Matrix<creal, 8, 1> *p_old;
3740     p2.head<8>() = (*par.p).head<8>() + Mpc;
3741     p_old = par.p;
3742     par.p = &p2;
3743 
3744 
3745     *par.info = hybrdX<2>(fcn, &par, &(*par.v)(6), fvec, xtol, maxfev, ml, mu, epsfcn,
3746                           diag, mode, factor, nprint, par.nfev, fjac, ldfjac, r, lr,
3747                           qtf, wa1, wa2, wa3, wa4);
3748     *par.fnorm = enorm<2>(fvec);
3749 
3750     int ret = 0;
3751     if (*par.info != 1) {
3752         if (!(*par.info == 5 && *par.fnorm < 1e-20)) {
3753             ret = -1;
3754         }
3755     }
3756     par.p = p_old;
3757 
3758     return ret;
3759 }
3760 
3761 
3762 } // end namespace nonlin
3763 
3764 
3765 class DKPlugin: public PluginLV2 {
3766 protected:
3767     gx_resample::FixedRateResampler smp;
3768 
3769 public:
3770     float pots[0+1];
3771     float *pots_;
3772 private:
3773     creal pots_last[0+1];
3774     Matrix<creal, 7, 1> x_last;
3775     Array<double, 6, 1> K0;
3776     Array<double, 6, 1> K1;
3777     Array<double, 6, 1> K2;
3778     Array<double, 6, 1> K3;
3779     Array<double, 6, 1> K4;
3780     Array<double, 6, 1> K5;
3781     Array<double, 6, 1> Y;
3782     Array<double, 6, 1> X;
3783     void connect(uint32_t port,void* data);
3784 public:
3785     EIGEN_MAKE_ALIGNED_OPERATOR_NEW;
3786     DKPlugin();
3787     static void init(unsigned int samplingFreq, PluginLV2 *plugin);
3788     static void process(int count, float *input, float *output, PluginLV2 *plugin);
3789     static void connect_static(uint32_t port,void* data, PluginLV2 *p);
3790     static void del_instance(PluginLV2 *plugin);
3791 };
3792 
DKPlugin()3793 DKPlugin::DKPlugin():
3794     PluginLV2(), pots(), pots_last(), x_last(), K0(), K1(), K2(), K3(), K4(), K5(), Y(), X() {
3795     version = PLUGINLV2_VERSION;
3796     id = "JCM800Pre";
3797     name = N_("JCM 800 Preamp");
3798     stereo_audio = 0;
3799     mono_audio = process;
3800     set_samplerate = init;
3801     activate_plugin = 0;
3802     connect_ports = connect_static;
3803     delete_instance = del_instance;
3804     for (int i = 0; i < 7; i++) {
3805         x_last(i) = x0_data[i];
3806     }
3807 }
3808 
plugin()3809 PluginLV2 *plugin() {
3810 	return new DKPlugin();
3811 }
3812 
connect(uint32_t port,void * data)3813 void DKPlugin::connect(uint32_t port,void* data)
3814 {
3815 	switch ((PortIndex)port)
3816 	{
3817 	case P6v:
3818 		pots_ = (float*)data; // , 0.5, 0, 1, 0.01
3819 		break;
3820 	default:
3821 		break;
3822 	}
3823 }
3824 
connect_static(uint32_t port,void * data,PluginLV2 * p)3825 void DKPlugin::connect_static(uint32_t port,void* data, PluginLV2 *p)
3826 {
3827 	static_cast<DKPlugin*>(p)->connect(port, data);
3828 }
3829 
3830 /*
3831 typedef enum
3832 {
3833    P6v,
3834 } PortIndex;
3835 */
3836 
init(unsigned int samplingFreq,PluginLV2 * plugin)3837 void DKPlugin::init(unsigned int samplingFreq, PluginLV2 *plugin) {
3838     DKPlugin& self = *static_cast<DKPlugin*>(plugin);
3839     self.smp.setup(samplingFreq, 96000);
3840     self.X.setZero();
3841    self.Y.setZero();
3842    unsigned int fs = samplingFreq;
3843        self.K5(0) = 1.75171807136529e-7*pow(fs,2);
3844        self.K4(0) = -7.00687228546118e-7*pow(fs,2);
3845        self.K3(0) = 1.05103084281918e-6*pow(fs,2) + 0.000200534456453583*fs;
3846        self.K2(0) = -7.00687228546118e-7*pow(fs,2) - 0.000401068912907166*fs;
3847        self.K1(0) = 1.75171807136529e-7*pow(fs,2) + 0.000200534456453583*fs + 0.0107626291380964;
3848        self.K0(0) = 0.0;
3849        self.K5(1) = -3.50343614273059e-7*pow(fs,2);
3850        self.K4(1) = 1.40137445709224e-6*pow(fs,2);
3851        self.K3(1) = -2.10206168563835e-6*pow(fs,2);
3852        self.K2(1) = 1.40137445709224e-6*pow(fs,2);
3853        self.K1(1) = -3.50343614273059e-7*pow(fs,2) + 0.0215252582761928;
3854        self.K0(1) = 0.0;
3855        self.K5(2) = 1.75171807136529e-7*pow(fs,2);
3856        self.K4(2) = -7.00687228546118e-7*pow(fs,2);
3857        self.K3(2) = 1.05103084281918e-6*pow(fs,2) - 0.000200534456453583*fs;
3858        self.K2(2) = -7.00687228546118e-7*pow(fs,2) + 0.000401068912907166*fs;
3859        self.K1(2) = 1.75171807136529e-7*pow(fs,2) - 0.000200534456453583*fs + 0.0107626291380964;
3860        self.K0(2) = 0.0;
3861        self.K5(3) = 1.70232916580416e-7*pow(fs,2);
3862        self.K4(3) = -6.75992775765549e-7*pow(fs,2);
3863        self.K3(3) = 1.00164193725804e-6*pow(fs,2) + 7.7521112860407e-5*fs;
3864        self.K2(3) = -6.51298322984981e-7*pow(fs,2) - 3.20288821276382e-5*fs;
3865        self.K1(3) = 1.50477354355961e-7*pow(fs,2) - 0.000168505574325945*fs - 0.00752160890512768;
3866        self.K0(3) = 4.93889055611368e-9*pow(fs,2) + 0.000123013343593176*fs + 0.0182842380432241;
3867        self.K5(4) = -3.40465833160831e-7*pow(fs,2);
3868        self.K4(4) = 1.3519855515311e-6*pow(fs,2);
3869        self.K3(4) = -2.00328387451608e-6*pow(fs,2);
3870        self.K2(4) = 1.30259664596996e-6*pow(fs,2);
3871        self.K1(4) = -3.00954708711922e-7*pow(fs,2) - 0.0150432178102554;
3872        self.K0(4) = -9.87778111222735e-9*pow(fs,2) + 0.0365684760864481;
3873        self.K5(5) = 1.70232916580416e-7*pow(fs,2);
3874        self.K4(5) = -6.75992775765549e-7*pow(fs,2);
3875        self.K3(5) = 1.00164193725804e-6*pow(fs,2) - 7.7521112860407e-5*fs;
3876        self.K2(5) = -6.51298322984981e-7*pow(fs,2) + 3.20288821276382e-5*fs;
3877        self.K1(5) = 1.50477354355961e-7*pow(fs,2) + 0.000168505574325945*fs - 0.00752160890512768;
3878        self.K0(5) = 4.93889055611368e-9*pow(fs,2) - 0.000123013343593176*fs + 0.0182842380432241;
3879 }
3880 
process(int n,float * u,float * o,PluginLV2 * plugin)3881 void DKPlugin::process(int n, float *u, float *o, PluginLV2 *plugin) {
3882     DKPlugin& self = *static_cast<DKPlugin*>(plugin);
3883     self.pots[0] =(*self.pots_);
3884     creal t[0+1];
3885     t[0] = (exp(5 * self.pots[0]) - 1) / (exp(5) - 1);
3886         for (int j = 0; j < n; j++) {
3887         self.pots_last[0] = 0.01 * t[0] + (1-0.01) * self.pots_last[0];
3888         double P6v = self.pots_last[0];
3889         Array<double, 6, 1> AB;
3890         AB = (((((self.K5 * P6v + self.K4) * P6v + self.K3) * P6v + self.K2) * P6v + self.K1) * P6v + self.K0);
3891         double out;
3892         out = ((u[j] * AB(0) + self.X(0) * AB(1) + self.X(1) * AB(2)) - (self.Y(0) * AB(4) + self.Y(1) * AB(5))) / AB(3);
3893         self.Y(1) = self.Y(0);
3894         self.Y(0) = out;
3895         self.X(1) = self.X(0);
3896         self.X(0) = u[j];
3897         o[j] = out;
3898     }
3899     u = o;
3900 
3901 // start copied and modified code
3902     Matrix<creal, 8, 1> mi;
3903     creal fnorm;
3904     Matrix<creal, 8, 1> mp;
3905     Array<creal, 8, 1> p_val;
3906     nonlin_param par(&mp, &mi, &g_v, &g_info, &g_nfev, &fnorm, &p_val);
3907     float buf[self.smp.max_out_count(n)];
3908     n = self.smp.up(n, u, buf);
3909 #define GET_U (buf+j*1)
3910 #define DTP_U float
3911     for (int j = 0; j < n; j++) {
3912 
3913         Matrix<creal, 8, 1> dp;
3914         dp << self.x_last, Map<Matrix<float,1,1> >(GET_U).cast<creal>();
3915         mp = Mp * dp;
3916         nonlin::nonlin(par);
3917         Matrix<creal, 16, 1> d;
3918         d << self.x_last, Map<Matrix<float,1,1> >(GET_U).cast<creal>(), mi;
3919         Matrix<creal, 7, 1>& xn = self.x_last;
3920         xn = Mx * d + Mxc;
3921         Map<Matrix<float, 1, 1> > xo(buf+1*j);
3922         xo = (Mo * d).cast<float>();
3923         {
3924             static double y;
3925             static double xm1;
3926             y = 0.999345929619 * (buf[j] - xm1) + 0.998691859237 * y;
3927             xm1 = buf[j];
3928             buf[j] = y;
3929         }
3930 
3931     }
3932 #undef GET_U
3933 #undef DTP_U
3934     self.smp.down(buf, o);
3935 // end copied code
3936 }
3937 
del_instance(PluginLV2 * p)3938 void DKPlugin::del_instance(PluginLV2 *p)
3939 {
3940 	delete static_cast<DKPlugin*>(p);
3941 }
3942 
3943 } // end namespace jcm800pre
3944