LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
movq %rdi, %r15
callq 0x1050
leaq 0x48(%rsp), %r12
movq %r15, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x1a53
movq 0x10(%r12), %rax
movq %rax, 0x3c(%rsp)
movups (%r12), %xmm0
movups %xmm0, 0x2c(%rsp)
movl $0xc, %eax
cmpw $0x0, 0x42(%rsp)
jne 0x1c01
movl $0xc, %ecx
cmpq $0x1, %rcx
je 0x1bff
leaq -0x1(%rcx), %rax
cmpw $0x0, 0x28(%rsp,%rcx,2)
movq %rax, %rcx
je 0x1be8
jmp 0x1c01
xorl %eax, %eax
leaq 0x28(%rsp), %r15
movl %eax, (%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2294
xorl %ebp, %ebp
leaq 0x60(%rsp), %rsi
movb %bpl, (%rsi)
movq %r14, %rdi
callq 0x232a
leaq 0x9537(%rip), %rax      # 0xb164
leaq 0xc0(%rsp), %r14
movl $0x18, %ecx
movq %r14, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0x60(%rsp), %r12
movl $0x18, %ecx
movq %r12, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups (%r15), %xmm0
movups 0xc(%r15), %xmm1
movups %xmm1, 0xc(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x359c
movq %r14, %rdi
callq 0x236a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2440
movb %bpl, (%r12)
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x232a
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x248c
leaq 0x1(%r14), %rsi
xorl %ebp, %ebp
cmpb $0x2d, (%r14)
sete %bpl
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0x248c
movq %r14, %rdi
movl %ebp, %esi
callq 0x2ecc
movl $0x1, 0x40(%r14)
movw $0x1, 0x44(%r14)
leaq 0x40(%rsp), %r12
movl $0x18, %ecx
movq %r12, %rdi
movq %r14, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x3c1e
movq %r14, %rdi
callq 0x236a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24c6
movb $0x0, (%r12)
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x232a
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rcx, %rbx
movq %rdi, %r14
leaq 0x48(%rsp), %r15
movq %rsi, %rdi
movl $0x8, %esi
movq %r15, %rdx
callq 0x1a53
movups (%r15), %xmm0
movups 0xa(%r15), %xmm1
movups %xmm1, 0x36(%rsp)
movups %xmm0, 0x2c(%rsp)
movl $0xc, %eax
cmpw $0x0, 0x42(%rsp)
jne 0x1e95
movl $0xc, %ecx
cmpq $0x1, %rcx
je 0x1e93
leaq -0x1(%rcx), %rax
cmpw $0x0, 0x28(%rsp,%rcx,2)
movq %rax, %rcx
je 0x1e7c
jmp 0x1e95
xorl %eax, %eax
movl %eax, 0x28(%rsp)
leaq 0x60(%rsp), %r15
movl $0x18, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0xc0(%rsp), %rax
movl $0x18, %ecx
movq %rax, %rdi
movq %r14, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %rax, %rsi
callq 0x3c1e
movq %r15, %rdi
callq 0x236a
leaq 0x9277(%rip), %rax      # 0xb164
leaq 0x120(%rsp), %r14
movl $0x18, %ecx
movq %r14, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
leaq 0xc0(%rsp), %r15
movl $0x18, %ecx
movq %r15, %rdi
movq %rax, %rsi
rep  movsl (%rsi), %es:(%rdi)
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c1e
movq %r14, %rdi
callq 0x236a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2440
movb $0x0, (%r15)
leaq 0xc0(%rsp), %rsi
movq %rbx, %rdi
callq 0x232a
movl $0x20, %edi
callq 0x10e0
testq %rax, %rax
je 0x1f89
movups 0x60(%rsp), %xmm0
movups 0x70(%rsp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
callq 0x1070
// File: /workspace/github_cpp_makefile_star2_O3/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 0x21a4
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rsp, %rdx
movaps %xmm0, (%rdx)
callq 0x201a
movq 0x10(%rsp), %rsi
leaq 0x3028(%rip), %rdi      # 0x5180
xorl %eax, %eax
callq 0x1030
movq (%rsp), %rsi
leaq 0x3027(%rip), %rdi      # 0x5191
xorl %eax, %eax
callq 0x1030
movl $0x0, 0xc(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2187
callq 0x10d0
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x219e
callq 0x10d0
addq $0x20, %rsp
popq %rbx
retq
leaq 0x2fb2(%rip), %rdi      # 0x515d
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
jmp 0x1030
movq %rax, %rbx
movl $0x0, 0xc(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x21d0
callq 0x10d0
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x21e7
callq 0x10d0
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x38(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
movq (%r14), %r15
movq 0x8(%r14), %r14
testl %ebp, %ebp
jle 0x2224
movq %rbx, %rdi
callq 0x212c
decl %ebp
jne 0x2218
movq %r14, (%rsp)
fildll (%rsp)
fstpt 0x2c(%rsp)
movq %r15, 0x8(%rsp)
fildll 0x8(%rsp)
fstpt 0x20(%rsp)
leaq 0x38(%rsp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x10b0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, 0x10(%rsp)
fildll 0x10(%rsp)
fldt 0x20(%rsp)
fsubrp %st, %st(1)
movq %rcx, 0x18(%rsp)
fildll 0x18(%rsp)
fldt 0x2c(%rsp)
fsubrp %st, %st(1)
fldt 0x2d9a(%rip)            # 0x5010
fmulp %st, %st(1)
faddp %st, %st(1)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl (%rdi), %eax
testl %eax, %eax
jle 0x2329
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 %r13d, %ecx
notl %ecx
addl %eax, %ecx
movslq %ecx, %rax
movzwl 0x4(%rdi,%rax,2), %r14d
movl $0xc, %ebp
movl %r14d, %eax
movl %ebp, %ecx
shrl %cl, %eax
andl $0xf, %eax
cmpl $0x9, %eax
ja 0x22f3
orb $0x30, %al
movb %al, 0xf(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x22ff
addb $0x57, %al
movb %al, 0xe(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x232a
addl $-0x4, %ebp
cmpl $-0x4, %ebp
jne 0x22d6
incl %r13d
movq 0x10(%rsp), %rdi
movl (%rdi), %eax
cmpl %eax, %r13d
jl 0x22c1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movslq (%rdx), %rsi
xorl %ecx, %ecx
testq %rsi, %rsi
jle 0x290c
movb $0x1, %r8b
xorl %edi, %edi
movl $0x0, %r9d
testb $0x1, %r8b
je 0x28d5
movzwl 0x4(%rdx,%rcx,2), %r9d
addl %r9d, %edi
movzwl 0x4(%r14,%rcx,2), %r9d
orl $0x10000, %r9d          # imm = 0x10000
subl %edi, %r9d
movw %r9w, 0x4(%rbx,%rcx,2)
movl %r9d, %edi
shrl $0x10, %edi
xorl $0x1, %edi
incq %rcx
cmpq %rsi, %rcx
setb %r8b
jb 0x28c3
cmpl $0x10000, %r9d          # imm = 0x10000
jb 0x28c3
movl %eax, %edx
subl %ecx, %edx
setle %sil
cmpq %r14, %rbx
sete %dil
orb %sil, %dil
jne 0x2940
movl %ecx, %eax
leaq (%rbx,%rax,2), %rdi
addq $0x4, %rdi
leaq (%r14,%rax,2), %rsi
addq $0x4, %rsi
movslq %edx, %rdx
addq %rdx, %rdx
callq 0x10a0
movl (%r14), %eax
movl %eax, (%rbx)
testl %eax, %eax
je 0x2962
movslq %eax, %rcx
incq %rcx
decl %eax
cmpw $0x0, (%rbx,%rcx,2)
jne 0x2962
movl %eax, (%rbx)
decq %rcx
decl %eax
cmpq $0x1, %rcx
jne 0x294e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movq %rdi, %rax
movslq (%rdi), %r9
testq %r9, %r9
sete %cl
testl %edx, %edx
sete %dil
orb %cl, %dil
jne 0x2a6d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leal -0x1(%rdx), %ecx
leal 0xe(%rdx), %edi
testl %ecx, %ecx
cmovnsl %ecx, %edi
movl %edi, %r8d
sarl $0x4, %r8d
andl $-0x10, %edi
negl %edi
leal (%rdx,%rdi), %r14d
decl %r14d
leal 0x1(%r14), %edx
movslq %r8d, %r10
movzwl 0x4(%rsi,%r10,2), %ebx
movl %r10d, %r11d
notl %r11d
addl %r9d, %r11d
movl %edx, %ecx
shrl %cl, %ebx
testl %r11d, %r11d
jle 0x2a0f
movl $0xf, %edi
subl %r14d, %edi
movl %r11d, %r14d
leaq 0x1(%r10), %r15
xorl %r12d, %r12d
leal (%r15,%r12), %ecx
movslq %ecx, %rcx
movzwl 0x4(%rsi,%rcx,2), %ebp
movl %ebp, %r13d
movl %edi, %ecx
shll %cl, %r13d
orl %ebx, %r13d
movl %edx, %ecx
shrl %cl, %ebp
movw %r13w, 0x4(%rax,%r12,2)
incq %r12
movl %ebp, %ebx
cmpq %r12, %r14
jne 0x29e2
jmp 0x2a11
movl %ebx, %ebp
movslq %r11d, %rcx
movw %bp, 0x4(%rax,%rcx,2)
sarl $0x10, %edx
addl %edx, %r8d
movl %r9d, %ecx
subl %r8d, %ecx
movl %ecx, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
je 0x2a6d
movslq %edx, %rdx
addq %r10, %rdx
movq %rdx, %rcx
subq %r9, %rcx
notl %r8d
addl %r9d, %r8d
addq %r9, %r9
addq %rdx, %rdx
subq %rdx, %r9
leaq (%r9,%rax), %rdx
addq $0x2, %rdx
xorl %esi, %esi
cmpw $0x0, (%rdx,%rsi,2)
jne 0x2a6d
leal (%r8,%rsi), %edi
movl %edi, (%rax)
decq %rsi
cmpq %rsi, %rcx
jne 0x2a58
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rdi, %rbx
movslq (%rsi), %r15
movslq (%rdx), %r14
xorl %r12d, %r12d
testq %r14, %r14
jle 0x2acf
movb $0x1, %dil
xorl %eax, %eax
movl $0x0, %ecx
cmpq %r15, %r12
jge 0x2a9c
movzwl 0x4(%rsi,%r12,2), %ecx
xorl %r8d, %r8d
testb $0x1, %dil
je 0x2aab
movzwl 0x4(%rdx,%r12,2), %r8d
addl %eax, %ecx
addl %r8d, %ecx
movw %cx, 0x4(%rbx,%r12,2)
movl %ecx, %eax
shrl $0x10, %eax
incq %r12
cmpq %r14, %r12
setb %dil
jb 0x2a8c
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0x2a8c
cmpl %r15d, %r12d
setge %al
cmpq %rsi, %rbx
sete %cl
orb %al, %cl
jne 0x2b03
movl %r12d, %eax
leaq (%rbx,%rax,2), %rdi
addq $0x4, %rdi
leaq (%rsi,%rax,2), %rsi
addq $0x4, %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
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, (%rsi)
je 0x2be3
movq %rdx, %r14
movslq (%rdx), %rdx
testq %rdx, %rdx
je 0x2be3
movq %rsi, %r15
leaq 0x4(%rbx), %r12
addq %rdx, %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x1060
movslq (%r15), %rax
movslq (%r14), %rdx
movl %edx, %ecx
testq %rax, %rax
jle 0x2bbb
xorl %esi, %esi
movq %r12, %rdi
xorl %r8d, %r8d
testl %edx, %edx
jle 0x2ba6
xorl %r9d, %r9d
movzwl 0x4(%r15,%rsi,2), %r10d
movzwl 0x4(%r14,%r9,2), %r11d
imull %r10d, %r11d
movzwl (%rdi,%r9,2), %r10d
addl %r8d, %r10d
addl %r11d, %r10d
movw %r10w, (%rdi,%r9,2)
movl %r10d, %r8d
shrl $0x10, %r8d
incq %r9
cmpq %r9, %rcx
jne 0x2b77
leaq (%rsi,%rdx), %r9
movw %r8w, (%r12,%r9,2)
incq %rsi
addq $0x2, %rdi
cmpq %rax, %rsi
jne 0x2b6d
movl %eax, %edx
addl %ecx, %edx
movl %edx, (%rbx)
je 0x2be9
movslq %edx, %rdx
incq %rdx
addl %ecx, %eax
decl %eax
cmpw $0x0, (%rbx,%rdx,2)
jne 0x2be9
movl %eax, (%rbx)
decq %rdx
decl %eax
cmpq $0x1, %rdx
jne 0x2bcd
jmp 0x2be9
movl $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x60, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x2b24
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x2bf8
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2b24
movq %r15, %rdi
movq %r12, %rsi
callq 0x2bf8
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x2e7a
movq %rax, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2e7a
movq %r15, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x309a
leaq 0x81f3(%rip), %rdx      # 0xb144
movq %rax, %rdi
movq %rax, %rsi
callq 0x2e7a
leaq 0x20(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2fb4
movl %eax, %ebp
testb %al, %al
je 0x2f84
cmpl $0x0, (%r12)
jle 0x2f8e
movb 0x24(%r14), %al
andb $0x1, %al
cmpb %bl, %al
jne 0x2f92
jmp 0x2fa4
movl $0x0, (%r12)
jmp 0x2fa4
testb %bl, %bl
je 0x2fa4
leaq 0x818b(%rip), %rsi      # 0xb124
movq %r12, %rdi
movq %r12, %rdx
callq 0x28a8
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2fe1
movq %rsi, %r14
movb 0x821c(%rip), %al       # 0xb1e8
testb %al, %al
je 0x3009
movq %r14, %rdi
callq 0x3104
cmpl $-0x1, %eax
je 0x2fe9
testl %eax, %eax
jne 0x2fed
movl $0x0, (%rbx)
jmp 0x2fff
xorl %eax, %eax
jmp 0x3001
leaq 0x81d0(%rip), %rdx      # 0xb1c4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31de
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x81d8(%rip), %rdi      # 0xb1e8
callq 0x1110
testl %eax, %eax
je 0x2fd0
movups 0x8112(%rip), %xmm0     # 0xb132
leaq 0x10(%rsp), %rdi
movups %xmm0, 0xe(%rdi)
movups 0x80f4(%rip), %xmm0     # 0xb124
movaps %xmm0, (%rdi)
leaq 0x8(%rsp), %rdx
movw $0x1, 0x4(%rdx)
movl $0x1, (%rdx)
movq %rdi, %rsi
callq 0x32e6
movq %rax, %rdi
movq %rax, %rsi
movl $0x2, %edx
callq 0x296e
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x816a(%rip)     # 0xb1d4
movups %xmm0, 0x8153(%rip)     # 0xb1c4
leaq 0x8170(%rip), %rdi      # 0xb1e8
callq 0x1090
jmp 0x2fd0
movq %rax, %rbx
leaq 0x815c(%rip), %rdi      # 0xb1e8
callq 0x1080
movq %rbx, %rdi
callq 0x1100
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movl (%rdx), %ecx
cmpl %ecx, %eax
jge 0x30cb
leaq 0x806c(%rip), %rdx      # 0xb124
movq %rsp, %r15
movq %r15, %rdi
callq 0x2a6e
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x30ee
cmpl %ecx, %eax
jg 0x30eb
testl %eax, %eax
jle 0x30eb
movzwl 0x2(%rsi,%rax,2), %ecx
movzwl 0x2(%r14,%rax,2), %edx
cmpw %dx, %cx
jb 0x30b1
decq %rax
cmpw %dx, %cx
jbe 0x30cf
movq %rbx, %rdi
movq %r14, %rdx
callq 0x28a8
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80fc(%rip), %al       # 0xb210
testb %al, %al
je 0x314e
leaq 0x80d1(%rip), %rdx      # 0xb1f0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x31de
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 0x80bb(%rip), %rdi      # 0xb210
callq 0x1110
testl %eax, %eax
je 0x3118
movups 0x7fcd(%rip), %xmm0     # 0xb132
leaq 0x10(%rsp), %rdi
movups %xmm0, 0xe(%rdi)
movups 0x7faf(%rip), %xmm0     # 0xb124
movaps %xmm0, (%rdi)
leaq 0x8(%rsp), %rdx
movw $0x1, 0x4(%rdx)
movl $0x1, (%rdx)
movq %rdi, %rsi
callq 0x339c
movq %rax, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x296e
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x8051(%rip)     # 0xb200
movups %xmm0, 0x803a(%rip)     # 0xb1f0
leaq 0x8053(%rip), %rdi      # 0xb210
callq 0x1090
jmp 0x3118
movq %rax, %rbx
leaq 0x803f(%rip), %rdi      # 0xb210
callq 0x1080
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x58, %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 0x320d
testb $0x1, 0x4(%rbx)
jne 0x321d
movl $0x1, (%r14)
movw $0x1, 0x4(%r14)
jmp 0x323c
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)
movl (%rbx), %ebp
testl %ebp, %ebp
je 0x32d4
movslq %ebp, %rax
shll $0x4, %ebp
movzwl 0x2(%rbx,%rax,2), %eax
movw $0x8000, %cx            # imm = 0x8000
testw %ax, %cx
jne 0x326b
decl %ebp
movzwl %cx, %edx
movl %edx, %ecx
shrl %ecx
cmpw $0x2, %dx
jae 0x3255
jmp 0x32d4
cmpl $0x2, %ebp
jl 0x32d4
movl $0x1, %r13d
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x2b24
movq %r12, %rdi
movq %r15, %rsi
callq 0x2bf8
movl %r13d, %eax
shrl $0x4, %eax
cmpl (%rbx), %eax
jge 0x32cc
movl %eax, %eax
movzwl 0x4(%rbx,%rax,2), %eax
movl %r13d, %ecx
andl $0xf, %ecx
btl %ecx, %eax
jae 0x32cc
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2b24
movq %r14, %rdi
movq %r15, %rsi
callq 0x2bf8
incl %r13d
cmpl %r13d, %ebp
jne 0x327e
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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)
movq $-0x1, %r12
movl $0x2, %ebx
movsbl 0x1(%r15,%r12), %edi
callq 0x1040
incq %r12
incl %ebx
testl %eax, %eax
jne 0x3500
shrl $0x2, %ebx
cmpl %ebp, %ebx
jle 0x351f
xorl %ebx, %ebx
jmp 0x358b
leal (%rbx,%rbx), %edx
xorl %r13d, %r13d
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1060
testq %r12, %r12
je 0x358b
movslq %r12d, %rax
addq %rax, %r15
decq %r15
xorl %r14d, %r14d
movsbl (%r15), %ebp
movl %ebp, %edi
callq 0x10f0
testl %eax, %eax
je 0x355e
movl %ebp, %edi
callq 0x1120
movl %eax, %ebp
addl $-0x37, %ebp
jmp 0x3566
addl $-0x30, %ebp
cmpl $0x9, %ebp
ja 0x351b
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
decq %r15
addl $0x4, %r13d
cmpq %r14, %r12
jne 0x3541
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7b10(%rip), %rsi      # 0xb0c4
movl $0x18, %ecx
rep  movsl (%rsi), %es:(%rdi)
movslq 0x40(%rsp), %r15
testq %r15, %r15
je 0x3634
leaq 0x40(%rsp), %r12
movl %r15d, %r13d
shll $0x4, %r13d
movzwl 0x2(%r12,%r15,2), %eax
movw $0x8000, %cx            # imm = 0x8000
testw %ax, %cx
jne 0x35f2
decl %r13d
movzwl %cx, %edx
movl %edx, %ecx
shrl %ecx
cmpw $0x2, %dx
jae 0x35db
jmp 0x3634
testl %r13d, %r13d
jle 0x3634
incl %r13d
leal -0x2(%r13), %ebp
movq %r14, %rdi
callq 0x3644
movl %ebp, %eax
shrl $0x4, %eax
cmpl %r15d, %eax
jge 0x362b
movl %eax, %eax
movzwl 0x4(%r12,%rax,2), %eax
andl $0xf, %ebp
btl %ebp, %eax
jae 0x362b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x385e
decl %r13d
cmpl $0x1, %r13d
ja 0x35fa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3e2e
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 0xe26(%rip), %xmm0      # 0x51c0
andps %xmm2, %xmm0
ucomiss %xmm3, %xmm0
jb 0x43c9
movss 0xe36(%rip), %xmm1      # 0x51e0
divss %xmm2, %xmm1
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
xorl %eax, %eax
movups (%rbx,%rax,4), %xmm2
mulps %xmm1, %xmm2
movups %xmm2, (%rbx,%rax,4)
addq $0x4, %rax
cmpq $0x10, %rax
jne 0x43b4
ucomiss %xmm3, %xmm0
setae %al
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4431
ucomiss %xmm2, %xmm1
jb 0x4450
movaps %xmm1, %xmm3
mulss %xmm1, %xmm3
addss %xmm3, %xmm0
ucomiss %xmm2, %xmm0
jb 0x4450
sqrtss %xmm0, %xmm0
subss %xmm0, %xmm1
movss %xmm1, (%rcx)
movb $0x1, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
movsd (%rdx), %xmm0
movss 0x8(%rdx), %xmm1
movb $0x1, %al
xorl %r11d, %r11d
xorps %xmm2, %xmm2
leaq 0xd75(%rip), %rbx       # 0x51e8
leaq 0xd86(%rip), %r14       # 0x5200
xorl %r10d, %r10d
xorl %r15d, %r15d
movss (%rcx,%r11), %xmm3
ucomiss %xmm3, %xmm2
je 0x452c
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), %r12
movq %r12, -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), %r12
movss -0x10(%rsp,%r12,4), %xmm5
movss (%rdi,%r12,4), %xmm6
ucomiss %xmm6, %xmm5
jb 0x452c
addss (%rsi,%r12,4), %xmm6
ucomiss %xmm6, %xmm5
ja 0x452c
movslq (%r11,%r14), %r12
movss -0x10(%rsp,%r12,4), %xmm5
movss (%rdi,%r12,4), %xmm6
ucomiss %xmm6, %xmm5
jb 0x452c
addss (%rsi,%r12,4), %xmm6
ucomiss %xmm6, %xmm5
jbe 0x4556
cmpq $0x2, %r15
leaq 0x1(%r15), %r15
setb %al
addl $-0x2, %r10d
addq $0x4, %r11
cmpq $0xc, %r11
jne 0x4480
xorl %eax, %eax
andb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm3
movss %xmm4, (%r8)
sbbl $0x0, %r10d
negl %r10d
movl %r10d, (%r9)
jmp 0x454b
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movl 0x194(%rdi), %eax
testl %eax, %eax
jle 0x1400
leaq 0x1(%rax), %rcx
leaq -0x40e(%rbp), %rdx
addq $0x19, %rdi
xorl %r9d, %r9d
movl $0x1, %r8d
movl %r9d, %esi
leal 0x30(%r8), %r9d
movslq %esi, %r10
movb %r9b, -0x410(%rbp,%r10)
leal 0x2(%r10), %r9d
addq %rdx, %r10
xorl %r11d, %r11d
movzbl (%rdi,%r11), %ebx
cmpl $0x77, %ebx
je 0x1396
cmpl $0x65, %ebx
je 0x1392
cmpl $0x62, %ebx
jne 0x139a
movb $0x23, %bl
jmp 0x139c
movb $0x5f, %bl
jmp 0x139c
movb $0x4f, %bl
jmp 0x139c
movb $0x2f, %bl
leal -0x1(%r9), %r14d
movslq %r14d, %r14
movb %bl, -0x410(%rbp,%r14)
movb $0x20, (%r10,%r11,2)
addl $0x2, %r9d
incq %r11
cmpq %r11, %rax
jne 0x137a
leal -0x1(%r9), %r10d
movslq %r10d, %r10
movb $0xa, -0x410(%rbp,%r10)
incq %r8
addq $0x14, %rdi
cmpq %rcx, %r8
jne 0x135e
movslq %r9d, %rcx
leaq (%rcx,%rbp), %rdx
addq $-0x410, %rdx           # imm = 0xFBF0
leal (%rax,%rax,2), %ecx
addl %esi, %ecx
addl $0x2, %ecx
xorl %esi, %esi
leal 0x30(%rsi), %edi
movb %dil, (%rdx,%rsi)
incq %rsi
cmpl %esi, %eax
jne 0x13f0
jmp 0x1402
xorl %ecx, %ecx
movslq %ecx, %rax
movw $0xa, -0x410(%rbp,%rax)
leaq -0x410(%rbp), %rdi
callq 0x10c0
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1491
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
jne 0x1491
addq %rsi, %rdi
decq %rdi
xorl %edx, %edx
movq %rdx, %r10
decq %rdx
cmpb %al, (%rdi,%r10)
je 0x144a
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 0x146d
cmpl $0x5, %esi
popq %rbp
jl 0x1491
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_O3/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 0x14ec
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
jne 0x14ec
addq %rsi, %rdi
decq %rdi
xorl %edx, %edx
movq %rdx, %r10
decq %rdx
cmpb %al, (%rdi,%r10)
je 0x14b6
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 0x14d6
testl %r10d, %r10d
popq %rbp
je 0x14ef
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_O3/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 0x1518
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
je 0x151b
xorl %eax, %eax
retq
addq $0x2, %rdi
movl $0x5, %edx
movq %rdi, %r10
decl %edx
decq %rdi
cmpb %al, -0x3(%rsi,%r10)
je 0x1524
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 0x1548
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 0x155e
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 0x157f
xorl %eax, %eax
testl %edx, %edx
jne 0x15b5
cmpq %r10, %rdi
jge 0x15b5
cmpl %ecx, %ebx
jle 0x15b5
movl %ecx, (%r8)
movl %ecx, (%r9)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::IsSide1(char*, int, int, int&, int&)
bool ChessBoard::IsSide1(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(rr - ll +1 < 5)
        return false;
    if( rr==ri && ll < li ) 
        return true;
    if( ll == li && rr > ri ) 
        return true;

    return false;
}

// Assembly:
movslq %ecx, %rax
movb (%rsi,%rax), %dil
cmpb $0x65, %dil
je 0x252a
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r8b
orb %dl, %r8b
jne 0x252a
movl $0xfffffffd, %r9d       # imm = 0xFFFFFFFD
movq %rax, %rdx
movl %r9d, %r8d
decq %rax
leal 0x1(%r8), %r9d
cmpb %dil, -0x1(%rsi,%rdx)
je 0x2495
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %ecx, %r9d
addl $-0x2, %ecx
addq %rsi, %r9
incq %r9
movq %r9, %r10
incl %r8d
incl %ecx
incq %r9
cmpb %dil, (%r10)
je 0x24bc
movq $-0x2, %r10
movb (%rsi,%rax), %r11b
cmpb $0x65, %r11b
sete %bl
cmpb %dil, %r11b
sete %r11b
orb %bl, %r11b
incl %r8d
incq %r10
decq %rsi
testb %r11b, %r11b
jne 0x24d3
leal 0x1(%rcx), %esi
subq %r10, %rax
xorl %r11d, %r11d
movb -0x1(%r9,%r11), %bl
cmpb $0x65, %bl
sete %r14b
cmpb %dil, %bl
sete %bl
orb %r14b, %bl
incq %r11
incl %ecx
incl %r8d
testb %bl, %bl
jne 0x24ff
cmpl $0x4, %r8d
popq %rbx
popq %r14
popq %rbp
jge 0x252d
xorl %eax, %eax
retq
cmpq $0x1, %r11
sete %dil
cmpq %rdx, %rax
setl %dl
movb $0x1, %al
testb %dil, %dl
jne 0x252c
cmpq $-0x1, %r10
sete %dl
cmpl %esi, %ecx
setg %al
andb %dl, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::CalculatePosShu(int, int, char)
BoardType ChessBoard:: CalculatePosShu(int x, int y, ChessSide side)
{
   if( x==0 || y== 0 || x > m_size || y> m_size )  
        return 0;
    char  line[30]; 
    int pos =0;
    for(int i=0;i<= m_size+1; i++ )
        line[i] = m_board[i][y];
    pos = x;

    int rl , rr;
    return CalculateLine( line, m_size+2, pos,rl, rr );
}

// Assembly:
movl %edx, %r8d
movl %esi, %ecx
testl %esi, %esi
sete %dl
testl %r8d, %r8d
sete %sil
xorl %eax, %eax
orb %dl, %sil
jne 0x281b
movl 0x194(%rdi), %edx
cmpl %ecx, %edx
setl %sil
cmpl %r8d, %edx
setl %r9b
orb %sil, %r9b
jne 0x281b
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
cmpl $-0x2, %edx
jg 0x27e2
addl $0x2, %edx
jmp 0x2805
movslq %r8d, %rax
addl $0x2, %edx
addq %rdi, %rax
addq $0x4, %rax
xorl %esi, %esi
movb (%rax), %dil
movb %dil, -0x30(%rbp,%rsi)
incq %rsi
addq $0x14, %rax
cmpq %rsi, %rdx
jne 0x27f1
leaq -0x30(%rbp), %rsi
leaq -0x8(%rbp), %r8
leaq -0x4(%rbp), %r9
callq 0x2552
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::CalculatePosLeft(int, int, char)
BoardType  ChessBoard:: CalculatePosLeft(int x, int y, ChessSide side)
{
    if( x==0 || y== 0 || x > m_size || y> m_size )  
        return 0;

    char line[30];
    int  kk =0;
    int  pos = 0;
    if( x>=y ) // (x-y,0), (x-y+1,1) (x-y+2,2) ...... 
    {
       int  xx = x-y;
       int  yy = 0;
       for(kk=0 ; xx <=m_size +2; xx ++, kk++, yy++ )
       {
            line[kk] = m_board[xx][yy];
            if( xx == x )
                pos = kk;
       }
    }
    else //(0, y-x) , (1, y-x +1), (2, y-x+2)
    {
        int xx =  0; 
        int yy = y-x; 
        for( kk=0; yy<=m_size+2; xx++, yy++, kk++ )
        {
            line[kk] = m_board[xx][yy];
            if(xx == x )
                pos = kk;
        }
    }
    int rr, rl;
    return CalculateLine( line, m_size+2, pos,rl, rr );

}

// Assembly:
movl %edx, %ecx
testl %esi, %esi
sete %dl
testl %ecx, %ecx
sete %r8b
xorl %eax, %eax
orb %dl, %r8b
jne 0x290f
movl 0x194(%rdi), %r8d
cmpl %esi, %r8d
setl %dl
cmpl %ecx, %r8d
setl %r9b
orb %dl, %r9b
jne 0x290f
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leal 0x2(%r8), %edx
movl %esi, %eax
subl %ecx, %eax
jge 0x28a8
movl %ecx, %eax
subl %esi, %eax
cmpl %edx, %eax
jg 0x28ac
movl %esi, %eax
addl %esi, %r8d
subl %ecx, %r8d
addl $0x3, %r8d
movslq %ecx, %rcx
movslq %esi, %rsi
subq %rsi, %rcx
leaq (%rcx,%rdi), %rsi
addq $0x4, %rsi
xorl %edi, %edi
xorl %ecx, %ecx
movb (%rsi), %r9b
cmpq %rdi, %rax
cmovel %edi, %ecx
movb %r9b, -0x30(%rbp,%rdi)
incq %rdi
addq $0x15, %rsi
cmpq %rdi, %r8
jne 0x288c
jmp 0x28f9
cmpl %edx, %eax
jle 0x28b0
xorl %ecx, %ecx
jmp 0x28f9
addl %ecx, %r8d
subl %esi, %r8d
addl $0x3, %r8d
movl %ecx, %eax
movslq %esi, %rsi
shlq $0x2, %rsi
leaq (%rsi,%rsi,4), %rsi
movslq %ecx, %rcx
shlq $0x2, %rcx
leaq (%rcx,%rcx,4), %rcx
subq %rcx, %rsi
addq %rdi, %rsi
addq $0x4, %rsi
xorl %edi, %edi
xorl %ecx, %ecx
movb (%rsi), %r9b
cmpl %edi, %eax
cmovel %edi, %ecx
movb %r9b, -0x30(%rbp,%rdi)
incq %rdi
addq $0x15, %rsi
cmpq %rdi, %r8
jne 0x28e0
leaq -0x30(%rbp), %rsi
leaq -0x4(%rbp), %r8
leaq -0x8(%rbp), %r9
callq 0x2552
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::CalculatePosRight(int, int, char)
BoardType  ChessBoard:: CalculatePosRight(int x, int y, ChessSide side)
{
   if( x==0 || y== 0 || x > m_size || y> m_size )  
        return 0;
   char line[30];
   int kk = 0;
   int pos = 0;
   if( x + y <= m_size+2 )  // (x+y,0), (x+y-1, 1) .....
   {
        int xx = x+y;
        int yy = 0;
        for( kk=0; xx >= 0 ; kk++,yy++ , xx--  )
        {
            line[kk] = m_board[xx][yy];
            if( xx == x )
                pos = kk;
        }
   }
   else  //(m_size+2 , y-(m_size+2-x) ), ....( y+x - (m-size-2)   ,  m_size+2)
   {
       int xx = m_size+2;
       int yy = y+x - m_size-2; 
       for(kk=0; yy<=m_size+2 && xx>=0;  xx--, yy++ , kk++ )
       {
            line[kk] = m_board[xx][yy]; 
            if( xx ==  x)
                pos = kk;
       }
   }
   int rr, rl;
   return CalculateLine( line, m_size+2, pos,rl, rr );
}

// Assembly:
movl %edx, %r8d
testl %esi, %esi
sete %cl
testl %edx, %edx
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x2a1d
movl 0x194(%rdi), %ecx
cmpl %esi, %ecx
setl %dl
cmpl %r8d, %ecx
setl %r9b
orb %dl, %r9b
jne 0x2a1d
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
addl %esi, %r8d
leal 0x2(%rcx), %edx
cmpl %edx, %r8d
jle 0x29c8
subl %ecx, %r8d
addl $-0x2, %r8d
cmpl %edx, %r8d
setg %al
cmpl $-0x2, %ecx
setl %cl
orb %al, %cl
jne 0x2a04
movslq %r8d, %rax
movl %edx, %r8d
movl %esi, %ecx
leaq (%r8,%r8,4), %rsi
leaq (%rax,%rsi,4), %rsi
addq %rdi, %rsi
addq $0x4, %rsi
movq %r8, %rdi
subq %rcx, %rdi
xorl %r9d, %r9d
movl %edx, %r10d
xorl %ecx, %ecx
movl %ecx, %r11d
leaq (%rax,%r9), %rbx
movb (%rsi), %cl
movb %cl, -0x30(%rbp,%r9)
cmpq %r9, %rdi
movl %r9d, %ecx
cmovnel %r11d, %ecx
cmpq %r8, %rbx
jge 0x2a06
incq %r9
leal -0x1(%r10), %r11d
addq $-0x13, %rsi
testl %r10d, %r10d
movl %r11d, %r10d
jg 0x2996
jmp 0x2a06
testl %r8d, %r8d
js 0x2a04
movl %r8d, %eax
movl %esi, %ecx
incl %r8d
leaq (%rax,%rax,4), %rsi
leaq (%rdi,%rsi,4), %rsi
addq $0x4, %rsi
subq %rcx, %rax
xorl %edi, %edi
xorl %ecx, %ecx
movb (%rsi), %r9b
cmpq %rdi, %rax
cmovel %edi, %ecx
movb %r9b, -0x30(%rbp,%rdi)
incq %rdi
addq $-0x13, %rsi
cmpq %rdi, %r8
jne 0x29e8
jmp 0x2a06
xorl %ecx, %ecx
leaq -0x30(%rbp), %rsi
leaq -0xc(%rbp), %r8
leaq -0x10(%rbp), %r9
callq 0x2552
addq $0x28, %rsp
popq %rbx
popq %rbp
retq