arnaucube
arnaucube/circomPublic Self-hosted repository
circom/barry.js
barry.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.in": {
  16  "fullName": "main.in",
  17  "direction": "IN",
  18  "component": "main",
  19  "equivalence": "",
  20  "alias": [
  21   "main.in"
  22  ],
  23  "id": 1
  24 },
  25 "main.out[0]": {
  26  "fullName": "main.out[0]",
  27  "direction": "OUT",
  28  "component": "main",
  29  "equivalence": "",
  30  "alias": [
  31   "main.out[0]"
  32  ],
  33  "id": 2
  34 },
  35 "main.out[1]": {
  36  "fullName": "main.out[1]",
  37  "direction": "OUT",
  38  "component": "main",
  39  "equivalence": "",
  40  "alias": [
  41   "main.out[1]"
  42  ],
  43  "id": 3
  44 },
  45 "main.out[2]": {
  46  "fullName": "main.out[2]",
  47  "direction": "OUT",
  48  "component": "main",
  49  "equivalence": "",
  50  "alias": [
  51   "main.out[2]"
  52  ],
  53  "id": 4
  54 },
  55 "main.out[3]": {
  56  "fullName": "main.out[3]",
  57  "direction": "OUT",
  58  "component": "main",
  59  "equivalence": "",
  60  "alias": [
  61   "main.out[3]"
  62  ],
  63  "id": 5
  64 },
  65 "main.out[4]": {
  66  "fullName": "main.out[4]",
  67  "direction": "OUT",
  68  "component": "main",
  69  "equivalence": "",
  70  "alias": [
  71   "main.out[4]"
  72  ],
  73  "id": 6
  74 },
  75 "main.out[5]": {
  76  "fullName": "main.out[5]",
  77  "direction": "OUT",
  78  "component": "main",
  79  "equivalence": "",
  80  "alias": [
  81   "main.out[5]"
  82  ],
  83  "id": 7
  84 },
  85 "main.out[6]": {
  86  "fullName": "main.out[6]",
  87  "direction": "OUT",
  88  "component": "main",
  89  "equivalence": "",
  90  "alias": [
  91   "main.out[6]"
  92  ],
  93  "id": 8
  94 },
  95 "main.out[7]": {
  96  "fullName": "main.out[7]",
  97  "direction": "OUT",
  98  "component": "main",
  99  "equivalence": "",
 100  "alias": [
 101   "main.out[7]"
 102  ],
 103  "id": 9
 104 },
 105 "main.out[8]": {
 106  "fullName": "main.out[8]",
 107  "direction": "OUT",
 108  "component": "main",
 109  "equivalence": "",
 110  "alias": [
 111   "main.out[8]"
 112  ],
 113  "id": 10
 114 },
 115 "main.out[9]": {
 116  "fullName": "main.out[9]",
 117  "direction": "OUT",
 118  "component": "main",
 119  "equivalence": "",
 120  "alias": [
 121   "main.out[9]"
 122  ],
 123  "id": 11
 124 },
 125 "main.out[10]": {
 126  "fullName": "main.out[10]",
 127  "direction": "OUT",
 128  "component": "main",
 129  "equivalence": "",
 130  "alias": [
 131   "main.out[10]"
 132  ],
 133  "id": 12
 134 },
 135 "main.out[11]": {
 136  "fullName": "main.out[11]",
 137  "direction": "OUT",
 138  "component": "main",
 139  "equivalence": "",
 140  "alias": [
 141   "main.out[11]"
 142  ],
 143  "id": 13
 144 },
 145 "main.out[12]": {
 146  "fullName": "main.out[12]",
 147  "direction": "OUT",
 148  "component": "main",
 149  "equivalence": "",
 150  "alias": [
 151   "main.out[12]"
 152  ],
 153  "id": 14
 154 },
 155 "main.out[13]": {
 156  "fullName": "main.out[13]",
 157  "direction": "OUT",
 158  "component": "main",
 159  "equivalence": "",
 160  "alias": [
 161   "main.out[13]"
 162  ],
 163  "id": 15
 164 },
 165 "main.out[14]": {
 166  "fullName": "main.out[14]",
 167  "direction": "OUT",
 168  "component": "main",
 169  "equivalence": "",
 170  "alias": [
 171   "main.out[14]"
 172  ],
 173  "id": 16
 174 },
 175 "main.out[15]": {
 176  "fullName": "main.out[15]",
 177  "direction": "OUT",
 178  "component": "main",
 179  "equivalence": "",
 180  "alias": [
 181   "main.out[15]"
 182  ],
 183  "id": 17
 184 },
 185 "main.out[16]": {
 186  "fullName": "main.out[16]",
 187  "direction": "OUT",
 188  "component": "main",
 189  "equivalence": "",
 190  "alias": [
 191   "main.out[16]"
 192  ],
 193  "id": 18
 194 },
 195 "main.out[17]": {
 196  "fullName": "main.out[17]",
 197  "direction": "OUT",
 198  "component": "main",
 199  "equivalence": "",
 200  "alias": [
 201   "main.out[17]"
 202  ],
 203  "id": 19
 204 },
 205 "main.out[18]": {
 206  "fullName": "main.out[18]",
 207  "direction": "OUT",
 208  "component": "main",
 209  "equivalence": "",
 210  "alias": [
 211   "main.out[18]"
 212  ],
 213  "id": 20
 214 },
 215 "main.out[19]": {
 216  "fullName": "main.out[19]",
 217  "direction": "OUT",
 218  "component": "main",
 219  "equivalence": "",
 220  "alias": [
 221   "main.out[19]"
 222  ],
 223  "id": 21
 224 },
 225 "main.out[20]": {
 226  "fullName": "main.out[20]",
 227  "direction": "OUT",
 228  "component": "main",
 229  "equivalence": "",
 230  "alias": [
 231   "main.out[20]"
 232  ],
 233  "id": 22
 234 },
 235 "main.out[21]": {
 236  "fullName": "main.out[21]",
 237  "direction": "OUT",
 238  "component": "main",
 239  "equivalence": "",
 240  "alias": [
 241   "main.out[21]"
 242  ],
 243  "id": 23
 244 },
 245 "main.out[22]": {
 246  "fullName": "main.out[22]",
 247  "direction": "OUT",
 248  "component": "main",
 249  "equivalence": "",
 250  "alias": [
 251   "main.out[22]"
 252  ],
 253  "id": 24
 254 },
 255 "main.out[23]": {
 256  "fullName": "main.out[23]",
 257  "direction": "OUT",
 258  "component": "main",
 259  "equivalence": "",
 260  "alias": [
 261   "main.out[23]"
 262  ],
 263  "id": 25
 264 },
 265 "main.out[24]": {
 266  "fullName": "main.out[24]",
 267  "direction": "OUT",
 268  "component": "main",
 269  "equivalence": "",
 270  "alias": [
 271   "main.out[24]"
 272  ],
 273  "id": 26
 274 },
 275 "main.out[25]": {
 276  "fullName": "main.out[25]",
 277  "direction": "OUT",
 278  "component": "main",
 279  "equivalence": "",
 280  "alias": [
 281   "main.out[25]"
 282  ],
 283  "id": 27
 284 },
 285 "main.out[26]": {
 286  "fullName": "main.out[26]",
 287  "direction": "OUT",
 288  "component": "main",
 289  "equivalence": "",
 290  "alias": [
 291   "main.out[26]"
 292  ],
 293  "id": 28
 294 },
 295 "main.out[27]": {
 296  "fullName": "main.out[27]",
 297  "direction": "OUT",
 298  "component": "main",
 299  "equivalence": "",
 300  "alias": [
 301   "main.out[27]"
 302  ],
 303  "id": 29
 304 },
 305 "main.out[28]": {
 306  "fullName": "main.out[28]",
 307  "direction": "OUT",
 308  "component": "main",
 309  "equivalence": "",
 310  "alias": [
 311   "main.out[28]"
 312  ],
 313  "id": 30
 314 },
 315 "main.out[29]": {
 316  "fullName": "main.out[29]",
 317  "direction": "OUT",
 318  "component": "main",
 319  "equivalence": "",
 320  "alias": [
 321   "main.out[29]"
 322  ],
 323  "id": 31
 324 },
 325 "main.out[30]": {
 326  "fullName": "main.out[30]",
 327  "direction": "OUT",
 328  "component": "main",
 329  "equivalence": "",
 330  "alias": [
 331   "main.out[30]"
 332  ],
 333  "id": 32
 334 },
 335 "main.out[31]": {
 336  "fullName": "main.out[31]",
 337  "direction": "OUT",
 338  "component": "main",
 339  "equivalence": "",
 340  "alias": [
 341   "main.out[31]"
 342  ],
 343  "id": 33
 344 }
 345};
 346
 347circuit.components={
 348 "main": {
 349  "signals": [
 350   "main.in",
 351   "main.out[0]",
 352   "main.out[1]",
 353   "main.out[2]",
 354   "main.out[3]",
 355   "main.out[4]",
 356   "main.out[5]",
 357   "main.out[6]",
 358   "main.out[7]",
 359   "main.out[8]",
 360   "main.out[9]",
 361   "main.out[10]",
 362   "main.out[11]",
 363   "main.out[12]",
 364   "main.out[13]",
 365   "main.out[14]",
 366   "main.out[15]",
 367   "main.out[16]",
 368   "main.out[17]",
 369   "main.out[18]",
 370   "main.out[19]",
 371   "main.out[20]",
 372   "main.out[21]",
 373   "main.out[22]",
 374   "main.out[23]",
 375   "main.out[24]",
 376   "main.out[25]",
 377   "main.out[26]",
 378   "main.out[27]",
 379   "main.out[28]",
 380   "main.out[29]",
 381   "main.out[30]",
 382   "main.out[31]"
 383  ],
 384  "params": {},
 385  "template": "ToBin",
 386  "inputSignals": 1
 387 }
 388};
 389
 390circuit.signalConstrains=[
 391 {
 392  "type": "QEQ",
 393  "a": {
 394   "type": "LINEARCOMBINATION",
 395   "values": {
 396    "main.out[0]": "1"
 397   }
 398  },
 399  "b": {
 400   "type": "LINEARCOMBINATION",
 401   "values": {
 402    "main.out[0]": "1",
 403    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 404   }
 405  },
 406  "c": {
 407   "type": "LINEARCOMBINATION",
 408   "values": {}
 409  }
 410 },
 411 {
 412  "type": "QEQ",
 413  "a": {
 414   "type": "LINEARCOMBINATION",
 415   "values": {
 416    "main.out[1]": "1"
 417   }
 418  },
 419  "b": {
 420   "type": "LINEARCOMBINATION",
 421   "values": {
 422    "main.out[1]": "1",
 423    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 424   }
 425  },
 426  "c": {
 427   "type": "LINEARCOMBINATION",
 428   "values": {}
 429  }
 430 },
 431 {
 432  "type": "QEQ",
 433  "a": {
 434   "type": "LINEARCOMBINATION",
 435   "values": {
 436    "main.out[2]": "1"
 437   }
 438  },
 439  "b": {
 440   "type": "LINEARCOMBINATION",
 441   "values": {
 442    "main.out[2]": "1",
 443    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 444   }
 445  },
 446  "c": {
 447   "type": "LINEARCOMBINATION",
 448   "values": {}
 449  }
 450 },
 451 {
 452  "type": "QEQ",
 453  "a": {
 454   "type": "LINEARCOMBINATION",
 455   "values": {
 456    "main.out[3]": "1"
 457   }
 458  },
 459  "b": {
 460   "type": "LINEARCOMBINATION",
 461   "values": {
 462    "main.out[3]": "1",
 463    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 464   }
 465  },
 466  "c": {
 467   "type": "LINEARCOMBINATION",
 468   "values": {}
 469  }
 470 },
 471 {
 472  "type": "QEQ",
 473  "a": {
 474   "type": "LINEARCOMBINATION",
 475   "values": {
 476    "main.out[4]": "1"
 477   }
 478  },
 479  "b": {
 480   "type": "LINEARCOMBINATION",
 481   "values": {
 482    "main.out[4]": "1",
 483    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 484   }
 485  },
 486  "c": {
 487   "type": "LINEARCOMBINATION",
 488   "values": {}
 489  }
 490 },
 491 {
 492  "type": "QEQ",
 493  "a": {
 494   "type": "LINEARCOMBINATION",
 495   "values": {
 496    "main.out[5]": "1"
 497   }
 498  },
 499  "b": {
 500   "type": "LINEARCOMBINATION",
 501   "values": {
 502    "main.out[5]": "1",
 503    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 504   }
 505  },
 506  "c": {
 507   "type": "LINEARCOMBINATION",
 508   "values": {}
 509  }
 510 },
 511 {
 512  "type": "QEQ",
 513  "a": {
 514   "type": "LINEARCOMBINATION",
 515   "values": {
 516    "main.out[6]": "1"
 517   }
 518  },
 519  "b": {
 520   "type": "LINEARCOMBINATION",
 521   "values": {
 522    "main.out[6]": "1",
 523    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 524   }
 525  },
 526  "c": {
 527   "type": "LINEARCOMBINATION",
 528   "values": {}
 529  }
 530 },
 531 {
 532  "type": "QEQ",
 533  "a": {
 534   "type": "LINEARCOMBINATION",
 535   "values": {
 536    "main.out[7]": "1"
 537   }
 538  },
 539  "b": {
 540   "type": "LINEARCOMBINATION",
 541   "values": {
 542    "main.out[7]": "1",
 543    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 544   }
 545  },
 546  "c": {
 547   "type": "LINEARCOMBINATION",
 548   "values": {}
 549  }
 550 },
 551 {
 552  "type": "QEQ",
 553  "a": {
 554   "type": "LINEARCOMBINATION",
 555   "values": {
 556    "main.out[8]": "1"
 557   }
 558  },
 559  "b": {
 560   "type": "LINEARCOMBINATION",
 561   "values": {
 562    "main.out[8]": "1",
 563    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 564   }
 565  },
 566  "c": {
 567   "type": "LINEARCOMBINATION",
 568   "values": {}
 569  }
 570 },
 571 {
 572  "type": "QEQ",
 573  "a": {
 574   "type": "LINEARCOMBINATION",
 575   "values": {
 576    "main.out[9]": "1"
 577   }
 578  },
 579  "b": {
 580   "type": "LINEARCOMBINATION",
 581   "values": {
 582    "main.out[9]": "1",
 583    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 584   }
 585  },
 586  "c": {
 587   "type": "LINEARCOMBINATION",
 588   "values": {}
 589  }
 590 },
 591 {
 592  "type": "QEQ",
 593  "a": {
 594   "type": "LINEARCOMBINATION",
 595   "values": {
 596    "main.out[10]": "1"
 597   }
 598  },
 599  "b": {
 600   "type": "LINEARCOMBINATION",
 601   "values": {
 602    "main.out[10]": "1",
 603    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 604   }
 605  },
 606  "c": {
 607   "type": "LINEARCOMBINATION",
 608   "values": {}
 609  }
 610 },
 611 {
 612  "type": "QEQ",
 613  "a": {
 614   "type": "LINEARCOMBINATION",
 615   "values": {
 616    "main.out[11]": "1"
 617   }
 618  },
 619  "b": {
 620   "type": "LINEARCOMBINATION",
 621   "values": {
 622    "main.out[11]": "1",
 623    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 624   }
 625  },
 626  "c": {
 627   "type": "LINEARCOMBINATION",
 628   "values": {}
 629  }
 630 },
 631 {
 632  "type": "QEQ",
 633  "a": {
 634   "type": "LINEARCOMBINATION",
 635   "values": {
 636    "main.out[12]": "1"
 637   }
 638  },
 639  "b": {
 640   "type": "LINEARCOMBINATION",
 641   "values": {
 642    "main.out[12]": "1",
 643    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 644   }
 645  },
 646  "c": {
 647   "type": "LINEARCOMBINATION",
 648   "values": {}
 649  }
 650 },
 651 {
 652  "type": "QEQ",
 653  "a": {
 654   "type": "LINEARCOMBINATION",
 655   "values": {
 656    "main.out[13]": "1"
 657   }
 658  },
 659  "b": {
 660   "type": "LINEARCOMBINATION",
 661   "values": {
 662    "main.out[13]": "1",
 663    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 664   }
 665  },
 666  "c": {
 667   "type": "LINEARCOMBINATION",
 668   "values": {}
 669  }
 670 },
 671 {
 672  "type": "QEQ",
 673  "a": {
 674   "type": "LINEARCOMBINATION",
 675   "values": {
 676    "main.out[14]": "1"
 677   }
 678  },
 679  "b": {
 680   "type": "LINEARCOMBINATION",
 681   "values": {
 682    "main.out[14]": "1",
 683    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 684   }
 685  },
 686  "c": {
 687   "type": "LINEARCOMBINATION",
 688   "values": {}
 689  }
 690 },
 691 {
 692  "type": "QEQ",
 693  "a": {
 694   "type": "LINEARCOMBINATION",
 695   "values": {
 696    "main.out[15]": "1"
 697   }
 698  },
 699  "b": {
 700   "type": "LINEARCOMBINATION",
 701   "values": {
 702    "main.out[15]": "1",
 703    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 704   }
 705  },
 706  "c": {
 707   "type": "LINEARCOMBINATION",
 708   "values": {}
 709  }
 710 },
 711 {
 712  "type": "QEQ",
 713  "a": {
 714   "type": "LINEARCOMBINATION",
 715   "values": {
 716    "main.out[16]": "1"
 717   }
 718  },
 719  "b": {
 720   "type": "LINEARCOMBINATION",
 721   "values": {
 722    "main.out[16]": "1",
 723    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 724   }
 725  },
 726  "c": {
 727   "type": "LINEARCOMBINATION",
 728   "values": {}
 729  }
 730 },
 731 {
 732  "type": "QEQ",
 733  "a": {
 734   "type": "LINEARCOMBINATION",
 735   "values": {
 736    "main.out[17]": "1"
 737   }
 738  },
 739  "b": {
 740   "type": "LINEARCOMBINATION",
 741   "values": {
 742    "main.out[17]": "1",
 743    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 744   }
 745  },
 746  "c": {
 747   "type": "LINEARCOMBINATION",
 748   "values": {}
 749  }
 750 },
 751 {
 752  "type": "QEQ",
 753  "a": {
 754   "type": "LINEARCOMBINATION",
 755   "values": {
 756    "main.out[18]": "1"
 757   }
 758  },
 759  "b": {
 760   "type": "LINEARCOMBINATION",
 761   "values": {
 762    "main.out[18]": "1",
 763    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 764   }
 765  },
 766  "c": {
 767   "type": "LINEARCOMBINATION",
 768   "values": {}
 769  }
 770 },
 771 {
 772  "type": "QEQ",
 773  "a": {
 774   "type": "LINEARCOMBINATION",
 775   "values": {
 776    "main.out[19]": "1"
 777   }
 778  },
 779  "b": {
 780   "type": "LINEARCOMBINATION",
 781   "values": {
 782    "main.out[19]": "1",
 783    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 784   }
 785  },
 786  "c": {
 787   "type": "LINEARCOMBINATION",
 788   "values": {}
 789  }
 790 },
 791 {
 792  "type": "QEQ",
 793  "a": {
 794   "type": "LINEARCOMBINATION",
 795   "values": {
 796    "main.out[20]": "1"
 797   }
 798  },
 799  "b": {
 800   "type": "LINEARCOMBINATION",
 801   "values": {
 802    "main.out[20]": "1",
 803    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 804   }
 805  },
 806  "c": {
 807   "type": "LINEARCOMBINATION",
 808   "values": {}
 809  }
 810 },
 811 {
 812  "type": "QEQ",
 813  "a": {
 814   "type": "LINEARCOMBINATION",
 815   "values": {
 816    "main.out[21]": "1"
 817   }
 818  },
 819  "b": {
 820   "type": "LINEARCOMBINATION",
 821   "values": {
 822    "main.out[21]": "1",
 823    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 824   }
 825  },
 826  "c": {
 827   "type": "LINEARCOMBINATION",
 828   "values": {}
 829  }
 830 },
 831 {
 832  "type": "QEQ",
 833  "a": {
 834   "type": "LINEARCOMBINATION",
 835   "values": {
 836    "main.out[22]": "1"
 837   }
 838  },
 839  "b": {
 840   "type": "LINEARCOMBINATION",
 841   "values": {
 842    "main.out[22]": "1",
 843    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 844   }
 845  },
 846  "c": {
 847   "type": "LINEARCOMBINATION",
 848   "values": {}
 849  }
 850 },
 851 {
 852  "type": "QEQ",
 853  "a": {
 854   "type": "LINEARCOMBINATION",
 855   "values": {
 856    "main.out[23]": "1"
 857   }
 858  },
 859  "b": {
 860   "type": "LINEARCOMBINATION",
 861   "values": {
 862    "main.out[23]": "1",
 863    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 864   }
 865  },
 866  "c": {
 867   "type": "LINEARCOMBINATION",
 868   "values": {}
 869  }
 870 },
 871 {
 872  "type": "QEQ",
 873  "a": {
 874   "type": "LINEARCOMBINATION",
 875   "values": {
 876    "main.out[24]": "1"
 877   }
 878  },
 879  "b": {
 880   "type": "LINEARCOMBINATION",
 881   "values": {
 882    "main.out[24]": "1",
 883    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 884   }
 885  },
 886  "c": {
 887   "type": "LINEARCOMBINATION",
 888   "values": {}
 889  }
 890 },
 891 {
 892  "type": "QEQ",
 893  "a": {
 894   "type": "LINEARCOMBINATION",
 895   "values": {
 896    "main.out[25]": "1"
 897   }
 898  },
 899  "b": {
 900   "type": "LINEARCOMBINATION",
 901   "values": {
 902    "main.out[25]": "1",
 903    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 904   }
 905  },
 906  "c": {
 907   "type": "LINEARCOMBINATION",
 908   "values": {}
 909  }
 910 },
 911 {
 912  "type": "QEQ",
 913  "a": {
 914   "type": "LINEARCOMBINATION",
 915   "values": {
 916    "main.out[26]": "1"
 917   }
 918  },
 919  "b": {
 920   "type": "LINEARCOMBINATION",
 921   "values": {
 922    "main.out[26]": "1",
 923    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 924   }
 925  },
 926  "c": {
 927   "type": "LINEARCOMBINATION",
 928   "values": {}
 929  }
 930 },
 931 {
 932  "type": "QEQ",
 933  "a": {
 934   "type": "LINEARCOMBINATION",
 935   "values": {
 936    "main.out[27]": "1"
 937   }
 938  },
 939  "b": {
 940   "type": "LINEARCOMBINATION",
 941   "values": {
 942    "main.out[27]": "1",
 943    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 944   }
 945  },
 946  "c": {
 947   "type": "LINEARCOMBINATION",
 948   "values": {}
 949  }
 950 },
 951 {
 952  "type": "QEQ",
 953  "a": {
 954   "type": "LINEARCOMBINATION",
 955   "values": {
 956    "main.out[28]": "1"
 957   }
 958  },
 959  "b": {
 960   "type": "LINEARCOMBINATION",
 961   "values": {
 962    "main.out[28]": "1",
 963    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 964   }
 965  },
 966  "c": {
 967   "type": "LINEARCOMBINATION",
 968   "values": {}
 969  }
 970 },
 971 {
 972  "type": "QEQ",
 973  "a": {
 974   "type": "LINEARCOMBINATION",
 975   "values": {
 976    "main.out[29]": "1"
 977   }
 978  },
 979  "b": {
 980   "type": "LINEARCOMBINATION",
 981   "values": {
 982    "main.out[29]": "1",
 983    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
 984   }
 985  },
 986  "c": {
 987   "type": "LINEARCOMBINATION",
 988   "values": {}
 989  }
 990 },
 991 {
 992  "type": "QEQ",
 993  "a": {
 994   "type": "LINEARCOMBINATION",
 995   "values": {
 996    "main.out[30]": "1"
 997   }
 998  },
 999  "b": {
1000   "type": "LINEARCOMBINATION",
1001   "values": {
1002    "main.out[30]": "1",
1003    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
1004   }
1005  },
1006  "c": {
1007   "type": "LINEARCOMBINATION",
1008   "values": {}
1009  }
1010 },
1011 {
1012  "type": "QEQ",
1013  "a": {
1014   "type": "LINEARCOMBINATION",
1015   "values": {
1016    "main.out[31]": "1"
1017   }
1018  },
1019  "b": {
1020   "type": "LINEARCOMBINATION",
1021   "values": {
1022    "main.out[31]": "1",
1023    "one": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
1024   }
1025  },
1026  "c": {
1027   "type": "LINEARCOMBINATION",
1028   "values": {}
1029  }
1030 },
1031 {
1032  "type": "QEQ",
1033  "a": {
1034   "type": "LINEARCOMBINATION",
1035   "values": {}
1036  },
1037  "b": {
1038   "type": "LINEARCOMBINATION",
1039   "values": {}
1040  },
1041  "c": {
1042   "type": "LINEARCOMBINATION",
1043   "values": {
1044    "main.out[0]": "1",
1045    "main.out[1]": "2",
1046    "main.out[2]": "4",
1047    "main.out[3]": "8",
1048    "main.out[4]": "16",
1049    "main.out[5]": "32",
1050    "main.out[6]": "64",
1051    "main.out[7]": "128",
1052    "main.out[8]": "256",
1053    "main.out[9]": "512",
1054    "main.out[10]": "1024",
1055    "main.out[11]": "2048",
1056    "main.out[12]": "4096",
1057    "main.out[13]": "8192",
1058    "main.out[14]": "16384",
1059    "main.out[15]": "32768",
1060    "main.out[16]": "65536",
1061    "main.out[17]": "131072",
1062    "main.out[18]": "262144",
1063    "main.out[19]": "524288",
1064    "main.out[20]": "1048576",
1065    "main.out[21]": "2097152",
1066    "main.out[22]": "4194304",
1067    "main.out[23]": "8388608",
1068    "main.out[24]": "16777216",
1069    "main.out[25]": "33554432",
1070    "main.out[26]": "67108864",
1071    "main.out[27]": "134217728",
1072    "main.out[28]": "268435456",
1073    "main.out[29]": "536870912",
1074    "main.out[30]": "1073741824",
1075    "main.out[31]": "2147483648",
1076    "main.in": "21888242871839275222246405745257275088548364400416034343698204186575808495616"
1077   }
1078  }
1079 }
1080];
1081
1082circuit.witnessNames=[
1083 [
1084  "one"
1085 ],
1086 [
1087  "main.in"
1088 ],
1089 [
1090  "main.out[0]"
1091 ],
1092 [
1093  "main.out[1]"
1094 ],
1095 [
1096  "main.out[2]"
1097 ],
1098 [
1099  "main.out[3]"
1100 ],
1101 [
1102  "main.out[4]"
1103 ],
1104 [
1105  "main.out[5]"
1106 ],
1107 [
1108  "main.out[6]"
1109 ],
1110 [
1111  "main.out[7]"
1112 ],
1113 [
1114  "main.out[8]"
1115 ],
1116 [
1117  "main.out[9]"
1118 ],
1119 [
1120  "main.out[10]"
1121 ],
1122 [
1123  "main.out[11]"
1124 ],
1125 [
1126  "main.out[12]"
1127 ],
1128 [
1129  "main.out[13]"
1130 ],
1131 [
1132  "main.out[14]"
1133 ],
1134 [
1135  "main.out[15]"
1136 ],
1137 [
1138  "main.out[16]"
1139 ],
1140 [
1141  "main.out[17]"
1142 ],
1143 [
1144  "main.out[18]"
1145 ],
1146 [
1147  "main.out[19]"
1148 ],
1149 [
1150  "main.out[20]"
1151 ],
1152 [
1153  "main.out[21]"
1154 ],
1155 [
1156  "main.out[22]"
1157 ],
1158 [
1159  "main.out[23]"
1160 ],
1161 [
1162  "main.out[24]"
1163 ],
1164 [
1165  "main.out[25]"
1166 ],
1167 [
1168  "main.out[26]"
1169 ],
1170 [
1171  "main.out[27]"
1172 ],
1173 [
1174  "main.out[28]"
1175 ],
1176 [
1177  "main.out[29]"
1178 ],
1179 [
1180  "main.out[30]"
1181 ],
1182 [
1183  "main.out[31]"
1184 ]
1185];
1186
1187{
1188}
1189
1190circuit.templates = {};
1191
1192circuit.templates["AND"] = function(ctx) {
1193    ctx.setSignal("c", [], bigInt(ctx.getSignal("a", [])).times(ctx.getSignal("b", [])).mod(__P__));
1194    ctx.assert(ctx.getSignal("c", []), bigInt(ctx.getSignal("a", [])).times(ctx.getSignal("b", [])).mod(__P__));
1195}
1196;
1197
1198circuit.templates["AND3"] = function(ctx) {
1199    ctx.setPin("and1", [], "a", [], ctx.getSignal("in1", []));
1200    ctx.assert(ctx.getPin("and1", [], "a", []), ctx.getSignal("in1", []));
1201    ctx.setPin("and1", [], "b", [], ctx.getSignal("in2", []));
1202    ctx.assert(ctx.getPin("and1", [], "b", []), ctx.getSignal("in2", []));
1203    ctx.setPin("and2", [], "a", [], ctx.getSignal("in3", []));
1204    ctx.assert(ctx.getPin("and2", [], "a", []), ctx.getSignal("in3", []));
1205    ctx.setPin("and2", [], "b", [], ctx.getPin("and1", [], "c", []));
1206    ctx.assert(ctx.getPin("and2", [], "b", []), ctx.getPin("and1", [], "c", []));
1207    ctx.setSignal("out", [], ctx.getPin("and2", [], "c", []));
1208    ctx.assert(ctx.getSignal("out", []), ctx.getPin("and2", [], "c", []));
1209}
1210;
1211
1212circuit.templates["ToBin"] = function(ctx) {
1213    ctx.setVar("lc", [], "0");
1214    for (ctx.setVar("i", [], "0");bigInt(ctx.getVar("i",[])).lt("32") ? 1 : 0;(ctx.setVar("i", [], bigInt(ctx.getVar("i",[])).add("1").mod(__P__))).add(__P__).minus(1).mod(__P__))
1215    {
1216        ctx.setSignal("out", [ctx.getVar("i",[])], bigInt(bigInt(ctx.getVar("i",[])).greater(256) ? 0 : bigInt(ctx.getSignal("in", [])).shiftRight(bigInt(ctx.getVar("i",[])).value).and(__MASK__)).and("1").and(__MASK__));
1217        ctx.setVar("lc", [], bigInt(ctx.getVar("lc",[])).add(bigInt(ctx.getSignal("out", [ctx.getVar("i",[])])).times(bigInt("2").modPow(ctx.getVar("i",[]), __P__)).mod(__P__)).mod(__P__));
1218        ctx.assert(bigInt(ctx.getSignal("out", [ctx.getVar("i",[])])).times(bigInt(ctx.getSignal("out", [ctx.getVar("i",[])])).add(__P__).minus("1").mod(__P__)).mod(__P__), "0");
1219    }
1220    ctx.assert(ctx.getVar("lc",[]), ctx.getSignal("in", []));
1221}
1222;
1223circuit.functionParams={};
1224
1225
1226circuit.functions = {};