LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x8024(%rip), %al       # 0xb210
testb %al, %al
je 0x3226
leaq 0x7ff9(%rip), %rdx      # 0xb1f0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32b6
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 0x7fe3(%rip), %rdi      # 0xb210
callq 0x1110
testl %eax, %eax
je 0x31f0
movups 0x7ef5(%rip), %xmm0     # 0xb132
leaq 0x10(%rsp), %rdi
movups %xmm0, 0xe(%rdi)
movups 0x7ed7(%rip), %xmm0     # 0xb124
movaps %xmm0, (%rdi)
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
movw $0x1, 0x4(%rdx)
movq %rdi, %rsi
callq 0x3484
movq %rax, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x29e6
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x7f79(%rip)     # 0xb200
movups %xmm0, 0x7f62(%rip)     # 0xb1f0
leaq 0x7f7b(%rip), %rdi      # 0xb210
callq 0x1090
jmp 0x31f0
movq %rax, %rbx
leaq 0x7f67(%rip), %rdi      # 0xb210
callq 0x1080
movq %rbx, %rdi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3309
movzwl 0x4(%rbx), %eax
andl $0x1, %eax
je 0x3309
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)
jmp 0x3320
movl $0x1, (%r14)
movw $0x1, 0x4(%r14)
cmpl $0x0, (%rbx)
je 0x33b9
movslq (%rbx), %rcx
xorl %ebp, %ebp
testq %rcx, %rcx
je 0x3350
movl %ecx, %eax
shll $0x4, %eax
movzwl 0x2(%rbx,%rcx,2), %ecx
movw $0x8000, %dx            # imm = 0x8000
testw %cx, %dx
jne 0x334e
decl %eax
movzwl %dx, %esi
movl %esi, %edx
shrl %edx
cmpw $0x1, %si
ja 0x3338
jmp 0x3350
movl %eax, %ebp
cmpl $0x2, %ebp
jl 0x33b9
movl $0x1, %r13d
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x2b9e
movq %r12, %rdi
movq %r15, %rsi
callq 0x2c72
movl %r13d, %eax
shrl $0x4, %eax
cmpl (%rbx), %eax
jge 0x33b1
movl %eax, %eax
movzwl 0x4(%rbx,%rax,2), %eax
movl %r13d, %ecx
andl $0xf, %ecx
btl %ecx, %eax
jae 0x33b1
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2b9e
movq %r14, %rdi
movq %r15, %rsi
callq 0x2c72
incl %r13d
cmpl %r13d, %ebp
jne 0x3363
movq %r14, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x35ea
shrl $0x2, %ebx
cmpl %ebp, %ebx
jle 0x3609
xorl %ebx, %ebx
jmp 0x3675
leal (%rbx,%rbx), %edx
xorl %r13d, %r13d
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1060
testq %r12, %r12
je 0x3675
movslq %r12d, %rax
addq %rax, %r15
decq %r15
xorl %r14d, %r14d
movsbl (%r15), %ebp
movl %ebp, %edi
callq 0x10f0
testl %eax, %eax
je 0x3648
movl %ebp, %edi
callq 0x1120
movl %eax, %ebp
addl $-0x37, %ebp
jmp 0x3650
addl $-0x30, %ebp
cmpl $0x9, %ebp
ja 0x3605
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 0x362b
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_O1/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 0x40(%rsp), %r15
leaq 0x7a21(%rip), %rsi      # 0xb0c4
movl $0x18, %ecx
rep  movsl (%rsi), %es:(%rdi)
movslq (%r15), %r12
xorl %r13d, %r13d
testq %r12, %r12
je 0x36de
movl %r12d, %eax
shll $0x4, %eax
movzwl 0x2(%r15,%r12,2), %ecx
movw $0x8000, %dx            # imm = 0x8000
testw %cx, %dx
jne 0x36db
decl %eax
movzwl %dx, %esi
movl %esi, %edx
shrl %edx
cmpw $0x1, %si
ja 0x36c5
jmp 0x36de
movl %eax, %r13d
testl %r13d, %r13d
jle 0x3727
incl %r13d
leal -0x2(%r13), %ebp
movq %r14, %rdi
callq 0x3736
leal 0xd(%r13), %eax
testl %ebp, %ebp
cmovnsl %ebp, %eax
sarl $0x4, %eax
cmpl %r12d, %eax
jge 0x371e
cltq
movzwl 0x4(%r15,%rax,2), %eax
andl $0xf, %ebp
btl %ebp, %eax
jae 0x371e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3950
decl %r13d
cmpl $0x1, %r13d
jg 0x36e6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3f2a
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 0xd2a(%rip), %xmm0      # 0x51c0
andps %xmm2, %xmm0
ucomiss %xmm3, %xmm0
jb 0x44c5
movss 0xd3a(%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 0x44b0
ucomiss %xmm3, %xmm0
setae %al
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4530
ucomiss %xmm2, %xmm1
jae 0x4530
xorl %eax, %eax
retq
movaps %xmm1, %xmm3
mulss %xmm1, %xmm3
addss %xmm3, %xmm0
ucomiss %xmm2, %xmm0
setae %al
jb 0x452f
sqrtss %xmm0, %xmm0
subss %xmm0, %xmm1
movss %xmm1, (%rcx)
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xc76(%rip), %rbx       # 0x51e8
leaq 0xc87(%rip), %r14       # 0x5200
xorl %r10d, %r10d
xorl %r15d, %r15d
movss (%rcx,%r11), %xmm3
ucomiss %xmm3, %xmm2
je 0x462b
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 0x462b
addss (%rsi,%r12,4), %xmm6
ucomiss %xmm6, %xmm5
ja 0x462b
movslq (%r11,%r14), %r12
movss -0x10(%rsp,%r12,4), %xmm5
movss (%rdi,%r12,4), %xmm6
ucomiss %xmm6, %xmm5
jb 0x462b
addss (%rsi,%r12,4), %xmm6
ucomiss %xmm6, %xmm5
jbe 0x4653
cmpq $0x2, %r15
leaq 0x1(%r15), %r15
setb %al
addl $-0x2, %r10d
addq $0x4, %r11
cmpq $0xc, %r11
jne 0x457f
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 0x4648
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl %esi, 0x194(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x240(%rdi)
movq $0x0, 0x250(%rdi)
cmpl $-0x2, %esi
jl 0x1287
pushq %rbp
movq %rsp, %rbp
leaq 0x4(%rdi), %rax
movslq %esi, %rcx
addl $0x2, %esi
xorl %edx, %edx
testl %esi, %esi
cmovlel %edx, %esi
incl %esi
movl $0x2f, %r8d
xorl %r9d, %r9d
testq %r9, %r9
movl $0x65, %r10d
cmovel %r8d, %r10d
testq %rdx, %rdx
cmovel %r8d, %r10d
cmpq %rcx, %rdx
cmovgl %r8d, %r10d
cmpq %rcx, %r9
cmovgl %r8d, %r10d
movb %r10b, (%rax,%r9)
incq %r9
cmpq %r9, %rsi
jne 0x124c
incq %rdx
addq $0x14, %rax
cmpq %rsi, %rdx
jne 0x1249
popq %rbp
movl $0x0, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq (%rax,%rax,4), %rsi
leaq (%rdi,%rsi,4), %rsi
movslq %edx, %rdx
movb %cl, 0x4(%rdx,%rsi)
movl %eax, -0x20(%rbp)
movl %edx, -0x1c(%rbp)
movb %cl, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x248(%rdi), %rsi
cmpq 0x250(%rdi), %rsi
je 0x12e6
movq -0x10(%rbp), %rax
movq %rax, 0x10(%rsi)
movups -0x20(%rbp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x248(%rbx)
jmp 0x12f6
leaq 0x240(%rbx), %rdi
leaq -0x20(%rbp), %rdx
callq 0x3a1a
incl (%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq (%rax,%rax,4), %rax
leaq (%rdi,%rax,4), %rcx
movslq %edx, %rdx
movb 0x4(%rdx,%rcx), %al
movb $0x65, 0x4(%rdx,%rcx)
addq $-0x18, 0x248(%rdi)
decl (%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movl 0x194(%rdi), %eax
testl %eax, %eax
jle 0x1405
leaq 0x1(%rax), %rdx
movl %edx, %esi
leaq -0x41e(%rbp), %r8
addq $0x19, %rdi
decq %rsi
xorl %r14d, %r14d
movl $0x1, %r9d
movabsq $0x100000000, %r10      # imm = 0x100000000
movabsq $0x200000000, %r11      # imm = 0x200000000
leal 0x30(%r9), %ecx
movslq %r14d, %rbx
movb %cl, -0x420(%rbp,%rbx)
leal 0x1(%rbx), %ecx
leaq (%r8,%rbx), %r14
shlq $0x20, %rbx
addq %r10, %rbx
xorl %r15d, %r15d
movzbl (%rdi,%r15), %r12d
cmpl $0x77, %r12d
je 0x13bb
cmpl $0x65, %r12d
je 0x13b6
cmpl $0x62, %r12d
jne 0x13c0
movb $0x23, %r12b
jmp 0x13c3
movb $0x5f, %r12b
jmp 0x13c3
movb $0x4f, %r12b
jmp 0x13c3
movb $0x2f, %r12b
movslq %ecx, %rcx
movb %r12b, -0x420(%rbp,%rcx)
movb $0x20, (%r14,%r15,2)
addq %r11, %rbx
addl $0x2, %ecx
incq %r15
cmpq %r15, %rsi
jne 0x139a
leal 0x1(%rcx), %r14d
sarq $0x20, %rbx
movb $0xa, -0x420(%rbp,%rbx)
incq %r9
addq $0x14, %rdi
cmpq %rdx, %r9
jne 0x137b
incl %ecx
jmp 0x1407
xorl %ecx, %ecx
testl %eax, %eax
jle 0x142b
movslq %ecx, %rdx
leaq (%rdx,%rbp), %rsi
addq $-0x420, %rsi           # imm = 0xFBE0
xorl %edx, %edx
leal 0x30(%rdx), %edi
movb %dil, (%rsi,%rdx)
incq %rdx
cmpl %edx, %eax
jne 0x141b
addl %edx, %ecx
movslq %ecx, %rax
movw $0xa, -0x420(%rbp,%rax)
leaq -0x420(%rbp), %rdi
callq 0x10c0
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x146e
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
je 0x1471
xorl %eax, %eax
retq
addq %rsi, %rdi
decq %rdi
xorl %edx, %edx
movq %rdx, %r10
decq %rdx
cmpb %al, (%rdi,%r10)
je 0x1479
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 0x149c
cmpl $0x5, %esi
setge %al
popq %rbp
jl 0x1470
incl %ecx
addq %rdx, %rcx
movl %ecx, (%r8)
movl %edi, (%r9)
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x14de
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
je 0x14e1
xorl %eax, %eax
retq
addq %rsi, %rdi
decq %rdi
xorl %edx, %edx
movq %rdx, %r10
decq %rdx
cmpb %al, (%rdi,%r10)
je 0x14e9
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 0x1509
testl %r10d, %r10d
sete %al
popq %rbp
jne 0x14e0
incl %ecx
addq %rdx, %rcx
movl %ecx, (%r8)
movl %edi, (%r9)
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x154a
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r10b
orb %dl, %r10b
je 0x154d
xorl %eax, %eax
retq
addq $0x2, %rdi
movl $0x5, %edx
movq %rdi, %r10
decl %edx
decq %rdi
cmpb %al, -0x3(%rsi,%r10)
je 0x1556
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 0x157a
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 0x1590
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 0x15b1
xorl %eax, %eax
testl %edx, %edx
jne 0x15e7
cmpq %r10, %rdi
jge 0x15e7
cmpl %ecx, %ebx
jle 0x15e7
movl %ecx, (%r8)
movl %ecx, (%r9)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2592
cmpl %edx, %ecx
setg %dl
testl %ecx, %ecx
sets %r8b
orb %dl, %r8b
jne 0x2592
movl $0xfffffffd, %r9d       # imm = 0xFFFFFFFD
movq %rax, %rdx
movl %r9d, %r8d
decq %rax
leal 0x1(%r8), %r9d
cmpb %dil, -0x1(%rsi,%rdx)
je 0x24fd
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 0x2524
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 0x253b
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 0x2567
cmpl $0x4, %r8d
popq %rbx
popq %r14
popq %rbp
jge 0x2595
xorl %eax, %eax
retq
cmpq $0x1, %r11
sete %dil
cmpq %rdx, %rax
setl %dl
movb $0x1, %al
testb %dil, %dl
jne 0x2594
cmpq $-0x1, %r10
sete %dl
cmpl %esi, %ecx
setg %al
andb %dl, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x287b
movl 0x194(%rdi), %edx
cmpl %ecx, %edx
setl %sil
cmpl %r8d, %edx
setl %r9b
orb %sil, %r9b
jne 0x287b
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
cmpl $-0x1, %edx
jl 0x2862
movslq %r8d, %rsi
leal 0x2(%rdx), %eax
addq %rdi, %rsi
addq $0x4, %rsi
xorl %edi, %edi
movb (%rsi), %r8b
movb %r8b, -0x30(%rbp,%rdi)
incq %rdi
addq $0x14, %rsi
cmpq %rdi, %rax
jne 0x284e
addl $0x2, %edx
leaq -0x30(%rbp), %rsi
leaq -0x8(%rbp), %r8
leaq -0x4(%rbp), %r9
callq 0x25ba
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x296f
movl 0x194(%rdi), %r8d
cmpl %esi, %r8d
setl %dl
cmpl %ecx, %r8d
setl %r9b
orb %dl, %r9b
jne 0x296f
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leal 0x2(%r8), %edx
movl %esi, %eax
subl %ecx, %eax
jge 0x2908
movl %ecx, %eax
subl %esi, %eax
cmpl %edx, %eax
jg 0x290c
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 0x28ec
jmp 0x2959
cmpl %edx, %eax
jle 0x2910
xorl %ecx, %ecx
jmp 0x2959
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 0x2940
leaq -0x30(%rbp), %rsi
leaq -0x4(%rbp), %r8
leaq -0x8(%rbp), %r9
callq 0x25ba
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %ecx
testl %esi, %esi
sete %dl
testl %ecx, %ecx
sete %r8b
xorl %eax, %eax
orb %dl, %r8b
jne 0x2a7a
movslq 0x194(%rdi), %r8
cmpl %esi, %r8d
setl %dl
cmpl %ecx, %r8d
setl %r9b
orb %dl, %r9b
jne 0x2a7a
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leal (%rcx,%rsi), %eax
leaq 0x2(%r8), %rdx
cmpl %edx, %eax
jle 0x2a24
subl %r8d, %eax
addl $-0x2, %eax
cmpl %edx, %eax
setg %cl
cmpl $-0x2, %r8d
setl %r8b
orb %cl, %r8b
jne 0x2a62
cltq
movl %edx, %r8d
movl %esi, %ecx
leaq (%r8,%r8,4), %rsi
leaq (%rax,%rsi,4), %rsi
addq %rdi, %rsi
addq $0x4, %rsi
subq %rcx, %r8
xorl %edi, %edi
movl %edx, %r9d
xorl %ecx, %ecx
movl %ecx, %r10d
leaq (%rax,%rdi), %r11
movb (%rsi), %cl
movb %cl, -0x30(%rbp,%rdi)
cmpq %rdi, %r8
movl %edi, %ecx
cmovnel %r10d, %ecx
cmpq %rdx, %r11
jge 0x2a64
incq %rdi
leal -0x1(%r9), %r10d
addq $-0x13, %rsi
testl %r9d, %r9d
movl %r10d, %r9d
jg 0x29f4
jmp 0x2a64
testl %eax, %eax
js 0x2a62
movl %eax, %eax
movl %esi, %r8d
addl %ecx, %esi
incl %esi
leaq (%rax,%rax,4), %rcx
leaq (%rdi,%rcx,4), %rdi
addq $0x4, %rdi
subq %r8, %rax
xorl %r8d, %r8d
xorl %ecx, %ecx
movb (%rdi), %r9b
cmpq %r8, %rax
cmovel %r8d, %ecx
movb %r9b, -0x30(%rbp,%r8)
incq %r8
addq $-0x13, %rdi
cmpq %r8, %rsi
jne 0x2a45
jmp 0x2a64
xorl %ecx, %ecx
leaq -0x30(%rbp), %rsi
leaq -0x4(%rbp), %r8
leaq -0x8(%rbp), %r9
callq 0x25ba
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::GetPossbilePos(char, std::vector<StPos, std::allocator<StPos>>&)
int ChessBoard::GetPossbilePos(ChessSide side, std::vector<StPos >  &list)
{
    for(int i =1; i<=m_size; i++ )
        for(int j=1; j<=m_size; j++ )
        {
            if( m_board[i][j] !=  Chess_Empty )    
                continue;
            int dist  = m_size;
            for(int k=0; k< m_chessList.size(); k++ )
            {
                int xx = i - m_chessList[k].x;
                int yy = j - m_chessList[k].y;
                if(xx<0 ) xx = -xx;
                if(yy<0 ) yy = -yy;
                int tt = (xx>yy)?xx:yy;
                dist = (tt<dist )?tt:dist;
                if(dist <=2)
                    break;
            }
            if( dist<=2 )
            {
                StPos pos(i,j,side);
                list.push_back(pos);
            }
        }
    return  list.size();
}

// Assembly:
movq %rdx, %r11
cmpl $0x0, 0x194(%rdi)
jle 0x2bf0
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %r10d
movq %rdi, %r15
leaq 0x4(%rdi), %rax
movq %rax, -0x48(%rbp)
movl $0x1, %r13d
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
movl 0x194(%r15), %eax
testl %eax, %eax
jle 0x2bcb
movl $0x1, %r12d
leaq (,%r13,4), %rcx
addq %r13, %rcx
movq -0x48(%rbp), %rdx
leaq (%rdx,%rcx,4), %r14
movq %r14, -0x50(%rbp)
cmpb $0x65, (%r12,%r14)
jne 0x2bb3
movq 0x240(%r15), %rcx
movq 0x248(%r15), %rdx
subq %rcx, %rdx
je 0x2b54
sarq $0x3, %rdx
imulq %rbx, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
addq $0x4, %rcx
movl %r13d, %esi
subl -0x4(%rcx), %esi
movl %eax, %edi
movl %r12d, %r8d
subl (%rcx), %r8d
movl %esi, %r9d
negl %r9d
cmovsl %esi, %r9d
movl %r8d, %eax
negl %eax
cmovsl %r8d, %eax
cmpl %eax, %r9d
cmovgl %r9d, %eax
cmpl %edi, %eax
cmovgel %edi, %eax
cmpl $0x2, %eax
jle 0x2b59
addq $0x18, %rcx
decq %rdx
jne 0x2b19
cmpl $0x3, %eax
jge 0x2bb3
movl %r13d, -0x40(%rbp)
movl %r12d, -0x3c(%rbp)
movb %r10b, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq 0x8(%r11), %rsi
cmpq 0x10(%r11), %rsi
je 0x2b8d
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsi)
movups -0x40(%rbp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x8(%r11)
jmp 0x2bb3
movq %r11, %rdi
leaq -0x40(%rbp), %rdx
movl %r10d, %ebx
movq %r11, %r14
callq 0x3a1a
movq %r14, %r11
movq -0x50(%rbp), %r14
movl %ebx, %r10d
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
leaq 0x1(%r12), %rcx
movslq 0x194(%r15), %rax
cmpq %rax, %r12
movq %rcx, %r12
jl 0x2ae7
leaq 0x1(%r13), %rax
movslq 0x194(%r15), %rcx
cmpq %rcx, %r13
movq %rax, %r13
jl 0x2abb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movq 0x8(%r11), %rax
subq (%r11), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
retq
// File: /workspace/github_cpp_makefile_star2_O1/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::CalculateOnePos(int, int, char, int)
int64_t ChessBoard::CalculateOnePos(int x, int y , ChessSide side, int flag )
{
    BoardType  res[4]={0};
    res[0] = CalculatePosHeng(x, y, side);
    res[1] = CalculatePosShu(x,y, side);
    res[2] = CalculatePosLeft(x, y, side);
    res[3] = CalculatePosRight(x, y, side);
    //printf("CaluatOne pos(%u %u)  %u \n", x, y , res[0]);
    //printf("CaluatOne pos(%u %u)  %u \n", x, y , res[1]);
    //printf("CaluatOne pos(%u %u)  %u \n", x, y , res[2]);
    //printf("CaluatOne pos(%u %u)  %u \n", x, y , res[3]);
    //memset(m_bType, 0 , sizeof(m_bType));
    //memset(m_wType, 0 , sizeof(m_wType));


    int xx = x - (1+m_size)/2;
    int yy = y - (1+m_size)/2; 
    if(xx<0 ) xx = -xx;
    if(yy<0 ) yy = -yy;
    int dist = (xx>yy )? xx:yy;


    int64_t score =   ScoreList[res[0]] + ScoreList[res[1]] + ScoreList[res[2]] 
        + ScoreList[res[3]];
    if(flag != 0 )
    {
        if(side == Chess_Black )
        {
            m_bType[res[0]] ++;
            m_bType[res[1]] ++;
            m_bType[res[2]] ++;
            m_bType[res[3]] ++;

        }
        if(side == Chess_White )
        {
            m_wType[res[0]] ++;
            m_wType[res[1]] ++;
            m_wType[res[2]] ++;
            m_wType[res[3]] ++;

        }
    }

    return score + (1+m_size)/2 - dist;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
movl %edx, %r14d
movl %esi, %ebx
movq %rdi, %r15
xorl %ecx, %ecx
callq 0x27aa
movl %eax, -0x30(%rbp)
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x2802
movl %eax, %r13d
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x287c
movl %eax, %r12d
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x2970
movl 0x194(%r15), %edi
movl -0x30(%rbp), %r8d
leaq 0x441f(%rip), %rsi      # 0x7090
movslq (%rsi,%r8,4), %rcx
movq %rcx, -0x30(%rbp)
movl %r13d, %r9d
movslq (%rsi,%r9,4), %rdx
movl %r12d, %r10d
movslq (%rsi,%r10,4), %rcx
movl %eax, %r11d
movslq (%rsi,%r11,4), %rax
cmpl $0x0, -0x38(%rbp)
je 0x2cc6
movsbl -0x34(%rbp), %r12d
cmpl $0x62, %r12d
je 0x2cad
cmpl $0x77, %r12d
jne 0x2cc6
movl $0x1ec, %r12d           # imm = 0x1EC
jmp 0x2cb3
movl $0x19c, %r12d           # imm = 0x19C
addq %r12, %r15
incl (%r15,%r8,4)
incl (%r15,%r9,4)
incl (%r15,%r10,4)
incl (%r15,%r11,4)
movl %edi, %esi
incl %esi
shrl $0x1f, %esi
addl %edi, %esi
incl %esi
sarl %esi
subl %esi, %r14d
movl %r14d, %edi
negl %edi
cmovsl %r14d, %edi
subl %esi, %ebx
movl %ebx, %r8d
negl %r8d
cmovsl %ebx, %r8d
addq -0x30(%rbp), %rdx
addq %rax, %rcx
addq %rdx, %rcx
cmpl %edi, %r8d
cmovlel %edi, %r8d
movslq %esi, %rax
addq %rcx, %rax
subq %r8, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::PutHumenChessGetAI(StPos&, StPos&)
int ChessBoard:: PutHumenChessGetAI(StPos &humPos, StPos &aiPos)
{
    if( m_aiside == Chess_Black   && m_stepnum == 0 )
    {
        aiPos.x = (1+m_size)/2;
        aiPos.y = (1+m_size)/2;
        return 0;
    }
    else if( m_aiside == Chess_White && m_stepnum == 0 )
    {
        PutChess(humPos.x, humPos.y, Chess_Black);

        int x ,y;
        x = y = (1+m_size)/2;
        int k = random()%8; 
        if( k==0 ){
            aiPos.x = x-1;   aiPos.y = y-1;
        }
        if(k==1){
            aiPos.x = x-1;   aiPos.y = y ;
        }
        if(k==2){
            aiPos.x = x-1;   aiPos.y = y+1;
        }
        if(k==3){
            aiPos.x = x ;  aiPos.y = y-1;
        }
        if(k==4){
            aiPos.x = x ; aiPos.y = y+1 ;
        }
        if(k==5){
            aiPos.x = x+1; aiPos.y = y-1;
        }
        if(k==6){
            aiPos.x = x+1; aiPos.y = y;
        }
        if(k==7){
            aiPos.x = x+1; aiPos.y =  y+1;
        }
        return 0;
    }

    PutChess(humPos.x, humPos.y, m_otherside);
    
    int ret = GetNextPosMinMax(2, aiPos,MM_MIN, MM_MAX );
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movb 0x198(%rdi), %al
cmpb $0x62, %al
sete %dl
movl (%rdi), %ecx
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0x3941
movl 0x194(%r14), %eax
movl %eax, %ecx
incl %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
incl %eax
sarl %eax
movl %eax, (%rbx)
movl %eax, 0x4(%rbx)
jmp 0x3a12
testl %ecx, %ecx
sete %cl
cmpb $0x77, %al
sete %dil
andb %cl, %dil
movl (%rsi), %eax
movl 0x4(%rsi), %edx
cmpb $0x1, %dil
jne 0x39b4
movq %r14, %rdi
movl %eax, %esi
movl $0x62, %ecx
callq 0x128e
movl 0x194(%r14), %r14d
callq 0x1050
leaq 0x7(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
andq $-0x8, %rcx
subq %rcx, %rax
cmpq $0x7, %rax
ja 0x3a12
movl %r14d, %ecx
incl %ecx
shrl $0x1f, %ecx
addl %r14d, %ecx
incl %ecx
sarl %ecx
leaq 0x165d(%rip), %rdx      # 0x5004
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
decl %ecx
jmp 0x39f8
movsbl 0x199(%r14), %ecx
movq %r14, %rdi
movl %eax, %esi
callq 0x128e
movl $0x77359400, %r8d       # imm = 0x77359400
movq %r14, %rdi
movl $0x2, %esi
movq %rbx, %rdx
movq $-0x77359400, %rcx      # imm = 0x88CA6C00
callq 0x2f14
jmp 0x3a12
movl %ecx, (%rbx)
jmp 0x39ee
leal -0x1(%rcx), %eax
movl %eax, (%rbx)
incl %ecx
jmp 0x3a0f
movl %ecx, (%rbx)
jmp 0x3a06
incl %ecx
movl %ecx, (%rbx)
jmp 0x3a0f
leal -0x1(%rcx), %eax
jmp 0x3a0d
leal 0x1(%rcx), %eax
movl %eax, (%rbx)
decl %ecx
jmp 0x3a0f
leal 0x1(%rcx), %eax
movl %eax, (%rbx)
movl %ecx, 0x4(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::cache_mock(long, long, long, long, long, long)
cache_mock::cache_mock(long int d, long int c, long int m, long int b, long int l, long int s) : desc(d), cache_size(c), mem_size(m), block_size(b), lru(l), set_size(s)
{
    if (d == 1)
        set_size = 1;
    else if (d == 2)
        set_size = c / b;
    no_sets = cache_size / (block_size * set_size);
    container_init();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r10
movq 0x10(%rbp), %rax
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %r9, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movq $0x0, 0x48(%rdi)
cmpq $0x1, %rsi
je 0x1993
cmpq $0x2, %rsi
jne 0x1997
movq %r10, %rax
cqto
idivq %r8
movq %rax, %rsi
movq %rsi, 0x20(%rdi)
leaq 0x38(%rdi), %rbx
imulq 0x20(%rdi), %r8
movq %r10, %rax
cqto
idivq %r8
movq %rax, 0x28(%rdi)
callq 0x19ca
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x220a
movq %r14, %rdi
callq 0x1180
nop
// File: /workspace/github_cpp_makefile_star2_O1/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::container_init()
void cache_mock::container_init()
{
    if (container.size())
        container.clear();
    long int size = cache_size / block_size;
    for (long int i = 0; i < size; i++)
    {
        vector<long int> block;
        block.push_back(i);
        block.push_back(-1);           //tag_bit
        block.push_back(0);            //dirty_bit
        block.push_back(i % set_size); //hierarchy
        for (long int j = 0; j < block_size; j++)
        {
            block.push_back(-1);
        }
        container.push_back(block);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x38(%rdi), %r15
movq 0x38(%rdi), %rsi
cmpq %rsi, 0x40(%rdi)
je 0x19f4
movq %r15, %rdi
callq 0x2774
movq 0x8(%rbx), %rax
cqto
idivq 0x18(%rbx)
movq $0x0, -0x50(%rbp)
movq %rax, -0x58(%rbp)
testq %rax, %rax
jle 0x1b50
xorl %eax, %eax
leaq -0x40(%rbp), %r12
leaq -0x48(%rbp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rsi
testq %rsi, %rsi
je 0x1a42
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1a4e
movq %r12, %rdi
leaq -0x50(%rbp), %rdx
callq 0x27be
movq $-0x1, -0x48(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x1a71
movq $-0x1, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1a7c
movq %r12, %rdi
movq %r13, %rdx
callq 0x28e0
movq $0x0, -0x48(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x1a9f
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1aaa
movq %r12, %rdi
movq %r13, %rdx
callq 0x28e0
movq -0x50(%rbp), %rax
cqto
idivq 0x20(%rbx)
movq %rdx, -0x48(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x1acf
movq %rdx, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1ada
movq %r12, %rdi
movq %r13, %rdx
callq 0x28e0
cmpq $0x0, 0x18(%rbx)
jle 0x1b1b
xorl %r14d, %r14d
movq $-0x1, -0x48(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x1b07
movq $-0x1, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x1b12
movq %r12, %rdi
movq %r13, %rdx
callq 0x28e0
incq %r14
cmpq 0x18(%rbx), %r14
jl 0x1ae4
movq %r15, %rdi
movq %r12, %rsi
callq 0x23e4
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1b3b
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10f0
movq -0x50(%rbp), %rax
incq %rax
movq %rax, -0x50(%rbp)
cmpq -0x58(%rbp), %rax
jl 0x1a1d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1b67
jmp 0x1b67
jmp 0x1b67
jmp 0x1b67
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1b7f
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10f0
movq %rbx, %rdi
callq 0x1180
nop
// File: /workspace/github_cpp_makefile_star2_O1/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::cache_mock_copy(cache_mock&)
void cache_mock::cache_mock_copy(cache_mock &c)
{
    this->desc = c.desc;
    this->cache_size = c.cache_size;
    this->mem_size = c.mem_size;
    this->block_size = c.block_size;
    this->lru = c.lru;
    this->set_size = c.set_size;
    this->no_sets=c.no_sets;
    this->container = c.container;
    //copy(c.container.begin(), c.container.end(), this->container.begin());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
movq 0x30(%rsi), %rax
movq %rax, 0x30(%rdi)
movq 0x20(%rsi), %rax
movq %rax, 0x20(%rdi)
movq 0x28(%rsi), %rax
movq %rax, 0x28(%rdi)
addq $0x38, %rsi
addq $0x38, %rdi
popq %rbp
jmp 0x2266
// File: /workspace/github_cpp_makefile_star2_O1/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::container_display()
void cache_mock::container_display()
{
    if(!desc)
        printf("Set\t");
    printf("ID\tTag\tDirty\thierarchy\tBlock-Display\n");
    for (long int i = 0; i < container.size(); i++)
    {
        if (!desc)
        {
            if(!(i % set_size))
            {
                printf("\n");
                printf("%ld",i/set_size);
            }
            printf("\t");
        }
        for (long int j = 0; j < container[i].size(); j++)
        {
            printf("%ld\t", container[i][j]);
            if (j == 3)
            {
                printf("\t");
            }
        }
        printf("\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x1c4f
leaq 0x1608(%rip), %rdi      # 0x3250
xorl %eax, %eax
callq 0x1040
leaq 0x1622(%rip), %rdi      # 0x3278
callq 0x1150
movq 0x40(%rbx), %rax
cmpq 0x38(%rbx), %rax
je 0x1d35
leaq 0x15e9(%rip), %r15      # 0x3259
xorl %r12d, %r12d
cmpq $0x0, (%rbx)
jne 0x1cb5
movq %r12, %rax
cqto
idivq 0x20(%rbx)
testq %rdx, %rdx
jne 0x1cab
movl $0xa, %edi
callq 0x1120
movq %r12, %rax
cqto
idivq 0x20(%rbx)
leaq 0x15b4(%rip), %rdi      # 0x3255
movq %rax, %rsi
xorl %eax, %eax
callq 0x1040
movl $0x9, %edi
callq 0x1120
movq 0x38(%rbx), %rcx
leaq (%r12,%r12,2), %r14
movq (%rcx,%r14,8), %rax
cmpq %rax, 0x8(%rcx,%r14,8)
je 0x1d05
xorl %r13d, %r13d
movq (%rax,%r13,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1040
cmpq $0x3, %r13
jne 0x1ce9
movl $0x9, %edi
callq 0x1120
incq %r13
movq 0x38(%rbx), %rcx
movq (%rcx,%r14,8), %rax
movq 0x8(%rcx,%r14,8), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jb 0x1ccb
movl $0xa, %edi
callq 0x1120
movq 0x40(%rbx), %rax
subq 0x38(%rbx), %rax
incq %r12
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rax, %r12
jb 0x1c73
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::find_hierarchy_max(long)
long int cache_mock::find_hierarchy_max(long int set)
{
    long int max = set * set_size;
    for (long int i = 0; i < set_size; i++)
    {
        if (container[set * set_size + i][3] > container[max][3])
        {
            max = set * set_size + i;
        }
    }
    return (max);
}

// Assembly:
movq 0x20(%rdi), %rdx
movq %rdx, %rcx
imulq %rsi, %rcx
testq %rdx, %rdx
jle 0x1f85
pushq %rbp
movq %rsp, %rbp
movq 0x38(%rdi), %rdi
imulq %rdx, %rsi
leaq (%rsi,%rsi,2), %rax
leaq (%rdi,%rax,8), %rsi
movq %rcx, %r8
movq (%rsi), %rax
movq 0x18(%rax), %r9
leaq (%r8,%r8,2), %rax
movq (%rdi,%rax,8), %r10
movq %rcx, %rax
cmpq 0x18(%r10), %r9
jg 0x1f74
movq %r8, %rax
incq %rcx
addq $0x18, %rsi
movq %rax, %r8
decq %rdx
jne 0x1f59
popq %rbp
retq
movq %rcx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/niksram[P]Cache-Mapping-Simulator/cache_mapper.cpp
// Function: cache_mock::find_hierarchy_min(long)
long int cache_mock::find_hierarchy_min(long int set)
{
    long int min = set * set_size;
    for (long int i = 0; i < set_size; i++)
    {
        if (container[set * set_size + i][3] < container[min][3])
        {
            min = set * set_size + i;
        }
    }
    return (min);
}

// Assembly:
movq 0x20(%rdi), %rdx
movq %rdx, %rcx
imulq %rsi, %rcx
testq %rdx, %rdx
jle 0x1fdd
pushq %rbp
movq %rsp, %rbp
movq 0x38(%rdi), %rdi
imulq %rdx, %rsi
leaq (%rsi,%rsi,2), %rax
leaq (%rdi,%rax,8), %rsi
movq %rcx, %r8
movq (%rsi), %rax
movq 0x18(%rax), %r9
leaq (%r8,%r8,2), %rax
movq (%rdi,%rax,8), %r10
movq %rcx, %rax
cmpq 0x18(%r10), %r9
jl 0x1fcc
movq %r8, %rax
incq %rcx
addq $0x18, %rsi
movq %rax, %r8
decq %rdx
jne 0x1fb1
popq %rbp
retq
movq %rcx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Jacobious52[P]Tanks/Terrain.cpp
// Function: Terrain::update(int)
LOOPV(i, this)
    {
        get_child(i)->update(t);
        if (get_child(i)->should_remove_from_parent() == true)
        {
            delete get_children()->remove(i);
            --i;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x9888
cmpq $0x0, 0x8(%rax)
je 0x7faa
xorl %r15d, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x98ce
movq (%rax), %rcx
movq %rax, %rdi
movl %ebx, %esi
callq *0x10(%rcx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x98ce
movq %rax, %rdi
callq 0x99a0
testb %al, %al
je 0x7f95
movq %r14, %rdi
callq 0x9888
movq 0x8(%rax), %rcx
cmpq %r15, %rcx
jbe 0x7f85
movq (%rax), %rdx
movq (%rdx,%r15,8), %rdi
movq %r15, %rdx
movq (%rax), %rsi
movq 0x8(%rsi,%rdx,8), %r8
movq %r8, (%rsi,%rdx,8)
leaq 0x1(%rdx), %rsi
movq %rsi, %rdx
cmpq %rsi, %rcx
jne 0x7f64
decq %rcx
movq %rcx, 0x8(%rax)
jmp 0x7f87
xorl %edi, %edi
testq %rdi, %rdi
je 0x7f92
movq (%rdi), %rax
callq *0x8(%rax)
decq %r15
incq %r15
movq %r14, %rdi
callq 0x9888
cmpq 0x8(%rax), %r15
jb 0x7f1c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Jacobious52[P]Tanks/Test.cpp
// Function: test_point()
void test_point()
{
    printf("Testing Point..\n\n");

    Point<int> p1(3, 4);
    assert(p1.length() == 5, "length");
    Point<int> p2(3, 4);
    assert(p1 == p2, "equality");
    Point<int> res(0, 0);
    assert(p1 - p2 == res, "minus");
    res.x = 6;
    res.y = 8;
    assert(p2 + p2 == res, "addition");
    res.x = 9;
    res.y = 16;
    assert(p1 * p2 == res, "times");
    res.x = 1;
    res.y = 1;
    assert(p1 / p2 == res, "divide");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2337(%rip), %rdi      # 0xc491
callq 0x3320
leaq 0x2208(%rip), %rsi      # 0xc36e
movl $0x1, %edi
callq 0xa0d0
leaq 0x21fe(%rip), %rsi      # 0xc375
movl $0x1, %edi
callq 0xa0d0
leaq 0x21f6(%rip), %rsi      # 0xc37e
movl $0x1, %edi
callq 0xa0d0
leaq 0x21eb(%rip), %rsi      # 0xc384
movl $0x1, %edi
callq 0xa0d0
leaq 0x21e3(%rip), %rsi      # 0xc38d
movl $0x1, %edi
callq 0xa0d0
leaq 0x21d8(%rip), %rsi      # 0xc393
movl $0x1, %edi
popq %rbp
jmp 0xa0d0