LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/sid1607[P]avx2-merge-sort/test_sort.cpp
// Function: print_array(int*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void print_array(int *a, const std::string& msg, int size=8) {
  std::cout << msg << std::endl;
  for (int i=0; i<size; i++) {
    std::cout << a[i] <<  ",";
  }
  std::cout << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %r14
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
movq 0x34e6(%rip), %rbx      # 0x5fd0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
testl %ebp, %ebp
jle 0x2b5a
movl %ebp, %r13d
xorl %ebp, %ebp
movq 0x34a1(%rip), %r15      # 0x5fd0
leaq 0x158a(%rip), %r12      # 0x40c0
movl (%r14,%rbp,4), %esi
movq %r15, %rdi
callq 0x21c0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
incq %rbp
cmpq %rbp, %r13
jne 0x2b36
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/sid1607[P]avx2-merge-sort/test_sort.cpp
// Function: print_register(long long vector[4], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void print_register(__m256i a, const std::string& msg) {
  std::cout << msg << std::endl;
  for (int i=0; i<8; i++) {
    std::cout << ((int *) &a)[i] <<  ",";
  }
  std::cout << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
andq $-0x20, %rsp
subq $0x40, %rsp
vmovaps %ymm0, (%rsp)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq 0x341d(%rip), %rbx      # 0x5fd0
movq %rbx, %rdi
vzeroupper
callq 0x2150
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
xorl %r15d, %r15d
leaq 0x14ce(%rip), %r14      # 0x40c0
movl (%rsp,%r15,4), %esi
movq %rbx, %rdi
callq 0x21c0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2150
incq %r15
cmpq $0x8, %r15
jne 0x2bf2
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sid1607[P]avx2-merge-sort/test_sort.cpp
// Function: is_sorted_register(long long vector[4], int*)
bool is_sorted_register(__m256i a, int *prev) {
  for (int i=0; i<8; i++) {
    auto curr = ((int *) &a)[i];
    if (curr < *prev) return false;
    *prev = curr;
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0x40, %rsp
vmovaps %ymm0, (%rsp)
movl (%rsp), %eax
cmpl (%rdi), %eax
jge 0x2d3d
xorl %eax, %eax
jmp 0x2d5f
xorl %esi, %esi
movq %rsi, %rcx
movl %eax, %edx
cmpq $0x7, %rsi
je 0x2d56
movl 0x4(%rsp,%rcx,4), %eax
leaq 0x1(%rcx), %rsi
cmpl %edx, %eax
jge 0x2d3f
movl %edx, (%rdi)
cmpq $0x7, %rcx
setae %al
movq %rbp, %rsp
popq %rbp
vzeroupper
retq
// File: /workspace/github_cpp_makefile_star2_O1/sid1607[P]avx2-merge-sort/test_sort.cpp
// Function: is_sorted_array(int*, int)
bool is_sorted_array(int *out, int len) {
  int prev = out[0];
  for (int i=1; i<len; i++) {
    if (out[i] < prev)
      return false;
    prev = out[i];
  }
  return true;
}

// Assembly:
cmpl $0x2, %esi
setl %al
jl 0x2d9b
movl 0x4(%rdi), %ecx
cmpl (%rdi), %ecx
jl 0x2d9b
movl %esi, %eax
movl $0x2, %esi
movq %rsi, %rdx
cmpq %rsi, %rax
je 0x2d95
movl (%rdi,%rdx,4), %r8d
leaq 0x1(%rdx), %rsi
cmpl %ecx, %r8d
movl %r8d, %ecx
jge 0x2d7d
cmpq %rax, %rdx
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/sid1607[P]avx2-merge-sort/test_sort.cpp
// Function: is_sorted_array(int*, int*, int)
bool is_sorted_array(int *out, int *ref, int len) {
  int prev = out[0];
  for (int i=0; i<len; i++) {
    if (out[i] < prev)
      return false;
    if (out[i] != ref[i])
      return false;
    prev = out[i];
  }
  return true;
}

// Assembly:
testl %edx, %edx
setle %al
jle 0x2dcb
movl %edx, %ecx
movl (%rdi), %r8d
movl $0x1, %edx
cmpl -0x4(%rsi,%rdx,4), %r8d
jne 0x2dcb
cmpq %rcx, %rdx
setae %al
je 0x2dcb
movl (%rdi,%rdx,4), %r9d
incq %rdx
cmpl %r8d, %r9d
movl %r9d, %r8d
jge 0x2dad
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/sid1607[P]avx2-merge-sort/test_sort.cpp
// Function: main
int main(int argc, char *argv[]) {
  int num_iters = 1, pow_2 = 24;
  int start, end;
  srand(time(NULL));
  initialize();

  if (argc==2) {
    pow_2 = atoi(argv[1]);
  } else {
    pow_2 = 24;
  }

  start = 1 << pow_2;
  end = 1 << pow_2;

  for(int i=start; i<=end;i++) {
    for (int j=0; j<num_iters; j++) {
      if(!test_merge_sort(i))
        return 1;
    }
    std::cout << "Passed:(" << i << "," << num_iters << ")" << std::endl;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
xorl %edi, %edi
callq 0x2100
movl %eax, %edi
callq 0x2120
callq 0x235c
movl $0x18, %ecx
cmpl $0x2, %ebp
jne 0x3295
movq 0x8(%rbx), %rdi
callq 0x2180
movl %eax, %ecx
movl $0x1, %ebx
shll %cl, %ebx
movb $0x1, %cl
movl %ecx, %ebp
testb $0x1, %cl
je 0x32b9
movl %ebx, %edi
callq 0x2f1c
xorl %ecx, %ecx
testb %al, %al
jne 0x329e
movl $0x1, %eax
jmp 0x32bb
xorl %eax, %eax
testb $0x1, %bpl
jne 0x334e
movq 0x2d04(%rip), %r14      # 0x5fd0
leaq 0xe0e(%rip), %rsi       # 0x40e1
movl $0x8, %edx
movq %r14, %rdi
callq 0x2150
movq %r14, %rdi
movl %ebx, %esi
callq 0x21c0
movq %rax, %rbx
leaq 0xdcc(%rip), %rsi       # 0x40c0
movl $0x1, %edx
movq %rax, %rdi
callq 0x2150
movq %rbx, %rdi
movl $0x1, %esi
callq 0x21c0
movq %rax, %rbx
leaq 0xe01(%rip), %rsi       # 0x4119
movl $0x1, %edx
movq %rax, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::init()
void Board::init() {
    pieces = new Stone[arraySize*arraySize];
    // Initialize the board to empty
    for (int i = 0; i < arraySize*arraySize; i++)
        pieces[i] = EMPTY;

    // Initialize the edges to -1
    for (int i = 0; i < arraySize; i++) {
        pieces[index(0, i)] = -1;
        pieces[index(arraySize-1, i)] = -1;
        pieces[index(i, 0)] = -1;
        pieces[index(i, arraySize-1)] = -1;
    }

    blackCaptures = 0;
    whiteCaptures = 0;
    zobristKey = 0;
    nextID = 1;
    chainID = new int[arraySize*arraySize];
    for (int i = 0; i < arraySize*arraySize; i++)
        chainID[i] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x93a2(%rip), %ebp      # 0xc18c
movl %ebp, %r15d
imull %r15d, %r15d
leaq (,%r15,4), %rdi
callq 0x2030
movq %rax, %r14
movq %rax, (%rbx)
testl %ebp, %ebp
je 0x2e21
cmpl $0x1, %r15d
adcl $0x0, %r15d
shlq $0x2, %r15
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20f0
movslq 0x9364(%rip), %rdi      # 0xc18c
testq %rdi, %rdi
jle 0x2e65
leal -0x1(%rdi), %eax
imull %edi, %eax
cltq
leaq (%r14,%rax,4), %rax
leaq (,%rdi,4), %rcx
xorl %edx, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r14, %r8
movl %esi, (%r8)
movl %esi, -0x4(%r8,%rdi,4)
movl %esi, (%r14,%rdx,4)
movl %esi, (%rax,%rdx,4)
incq %rdx
addq %rcx, %r8
cmpq %rdx, %rdi
jne 0x2e4b
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl $0x1, 0x18(%rbx)
imull %edi, %edi
shlq $0x2, %rdi
callq 0x2030
movq %rax, 0x20(%rbx)
movl 0x9303(%rip), %edx      # 0xc18c
testl %edx, %edx
je 0x2eae
imull %edx, %edx
cmpl $0x1, %edx
adcl $0x0, %edx
shlq $0x2, %rdx
movq %rax, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x20f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::Board(Board const&)
Board::Board(const Board &other) {
    pieces = new Stone[arraySize*arraySize];
    for (int i = 0; i < arraySize*arraySize; i++) {
        pieces[i] = other.pieces[i];
    }

    blackCaptures = other.blackCaptures;
    whiteCaptures = other.whiteCaptures;
    zobristKey = other.zobristKey;
    nextID = other.nextID;
    chainID = new int[arraySize*arraySize];
    for (int i = 0; i < arraySize*arraySize; i++)
        chainID[i] = other.chainID[i];

    unsigned int numChains = other.chainList.size();
    for (unsigned int i = 0; i < numChains; i++) {
        Chain *node = other.chainList.get(i);
        chainList.add(new Chain(*(node)));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x0, 0x1028(%rdi)
movl 0x92b1(%rip), %ebp      # 0xc18c
movl %ebp, %r15d
imull %r15d, %r15d
leaq (,%r15,4), %rdi
callq 0x2030
movq %rax, (%r14)
testl %ebp, %ebp
je 0x2f13
movq (%rbx), %rcx
cmpl $0x1, %r15d
movl %r15d, %edx
adcl $0x0, %edx
xorl %esi, %esi
movl (%rcx,%rsi,4), %edi
movl %edi, (%rax,%rsi,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x2f05
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r14)
movl 0xc(%rbx), %eax
movl %eax, 0xc(%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r14)
movl %r15d, %edi
shlq $0x2, %rdi
callq 0x2030
movq %rax, 0x20(%r14)
movl 0x9246(%rip), %ecx      # 0xc18c
testl %ecx, %ecx
je 0x2f67
imull %ecx, %ecx
movq 0x20(%rbx), %rdx
cmpl $0x1, %ecx
adcl $0x0, %ecx
xorl %esi, %esi
movl (%rdx,%rsi,4), %edi
movl %edi, (%rax,%rsi,4)
incq %rsi
cmpq %rsi, %rcx
jne 0x2f59
movl 0x1028(%rbx), %ebp
testl %ebp, %ebp
je 0x2fb1
xorl %r13d, %r13d
movslq %r13d, %rax
movq 0x28(%rbx,%rax,8), %r12
movl $0x610, %edi            # imm = 0x610
callq 0x21b0
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x5808
movl 0x1028(%r14), %eax
movq %r15, 0x28(%r14,%rax,8)
incl %eax
movl %eax, 0x1028(%r14)
incl %r13d
cmpl %r13d, %ebp
jne 0x2f74
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x610, %esi            # imm = 0x610
movq %r15, %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::deinit()
void Board::deinit() {
    delete[] pieces;
    delete[] chainID;

    for (unsigned int i = 0; i < chainList.size(); i++)
        delete chainList.get(i);
    chainList.clear();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x2ff2
callq 0x2200
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3000
callq 0x2200
cmpl $0x0, 0x1028(%rbx)
je 0x3037
xorl %ebp, %ebp
movslq %ebp, %rax
movq 0x28(%rbx,%rax,8), %r14
testq %r14, %r14
je 0x302d
movq %r14, %rdi
callq 0x585a
movl $0x610, %esi            # imm = 0x610
movq %r14, %rdi
callq 0x21c0
incl %ebp
cmpl 0x1028(%rbx), %ebp
jb 0x300b
movl $0x0, 0x1028(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::updateLiberty(Chain*, int, int)
void Board::updateLiberty(Chain *node, int x, int y) {
    Stone east = pieces[index(x+1, y)];
    Stone west = pieces[index(x-1, y)];
    Stone north = pieces[index(x, y+1)];
    Stone south = pieces[index(x, y-1)];

    // If the square is empty and not already a liberty of the chain
    if (east == EMPTY && node->findLiberty(coordToMove(x+1, y)) == -1)
        node->addLiberty(coordToMove(x+1, y));
    if (west == EMPTY && node->findLiberty(coordToMove(x-1, y)) == -1)
        node->addLiberty(coordToMove(x-1, y));
    if (north == EMPTY && node->findLiberty(coordToMove(x, y+1)) == -1)
        node->addLiberty(coordToMove(x, y+1));
    if (south == EMPTY && node->findLiberty(coordToMove(x, y-1)) == -1)
        node->addLiberty(coordToMove(x, y-1));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movl %edx, %r14d
movq %rsi, %rbx
movq (%rdi), %rax
movl 0x88e2(%rip), %ecx      # 0xc18c
movl %ecx, %edx
imull %r15d, %edx
leal (%rdx,%r14), %esi
incl %esi
movslq %esi, %rsi
leal -0x1(%rdx,%r14), %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %ebp
leal 0x1(%r15), %r13d
movl %ecx, %edx
imull %r13d, %edx
addl %r14d, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %edx
movl %edx, 0x10(%rsp)
leal -0x1(%r15), %r12d
imull %r12d, %ecx
addl %r14d, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movl %ecx, 0x14(%rsp)
cmpl $0x0, (%rax,%rsi,4)
jne 0x3920
leal 0x1(%r14), %eax
shll $0x8, %eax
orl %r15d, %eax
movzwl %ax, %esi
movq %rbx, %rdi
movl %esi, 0xc(%rsp)
callq 0x586c
cmpl $-0x1, %eax
jne 0x3920
movq %rbx, %rdi
movl 0xc(%rsp), %esi
callq 0x5892
testl %ebp, %ebp
jne 0x394a
leal -0x1(%r14), %eax
shll $0x8, %eax
orl %r15d, %eax
movzwl %ax, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x586c
cmpl $-0x1, %eax
jne 0x394a
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5892
cmpl $0x0, 0x10(%rsp)
jne 0x3977
movl %r14d, %eax
shll $0x8, %eax
orl %eax, %r13d
movzwl %r13w, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x586c
cmpl $-0x1, %eax
jne 0x3977
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5892
cmpl $0x0, 0x14(%rsp)
jne 0x3998
shll $0x8, %r14d
orl %r14d, %r12d
movzwl %r12w, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x586c
cmpl $-0x1, %eax
je 0x39a7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %ebp, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5892
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::mergeChains(Chain*, int, unsigned short)
void Board::mergeChains(Chain *node, int otherID, Move m) {
    // Find the chain to merge into the first chain
    Chain *temp = nullptr;
    int tempIndex = searchChainsByID(temp, otherID);

    // Update the chain id array when merging
    for (int i = 0; i < temp->size; i++) {
        Move idChange = temp->squares[i];
        chainID[index(getX(idChange), getY(idChange))] = node->id;

        node->add(idChange);
    }

    // Remove the move played from the other list of liberties
    temp->removeLiberty(temp->findLiberty(m));
    // And then merge the two lists
    for (int i = 0; i < temp->liberties; i++) {
        // If the liberty is not a repeat
        if (node->findLiberty(temp->libertyList[i]) == -1)
            node->addLiberty(temp->libertyList[i]);
    }

    // Delete the chain "temp" now since it has been fully merged in
    delete temp;
    chainList.removeFast(tempIndex);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x1028(%rdi), %ecx
testl %ecx, %ecx
je 0x39ff
xorl %eax, %eax
movslq %eax, %rsi
movq 0x28(%rbx,%rsi,8), %r15
cmpl %edx, (%r15)
je 0x39fa
incl %eax
cmpl %eax, %ecx
jne 0x39df
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movslq %eax, %r12
jmp 0x3a09
movq $-0x1, %r12
xorl %r15d, %r15d
cmpl $0x0, 0x8(%r15)
jle 0x3a4c
xorl %r13d, %r13d
movzwl 0x10(%r15,%r13,2), %esi
movl (%r14), %eax
movq 0x20(%rbx), %rcx
movl %esi, %edx
movzbl %sil, %edi
imull 0x875f(%rip), %edi      # 0xc18c
shrl $0x8, %edx
addl %edx, %edi
movslq %edi, %rdx
movl %eax, (%rcx,%rdx,4)
movq %r14, %rdi
callq 0x585c
incq %r13
movslq 0x8(%r15), %rax
cmpq %rax, %r13
jl 0x3a13
movzwl %bp, %esi
movq %r15, %rdi
callq 0x586c
movq %r15, %rdi
movl %eax, %esi
callq 0x58a4
cmpl $0x0, 0xc(%r15)
jle 0x3a9e
xorl %r13d, %r13d
movzwl 0x410(%r15,%r13,2), %esi
movq %r14, %rdi
callq 0x586c
cmpl $-0x1, %eax
jne 0x3a92
movzwl 0x410(%r15,%r13,2), %esi
movq %r14, %rdi
callq 0x5892
incq %r13
movslq 0xc(%r15), %rax
cmpq %rax, %r13
jl 0x3a6b
movq %r15, %rdi
callq 0x585a
movl $0x610, %esi            # imm = 0x610
movq %r15, %rdi
callq 0x21c0
movl 0x1028(%rbx), %eax
decl %eax
movq 0x28(%rbx,%rax,8), %rcx
movq %rcx, 0x28(%rbx,%r12,8)
movl %eax, 0x1028(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::isEye(int, unsigned short)
bool Board::isEye(Player p, Move m) {
    if (m == MOVE_PASS)
        return false;
    int x = getX(m);
    int y = getY(m);
    if ((pieces[index(x+1, y)] == p || pieces[index(x+1, y)] == -1)
     && (pieces[index(x-1, y)] == p || pieces[index(x-1, y)] == -1)
     && (pieces[index(x, y+1)] == p || pieces[index(x, y+1)] == -1)
     && (pieces[index(x, y-1)] == p || pieces[index(x, y-1)] == -1))
        return true;
    return false;
}

// Assembly:
cmpl $0x8000, %edx           # imm = 0x8000
je 0x40f4
movzwl %dx, %eax
shrl $0x8, %eax
movzbl %dl, %r8d
movq (%rdi), %rcx
movl 0x811d(%rip), %edx      # 0xc18c
movl %edx, %edi
imull %r8d, %edi
leal (%rdi,%rax), %r9d
incl %r9d
movslq %r9d, %r9
movl (%rcx,%r9,4), %r9d
cmpl %esi, %r9d
setne %r10b
cmpl $-0x1, %r9d
setne %r9b
testb %r9b, %r10b
jne 0x40f4
addl %eax, %edi
decl %edi
movslq %edi, %rdi
movl (%rcx,%rdi,4), %edi
cmpl %esi, %edi
setne %r9b
cmpl $-0x1, %edi
setne %dil
testb %dil, %r9b
jne 0x40f4
leal 0x1(%r8), %edi
imull %edx, %edi
addl %eax, %edi
movslq %edi, %rdi
movl (%rcx,%rdi,4), %edi
cmpl %esi, %edi
setne %r9b
cmpl $-0x1, %edi
setne %dil
testb %dil, %r9b
jne 0x40f4
decl %r8d
imull %r8d, %edx
addl %eax, %edx
movslq %edx, %rax
movl (%rcx,%rax,4), %eax
cmpl %esi, %eax
sete %cl
cmpl $-0x1, %eax
sete %al
orb %cl, %al
movb $0x1, %al
jne 0x40f6
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::getLegalMoves(int)
MoveList Board::getLegalMoves(Player p) {
    MoveList result;

    for (int j = 1; j <= boardSize; j++) {
        for (int i = 1; i <= boardSize; i++) {
            // All empty squares are legal moves
            if (pieces[index(i, j)] == EMPTY)
                result.add(coordToMove(i, j));
        }
    }

    return result;
}

// Assembly:
movq %rdi, %rax
movl $0x0, 0x400(%rdi)
movl 0x807d(%rip), %ecx      # 0xc188
testl %ecx, %ecx
jle 0x417a
pushq %r14
pushq %rbx
movq (%rsi), %rdi
movslq 0x8070(%rip), %rdx      # 0xc18c
incq %rcx
movl %ecx, %esi
leaq (%rdi,%rdx,4), %rdi
addq $0x4, %rdi
shlq $0x2, %rdx
shlq $0x8, %rsi
xorl %r8d, %r8d
movl $0x1, %r9d
movl $0x100, %r10d           # imm = 0x100
movq %rdi, %r11
cmpl $0x0, (%r11)
jne 0x415a
movl %r10d, %ebx
orl %r9d, %ebx
movl %r8d, %r14d
movw %bx, (%rax,%r14,2)
incl %r8d
addq $0x100, %r10            # imm = 0x100
addq $0x4, %r11
cmpq %r10, %rsi
jne 0x4143
incq %r9
addq %rdx, %rdi
cmpq %rcx, %r9
jne 0x413a
popq %rbx
popq %r14
jmp 0x417d
xorl %r8d, %r8d
movl %r8d, 0x400(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::checkChains()
bool Board::checkChains() {
    bool result = false;
    int *temp = new int[arraySize*arraySize];
    int *tempPieces = new int[arraySize*arraySize];
    for (int i = 0; i < arraySize*arraySize; i++)
        temp[i] = chainID[i];
    for (int i = 0; i < arraySize*arraySize; i++)
        tempPieces[i] = pieces[i];

    for (unsigned int j = 0; j < chainList.size(); j++) {
        Chain *node = chainList.get(j);
        for (int i = 0; i < node->size; i++) {
            Move m = node->squares[i];

            if (temp[index(getX(m), getY(m))] == 0 || tempPieces[index(getX(m), getY(m))] == 0) {
                result = true;
                break;
            }

            temp[index(getX(m), getY(m))] = 0;
            tempPieces[index(getX(m), getY(m))] = 0;
        }
    }

    delete[] temp;
    delete[] tempPieces;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movl 0x7ff5(%rip), %ebp      # 0xc18c
movl %ebp, %r12d
imull %r12d, %r12d
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %rbx
movq %r15, %rdi
callq 0x2030
movq %rax, %r15
testl %ebp, %ebp
je 0x41fa
movq 0x20(%r14), %rax
cmpl $0x1, %r12d
movl %r12d, %ecx
adcl $0x0, %ecx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
movl %esi, (%rbx,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x41d0
movq (%r14), %rax
cmpl $0x1, %r12d
adcl $0x0, %r12d
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%r15,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x41eb
movl 0x1028(%r14), %eax
xorl %r12d, %r12d
testl %eax, %eax
je 0x426e
xorl %edx, %edx
xorl %ecx, %ecx
movslq %ecx, %rsi
movq 0x28(%r14,%rsi,8), %rsi
cmpl $0x0, 0x8(%rsi)
jle 0x4265
xorl %edi, %edi
movzwl 0x10(%rsi,%rdi,2), %r8d
movzbl %r8b, %r9d
shrl $0x8, %r8d
imull %ebp, %r9d
addl %r8d, %r9d
movslq %r9d, %r8
cmpl $0x0, (%rbx,%r8,4)
je 0x424f
cmpl $0x0, (%r15,%r8,4)
je 0x424f
movl %r12d, (%rbx,%r8,4)
movl %r12d, (%r15,%r8,4)
movb $0x1, %r8b
jmp 0x4254
xorl %r8d, %r8d
movb $0x1, %dl
testb %r8b, %r8b
je 0x4265
incq %rdi
movslq 0x8(%rsi), %r8
cmpq %r8, %rdi
jl 0x421c
incl %ecx
cmpl %eax, %ecx
jne 0x420c
movl %edx, %r12d
movq %rbx, %rdi
callq 0x2200
movq %r15, %rdi
callq 0x2200
andb $0x1, %r12b
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::isInAtari(unsigned short)
bool Board::isInAtari(Move m) {
    if (m == MOVE_PASS)
        return false;
    int x = getX(m);
    int y = getY(m);
    assert(pieces[index(x, y)] != EMPTY);

    Chain *node = nullptr;
    searchChainsByID(node, chainID[index(x, y)]);
    if (node->liberties == 1)
        return true;

    return false;
}

// Assembly:
cmpl $0x8000, %esi           # imm = 0x8000
jne 0x492b
xorl %eax, %eax
retq
movzwl %si, %eax
movzbl %sil, %ecx
imull 0x7853(%rip), %ecx      # 0xc18c
shrl $0x8, %eax
addl %eax, %ecx
movslq %ecx, %rax
movq 0x20(%rdi), %rdx
movq 0x28(%rdi), %rcx
movl (%rdx,%rax,4), %eax
cmpl %eax, (%rcx)
je 0x4963
movl $0x1, %edx
movslq %edx, %rdx
movq 0x28(%rdi,%rdx,8), %rcx
incl %edx
cmpl %eax, (%rcx)
jne 0x4955
cmpl $0x1, 0xc(%rcx)
sete %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::getPotentialCapture(unsigned short)
Move Board::getPotentialCapture(Move m) {
    if (m == MOVE_PASS)
        return MOVE_PASS;
    int x = getX(m);
    int y = getY(m);
    assert(pieces[index(x, y)] != EMPTY);

    Chain *node = nullptr;
    searchChainsByID(node, chainID[index(x, y)]);
    if (node->liberties == 1)
        return node->libertyList[0];

    return MOVE_PASS;
}

// Assembly:
movw $0x8000, %ax            # imm = 0x8000
cmpl $0x8000, %esi           # imm = 0x8000
je 0x49c7
movl 0x1028(%rdi), %ecx
testl %ecx, %ecx
je 0x49b5
movzwl %si, %edx
shrl $0x8, %edx
movzbl %sil, %esi
movq 0x20(%rdi), %r8
imull 0x77f5(%rip), %esi      # 0xc18c
addl %edx, %esi
movslq %esi, %rdx
movl (%r8,%rdx,4), %edx
xorl %esi, %esi
movslq %esi, %r8
movq 0x28(%rdi,%r8,8), %r8
cmpl %edx, (%r8)
je 0x49b8
incl %esi
cmpl %esi, %ecx
jne 0x49a2
xorl %r8d, %r8d
cmpl $0x1, 0xc(%r8)
jne 0x49c7
movzwl 0x410(%r8), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::prettyPrint()
void Board::prettyPrint() {
    // Since the y axis indexing is inverted
    for (int j = boardSize; j >= 1; j--) {
        if (j >= 10)
            std::cout << j << " ";
        else
            std::cout << " " << j << " ";

        for (int i = 1; i <= boardSize; i++) {
            if (pieces[index(i, j)] == EMPTY)
                std::cout << ". ";
            else if (pieces[index(i, j)] == BLACK)
                std::cout << "B ";
            else
                std::cout << "W ";
        }

        if (j >= 10)
            std::cout << j << " ";
        else
            std::cout << " " << j << " ";
        std::cout << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x6e3a(%rip), %r14d     # 0xc188
testl %r14d, %r14d
jle 0x5472
movq %rdi, %rbx
movq 0x6c67(%rip), %r15      # 0xbfc8
leaq 0x3d95(%rip), %rbp      # 0x90fd
leaq 0x3c98(%rip), %r13      # 0x9007
leaq 0x3c8e(%rip), %r12      # 0x9004
cmpl $0x9, %r14d
jg 0x538c
movl $0x1, %edx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x21f0
movq %r15, %rdi
movq %r14, (%rsp)
movl %r14d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x21f0
cmpl $0x0, 0x6dd6(%rip)      # 0xc188
jle 0x53fe
movslq (%rsp), %rbp
xorl %r14d, %r14d
movq (%rbx), %rax
movslq 0x6dc7(%rip), %rcx      # 0xc18c
imulq %rbp, %rcx
addq %r14, %rcx
movl 0x4(%rax,%rcx,4), %eax
movq %r13, %rsi
cmpl $0x1, %eax
je 0x53df
leaq 0x3c2b(%rip), %rsi      # 0x900a
testl %eax, %eax
cmoveq %r12, %rsi
movl $0x2, %edx
movq %r15, %rdi
callq 0x21f0
incq %r14
cmpl 0x6d8c(%rip), %r14d     # 0xc188
jl 0x53bb
movq (%rsp), %r14
cmpl $0x9, %r14d
leaq 0x3cf0(%rip), %rbp      # 0x90fd
jg 0x541f
movl $0x1, %edx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x21f0
movq %r15, %rdi
movl %r14d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x21f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
leal -0x1(%r14), %eax
cmpl $0x1, %r14d
movl %eax, %r14d
jg 0x5376
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: Board::errorPrint()
void Board::errorPrint() {
    // Since the y axis indexing is inverted
    for (int j = boardSize; j >= 1; j--) {
        if (j >= 10)
            std::cerr << j << " ";
        else
            std::cerr << " " << j << " ";

        for (int i = 1; i <= boardSize; i++) {
            if (pieces[index(i, j)] == EMPTY)
                std::cerr << ". ";
            else if (pieces[index(i, j)] == BLACK)
                std::cerr << "B ";
            else
                std::cerr << "W ";
        }

        if (j >= 10)
            std::cerr << j << " ";
        else
            std::cerr << " " << j << " ";
        std::cerr << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x6cf4(%rip), %r14d     # 0xc188
testl %r14d, %r14d
jle 0x55b8
movq %rdi, %rbx
movq 0x6b49(%rip), %r15      # 0xbff0
leaq 0x3c4f(%rip), %rbp      # 0x90fd
leaq 0x3b52(%rip), %r13      # 0x9007
leaq 0x3b48(%rip), %r12      # 0x9004
cmpl $0x9, %r14d
jg 0x54d2
movl $0x1, %edx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x21f0
movq %r15, %rdi
movq %r14, (%rsp)
movl %r14d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x21f0
cmpl $0x0, 0x6c90(%rip)      # 0xc188
jle 0x5544
movslq (%rsp), %rbp
xorl %r14d, %r14d
movq (%rbx), %rax
movslq 0x6c81(%rip), %rcx      # 0xc18c
imulq %rbp, %rcx
addq %r14, %rcx
movl 0x4(%rax,%rcx,4), %eax
movq %r13, %rsi
cmpl $0x1, %eax
je 0x5525
leaq 0x3ae5(%rip), %rsi      # 0x900a
testl %eax, %eax
cmoveq %r12, %rsi
movl $0x2, %edx
movq %r15, %rdi
callq 0x21f0
incq %r14
cmpl 0x6c46(%rip), %r14d     # 0xc188
jl 0x5501
movq (%rsp), %r14
cmpl $0x9, %r14d
leaq 0x3baa(%rip), %rbp      # 0x90fd
jg 0x5565
movl $0x1, %edx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x21f0
movq %r15, %rdi
movl %r14d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x21f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
leal -0x1(%r14), %eax
cmpl $0x1, %r14d
movl %eax, %r14d
jg 0x54bc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/board.cpp
// Function: int Board::doCaptures<false>(int, unsigned short)
int Board::doCaptures(Player victim, Move seed) {
    if (pieces[index(getX(seed), getY(seed))] != victim)
        return 0;

    Stone *visited = new Stone[arraySize*arraySize];
    for (int i = 0; i < arraySize*arraySize; i++) {
        visited[i] = 0;
    }
    MoveList captured;

    if (isSurrounded(victim, EMPTY, getX(seed), getY(seed), visited, captured)) {
        if (updateBoard) {
            for (unsigned int i = 0; i < captured.size(); i++) {
                Move m = captured.get(i);
                pieces[index(getX(m), getY(m))] = EMPTY;
                zobristKey ^= zobristTable[zobristIndex(victim, getX(m), getY(m))];
            }

            // Record how many pieces were captured for scoring purposes
            if (victim == BLACK)
                whiteCaptures += captured.size();
            else
                blackCaptures += captured.size();
        }
    }

    delete[] visited;
    return captured.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movl %edx, %r15d
movq (%rdi), %rcx
movzbl %r15b, %ebp
shrl $0x8, %r15d
movl 0x6b26(%rip), %r12d     # 0xc18c
movl %r12d, %eax
imull %ebp, %eax
addl %r15d, %eax
movslq %eax, %rdx
xorl %eax, %eax
cmpl %esi, (%rcx,%rdx,4)
jne 0x56f3
movl %esi, %ebx
movq %rdi, %r14
movl %r12d, %r13d
imull %r13d, %r13d
leaq (,%r13,4), %rdi
callq 0x2030
testl %r12d, %r12d
je 0x56b6
cmpl $0x1, %r13d
adcl $0x0, %r13d
shlq $0x2, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rax, %r12
callq 0x20f0
movq %r12, %rax
leaq 0x14(%rsp), %r12
movl $0x0, 0x400(%r12)
movq %r12, (%rsp)
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movq %rax, %r9
movq %rax, %rbx
callq 0x428e
movq %rbx, %rdi
callq 0x2200
movl 0x400(%r12), %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/chain.cpp
// Function: Chain::Chain(Chain const&)
Chain::Chain(const Chain &other) {
	id = other.id;
	color = other.color;
	size = other.size;
	liberties = other.liberties;
	for (int i = 0; i < size; i++)
		squares[i] = other.squares[i];
	for (int i = 0; i < liberties; i++)
		libertyList[i] = other.libertyList[i];
}

// Assembly:
movl (%rsi), %eax
movl %eax, (%rdi)
movl 0x4(%rsi), %eax
movl %eax, 0x4(%rdi)
movslq 0x8(%rsi), %rcx
movl %ecx, 0x8(%rdi)
movl 0xc(%rsi), %eax
movl %eax, 0xc(%rdi)
testq %rcx, %rcx
jle 0x583a
xorl %edx, %edx
movzwl 0x10(%rsi,%rdx,2), %r8d
movw %r8w, 0x10(%rdi,%rdx,2)
incq %rdx
cmpq %rdx, %rcx
jne 0x5826
testl %eax, %eax
jle 0x5858
xorl %ecx, %ecx
movzwl 0x410(%rsi,%rcx,2), %edx
movw %dx, 0x410(%rdi,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x5840
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/chain.cpp
// Function: Chain::findLiberty(unsigned short)
int Chain::findLiberty(Move m) {
	int index = -1;
	for (int i = 0; i < liberties; i++) {
		if (libertyList[i] == m) {
			index = i;
			break;
		}
	}
	return index;
}

// Assembly:
movslq 0xc(%rdi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
jle 0x588e
xorl %edx, %edx
cmpw %si, 0x410(%rdi,%rdx,2)
je 0x588f
incq %rdx
cmpq %rdx, %rcx
jne 0x587c
retq
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/mctree.cpp
// Function: MCTree::findLeaf(int&, Board&, int&)
MCNode *MCTree::findLeaf(Player &p, Board &b, int &depth) {
    MCNode *node = root;

    // Keep going until we either decide to split another child, or find a leaf
    while (node->size > 0) {
        std::uniform_int_distribution<int> distribution(0, b.getLegalMoves(p).size() / 2);
        // Create a new child for this node with some probability
        if (node != root && distribution(mc_rng) > node->size)
            break;

        // Otherwise, choose a child to follow
        double bestScore = 0.0;
        int bestIndex = 0;
        double logD = std::log(node->denominator);
        for (int i = 0; i < node->size; i++) {
            double score = (double) node->children[i]->numerator / (double) node->children[i]->denominator
                + std::sqrt(logD / (double) node->children[i]->denominator);
            if (score > bestScore) {
                bestScore = score;
                bestIndex = i;
            }
        }

        node = node->children[bestIndex];
        b.doMove(p, node->m);
        p = otherPlayer(p);
        depth++;
    }

    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %rcx, 0x18(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rbx
leaq 0x44(%rsp), %r14
movq %rdx, 0x10(%rsp)
cmpw $0x0, 0x12(%rbx)
jle 0x5a48
movl (%r12), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x40f8
movl 0x444(%rsp), %eax
shrl %eax
movl $0x0, 0x8(%rsp)
movl %eax, 0xc(%rsp)
cmpq (%r13), %rbx
je 0x5948
leaq 0x8(%rsp), %rdi
leaq 0x8faf(%rip), %rsi      # 0xe8e0
movq %rdi, %rdx
callq 0x5a8a
movswl 0x12(%rbx), %ecx
cmpl %ecx, %eax
jle 0x5948
xorl %eax, %eax
jmp 0x5a40
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rbx), %xmm0
callq 0x2160
cmpw $0x0, 0x12(%rbx)
jle 0x5a10
movapd %xmm0, %xmm1
movq %r13, %r15
movq %r14, %r13
xorpd %xmm2, %xmm2
xorl %ebp, %ebp
xorl %r14d, %r14d
movsd %xmm0, 0x20(%rsp)
movq 0x20(%rbx), %rax
movq (%rax,%rbp,8), %rax
xorps %xmm3, %xmm3
cvtsi2sdl (%rax), %xmm3
xorps %xmm4, %xmm4
cvtsi2sdl 0x4(%rax), %xmm4
movapd %xmm1, %xmm0
divsd %xmm4, %xmm0
ucomisd 0x3670(%rip), %xmm0     # 0x9010
jb 0x59a8
sqrtsd %xmm0, %xmm0
jmp 0x59d7
movsd %xmm2, 0x38(%rsp)
movsd %xmm3, 0x30(%rsp)
movsd %xmm4, 0x28(%rsp)
callq 0x2150
movsd 0x28(%rsp), %xmm4
movsd 0x30(%rsp), %xmm3
movsd 0x38(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
divsd %xmm4, %xmm3
addsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
maxsd %xmm2, %xmm3
cmoval %ebp, %r14d
incq %rbp
movswq 0x12(%rbx), %rax
movapd %xmm3, %xmm2
cmpq %rax, %rbp
jl 0x5979
movslq %r14d, %rax
movq %r13, %r14
movq %r15, %r13
movq 0x10(%rsp), %r15
jmp 0x5a12
xorl %eax, %eax
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rbx
movl (%r12), %esi
movzwl 0x10(%rbx), %edx
movq %r15, %rdi
callq 0x3046
movl $0x3, %eax
subl (%r12), %eax
movl %eax, (%r12)
movq 0x18(%rsp), %rax
incl (%rax)
movb $0x1, %al
testb %al, %al
jne 0x58f0
movq %rbx, %rax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/search.cpp
// Function: scoreGame(int, Board&, float&, float&)
void scoreGame(Player p, Board &b, float &myScore, float &oppScore) {
    int whiteTerritory = 0, blackTerritory = 0;
    b.countTerritory(whiteTerritory, blackTerritory);

    myScore = b.getCapturedStones(p)
        + ((p == BLACK) ? blackTerritory : whiteTerritory);
    oppScore = b.getCapturedStones(otherPlayer(p))
        + ((p == BLACK) ? whiteTerritory : blackTerritory);

    if (p == WHITE)
        myScore += komi;
    else
        oppScore += komi;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %ebp
xorl %eax, %eax
leaq 0x4(%rsp), %r13
movl %eax, (%r13)
movq %rsp, %r15
movl %eax, (%r15)
movq %rsi, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x4420
movq %r12, %rdi
movl %ebp, %esi
callq 0x530a
cmpl $0x1, %ebp
movq %r13, %rcx
cmoveq %r15, %rcx
cmoveq %r13, %r15
addl (%rcx), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, (%r14)
movl $0x3, %esi
subl %ebp, %esi
movq %r12, %rdi
callq 0x530a
addl (%r15), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, (%rbx)
cmpl $0x2, %ebp
jne 0x698b
movss (%r14), %xmm0
cmoveq %r14, %rbx
addss 0x5801(%rip), %xmm0     # 0xc198
movss %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/./mctree.h
// Function: MCNode::cleanup()
void cleanup() {
        for (int i = 0; i < size; i++) {
            children[i]->cleanup();
            delete children[i];
        }
        delete[] children;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x12(%rdi)
jle 0x6a8e
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x6a4c
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x6a81
movl $0x28, %esi
callq 0x21c0
incq %r14
movswq 0x12(%rbx), %rax
cmpq %rax, %r14
jl 0x6a5d
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x6aa3
popq %rbx
popq %r14
jmp 0x2200
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/gtp.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
vector<string> split(const string &s, char d) {
    vector<string> v;
    stringstream ss(s);
    string item;
    while (getline(ss, item, d)) {
        v.push_back(item);
    }
    return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %edx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x28(%rsp), %rdi
movl $0x18, %edx
callq 0x2270
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movsbl %bpl, %ebp
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x22e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x897e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8b3c
jmp 0x8956
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8995
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x360c(%rip), %rsi      # 0xbfa8
leaq 0x28(%rsp), %rdi
callq 0x2130
leaq 0xa8(%rsp), %rdi
callq 0x2090
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x8a03
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x89e5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x35bc(%rip), %rsi      # 0xbfa8
leaq 0x28(%rsp), %rdi
callq 0x2130
leaq 0xa8(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x8ae0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/jeffreyan11[P]go-engine/gtp.cpp
// Function: stringToColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Player stringToColor(string colorString) {
    if (colorString == "black" || colorString == "b" || colorString == "B")
        return BLACK;
    else if (colorString == "white" || colorString == "w" || colorString == "W")
        return WHITE;
    else
        return EMPTY;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x790(%rip), %rsi       # 0x91b0
callq 0x2080
movl $0x1, %ebp
testl %eax, %eax
je 0x8a98
leaq 0x781(%rip), %rsi       # 0x91b6
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
je 0x8a98
leaq 0x6aa(%rip), %rsi       # 0x90f2
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
je 0x8a98
leaq 0x75d(%rip), %rsi       # 0x91b8
movq %rbx, %rdi
callq 0x2080
movl $0x2, %ebp
testl %eax, %eax
je 0x8a98
leaq 0x74b(%rip), %rsi       # 0x91be
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
je 0x8a98
leaq 0x66e(%rip), %rsi       # 0x90f4
movq %rbx, %rdi
callq 0x2080
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
addl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/willprice[P]parallel-cpp-workshop/map.cpp
// Function: main
int main(int argc, char **argv)
{
    auto a = std::vector<int>( { 1, 2, 3, 4, 5 } );
    auto b = std::vector<int>( { 6, 7, 8, 9, 10 } );

    print_vector(map_fn(sum, a, b));
    print_vector(map_fn(difference, a, b));
    print_vector(map_fn(multiply, a, b));

    return 0;
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movups 0xd8d(%rip), %xmm0      # 0x2004
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
movl $0x5, 0x10(%rsi)
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rbx
movl $0x5, %edx
movq %rbx, %rcx
callq 0x1414
movups 0xd74(%rip), %xmm0      # 0x2018
movaps %xmm0, (%rbx)
movl $0xa, 0x10(%rbx)
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x5, %edx
callq 0x1414
leaq -0x72(%rip), %rsi       # 0x125c
leaq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x1503
leaq 0x10(%rsp), %rdi
callq 0x1459
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1303
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
leaq -0xa4(%rip), %rsi       # 0x1266
leaq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x1503
leaq 0x10(%rsp), %rdi
callq 0x1459
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x133f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
leaq -0xe6(%rip), %rsi       # 0x1260
leaq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x1503
leaq 0x10(%rsp), %rdi
callq 0x1459
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x137b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1392
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x13a9
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq
jmp 0x13b9
jmp 0x13d5
jmp 0x13b9
jmp 0x13d5
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13d8
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
jmp 0x13d8
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x13f4
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
jmp 0x13f4
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x140b
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1110
nop
// File: /workspace/github_cpp_makefile_star2_O1/willprice[P]parallel-cpp-workshop/map.cpp
// Function: void print_vector<int>(std::vector<int, std::allocator<int>> const&)
void print_vector(const std::vector<T> &values)
{
    std::cout << "[";

    for (const T &value : values)
    {
        std::cout << " " << value;
    }

    std::cout << " ]" << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x2b6c(%rip), %rbx      # 0x3fd8
leaq 0xbea(%rip), %rsi       # 0x205d
movl $0x1, %edx
movq %rbx, %rdi
callq 0x10d0
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq %r13, %r12
je 0x14bf
movq 0x2b45(%rip), %r14      # 0x3fd8
leaq 0xbc5(%rip), %r15       # 0x205f
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x10d0
movl (%r12), %esi
movq %r14, %rdi
callq 0x1100
addq $0x4, %r12
cmpq %r13, %r12
jne 0x149a
leaq 0xb9b(%rip), %rsi       # 0x2061
movl $0x2, %edx
movq %rbx, %rdi
callq 0x10d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1070
// File: /workspace/github_cpp_makefile_star2_O1/willprice[P]parallel-cpp-workshop/map.cpp
// Function: auto map_fn<int (*)(int, int), int>(int (*)(int, int), std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
auto map_fn(Fn fn, std::vector<T> &xs, std::vector<T> &ys)
{
    int len = std::min(xs.size(), ys.size());
    auto result = std::vector<T>(len);

    for (int i = 0; i < len; i++) {
      result[i] = fn(xs[i], ys[i]);
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdx), %rax
subq (%rdx), %rax
sarq $0x2, %rax
movq 0x8(%rcx), %rbp
subq (%rcx), %rbp
sarq $0x2, %rbp
cmpq %rax, %rbp
cmovaeq %rax, %rbp
movslq %ebp, %r13
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r13, %rsi
callq 0x15c4
testl %r13d, %r13d
jle 0x157f
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r15), %rax
movl (%rax,%r13,4), %edi
movq (%r14), %rax
movl (%rax,%r13,4), %esi
callq *%r12
movq 0x10(%rsp), %rcx
movl %eax, (%rcx,%r13,4)
incq %r13
cmpq %r13, %rbp
jne 0x155d
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x15bc
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1110
// File: /workspace/github_cpp_makefile_star2_O1/kiven-li[P]xbytes/main.cpp
// Function: main
int main(int argc, char *argv[])
{
	if(argc < 2)
	{
		std::cout << "x-bytes: need rule file name." << std::endl;
		return 1;
	}

    xbytes::xbytes x;
    x.make_parser(argv[1]);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x6d8, %rsp            # imm = 0x6D8
cmpl $0x1, %edi
jg 0x3696
movq 0xd984(%rip), %rbx      # 0x10fd8
leaq 0x99a9(%rip), %rsi      # 0xd004
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movl $0x1, %eax
jmp 0x36ed
movq %rsi, %rbx
leaq -0x6e0(%rbp), %rdi
callq 0x3804
movq 0x8(%rbx), %rsi
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x372c
leaq -0x6e0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3ffa
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36df
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x3260
leaq -0x6e0(%rbp), %rdi
callq 0x3b8c
xorl %eax, %eax
addq $0x6d8, %rsp            # imm = 0x6D8
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3718
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x3260
jmp 0x3718
movq %rax, %rbx
leaq -0x6e0(%rbp), %rdi
callq 0x3b8c
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O1/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::error_on_line(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void xbytes::error_on_line(const char* line, const string& error, int space)
{
	std::cout << "ERROR:" << std::endl;
	std::cout << "  line: " << line_count+1 << std::endl;
	std::cout << "  info: Don't parse program file, There is an error:[[" << std::endl;
	std::cout << line << std::endl;
	for(int i = 0; i < space; ++i)
	{
		std::cout << ' ';
	}
	std::cout << "^" << std::endl;
	std::cout << "  " << error << "]]" << std::endl;

	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq 0xc2e1(%rip), %r15      # 0x10fd8
leaq 0x888d(%rip), %rsi      # 0xd58b
movl $0x6, %edx
movq %r15, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
leaq 0x8859(%rip), %rsi      # 0xd592
movl $0x8, %edx
movq %r15, %rdi
callq 0x32b0
movl 0x60c(%r13), %esi
incl %esi
movq %r15, %rdi
callq 0x33b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
leaq 0x8813(%rip), %rsi      # 0xd59b
movl $0x36, %edx
movq %r15, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
testq %r12, %r12
jne 0x4ddb
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x3390
jmp 0x4df5
movq %r12, %rdi
callq 0x30f0
movq 0xc1ee(%rip), %rdi      # 0x10fd8
movq %r12, %rsi
movq %rax, %rdx
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
testl %r14d, %r14d
jle 0x4e45
movq 0xc1b0(%rip), %r15      # 0x10fd8
leaq -0x29(%rbp), %r12
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x32b0
decl %r14d
jne 0x4e2c
movq 0xc18c(%rip), %r14      # 0x10fd8
leaq 0x877f(%rip), %rsi      # 0xd5d2
movq %r14, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3100
leaq 0x876a(%rip), %rsi      # 0xd5d4
movq %r14, %rdi
callq 0x3240
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3210
leaq 0x8753(%rip), %rsi      # 0xd5d7
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3100
movl $0x1, %edi
callq 0x32c0