LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_sign.c
// Function: edp_AddAffinePoint
void edp_AddAffinePoint(Ext_POINT *p, const PA_POINT *q)
{
    U_WORD a[K_WORDS], b[K_WORDS], c[K_WORDS], d[K_WORDS], e[K_WORDS];
    ecp_SubReduce(a, p->y, p->x);           /* A = (Y1-X1)*(Y2-X2) */
    ecp_MulReduce(a, a, q->YmX);
    ecp_AddReduce(b, p->y, p->x);           /* B = (Y1+X1)*(Y2+X2) */
    ecp_MulReduce(b, b, q->YpX);
    ecp_MulReduce(c, p->t, q->T2d);         /* C = T1*2d*T2 */
    ecp_AddReduce(d, p->z, p->z);           /* D = Z1*2*Z2 (Z2=1)*/
    ecp_SubReduce(e, b, a);                 /* E = B-A */
    ecp_AddReduce(b, b, a);                 /* H = B+A */
    ecp_SubReduce(a, d, c);                 /* F = D-C */
    ecp_AddReduce(d, d, c);                 /* G = D+C */

    ecp_MulReduce(p->x, e, a);              /* E*F */
    ecp_MulReduce(p->y, b, d);              /* H*G */
    ecp_MulReduce(p->t, e, b);              /* E*H */
    ecp_MulReduce(p->z, d, a);              /* G*F */
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
leaq 0x80(%rsp), %rdi
movq 0xb0(%rsp), %rsi
addq $0x20, %rsi
movq 0xb0(%rsp), %rdx
callq 0x410240
leaq 0x80(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movq 0xa8(%rsp), %rdx
addq $0x20, %rdx
callq 0x410910
leaq 0x60(%rsp), %rdi
movq 0xb0(%rsp), %rsi
addq $0x20, %rsi
movq 0xb0(%rsp), %rdx
callq 0x410000
leaq 0x60(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x410910
leaq 0x40(%rsp), %rdi
movq 0xb0(%rsp), %rsi
addq $0x60, %rsi
movq 0xa8(%rsp), %rdx
addq $0x40, %rdx
callq 0x410910
leaq 0x20(%rsp), %rdi
movq 0xb0(%rsp), %rsi
addq $0x40, %rsi
movq 0xb0(%rsp), %rdx
addq $0x40, %rdx
callq 0x410000
movq %rsp, %rdi
leaq 0x60(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x410240
leaq 0x60(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x410000
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x410240
leaq 0x20(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x410000
movq 0xb0(%rsp), %rdi
movq %rsp, %rsi
leaq 0x80(%rsp), %rdx
callq 0x410910
movq 0xb0(%rsp), %rdi
addq $0x20, %rdi
leaq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x410910
movq 0xb0(%rsp), %rdi
addq $0x60, %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x410910
movq 0xb0(%rsp), %rdi
addq $0x40, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x410910
addq $0xb8, %rsp
retq
nopl (%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_sign.c
// Function: edp_DoublePoint
void edp_DoublePoint(Ext_POINT *p)
{
    U_WORD a[K_WORDS], b[K_WORDS], c[K_WORDS], d[K_WORDS], e[K_WORDS];

    ecp_SqrReduce(a, p->x);         /* A = X1^2 */
    ecp_SqrReduce(b, p->y);         /* B = Y1^2 */
    ecp_SqrReduce(c, p->z);         /* C = 2*Z1^2 */
    ecp_AddReduce(c, c, c);
    ecp_SubReduce(d, _w_maxP, a);   /* D = -A */

    ecp_SubReduce(a, d, b);         /* H = D-B */
    ecp_AddReduce(d, d, b);         /* G = D+B */
    ecp_SubReduce(b, d, c);         /* F = G-C */
    ecp_AddReduce(e, p->x, p->y);   /* E = (X1+Y1)^2-A-B = (X1+Y1)^2+H */
    ecp_SqrReduce(e, e);
    ecp_AddReduce(e, e, a);

    ecp_MulReduce(p->x, e, b);      /* E*F */
    ecp_MulReduce(p->y, a, d);      /* H*G */
    ecp_MulReduce(p->z, d, b);      /* G*F */
    ecp_MulReduce(p->t, e, a);      /* E*H */
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
leaq 0x80(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x410e10
leaq 0x60(%rsp), %rdi
movq 0xa0(%rsp), %rsi
addq $0x20, %rsi
callq 0x410e10
leaq 0x40(%rsp), %rdi
movq 0xa0(%rsp), %rsi
addq $0x40, %rsi
callq 0x410e10
leaq 0x40(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x410000
leaq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rdx
movq $0x587be0, %rsi         # imm = 0x587BE0
callq 0x410240
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x410240
leaq 0x20(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x410000
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x410240
movq %rsp, %rdi
movq 0xa0(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq $0x20, %rdx
callq 0x410000
movq %rsp, %rdi
movq %rsp, %rsi
callq 0x410e10
movq %rsp, %rdi
movq %rsp, %rsi
leaq 0x80(%rsp), %rdx
callq 0x410000
movq 0xa0(%rsp), %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x410910
movq 0xa0(%rsp), %rdi
addq $0x20, %rdi
leaq 0x80(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x410910
movq 0xa0(%rsp), %rdi
addq $0x40, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x410910
movq 0xa0(%rsp), %rdi
addq $0x60, %rdi
movq %rsp, %rsi
leaq 0x80(%rsp), %rdx
callq 0x410910
addq $0xa8, %rsp
retq
nopl (%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_sign.c
// Function: edp_BasePointMult
void edp_BasePointMult(
    OUT Ext_POINT *S, 
    IN const U_WORD *sk, 
    IN const U_WORD *R)
{
    int i = 1;
    U8 cut[32];
    const PA_POINT *p0;

    ecp_8Folds(cut, sk);

    p0 = &_w_base_folding8[cut[0]];

    ecp_SubReduce(S->x, p0->YpX, p0->YmX);  /* 2x */
    ecp_AddReduce(S->y, p0->YpX, p0->YmX);  /* 2y */
    ecp_MulReduce(S->t, p0->T2d, _w_di);    /* 2xy */

    /* Randomize starting point */

    ecp_AddReduce(S->z, R, R);              /* Z = 2R */
    ecp_MulReduce(S->x, S->x, R);           /* X = 2xR */
    ecp_MulReduce(S->t, S->t, R);           /* T = 2xyR */
    ecp_MulReduce(S->y, S->y, R);           /* Y = 2yR */

    do 
    {
        edp_DoublePoint(S);
        edp_AddAffinePoint(S, &_w_base_folding8[cut[i]]);
    } while (i++ < 31);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl $0x1, 0x3c(%rsp)
leaq 0x10(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x411cd0
movzbl 0x10(%rsp), %eax
movl %eax, %ecx
leaq 0x1771c8(%rip), %rax    # 0x5817c0
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x8(%rsp), %rdx
addq $0x20, %rdx
callq 0x410240
movq 0x50(%rsp), %rdi
addq $0x20, %rdi
movq 0x8(%rsp), %rsi
movq 0x8(%rsp), %rdx
addq $0x20, %rdx
callq 0x410000
movq 0x50(%rsp), %rdi
addq $0x60, %rdi
movq 0x8(%rsp), %rsi
addq $0x40, %rsi
leaq 0x17714f(%rip), %rdx    # 0x5817a0
callq 0x410910
movq 0x50(%rsp), %rdi
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x410000
movq 0x50(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x410910
movq 0x50(%rsp), %rdi
addq $0x60, %rdi
movq 0x50(%rsp), %rsi
addq $0x60, %rsi
movq 0x40(%rsp), %rdx
callq 0x410910
movq 0x50(%rsp), %rdi
addq $0x20, %rdi
movq 0x50(%rsp), %rsi
addq $0x20, %rsi
movq 0x40(%rsp), %rdx
callq 0x410910
movq 0x50(%rsp), %rdi
callq 0x40a450
movq 0x50(%rsp), %rdi
movslq 0x3c(%rsp), %rax
movzbl 0x10(%rsp,%rax), %eax
leaq 0x1770e6(%rip), %rsi    # 0x5817c0
imulq $0x60, %rax, %rax
addq %rax, %rsi
callq 0x40a2b0
movl 0x3c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x3c(%rsp)
cmpl $0x1f, %eax
jl 0x40a6ba
addq $0x58, %rsp
retq
nopl (%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_sign.c
// Function: edp_BasePointMultiply
void edp_BasePointMultiply(
    OUT Affine_POINT *R, 
    IN const U_WORD *sk, 
    IN const void *blinding)
{
    Ext_POINT S;
    U_WORD t[K_WORDS];

    if (blinding)
    {
        eco_AddReduce(t, sk, ((EDP_BLINDING_CTX*)blinding)->bl);
        edp_BasePointMult(&S, t, ((EDP_BLINDING_CTX*)blinding)->zr);
        edp_AddPoint(&S, &S, &((EDP_BLINDING_CTX*)blinding)->BP);
    }
    else
    {
        edp_BasePointMult(&S, sk, edp_custom_blinding.zr);
    }

    ecp_Inverse(S.z, S.z);
    ecp_MulMod(R->x, S.x, S.z);
    ecp_MulMod(R->y, S.y, S.z);
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
je 0x40a776
movq %rsp, %rdi
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x4116e0
movq %rsp, %rsi
movq 0xa0(%rsp), %rdx
addq $0x20, %rdx
leaq 0x20(%rsp), %rdi
callq 0x40a5c0
movq 0xa0(%rsp), %rdx
addq $0x40, %rdx
leaq 0x20(%rsp), %rsi
movq %rsi, %rdi
callq 0x40b1d0
jmp 0x40a793
movq 0xa8(%rsp), %rsi
leaq 0x20(%rsp), %rdi
movq $0x5f32b8, %rdx         # imm = 0x5F32B8
addq $0x20, %rdx
callq 0x40a5c0
leaq 0x20(%rsp), %rdi
addq $0x40, %rdi
leaq 0x20(%rsp), %rsi
addq $0x40, %rsi
callq 0x410f40
movq 0xb0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x20(%rsp), %rdx
addq $0x40, %rdx
callq 0x410f00
movq 0xb0(%rsp), %rdi
addq $0x20, %rdi
leaq 0x20(%rsp), %rsi
addq $0x20, %rsi
leaq 0x20(%rsp), %rdx
addq $0x40, %rdx
callq 0x410f00
addq $0xb8, %rsp
retq
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_sign.c
// Function: edp_ExtPoint2PE
void edp_ExtPoint2PE(PE_POINT *r, const Ext_POINT *p)
{
    ecp_AddReduce(r->YpX, p->y, p->x);
    ecp_SubReduce(r->YmX, p->y, p->x);
    ecp_MulReduce(r->T2d, p->t, _w_2d);
    ecp_AddReduce(r->Z2, p->z, p->z);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x20, %rsi
movq 0x8(%rsp), %rdx
callq 0x410000
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
movq 0x8(%rsp), %rsi
addq $0x20, %rsi
movq 0x8(%rsp), %rdx
callq 0x410240
movq 0x10(%rsp), %rdi
addq $0x40, %rdi
movq 0x8(%rsp), %rsi
addq $0x60, %rsi
leaq 0x176f35(%rip), %rdx    # 0x581780
callq 0x410910
movq 0x10(%rsp), %rdi
addq $0x60, %rdi
movq 0x8(%rsp), %rsi
addq $0x40, %rsi
movq 0x8(%rsp), %rdx
addq $0x40, %rdx
callq 0x410000
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_sign.c
// Function: ed25519_CreateKeyPair
void ed25519_CreateKeyPair(
    unsigned char *pubKey,              /* OUT: public key */
    unsigned char *privKey,             /* OUT: private key */
    const void *blinding,               /* IN: [optional] null or blinding context */
    const unsigned char *sk)            /* IN: secret key (32 bytes) */
{
    U8 md[SHA512_DIGEST_LENGTH];
    U_WORD t[K_WORDS];
    SHA512_CTX H;
    Affine_POINT Q;

    /* [a:b] = H(sk) */
    SHA512_Init(&H);
    SHA512_Update(&H, sk, 32);
    SHA512_Final(md, &H);
    ecp_TrimSecretKey(md);

    ecp_BytesToWords(t, md);
    edp_BasePointMultiply(&Q, t, blinding);
    ed25519_PackPoint(pubKey, Q.y, Q.x[0]);

    memcpy(privKey, sk, 32);
    memcpy(privKey+32, pubKey, 32);
}

// Assembly:
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, 0x1a0(%rsp)
movq %rsi, 0x198(%rsp)
movq %rdx, 0x190(%rsp)
movq %rcx, 0x188(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x40bc10
movq 0x188(%rsp), %rsi
leaq 0x48(%rsp), %rdi
movl $0x20, %edx
callq 0x40f750
leaq 0x140(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x40bcf0
leaq 0x140(%rsp), %rdi
callq 0x411820
leaq 0x120(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x4118a0
leaq 0x120(%rsp), %rsi
movq 0x190(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x40a700
movq 0x1a0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
addq $0x20, %rsi
movl 0x8(%rsp), %eax
andl $0x1, %eax
movzbl %al, %edx
callq 0x4119f0
movq 0x198(%rsp), %rax
movq 0x188(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq 0x198(%rsp), %rax
movq 0x1a0(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x20(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x38(%rax)
addq $0x1a8, %rsp            # imm = 0x1A8
retq
nopl (%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_verify.c
// Function: ed25519_CalculateX
void ed25519_CalculateX(OUT U_WORD *X, IN const U_WORD *Y, U_WORD parity)
{
    U_WORD u[K_WORDS], v[K_WORDS], a[K_WORDS], b[K_WORDS];

    /* Calculate sqrt((y^2 - 1)/(d*y^2 + 1)) */

    ecp_SqrReduce(u, Y);            /* u = y^2 */
    ecp_MulReduce(v, u, _w_d);      /* v = dy^2 */
    ecp_SubReduce(u, u, _w_One);    /* u = y^2-1 */
    ecp_AddReduce(v, v, _w_One);    /* v = dy^2+1 */

    /* Calculate:  sqrt(u/v) = u*v^3 * (u*v^7)^((p-5)/8) */

    ecp_SqrReduce(b, v);
    ecp_MulReduce(a, u, b);
    ecp_MulReduce(a, a, v);         /* a = u*v^3 */
    ecp_SqrReduce(b, b);            /* b = v^4 */
    ecp_MulReduce(b, a, b);         /* b = u*v^7 */
    ecp_ModExp2523(b, b);
    ecp_MulReduce(X, b, a);

    /* Check if we have correct sqrt, else, multiply by sqrt(-1) */

    ecp_SqrReduce(b, X);
    ecp_MulReduce(b, b, v);
    ecp_SubReduce(b, b, u);
    ecp_Mod(b);
    if (ecp_CmpNE(b, _w_Zero)) ecp_MulReduce(X, X, _w_I);

    while (ecp_CmpLT(X, _w_P) == 0) ecp_Sub(X, X, _w_P);

    /* match parity */
    if (((X[0] ^ parity) & 1) != 0)
        ecp_Sub(X, _w_P, X);
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movl %edx, 0x84(%rsp)
leaq 0x60(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x410e10
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x17c9cf(%rip), %rdx    # 0x5877e0
callq 0x410910
leaq 0x60(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq $0x5817c0, %rdx         # imm = 0x5817C0
callq 0x410240
leaq 0x40(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq $0x5817c0, %rdx         # imm = 0x5817C0
callq 0x410000
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x410e10
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq %rsp, %rdx
callq 0x410910
leaq 0x20(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x410910
movq %rsp, %rdi
movq %rsp, %rsi
callq 0x410e10
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x410910
movq %rsp, %rdi
movq %rsp, %rsi
callq 0x40afa0
movq 0x90(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x410910
movq %rsp, %rdi
movq 0x90(%rsp), %rsi
callq 0x410e10
movq %rsp, %rdi
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
callq 0x410910
movq %rsp, %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x410240
movq %rsp, %rdi
callq 0x410490
movq %rsp, %rdi
movq $0x5817c0, %rsi         # imm = 0x5817C0
addq $0x40, %rsi
callq 0x40fc50
cmpl $0x0, %eax
je 0x40af1c
movq 0x90(%rsp), %rdi
movq 0x90(%rsp), %rsi
leaq 0x17c8a9(%rip), %rdx    # 0x5877c0
callq 0x410910
jmp 0x40af1e
movq 0x90(%rsp), %rdi
movq $0x587bc0, %rsi         # imm = 0x587BC0
callq 0x40fcf0
cmpl $0x0, %eax
jne 0x40af55
movq 0x90(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq $0x587bc0, %rdx         # imm = 0x587BC0
callq 0x40fd20
jmp 0x40af1e
movq 0x90(%rsp), %rax
movl (%rax), %eax
xorl 0x84(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x40af8a
movq 0x90(%rsp), %rdi
movq 0x90(%rsp), %rdx
movq $0x587bc0, %rsi         # imm = 0x587BC0
callq 0x40fd20
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_verify.c
// Function: ecp_ModExp2523
void ecp_ModExp2523(U_WORD *Y, const U_WORD *X)
{
    U_WORD x2[K_WORDS], x9[K_WORDS], x11[K_WORDS], x5[K_WORDS], x10[K_WORDS];
    U_WORD x20[K_WORDS], x50[K_WORDS], x100[K_WORDS], t[K_WORDS];

    ecp_SqrReduce(x2, X);                       /* 2 */
    ecp_SrqMulReduce(x9, x2, 2, X);             /* 9 */
    ecp_MulReduce(x11, x9, x2);                 /* 11 */
    ecp_SqrReduce(t, x11);                      /* 22 */
    ecp_MulReduce(x5, t, x9);                   /* 31 = 2^5 - 2^0 */
    ecp_SrqMulReduce(x10, x5, 5, x5);           /* 2^10 - 2^0 */
    ecp_SrqMulReduce(x20, x10, 10, x10);        /* 2^20 - 2^0 */
    ecp_SrqMulReduce(t, x20, 20, x20);          /* 2^40 - 2^0 */
    ecp_SrqMulReduce(x50, t, 10, x10);          /* 2^50 - 2^0 */
    ecp_SrqMulReduce(x100, x50, 50, x50);       /* 2^100 - 2^0 */
    ecp_SrqMulReduce(t, x100, 100, x100);       /* 2^200 - 2^0 */
    ecp_SrqMulReduce(t, t, 50, x50);            /* 2^250 - 2^0 */
    ecp_SqrReduce(t, t); ecp_SqrReduce(t, t);   /* 2^252 - 2^2 */
    ecp_MulReduce(Y, t, X);                     /* 2^252 - 3 */
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
leaq 0x100(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x410e10
leaq 0xe0(%rsp), %rdi
leaq 0x100(%rsp), %rsi
movq 0x128(%rsp), %rcx
movl $0x2, %edx
callq 0x40b170
leaq 0xc0(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0x100(%rsp), %rdx
callq 0x410910
movq %rsp, %rdi
leaq 0xc0(%rsp), %rsi
callq 0x410e10
leaq 0xa0(%rsp), %rdi
movq %rsp, %rsi
leaq 0xe0(%rsp), %rdx
callq 0x410910
leaq 0x80(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0xa0(%rsp), %rcx
movl $0x5, %edx
callq 0x40b170
leaq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x80(%rsp), %rcx
movl $0xa, %edx
callq 0x40b170
movq %rsp, %rdi
leaq 0x60(%rsp), %rsi
leaq 0x60(%rsp), %rcx
movl $0x14, %edx
callq 0x40b170
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
leaq 0x80(%rsp), %rcx
movl $0xa, %edx
callq 0x40b170
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movl $0x32, %edx
callq 0x40b170
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x20(%rsp), %rcx
movl $0x64, %edx
callq 0x40b170
movq %rsp, %rdi
movq %rsp, %rsi
leaq 0x40(%rsp), %rcx
movl $0x32, %edx
callq 0x40b170
movq %rsp, %rdi
movq %rsp, %rsi
callq 0x410e10
movq %rsp, %rdi
movq %rsp, %rsi
callq 0x410e10
movq 0x130(%rsp), %rdi
movq %rsp, %rsi
movq 0x128(%rsp), %rdx
callq 0x410910
addq $0x138, %rsp            # imm = 0x138
retq
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_verify.c
// Function: edp_AddPoint
void edp_AddPoint(Ext_POINT *r, const Ext_POINT *p, const PE_POINT *q)
{
    U_WORD a[K_WORDS], b[K_WORDS], c[K_WORDS], d[K_WORDS], e[K_WORDS];

    ecp_SubReduce(a, p->y, p->x);           /* A = (Y1-X1)*(Y2-X2) */
    ecp_MulReduce(a, a, q->YmX);
    ecp_AddReduce(b, p->y, p->x);           /* B = (Y1+X1)*(Y2+X2) */
    ecp_MulReduce(b, b, q->YpX);
    ecp_MulReduce(c, p->t, q->T2d);         /* C = T1*2d*T2 */
    ecp_MulReduce(d, p->z, q->Z2);          /* D = Z1*2*Z2 */
    ecp_SubReduce(e, b, a);                 /* E = B-A */
    ecp_AddReduce(b, b, a);                 /* H = B+A */
    ecp_SubReduce(a, d, c);                 /* F = D-C */
    ecp_AddReduce(d, d, c);                 /* G = D+C */

    ecp_MulReduce(r->x, e, a);              /* E*F */
    ecp_MulReduce(r->y, b, d);              /* H*G */
    ecp_MulReduce(r->t, e, b);              /* E*H */
    ecp_MulReduce(r->z, d, a);              /* G*F */
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
leaq 0x80(%rsp), %rdi
movq 0xa8(%rsp), %rsi
addq $0x20, %rsi
movq 0xa8(%rsp), %rdx
callq 0x410240
leaq 0x80(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq $0x20, %rdx
callq 0x410910
leaq 0x60(%rsp), %rdi
movq 0xa8(%rsp), %rsi
addq $0x20, %rsi
movq 0xa8(%rsp), %rdx
callq 0x410000
leaq 0x60(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x410910
leaq 0x40(%rsp), %rdi
movq 0xa8(%rsp), %rsi
addq $0x60, %rsi
movq 0xa0(%rsp), %rdx
addq $0x40, %rdx
callq 0x410910
leaq 0x20(%rsp), %rdi
movq 0xa8(%rsp), %rsi
addq $0x40, %rsi
movq 0xa0(%rsp), %rdx
addq $0x60, %rdx
callq 0x410910
movq %rsp, %rdi
leaq 0x60(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x410240
leaq 0x60(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x410000
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x410240
leaq 0x20(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x410000
movq 0xb0(%rsp), %rdi
movq %rsp, %rsi
leaq 0x80(%rsp), %rdx
callq 0x410910
movq 0xb0(%rsp), %rdi
addq $0x20, %rdi
leaq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x410910
movq 0xb0(%rsp), %rdi
addq $0x60, %rdi
movq %rsp, %rsi
leaq 0x60(%rsp), %rdx
callq 0x410910
movq 0xb0(%rsp), %rdi
addq $0x40, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x410910
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_verify.c
// Function: ed25519_Verify_Check
int ed25519_Verify_Check(
    const void  *context,                       /* IN: precomputes */
    const unsigned char *signature,             /* IN: signature (R,S) */
    const unsigned char *msg, size_t msg_size)  /* IN: message to sign */
{
    SHA512_CTX H;
    Affine_POINT T;
    U_WORD h[K_WORDS], s[K_WORDS];
    U8 md[SHA512_DIGEST_LENGTH];

    /* h = H(enc(R) + pk + m)  mod BPO */
    SHA512_Init(&H);
    SHA512_Update(&H, signature, 32);       /* enc(R) */
    SHA512_Update(&H, ((EDP_SIGV_CTX*)context)->pk, 32);
    SHA512_Update(&H, msg, msg_size);
    SHA512_Final(md, &H);
    eco_DigestToWords(h, md);
    eco_Mod(h);

    /* T = s*P + h*(-Q) = (s - h*a)*P = r*P = R */

    ecp_BytesToWords(s, signature+32);
    edp_PolyPointMultiply(&T, s, h, ((EDP_SIGV_CTX*)context)->q_table);
    ed25519_PackPoint(md, T.y, T.x[0]);

    return (memcmp(md, signature, 32) == 0) ? 1 : 0;
}

// Assembly:
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, 0x1b0(%rsp)
movq %rsi, 0x1a8(%rsp)
movq %rdx, 0x1a0(%rsp)
movq %rcx, 0x198(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x40bc10
movq 0x1a8(%rsp), %rsi
leaq 0xc0(%rsp), %rdi
movl $0x20, %edx
callq 0x40f750
movq 0x1b0(%rsp), %rsi
leaq 0xc0(%rsp), %rdi
movl $0x20, %edx
callq 0x40f750
movq 0x1a0(%rsp), %rsi
movq 0x198(%rsp), %rdx
leaq 0xc0(%rsp), %rdi
callq 0x40f750
movq %rsp, %rdi
leaq 0xc0(%rsp), %rsi
callq 0x40bcf0
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
callq 0x411730
leaq 0x60(%rsp), %rdi
callq 0x411670
leaq 0x40(%rsp), %rdi
movq 0x1a8(%rsp), %rsi
addq $0x20, %rsi
callq 0x4118a0
leaq 0x40(%rsp), %rsi
leaq 0x60(%rsp), %rdx
movq 0x1b0(%rsp), %rcx
addq $0x20, %rcx
leaq 0x80(%rsp), %rdi
callq 0x40ba20
movq %rsp, %rdi
leaq 0x80(%rsp), %rsi
addq $0x20, %rsi
movl 0x80(%rsp), %eax
andl $0x1, %eax
movzbl %al, %edx
callq 0x4119f0
movq %rsp, %rdi
movq 0x1a8(%rsp), %rsi
movl $0x20, %edx
callq 0x401028
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/ed25519_verify.c
// Function: edp_PolyPointMultiply
static void edp_PolyPointMultiply(
    Affine_POINT *r, 
    const U_WORD *a, 
    const U_WORD *b, 
    const PE_POINT *qtable)
{
    int i = 1;
    Ext_POINT S;
    const PE_POINT *q0;
    U8 u[32], v[64];

    ecp_8Folds(u, a);
    ecp_4Folds(v, b);

    /* Set initial value of S */
    q0 = &qtable[v[0]];
    ecp_SubReduce(S.x, q0->YpX, q0->YmX);   /* 2x */
    ecp_AddReduce(S.y, q0->YpX, q0->YmX);   /* 2y */
    ecp_MulReduce(S.t, q0->T2d, _w_di);     /* 2xy */
    ecp_Copy(S.z, q0->Z2);                  /* 2z */

    do
    {   /* 31D + 31A */
        edp_DoublePoint(&S);
        edp_AddPoint(&S, &S, &qtable[v[i]]);
    } while (++i < 32);

    do
    {   /* 32D + 64A */
        edp_DoublePoint(&S);
        edp_AddAffinePoint(&S, &_w_base_folding8[u[i-32]]);
        edp_AddPoint(&S, &S, &qtable[v[i]]);
    } while (++i < 64);

    ecp_Inverse(S.z, S.z);
    ecp_MulMod(r->x, S.x, S.z);
    ecp_MulMod(r->y, S.y, S.z);
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq %rdx, 0x100(%rsp)
movq %rcx, 0xf8(%rsp)
movl $0x1, 0xf4(%rsp)
leaq 0x40(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0x411cd0
movq %rsp, %rdi
movq 0x100(%rsp), %rsi
callq 0x411c00
movq 0xf8(%rsp), %rax
movzbl (%rsp), %ecx
shlq $0x7, %rcx
addq %rcx, %rax
movq %rax, 0x68(%rsp)
leaq 0x74(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq $0x20, %rdx
callq 0x410240
leaq 0x74(%rsp), %rdi
addq $0x20, %rdi
movq 0x68(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq $0x20, %rdx
callq 0x410000
leaq 0x74(%rsp), %rdi
addq $0x60, %rdi
movq 0x68(%rsp), %rsi
addq $0x40, %rsi
movq $0x5817a0, %rdx         # imm = 0x5817A0
callq 0x410910
leaq 0x74(%rsp), %rdi
addq $0x40, %rdi
movq 0x68(%rsp), %rsi
addq $0x60, %rsi
callq 0x40fc10
leaq 0x74(%rsp), %rdi
callq 0x40a450
movq 0xf8(%rsp), %rdx
movslq 0xf4(%rsp), %rax
movzbl (%rsp,%rax), %eax
shlq $0x7, %rax
addq %rax, %rdx
leaq 0x74(%rsp), %rsi
movq %rsi, %rdi
callq 0x40b1d0
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
cmpl $0x20, %eax
jl 0x40baf5
jmp 0x40bb3f
leaq 0x74(%rsp), %rdi
callq 0x40a450
movl 0xf4(%rsp), %eax
subl $0x20, %eax
cltq
movzbl 0x40(%rsp,%rax), %eax
movq $0x5817c0, %rsi         # imm = 0x5817C0
imulq $0x60, %rax, %rax
addq %rax, %rsi
leaq 0x74(%rsp), %rdi
callq 0x40a2b0
movq 0xf8(%rsp), %rdx
movslq 0xf4(%rsp), %rax
movzbl (%rsp,%rax), %eax
shlq $0x7, %rax
addq %rax, %rdx
leaq 0x74(%rsp), %rsi
movq %rsi, %rdi
callq 0x40b1d0
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
cmpl $0x40, %eax
jl 0x40bb3f
leaq 0x74(%rsp), %rdi
addq $0x40, %rdi
leaq 0x74(%rsp), %rsi
addq $0x40, %rsi
callq 0x410f40
movq 0x110(%rsp), %rdi
leaq 0x74(%rsp), %rsi
leaq 0x74(%rsp), %rdx
addq $0x40, %rdx
callq 0x410f00
movq 0x110(%rsp), %rdi
addq $0x20, %rdi
leaq 0x74(%rsp), %rsi
addq $0x20, %rsi
leaq 0x74(%rsp), %rdx
addq $0x40, %rdx
callq 0x410f00
addq $0x118, %rsp            # imm = 0x118
retq
nopl (%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/sha512.c
// Function: SHA512_Init
void SHA512_Init (SHA512_CTX *c)
{
    c->h[0]=UINT64(0x6a09e667f3bcc908);
    c->h[1]=UINT64(0xbb67ae8584caa73b);
    c->h[2]=UINT64(0x3c6ef372fe94f82b);
    c->h[3]=UINT64(0xa54ff53a5f1d36f1);
    c->h[4]=UINT64(0x510e527fade682d1);
    c->h[5]=UINT64(0x9b05688c2b3e6c1f);
    c->h[6]=UINT64(0x1f83d9abfb41bd6b);
    c->h[7]=UINT64(0x5be0cd19137e2179);

    c->Nl=0;
    c->Nh=0;
    c->num=0;
    c->md_len=SHA512_DIGEST_LENGTH;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movabsq $0x6a09e667f3bcc908, %rcx # imm = 0x6A09E667F3BCC908
movq %rcx, (%rax)
movq -0x8(%rsp), %rax
movabsq $-0x4498517a7b3558c5, %rcx # imm = 0xBB67AE8584CAA73B
movq %rcx, 0x8(%rax)
movq -0x8(%rsp), %rax
movabsq $0x3c6ef372fe94f82b, %rcx # imm = 0x3C6EF372FE94F82B
movq %rcx, 0x10(%rax)
movq -0x8(%rsp), %rax
movabsq $-0x5ab00ac5a0e2c90f, %rcx # imm = 0xA54FF53A5F1D36F1
movq %rcx, 0x18(%rax)
movq -0x8(%rsp), %rax
movabsq $0x510e527fade682d1, %rcx # imm = 0x510E527FADE682D1
movq %rcx, 0x20(%rax)
movq -0x8(%rsp), %rax
movabsq $-0x64fa9773d4c193e1, %rcx # imm = 0x9B05688C2B3E6C1F
movq %rcx, 0x28(%rax)
movq -0x8(%rsp), %rax
movabsq $0x1f83d9abfb41bd6b, %rcx # imm = 0x1F83D9ABFB41BD6B
movq %rcx, 0x30(%rax)
movq -0x8(%rsp), %rax
movabsq $0x5be0cd19137e2179, %rcx # imm = 0x5BE0CD19137E2179
movq %rcx, 0x38(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x40(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0xd0(%rax)
movq -0x8(%rsp), %rax
movl $0x40, 0xd4(%rax)
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/sha512.c
// Function: SHA512_Update
void SHA512_Update (SHA512_CTX *c, const void *_data, size_t len)
{
    SHA_LONG64 l;
    unsigned char *p=c->u.p;
    const unsigned char *data=(const unsigned char *)_data;

    if (len==0) return;

    l = (c->Nl+(((SHA_LONG64)len)<<3))&UINT64(0xffffffffffffffff);
    if (l < c->Nl) c->Nh++;
    if (sizeof(len)>=8) c->Nh+=(((SHA_LONG64)len)>>61);
    c->Nl=l;

    if (c->num != 0)
    {
        size_t n = SHA512_CBLOCK - c->num;

        if (len < n)
        {
            memcpy (p+c->num,data,len), c->num += (unsigned int)len;
            return;
        }
        else    
        {
            memcpy (p+c->num,data,n), c->num = 0;
            len-=n, data+=n;
            SHA512_Transform (c,p);
        }
    }

    while (len >= SHA512_CBLOCK)
    {
        SHA512_Transform (c,data);//,len/SHA512_CBLOCK),
        data += SHA512_CBLOCK;
        len  -= SHA512_CBLOCK;
    }

    if (len != 0)
        memcpy (p,data,len), c->num = (int)len;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
addq $0x50, %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x40f788
jmp 0x40f929
movq 0x30(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x20(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
andq $-0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x40f7c7
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x48(%rax)
movq 0x20(%rsp), %rcx
shrq $0x3d, %rcx
movq 0x30(%rsp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x30(%rsp), %rax
cmpl $0x0, 0xd0(%rax)
je 0x40f8bd
movq 0x30(%rsp), %rcx
movl $0x80, %eax
subl 0xd0(%rcx), %eax
movl %eax, %eax
movq %rax, (%rsp)
movq 0x20(%rsp), %rax
cmpq (%rsp), %rax
jae 0x40f85d
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movl 0xd0(%rax), %eax
addq %rax, %rdi
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x401108
movq 0x20(%rsp), %rax
movl %eax, %ecx
movq 0x30(%rsp), %rax
addl 0xd0(%rax), %ecx
movl %ecx, 0xd0(%rax)
jmp 0x40f929
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movl 0xd0(%rax), %eax
addq %rax, %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %rdx
callq 0x401108
movq 0x30(%rsp), %rax
movl $0x0, 0xd0(%rax)
movq (%rsp), %rcx
movq 0x20(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x20(%rsp)
movq (%rsp), %rax
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x40c010
jmp 0x40f8bd
jmp 0x40f8bf
cmpq $0x80, 0x20(%rsp)
jb 0x40f8fb
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x40c010
movq 0x8(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
subq $0x80, %rax
movq %rax, 0x20(%rsp)
jmp 0x40f8bf
cmpq $0x0, 0x20(%rsp)
je 0x40f929
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x401108
movq 0x20(%rsp), %rax
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0xd0(%rax)
addq $0x38, %rsp
retq
nop
// File: msotoodeh[P]asymmetric-passwords/common/base64.cpp
// Function: B64Encode[abi:cxx11](void const*, unsigned long)
std::string B64Encode(const void* data, size_t size)
{
    uint32_t accu = 0, bits = 0;
    std::string os;
    for (size_t i = 0; i < size; i++) {
        accu = (accu << 8) | ((unsigned char*)data)[i];
        bits += 8;

        while (bits >= 6) {
            bits -= 6;
            os.append(1, bin_to_base64[(accu >> bits) & 0x3f]);
        }
    }
    if (bits > 0)
        os.append(1, bin_to_base64[(accu << (6 - bits)) & 0x3f]);
    return os;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
callq 0x47eae0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x40f9fd
movl -0x1c(%rbp), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x20(%rbp)
cmpl $0x6, -0x20(%rbp)
jb 0x40f9ea
movq -0x50(%rbp), %rdi
movl -0x20(%rbp), %eax
addl $-0x6, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movb -0x20(%rbp), %cl
shrl %cl, %eax
andl $0x3f, %eax
leaq 0x1780bf(%rip), %rcx    # 0x587a80
movsbl (%rax,%rcx), %edx
movl $0x1, %esi
callq 0x47f650
jmp 0x40f9d1
jmp 0x40f99c
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x47ebf0
jmp 0x40fa4c
jmp 0x40f9ec
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x40f96e
cmpl $0x0, -0x20(%rbp)
jbe 0x40fa2f
movq -0x50(%rbp), %rdi
movl -0x1c(%rbp), %eax
movb -0x20(%rbp), %dl
movb $0x6, %cl
subb %dl, %cl
shll %cl, %eax
andl $0x3f, %eax
leaq 0x178063(%rip), %rcx    # 0x587a80
movsbl (%rax,%rcx), %edx
movl $0x1, %esi
callq 0x47f650
jmp 0x40fa2d
jmp 0x40fa2f
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x40fa42
movq -0x50(%rbp), %rdi
callq 0x47ebf0
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x4b0e70
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/base64.cpp
// Function: B64Decode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned char*, unsigned long)
size_t B64Decode(const std::string& b64String, unsigned char* buffer, size_t size)
{
    size_t i;
    uint32_t ch, accu = 0, bits = 0, index = 0;
    for (i = 0; i < size; i++) {
        while (bits < 8) {
            do {
                ch = base64_to_bin[b64String[index++] & 0xff];
            } while (ch == WS);     // ignore white spaces

            if (ch >= 64) return i; // TR is expected here

            accu = (accu << 6) | ch;
            bits += 6;
        }

        bits -= 8;
        *buffer++ = (unsigned char)(accu >> bits);
    }
    return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x40fb8c
jmp 0x40faf1
cmpl $0x8, -0x34(%rbp)
jae 0x40fb57
jmp 0x40faf9
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x38(%rbp)
movl %eax, %eax
movl %eax, %esi
callq 0x47f120
movsbl (%rax), %eax
andl $0xff, %eax
movslq %eax, %rcx
leaq 0x177f9d(%rip), %rax    # 0x587ac0
movzbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x40, -0x2c(%rbp)
je 0x40faf9
cmpl $0x40, -0x2c(%rbp)
jb 0x40fb40
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x40fb94
movl -0x30(%rbp), %eax
shll $0x6, %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x34(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x34(%rbp)
jmp 0x40faf1
movl -0x34(%rbp), %eax
subl $0x8, %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
movl -0x34(%rbp), %ecx
shrl %cl, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x40fae1
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/curve25519_mehdi.c
// Function: ecp_Sub
S32 ecp_Sub(U32* Z, const U32* X, const U32* Y) 
{
    M64 b;
    ECP_SUB32(Z[0], X[0], Y[0]);
    ECP_SBC32(Z[1], X[1], Y[1]);
    ECP_SBC32(Z[2], X[2], Y[2]);
    ECP_SBC32(Z[3], X[3], Y[3]);
    ECP_SBC32(Z[4], X[4], Y[4]);
    ECP_SBC32(Z[5], X[5], Y[5]);
    ECP_SBC32(Z[6], X[6], Y[6]);
    ECP_SBC32(Z[7], X[7], Y[7]);
    return b.s32.hi;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x10(%rsp), %rax
movl (%rax), %eax
movq -0x18(%rsp), %rcx
movl (%rcx), %ecx
subq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
subq %rcx, %rax
movslq -0x1c(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rsp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x8(%rcx), %ecx
subq %rcx, %rax
movslq -0x1c(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rsp), %rax
movl 0xc(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0xc(%rcx), %ecx
subq %rcx, %rax
movslq -0x1c(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rsp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x10(%rcx), %ecx
subq %rcx, %rax
movslq -0x1c(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rsp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x14(%rcx), %ecx
subq %rcx, %rax
movslq -0x1c(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rsp), %rax
movl 0x18(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x18(%rcx), %ecx
subq %rcx, %rax
movslq -0x1c(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rsp), %rax
movl 0x1c(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x1c(%rcx), %ecx
subq %rcx, %rax
movslq -0x1c(%rsp), %rcx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl -0x1c(%rsp), %eax
retq
nopl (%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/curve25519_mehdi.c
// Function: ecp_Add
U32 ecp_Add(U32* Z, const U32* X, const U32* Y) 
{
    M64 c;

    ECP_ADD32(Z[0], X[0], Y[0]);
    ECP_ADC32(Z[1], X[1], Y[1]);
    ECP_ADC32(Z[2], X[2], Y[2]);
    ECP_ADC32(Z[3], X[3], Y[3]);
    ECP_ADC32(Z[4], X[4], Y[4]);
    ECP_ADC32(Z[5], X[5], Y[5]);
    ECP_ADC32(Z[6], X[6], Y[6]);
    ECP_ADC32(Z[7], X[7], Y[7]);
    return c.u32.hi;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x10(%rsp), %rax
movl (%rax), %eax
movq -0x18(%rsp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rsp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rsp), %rax
movl 0xc(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0xc(%rcx), %ecx
addq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rsp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x10(%rcx), %ecx
addq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rsp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x14(%rcx), %ecx
addq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rsp), %rax
movl 0x18(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x18(%rcx), %ecx
addq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rsp), %rax
movl 0x1c(%rax), %eax
movq -0x18(%rsp), %rcx
movl 0x1c(%rcx), %ecx
addq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl -0x1c(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/curve25519_mehdi.c
// Function: ecp_Mod
void ecp_Mod(U32 *X)
{
    U32 T[8];
    U32 c = (U32)ecp_Sub(X, X, _w_P);

    /* set T = 0 if c=0, else T = P */

    T[0] = c & 0xFFFFFFED;
    T[1] = T[2] = T[3] = T[4] = T[5] = T[6] = c;
    T[7] = c >> 1;

    ecp_Add(X, X, T);   /* X += 0 or P */

    /* In case there is another P there */

    c = (U32)ecp_Sub(X, X, _w_P);

    /* set T = 0 if c=0, else T = P */

    T[0] = c & 0xFFFFFFED;
    T[1] = T[2] = T[3] = T[4] = T[5] = T[6] = c;
    T[7] = c >> 1;

    ecp_Add(X, X, T);   /* X += 0 or P */
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0x177716(%rip), %rdx    # 0x587bc0
callq 0x40fd20
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
andl $-0x13, %eax
movl %eax, 0x10(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl %eax, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl %eax, 0x18(%rsp)
movl %eax, 0x14(%rsp)
movl 0xc(%rsp), %eax
shrl %eax
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40fe90
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0x1776b7(%rip), %rdx    # 0x587bc0
callq 0x40fd20
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
andl $-0x13, %eax
movl %eax, 0x10(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl %eax, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl %eax, 0x18(%rsp)
movl %eax, 0x14(%rsp)
movl 0xc(%rsp), %eax
shrl %eax
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x40fe90
addq $0x38, %rsp
retq
nopl (%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/curve25519_mehdi.c
// Function: ecp_MulReduce
void ecp_MulReduce(U32* Z, const U32* X, const U32* Y) 
{
    U32 T[16];

    ecp_mul_set(T+0, X[0], Y);
    ecp_mul_add(T+1, X[1], Y);
    ecp_mul_add(T+2, X[2], Y);
    ecp_mul_add(T+3, X[3], Y);
    ecp_mul_add(T+4, X[4], Y);
    ecp_mul_add(T+5, X[5], Y);
    ecp_mul_add(T+6, X[6], Y);
    ecp_mul_add(T+7, X[7], Y);

    /* We have T = X*Y, now do the reduction in size */

    ecp_WordMulAddReduce(Z, T, 38, T+8);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rsp, %rdi
movq 0x48(%rsp), %rax
movl (%rax), %esi
movq 0x40(%rsp), %rdx
callq 0x410a10
movq %rsp, %rdi
addq $0x4, %rdi
movq 0x48(%rsp), %rax
movl 0x4(%rax), %esi
movq 0x40(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x8, %rdi
movq 0x48(%rsp), %rax
movl 0x8(%rax), %esi
movq 0x40(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0xc, %rdi
movq 0x48(%rsp), %rax
movl 0xc(%rax), %esi
movq 0x40(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x10, %rdi
movq 0x48(%rsp), %rax
movl 0x10(%rax), %esi
movq 0x40(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x14, %rdi
movq 0x48(%rsp), %rax
movl 0x14(%rax), %esi
movq 0x40(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x18, %rdi
movq 0x48(%rsp), %rax
movl 0x18(%rax), %esi
movq 0x40(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x1c, %rdi
movq 0x48(%rsp), %rax
movl 0x1c(%rax), %esi
movq 0x40(%rsp), %rdx
callq 0x410b70
movq 0x50(%rsp), %rdi
movq %rsp, %rsi
movq %rsp, %rcx
addq $0x20, %rcx
movl $0x26, %edx
callq 0x410560
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/curve25519_mehdi.c
// Function: ecp_mul_set
static void ecp_mul_set(U32* Y, U32 b, const U32* X) 
{
    M64 c;
    ECP_MULSET_W0(Y[0], b, X[0]);
    ECP_MULSET_W1(Y[1], b, X[1]);
    ECP_MULSET_W1(Y[2], b, X[2]);
    ECP_MULSET_W1(Y[3], b, X[3]);
    ECP_MULSET_W1(Y[4], b, X[4]);
    ECP_MULSET_W1(Y[5], b, X[5]);
    ECP_MULSET_W1(Y[6], b, X[6]);
    ECP_MULSET_W1(Y[7], b, X[7]);
    Y[8] = c.u32.hi;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq %rdx, -0x18(%rsp)
movl -0xc(%rsp), %eax
movq -0x18(%rsp), %rcx
movl (%rcx), %ecx
imulq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movl -0xc(%rsp), %eax
movq -0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
imulq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x4(%rax)
movl -0xc(%rsp), %eax
movq -0x18(%rsp), %rcx
movl 0x8(%rcx), %ecx
imulq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movl -0xc(%rsp), %eax
movq -0x18(%rsp), %rcx
movl 0xc(%rcx), %ecx
imulq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0xc(%rax)
movl -0xc(%rsp), %eax
movq -0x18(%rsp), %rcx
movl 0x10(%rcx), %ecx
imulq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movl -0xc(%rsp), %eax
movq -0x18(%rsp), %rcx
movl 0x14(%rcx), %ecx
imulq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x14(%rax)
movl -0xc(%rsp), %eax
movq -0x18(%rsp), %rcx
movl 0x18(%rcx), %ecx
imulq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
movl -0xc(%rsp), %eax
movq -0x18(%rsp), %rcx
movl 0x1c(%rcx), %ecx
imulq %rcx, %rax
movl -0x1c(%rsp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl -0x1c(%rsp), %ecx
movq -0x8(%rsp), %rax
movl %ecx, 0x20(%rax)
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/curve25519_mehdi.c
// Function: ecp_Mul
void ecp_Mul(U32* Z, const U32* X, const U32* Y) 
{
    ecp_mul_set(Z+0, X[0], Y);
    ecp_mul_add(Z+1, X[1], Y);
    ecp_mul_add(Z+2, X[2], Y);
    ecp_mul_add(Z+3, X[3], Y);
    ecp_mul_add(Z+4, X[4], Y);
    ecp_mul_add(Z+5, X[5], Y);
    ecp_mul_add(Z+6, X[6], Y);
    ecp_mul_add(Z+7, X[7], Y);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movl (%rax), %esi
movq (%rsp), %rdx
callq 0x410a10
movq 0x10(%rsp), %rdi
addq $0x4, %rdi
movq 0x8(%rsp), %rax
movl 0x4(%rax), %esi
movq (%rsp), %rdx
callq 0x410b70
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movq (%rsp), %rdx
callq 0x410b70
movq 0x10(%rsp), %rdi
addq $0xc, %rdi
movq 0x8(%rsp), %rax
movl 0xc(%rax), %esi
movq (%rsp), %rdx
callq 0x410b70
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
movq 0x8(%rsp), %rax
movl 0x10(%rax), %esi
movq (%rsp), %rdx
callq 0x410b70
movq 0x10(%rsp), %rdi
addq $0x14, %rdi
movq 0x8(%rsp), %rax
movl 0x14(%rax), %esi
movq (%rsp), %rdx
callq 0x410b70
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
movq 0x8(%rsp), %rax
movl 0x18(%rax), %esi
movq (%rsp), %rdx
callq 0x410b70
movq 0x10(%rsp), %rdi
addq $0x1c, %rdi
movq 0x8(%rsp), %rax
movl 0x1c(%rax), %esi
movq (%rsp), %rdx
callq 0x410b70
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: msotoodeh[P]asymmetric-passwords/common/curve25519/curve25519_mehdi.c
// Function: ecp_SqrReduce
void ecp_SqrReduce(U32* Y, const U32* X) 
{
    /* TBD: Implementation is based on multiply */
    /*      Optimize for squaring */

    U32 T[16];

    ecp_mul_set(T+0, X[0], X);
    ecp_mul_add(T+1, X[1], X);
    ecp_mul_add(T+2, X[2], X);
    ecp_mul_add(T+3, X[3], X);
    ecp_mul_add(T+4, X[4], X);
    ecp_mul_add(T+5, X[5], X);
    ecp_mul_add(T+6, X[6], X);
    ecp_mul_add(T+7, X[7], X);

    /* We have T = X*X, now do the reduction in size */

    ecp_WordMulAddReduce(Y, T, 38, T+8);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rsp, %rdi
movq 0x48(%rsp), %rax
movl (%rax), %esi
movq 0x48(%rsp), %rdx
callq 0x410a10
movq %rsp, %rdi
addq $0x4, %rdi
movq 0x48(%rsp), %rax
movl 0x4(%rax), %esi
movq 0x48(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x8, %rdi
movq 0x48(%rsp), %rax
movl 0x8(%rax), %esi
movq 0x48(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0xc, %rdi
movq 0x48(%rsp), %rax
movl 0xc(%rax), %esi
movq 0x48(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x10, %rdi
movq 0x48(%rsp), %rax
movl 0x10(%rax), %esi
movq 0x48(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x14, %rdi
movq 0x48(%rsp), %rax
movl 0x14(%rax), %esi
movq 0x48(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x18, %rdi
movq 0x48(%rsp), %rax
movl 0x18(%rax), %esi
movq 0x48(%rsp), %rdx
callq 0x410b70
movq %rsp, %rdi
addq $0x1c, %rdi
movq 0x48(%rsp), %rax
movl 0x1c(%rax), %esi
movq 0x48(%rsp), %rdx
callq 0x410b70
movq 0x50(%rsp), %rdi
movq %rsp, %rsi
movq %rsp, %rcx
addq $0x20, %rcx
movl $0x26, %edx
callq 0x410560
addq $0x58, %rsp
retq
nop