circom/multiplexer.js
multiplexer.jsRaw
1const bigInt = require("big-integer");
2const __P__ = new bigInt("21888242871839275222246405745257275088696311157297823662689037894645226208583");
3const __MASK__ = new bigInt(2).pow(253).minus(1);
4const circuit = {};
5module.exports = circuit;
6
7circuit.signals={
8 "one": {
9 "fullName": "one",
10 "value": "1",
11 "equivalence": "",
12 "direction": "",
13 "id": 0
14 },
15 "main.inp[0][0]": {
16 "fullName": "main.inp[0][0]",
17 "direction": "IN",
18 "component": "main",
19 "equivalence": "",
20 "alias": [
21 "main.inp[0][0]"
22 ],
23 "id": 1
24 },
25 "main.inp[0][1]": {
26 "fullName": "main.inp[0][1]",
27 "direction": "IN",
28 "component": "main",
29 "equivalence": "",
30 "alias": [
31 "main.inp[0][1]"
32 ],
33 "id": 2
34 },
35 "main.inp[0][2]": {
36 "fullName": "main.inp[0][2]",
37 "direction": "IN",
38 "component": "main",
39 "equivalence": "",
40 "alias": [
41 "main.inp[0][2]"
42 ],
43 "id": 3
44 },
45 "main.inp[0][3]": {
46 "fullName": "main.inp[0][3]",
47 "direction": "IN",
48 "component": "main",
49 "equivalence": "",
50 "alias": [
51 "main.inp[0][3]"
52 ],
53 "id": 4
54 },
55 "main.inp[0][4]": {
56 "fullName": "main.inp[0][4]",
57 "direction": "IN",
58 "component": "main",
59 "equivalence": "",
60 "alias": [
61 "main.inp[0][4]"
62 ],
63 "id": 5
64 },
65 "main.inp[0][5]": {
66 "fullName": "main.inp[0][5]",
67 "direction": "IN",
68 "component": "main",
69 "equivalence": "",
70 "alias": [
71 "main.inp[0][5]"
72 ],
73 "id": 6
74 },
75 "main.inp[0][6]": {
76 "fullName": "main.inp[0][6]",
77 "direction": "IN",
78 "component": "main",
79 "equivalence": "",
80 "alias": [
81 "main.inp[0][6]"
82 ],
83 "id": 7
84 },
85 "main.inp[0][7]": {
86 "fullName": "main.inp[0][7]",
87 "direction": "IN",
88 "component": "main",
89 "equivalence": "",
90 "alias": [
91 "main.inp[0][7]"
92 ],
93 "id": 8
94 },
95 "main.inp[1][0]": {
96 "fullName": "main.inp[1][0]",
97 "direction": "IN",
98 "component": "main",
99 "equivalence": "",
100 "alias": [
101 "main.inp[1][0]"
102 ],
103 "id": 9
104 },
105 "main.inp[1][1]": {
106 "fullName": "main.inp[1][1]",
107 "direction": "IN",
108 "component": "main",
109 "equivalence": "",
110 "alias": [
111 "main.inp[1][1]"
112 ],
113 "id": 10
114 },
115 "main.inp[1][2]": {
116 "fullName": "main.inp[1][2]",
117 "direction": "IN",
118 "component": "main",
119 "equivalence": "",
120 "alias": [
121 "main.inp[1][2]"
122 ],
123 "id": 11
124 },
125 "main.inp[1][3]": {
126 "fullName": "main.inp[1][3]",
127 "direction": "IN",
128 "component": "main",
129 "equivalence": "",
130 "alias": [
131 "main.inp[1][3]"
132 ],
133 "id": 12
134 },
135 "main.inp[1][4]": {
136 "fullName": "main.inp[1][4]",
137 "direction": "IN",
138 "component": "main",
139 "equivalence": "",
140 "alias": [
141 "main.inp[1][4]"
142 ],
143 "id": 13
144 },
145 "main.inp[1][5]": {
146 "fullName": "main.inp[1][5]",
147 "direction": "IN",
148 "component": "main",
149 "equivalence": "",
150 "alias": [
151 "main.inp[1][5]"
152 ],
153 "id": 14
154 },
155 "main.inp[1][6]": {
156 "fullName": "main.inp[1][6]",
157 "direction": "IN",
158 "component": "main",
159 "equivalence": "",
160 "alias": [
161 "main.inp[1][6]"
162 ],
163 "id": 15
164 },
165 "main.inp[1][7]": {
166 "fullName": "main.inp[1][7]",
167 "direction": "IN",
168 "component": "main",
169 "equivalence": "",
170 "alias": [
171 "main.inp[1][7]"
172 ],
173 "id": 16
174 },
175 "main.inp[2][0]": {
176 "fullName": "main.inp[2][0]",
177 "direction": "IN",
178 "component": "main",
179 "equivalence": "",
180 "alias": [
181 "main.inp[2][0]"
182 ],
183 "id": 17
184 },
185 "main.inp[2][1]": {
186 "fullName": "main.inp[2][1]",
187 "direction": "IN",
188 "component": "main",
189 "equivalence": "",
190 "alias": [
191 "main.inp[2][1]"
192 ],
193 "id": 18
194 },
195 "main.inp[2][2]": {
196 "fullName": "main.inp[2][2]",
197 "direction": "IN",
198 "component": "main",
199 "equivalence": "",
200 "alias": [
201 "main.inp[2][2]"
202 ],
203 "id": 19
204 },
205 "main.inp[2][3]": {
206 "fullName": "main.inp[2][3]",
207 "direction": "IN",
208 "component": "main",
209 "equivalence": "",
210 "alias": [
211 "main.inp[2][3]"
212 ],
213 "id": 20
214 },
215 "main.inp[2][4]": {
216 "fullName": "main.inp[2][4]",
217 "direction": "IN",
218 "component": "main",
219 "equivalence": "",
220 "alias": [
221 "main.inp[2][4]"
222 ],
223 "id": 21
224 },
225 "main.inp[2][5]": {
226 "fullName": "main.inp[2][5]",
227 "direction": "IN",
228 "component": "main",
229 "equivalence": "",
230 "alias": [
231 "main.inp[2][5]"
232 ],
233 "id": 22
234 },
235 "main.inp[2][6]": {
236 "fullName": "main.inp[2][6]",
237 "direction": "IN",
238 "component": "main",
239 "equivalence": "",
240 "alias": [
241 "main.inp[2][6]"
242 ],
243 "id": 23
244 },
245 "main.inp[2][7]": {
246 "fullName": "main.inp[2][7]",
247 "direction": "IN",
248 "component": "main",
249 "equivalence": "",
250 "alias": [
251 "main.inp[2][7]"
252 ],
253 "id": 24
254 },
255 "main.sel": {
256 "fullName": "main.sel",
257 "direction": "IN",
258 "component": "main",
259 "equivalence": "",
260 "alias": [
261 "main.sel"
262 ],
263 "id": 25
264 },
265 "main.out[0]": {
266 "fullName": "main.out[0]",
267 "direction": "OUT",
268 "component": "main",
269 "equivalence": "main.ep[0].out",
270 "alias": [
271 "main.out[0]",
272 null
273 ],
274 "id": 26
275 },
276 "main.out[1]": {
277 "fullName": "main.out[1]",
278 "direction": "OUT",
279 "component": "main",
280 "equivalence": "main.ep[1].out",
281 "alias": [
282 "main.out[1]",
283 null
284 ],
285 "id": 27
286 },
287 "main.out[2]": {
288 "fullName": "main.out[2]",
289 "direction": "OUT",
290 "component": "main",
291 "equivalence": "main.ep[2].out",
292 "alias": [
293 "main.out[2]",
294 null
295 ],
296 "id": 28
297 },
298 "main.out[3]": {
299 "fullName": "main.out[3]",
300 "direction": "OUT",
301 "component": "main",
302 "equivalence": "main.ep[3].out",
303 "alias": [
304 "main.out[3]",
305 null
306 ],
307 "id": 29
308 },
309 "main.out[4]": {
310 "fullName": "main.out[4]",
311 "direction": "OUT",
312 "component": "main",
313 "equivalence": "main.ep[4].out",
314 "alias": [
315 "main.out[4]",
316 null
317 ],
318 "id": 30
319 },
320 "main.out[5]": {
321 "fullName": "main.out[5]",
322 "direction": "OUT",
323 "component": "main",
324 "equivalence": "main.ep[5].out",
325 "alias": [
326 "main.out[5]",
327 null
328 ],
329 "id": 31
330 },
331 "main.out[6]": {
332 "fullName": "main.out[6]",
333 "direction": "OUT",
334 "component": "main",
335 "equivalence": "main.ep[6].out",
336 "alias": [
337 "main.out[6]",
338 null
339 ],
340 "id": 32
341 },
342 "main.out[7]": {
343 "fullName": "main.out[7]",
344 "direction": "OUT",
345 "component": "main",
346 "equivalence": "main.ep[7].out",
347 "alias": [
348 "main.out[7]",
349 null
350 ],
351 "id": 33
352 },
353 "main.dec.inp": {
354 "fullName": "main.dec.inp",
355 "direction": "IN",
356 "component": "main.dec",
357 "equivalence": "main.sel",
358 "alias": [
359 "main.dec.inp",
360 null
361 ],
362 "id": 25
363 },
364 "main.dec.out[0]": {
365 "fullName": "main.dec.out[0]",
366 "direction": "OUT",
367 "component": "main.dec",
368 "equivalence": "",
369 "alias": [
370 "main.dec.out[0]"
371 ],
372 "id": 34
373 },
374 "main.dec.out[1]": {
375 "fullName": "main.dec.out[1]",
376 "direction": "OUT",
377 "component": "main.dec",
378 "equivalence": "",
379 "alias": [
380 "main.dec.out[1]"
381 ],
382 "id": 35
383 },
384 "main.dec.out[2]": {
385 "fullName": "main.dec.out[2]",
386 "direction": "OUT",
387 "component": "main.dec",
388 "equivalence": "",
389 "alias": [
390 "main.dec.out[2]"
391 ],
392 "id": 36
393 },
394 "main.dec.success": {
395 "fullName": "main.dec.success",
396 "direction": "OUT",
397 "component": "main.dec",
398 "equivalence": "",
399 "alias": [
400 "main.dec.success"
401 ],
402 "id": 37
403 },
404 "main.ep[0].in1[0]": {
405 "fullName": "main.ep[0].in1[0]",
406 "direction": "IN",
407 "component": "main.ep[0]",
408 "equivalence": "main.inp[0][0]",
409 "alias": [
410 "main.ep[0].in1[0]",
411 null
412 ],
413 "id": 1
414 },
415 "main.ep[0].in1[1]": {
416 "fullName": "main.ep[0].in1[1]",
417 "direction": "IN",
418 "component": "main.ep[0]",
419 "equivalence": "main.inp[1][0]",
420 "alias": [
421 "main.ep[0].in1[1]",
422 null
423 ],
424 "id": 9
425 },
426 "main.ep[0].in1[2]": {
427 "fullName": "main.ep[0].in1[2]",
428 "direction": "IN",
429 "component": "main.ep[0]",
430 "equivalence": "main.inp[2][0]",
431 "alias": [
432 "main.ep[0].in1[2]",
433 null
434 ],
435 "id": 17
436 },
437 "main.ep[0].in2[0]": {
438 "fullName": "main.ep[0].in2[0]",
439 "direction": "IN",
440 "component": "main.ep[0]",
441 "equivalence": "main.dec.out[0]",
442 "alias": [
443 "main.ep[0].in2[0]",
444 null
445 ],
446 "id": 34
447 },
448 "main.ep[0].in2[1]": {
449 "fullName": "main.ep[0].in2[1]",
450 "direction": "IN",
451 "component": "main.ep[0]",
452 "equivalence": "main.dec.out[1]",
453 "alias": [
454 "main.ep[0].in2[1]",
455 null
456 ],
457 "id": 35
458 },
459 "main.ep[0].in2[2]": {
460 "fullName": "main.ep[0].in2[2]",
461 "direction": "IN",
462 "component": "main.ep[0]",
463 "equivalence": "main.dec.out[2]",
464 "alias": [
465 "main.ep[0].in2[2]",
466 null
467 ],
468 "id": 36
469 },
470 "main.ep[0].out": {
471 "fullName": "main.ep[0].out",
472 "direction": "OUT",
473 "component": "main.ep[0]",
474 "equivalence": "",
475 "alias": [
476 "main.ep[0].out"
477 ],
478 "id": 26
479 },
480 "main.ep[0].aux[0]": {
481 "fullName": "main.ep[0].aux[0]",
482 "direction": "",
483 "component": "main.ep[0]",
484 "equivalence": "",
485 "alias": [
486 "main.ep[0].aux[0]"
487 ],
488 "id": 38
489 },
490 "main.ep[0].aux[1]": {
491 "fullName": "main.ep[0].aux[1]",
492 "direction": "",
493 "component": "main.ep[0]",
494 "equivalence": "",
495 "alias": [
496 "main.ep[0].aux[1]"
497 ],
498 "id": 39
499 },
500 "main.ep[0].aux[2]": {
501 "fullName": "main.ep[0].aux[2]",
502 "direction": "",
503 "component": "main.ep[0]",
504 "equivalence": "",
505 "alias": [
506 "main.ep[0].aux[2]"
507 ],
508 "id": 40
509 },
510 "main.ep[1].in1[0]": {
511 "fullName": "main.ep[1].in1[0]",
512 "direction": "IN",
513 "component": "main.ep[1]",
514 "equivalence": "main.inp[0][1]",
515 "alias": [
516 "main.ep[1].in1[0]",
517 null
518 ],
519 "id": 2
520 },
521 "main.ep[1].in1[1]": {
522 "fullName": "main.ep[1].in1[1]",
523 "direction": "IN",
524 "component": "main.ep[1]",
525 "equivalence": "main.inp[1][1]",
526 "alias": [
527 "main.ep[1].in1[1]",
528 null
529 ],
530 "id": 10
531 },
532 "main.ep[1].in1[2]": {
533 "fullName": "main.ep[1].in1[2]",
534 "direction": "IN",
535 "component": "main.ep[1]",
536 "equivalence": "main.inp[2][1]",
537 "alias": [
538 "main.ep[1].in1[2]",
539 null
540 ],
541 "id": 18
542 },
543 "main.ep[1].in2[0]": {
544 "fullName": "main.ep[1].in2[0]",
545 "direction": "IN",
546 "component": "main.ep[1]",
547 "equivalence": "main.dec.out[0]",
548 "alias": [
549 "main.ep[1].in2[0]",
550 null
551 ],
552 "id": 34
553 },
554 "main.ep[1].in2[1]": {
555 "fullName": "main.ep[1].in2[1]",
556 "direction": "IN",
557 "component": "main.ep[1]",
558 "equivalence": "main.dec.out[1]",
559 "alias": [
560 "main.ep[1].in2[1]",
561 null
562 ],
563 "id": 35
564 },
565 "main.ep[1].in2[2]": {
566 "fullName": "main.ep[1].in2[2]",
567 "direction": "IN",
568 "component": "main.ep[1]",
569 "equivalence": "main.dec.out[2]",
570 "alias": [
571 "main.ep[1].in2[2]",
572 null
573 ],
574 "id": 36
575 },
576 "main.ep[1].out": {
577 "fullName": "main.ep[1].out",
578 "direction": "OUT",
579 "component": "main.ep[1]",
580 "equivalence": "",
581 "alias": [
582 "main.ep[1].out"
583 ],
584 "id": 27
585 },
586 "main.ep[1].aux[0]": {
587 "fullName": "main.ep[1].aux[0]",
588 "direction": "",
589 "component": "main.ep[1]",
590 "equivalence": "",
591 "alias": [
592 "main.ep[1].aux[0]"
593 ],
594 "id": 41
595 },
596 "main.ep[1].aux[1]": {
597 "fullName": "main.ep[1].aux[1]",
598 "direction": "",
599 "component": "main.ep[1]",
600 "equivalence": "",
601 "alias": [
602 "main.ep[1].aux[1]"
603 ],
604 "id": 42
605 },
606 "main.ep[1].aux[2]": {
607 "fullName": "main.ep[1].aux[2]",
608 "direction": "",
609 "component": "main.ep[1]",
610 "equivalence": "",
611 "alias": [
612 "main.ep[1].aux[2]"
613 ],
614 "id": 43
615 },
616 "main.ep[2].in1[0]": {
617 "fullName": "main.ep[2].in1[0]",
618 "direction": "IN",
619 "component": "main.ep[2]",
620 "equivalence": "main.inp[0][2]",
621 "alias": [
622 "main.ep[2].in1[0]",
623 null
624 ],
625 "id": 3
626 },
627 "main.ep[2].in1[1]": {
628 "fullName": "main.ep[2].in1[1]",
629 "direction": "IN",
630 "component": "main.ep[2]",
631 "equivalence": "main.inp[1][2]",
632 "alias": [
633 "main.ep[2].in1[1]",
634 null
635 ],
636 "id": 11
637 },
638 "main.ep[2].in1[2]": {
639 "fullName": "main.ep[2].in1[2]",
640 "direction": "IN",
641 "component": "main.ep[2]",
642 "equivalence": "main.inp[2][2]",
643 "alias": [
644 "main.ep[2].in1[2]",
645 null
646 ],
647 "id": 19
648 },
649 "main.ep[2].in2[0]": {
650 "fullName": "main.ep[2].in2[0]",
651 "direction": "IN",
652 "component": "main.ep[2]",
653 "equivalence": "main.dec.out[0]",
654 "alias": [
655 "main.ep[2].in2[0]",
656 null
657 ],
658 "id": 34
659 },
660 "main.ep[2].in2[1]": {
661 "fullName": "main.ep[2].in2[1]",
662 "direction": "IN",
663 "component": "main.ep[2]",
664 "equivalence": "main.dec.out[1]",
665 "alias": [
666 "main.ep[2].in2[1]",
667 null
668 ],
669 "id": 35
670 },
671 "main.ep[2].in2[2]": {
672 "fullName": "main.ep[2].in2[2]",
673 "direction": "IN",
674 "component": "main.ep[2]",
675 "equivalence": "main.dec.out[2]",
676 "alias": [
677 "main.ep[2].in2[2]",
678 null
679 ],
680 "id": 36
681 },
682 "main.ep[2].out": {
683 "fullName": "main.ep[2].out",
684 "direction": "OUT",
685 "component": "main.ep[2]",
686 "equivalence": "",
687 "alias": [
688 "main.ep[2].out"
689 ],
690 "id": 28
691 },
692 "main.ep[2].aux[0]": {
693 "fullName": "main.ep[2].aux[0]",
694 "direction": "",
695 "component": "main.ep[2]",
696 "equivalence": "",
697 "alias": [
698 "main.ep[2].aux[0]"
699 ],
700 "id": 44
701 },
702 "main.ep[2].aux[1]": {
703 "fullName": "main.ep[2].aux[1]",
704 "direction": "",
705 "component": "main.ep[2]",
706 "equivalence": "",
707 "alias": [
708 "main.ep[2].aux[1]"
709 ],
710 "id": 45
711 },
712 "main.ep[2].aux[2]": {
713 "fullName": "main.ep[2].aux[2]",
714 "direction": "",
715 "component": "main.ep[2]",
716 "equivalence": "",
717 "alias": [
718 "main.ep[2].aux[2]"
719 ],
720 "id": 46
721 },
722 "main.ep[3].in1[0]": {
723 "fullName": "main.ep[3].in1[0]",
724 "direction": "IN",
725 "component": "main.ep[3]",
726 "equivalence": "main.inp[0][3]",
727 "alias": [
728 "main.ep[3].in1[0]",
729 null
730 ],
731 "id": 4
732 },
733 "main.ep[3].in1[1]": {
734 "fullName": "main.ep[3].in1[1]",
735 "direction": "IN",
736 "component": "main.ep[3]",
737 "equivalence": "main.inp[1][3]",
738 "alias": [
739 "main.ep[3].in1[1]",
740 null
741 ],
742 "id": 12
743 },
744 "main.ep[3].in1[2]": {
745 "fullName": "main.ep[3].in1[2]",
746 "direction": "IN",
747 "component": "main.ep[3]",
748 "equivalence": "main.inp[2][3]",
749 "alias": [
750 "main.ep[3].in1[2]",
751 null
752 ],
753 "id": 20
754 },
755 "main.ep[3].in2[0]": {
756 "fullName": "main.ep[3].in2[0]",
757 "direction": "IN",
758 "component": "main.ep[3]",
759 "equivalence": "main.dec.out[0]",
760 "alias": [
761 "main.ep[3].in2[0]",
762 null
763 ],
764 "id": 34
765 },
766 "main.ep[3].in2[1]": {
767 "fullName": "main.ep[3].in2[1]",
768 "direction": "IN",
769 "component": "main.ep[3]",
770 "equivalence": "main.dec.out[1]",
771 "alias": [
772 "main.ep[3].in2[1]",
773 null
774 ],
775 "id": 35
776 },
777 "main.ep[3].in2[2]": {
778 "fullName": "main.ep[3].in2[2]",
779 "direction": "IN",
780 "component": "main.ep[3]",
781 "equivalence": "main.dec.out[2]",
782 "alias": [
783 "main.ep[3].in2[2]",
784 null
785 ],
786 "id": 36
787 },
788 "main.ep[3].out": {
789 "fullName": "main.ep[3].out",
790 "direction": "OUT",
791 "component": "main.ep[3]",
792 "equivalence": "",
793 "alias": [
794 "main.ep[3].out"
795 ],
796 "id": 29
797 },
798 "main.ep[3].aux[0]": {
799 "fullName": "main.ep[3].aux[0]",
800 "direction": "",
801 "component": "main.ep[3]",
802 "equivalence": "",
803 "alias": [
804 "main.ep[3].aux[0]"
805 ],
806 "id": 47
807 },
808 "main.ep[3].aux[1]": {
809 "fullName": "main.ep[3].aux[1]",
810 "direction": "",
811 "component": "main.ep[3]",
812 "equivalence": "",
813 "alias": [
814 "main.ep[3].aux[1]"
815 ],
816 "id": 48
817 },
818 "main.ep[3].aux[2]": {
819 "fullName": "main.ep[3].aux[2]",
820 "direction": "",
821 "component": "main.ep[3]",
822 "equivalence": "",
823 "alias": [
824 "main.ep[3].aux[2]"
825 ],
826 "id": 49
827 },
828 "main.ep[4].in1[0]": {
829 "fullName": "main.ep[4].in1[0]",
830 "direction": "IN",
831 "component": "main.ep[4]",
832 "equivalence": "main.inp[0][4]",
833 "alias": [
834 "main.ep[4].in1[0]",
835 null
836 ],
837 "id": 5
838 },
839 "main.ep[4].in1[1]": {
840 "fullName": "main.ep[4].in1[1]",
841 "direction": "IN",
842 "component": "main.ep[4]",
843 "equivalence": "main.inp[1][4]",
844 "alias": [
845 "main.ep[4].in1[1]",
846 null
847 ],
848 "id": 13
849 },
850 "main.ep[4].in1[2]": {
851 "fullName": "main.ep[4].in1[2]",
852 "direction": "IN",
853 "component": "main.ep[4]",
854 "equivalence": "main.inp[2][4]",
855 "alias": [
856 "main.ep[4].in1[2]",
857 null
858 ],
859 "id": 21
860 },
861 "main.ep[4].in2[0]": {
862 "fullName": "main.ep[4].in2[0]",
863 "direction": "IN",
864 "component": "main.ep[4]",
865 "equivalence": "main.dec.out[0]",
866 "alias": [
867 "main.ep[4].in2[0]",
868 null
869 ],
870 "id": 34
871 },
872 "main.ep[4].in2[1]": {
873 "fullName": "main.ep[4].in2[1]",
874 "direction": "IN",
875 "component": "main.ep[4]",
876 "equivalence": "main.dec.out[1]",
877 "alias": [
878 "main.ep[4].in2[1]",
879 null
880 ],
881 "id": 35
882 },
883 "main.ep[4].in2[2]": {
884 "fullName": "main.ep[4].in2[2]",
885 "direction": "IN",
886 "component": "main.ep[4]",
887 "equivalence": "main.dec.out[2]",
888 "alias": [
889 "main.ep[4].in2[2]",
890 null
891 ],
892 "id": 36
893 },
894 "main.ep[4].out": {
895 "fullName": "main.ep[4].out",
896 "direction": "OUT",
897 "component": "main.ep[4]",
898 "equivalence": "",
899 "alias": [
900 "main.ep[4].out"
901 ],
902 "id": 30
903 },
904 "main.ep[4].aux[0]": {
905 "fullName": "main.ep[4].aux[0]",
906 "direction": "",
907 "component": "main.ep[4]",
908 "equivalence": "",
909 "alias": [
910 "main.ep[4].aux[0]"
911 ],
912 "id": 50
913 },
914 "main.ep[4].aux[1]": {
915 "fullName": "main.ep[4].aux[1]",
916 "direction": "",
917 "component": "main.ep[4]",
918 "equivalence": "",
919 "alias": [
920 "main.ep[4].aux[1]"
921 ],
922 "id": 51
923 },
924 "main.ep[4].aux[2]": {
925 "fullName": "main.ep[4].aux[2]",
926 "direction": "",
927 "component": "main.ep[4]",
928 "equivalence": "",
929 "alias": [
930 "main.ep[4].aux[2]"
931 ],
932 "id": 52
933 },
934 "main.ep[5].in1[0]": {
935 "fullName": "main.ep[5].in1[0]",
936 "direction": "IN",
937 "component": "main.ep[5]",
938 "equivalence": "main.inp[0][5]",
939 "alias": [
940 "main.ep[5].in1[0]",
941 null
942 ],
943 "id": 6
944 },
945 "main.ep[5].in1[1]": {
946 "fullName": "main.ep[5].in1[1]",
947 "direction": "IN",
948 "component": "main.ep[5]",
949 "equivalence": "main.inp[1][5]",
950 "alias": [
951 "main.ep[5].in1[1]",
952 null
953 ],
954 "id": 14
955 },
956 "main.ep[5].in1[2]": {
957 "fullName": "main.ep[5].in1[2]",
958 "direction": "IN",
959 "component": "main.ep[5]",
960 "equivalence": "main.inp[2][5]",
961 "alias": [
962 "main.ep[5].in1[2]",
963 null
964 ],
965 "id": 22
966 },
967 "main.ep[5].in2[0]": {
968 "fullName": "main.ep[5].in2[0]",
969 "direction": "IN",
970 "component": "main.ep[5]",
971 "equivalence": "main.dec.out[0]",
972 "alias": [
973 "main.ep[5].in2[0]",
974 null
975 ],
976 "id": 34
977 },
978 "main.ep[5].in2[1]": {
979 "fullName": "main.ep[5].in2[1]",
980 "direction": "IN",
981 "component": "main.ep[5]",
982 "equivalence": "main.dec.out[1]",
983 "alias": [
984 "main.ep[5].in2[1]",
985 null
986 ],
987 "id": 35
988 },
989 "main.ep[5].in2[2]": {
990 "fullName": "main.ep[5].in2[2]",
991 "direction": "IN",
992 "component": "main.ep[5]",
993 "equivalence": "main.dec.out[2]",
994 "alias": [
995 "main.ep[5].in2[2]",
996 null
997 ],
998 "id": 36
999 },
1000 "main.ep[5].out": {
1001 "fullName": "main.ep[5].out",
1002 "direction": "OUT",
1003 "component": "main.ep[5]",
1004 "equivalence": "",
1005 "alias": [
1006 "main.ep[5].out"
1007 ],
1008 "id": 31
1009 },
1010 "main.ep[5].aux[0]": {
1011 "fullName": "main.ep[5].aux[0]",
1012 "direction": "",
1013 "component": "main.ep[5]",
1014 "equivalence": "",
1015 "alias": [
1016 "main.ep[5].aux[0]"
1017 ],
1018 "id": 53
1019 },
1020 "main.ep[5].aux[1]": {
1021 "fullName": "main.ep[5].aux[1]",
1022 "direction": "",
1023 "component": "main.ep[5]",
1024 "equivalence": "",
1025 "alias": [
1026 "main.ep[5].aux[1]"
1027 ],
1028 "id": 54
1029 },
1030 "main.ep[5].aux[2]": {
1031 "fullName": "main.ep[5].aux[2]",
1032 "direction": "",
1033 "component": "main.ep[5]",
1034 "equivalence": "",
1035 "alias": [
1036 "main.ep[5].aux[2]"
1037 ],
1038 "id": 55
1039 },
1040 "main.ep[6].in1[0]": {
1041 "fullName": "main.ep[6].in1[0]",
1042 "direction": "IN",
1043 "component": "main.ep[6]",
1044 "equivalence": "main.inp[0][6]",
1045 "alias": [
1046 "main.ep[6].in1[0]",
1047 null
1048 ],
1049 "id": 7
1050 },
1051 "main.ep[6].in1[1]": {
1052 "fullName": "main.ep[6].in1[1]",
1053 "direction": "IN",
1054 "component": "main.ep[6]",
1055 "equivalence": "main.inp[1][6]",
1056 "alias": [
1057 "main.ep[6].in1[1]",
1058 null
1059 ],
1060 "id": 15
1061 },
1062 "main.ep[6].in1[2]": {
1063 "fullName": "main.ep[6].in1[2]",
1064 "direction": "IN",
1065 "component": "main.ep[6]",
1066 "equivalence": "main.inp[2][6]",
1067 "alias": [
1068 "main.ep[6].in1[2]",
1069 null
1070 ],
1071 "id": 23
1072 },
1073 "main.ep[6].in2[0]": {
1074 "fullName": "main.ep[6].in2[0]",
1075 "direction": "IN",
1076 "component": "main.ep[6]",
1077 "equivalence": "main.dec.out[0]",
1078 "alias": [
1079 "main.ep[6].in2[0]",
1080 null
1081 ],
1082 "id": 34
1083 },
1084 "main.ep[6].in2[1]": {
1085 "fullName": "main.ep[6].in2[1]",
1086 "direction": "IN",
1087 "component": "main.ep[6]",
1088 "equivalence": "main.dec.out[1]",
1089 "alias": [
1090 "main.ep[6].in2[1]",
1091 null
1092 ],
1093 "id": 35
1094 },
1095 "main.ep[6].in2[2]": {
1096 "fullName": "main.ep[6].in2[2]",
1097 "direction": "IN",
1098 "component": "main.ep[6]",
1099 "equivalence": "main.dec.out[2]",
1100 "alias": [
1101 "main.ep[6].in2[2]",
1102 null
1103 ],
1104 "id": 36
1105 },
1106 "main.ep[6].out": {
1107 "fullName": "main.ep[6].out",
1108 "direction": "OUT",
1109 "component": "main.ep[6]",
1110 "equivalence": "",
1111 "alias": [
1112 "main.ep[6].out"
1113 ],
1114 "id": 32
1115 },
1116 "main.ep[6].aux[0]": {
1117 "fullName": "main.ep[6].aux[0]",
1118 "direction": "",
1119 "component": "main.ep[6]",
1120 "equivalence": "",
1121 "alias": [
1122 "main.ep[6].aux[0]"
1123 ],
1124 "id": 56
1125 },
1126 "main.ep[6].aux[1]": {
1127 "fullName": "main.ep[6].aux[1]",
1128 "direction": "",
1129 "component": "main.ep[6]",
1130 "equivalence": "",
1131 "alias": [
1132 "main.ep[6].aux[1]"
1133 ],
1134 "id": 57
1135 },
1136 "main.ep[6].aux[2]": {
1137 "fullName": "main.ep[6].aux[2]",
1138 "direction": "",
1139 "component": "main.ep[6]",
1140 "equivalence": "",
1141 "alias": [
1142 "main.ep[6].aux[2]"
1143 ],
1144 "id": 58
1145 },
1146 "main.ep[7].in1[0]": {
1147 "fullName": "main.ep[7].in1[0]",
1148 "direction": "IN",
1149 "component": "main.ep[7]",
1150 "equivalence": "main.inp[0][7]",
1151 "alias": [
1152 "main.ep[7].in1[0]",
1153 null
1154 ],
1155 "id": 8
1156 },
1157 "main.ep[7].in1[1]": {
1158 "fullName": "main.ep[7].in1[1]",
1159 "direction": "IN",
1160 "component": "main.ep[7]",
1161 "equivalence": "main.inp[1][7]",
1162 "alias": [
1163 "main.ep[7].in1[1]",
1164 null
1165 ],
1166 "id": 16
1167 },
1168 "main.ep[7].in1[2]": {
1169 "fullName": "main.ep[7].in1[2]",
1170 "direction": "IN",
1171 "component": "main.ep[7]",
1172 "equivalence": "main.inp[2][7]",
1173 "alias": [
1174 "main.ep[7].in1[2]",
1175 null
1176 ],
1177 "id": 24
1178 },
1179 "main.ep[7].in2[0]": {
1180 "fullName": "main.ep[7].in2[0]",
1181 "direction": "IN",
1182 "component": "main.ep[7]",
1183 "equivalence": "main.dec.out[0]",
1184 "alias": [
1185 "main.ep[7].in2[0]",
1186 null
1187 ],
1188 "id": 34
1189 },
1190 "main.ep[7].in2[1]": {
1191 "fullName": "main.ep[7].in2[1]",
1192 "direction": "IN",
1193 "component": "main.ep[7]",
1194 "equivalence": "main.dec.out[1]",
1195 "alias": [
1196 "main.ep[7].in2[1]",
1197 null
1198 ],
1199 "id": 35
1200 },
1201 "main.ep[7].in2[2]": {
1202 "fullName": "main.ep[7].in2[2]",
1203 "direction": "IN",
1204 "component": "main.ep[7]",
1205 "equivalence": "main.dec.out[2]",
1206 "alias": [
1207 "main.ep[7].in2[2]",
1208 null
1209 ],
1210 "id": 36
1211 },
1212 "main.ep[7].out": {
1213 "fullName": "main.ep[7].out",
1214 "direction": "OUT",
1215 "component": "main.ep[7]",
1216 "equivalence": "",
1217 "alias": [
1218 "main.ep[7].out"
1219 ],
1220 "id": 33
1221 },
1222 "main.ep[7].aux[0]": {
1223 "fullName": "main.ep[7].aux[0]",
1224 "direction": "",
1225 "component": "main.ep[7]",
1226 "equivalence": "",
1227 "alias": [
1228 "main.ep[7].aux[0]"
1229 ],
1230 "id": 59
1231 },
1232 "main.ep[7].aux[1]": {
1233 "fullName": "main.ep[7].aux[1]",
1234 "direction": "",
1235 "component": "main.ep[7]",
1236 "equivalence": "",
1237 "alias": [
1238 "main.ep[7].aux[1]"
1239 ],
1240 "id": 60
1241 },
1242 "main.ep[7].aux[2]": {
1243 "fullName": "main.ep[7].aux[2]",
1244 "direction": "",
1245 "component": "main.ep[7]",
1246 "equivalence": "",
1247 "alias": [
1248 "main.ep[7].aux[2]"
1249 ],
1250 "id": 61
1251 }
1252};
1253
1254circuit.components={
1255 "main": {
1256 "signals": [
1257 "main.inp[0][0]",
1258 "main.inp[0][1]",
1259 "main.inp[0][2]",
1260 "main.inp[0][3]",
1261 "main.inp[0][4]",
1262 "main.inp[0][5]",
1263 "main.inp[0][6]",
1264 "main.inp[0][7]",
1265 "main.inp[1][0]",
1266 "main.inp[1][1]",
1267 "main.inp[1][2]",
1268 "main.inp[1][3]",
1269 "main.inp[1][4]",
1270 "main.inp[1][5]",
1271 "main.inp[1][6]",
1272 "main.inp[1][7]",
1273 "main.inp[2][0]",
1274 "main.inp[2][1]",
1275 "main.inp[2][2]",
1276 "main.inp[2][3]",
1277 "main.inp[2][4]",
1278 "main.inp[2][5]",
1279 "main.inp[2][6]",
1280 "main.inp[2][7]",
1281 "main.sel",
1282 "main.out[0]",
1283 "main.out[1]",
1284 "main.out[2]",
1285 "main.out[3]",
1286 "main.out[4]",
1287 "main.out[5]",
1288 "main.out[6]",
1289 "main.out[7]"
1290 ],
1291 "params": {
1292 "wIn": "8",
1293 "nIn": "3"
1294 },
1295 "template": "Multiplexor",
1296 "inputSignals": 25
1297 },
1298 "main.dec": {
1299 "signals": [
1300 "main.dec.inp",
1301 "main.dec.out[0]",
1302 "main.dec.out[1]",
1303 "main.dec.out[2]",
1304 "main.dec.success"
1305 ],
1306 "params": {
1307 "w": "3"
1308 },
1309 "template": "Decoder",
1310 "inputSignals": 1
1311 },
1312 "main.ep[0]": {
1313 "signals": [
1314 "main.ep[0].in1[0]",
1315 "main.ep[0].in1[1]",
1316 "main.ep[0].in1[2]",
1317 "main.ep[0].in2[0]",
1318 "main.ep[0].in2[1]",
1319 "main.ep[0].in2[2]",
1320 "main.ep[0].out",
1321 "main.ep[0].aux[0]",
1322 "main.ep[0].aux[1]",
1323 "main.ep[0].aux[2]"
1324 ],
1325 "params": {
1326 "w": "3"
1327 },
1328 "template": "EscalarProduct",
1329 "inputSignals": 6
1330 },
1331 "main.ep[1]": {
1332 "signals": [
1333 "main.ep[1].in1[0]",
1334 "main.ep[1].in1[1]",
1335 "main.ep[1].in1[2]",
1336 "main.ep[1].in2[0]",
1337 "main.ep[1].in2[1]",
1338 "main.ep[1].in2[2]",
1339 "main.ep[1].out",
1340 "main.ep[1].aux[0]",
1341 "main.ep[1].aux[1]",
1342 "main.ep[1].aux[2]"
1343 ],
1344 "params": {
1345 "w": "3"
1346 },
1347 "template": "EscalarProduct",
1348 "inputSignals": 6
1349 },
1350 "main.ep[2]": {
1351 "signals": [
1352 "main.ep[2].in1[0]",
1353 "main.ep[2].in1[1]",
1354 "main.ep[2].in1[2]",
1355 "main.ep[2].in2[0]",
1356 "main.ep[2].in2[1]",
1357 "main.ep[2].in2[2]",
1358 "main.ep[2].out",
1359 "main.ep[2].aux[0]",
1360 "main.ep[2].aux[1]",
1361 "main.ep[2].aux[2]"
1362 ],
1363 "params": {
1364 "w": "3"
1365 },
1366 "template": "EscalarProduct",
1367 "inputSignals": 6
1368 },
1369 "main.ep[3]": {
1370 "signals": [
1371 "main.ep[3].in1[0]",
1372 "main.ep[3].in1[1]",
1373 "main.ep[3].in1[2]",
1374 "main.ep[3].in2[0]",
1375 "main.ep[3].in2[1]",
1376 "main.ep[3].in2[2]",
1377 "main.ep[3].out",
1378 "main.ep[3].aux[0]",
1379 "main.ep[3].aux[1]",
1380 "main.ep[3].aux[2]"
1381 ],
1382 "params": {
1383 "w": "3"
1384 },
1385 "template": "EscalarProduct",
1386 "inputSignals": 6
1387 },
1388 "main.ep[4]": {
1389 "signals": [
1390 "main.ep[4].in1[0]",
1391 "main.ep[4].in1[1]",
1392 "main.ep[4].in1[2]",
1393 "main.ep[4].in2[0]",
1394 "main.ep[4].in2[1]",
1395 "main.ep[4].in2[2]",
1396 "main.ep[4].out",
1397 "main.ep[4].aux[0]",
1398 "main.ep[4].aux[1]",
1399 "main.ep[4].aux[2]"
1400 ],
1401 "params": {
1402 "w": "3"
1403 },
1404 "template": "EscalarProduct",
1405 "inputSignals": 6
1406 },
1407 "main.ep[5]": {
1408 "signals": [
1409 "main.ep[5].in1[0]",
1410 "main.ep[5].in1[1]",
1411 "main.ep[5].in1[2]",
1412 "main.ep[5].in2[0]",
1413 "main.ep[5].in2[1]",
1414 "main.ep[5].in2[2]",
1415 "main.ep[5].out",
1416 "main.ep[5].aux[0]",
1417 "main.ep[5].aux[1]",
1418 "main.ep[5].aux[2]"
1419 ],
1420 "params": {
1421 "w": "3"
1422 },
1423 "template": "EscalarProduct",
1424 "inputSignals": 6
1425 },
1426 "main.ep[6]": {
1427 "signals": [
1428 "main.ep[6].in1[0]",
1429 "main.ep[6].in1[1]",
1430 "main.ep[6].in1[2]",
1431 "main.ep[6].in2[0]",
1432 "main.ep[6].in2[1]",
1433 "main.ep[6].in2[2]",
1434 "main.ep[6].out",
1435 "main.ep[6].aux[0]",
1436 "main.ep[6].aux[1]",
1437 "main.ep[6].aux[2]"
1438 ],
1439 "params": {
1440 "w": "3"
1441 },
1442 "template": "EscalarProduct",
1443 "inputSignals": 6
1444 },
1445 "main.ep[7]": {
1446 "signals": [
1447 "main.ep[7].in1[0]",
1448 "main.ep[7].in1[1]",
1449 "main.ep[7].in1[2]",
1450 "main.ep[7].in2[0]",
1451 "main.ep[7].in2[1]",
1452 "main.ep[7].in2[2]",
1453 "main.ep[7].out",
1454 "main.ep[7].aux[0]",
1455 "main.ep[7].aux[1]",
1456 "main.ep[7].aux[2]"
1457 ],
1458 "params": {
1459 "w": "3"
1460 },
1461 "template": "EscalarProduct",
1462 "inputSignals": 6
1463 }
1464};
1465
1466circuit.signalConstrains=[
1467 {
1468 "type": "QEQ",
1469 "a": {
1470 "type": "LINEARCOMBINATION",
1471 "values": {
1472 "main.dec.out[0]": "1"
1473 }
1474 },
1475 "b": {
1476 "type": "LINEARCOMBINATION",
1477 "values": {
1478 "main.sel": "1"
1479 }
1480 },
1481 "c": {
1482 "type": "LINEARCOMBINATION",
1483 "values": {}
1484 }
1485 },
1486 {
1487 "type": "QEQ",
1488 "a": {
1489 "type": "LINEARCOMBINATION",
1490 "values": {
1491 "main.dec.out[1]": "1"
1492 }
1493 },
1494 "b": {
1495 "type": "LINEARCOMBINATION",
1496 "values": {
1497 "one": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1498 "main.sel": "1"
1499 }
1500 },
1501 "c": {
1502 "type": "LINEARCOMBINATION",
1503 "values": {}
1504 }
1505 },
1506 {
1507 "type": "QEQ",
1508 "a": {
1509 "type": "LINEARCOMBINATION",
1510 "values": {
1511 "main.dec.out[2]": "1"
1512 }
1513 },
1514 "b": {
1515 "type": "LINEARCOMBINATION",
1516 "values": {
1517 "one": "21888242871839275222246405745257275088696311157297823662689037894645226208581",
1518 "main.sel": "1"
1519 }
1520 },
1521 "c": {
1522 "type": "LINEARCOMBINATION",
1523 "values": {}
1524 }
1525 },
1526 {
1527 "type": "QEQ",
1528 "a": {
1529 "type": "LINEARCOMBINATION",
1530 "values": {}
1531 },
1532 "b": {
1533 "type": "LINEARCOMBINATION",
1534 "values": {}
1535 },
1536 "c": {
1537 "type": "LINEARCOMBINATION",
1538 "values": {
1539 "main.dec.success": "1",
1540 "main.dec.out[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1541 "main.dec.out[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1542 "main.dec.out[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1543 }
1544 }
1545 },
1546 {
1547 "type": "QEQ",
1548 "a": {
1549 "type": "LINEARCOMBINATION",
1550 "values": {
1551 "main.dec.success": "1"
1552 }
1553 },
1554 "b": {
1555 "type": "LINEARCOMBINATION",
1556 "values": {
1557 "main.dec.success": "1",
1558 "one": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1559 }
1560 },
1561 "c": {
1562 "type": "LINEARCOMBINATION",
1563 "values": {}
1564 }
1565 },
1566 {
1567 "type": "QEQ",
1568 "a": {
1569 "type": "LINEARCOMBINATION",
1570 "values": {
1571 "main.inp[0][0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1572 }
1573 },
1574 "b": {
1575 "type": "LINEARCOMBINATION",
1576 "values": {
1577 "main.dec.out[0]": "1"
1578 }
1579 },
1580 "c": {
1581 "type": "LINEARCOMBINATION",
1582 "values": {
1583 "main.ep[0].aux[0]": "1"
1584 }
1585 }
1586 },
1587 {
1588 "type": "QEQ",
1589 "a": {
1590 "type": "LINEARCOMBINATION",
1591 "values": {
1592 "main.inp[1][0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1593 }
1594 },
1595 "b": {
1596 "type": "LINEARCOMBINATION",
1597 "values": {
1598 "main.dec.out[1]": "1"
1599 }
1600 },
1601 "c": {
1602 "type": "LINEARCOMBINATION",
1603 "values": {
1604 "main.ep[0].aux[1]": "1"
1605 }
1606 }
1607 },
1608 {
1609 "type": "QEQ",
1610 "a": {
1611 "type": "LINEARCOMBINATION",
1612 "values": {
1613 "main.inp[2][0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1614 }
1615 },
1616 "b": {
1617 "type": "LINEARCOMBINATION",
1618 "values": {
1619 "main.dec.out[2]": "1"
1620 }
1621 },
1622 "c": {
1623 "type": "LINEARCOMBINATION",
1624 "values": {
1625 "main.ep[0].aux[2]": "1"
1626 }
1627 }
1628 },
1629 {
1630 "type": "QEQ",
1631 "a": {
1632 "type": "LINEARCOMBINATION",
1633 "values": {}
1634 },
1635 "b": {
1636 "type": "LINEARCOMBINATION",
1637 "values": {}
1638 },
1639 "c": {
1640 "type": "LINEARCOMBINATION",
1641 "values": {
1642 "main.ep[0].out": "1",
1643 "main.ep[0].aux[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1644 "main.ep[0].aux[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1645 "main.ep[0].aux[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1646 }
1647 }
1648 },
1649 {
1650 "type": "QEQ",
1651 "a": {
1652 "type": "LINEARCOMBINATION",
1653 "values": {
1654 "main.inp[0][1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1655 }
1656 },
1657 "b": {
1658 "type": "LINEARCOMBINATION",
1659 "values": {
1660 "main.dec.out[0]": "1"
1661 }
1662 },
1663 "c": {
1664 "type": "LINEARCOMBINATION",
1665 "values": {
1666 "main.ep[1].aux[0]": "1"
1667 }
1668 }
1669 },
1670 {
1671 "type": "QEQ",
1672 "a": {
1673 "type": "LINEARCOMBINATION",
1674 "values": {
1675 "main.inp[1][1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1676 }
1677 },
1678 "b": {
1679 "type": "LINEARCOMBINATION",
1680 "values": {
1681 "main.dec.out[1]": "1"
1682 }
1683 },
1684 "c": {
1685 "type": "LINEARCOMBINATION",
1686 "values": {
1687 "main.ep[1].aux[1]": "1"
1688 }
1689 }
1690 },
1691 {
1692 "type": "QEQ",
1693 "a": {
1694 "type": "LINEARCOMBINATION",
1695 "values": {
1696 "main.inp[2][1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1697 }
1698 },
1699 "b": {
1700 "type": "LINEARCOMBINATION",
1701 "values": {
1702 "main.dec.out[2]": "1"
1703 }
1704 },
1705 "c": {
1706 "type": "LINEARCOMBINATION",
1707 "values": {
1708 "main.ep[1].aux[2]": "1"
1709 }
1710 }
1711 },
1712 {
1713 "type": "QEQ",
1714 "a": {
1715 "type": "LINEARCOMBINATION",
1716 "values": {}
1717 },
1718 "b": {
1719 "type": "LINEARCOMBINATION",
1720 "values": {}
1721 },
1722 "c": {
1723 "type": "LINEARCOMBINATION",
1724 "values": {
1725 "main.ep[1].out": "1",
1726 "main.ep[1].aux[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1727 "main.ep[1].aux[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1728 "main.ep[1].aux[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1729 }
1730 }
1731 },
1732 {
1733 "type": "QEQ",
1734 "a": {
1735 "type": "LINEARCOMBINATION",
1736 "values": {
1737 "main.inp[0][2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1738 }
1739 },
1740 "b": {
1741 "type": "LINEARCOMBINATION",
1742 "values": {
1743 "main.dec.out[0]": "1"
1744 }
1745 },
1746 "c": {
1747 "type": "LINEARCOMBINATION",
1748 "values": {
1749 "main.ep[2].aux[0]": "1"
1750 }
1751 }
1752 },
1753 {
1754 "type": "QEQ",
1755 "a": {
1756 "type": "LINEARCOMBINATION",
1757 "values": {
1758 "main.inp[1][2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1759 }
1760 },
1761 "b": {
1762 "type": "LINEARCOMBINATION",
1763 "values": {
1764 "main.dec.out[1]": "1"
1765 }
1766 },
1767 "c": {
1768 "type": "LINEARCOMBINATION",
1769 "values": {
1770 "main.ep[2].aux[1]": "1"
1771 }
1772 }
1773 },
1774 {
1775 "type": "QEQ",
1776 "a": {
1777 "type": "LINEARCOMBINATION",
1778 "values": {
1779 "main.inp[2][2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1780 }
1781 },
1782 "b": {
1783 "type": "LINEARCOMBINATION",
1784 "values": {
1785 "main.dec.out[2]": "1"
1786 }
1787 },
1788 "c": {
1789 "type": "LINEARCOMBINATION",
1790 "values": {
1791 "main.ep[2].aux[2]": "1"
1792 }
1793 }
1794 },
1795 {
1796 "type": "QEQ",
1797 "a": {
1798 "type": "LINEARCOMBINATION",
1799 "values": {}
1800 },
1801 "b": {
1802 "type": "LINEARCOMBINATION",
1803 "values": {}
1804 },
1805 "c": {
1806 "type": "LINEARCOMBINATION",
1807 "values": {
1808 "main.ep[2].out": "1",
1809 "main.ep[2].aux[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1810 "main.ep[2].aux[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1811 "main.ep[2].aux[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1812 }
1813 }
1814 },
1815 {
1816 "type": "QEQ",
1817 "a": {
1818 "type": "LINEARCOMBINATION",
1819 "values": {
1820 "main.inp[0][3]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1821 }
1822 },
1823 "b": {
1824 "type": "LINEARCOMBINATION",
1825 "values": {
1826 "main.dec.out[0]": "1"
1827 }
1828 },
1829 "c": {
1830 "type": "LINEARCOMBINATION",
1831 "values": {
1832 "main.ep[3].aux[0]": "1"
1833 }
1834 }
1835 },
1836 {
1837 "type": "QEQ",
1838 "a": {
1839 "type": "LINEARCOMBINATION",
1840 "values": {
1841 "main.inp[1][3]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1842 }
1843 },
1844 "b": {
1845 "type": "LINEARCOMBINATION",
1846 "values": {
1847 "main.dec.out[1]": "1"
1848 }
1849 },
1850 "c": {
1851 "type": "LINEARCOMBINATION",
1852 "values": {
1853 "main.ep[3].aux[1]": "1"
1854 }
1855 }
1856 },
1857 {
1858 "type": "QEQ",
1859 "a": {
1860 "type": "LINEARCOMBINATION",
1861 "values": {
1862 "main.inp[2][3]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1863 }
1864 },
1865 "b": {
1866 "type": "LINEARCOMBINATION",
1867 "values": {
1868 "main.dec.out[2]": "1"
1869 }
1870 },
1871 "c": {
1872 "type": "LINEARCOMBINATION",
1873 "values": {
1874 "main.ep[3].aux[2]": "1"
1875 }
1876 }
1877 },
1878 {
1879 "type": "QEQ",
1880 "a": {
1881 "type": "LINEARCOMBINATION",
1882 "values": {}
1883 },
1884 "b": {
1885 "type": "LINEARCOMBINATION",
1886 "values": {}
1887 },
1888 "c": {
1889 "type": "LINEARCOMBINATION",
1890 "values": {
1891 "main.ep[3].out": "1",
1892 "main.ep[3].aux[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1893 "main.ep[3].aux[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1894 "main.ep[3].aux[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1895 }
1896 }
1897 },
1898 {
1899 "type": "QEQ",
1900 "a": {
1901 "type": "LINEARCOMBINATION",
1902 "values": {
1903 "main.inp[0][4]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1904 }
1905 },
1906 "b": {
1907 "type": "LINEARCOMBINATION",
1908 "values": {
1909 "main.dec.out[0]": "1"
1910 }
1911 },
1912 "c": {
1913 "type": "LINEARCOMBINATION",
1914 "values": {
1915 "main.ep[4].aux[0]": "1"
1916 }
1917 }
1918 },
1919 {
1920 "type": "QEQ",
1921 "a": {
1922 "type": "LINEARCOMBINATION",
1923 "values": {
1924 "main.inp[1][4]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1925 }
1926 },
1927 "b": {
1928 "type": "LINEARCOMBINATION",
1929 "values": {
1930 "main.dec.out[1]": "1"
1931 }
1932 },
1933 "c": {
1934 "type": "LINEARCOMBINATION",
1935 "values": {
1936 "main.ep[4].aux[1]": "1"
1937 }
1938 }
1939 },
1940 {
1941 "type": "QEQ",
1942 "a": {
1943 "type": "LINEARCOMBINATION",
1944 "values": {
1945 "main.inp[2][4]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1946 }
1947 },
1948 "b": {
1949 "type": "LINEARCOMBINATION",
1950 "values": {
1951 "main.dec.out[2]": "1"
1952 }
1953 },
1954 "c": {
1955 "type": "LINEARCOMBINATION",
1956 "values": {
1957 "main.ep[4].aux[2]": "1"
1958 }
1959 }
1960 },
1961 {
1962 "type": "QEQ",
1963 "a": {
1964 "type": "LINEARCOMBINATION",
1965 "values": {}
1966 },
1967 "b": {
1968 "type": "LINEARCOMBINATION",
1969 "values": {}
1970 },
1971 "c": {
1972 "type": "LINEARCOMBINATION",
1973 "values": {
1974 "main.ep[4].out": "1",
1975 "main.ep[4].aux[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1976 "main.ep[4].aux[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
1977 "main.ep[4].aux[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1978 }
1979 }
1980 },
1981 {
1982 "type": "QEQ",
1983 "a": {
1984 "type": "LINEARCOMBINATION",
1985 "values": {
1986 "main.inp[0][5]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
1987 }
1988 },
1989 "b": {
1990 "type": "LINEARCOMBINATION",
1991 "values": {
1992 "main.dec.out[0]": "1"
1993 }
1994 },
1995 "c": {
1996 "type": "LINEARCOMBINATION",
1997 "values": {
1998 "main.ep[5].aux[0]": "1"
1999 }
2000 }
2001 },
2002 {
2003 "type": "QEQ",
2004 "a": {
2005 "type": "LINEARCOMBINATION",
2006 "values": {
2007 "main.inp[1][5]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2008 }
2009 },
2010 "b": {
2011 "type": "LINEARCOMBINATION",
2012 "values": {
2013 "main.dec.out[1]": "1"
2014 }
2015 },
2016 "c": {
2017 "type": "LINEARCOMBINATION",
2018 "values": {
2019 "main.ep[5].aux[1]": "1"
2020 }
2021 }
2022 },
2023 {
2024 "type": "QEQ",
2025 "a": {
2026 "type": "LINEARCOMBINATION",
2027 "values": {
2028 "main.inp[2][5]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2029 }
2030 },
2031 "b": {
2032 "type": "LINEARCOMBINATION",
2033 "values": {
2034 "main.dec.out[2]": "1"
2035 }
2036 },
2037 "c": {
2038 "type": "LINEARCOMBINATION",
2039 "values": {
2040 "main.ep[5].aux[2]": "1"
2041 }
2042 }
2043 },
2044 {
2045 "type": "QEQ",
2046 "a": {
2047 "type": "LINEARCOMBINATION",
2048 "values": {}
2049 },
2050 "b": {
2051 "type": "LINEARCOMBINATION",
2052 "values": {}
2053 },
2054 "c": {
2055 "type": "LINEARCOMBINATION",
2056 "values": {
2057 "main.ep[5].out": "1",
2058 "main.ep[5].aux[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
2059 "main.ep[5].aux[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
2060 "main.ep[5].aux[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2061 }
2062 }
2063 },
2064 {
2065 "type": "QEQ",
2066 "a": {
2067 "type": "LINEARCOMBINATION",
2068 "values": {
2069 "main.inp[0][6]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2070 }
2071 },
2072 "b": {
2073 "type": "LINEARCOMBINATION",
2074 "values": {
2075 "main.dec.out[0]": "1"
2076 }
2077 },
2078 "c": {
2079 "type": "LINEARCOMBINATION",
2080 "values": {
2081 "main.ep[6].aux[0]": "1"
2082 }
2083 }
2084 },
2085 {
2086 "type": "QEQ",
2087 "a": {
2088 "type": "LINEARCOMBINATION",
2089 "values": {
2090 "main.inp[1][6]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2091 }
2092 },
2093 "b": {
2094 "type": "LINEARCOMBINATION",
2095 "values": {
2096 "main.dec.out[1]": "1"
2097 }
2098 },
2099 "c": {
2100 "type": "LINEARCOMBINATION",
2101 "values": {
2102 "main.ep[6].aux[1]": "1"
2103 }
2104 }
2105 },
2106 {
2107 "type": "QEQ",
2108 "a": {
2109 "type": "LINEARCOMBINATION",
2110 "values": {
2111 "main.inp[2][6]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2112 }
2113 },
2114 "b": {
2115 "type": "LINEARCOMBINATION",
2116 "values": {
2117 "main.dec.out[2]": "1"
2118 }
2119 },
2120 "c": {
2121 "type": "LINEARCOMBINATION",
2122 "values": {
2123 "main.ep[6].aux[2]": "1"
2124 }
2125 }
2126 },
2127 {
2128 "type": "QEQ",
2129 "a": {
2130 "type": "LINEARCOMBINATION",
2131 "values": {}
2132 },
2133 "b": {
2134 "type": "LINEARCOMBINATION",
2135 "values": {}
2136 },
2137 "c": {
2138 "type": "LINEARCOMBINATION",
2139 "values": {
2140 "main.ep[6].out": "1",
2141 "main.ep[6].aux[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
2142 "main.ep[6].aux[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
2143 "main.ep[6].aux[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2144 }
2145 }
2146 },
2147 {
2148 "type": "QEQ",
2149 "a": {
2150 "type": "LINEARCOMBINATION",
2151 "values": {
2152 "main.inp[0][7]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2153 }
2154 },
2155 "b": {
2156 "type": "LINEARCOMBINATION",
2157 "values": {
2158 "main.dec.out[0]": "1"
2159 }
2160 },
2161 "c": {
2162 "type": "LINEARCOMBINATION",
2163 "values": {
2164 "main.ep[7].aux[0]": "1"
2165 }
2166 }
2167 },
2168 {
2169 "type": "QEQ",
2170 "a": {
2171 "type": "LINEARCOMBINATION",
2172 "values": {
2173 "main.inp[1][7]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2174 }
2175 },
2176 "b": {
2177 "type": "LINEARCOMBINATION",
2178 "values": {
2179 "main.dec.out[1]": "1"
2180 }
2181 },
2182 "c": {
2183 "type": "LINEARCOMBINATION",
2184 "values": {
2185 "main.ep[7].aux[1]": "1"
2186 }
2187 }
2188 },
2189 {
2190 "type": "QEQ",
2191 "a": {
2192 "type": "LINEARCOMBINATION",
2193 "values": {
2194 "main.inp[2][7]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2195 }
2196 },
2197 "b": {
2198 "type": "LINEARCOMBINATION",
2199 "values": {
2200 "main.dec.out[2]": "1"
2201 }
2202 },
2203 "c": {
2204 "type": "LINEARCOMBINATION",
2205 "values": {
2206 "main.ep[7].aux[2]": "1"
2207 }
2208 }
2209 },
2210 {
2211 "type": "QEQ",
2212 "a": {
2213 "type": "LINEARCOMBINATION",
2214 "values": {}
2215 },
2216 "b": {
2217 "type": "LINEARCOMBINATION",
2218 "values": {}
2219 },
2220 "c": {
2221 "type": "LINEARCOMBINATION",
2222 "values": {
2223 "main.ep[7].out": "1",
2224 "main.ep[7].aux[0]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
2225 "main.ep[7].aux[1]": "21888242871839275222246405745257275088696311157297823662689037894645226208582",
2226 "main.ep[7].aux[2]": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2227 }
2228 }
2229 },
2230 {
2231 "type": "QEQ",
2232 "a": {
2233 "type": "LINEARCOMBINATION",
2234 "values": {}
2235 },
2236 "b": {
2237 "type": "LINEARCOMBINATION",
2238 "values": {}
2239 },
2240 "c": {
2241 "type": "LINEARCOMBINATION",
2242 "values": {
2243 "main.dec.success": "1",
2244 "one": "21888242871839275222246405745257275088696311157297823662689037894645226208582"
2245 }
2246 }
2247 }
2248];
2249
2250circuit.witnessNames=[
2251 [
2252 "one"
2253 ],
2254 [
2255 "main.inp[0][0]",
2256 "main.ep[0].in1[0]"
2257 ],
2258 [
2259 "main.inp[0][1]",
2260 "main.ep[1].in1[0]"
2261 ],
2262 [
2263 "main.inp[0][2]",
2264 "main.ep[2].in1[0]"
2265 ],
2266 [
2267 "main.inp[0][3]",
2268 "main.ep[3].in1[0]"
2269 ],
2270 [
2271 "main.inp[0][4]",
2272 "main.ep[4].in1[0]"
2273 ],
2274 [
2275 "main.inp[0][5]",
2276 "main.ep[5].in1[0]"
2277 ],
2278 [
2279 "main.inp[0][6]",
2280 "main.ep[6].in1[0]"
2281 ],
2282 [
2283 "main.inp[0][7]",
2284 "main.ep[7].in1[0]"
2285 ],
2286 [
2287 "main.inp[1][0]",
2288 "main.ep[0].in1[1]"
2289 ],
2290 [
2291 "main.inp[1][1]",
2292 "main.ep[1].in1[1]"
2293 ],
2294 [
2295 "main.inp[1][2]",
2296 "main.ep[2].in1[1]"
2297 ],
2298 [
2299 "main.inp[1][3]",
2300 "main.ep[3].in1[1]"
2301 ],
2302 [
2303 "main.inp[1][4]",
2304 "main.ep[4].in1[1]"
2305 ],
2306 [
2307 "main.inp[1][5]",
2308 "main.ep[5].in1[1]"
2309 ],
2310 [
2311 "main.inp[1][6]",
2312 "main.ep[6].in1[1]"
2313 ],
2314 [
2315 "main.inp[1][7]",
2316 "main.ep[7].in1[1]"
2317 ],
2318 [
2319 "main.inp[2][0]",
2320 "main.ep[0].in1[2]"
2321 ],
2322 [
2323 "main.inp[2][1]",
2324 "main.ep[1].in1[2]"
2325 ],
2326 [
2327 "main.inp[2][2]",
2328 "main.ep[2].in1[2]"
2329 ],
2330 [
2331 "main.inp[2][3]",
2332 "main.ep[3].in1[2]"
2333 ],
2334 [
2335 "main.inp[2][4]",
2336 "main.ep[4].in1[2]"
2337 ],
2338 [
2339 "main.inp[2][5]",
2340 "main.ep[5].in1[2]"
2341 ],
2342 [
2343 "main.inp[2][6]",
2344 "main.ep[6].in1[2]"
2345 ],
2346 [
2347 "main.inp[2][7]",
2348 "main.ep[7].in1[2]"
2349 ],
2350 [
2351 "main.sel",
2352 "main.dec.inp"
2353 ],
2354 [
2355 "main.out[0]",
2356 "main.ep[0].out"
2357 ],
2358 [
2359 "main.out[1]",
2360 "main.ep[1].out"
2361 ],
2362 [
2363 "main.out[2]",
2364 "main.ep[2].out"
2365 ],
2366 [
2367 "main.out[3]",
2368 "main.ep[3].out"
2369 ],
2370 [
2371 "main.out[4]",
2372 "main.ep[4].out"
2373 ],
2374 [
2375 "main.out[5]",
2376 "main.ep[5].out"
2377 ],
2378 [
2379 "main.out[6]",
2380 "main.ep[6].out"
2381 ],
2382 [
2383 "main.out[7]",
2384 "main.ep[7].out"
2385 ],
2386 [
2387 "main.dec.out[0]",
2388 "main.ep[0].in2[0]",
2389 "main.ep[1].in2[0]",
2390 "main.ep[2].in2[0]",
2391 "main.ep[3].in2[0]",
2392 "main.ep[4].in2[0]",
2393 "main.ep[5].in2[0]",
2394 "main.ep[6].in2[0]",
2395 "main.ep[7].in2[0]"
2396 ],
2397 [
2398 "main.dec.out[1]",
2399 "main.ep[0].in2[1]",
2400 "main.ep[1].in2[1]",
2401 "main.ep[2].in2[1]",
2402 "main.ep[3].in2[1]",
2403 "main.ep[4].in2[1]",
2404 "main.ep[5].in2[1]",
2405 "main.ep[6].in2[1]",
2406 "main.ep[7].in2[1]"
2407 ],
2408 [
2409 "main.dec.out[2]",
2410 "main.ep[0].in2[2]",
2411 "main.ep[1].in2[2]",
2412 "main.ep[2].in2[2]",
2413 "main.ep[3].in2[2]",
2414 "main.ep[4].in2[2]",
2415 "main.ep[5].in2[2]",
2416 "main.ep[6].in2[2]",
2417 "main.ep[7].in2[2]"
2418 ],
2419 [
2420 "main.dec.success"
2421 ],
2422 [
2423 "main.ep[0].aux[0]"
2424 ],
2425 [
2426 "main.ep[0].aux[1]"
2427 ],
2428 [
2429 "main.ep[0].aux[2]"
2430 ],
2431 [
2432 "main.ep[1].aux[0]"
2433 ],
2434 [
2435 "main.ep[1].aux[1]"
2436 ],
2437 [
2438 "main.ep[1].aux[2]"
2439 ],
2440 [
2441 "main.ep[2].aux[0]"
2442 ],
2443 [
2444 "main.ep[2].aux[1]"
2445 ],
2446 [
2447 "main.ep[2].aux[2]"
2448 ],
2449 [
2450 "main.ep[3].aux[0]"
2451 ],
2452 [
2453 "main.ep[3].aux[1]"
2454 ],
2455 [
2456 "main.ep[3].aux[2]"
2457 ],
2458 [
2459 "main.ep[4].aux[0]"
2460 ],
2461 [
2462 "main.ep[4].aux[1]"
2463 ],
2464 [
2465 "main.ep[4].aux[2]"
2466 ],
2467 [
2468 "main.ep[5].aux[0]"
2469 ],
2470 [
2471 "main.ep[5].aux[1]"
2472 ],
2473 [
2474 "main.ep[5].aux[2]"
2475 ],
2476 [
2477 "main.ep[6].aux[0]"
2478 ],
2479 [
2480 "main.ep[6].aux[1]"
2481 ],
2482 [
2483 "main.ep[6].aux[2]"
2484 ],
2485 [
2486 "main.ep[7].aux[0]"
2487 ],
2488 [
2489 "main.ep[7].aux[1]"
2490 ],
2491 [
2492 "main.ep[7].aux[2]"
2493 ]
2494];
2495
2496{
2497}
2498
2499circuit.templates = [];
2500
2501circuit.templates["EscalarProduct"] = function(ctx) {
2502 ctx.setVar("lc", [], "0");
2503 for (ctx.setVar("i", [], "0");bigInt(ctx.getVar("i",[])).lt(ctx.getVar("w",[])) ? 1 : 0;(ctx.setVar("i", [], bigInt(ctx.getVar("i",[])).add("1").mod(__P__))).add(__P__).minus(1).mod(__P__))
2504 {
2505 ctx.setSignal("aux", [ctx.getVar("i",[])], bigInt(ctx.getSignal("in1", [ctx.getVar("i",[])])).times(ctx.getSignal("in2", [ctx.getVar("i",[])])).mod(__P__));
2506 ctx.assert(bigInt(ctx.getSignal("aux", [ctx.getVar("i",[])])).equals(bigInt(ctx.getSignal("in1", [ctx.getVar("i",[])])).times(ctx.getSignal("in2", [ctx.getVar("i",[])])).mod(__P__)));
2507 ctx.setVar("lc", [], bigInt(ctx.getVar("lc",[])).add(ctx.getSignal("aux", [ctx.getVar("i",[])])).mod(__P__));
2508 }
2509 ctx.setSignal("out", [], ctx.getVar("lc",[]));
2510 ctx.assert(bigInt(ctx.getSignal("out", [])).equals(ctx.getVar("lc",[])));
2511}
2512;
2513
2514circuit.templates["Decoder"] = function(ctx) {
2515 ctx.setVar("lc", [], "0");
2516 for (ctx.setVar("i", [], "0");bigInt(ctx.getVar("i",[])).lt(ctx.getVar("w",[])) ? 1 : 0;(ctx.setVar("i", [], bigInt(ctx.getVar("i",[])).add("1").mod(__P__))).add(__P__).minus(1).mod(__P__))
2517 {
2518 ctx.setSignal("out", [ctx.getVar("i",[])], bigInt(bigInt(ctx.getSignal("inp", [])).eq(ctx.getVar("i",[])) ? 1 : 0).neq(0) ? ("1") : ("0"));
2519 ctx.assert(bigInt(bigInt(ctx.getSignal("out", [ctx.getVar("i",[])])).times(bigInt(ctx.getSignal("inp", [])).add(__P__).minus(ctx.getVar("i",[])).mod(__P__)).mod(__P__)).equals("0"));
2520 ctx.setVar("lc", [], bigInt(ctx.getVar("lc",[])).add(ctx.getSignal("out", [ctx.getVar("i",[])])).mod(__P__));
2521 }
2522 ctx.setSignal("success", [], ctx.getVar("lc",[]));
2523 ctx.assert(bigInt(ctx.getSignal("success", [])).equals(ctx.getVar("lc",[])));
2524 ctx.assert(bigInt(bigInt(ctx.getSignal("success", [])).times(bigInt(ctx.getSignal("success", [])).add(__P__).minus("1").mod(__P__)).mod(__P__)).equals("0"));
2525}
2526;
2527
2528circuit.templates["Multiplexor"] = function(ctx) {
2529 ctx.setPin("dec", [], "inp", [], ctx.getSignal("sel", []));
2530 ctx.assert(bigInt(ctx.getPin("dec", [], "inp", [])).equals(ctx.getSignal("sel", [])));
2531 for (ctx.setVar("j", [], "0");bigInt(ctx.getVar("j",[])).lt(ctx.getVar("wIn",[])) ? 1 : 0;(ctx.setVar("j", [], bigInt(ctx.getVar("j",[])).add("1").mod(__P__))).add(__P__).minus(1).mod(__P__))
2532 {
2533 for (ctx.setVar("k", [], "0");bigInt(ctx.getVar("k",[])).lt(ctx.getVar("nIn",[])) ? 1 : 0;(ctx.setVar("k", [], bigInt(ctx.getVar("k",[])).add("1").mod(__P__))).add(__P__).minus(1).mod(__P__))
2534 {
2535 ctx.setPin("ep", [ctx.getVar("j",[])], "in1", [ctx.getVar("k",[])], ctx.getSignal("inp", [ctx.getVar("k",[]),ctx.getVar("j",[])]));
2536 ctx.assert(bigInt(ctx.getPin("ep", [ctx.getVar("j",[])], "in1", [ctx.getVar("k",[])])).equals(ctx.getSignal("inp", [ctx.getVar("k",[]),ctx.getVar("j",[])])));
2537 ctx.setPin("ep", [ctx.getVar("j",[])], "in2", [ctx.getVar("k",[])], ctx.getPin("dec", [], "out", [ctx.getVar("k",[])]));
2538 ctx.assert(bigInt(ctx.getPin("ep", [ctx.getVar("j",[])], "in2", [ctx.getVar("k",[])])).equals(ctx.getPin("dec", [], "out", [ctx.getVar("k",[])])));
2539 }
2540 ctx.setSignal("out", [ctx.getVar("j",[])], ctx.getPin("ep", [ctx.getVar("j",[])], "out", []));
2541 ctx.assert(bigInt(ctx.getSignal("out", [ctx.getVar("j",[])])).equals(ctx.getPin("ep", [ctx.getVar("j",[])], "out", [])));
2542 }
2543 ctx.assert(bigInt(ctx.getPin("dec", [], "success", [])).equals("1"));
2544}
2545;