LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: tiger::gensboxes()
void gensboxes()
    {
        const char *str = "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham";
        chunk state[3] = { 0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL, 0xF096A5B4C3B2E187ULL };
        uchar temp[64];

        if(!*(const uchar *)&islittleendian) loopj(64) temp[j^7] = str[j];
        else loopj(64) temp[j] = str[j];
        loopi(1024) loop(col, 8) ((uchar *)&sboxes[i])[col] = i&0xFF;

        int abc = 2;
        loop(pass, 5) loopi(256) for(int sb = 0; sb < 1024; sb += 256)
        {
            abc++;
            if(abc >= 3) { abc = 0; compress((chunk *)temp, state); }
            loop(col, 8)
            {
                uchar val = ((uchar *)&sboxes[sb+i])[col];
                ((uchar *)&sboxes[sb+i])[col] = ((uchar *)&sboxes[sb + ((uchar *)&state[abc])[col]])[col];
                ((uchar *)&sboxes[sb + ((uchar *)&state[abc])[col]])[col] = val;
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movaps 0x3851(%rip), %xmm0     # 0x5180
movaps %xmm0, 0x10(%rsp)
movabsq $-0xf695a4b3c4d1e79, %rax # imm = 0xF096A5B4C3B2E187
movq %rax, 0x20(%rsp)
xorl %eax, %eax
leaq 0x36d4(%rip), %rcx      # 0x5020
cmpq $0x40, %rax
je 0x195e
movb (%rax,%rcx), %dl
movb %dl, 0x30(%rsp,%rax)
incq %rax
jmp 0x194c
leaq 0x775b(%rip), %rax      # 0x90c0
xorl %ecx, %ecx
cmpq $0x400, %rcx            # imm = 0x400
je 0x1989
xorl %edx, %edx
cmpq $0x8, %rdx
je 0x1980
movb %cl, (%rax,%rdx)
incq %rdx
jmp 0x1972
incq %rcx
addq $0x8, %rax
jmp 0x1967
xorl %ecx, %ecx
pushq $0x2
popq %rax
leaq 0x772b(%rip), %r12      # 0x90c0
leaq 0x30(%rsp), %rbx
leaq 0x10(%rsp), %r14
cmpl $0x5, %ecx
je 0x1a41
movq %rcx, (%rsp)
movq %r12, %r13
xorl %ebp, %ebp
cmpq $0x100, %rbp            # imm = 0x100
je 0x1a36
movq %r13, 0x8(%rsp)
xorl %r15d, %r15d
cmpq $0x400, %r15            # imm = 0x400
jae 0x1a25
cmpl $0x2, %eax
jge 0x19d4
incl %eax
jmp 0x19e1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x130c
xorl %eax, %eax
movl %eax, %ecx
leaq (%rsp,%rcx,8), %rcx
addq $0x10, %rcx
xorl %edx, %edx
cmpq $0x8, %rdx
je 0x1a15
movb (%r13,%rdx), %sil
movzbl (%rcx,%rdx), %edi
addq %r15, %rdi
leaq (%rdx,%rdi,8), %rdi
movb (%r12,%rdi), %r8b
movb %r8b, (%r13,%rdx)
movb %sil, (%r12,%rdi)
incq %rdx
jmp 0x19ed
addq $0x100, %r15            # imm = 0x100
addq $0x800, %r13            # imm = 0x800
jmp 0x19c2
incq %rbp
movq 0x8(%rsp), %r13
addq $0x8, %r13
jmp 0x19b1
movq (%rsp), %rcx
incl %ecx
jmp 0x199f
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: tiger::hash(unsigned char const*, int, tiger::hashval&)
void hash(const uchar *str, int length, hashval &val)
    {
        static bool init = false;
        if(!init) { gensboxes(); init = true; }

        uchar temp[64];

        val.chunks[0] = 0x0123456789ABCDEFULL;
        val.chunks[1] = 0xFEDCBA9876543210ULL;
        val.chunks[2] = 0xF096A5B4C3B2E187ULL;

        int i = length;
        for(; i >= 64; i -= 64, str += 64)
        {
            if(!*(const uchar *)&islittleendian)
            {
                loopj(64) temp[j^7] = str[j];
                compress((chunk *)temp, val.chunks);
            }
            else compress((chunk *)str, val.chunks);
        }

        int j;
        if(!*(const uchar *)&islittleendian)
        {
            for(j = 0; j < i; j++) temp[j^7] = str[j];
            temp[j^7] = 0x01;
            while(++j&7) temp[j^7] = 0;
        }
        else
        {
            for(j = 0; j < i; j++) temp[j] = str[j];
            temp[j] = 0x01;
            while(++j&7) temp[j] = 0;
        }

        if(j > 56)
        {
            while(j < 64) temp[j++] = 0;
            compress((chunk *)temp, val.chunks);
            j = 0;
        }
        while(j < 56) temp[j++] = 0;
        *(chunk *)(temp+56) = (chunk)length<<3;
        compress((chunk *)temp, val.chunks);
        if(!*(const uchar *)&islittleendian)
        {
            loopk(3) 
            {
                uchar *c = &val.bytes[k*sizeof(chunk)];
                loopl(sizeof(chunk)/2) swap(c[l], c[sizeof(chunk)-1-l]);
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
cmpb $0x0, 0x9657(%rip)      # 0xb0c0
jne 0x1a77
callq 0x191a
movb $0x1, 0x9649(%rip)      # 0xb0c0
movabsq $0x123456789abcdef, %rax # imm = 0x123456789ABCDEF
movq %rax, (%rbx)
movabsq $-0x123456789abcdf0, %rax # imm = 0xFEDCBA9876543210
movq %rax, 0x8(%rbx)
movabsq $-0xf695a4b3c4d1e79, %rax # imm = 0xF096A5B4C3B2E187
movq %rax, 0x10(%rbx)
movslq %ebp, %r15
cmpl $0x3f, %r15d
jle 0x1abe
movq %r14, %rdi
movq %rbx, %rsi
callq 0x130c
addq $-0x40, %r15
addq $0x40, %r14
jmp 0x1aa3
xorl %eax, %eax
cmpq %r15, %rax
jge 0x1ad1
movb (%r14,%rax), %cl
movb %cl, (%rsp,%rax)
incq %rax
jmp 0x1ac0
movb $0x1, (%rsp,%rax)
incq %rax
testb $0x7, %al
je 0x1ae2
movb $0x0, (%rsp,%rax)
jmp 0x1ad5
leaq -0x1(%rax), %rcx
cmpq $0x38, %rcx
jb 0x1b11
cmpq $0x3f, %rax
ja 0x1afb
movb $0x0, (%rsp,%rax)
incq %rax
jmp 0x1aec
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x130c
xorl %eax, %eax
jmp 0x1b11
movb $0x0, (%rsp,%rax)
incq %rax
cmpq $0x37, %rax
jle 0x1b0a
movslq %ebp, %rax
shlq $0x3, %rax
movq %rsp, %rdi
movq %rax, 0x38(%rdi)
movq %rbx, %rsi
callq 0x130c
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: genprivkey(char const*, vector<char>&, vector<char>&)
void genprivkey(const char *seed, vector<char> &privstr, vector<char> &pubstr)
{
    tiger::hashval hash;
    tiger::hash((const uchar *)seed, (int)strlen(seed), hash);
    bigint<8*sizeof(hash.bytes)/BI_DIGIT_BITS> privkey;
    memcpy(privkey.digits, hash.bytes, sizeof(privkey.digits));
    privkey.len = 8*sizeof(hash.bytes)/BI_DIGIT_BITS;
    privkey.shrink();
    privkey.printdigits(privstr);
    privstr.add('\0');

    ecjacobian c(ecjacobian::base);
    c.mul(privkey);
    c.normalize();
    c.print(pubstr);
    pubstr.add('\0');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x1050
leaq 0x28(%rsp), %r12
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x1a50
movq 0x10(%r12), %rax
leaq 0x40(%rsp), %r14
movq %rax, 0x14(%r14)
movups (%r12), %xmm0
movups %xmm0, 0x4(%r14)
movl $0xc, (%r14)
movq %r14, %rdi
callq 0x20ea
movq %r14, %rdi
movq %r15, %rsi
callq 0x210a
xorl %ebp, %ebp
leaq 0x60(%rsp), %rsi
movb %bpl, (%rsi)
movq %r15, %rdi
callq 0x2198
leaq 0x95b2(%rip), %rax      # 0xb164
pushq $0x18
popq %rdx
leaq 0xc0(%rsp), %r15
movq %rdx, %rcx
movq %r15, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %r12
movq %rdx, %rcx
movq %r12, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups (%r14), %xmm0
movups 0xc(%r14), %xmm1
movups %xmm1, 0xc(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x32a0
movq %r15, %rdi
callq 0x21d8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x224a
movb %bpl, (%r12)
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x2198
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: hashstring(char const*, char*, int)
bool hashstring(const char *str, char *result, int maxlen)
{
    tiger::hashval hv;
    if(maxlen < 2*(int)sizeof(hv.bytes) + 1) return false;
    tiger::hash((uchar *)str, strlen(str), hv);
    loopi(sizeof(hv.bytes))
    {
        uchar c = hv.bytes[i];
        *result++ = "0123456789abcdef"[c&0xF];
        *result++ = "0123456789abcdef"[c>>4];
    }
    *result = '\0';
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebx
cmpl $0x31, %edx
jl 0x1c89
movq %rsi, %r14
movq %rdi, %r15
callq 0x1050
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movl %eax, %esi
callq 0x1a50
xorl %eax, %eax
leaq 0x34c9(%rip), %rcx      # 0x5125
cmpq $0x18, %rax
je 0x1c84
movzbl 0x8(%rsp,%rax), %edx
movl %edx, %esi
andl $0xf, %esi
movb (%rsi,%rcx), %sil
movb %sil, (%r14,%rax,2)
shrl $0x4, %edx
movb (%rdx,%rcx), %dl
movb %dl, 0x1(%r14,%rax,2)
incq %rax
jmp 0x1c5c
movb $0x0, (%r14,%rax,2)
cmpl $0x31, %ebx
setge %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: answerchallenge(char const*, char const*, vector<char>&)
void answerchallenge(const char *privstr, const char *challenge, vector<char> &answerstr)
{
    gfint privkey;
    privkey.parse(privstr);
    ecjacobian answer;
    answer.parse(challenge);
    answer.mul(privkey);
    answer.normalize();
    answer.x.printdigits(answerstr);
    answerstr.add('\0');
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x2294
leaq 0xa8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x22b2
pushq $0x18
popq %rcx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x3724
movq %r12, %rdi
callq 0x21d8
movq %r12, %rdi
movq %rbx, %rsi
callq 0x22ec
movb $0x0, (%r14)
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x2198
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: genchallenge(void*, void const*, int, vector<char>&)
void *genchallenge(void *pubkey, const void *seed, int seedlen, vector<char> &challengestr)
{
    tiger::hashval hash;
    tiger::hash((const uchar *)seed, sizeof(seed), hash);
    gfint challenge;
    memcpy(challenge.digits, hash.bytes, sizeof(challenge.digits));
    challenge.len = 8*sizeof(hash.bytes)/BI_DIGIT_BITS;
    challenge.shrink();

    ecjacobian answer(*(ecjacobian *)pubkey);
    answer.mul(challenge);
    answer.normalize();

    ecjacobian secret(ecjacobian::base);
    secret.mul(challenge);
    secret.normalize();

    secret.print(challengestr);
    challengestr.add('\0');
   
    return new gfield(answer.x);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rcx, %rbx
movq %rsi, %rax
movq %rdi, %r13
pushq $0x8
popq %rsi
leaq 0x20(%rsp), %r14
movq %rax, %rdi
movq %r14, %rdx
callq 0x1a50
movups (%r14), %xmm0
movups 0xa(%r14), %xmm1
leaq 0x38(%rsp), %r15
movups %xmm1, 0xe(%r15)
movups %xmm0, 0x4(%r15)
movl $0xc, (%r15)
movq %r15, %rdi
callq 0x238c
pushq $0x18
popq %r12
leaq 0x118(%rsp), %r14
movq %r12, %rcx
movq %r14, %rdi
movq %r13, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %rax
movq %r12, %rcx
movq %rax, %rdi
movq %r13, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rax, %rsi
callq 0x3724
movq %r14, %rdi
callq 0x21d8
leaq 0x935d(%rip), %rax      # 0xb164
leaq 0xb8(%rsp), %r13
movq %r12, %rcx
movq %r13, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %rbp
movq %r12, %rcx
movq %rbp, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3724
movq %r13, %rdi
callq 0x21d8
movq %r13, %rdi
movq %rbx, %rsi
callq 0x224a
movb $0x0, (%rbp)
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0x2198
pushq $0x20
popq %rdi
callq 0x2379
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/crack.cpp
// Function: genauthkey(char const*)
void genauthkey(const char *secret) {
    if(!secret[0]) { 
        printf("you must specify a secret password");
        return;
    }
    
    vector<char> privkey, pubkey;
    c_genprivkey(secret, privkey, pubkey);
    
    printf("private key: %s\n", privkey.getbuf());
    printf("public key: %s\n", pubkey.getbuf());
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
cmpb $0x0, (%rdi)
je 0x205e
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rsp, %rdx
movaps %xmm0, (%rdx)
callq 0x1f05
movq 0x10(%rsp), %rsi
leaq 0x3137(%rip), %rdi      # 0x5159
xorl %eax, %eax
callq 0x1030
movq (%rsp), %rsi
leaq 0x3136(%rip), %rdi      # 0x516a
xorl %eax, %eax
callq 0x1030
andl $0x0, 0xc(%rsp)
movq (%rsp), %rdi
callq 0x10d0
andl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
callq 0x10d0
addq $0x20, %rsp
popq %rbx
retq
leaq 0x30d1(%rip), %rdi      # 0x5136
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
jmp 0x1030
movq %rax, %rbx
andl $0x0, 0xc(%rsp)
movq (%rsp), %rdi
callq 0x10d0
andl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
callq 0x10d0
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/crack.cpp
// Function: measure(int, char const*)
tfloat measure(int times, const char* pass) {
    tfloat t0, t1;

    t0 = nanotime();    
    for (int i = 0; i < times; i++)
        genauthkey(pass); 
    t1 = nanotime();

    return t1 - t0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
callq 0x1eca
fstpt 0x4(%rsp)
xorl %r14d, %r14d
testl %ebp, %ebp
cmovgl %ebp, %r14d
subl $0x1, %r14d
jb 0x20c8
movq %rbx, %rdi
callq 0x1ff6
jmp 0x20b8
callq 0x1eca
fldt 0x4(%rsp)
fsubrp %st, %st(1)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<12>::printdigits(vector<char>&) const
void printdigits(vector<char> &buf) const
    {
        loopi(len)
        {
            digit d = digits[len-i-1];
            loopj(BI_DIGIT_BITS/4)
            {
                uint shift = BI_DIGIT_BITS - (j+1)*4;
                int val = (d >> shift) & 0xF;
                if(val < 10) buf.add('0' + val);
                else buf.add('a' + val - 10);
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorl %r13d, %r13d
leaq 0xf(%rsp), %r15
leaq 0xe(%rsp), %r12
movq %rdi, 0x10(%rsp)
movl (%rdi), %eax
cmpl %eax, %r13d
jge 0x2188
movl %r13d, %ecx
notl %ecx
addl %ecx, %eax
cltq
movzwl 0x4(%rdi,%rax,2), %r14d
pushq $0xc
popq %rbp
cmpl $-0x4, %ebp
je 0x217e
movl %r14d, %eax
movl %ebp, %ecx
shrl %cl, %eax
andl $0xf, %eax
cmpl $0x9, %eax
ja 0x2168
orb $0x30, %al
movb %al, 0xf(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x2174
addb $0x57, %al
movb %al, 0xe(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2198
addl $-0x4, %ebp
jmp 0x2146
incl %r13d
movq 0x10(%rsp), %rdi
jmp 0x212d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: ecjacobian::parse(char const*)
void parse(const char *s)
    {
        bool ybit = *s++ == '-';
        x.parse(s);
        calcy(ybit);
        z = bigint<1>(1);
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1(%rsi), %rax
xorl %ebp, %ebp
cmpb $0x2d, (%rsi)
sete %bpl
movq %rax, %rsi
callq 0x2294
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2be8
movl $0x1, 0x40(%rbx)
movw $0x1, 0x44(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: bool bigint<13>::operator<<13>(bigint<13> const&) const
bool operator<(const bigint<Y_DIGITS> &y) const
    {
        if(len<y.len) return true;
        if(len>y.len) return false;
        for(int i = len-1; i>=0; i--)
        {
            if(digits[i]<y.digits[i]) return true;
            if(digits[i]>y.digits[i]) return false;
        }
        return false;
    }

// Assembly:
movl (%rdi), %ecx
movl (%rsi), %edx
movb $0x1, %al
cmpl %edx, %ecx
jl 0x2684
cmpl %edx, %ecx
jle 0x2685
xorl %eax, %eax
retq
movl %ecx, %eax
testl %ecx, %ecx
jle 0x26ab
movzwl 0x2(%rdi,%rcx,2), %edx
movzwl 0x2(%rsi,%rcx,2), %r8d
cmpw %r8w, %dx
jb 0x26a9
decq %rcx
cmpw %r8w, %dx
jbe 0x2685
xorl %edx, %edx
jmp 0x26ab
movb $0x1, %dl
testl %eax, %eax
setg %al
andb %dl, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>& bigint<13>::sub<13, 13>(bigint<13> const&, bigint<13> const&)
bigint &sub(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        ASSERT(x >= y);
        dbldigit borrow = 0;
        int i;
        for(i = 0; i < y.len || borrow; i++)
        {
             borrow = (1<<BI_DIGIT_BITS) + (dbldigit)x.digits[i] - (i<y.len ? (dbldigit)y.digits[i] : 0) - borrow;
             digits[i] = (digit)borrow;
             borrow = (borrow>>BI_DIGIT_BITS)^1;
        }
        if(i < x.len && this != &x) memcpy(&digits[i], &x.digits[i], (x.len - i)*sizeof(digit));
        len = x.len;
        shrink();
        return *this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x265e
movslq (%r15), %rcx
leaq 0x4(%r14), %r12
leaq 0x4(%rbx), %rdi
xorl %eax, %eax
xorl %edx, %edx
cmpq %rcx, %rax
jl 0x26e8
testl %edx, %edx
je 0x271b
xorl %esi, %esi
cmpq %rcx, %rax
jge 0x26f5
movzwl 0x4(%r15,%rax,2), %esi
movzwl (%r12,%rax,2), %r8d
orl $0x10000, %r8d          # imm = 0x10000
addl %esi, %edx
subl %edx, %r8d
movw %r8w, (%rdi,%rax,2)
shrl $0x10, %r8d
xorl $0x1, %r8d
incq %rax
movl %r8d, %edx
jmp 0x26df
movl (%r14), %ecx
cmpl %eax, %ecx
setg %dl
cmpq %r14, %rbx
setne %sil
testb %dl, %sil
je 0x274c
movl %eax, %esi
addq %rsi, %rsi
addq %rsi, %rdi
addq %r12, %rsi
subl %eax, %ecx
movslq %ecx, %rdx
addq %rdx, %rdx
callq 0x10a0
movl -0x4(%r12), %ecx
movl %ecx, (%rbx)
movq %rbx, %rdi
callq 0x238c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>& bigint<13>::rshift<13>(bigint<13> const&, int)
bigint &rshift(const bigint<X_DIGITS> &x, int n)
    {
        if(!len || !n) return *this;
        int dig = (n-1)/BI_DIGIT_BITS;
        n = ((n-1) % BI_DIGIT_BITS)+1;
        digit carry = digit(x.digits[dig]>>n);
        loopi(len-dig-1)
        {
            digit tmp = x.digits[i+dig+1];
            digits[i] = digit((tmp<<(BI_DIGIT_BITS-n)) | carry);
            carry = digit(tmp>>n);
        }
        digits[len-dig-1] = carry;
        len -= dig + (n>>BI_DIGIT_BITS);
        shrink();
        return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %r8d
testl %r8d, %r8d
sete %al
testl %edx, %edx
sete %cl
orb %al, %cl
jne 0x2808
decl %edx
pushq $0x10
popq %rcx
movl %edx, %eax
cltd
idivl %ecx
movslq %eax, %r9
movzwl 0x4(%rsi,%r9,2), %r11d
movl %r9d, %r10d
notl %r10d
addl %r8d, %r10d
pushq $0xf
popq %rdi
subl %edx, %edi
incl %edx
xorl %r14d, %r14d
testl %r10d, %r10d
movl $0x0, %r15d
cmovgl %r10d, %r15d
incq %r9
movl %edx, %ecx
shrl %cl, %r11d
cmpq %r14, %r15
je 0x27ec
leal (%r9,%r14), %ecx
movslq %ecx, %rcx
movzwl 0x4(%rsi,%rcx,2), %ebp
movl %ebp, %r12d
movl %edi, %ecx
shll %cl, %r12d
orl %r11d, %r12d
movw %r12w, 0x4(%rbx,%r14,2)
incq %r14
movl %ebp, %r11d
jmp 0x27bd
movslq %r10d, %rcx
movw %r11w, 0x4(%rbx,%rcx,2)
sarl $0x10, %edx
addl %eax, %edx
subl %edx, %r8d
movl %r8d, (%rbx)
movq %rbx, %rdi
callq 0x238c
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>& bigint<13>::add<13, 13>(bigint<13> const&, bigint<13> const&)
bigint &add(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        dbldigit carry = 0;
        int maxlen = max(x.len, y.len), i;
        for(i = 0; i < y.len || carry; i++)
        {
             carry += (i < x.len ? (dbldigit)x.digits[i] : 0) + (i < y.len ? (dbldigit)y.digits[i] : 0);
             digits[i] = (digit)carry;
             carry >>= BI_DIGIT_BITS;
        }
        if(i < x.len && this != &x) memcpy(&digits[i], &x.digits[i], (x.len - i)*sizeof(digit));
        len = max(i, maxlen);
        return *this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movslq (%rsi), %r15
movslq (%rdx), %r14
addq $0x4, %rsi
addq $0x4, %rdi
xorl %r12d, %r12d
xorl %ecx, %ecx
cmpq %r14, %r12
jl 0x283e
testl %ecx, %ecx
je 0x2875
xorl %r9d, %r9d
movl $0x0, %r8d
cmpq %r15, %r12
jge 0x2852
movzwl 0x4(%rax,%r12,2), %r8d
cmpq %r14, %r12
jge 0x285d
movzwl 0x4(%rdx,%r12,2), %r9d
addl %ecx, %r8d
addl %r9d, %r8d
movw %r8w, 0x4(%rbx,%r12,2)
shrl $0x10, %r8d
incq %r12
movl %r8d, %ecx
jmp 0x2835
cmpl %r12d, %r15d
setle %cl
cmpq %rax, %rbx
sete %al
orb %cl, %al
jne 0x28a2
movl %r12d, %eax
addq %rax, %rax
addq %rax, %rdi
addq %rax, %rsi
movl %r15d, %eax
subl %r12d, %eax
movslq %eax, %rdx
addq %rdx, %rdx
callq 0x10a0
cmpl %r14d, %r15d
cmovgl %r15d, %r14d
cmpl %r14d, %r12d
cmovgl %r12d, %r14d
movl %r14d, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<26>& bigint<26>::mul<13, 13>(bigint<13> const&, bigint<13> const&)
bigint &mul(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        if(!x.len || !y.len) { len = 0; return *this; }
        memset(digits, 0, y.len*sizeof(digit));
        loopi(x.len)
        {
            dbldigit carry = 0;
            loopj(y.len)
            {
                carry += (dbldigit)x.digits[i] * (dbldigit)y.digits[j] + (dbldigit)digits[i+j];
                digits[i+j] = (digit)carry;
                carry >>= BI_DIGIT_BITS;
            }
            digits[i+y.len] = carry;
        }
        len = x.len + y.len;
        shrink();
        return *this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rsi)
je 0x298d
movq %rdx, %r14
movslq (%rdx), %rdx
testq %rdx, %rdx
je 0x298d
movq %rsi, %r15
leaq 0x4(%rbx), %r12
addq %rdx, %rdx
xorl %r13d, %r13d
movq %r12, %rdi
xorl %esi, %esi
callq 0x1060
movl (%r15), %eax
movslq (%r14), %rcx
testl %ecx, %ecx
movl $0x0, %edx
cmovgl %ecx, %edx
testl %eax, %eax
movl $0x0, %esi
cmovgl %eax, %esi
movq %r12, %rdi
cmpq %rsi, %r13
je 0x2992
xorl %r9d, %r9d
xorl %r8d, %r8d
cmpq %r9, %rdx
je 0x297b
movzwl 0x4(%r15,%r13,2), %r10d
movzwl 0x4(%r14,%r9,2), %r11d
imull %r10d, %r11d
movzwl (%rdi,%r9,2), %r10d
addl %r10d, %r8d
addl %r11d, %r8d
movw %r8w, (%rdi,%r9,2)
shrl $0x10, %r8d
incq %r9
jmp 0x294d
leaq (%rcx,%r13), %r9
movw %r8w, (%r12,%r9,2)
incq %r13
addq $0x2, %rdi
jmp 0x2942
andl $0x0, (%rbx)
jmp 0x299e
addl %eax, %ecx
movl %ecx, (%rbx)
movq %rbx, %rdi
callq 0x2b88
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: ecjacobian::calcy(bool)
bool calcy(bool ybit)
    {
        gfield y2, tmp;
        y2.square(x).mul(x).sub(tmp.add(x, x).add(x)).add(B);
        if(!y.sqrt(y2)) { y.zero(); return false; }
        if(y.hasbit(0) != ybit) y.neg();
        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x23d8
movq %rax, %rdi
movq %r14, %rsi
callq 0x23e0
movq %rax, %r12
movq %rsp, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x2bb4
movq %rax, %rdi
movq %r14, %rsi
callq 0x2ba8
movq %r12, %rdi
movq %rax, %rsi
callq 0x2c94
leaq 0x8502(%rip), %rsi      # 0xb144
movq %rax, %rdi
callq 0x2ba8
leaq 0x20(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2ca0
movl %eax, %ebp
testb %al, %al
je 0x2c72
cmpl $0x0, (%r12)
jle 0x2c79
movb 0x24(%r14), %al
andb $0x1, %al
cmpb %bl, %al
jne 0x2c7d
jmp 0x2c85
andl $0x0, (%r12)
jmp 0x2c85
testb %bl, %bl
je 0x2c85
movq %r12, %rdi
callq 0x2d7a
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: gfield::sqrt(gfield const&)
bool sqrt(const gfield &x)
    {
        if(!x.len) { len = 0; return true; }
#if GF_BITS==224
#error Unsupported GF
#else
        ASSERT((P.digits[0]%4)==3);
        static const gfint Padd1div4(gfint(P).add(bigint<1>(1)).rshift(2));
        switch(legendre(x))
        {
            case 0: len = 0; return true;
            case -1: return false;
            default: pow(x, Padd1div4); return true;
        }
#endif
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
cmpl $0x0, (%rsi)
je 0x2ccd
movq %rsi, %r14
movb 0x8530(%rip), %al       # 0xb1e8
testb %al, %al
je 0x2cf2
movq %r14, %rdi
callq 0x2dee
cmpl $-0x1, %eax
je 0x2cd2
testl %eax, %eax
jne 0x2cd6
andl $0x0, (%rbx)
jmp 0x2ce8
xorl %eax, %eax
jmp 0x2cea
leaq 0x84e7(%rip), %rdx      # 0xb1c4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2ec0
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x84ef(%rip), %rdi      # 0xb1e8
callq 0x1110
testl %eax, %eax
je 0x2cbc
movups 0x8429(%rip), %xmm0     # 0xb132
leaq 0x10(%rsp), %rdi
movups %xmm0, 0xe(%rdi)
movups 0x840b(%rip), %xmm0     # 0xb124
movaps %xmm0, (%rdi)
leaq 0x8(%rsp), %rsi
movw $0x1, 0x4(%rsi)
movl $0x1, (%rsi)
callq 0x2de2
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0x2648
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x8489(%rip)     # 0xb1d4
movups %xmm0, 0x8472(%rip)     # 0xb1c4
leaq 0x848f(%rip), %rdi      # 0xb1e8
callq 0x1090
jmp 0x2cbc
movq %rax, %rbx
leaq 0x847b(%rip), %rdi      # 0xb1e8
callq 0x1080
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: gfield& gfield::sub<13, 13>(bigint<13> const&, bigint<13> const&)
gfield &sub(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        if(x < y)
        {
            gfint tmp; /* necessary if this==&y, using this instead would clobber y */
            tmp.add(x, P);
            gfint::sub(tmp, y);
        }
        else gfint::sub(x, y);
        return *this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x2674
testb %al, %al
je 0x2dc4
leaq 0x8378(%rip), %rdx      # 0xb124
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2814
movq %rbx, %rdi
movq %r12, %rsi
jmp 0x2dca
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x26b4
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: int gfield::legendre<13>(bigint<13> const&)
static int legendre(const bigint<X_DIGITS> &x)
    {
        static const gfint Psub1div2(gfint(P).sub(bigint<1>(1)).rshift(1));
        gfield L;
        L.pow(x, Psub1div2);
        if(!L.len) return 0;
        if(L.len==1) return 1;
        return -1;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movb 0x8412(%rip), %al       # 0xb210
testb %al, %al
je 0x2e38
leaq 0x83e7(%rip), %rdx      # 0xb1f0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ec0
movl (%r14), %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
sete %al
leal -0x1(,%rax,2), %eax
testl %ecx, %ecx
cmovel %ecx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x83d1(%rip), %rdi      # 0xb210
callq 0x1110
testl %eax, %eax
je 0x2e02
movups 0x82e3(%rip), %xmm0     # 0xb132
leaq 0x10(%rsp), %rdi
movups %xmm0, 0xe(%rdi)
movups 0x82c5(%rip), %xmm0     # 0xb124
movaps %xmm0, (%rdi)
leaq 0x8(%rsp), %rsi
movw $0x1, 0x4(%rsi)
movl $0x1, (%rsi)
callq 0x301a
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x2648
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x836f(%rip)     # 0xb200
movups %xmm0, 0x8358(%rip)     # 0xb1f0
leaq 0x8371(%rip), %rdi      # 0xb210
callq 0x1090
jmp 0x2e02
movq %rax, %rbx
leaq 0x835d(%rip), %rdi      # 0xb210
callq 0x1080
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: gfield& gfield::pow<13, 13>(bigint<13> const&, bigint<13> const&)
gfield &pow(const bigint<X_DIGITS> &x, const bigint<Y_DIGITS> &y)
    {
        gfield a(x);
        if(y.hasbit(0)) *this = a;
        else
        {
            len = 1;
            digits[0] = 1;
            if(!y.len) return *this;
        }
        for(int i = 1, j = y.numbits(); i < j; i++)
        {
            a.square();
            if(y.hasbit(i)) mul(a);
        }
        return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movups (%rsi), %xmm0
movups 0xe(%rsi), %xmm1
movups %xmm1, 0xe(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x0, (%rdx)
jle 0x2eed
testb $0x1, 0x4(%rbx)
jne 0x2f10
movl $0x1, (%r14)
movw $0x1, 0x4(%r14)
cmpl $0x0, (%rbx)
jne 0x2f2f
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movups (%rsi), %xmm0
movq 0x10(%rsi), %rax
movl 0x18(%rsi), %ecx
movzwl 0x1c(%rsi), %edx
movw %dx, 0x1c(%r14)
movl %ecx, 0x18(%r14)
movq %rax, 0x10(%r14)
movups %xmm0, (%r14)
movq %rbx, %rdi
callq 0x3122
movl %eax, %ebp
pushq $0x1
popq %r15
movq %rsp, %r12
cmpl %ebp, %r15d
jge 0x2f00
movq %r12, %rdi
callq 0x3150
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2628
testb %al, %al
je 0x2f67
movq %r14, %rdi
movq %r12, %rsi
callq 0x23e0
incl %r15d
jmp 0x2f40
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>::numbits() const
int numbits() const
    {
        if(!len) return 0;
        int bits = len*BI_DIGIT_BITS;
        digit last = digits[len-1], mask = 1<<(BI_DIGIT_BITS-1);
        while(mask)
        {
            if(last&mask) return bits;
            bits--;
            mask >>= 1;
        }
        return 0;
    }

// Assembly:
movslq (%rdi), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0x314f
movl %edx, %ecx
shll $0x4, %ecx
movzwl 0x2(%rdi,%rdx,2), %edx
movw $0x8000, %si            # imm = 0x8000
testw %si, %si
je 0x314f
testw %dx, %si
jne 0x314d
decl %ecx
movzwl %si, %esi
shrl %esi
jmp 0x313a
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: bigint<13>::parsedigits(unsigned short*, int, char const*)
static int parsedigits(ushort *digits, int maxlen, const char *s)
    {
        int slen = 0;
        while(isxdigit(s[slen])) slen++;
        int len = (slen+2*sizeof(ushort)-1)/(2*sizeof(ushort));
        if(len>maxlen) return 0;
        memset(digits, 0, len*sizeof(ushort));
        loopi(slen)
        {
            int c = s[slen-i-1];
            if(isalpha(c)) c = toupper(c) - 'A' + 10;
            else if(isdigit(c)) c -= '0';
            else return 0;
            digits[i/(2*sizeof(ushort))] |= c<<(4*(i%(2*sizeof(ushort))));
        }
        return len;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, (%rsp)
pushq $-0x1
popq %r12
pushq $0x2
popq %rbx
movsbl 0x1(%r15,%r12), %edi
callq 0x1040
incq %r12
incl %ebx
testl %eax, %eax
jne 0x3209
shrl $0x2, %ebx
cmpl %ebp, %ebx
jle 0x3237
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal (%rbx,%rbx), %edx
xorl %r13d, %r13d
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1060
movslq %r12d, %rax
addq %rax, %r15
decq %r15
xorl %r14d, %r14d
cmpq %r14, %r12
je 0x3226
movsbl (%r15), %ebp
movl %ebp, %edi
callq 0x10f0
testl %eax, %eax
je 0x3276
movl %ebp, %edi
callq 0x1120
movl %eax, %ebp
addl $-0x37, %ebp
jmp 0x327e
addl $-0x30, %ebp
cmpl $0x9, %ebp
ja 0x3224
movl %r13d, %ecx
andb $0xc, %cl
shll %cl, %ebp
movl %r14d, %eax
shrl $0x2, %eax
movq (%rsp), %rcx
orw %bp, (%rcx,%rax,2)
incq %r14
addl $0x4, %r13d
decq %r15
jmp 0x3254
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: void ecjacobian::mul<12>(ecjacobian const&, bigint<12>)
void mul(const ecjacobian &p, const bigint<Q_DIGITS> q)
    {
        *this = origin;
        for(int i = q.numbits()-1; i >= 0; i--)
        {
            mul2();
            if(q.hasbit(i)) add(p);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rsp), %r15
leaq 0x7e0b(%rip), %rsi      # 0xb0c4
pushq $0x18
popq %rcx
rep  movsl (%rsi), %es:(%rdi)
movq %r15, %rdi
callq 0x32fc
movl %eax, %ebp
testl %ebp, %ebp
jle 0x32f1
decl %ebp
movq %r14, %rdi
callq 0x332a
movq %r15, %rdi
movl %ebp, %esi
callq 0x3474
testb %al, %al
je 0x32c8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3494
jmp 0x32c8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/geom.cpp
// Function: glmatrixf::invert(glmatrixf const&, float)
bool glmatrixf::invert(const glmatrixf &m, float mindet)
{
    float a1 = m.v[0], b1 = m.v[4], c1 = m.v[8], d1 = m.v[12]; 
    adjoint(m);
    float det = a1*v[0] + b1*v[1] + c1*v[2] + d1*v[3]; // float det = m.determinant(); 
    if(fabs(det) < mindet) return false;
    float invdet = 1/det;
    loopi(16) v[i] *= invdet;
    return true;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movss %xmm0, 0xc(%rsp)
movq %rdi, %rbx
movups (%rsi), %xmm2
movss 0x10(%rsi), %xmm0
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movss 0x20(%rsi), %xmm0
movss 0x30(%rsi), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
shufps $0x24, %xmm1, %xmm2     # xmm2 = xmm2[0,1],xmm1[2,0]
movaps %xmm2, 0x10(%rsp)
callq 0x38e6
movss 0xc(%rsp), %xmm3
movups (%rbx), %xmm0
mulps 0x10(%rsp), %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addps %xmm0, %xmm1
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
addss %xmm1, %xmm2
movaps 0x135e(%rip), %xmm0     # 0x51b0
andps %xmm2, %xmm0
ucomiss %xmm3, %xmm0
jb 0x3e81
movss 0x136e(%rip), %xmm1     # 0x51d0
divss %xmm2, %xmm1
xorl %eax, %eax
cmpq $0x10, %rax
je 0x3e81
movss (%rbx,%rax,4), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rbx,%rax,4)
incq %rax
jmp 0x3e68
ucomiss %xmm3, %xmm0
setae %al
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/geom.cpp
// Function: raysphereintersect(vec const&, float, vec const&, vec const&, float&)
bool raysphereintersect(const vec &center, float radius, const vec &o, const vec &ray, float &dist)
{
    vec c(center);
    c.sub(o);
    float v = c.dot(ray),
          inside = radius*radius - c.squaredlen();
    if(inside<0 && v<0) return false;
    float d = inside + v*v;
    if(d<0) return false;
    dist = v - sqrt(d);
    return true;
}

// Assembly:
movss (%rdi), %xmm2
subss (%rsi), %xmm2
movss (%rdx), %xmm3
mulss %xmm2, %xmm3
movsd 0x4(%rdi), %xmm4
movsd 0x4(%rsi), %xmm1
subps %xmm1, %xmm4
movsd 0x4(%rdx), %xmm5
mulps %xmm4, %xmm5
movaps %xmm5, %xmm1
shufps $0x55, %xmm5, %xmm1     # xmm1 = xmm1[1,1],xmm5[1,1]
addss %xmm5, %xmm1
addss %xmm3, %xmm1
mulss %xmm0, %xmm0
mulss %xmm2, %xmm2
mulps %xmm4, %xmm4
addss %xmm4, %xmm2
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
addss %xmm2, %xmm4
subss %xmm4, %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
jae 0x3ee9
ucomiss %xmm2, %xmm1
jb 0x3f08
movaps %xmm1, %xmm3
mulss %xmm1, %xmm3
addss %xmm3, %xmm0
ucomiss %xmm2, %xmm0
jb 0x3f08
sqrtss %xmm0, %xmm0
subss %xmm0, %xmm1
movss %xmm1, (%rcx)
movb $0x1, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/geom.cpp
// Function: rayrectintersect(vec const&, vec const&, vec const&, vec const&, float&, int&)
bool rayrectintersect(const vec &b, const vec &s, const vec &o, const vec &ray, float &dist, int &orient)
{
    loop(d, 3) if(ray[d])
    {
        int dc = ray[d]<0 ? 1 : 0;
        float pdist = (b[d]+s[d]*dc - o[d]) / ray[d];
        vec v(ray);
        v.mul(pdist).add(o);
        if(v[R[d]] >= b[R[d]] && v[R[d]] <= b[R[d]]+s[R[d]]
        && v[C[d]] >= b[C[d]] && v[C[d]] <= b[C[d]]+s[C[d]])
        {
            dist = pdist;
            orient = 2*d+dc;
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movsd (%rdx), %xmm0
movss 0x8(%rdx), %xmm1
xorl %r11d, %r11d
xorps %xmm2, %xmm2
leaq 0x12b1(%rip), %rbx      # 0x51d8
leaq 0x12c2(%rip), %r14      # 0x51f0
xorl %r10d, %r10d
xorl %eax, %eax
cmpq $0xc, %r11
je 0x400e
movss (%rcx,%r11), %xmm3
ucomiss %xmm3, %xmm2
je 0x3fe9
movss (%rsi,%r11), %xmm5
movaps %xmm3, %xmm4
cmpltss %xmm2, %xmm4
andps %xmm5, %xmm4
addss (%rdi,%r11), %xmm4
subss (%rdx,%r11), %xmm4
divss %xmm3, %xmm4
movl 0x8(%rcx), %ebp
movl %ebp, -0x8(%rsp)
movq (%rcx), %r15
movq %r15, -0x10(%rsp)
movss -0x8(%rsp), %xmm5
mulss %xmm4, %xmm5
addss %xmm1, %xmm5
movsd -0x10(%rsp), %xmm6
movaps %xmm4, %xmm7
unpcklps %xmm4, %xmm7            # xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1]
mulps %xmm6, %xmm7
addps %xmm0, %xmm7
movlps %xmm7, -0x10(%rsp)
movss %xmm5, -0x8(%rsp)
movslq (%r11,%rbx), %r15
movss -0x10(%rsp,%r15,4), %xmm5
movss (%rdi,%r15,4), %xmm6
ucomiss %xmm6, %xmm5
jb 0x3fe9
addss (%rsi,%r15,4), %xmm6
ucomiss %xmm6, %xmm5
ja 0x3fe9
movslq (%r11,%r14), %r15
movss -0x10(%rsp,%r15,4), %xmm5
movss (%rdi,%r15,4), %xmm6
ucomiss %xmm6, %xmm5
jb 0x3fe9
addss (%rsi,%r15,4), %xmm6
ucomiss %xmm6, %xmm5
jbe 0x3ff9
incq %rax
addl $-0x2, %r10d
addq $0x4, %r11
jmp 0x3f33
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm3
movss %xmm4, (%r8)
sbbl $0x0, %r10d
negl %r10d
movl %r10d, (%r9)
cmpq $0x3, %rax
setb %al
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::ChessBoard(int)
ChessBoard::ChessBoard(int size):m_size(size)
{
    for(int i=0; i<=size+2; i++)   {
        for(int j=0; j<=size+2;  j++) {
            m_board[i][j] = Chess_Empty;
            if( i==0 || j==0 || i>size || j>size )
                m_board[i][j] = Chess_Edge;
        }
    }
    m_stepnum=0; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movl %esi, 0x194(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x240(%rdi)
andq $0x0, 0x250(%rdi)
leaq 0x4(%rdi), %rax
movslq %esi, %rcx
addl $0x2, %esi
leal 0x3(%rcx), %edx
movslq %esi, %rsi
xorl %r8d, %r8d
movl $0x2f, %r9d
movl $0x65, %r10d
cmpq %rsi, %r8
jg 0x1286
xorl %r11d, %r11d
cmpq %r11, %rdx
je 0x127d
testq %r11, %r11
movl %r10d, %ebx
cmovel %r9d, %ebx
testq %r8, %r8
cmovel %r9d, %ebx
cmpq %rcx, %r8
cmovgl %r9d, %ebx
cmpq %rcx, %r11
cmovgl %r9d, %ebx
movb %bl, (%rax,%r11)
incq %r11
jmp 0x1250
incq %r8
addq $0x14, %rax
jmp 0x1248
andl $0x0, (%rdi)
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::PutChess(int, int, char)
int ChessBoard:: PutChess(int x, int y , ChessSide side)
{
    
    m_board[x][y] = side;
    StPos pos(x, y, side);
    m_chessList.push_back(pos);
    m_stepnum ++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq %esi, %rax
imulq $0x14, %rax, %rsi
addq %rdi, %rsi
movslq %edx, %rdx
movb %cl, 0x4(%rdx,%rsi)
leaq -0x20(%rbp), %rsi
movl %eax, (%rsi)
movl %edx, 0x4(%rsi)
movb %cl, 0x10(%rsi)
andq $0x0, 0x8(%rsi)
addq $0x240, %rdi            # imm = 0x240
callq 0x32b2
incl (%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::UnPutChess(int, int)
ChessSide ChessBoard::UnPutChess(int x, int y)
{
    char  c = m_board[x][y];
    m_board[x][y] = Chess_Empty;
    m_chessList.pop_back(); 
    m_stepnum--;
    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rax
imulq $0x14, %rax, %rcx
addq %rdi, %rcx
movslq %edx, %rdx
movb 0x4(%rdx,%rcx), %al
movb $0x65, 0x4(%rdx,%rcx)
addq $-0x18, 0x248(%rdi)
decl (%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::ShowChessBoard()
void ChessBoard::ShowChessBoard ()
{
    char  szTmp[1024];
    int   len =0;
    for(int i=1; i<=m_size ; i++ )
    {
        szTmp[len++]= ('0'+i);
        for(int j=1; j <=m_size; j++ ) 
        {
            char c;
            if( m_board[i][j] == Chess_White)
                c = 'O' ;
            else if( m_board[i][j] == Chess_Black)
                c = '#';
            else if(m_board[i][j]  == Chess_Empty)
                c = '_';
            else 
                c= '/';
            szTmp[len++] =    c;                 
            szTmp[len++] = ' '; 
        } 
        szTmp[len++] = '\n';
    }
    for(int i=0; i<m_size; i++) 
        szTmp[len++] = '0'+i;
    szTmp[len++] = '\n';
    szTmp[len++] = 0;
    printf("%s\n" , szTmp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movabsq $0x100000000, %rax      # imm = 0x100000000
movl 0x194(%rdi), %edx
leal 0x1(%rdx), %esi
xorl %r11d, %r11d
testl %edx, %edx
cmovlel %r11d, %edx
leal 0x1(%rdx), %r8d
decq %rsi
addq $0x19, %rdi
pushq $0x1
popq %r9
leaq -0x41e(%rbp), %r10
movabsq $0x200000000, %rbx      # imm = 0x200000000
movslq %r11d, %rcx
cmpq %r8, %r9
je 0x13c5
leal 0x30(%r9), %r11d
movb %r11b, -0x420(%rbp,%rcx)
leal 0x2(%rcx), %r11d
leaq (%r10,%rcx), %r14
shlq $0x20, %rcx
addq %rax, %rcx
xorl %r15d, %r15d
cmpq %r15, %rsi
je 0x13b0
movzbl (%rdi,%r15), %r12d
cmpl $0x77, %r12d
je 0x1392
cmpl $0x65, %r12d
je 0x138d
cmpl $0x62, %r12d
jne 0x1397
movb $0x23, %r12b
jmp 0x139a
movb $0x5f, %r12b
jmp 0x139a
movb $0x4f, %r12b
jmp 0x139a
movb $0x2f, %r12b
movb %r12b, -0x1(%r14,%r15,2)
movb $0x20, (%r14,%r15,2)
incq %r15
addl $0x2, %r11d
addq %rbx, %rcx
jmp 0x136c
sarq $0x20, %rcx
movb $0xa, -0x420(%rbp,%rcx)
incq %r9
addq $0x14, %rdi
jmp 0x1346
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
leaq (%rcx,%rbp), %rdi
addq $-0x420, %rdi           # imm = 0xFBE0
imulq %rsi, %rcx
movl %edx, %edx
xorl %r8d, %r8d
cmpl %r8d, %edx
je 0x13f8
leal 0x30(%r8), %r9d
movb %r9b, (%rdi,%r8)
addq %rsi, %rcx
incq %r8
jmp 0x13e3
subq %rcx, %rax
negq %rcx
sarq $0x20, %rcx
movb $0xa, -0x420(%rbp,%rcx)
sarq $0x20, %rax
movb $0x0, -0x420(%rbp,%rax)
leaq -0x420(%rbp), %rdi
callq 0x10e0
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::IsLong(char*, int, int, int&, int&)
bool  ChessBoard::IsLong(char oneLine[],int len,    int pos, int &resL , int &resR)
{
    char side = oneLine[pos];
    if( Chess_Empty == side  )
        return  false;
    if( pos > len || pos<0 )
        return false;
    if( side != oneLine[pos])
        return false;

    int ri =pos, li=pos;
    int rr =pos, ll=pos;
    while( oneLine[li-1] == side )  li--;
    while( oneLine[ri+1] == side )  ri++;
    rr = ri; ll = li; 
    while( oneLine[ll-1] == Chess_Empty || oneLine[ll-1] == side ) ll--;
    while( oneLine[rr+1] == Chess_Empty || oneLine[rr+1] == side ) rr++;

    if (ri-li +1 >=6 )
    {
        resL = li;
        resR = ri;
        return true;
    }
    else 
        return false;
}

// Assembly:
movslq %ecx, %rdi
movb (%rsi,%rdi), %al
cmpb $0x65, %al
je 0x149b
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
jne 0x149b
addq %rsi, %rdi
decq %rdi
xorl %edx, %edx
movq %rdx, %r10
decq %rdx
cmpb %al, (%rdi,%r10)
je 0x1454
pushq %rbp
movq %rsp, %rbp
movl %ecx, %r10d
leal -0x1(%rcx), %edi
addq %rsi, %r10
incq %r10
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
subl %edx, %esi
incl %edi
incl %esi
leaq 0x1(%r10), %r11
cmpb %al, (%r10)
movq %r11, %r10
je 0x1477
cmpl $0x5, %esi
popq %rbp
jl 0x149b
incl %ecx
addq %rdx, %rcx
movl %ecx, (%r8)
movl %edi, (%r9)
movb $0x1, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::Is5(char*, int, int, int&, int&)
bool  ChessBoard::Is5(char oneLine[], int len, int pos, int &resL , int &resR)
{
    char side = oneLine[pos];
    if( Chess_Empty == side  )
        return  false;
    if( pos > len || pos<0 )
        return false;
    if( side != oneLine[pos])
        return false;

    int ri =pos, li=pos;
    int rr =pos, ll=pos;
    while( oneLine[li-1] == side )  li--;
    while( oneLine[ri+1] == side )  ri++;
    rr = ri; ll = li; 
    while( oneLine[ll-1] == Chess_Empty || oneLine[ll-1] == side ) ll--;
    while( oneLine[rr+1] == Chess_Empty || oneLine[rr+1] == side ) rr++;

    if( ri - li +1 == 5)
    {
        resL = li;
        resR = ri;
        return  true;
    }
    else
        return false;
}

// Assembly:
movslq %ecx, %rdi
movb (%rsi,%rdi), %al
cmpb $0x65, %al
je 0x14f6
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
jne 0x14f6
addq %rsi, %rdi
decq %rdi
xorl %edx, %edx
movq %rdx, %r10
decq %rdx
cmpb %al, (%rdi,%r10)
je 0x14c0
pushq %rbp
movq %rsp, %rbp
movl %ecx, %r10d
leal -0x1(%rcx), %edi
addq %r10, %rsi
incq %rsi
leal 0x6(%rdx), %r10d
incl %edi
decl %r10d
leaq 0x1(%rsi), %r11
cmpb %al, (%rsi)
movq %r11, %rsi
je 0x14e0
testl %r10d, %r10d
popq %rbp
je 0x14f9
xorl %eax, %eax
retq
incl %ecx
addq %rdx, %rcx
movl %ecx, (%r8)
movl %edi, (%r9)
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::IsOpen4(char*, int, int, int&, int&)
bool ChessBoard::IsOpen4(char oneLine[], int len , int pos, int &resL, int &resR)
{
    char side = oneLine[pos];
    if( Chess_Empty == side  )
        return  false;
    if( pos > len || pos<0 )
        return false;
    if( side != oneLine[pos])
        return false;

    int ri =pos, li=pos;
    int rr =pos, ll=pos;
    while( oneLine[li-1] == side )  li--;
    while( oneLine[ri+1] == side )  ri++;
    rr = ri; ll = li; 
    while( oneLine[ll-1] == Chess_Empty || oneLine[ll-1] == side ) ll--;
    while( oneLine[rr+1] == Chess_Empty || oneLine[rr+1] == side ) rr++;

    if( ri - li +1 != 4 )
        return false;
    if( ll < li  &&  rr > ri)
    {
        resL = ri;
        resR = ri;
        return true;
    }
    return false;
}

// Assembly:
movslq %ecx, %rdi
movb (%rsi,%rdi), %al
cmpb $0x65, %al
je 0x1522
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
je 0x1525
xorl %eax, %eax
retq
addq $0x2, %rdi
movl $0x5, %edx
movq %rdi, %r10
decl %edx
decq %rdi
cmpb %al, -0x3(%rsi,%r10)
je 0x152e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %r11d
addq %rsi, %r11
negl %ecx
leaq -0x1(%rdi), %r10
movq %r11, %rbx
incq %r11
decl %ecx
decl %edx
cmpb %al, 0x1(%rbx)
je 0x1552
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
subl %ecx, %ebx
movb -0x2(%rsi,%rdi), %r14b
cmpb $0x65, %r14b
sete %r15b
cmpb %al, %r14b
sete %r14b
orb %r15b, %r14b
decq %rdi
testb %r14b, %r14b
jne 0x1568
notl %ecx
movb (%r11), %sil
cmpb $0x65, %sil
sete %r14b
cmpb %al, %sil
sete %sil
orb %r14b, %sil
incl %ebx
incq %r11
testb %sil, %sil
jne 0x1589
xorl %eax, %eax
testl %edx, %edx
jne 0x15bf
cmpq %r10, %rdi
jge 0x15bf
cmpl %ecx, %ebx
jle 0x15bf
movl %ecx, (%r8)
movl %ecx, (%r9)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
popq %rbp
retq