// File: /workspace/github_c_makefile_star2_O0/joewalnes[P]verifysignature/verifysignature.c
// Function: ge_double_scalarmult_vartime
void ge_double_scalarmult_vartime(ge_p2 *r, const unsigned char *a,
                                  const ge_p3 *A, const unsigned char *b) {
    signed char aslide[256];
    signed char bslide[256];
    ge_cached Ai[8]; /* A,3A,5A,7A,9A,11A,13A,15A */
    ge_p1p1 t;
    ge_p3 u;
    ge_p3 A2;
    int i;

    slide(aslide,a);
    slide(bslide,b);

    ge_p3_to_cached(&Ai[0],A);
    ge_p3_dbl(&t,A); ge_p1p1_to_p3(&A2,&t);
    ge_add(&t,&A2,&Ai[0]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[1],&u);
    ge_add(&t,&A2,&Ai[1]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[2],&u);
    ge_add(&t,&A2,&Ai[2]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[3],&u);
    ge_add(&t,&A2,&Ai[3]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[4],&u);
    ge_add(&t,&A2,&Ai[4]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[5],&u);
    ge_add(&t,&A2,&Ai[5]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[6],&u);
    ge_add(&t,&A2,&Ai[6]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[7],&u);

    ge_p2_0(r);

    for (i = 255;i >= 0;--i) {
        if (aslide[i] || bslide[i]) break;
    }

    for (;i >= 0;--i) {
        ge_p2_dbl(&t,r);

        if (aslide[i] > 0) {
            ge_p1p1_to_p3(&u,&t);
            ge_add(&t,&u,&Ai[aslide[i]/2]);
        } else if (aslide[i] < 0) {
            ge_p1p1_to_p3(&u,&t);
            ge_sub(&t,&u,&Ai[(-aslide[i])/2]);
        }

        if (bslide[i] > 0) {
            ge_p1p1_to_p3(&u,&t);
            ge_madd(&t,&u,&Bi[bslide[i]/2]);
        } else if (bslide[i] < 0) {
            ge_p1p1_to_p3(&u,&t);
            ge_msub(&t,&u,&Bi[(-bslide[i])/2]);
        }

        ge_p1p1_to_p2(r,&t);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x910, %rsp            # imm = 0x910
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xcbc0
leaq -0x220(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xcbc0
leaq -0x720(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xcdb0
movq -0x18(%rbp), %rsi
leaq -0x7c0(%rbp), %rdi
callq 0xce30
leaq -0x900(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
leaq -0x720(%rbp), %rdx
leaq -0x7c0(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0xcef0
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
leaq -0x720(%rbp), %rdi
addq $0xa0, %rdi
leaq -0x860(%rbp), %rsi
callq 0xcdb0
leaq -0x720(%rbp), %rdx
addq $0xa0, %rdx
leaq -0x7c0(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0xcef0
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
leaq -0x720(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
leaq -0x860(%rbp), %rsi
callq 0xcdb0
leaq -0x720(%rbp), %rdx
addq $0x140, %rdx            # imm = 0x140
leaq -0x7c0(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0xcef0
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
leaq -0x720(%rbp), %rdi
addq $0x1e0, %rdi            # imm = 0x1E0
leaq -0x860(%rbp), %rsi
callq 0xcdb0
leaq -0x720(%rbp), %rdx
addq $0x1e0, %rdx            # imm = 0x1E0
leaq -0x7c0(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0xcef0
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
leaq -0x720(%rbp), %rdi
addq $0x280, %rdi            # imm = 0x280
leaq -0x860(%rbp), %rsi
callq 0xcdb0
leaq -0x720(%rbp), %rdx
addq $0x280, %rdx            # imm = 0x280
leaq -0x7c0(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0xcef0
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
leaq -0x720(%rbp), %rdi
addq $0x320, %rdi            # imm = 0x320
leaq -0x860(%rbp), %rsi
callq 0xcdb0
leaq -0x720(%rbp), %rdx
addq $0x320, %rdx            # imm = 0x320
leaq -0x7c0(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0xcef0
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
leaq -0x720(%rbp), %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
leaq -0x860(%rbp), %rsi
callq 0xcdb0
leaq -0x720(%rbp), %rdx
addq $0x3c0, %rdx            # imm = 0x3C0
leaq -0x7c0(%rbp), %rdi
leaq -0x900(%rbp), %rsi
callq 0xcef0
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
leaq -0x720(%rbp), %rdi
addq $0x460, %rdi            # imm = 0x460
leaq -0x860(%rbp), %rsi
callq 0xcdb0
movq -0x8(%rbp), %rdi
callq 0xd020
movl $0xff, -0x904(%rbp)
cmpl $0x0, -0x904(%rbp)
jl 0x32f2
movslq -0x904(%rbp), %rax
movsbl -0x120(%rbp,%rax), %eax
cmpl $0x0, %eax
jne 0x32dd
movslq -0x904(%rbp), %rax
movsbl -0x220(%rbp,%rax), %eax
cmpl $0x0, %eax
je 0x32df
jmp 0x32f2
jmp 0x32e1
movl -0x904(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x904(%rbp)
jmp 0x32ac
jmp 0x32f4
cmpl $0x0, -0x904(%rbp)
jl 0x34cf
movq -0x8(%rbp), %rsi
leaq -0x7c0(%rbp), %rdi
callq 0xd060
movslq -0x904(%rbp), %rax
movsbl -0x120(%rbp,%rax), %eax
cmpl $0x0, %eax
jle 0x3377
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
movslq -0x904(%rbp), %rax
movsbl -0x120(%rbp,%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cltq
leaq -0x720(%rbp), %rdx
imulq $0xa0, %rax, %rax
addq %rax, %rdx
leaq -0x7c0(%rbp), %rdi
leaq -0x860(%rbp), %rsi
callq 0xcef0
jmp 0x33e1
movslq -0x904(%rbp), %rax
movsbl -0x120(%rbp,%rax), %eax
cmpl $0x0, %eax
jge 0x33df
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
movslq -0x904(%rbp), %rax
movsbl -0x120(%rbp,%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
cltq
leaq -0x720(%rbp), %rdx
imulq $0xa0, %rax, %rax
addq %rax, %rdx
leaq -0x7c0(%rbp), %rdi
leaq -0x860(%rbp), %rsi
callq 0xd140
jmp 0x33e1
movslq -0x904(%rbp), %rax
movsbl -0x220(%rbp,%rax), %eax
cmpl $0x0, %eax
jle 0x3444
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
movslq -0x904(%rbp), %rax
movsbl -0x220(%rbp,%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cltq
leaq 0xdc38(%rip), %rdx      # 0x11060
imulq $0x78, %rax, %rax
addq %rax, %rdx
leaq -0x7c0(%rbp), %rdi
leaq -0x860(%rbp), %rsi
callq 0xd270
jmp 0x34ab
movslq -0x904(%rbp), %rax
movsbl -0x220(%rbp,%rax), %eax
cmpl $0x0, %eax
jge 0x34a9
leaq -0x860(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xce70
movslq -0x904(%rbp), %rax
movsbl -0x220(%rbp,%rax), %ecx
xorl %eax, %eax
subl %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
cltq
leaq 0xdbd1(%rip), %rdx      # 0x11060
imulq $0x78, %rax, %rax
addq %rax, %rdx
leaq -0x7c0(%rbp), %rdi
leaq -0x860(%rbp), %rsi
callq 0xd390
jmp 0x34ab
movq -0x8(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0xd4b0
movl -0x904(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x904(%rbp)
jmp 0x32f4
addq $0x910, %rsp            # imm = 0x910
popq %rbp
retq
nopl (%rax,%rax)