LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/emilisb[P]OOP-4/src/vector.h
// Function: vector<TestObject, std::allocator<TestObject>>::erase(TestObject const*, TestObject const*)
iterator erase(const_iterator first, const_iterator last) {
        const difference_type startIndex = first - begin();
        const difference_type endIndex = last - begin();
        
        for (difference_type i = 0; i < endIndex - startIndex; i++) {
            _allocator.destroy(&_data[startIndex + i]);
            _allocator.construct(&_data[startIndex + i], _data[endIndex + i]);
        }
        
        _size -= endIndex - startIndex;
        iterator it = &_data[startIndex];
        
        return it;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
subq %rax, %rbx
movq %rbx, %r13
sarq $0x5, %r13
subq %rax, %r15
movq %r15, %r12
sarq $0x5, %r12
subq %r13, %r12
jle 0x2b52
shlq $0x5, %r13
addq $0x8, %r15
movq %r12, %rbp
movq 0x10(%r14), %rdi
addq %r13, %rdi
callq 0x2bca
movq 0x10(%r14), %rax
leaq (%rax,%r13), %rdi
leaq (%rax,%r13), %rcx
addq $0x10, %rcx
movq %rcx, -0x10(%rcx)
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
addq %rsi, %rdx
callq 0x2ca6
addq $0x20, %r13
addq $0x20, %r15
decq %rbp
jne 0x2b10
movq 0x10(%r14), %rax
subq %r12, (%r14)
addq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/emilisb[P]OOP-4/src/vector.h
// Function: vector<TestObject, std::allocator<TestObject>>::~vector()
~vector() {
        // Make sure our data is not nullptr (used in unit tests to prevent double deconstruction)
        if (_data != nullptr) {
            for (size_type i = 0; i < size(); i++) {
                _allocator.destroy(&_data[i]);
            }
            _allocator.deallocate(_data, capacity());
            _data = nullptr;
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x2c94
cmpq $0x0, (%rbx)
je 0x2c7f
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
addq %r14, %rdi
callq 0x2bca
incq %r15
addq $0x20, %r14
cmpq (%rbx), %r15
jb 0x2c63
movq 0x10(%rbx), %rdi
movq 0x8(%rbx), %rsi
shlq $0x5, %rsi
callq 0x2140
movq $0x0, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/emilisb[P]OOP-4/src/vector.h
// Function: vector<TestObject, std::allocator<TestObject>>::reallocate(unsigned long)
void reallocate(size_type minSize) {
        const size_type newCapacity = calculateGrowth(minSize);

        T* newData = _allocator.allocate(newCapacity);
        for (size_type i = 0; i < _size; i++) {
            _allocator.construct(&newData[i], std::move(_data[i]));
            _allocator.destroy(&_data[i]);
        }
        _allocator.deallocate(_data, capacity());

        _data = newData;
        _capacity = newCapacity;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq %rax, %rcx
shrq %rcx
addq %rax, %rcx
jb 0x3049
movq %rax, %xmm0
punpckldq 0x1019(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1021(%rip), %xmm0     # 0x4030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x101d(%rip), %xmm1     # 0x4040
cvttsd2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1011(%rip), %xmm1     # 0x4048
cvttsd2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
cmpq %rbx, %rdx
cmovaq %rdx, %rbx
leaq 0x18(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2f2a
movq %rax, %r15
cmpq $0x0, (%r14)
je 0x30a3
xorl %r12d, %r12d
xorl %r13d, %r13d
leaq (%r15,%r12), %rdi
movq 0x10(%r14), %rax
leaq (%r15,%r12), %rcx
addq $0x10, %rcx
movq %rcx, (%r15,%r12)
movq (%rax,%r12), %rsi
movq 0x8(%rax,%r12), %rdx
addq %rsi, %rdx
callq 0x2ca6
movq 0x10(%r14), %rdi
addq %r12, %rdi
callq 0x2bca
incq %r13
addq $0x20, %r12
cmpq (%r14), %r13
jb 0x3066
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdi
shlq $0x5, %rsi
callq 0x2140
movq %r15, 0x10(%r14)
movq %rbx, 0x8(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Albuso0[P]support/support.cpp
// Function: Support::getCoeff(int) const
double Support::getCoeff( int N ) const
{
    if ( N == 0 ) return 0;
    if ( N > L ) return 1;

    double A = ( Ratio + n*pmin ) / ( Ratio - n*pmin );
    ChebMore cheb(L, 1, -A); // polynomial of cos L arccos(t-A)
    std::vector<double> a = cheb.expand(); // Expand: cos L arccos(x-A)=sum_i a[i]*x^i
    double amp = cheb.evaluate(0); // cos L arccos(-A)

    double result = -a[N]/amp;
    double s = 2 / ( Ratio - n * pmin );
    for ( int i = 1; i <= N; ++i )
        result *= i * s;

    return (1+result);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
testl %esi, %esi
je 0x2512
movl %esi, %ebx
movq %rdi, %r14
movl 0x10(%rdi), %eax
cmpl %esi, %eax
jge 0x251b
movsd 0x1afb(%rip), %xmm4     # 0x4008
jmp 0x2617
xorpd %xmm4, %xmm4
jmp 0x2617
cvtsi2sdl 0x20(%r14), %xmm0
movsd 0x18(%r14), %xmm1
mulsd 0x8(%r14), %xmm0
movapd %xmm0, %xmm2
addsd %xmm1, %xmm2
subsd %xmm0, %xmm1
xorpd 0x1aef(%rip), %xmm2     # 0x4030
divsd %xmm1, %xmm2
leaq 0x484c(%rip), %rcx      # 0x6d98
leaq 0x30(%rsp), %r15
movq %rcx, (%r15)
movl %eax, 0x8(%r15)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x10(%r15)
movsd %xmm2, 0x18(%r15)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x3548
xorpd %xmm0, %xmm0
movq %r15, %rdi
callq 0x3698
movslq %ebx, %rax
movq 0x8(%rsp), %rdi
movsd (%rdi,%rax,8), %xmm4
xorpd 0x1a96(%rip), %xmm4     # 0x4030
divsd %xmm0, %xmm4
testl %ebx, %ebx
jle 0x25f6
xorps %xmm0, %xmm0
cvtsi2sdl 0x20(%r14), %xmm0
movsd 0x18(%r14), %xmm1
mulsd 0x8(%r14), %xmm0
subsd %xmm0, %xmm1
movsd 0x1a4d(%rip), %xmm0     # 0x4010
divsd %xmm1, %xmm0
movsd 0x1a39(%rip), %xmm1     # 0x4008
movapd %xmm1, %xmm2
movapd %xmm0, %xmm3
mulsd %xmm2, %xmm3
mulsd %xmm3, %xmm4
addsd %xmm1, %xmm2
decl %ebx
jne 0x25d3
addsd 0x1a19(%rip), %xmm4     # 0x4008
testq %rdi, %rdi
jne 0x25fe
jmp 0x2617
addsd 0x1a0a(%rip), %xmm4     # 0x4008
movapd %xmm4, 0x20(%rsp)
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movapd 0x20(%rsp), %xmm4
movapd %xmm4, %xmm0
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x263f
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O3/Albuso0[P]support/support.cpp
// Function: Support::estimate_CL1() const
double Support::estimate_CL1() const // for small coefficient of variation
{
    double N1 = estimate_TG();
    double C = coverage_TG();

    double sum = 0.0;
    for ( const auto & pair : fin )
        sum += pair.first*( pair.first-1 )*pair.second;
    double gamma_sq = std::max( 1.0*estimate_TG()*sum/n/(n-1) - 1 , 0.0 );
    return N1 + n*(1-C)/C*gamma_sq;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x26a6
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
cmpq %rdx, %rcx
je 0x284b
movq %rcx, %rax
cmpl $0x1, (%rax)
je 0x2854
addq $0x8, %rax
cmpq %rdx, %rax
jne 0x2837
xorpd %xmm2, %xmm2
jmp 0x2859
movl 0x20(%rbx), %eax
xorpd %xmm2, %xmm2
jmp 0x2887
cvtsi2sdl 0x4(%rax), %xmm2
movl 0x20(%rbx), %eax
cmpq %rdx, %rcx
je 0x2887
xorpd %xmm3, %xmm3
movl (%rcx), %esi
leal -0x1(%rsi), %edi
imull %esi, %edi
imull 0x4(%rcx), %edi
xorps %xmm1, %xmm1
cvtsi2sd %edi, %xmm1
addsd %xmm1, %xmm3
addq $0x8, %rcx
cmpq %rdx, %rcx
jne 0x2865
jmp 0x288b
xorpd %xmm3, %xmm3
cvtsi2sd %eax, %xmm4
divsd %xmm4, %xmm2
movsd 0x176d(%rip), %xmm1     # 0x4008
movapd %xmm1, %xmm5
subsd %xmm2, %xmm5
mulsd %xmm0, %xmm3
decl %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
divsd %xmm4, %xmm3
divsd %xmm2, %xmm3
addsd 0x1758(%rip), %xmm3     # 0x4018
xorpd %xmm2, %xmm2
maxsd %xmm3, %xmm2
subsd %xmm5, %xmm1
mulsd %xmm4, %xmm1
divsd %xmm5, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Albuso0[P]support/support.cpp
// Function: Support::estimate_CL2() const
double Support::estimate_CL2() const // for large coefficient of variation
{
    double N1 = estimate_TG();
    double C = coverage_TG();
    
    double sum = 0.0;
    for ( const auto & pair : fin )
        sum += pair.first*( pair.first-1 )*pair.second;
    double gamma_sq = std::max( 1.0*estimate_TG()*sum/n/(n-1) - 1 , 0.0 );
    double gamma_sq2 = std::max( gamma_sq*( 1 + n*(1-C)*sum/n/(n-1)/C ), 0.0 );
	
    return N1 + n*(1-C)/C*gamma_sq2;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x26a6
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
cmpq %rdx, %rcx
je 0x290f
movq %rcx, %rax
cmpl $0x1, (%rax)
je 0x2918
addq $0x8, %rax
cmpq %rdx, %rax
jne 0x28fb
xorpd %xmm1, %xmm1
jmp 0x291d
movl 0x20(%rbx), %eax
xorpd %xmm1, %xmm1
jmp 0x294b
cvtsi2sdl 0x4(%rax), %xmm1
movl 0x20(%rbx), %eax
cmpq %rdx, %rcx
je 0x294b
xorpd %xmm2, %xmm2
movl (%rcx), %esi
leal -0x1(%rsi), %edi
imull %esi, %edi
imull 0x4(%rcx), %edi
xorps %xmm3, %xmm3
cvtsi2sd %edi, %xmm3
addsd %xmm3, %xmm2
addq $0x8, %rcx
cmpq %rdx, %rcx
jne 0x2929
jmp 0x294f
xorpd %xmm2, %xmm2
cvtsi2sd %eax, %xmm4
divsd %xmm4, %xmm1
movsd 0x16a9(%rip), %xmm5     # 0x4008
movapd %xmm5, %xmm3
subsd %xmm1, %xmm3
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
divsd %xmm4, %xmm1
decl %eax
cvtsi2sd %eax, %xmm6
divsd %xmm6, %xmm1
addsd 0x1693(%rip), %xmm1     # 0x4018
xorpd %xmm7, %xmm7
xorpd %xmm8, %xmm8
maxsd %xmm1, %xmm8
movapd %xmm5, %xmm1
subsd %xmm3, %xmm1
mulsd %xmm4, %xmm1
mulsd %xmm1, %xmm2
divsd %xmm4, %xmm2
divsd %xmm6, %xmm2
divsd %xmm3, %xmm2
addsd %xmm5, %xmm2
mulsd %xmm8, %xmm2
maxsd %xmm2, %xmm7
divsd %xmm3, %xmm1
mulsd %xmm7, %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Albuso0[P]support/support.cpp
// Function: Support::setFin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Support::setFin(const std::string filename) 
{
    fin.clear();
    n = 0;
    std::ifstream infile;
    infile.open( filename.c_str() );
    int freq, cnt;
    while ( (infile>>freq).good() )
    {
        infile >> cnt;
        fin.push_back( std::make_pair( freq, cnt ) );
        n += (freq * cnt);
    }
    infile.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpq %rax, 0x30(%rdi)
je 0x2a75
movq %rax, 0x30(%rbx)
movl $0x0, 0x20(%rbx)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x21b0
movq (%r14), %rsi
movq %r15, %rdi
movl $0x8, %edx
callq 0x20e0
leaq 0x28(%rbx), %r14
leaq 0x10(%rsp), %r15
leaq 0x4(%rsp), %r12
movq %rsp, %r13
leaq 0x8(%rsp), %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x20d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
cmpl $0x0, 0x20(%rax,%rcx)
jne 0x2afe
movq %r15, %rdi
movq %r13, %rsi
callq 0x20d0
movl 0x4(%rsp), %eax
movl (%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x8(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x2f88
movl (%rsp), %eax
imull 0x4(%rsp), %eax
addl %eax, 0x20(%rbx)
jmp 0x2aaf
leaq 0x10(%rsp), %rdi
callq 0x2050
leaq 0x10(%rsp), %rdi
callq 0x2060
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b2a
jmp 0x2b2a
jmp 0x2b2a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O3/Albuso0[P]support/support.cpp
// Function: Support::setHist(std::vector<unsigned int, std::allocator<unsigned int>> const&)
void Support::setHist( const std::vector<unsigned> &hist )
{
    fin.clear();
    n = 0;
    
    std::map<int, int> fin_map;
    for ( const auto & freq : hist )
    {
        auto iter = fin_map.find( freq );
        if ( iter == fin_map.end() )
            fin_map.insert( std::make_pair( freq,1 ) );
        else
            ++(iter->second);
    }
    
    for ( auto it = fin_map.begin(); it != fin_map.end(); ++it )
    {
        int freq = it->first, cnt = it->second;
        fin.push_back( std::make_pair( freq, cnt ) );
        n += (freq * cnt);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpq %rax, 0x30(%rdi)
je 0x2bfd
movq %rax, 0x30(%rbx)
xorl %eax, %eax
movl %eax, 0x20(%rbx)
leaq 0x20(%rsp), %r13
movl %eax, (%r13)
movq %rax, 0x8(%r13)
movq %r13, 0x10(%r13)
movq %r13, 0x18(%r13)
movq %rax, 0x20(%r13)
movq (%rsi), %rbp
movq 0x8(%rsi), %r15
cmpq %r15, %rbp
je 0x2cf2
leaq 0x28(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r12
movl (%rbp), %eax
movq 0x28(%rsp), %r8
testq %r8, %r8
je 0x2c82
movq %r13, %rcx
movq %rcx, %rdx
movq %r8, %rsi
movl 0x20(%r8), %edi
xorl %r8d, %r8d
cmpl %eax, %edi
setl %r8b
movq %rsi, %rcx
cmovlq %rdx, %rcx
movq 0x10(%rsi,%r8,8), %r8
testq %r8, %r8
jne 0x2c4e
cmpq %r13, %rcx
je 0x2c82
cmpl %eax, %edi
cmovlq %rdx, %rsi
cmpl 0x20(%rsi), %eax
jge 0x2ca2
btsq $0x20, %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x3106
addq $0x4, %rbp
cmpq %r15, %rbp
jne 0x2c3e
jmp 0x2ca7
incl 0x24(%rcx)
jmp 0x2c97
movq 0x30(%rsp), %r15
cmpq %r13, %r15
je 0x2cf2
leaq 0x8(%rsp), %r12
movl 0x20(%r15), %ebp
movl 0x24(%r15), %r14d
movq %r14, %rax
shlq $0x20, %rax
orq %rbp, %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x2f88
imull %ebp, %r14d
addl %r14d, 0x20(%rbx)
movq %r15, %rdi
callq 0x20f0
movq %rax, %r15
cmpq %r13, %rax
jne 0x2cb6
leaq 0x18(%rsp), %rdi
callq 0x2f38
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d0d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2f38
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O3/Albuso0[P]support/support.cpp
// Function: Support::setHist(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Support::setHist(const std::string filename) 
{
    fin.clear();
    n = 0;
    std::map<int, int> fin_map;
    
    std::ifstream infile;
    infile.open( filename.c_str() );
    int freq;
    while ( (infile>>freq).good() )
    {
        if ( freq == 0)
            continue;

        auto iter = fin_map.find( freq );
        if ( iter == fin_map.end() )
            fin_map.insert( std::make_pair( freq,1 ) );
        else
            ++(iter->second);
    }
    infile.close();

    for ( auto it = fin_map.begin(); it != fin_map.end(); ++it )
    {
        int freq = it->first, cnt = it->second;
        fin.push_back( std::make_pair( freq, cnt ) );
        n += (freq * cnt);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rax
cmpq %rax, 0x30(%rdi)
je 0x2d47
movq %rax, 0x30(%rbx)
xorl %eax, %eax
movl %eax, 0x20(%rbx)
leaq 0x28(%rsp), %r13
movl %eax, (%r13)
movq %rax, 0x8(%r13)
movq %r13, 0x10(%r13)
movq %r13, 0x18(%r13)
movq %rax, 0x20(%r13)
leaq 0x50(%rsp), %rdi
callq 0x21b0
movq (%r14), %rsi
leaq 0x50(%rsp), %rdi
movl $0x8, %edx
callq 0x20e0
leaq 0x28(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x50(%rsp), %r15
leaq 0x14(%rsp), %r12
leaq 0x20(%rsp), %r14
leaq 0x8(%rsp), %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x20d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
cmpl $0x0, 0x20(%rax,%rcx)
jne 0x2e1d
movl 0x14(%rsp), %eax
testq %rax, %rax
je 0x2d9e
movq 0x30(%rsp), %r8
testq %r8, %r8
je 0x2e01
movq %r13, %rcx
movq %rcx, %rdx
movq %r8, %rsi
movl 0x20(%r8), %edi
xorl %r8d, %r8d
cmpl %eax, %edi
setl %r8b
movq %rsi, %rcx
cmovlq %rdx, %rcx
movq 0x10(%rsi,%r8,8), %r8
testq %r8, %r8
jne 0x2dcd
cmpq %r13, %rcx
je 0x2e01
cmpl %eax, %edi
cmovlq %rdx, %rsi
cmpl 0x20(%rsi), %eax
jge 0x2e18
btsq $0x20, %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3244
jmp 0x2d9e
incl 0x24(%rcx)
jmp 0x2d9e
leaq 0x50(%rsp), %rdi
callq 0x2050
movq 0x38(%rsp), %r15
cmpq %r13, %r15
je 0x2e77
leaq 0x8(%rsp), %r12
movq %rbx, %r14
movl 0x20(%r15), %ebp
movl 0x24(%r15), %ebx
movq %rbx, %rax
shlq $0x20, %rax
orq %rbp, %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x2f88
imull %ebp, %ebx
addl %ebx, 0x20(%r14)
movq %r14, %rbx
movq %r15, %rdi
callq 0x20f0
movq %rax, %r15
cmpq %r13, %rax
jne 0x2e36
leaq 0x50(%rsp), %rdi
callq 0x2060
leaq 0x20(%rsp), %rdi
callq 0x2f38
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2eaa
jmp 0x2eaa
movq %rax, %rbx
jmp 0x2eb7
jmp 0x2eaa
jmp 0x2eaa
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2060
leaq 0x20(%rsp), %rdi
callq 0x2f38
movq %rbx, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O3/Albuso0[P]support/main_test.cpp
// Function: print_param(Support const&)
void print_param(const Support &support)
{
    printf("Parameters:\n");
    printf("Preset pmin value\t=%.2e\n", support.getPmin());
    printf("Degree of polynomial\t=%d\n", support.getDegree());
    printf("Approximation interval\t=[%.2e,%.2f/n]\n", support.getPmin(), support.getInterval());
    printf("\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x5d7(%rip), %rdi       # 0x419c
callq 0x2210
movsd 0x8(%rbx), %xmm0
leaq 0x511(%rip), %rdi       # 0x40e7
movb $0x1, %al
callq 0x2030
movl 0x10(%rbx), %esi
leaq 0x519(%rip), %rdi       # 0x4100
xorl %eax, %eax
callq 0x2030
movsd 0x8(%rbx), %xmm0
movsd 0x18(%rbx), %xmm1
leaq 0x51b(%rip), %rdi       # 0x411a
movb $0x2, %al
callq 0x2030
movl $0xa, %edi
popq %rbx
jmp 0x21d0
// File: /workspace/github_cpp_makefile_star2_O3/Albuso0[P]support/main_test.cpp
// Function: print_results(Support const&)
void print_results(const Support &support)
{
    printf("Results:\n");
    printf("Sample size\t=%d\n",support.getSampleSize());
    printf("Polynomial\t=%d \n",(int)support.estimate());
    printf("Plug-in\t\t=%d \n",(int)support.estimate_plug());
    printf("\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x58c(%rip), %rdi       # 0x41a8
callq 0x2210
movl 0x20(%rbx), %esi
leaq 0x516(%rip), %rdi       # 0x4141
xorl %eax, %eax
callq 0x2030
movq %rbx, %rdi
callq 0x244c
cvttsd2si %xmm0, %esi
leaq 0x50d(%rip), %rdi       # 0x4152
xorl %eax, %eax
callq 0x2030
movq %rbx, %rdi
callq 0x2648
cvttsd2si %xmm0, %esi
leaq 0x504(%rip), %rdi       # 0x4163
xorl %eax, %eax
callq 0x2030
movl $0xa, %edi
popq %rbx
jmp 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sid1607[P]avx2-merge-sort/merge_sort.cpp
// Function: merge_pass(int*, int*, int, int)
void merge_pass(int *in, int *out, int n, int merge_size) {
  for (int i=0; i < n-1; i+=2*merge_size) {
    auto mid = i + merge_size - 1;
    auto end = std::min(i+2*merge_size-1, n-1);
    // check if there are 2 sub-arrays to merge
    if (mid < end) {
      // merge two merge_size arrays per iteration
      merge_phase(in, out, i, mid, end);
    } else {
      // copy the leftover data to output
      std::memcpy(out+i, in+i, (n-i)*sizeof(int));
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
cmpl $0x2, %edx
jl 0x285c
leal -0x1(%rdx), %ebp
leal (%rcx,%rcx), %eax
cltq
movslq %ecx, %rcx
movl %ebp, %esi
movq %rsi, 0x20(%rsp)
movl %edx, %r15d
shlq $0x2, %r15
movq %rax, %rbx
leaq (,%rax,4), %rax
movq %rax, 0x18(%rsp)
leal -0x1(%rcx), %eax
movq %rax, 0x10(%rsp)
movq %rcx, %r14
leal -0x1(,%rcx,2), %r13d
xorl %r12d, %r12d
leaq (%r14,%r12), %rax
leal (%r12,%r13), %r8d
cmpl %r8d, %ebp
cmovll %ebp, %r8d
movslq %r8d, %rcx
cmpq %rcx, %rax
jle 0x2833
movq 0x8(%rsp), %rax
leaq (%rax,%r12,4), %rdi
movq (%rsp), %rax
leaq (%rax,%r12,4), %rsi
movq %r15, %rdx
callq 0x20e0
jmp 0x284d
movq 0x10(%rsp), %rax
leal (%rax,%r12), %ecx
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %r12d, %edx
callq 0x2391
addq %rbx, %r12
subq 0x18(%rsp), %r15
cmpq 0x20(%rsp), %r12
jl 0x2801
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sid1607[P]avx2-merge-sort/merge_sort.cpp
// Function: merge(int*, int*, unsigned long)
std::pair<int *, int *> merge(int *a, int *b, size_t len) {
  int i=0;
  /*
   * even iterations: a->b
   * odd iterations: b->a
   */
  // start from 16-16 merge
  for (size_t pass_size=SIMD_SIZE; pass_size<len; pass_size*=2, i++) {
    if (i%2 == 0) {
      merge_pass(a, b, len, pass_size);
    } else {
      merge_pass(b, a, len, pass_size);
    }
  }

  if (i%2 == 0)
    return std::make_pair(a,b);
  return std::make_pair(b,a);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x8, %rdx
jbe 0x28cd
movq %rdx, %r15
movl $0x8, %r12d
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
leal 0x1(%r13), %eax
testb $0x1, %al
jne 0x289f
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x28a5
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x27a2
addq %r12, %r12
incl %r13d
cmpq %r15, %r12
jb 0x288f
testb $0x1, %r13b
movq %r14, %rax
cmoveq %rbx, %rax
cmoveq %r14, %rbx
movq %rax, %r14
movq %rbx, %rax
movq %r14, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movb $0x1, %al
cmpl $0x2, %esi
jl 0x2d77
movl 0x4(%rdi), %eax
cmpl (%rdi), %eax
jge 0x2d78
xorl %eax, %eax
retq
movl %esi, %ecx
movl $0x2, %esi
movq %rsi, %rdx
cmpq %rsi, %rcx
je 0x2d97
movl (%rdi,%rdx,4), %r8d
leaq 0x1(%rdx), %rsi
cmpl %eax, %r8d
movl %r8d, %eax
jge 0x2d7f
cmpq %rcx, %rdx
setae %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
jle 0x2dce
movl %edx, %ecx
movl (%rdi), %r8d
movl $0x1, %edx
xorl %eax, %eax
cmpl -0x4(%rsi,%rdx,4), %r8d
jne 0x2dd0
cmpq %rcx, %rdx
setae %al
je 0x2dd0
movl (%rdi,%rdx,4), %r9d
incq %rdx
cmpl %r8d, %r9d
movl %r9d, %r8d
jge 0x2dae
jmp 0x2dd0
movb $0x1, %al
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3285
movq 0x8(%rbx), %rdi
callq 0x2180
movl %eax, %ecx
movl $0x1, %ebp
movl $0x1, %ebx
shll %cl, %ebx
movl %ebx, %edi
callq 0x2f1b
testb %al, %al
je 0x3329
movq 0x2d29(%rip), %r14      # 0x5fd0
leaq 0xe33(%rip), %rsi       # 0x40e1
movl $0x8, %edx
movq %r14, %rdi
callq 0x2150
movq %r14, %rdi
movl %ebx, %esi
callq 0x21c0
movq %rax, %rbx
leaq 0xdf1(%rip), %rsi       # 0x40c0
movl $0x1, %edx
movq %rax, %rdi
callq 0x2150
movq %rbx, %rdi
movl $0x1, %esi
callq 0x21c0
movq %rax, %rbx
leaq 0xe26(%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 %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movl 0x939f(%rip), %r13d     # 0xc18c
movl %r13d, %ebx
imull %ebx, %ebx
leaq (,%rbx,4), %r15
movq %r15, %rdi
callq 0x2030
movq %rax, (%r14)
testq %r13, %r13
je 0x2e65
movq %rax, %r12
cmpq $0x1, %rbx
movq %rbx, %rdx
adcq $0x0, %rdx
shlq $0x2, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20f0
testl %r13d, %r13d
jle 0x2e65
leal -0x1(%r13), %eax
movl %eax, %ecx
imull %r13d, %ecx
leaq (%r12,%rcx,4), %rcx
leaq (,%r13,4), %rdx
xorl %esi, %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %r12, %r8
movl %edi, (%r8)
movl %edi, (%r8,%rax,4)
movl %edi, (%r12,%rsi,4)
movl %edi, (%rcx,%rsi,4)
incq %rsi
addq %rdx, %r8
cmpq %rsi, %r13
jne 0x2e4c
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movl $0x1, 0x18(%r14)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x20(%r14)
testq %r13, %r13
je 0x2ea8
cmpq $0x1, %rbx
adcq $0x0, %rbx
shlq $0x2, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x20f0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x92b9(%rip), %ebp      # 0xc18c
movl %ebp, %r12d
imull %r12d, %r12d
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x2030
movq %rax, (%r14)
testl %ebp, %ebp
je 0x2f0e
movq (%rbx), %rcx
cmpl $0x1, %r12d
movl %r12d, %edx
adcl $0x0, %edx
xorl %esi, %esi
movl (%rcx,%rsi,4), %edi
movl %edi, (%rax,%rsi,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x2f00
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x18(%r14)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x20(%r14)
testl %ebp, %ebp
je 0x2f51
movq 0x20(%rbx), %rcx
cmpl $0x1, %r12d
adcl $0x0, %r12d
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
cmpq %rdx, %r12
jne 0x2f43
movl 0x1028(%rbx), %ebp
testl %ebp, %ebp
je 0x2f9b
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 0x57a8
movl 0x1028(%r14), %eax
movq %r15, 0x28(%r14,%rax,8)
incl %eax
movl %eax, 0x1028(%r14)
incl %r13d
cmpl %r13d, %ebp
jne 0x2f5e
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_O3/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 0x2fdc
callq 0x2200
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2fea
callq 0x2200
cmpl $0x0, 0x1028(%rbx)
je 0x3021
xorl %ebp, %ebp
movslq %ebp, %rax
movq 0x28(%rbx,%rax,8), %r14
testq %r14, %r14
je 0x300a
movq %r14, %rdi
callq 0x57f8
movl $0x610, %esi            # imm = 0x610
movq %r14, %rdi
callq 0x21c0
incl %ebp
cmpl 0x1028(%rbx), %ebp
jb 0x2ff5
movl $0x0, 0x1028(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x88f4(%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 0x390e
leal 0x1(%r14), %eax
shll $0x8, %eax
orl %r15d, %eax
movzwl %ax, %esi
movq %rbx, %rdi
movl %esi, 0xc(%rsp)
callq 0x580a
cmpl $-0x1, %eax
jne 0x390e
movq %rbx, %rdi
movl 0xc(%rsp), %esi
callq 0x5830
testl %ebp, %ebp
jne 0x3938
leal -0x1(%r14), %eax
shll $0x8, %eax
orl %r15d, %eax
movzwl %ax, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x580a
cmpl $-0x1, %eax
jne 0x3938
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5830
cmpl $0x0, 0x10(%rsp)
jne 0x3965
movl %r14d, %eax
shll $0x8, %eax
orl %eax, %r13d
movzwl %r13w, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x580a
cmpl $-0x1, %eax
jne 0x3965
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5830
cmpl $0x0, 0x14(%rsp)
jne 0x3986
shll $0x8, %r14d
orl %r14d, %r12d
movzwl %r12w, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x580a
cmpl $-0x1, %eax
je 0x3995
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 0x5830
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x39ed
xorl %eax, %eax
movslq %eax, %rsi
movq 0x28(%rbx,%rsi,8), %r15
cmpl %edx, (%r15)
je 0x39e8
incl %eax
cmpl %eax, %ecx
jne 0x39cd
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movslq %eax, %r12
jmp 0x39f7
movq $-0x1, %r12
xorl %r15d, %r15d
cmpl $0x0, 0x8(%r15)
jle 0x3a3a
xorl %r13d, %r13d
movzwl 0x10(%r15,%r13,2), %esi
movl (%r14), %eax
movq 0x20(%rbx), %rcx
movl %esi, %edx
movzbl %sil, %edi
imull 0x8771(%rip), %edi      # 0xc18c
shrl $0x8, %edx
addl %edx, %edi
movslq %edi, %rdx
movl %eax, (%rcx,%rdx,4)
movq %r14, %rdi
callq 0x57fa
incq %r13
movslq 0x8(%r15), %rax
cmpq %rax, %r13
jl 0x3a01
movzwl %bp, %esi
movq %r15, %rdi
callq 0x580a
movq %r15, %rdi
movl %eax, %esi
callq 0x5842
cmpl $0x0, 0xc(%r15)
jle 0x3a8c
xorl %r13d, %r13d
movzwl 0x410(%r15,%r13,2), %esi
movq %r14, %rdi
callq 0x580a
cmpl $-0x1, %eax
jne 0x3a80
movzwl 0x410(%r15,%r13,2), %esi
movq %r14, %rdi
callq 0x5830
incq %r13
movslq 0xc(%r15), %rax
cmpq %rax, %r13
jl 0x3a59
movq %r15, %rdi
callq 0x57f8
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_O3/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 0x40d8
movzwl %dx, %eax
shrl $0x8, %eax
movzbl %dl, %r8d
movq (%rdi), %rcx
movl 0x8139(%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 0x40d8
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 0x40d8
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 0x40d8
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 0x40da
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x80a3(%rip), %ecx      # 0xc188
testl %ecx, %ecx
jle 0x4153
pushq %r14
pushq %rbx
movq (%rsi), %rsi
movslq 0x8096(%rip), %rdx      # 0xc18c
incq %rcx
leaq (%rsi,%rdx,4), %rsi
addq $0x4, %rsi
shlq $0x2, %rdx
movq %rcx, %r8
shlq $0x8, %r8
xorl %edi, %edi
movl $0x1, %r9d
movl $0x100, %r10d           # imm = 0x100
movq %rsi, %r11
cmpl $0x0, (%r11)
jne 0x4133
movl %r10d, %ebx
orl %r9d, %ebx
movl %edi, %r14d
movw %bx, (%rax,%r14,2)
incl %edi
addq $0x100, %r10            # imm = 0x100
addq $0x4, %r11
cmpq %r10, %r8
jne 0x411d
incq %r9
addq %rdx, %rsi
cmpq %rcx, %r9
jne 0x4114
popq %rbx
popq %r14
jmp 0x4155
xorl %edi, %edi
movl %edi, 0x400(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movl 0x801f(%rip), %ebp      # 0xc18c
movl %ebp, %r12d
imull %r12d, %r12d
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r14
movq %r15, %rdi
callq 0x2030
movq %rax, %r15
testl %ebp, %ebp
je 0x41d5
movq 0x20(%rbx), %rax
cmpl $0x1, %r12d
movl %r12d, %ecx
adcl $0x0, %ecx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
movl %esi, (%r14,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x41a6
testl %ebp, %ebp
je 0x41d5
movq (%rbx), %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 0x41c6
movl 0x1028(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
je 0x4240
xorl %esi, %esi
xorl %edx, %edx
movslq %edx, %rdi
movq 0x28(%rbx,%rdi,8), %rdi
movslq 0x8(%rdi), %r8
testq %r8, %r8
jle 0x4232
xorl %r9d, %r9d
movzwl 0x10(%rdi,%r9,2), %r10d
movzbl %r10b, %r11d
shrl $0x8, %r10d
imull %ebp, %r11d
addl %r10d, %r11d
movslq %r11d, %r10
movb $0x1, %r12b
cmpl $0x0, (%r14,%r10,4)
je 0x4235
cmpl $0x0, (%r15,%r10,4)
je 0x4235
movl %ecx, (%r14,%r10,4)
movl %ecx, (%r15,%r10,4)
incq %r9
cmpq %r8, %r9
jb 0x41f9
movl %esi, %r12d
incl %edx
movl %r12d, %esi
cmpl %eax, %edx
jne 0x41e5
jmp 0x4243
xorl %r12d, %r12d
movq %r14, %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
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4933
xorl %eax, %eax
retq
movzwl %si, %eax
movzbl %sil, %ecx
imull 0x784b(%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 0x496b
movl $0x1, %edx
movslq %edx, %rdx
movq 0x28(%rdi,%rdx,8), %rcx
incl %edx
cmpl %eax, (%rcx)
jne 0x495d
cmpl $0x1, 0xc(%rcx)
sete %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x49cf
movl 0x1028(%rdi), %ecx
testl %ecx, %ecx
je 0x49bd
movzwl %si, %edx
shrl $0x8, %edx
movzbl %sil, %esi
movq 0x20(%rdi), %r8
imull 0x77ed(%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 0x49c0
incl %esi
cmpl %esi, %ecx
jne 0x49aa
xorl %r8d, %r8d
cmpl $0x1, 0xc(%r8)
jne 0x49cf
movzwl 0x410(%r8), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6ec2(%rip), %r14d     # 0xc188
testl %r14d, %r14d
jle 0x53ea
movq %rdi, %rbx
movq 0x6cef(%rip), %r15      # 0xbfc8
leaq 0x3e5d(%rip), %rbp      # 0x913d
leaq 0x3d5c(%rip), %r13      # 0x9043
leaq 0x3d52(%rip), %r12      # 0x9040
cmpl $0x9, %r14d
ja 0x5304
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, 0x6e5e(%rip)      # 0xc188
jle 0x5376
movslq (%rsp), %rbp
xorl %r14d, %r14d
movq (%rbx), %rax
movslq 0x6e4f(%rip), %rcx      # 0xc18c
imulq %rbp, %rcx
addq %r14, %rcx
movl 0x4(%rax,%rcx,4), %eax
movq %r13, %rsi
cmpl $0x1, %eax
je 0x5357
leaq 0x3cef(%rip), %rsi      # 0x9046
testl %eax, %eax
cmoveq %r12, %rsi
movl $0x2, %edx
movq %r15, %rdi
callq 0x21f0
incq %r14
cmpl 0x6e14(%rip), %r14d     # 0xc188
jl 0x5333
movq (%rsp), %r14
cmpl $0x9, %r14d
leaq 0x3db8(%rip), %rbp      # 0x913d
ja 0x5397
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 0x52ee
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6d7c(%rip), %r14d     # 0xc188
testl %r14d, %r14d
jle 0x5530
movq %rdi, %rbx
movq 0x6bd1(%rip), %r15      # 0xbff0
leaq 0x3d17(%rip), %rbp      # 0x913d
leaq 0x3c16(%rip), %r13      # 0x9043
leaq 0x3c0c(%rip), %r12      # 0x9040
cmpl $0x9, %r14d
ja 0x544a
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, 0x6d18(%rip)      # 0xc188
jle 0x54bc
movslq (%rsp), %rbp
xorl %r14d, %r14d
movq (%rbx), %rax
movslq 0x6d09(%rip), %rcx      # 0xc18c
imulq %rbp, %rcx
addq %r14, %rcx
movl 0x4(%rax,%rcx,4), %eax
movq %r13, %rsi
cmpl $0x1, %eax
je 0x549d
leaq 0x3ba9(%rip), %rsi      # 0x9046
testl %eax, %eax
cmoveq %r12, %rsi
movl $0x2, %edx
movq %r15, %rdi
callq 0x21f0
incq %r14
cmpl 0x6cce(%rip), %r14d     # 0xc188
jl 0x5479
movq (%rsp), %r14
cmpl $0x9, %r14d
leaq 0x3c72(%rip), %rbp      # 0x913d
ja 0x54dd
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 0x5434
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6bac(%rip), %r12d     # 0xc18c
movl %r12d, %eax
imull %ebp, %eax
addl %r15d, %eax
movslq %eax, %rdx
xorl %eax, %eax
cmpl %esi, (%rcx,%rdx,4)
jne 0x566d
movl %esi, %ebx
movq %rdi, %r14
movl %r12d, %r13d
imull %r13d, %r13d
leaq (,%r13,4), %rdi
callq 0x2030
testl %r12d, %r12d
je 0x5630
cmpq $0x1, %r13
adcq $0x0, %r13
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 0x4264
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_O3/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:
movdqu (%rsi), %xmm0
movl 0x8(%rsi), %eax
movdqu %xmm0, (%rdi)
testl %eax, %eax
jle 0x57cd
movl %eax, %eax
xorl %ecx, %ecx
movzwl 0x10(%rsi,%rcx,2), %edx
movw %dx, 0x10(%rdi,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x57bb
pshufd $0xff, %xmm0, %xmm0     # xmm0 = xmm0[3,3,3,3]
movd %xmm0, %eax
testl %eax, %eax
jle 0x57f6
movl %eax, %eax
xorl %ecx, %ecx
movzwl 0x410(%rsi,%rcx,2), %edx
movw %dx, 0x410(%rdi,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0x57de
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x582c
xorl %edx, %edx
cmpw %si, 0x410(%rdi,%rdx,2)
je 0x582d
incq %rdx
cmpq %rdx, %rcx
jne 0x581a
retq
movl %edx, %eax
retq