arnaucube
arnaucube/circomPublic Self-hosted repository
circom/c/buildasm/main.c
c/buildasm/main.cRaw
 1#include "stdio.h"
 2#include "fr.h"
 3
 4int main() {
 5
 6    FrElement a = { 0, Fr_LONGMONTGOMERY, {1,1,1,1}};
 7    FrElement b = { 0, Fr_LONGMONTGOMERY, {2,2,2,2}};
 8
 9/*
10    FrElement a={0x43e1f593f0000000ULL,0x2833e84879b97091ULL,0xb85045b68181585dULL,0x30644e72e131a029ULL};
11    FrElement b = {3,0,0,0};
12*/
13    FrElement c;
14
15//    Fr_add(&(c[0]), a, a);
16//    Fr_add(&(c[0]), c, b);
17
18    for (int i=0; i<1000000000; i++) {
19        Fr_mul(&c, &a, &b);
20    }
21
22    Fr_mul(&c,&a, &b);
23    printf("%llu, %llu, %llu, %llu\n", c.longVal[0], c.longVal[1], c.longVal[2], c.longVal[3]);
24}