// File: /workspace/github_cpp_makefile_star2_O3/smallHW89[P]gobang/GoBang_ChessBoard.cpp
// Function: ChessBoard::CalculateLine(char*, int, int, int&, int&)
BoardType  ChessBoard::CalculateLine(char  oneLine[],  int len , int pos, int &resL , int &resR)
{
    if(IsLong(oneLine, len , pos, resL , resR ) )
        return Board_LONG;
    if(Is5(oneLine, len , pos , resL , resR))
        return Board_FIVE;
    if(IsOpen4(oneLine, len , pos ,resL , resR))
        return Board_FOUR;
    if(IsSide4(oneLine, len , pos, resL , resR)   )
        return Board_SFOUR;
    if(IsOpen3(oneLine , len , pos, resL, resR) )
        return Board_THREE;
    if(IsSide3(oneLine, len , pos , resL , resR) )
        return Board_STHREE;
    if(IsOpen2(oneLine, len , pos, resL , resR ))
        return Board_TWO;
    if(IsSide2(oneLine, len , pos, resL , resR) ) 
        return Board_STWO;
    if(IsOpen1(oneLine, len, pos, resL, resR) )
        return Board_ONE;
    if(IsSide1(oneLine, len , pos, resL, resR))
        return Board_SONE;
    
    return Board_NOVALUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r12
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r13
movslq %ecx, %rcx
movb (%rsi,%rcx), %al
cmpb $0x65, %al
je 0x258f
cmpl %r15d, %r14d
setg %dl
testl %r14d, %r14d
sets %sil
orb %dl, %sil
je 0x2696
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movq %r12, %r8
movq %rbx, %r9
callq 0x14fe
movl %eax, %ecx
movl $0x2, %eax
testb %cl, %cl
jne 0x26eb
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movq %r12, %r8
movq %rbx, %r9
callq 0x15bc
movl %eax, %ecx
movl $0x3, %eax
testb %cl, %cl
jne 0x26eb
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movq %r12, %r8
movq %rbx, %r9
callq 0x18b8
movl %eax, %ecx
movl $0x4, %eax
testb %cl, %cl
jne 0x26eb
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movq %r12, %r8
movq %rbx, %r9
callq 0x1b10
movl %eax, %ecx
movl $0x5, %eax
testb %cl, %cl
jne 0x26eb
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movq %r12, %r8
movq %rbx, %r9
callq 0x1d68
movl %eax, %ecx
movl $0x6, %eax
testb %cl, %cl
jne 0x26eb
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movq %r12, %r8
movq %rbx, %r9
callq 0x1fc0
movl %eax, %ecx
movl $0x7, %eax
testb %cl, %cl
jne 0x26eb
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
movq %r12, %r8
movq %rbx, %r9
callq 0x2218
movl %eax, %ecx
movl $0x8, %eax
testb %cl, %cl
jne 0x26eb
movq %r13, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x246a
movzbl %al, %eax
leal (%rax,%rax,8), %eax
jmp 0x26eb
addq %r13, %rcx
decq %rcx
xorl %r8d, %r8d
movq %r8, %rdx
decq %r8
cmpb %al, (%rcx,%rdx)
je 0x269f
movl %r14d, %edi
leal -0x1(%r14), %r9d
leaq (%rdi,%r13), %rdx
incq %rdx
movl $0xfffffffe, %r10d      # imm = 0xFFFFFFFE
subl %r8d, %r10d
incl %r9d
incl %r10d
leaq 0x1(%rdx), %r11
cmpb %al, (%rdx)
movq %r11, %rdx
je 0x26c1
leal 0x1(%r14), %edx
cmpl $0x5, %r10d
jl 0x26fa
addq %r8, %rdx
movl %edx, (%r12)
movl %r9d, (%rbx)
movl $0xa, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %sil, %sil
jne 0x258f
xorl %esi, %esi
movq %rsi, %r8
decq %rsi
cmpb %al, (%rcx,%r8)
je 0x2705
leal -0x1(%r14), %ecx
addq %r13, %rdi
incq %rdi
leal 0x6(%rsi), %r8d
incl %ecx
decl %r8d
leaq 0x1(%rdi), %r9
cmpb %al, (%rdi)
movq %r9, %rdi
je 0x271f
testl %r8d, %r8d
jne 0x258f
addq %rsi, %rdx
movl %edx, (%r12)
movl %ecx, (%rbx)
movl $0x1, %eax
jmp 0x26eb