// File: /workspace/github_c_makefile_star2_O0/joewalnes[P]verifysignature/verifysignature.c
// Function: ge_frombytes_negate_vartime
int ge_frombytes_negate_vartime(ge_p3 *h, const unsigned char *s) {
    fe u;
    fe v;
    fe v3;
    fe vxx;
    fe check;

    fe_frombytes(h->Y,s);
    fe_1(h->Z);
    fe_sq(u,h->Y);
    fe_mul(v,u,d);
    fe_sub(u,u,h->Z);       /* u = y^2-1 */
    fe_add(v,v,h->Z);       /* v = dy^2+1 */

    fe_sq(v3,v);
    fe_mul(v3,v3,v);        /* v3 = v^3 */
    fe_sq(h->X,v3);
    fe_mul(h->X,h->X,v);
    fe_mul(h->X,h->X,u);    /* x = uv^7 */

    fe_pow22523(h->X,h->X); /* x = (uv^7)^((q-5)/8) */
    fe_mul(h->X,h->X,v3);
    fe_mul(h->X,h->X,u);    /* x = uv^3(uv^7)^((q-5)/8) */

    fe_sq(vxx,h->X);
    fe_mul(vxx,vxx,v);
    fe_sub(check,vxx,u);    /* vx^2-u */
    if (fe_isnonzero(check)) {
        fe_add(check,vxx,u);  /* vx^2+u */
        if (fe_isnonzero(check)) return -1;
        fe_mul(h->X,h->X,sqrtm1);
    }

    if (fe_isnegative(h->X) == (s[31] >> 7))
        fe_neg(h->X,h->X);

    fe_mul(h->T,h->X,h->Y);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
movq -0x18(%rbp), %rsi
callq 0xa420
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xa7b0
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0xa830
leaq -0x70(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq 0xda8f(%rip), %rdx      # 0xf100
callq 0xb2f0
leaq -0x40(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x50, %rdx
callq 0xc370
leaq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x50, %rdx
callq 0xc530
leaq -0xa0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xa830
leaq -0xa0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xb2f0
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xa830
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xb2f0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0xb2f0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc6f0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0xb2f0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0xb2f0
leaq -0xd0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xa830
leaq -0xd0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0xb2f0
leaq -0x100(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0xc370
leaq -0x100(%rbp), %rdi
callq 0xca30
cmpl $0x0, %eax
je 0x17bf
leaq -0x100(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0xc530
leaq -0x100(%rbp), %rdi
callq 0xca30
cmpl $0x0, %eax
je 0x17ab
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1804
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0xd976(%rip), %rdx      # 0xf130
callq 0xb2f0
movq -0x10(%rbp), %rdi
callq 0xca60
movq -0x18(%rbp), %rcx
movzbl 0x1f(%rcx), %ecx
sarl $0x7, %ecx
cmpl %ecx, %eax
jne 0x17e4
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xca90
movq -0x10(%rbp), %rdi
addq $0x78, %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x28, %rdx
callq 0xb2f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq