LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x2920
movq -0x60(%rbp), %rdi
movsd %xmm0, -0x10(%rbp)
callq 0x2870
movq -0x60(%rbp), %rax
movsd %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
addq $0x28, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3790
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x37c0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x37f0
testb $0x1, %al
jne 0x2bed
jmp 0x2c2d
leaq -0x30(%rbp), %rdi
callq 0x3830
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movq -0x40(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
imull %ecx, %eax
movq -0x40(%rbp), %rcx
imull 0x4(%rcx), %eax
cvtsi2sd %eax, %xmm0
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3850
jmp 0x2bda
movq -0x60(%rbp), %rdi
callq 0x2920
movq -0x60(%rbp), %rax
movaps %xmm0, %xmm1
movsd 0x63db(%rip), %xmm0     # 0x9020
mulsd %xmm1, %xmm0
mulsd -0x20(%rbp), %xmm0
cvtsi2sdl 0x20(%rax), %xmm1
divsd %xmm1, %xmm0
movl 0x20(%rax), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd 0x63b3(%rip), %xmm1     # 0x9020
subsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3950
movq %rax, %rcx
movq -0x60(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x10(%rbp), %xmm1
cvtsi2sdl 0x20(%rax), %xmm0
movsd 0x6373(%rip), %xmm2     # 0x9020
subsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm0
divsd -0x18(%rbp), %xmm0
movsd -0x48(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addq $0x60, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x2920
movq -0x78(%rbp), %rdi
movsd %xmm0, -0x10(%rbp)
callq 0x2870
movq -0x78(%rbp), %rax
movsd %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
addq $0x28, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3790
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x37c0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x37f0
testb $0x1, %al
jne 0x2d40
jmp 0x2d80
leaq -0x30(%rbp), %rdi
callq 0x3830
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movq -0x40(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
imull %ecx, %eax
movq -0x40(%rbp), %rcx
imull 0x4(%rcx), %eax
cvtsi2sd %eax, %xmm0
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3850
jmp 0x2d2d
movq -0x78(%rbp), %rdi
callq 0x2920
movq -0x78(%rbp), %rax
movaps %xmm0, %xmm1
movsd 0x6288(%rip), %xmm0     # 0x9020
mulsd %xmm1, %xmm0
mulsd -0x20(%rbp), %xmm0
cvtsi2sdl 0x20(%rax), %xmm1
divsd %xmm1, %xmm0
movl 0x20(%rax), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd 0x6260(%rip), %xmm1     # 0x9020
subsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3950
movq %rax, %rcx
movq -0x78(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x48(%rbp), %xmm0
cvtsi2sdl 0x20(%rax), %xmm2
movsd 0x6220(%rip), %xmm1     # 0x9020
subsd -0x18(%rbp), %xmm1
mulsd %xmm1, %xmm2
mulsd -0x20(%rbp), %xmm2
cvtsi2sdl 0x20(%rax), %xmm1
divsd %xmm1, %xmm2
movl 0x20(%rax), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm2
divsd -0x18(%rbp), %xmm2
movsd 0x61ee(%rip), %xmm1     # 0x9020
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3950
movq %rax, %rcx
movq -0x78(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x10(%rbp), %xmm1
cvtsi2sdl 0x20(%rax), %xmm0
movsd 0x61aa(%rip), %xmm2     # 0x9020
subsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm0
divsd -0x18(%rbp), %xmm0
movsd -0x60(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rsi, -0x248(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x250(%rbp)
addq $0x28, %rdi
callq 0x39f0
movq -0x250(%rbp), %rax
movl $0x0, 0x20(%rax)
leaq -0x218(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0x2230
movq -0x248(%rbp), %rdi
callq 0x20b0
movq -0x240(%rbp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x2100
jmp 0x3001
jmp 0x3003
leaq -0x218(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x20e0
movq %rax, -0x258(%rbp)
jmp 0x301f
movq -0x258(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x22b0
movb %al, -0x259(%rbp)
jmp 0x303d
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0x304c
jmp 0x30f1
leaq -0x218(%rbp), %rdi
leaq -0x22c(%rbp), %rsi
callq 0x20e0
jmp 0x3061
movq -0x250(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x270(%rbp)
leaq -0x228(%rbp), %rdi
leaq -0x22c(%rbp), %rsi
callq 0x3a40
movq %rax, -0x268(%rbp)
jmp 0x308f
movq -0x270(%rbp), %rdi
movq -0x268(%rbp), %rax
movq %rax, -0x234(%rbp)
leaq -0x234(%rbp), %rsi
callq 0x3a10
jmp 0x30b2
movq -0x250(%rbp), %rax
movl -0x228(%rbp), %ecx
imull -0x22c(%rbp), %ecx
addl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
jmp 0x3003
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x2070
jmp 0x3114
leaq -0x218(%rbp), %rdi
callq 0x2060
jmp 0x30ff
leaq -0x218(%rbp), %rdi
callq 0x2070
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0x220(%rbp), %rdi
callq 0x22e0
// File: Albuso0[P]support/support.cpp
// Function: Support::setFin(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&)
void Support::setFin(const std::vector<int> &freq_in, const std::vector<int> &cnt_in)
{
    fin.clear();
    n = 0;
    for ( unsigned i = 0; i < freq_in.size(); i++)
    {
        int freq = freq_in[i], cnt = cnt_in[i];
        fin.push_back( std::make_pair( freq, cnt ) );
        n += (freq * cnt);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
addq $0x28, %rdi
callq 0x39f0
movq -0x38(%rbp), %rax
movl $0x0, 0x20(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3a70
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x31e5
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0x3a90
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0x3a90
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, -0x24(%rbp)
addq $0x28, %rax
movq %rax, -0x48(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x3a40
movq -0x48(%rbp), %rdi
movq %rax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x3a10
movq -0x38(%rbp), %rax
movl -0x20(%rbp), %ecx
imull -0x24(%rbp), %ecx
addl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3157
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Albuso0[P]support/mathmore.cpp
// Function: binom(unsigned int, unsigned int)
long long binom(unsigned n, unsigned k)
{
    if (0 == k || n == k) 
        return 1;
    if (k > n) 
        return 0;
    if (k > (n - k)) 
        k = n - k;
    if (1 == k) 
        return n;
    long long b = 1;
    for (unsigned i = 1; i <= k; ++i)
    {
        if ( b > std::numeric_limits<long long>::max() / n-(k-i) )
        {
            std::cerr<<"binomial coefficients overflow!"<<std::endl;
            exit(1); /* Overflow */
        }
        b *= (n - (k - i));
        b /= i;
    }
    return b;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
je 0x5dad
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jne 0x5dba
movq $0x1, -0x8(%rbp)
jmp 0x5eac
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x5dcf
movq $0x0, -0x8(%rbp)
jmp 0x5eac
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
subl -0x10(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x5de5
movl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x1, %eax
cmpl -0x10(%rbp), %eax
jne 0x5dfb
movl -0xc(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x5eac
movq $0x1, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
ja 0x5ea4
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x6490
movl -0xc(%rbp), %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x28(%rbp), %rax
movl -0x10(%rbp), %edx
subl -0x1c(%rbp), %edx
movl %edx, %edx
subq %rdx, %rcx
cmpq %rcx, %rax
jle 0x5e6e
movq 0x81a7(%rip), %rdi      # 0xdff0
leaq 0x3228(%rip), %rsi      # 0x9078
callq 0x21a0
movq %rax, %rdi
movq 0x8169(%rip), %rsi      # 0xdfc8
callq 0x21e0
movl $0x1, %edi
callq 0x2240
movl -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
subl -0x1c(%rbp), %ecx
subl %ecx, %eax
movl %eax, %eax
imulq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
cqto
idivq %rcx
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5e0a
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Albuso0[P]support/mathmore.cpp
// Function: ChebMore::expand() const
std::vector<double> ChebMore::expand() const // Expansion of cos(L arccos (bx+c))
{
    std::vector<double> a0 = expand_basic();
    std::vector<double> a(L+1);
	
    // sum_i a[i] x^i = sum_i a0[i]*(bx+c)^i
    for (int i = 0; i <= L; i++)
        for (int j = 0; j <= i; j++)
            a[j] += a0[i] * pow(b,j) * pow(c,i-j) * binom(i,j);
    return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x68(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5ec0
movq -0x68(%rbp), %rax
movb $0x0, -0x29(%rbp)
movl 0x8(%rax), %eax
incl %eax
cltq
movq %rax, -0x58(%rbp)
leaq -0x2a(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x64a0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x64c0
jmp 0x61d2
leaq -0x2a(%rbp), %rdi
callq 0x47d0
movl $0x0, -0x40(%rbp)
movq -0x68(%rbp), %rcx
movl -0x40(%rbp), %eax
cmpl 0x8(%rcx), %eax
jg 0x6311
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x40(%rbp), %eax
jg 0x6301
movslq -0x40(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x38c0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd 0x10(%rax), %xmm0
cvtsi2sdl -0x44(%rbp), %xmm1
callq 0x22c0
movq -0x68(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x90(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
movsd 0x18(%rax), %xmm0
movl -0x40(%rbp), %eax
movl -0x44(%rbp), %ecx
subl %ecx, %eax
cvtsi2sd %eax, %xmm1
callq 0x22c0
movaps %xmm0, %xmm1
movsd -0x88(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movl -0x40(%rbp), %edi
movl -0x44(%rbp), %esi
callq 0x5d90
movq %rax, -0x78(%rbp)
jmp 0x628a
movq -0x60(%rbp), %rdi
movq -0x78(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x98(%rbp)
movslq -0x44(%rbp), %rsi
callq 0x38c0
movsd -0x80(%rbp), %xmm0
movsd -0x98(%rbp), %xmm2
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x61f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2a(%rbp), %rdi
callq 0x47d0
jmp 0x633a
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x38e0
jmp 0x633a
jmp 0x6303
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x61e2
movb $0x1, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x6324
movq -0x60(%rbp), %rdi
callq 0x38e0
leaq -0x28(%rbp), %rdi
callq 0x38e0
movq -0x70(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x38e0
movq -0x38(%rbp), %rdi
callq 0x22e0
nopl (%rax)
// File: Albuso0[P]support/mathmore.cpp
// Function: ChebMore::evaluate(double) const
double ChebMore::evaluate(double x) const
{
    double A = b * x + c;
    if ( A > 1 )
    {
        return cosh(L*acosh(A));
    }
    else if ( A >= -1 )
    {
        return cos(L*acos(A));
    }
    else
    {
        return ( cosh(L*acosh(-A)) * ( (L%2==0)? 1:-1)) ;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movsd 0x10(%rax), %xmm0
movsd -0x18(%rbp), %xmm2
movsd 0x18(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movsd 0x2c8e(%rip), %xmm1     # 0x9020
ucomisd %xmm1, %xmm0
jbe 0x63cb
movq -0x28(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x22d0
movaps %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
mulsd %xmm1, %xmm0
callq 0x2260
movsd %xmm0, -0x8(%rbp)
jmp 0x647a
movsd -0x20(%rbp), %xmm0
movsd 0x2c98(%rip), %xmm1     # 0x9070
ucomisd %xmm1, %xmm0
jb 0x640e
movq -0x28(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x2190
movaps %xmm0, %xmm1
movsd -0x38(%rbp), %xmm0
mulsd %xmm1, %xmm0
callq 0x2310
movsd %xmm0, -0x8(%rbp)
jmp 0x647a
movq -0x28(%rbp), %rax
cvtsi2sdl 0x8(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x20(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
callq 0x22d0
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
mulsd %xmm1, %xmm0
callq 0x2260
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x2214(%rip), %rdi      # 0x90f7
movb $0x0, %al
callq 0x2030
movq -0x8(%rbp), %rdi
callq 0x71f0
leaq 0x220a(%rip), %rdi      # 0x9104
movb $0x1, %al
callq 0x2030
movq -0x8(%rbp), %rdi
callq 0x7210
movl %eax, %esi
leaq 0x220a(%rip), %rdi      # 0x911d
movb $0x0, %al
callq 0x2030
movq -0x8(%rbp), %rdi
callq 0x71f0
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7230
movaps %xmm0, %xmm1
movsd -0x10(%rbp), %xmm0
leaq 0x21f7(%rip), %rdi      # 0x9137
movb $0x2, %al
callq 0x2030
leaq 0x2249(%rip), %rdi      # 0x9197
movb $0x0, %al
callq 0x2030
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x21eb(%rip), %rdi      # 0x915e
movb $0x0, %al
callq 0x2030
movq -0x8(%rbp), %rdi
callq 0x7250
movl %eax, %esi
leaq 0x21dc(%rip), %rdi      # 0x9168
movb $0x0, %al
callq 0x2030
movq -0x8(%rbp), %rdi
callq 0x24f0
cvttsd2si %xmm0, %esi
leaq 0x21d2(%rip), %rdi      # 0x9179
movb $0x0, %al
callq 0x2030
movq -0x8(%rbp), %rdi
callq 0x27e0
cvttsd2si %xmm0, %esi
leaq 0x21c8(%rip), %rdi      # 0x918a
movb $0x0, %al
callq 0x2030
leaq 0x21c7(%rip), %rdi      # 0x9197
movb $0x0, %al
callq 0x2030
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: sid1607[P]avx2-merge-sort/merge_sort.cpp
// Function: initialize()
void initialize() {
  // directly set load store mask in 32B aligned memory
  alignas(32) int load_store_mask[8] = 
    {1<<31,1<<31,1<<31,1<<31,1<<31,1<<31,1<<31,1<<31};
  global_masks.load_store_mask = 
      _mm256_load_si256((__m256i *) &load_store_mask[0]);

  // load the remaining masks
  int rev_idx_mask[8] = {7,6,5,4,3,2,1,0};
  int swap_128[8] = {4,5,6,7,0,1,2,3};
  global_masks.rev_idx_mask = load_reg256(&rev_idx_mask[0]);
  global_masks.swap_128 = load_reg256(&swap_128[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0x80, %rsp
movq 0x4c6a(%rip), %rax      # 0x7020
movq %rax, 0x40(%rsp)
movq 0x4c66(%rip), %rax      # 0x7028
movq %rax, 0x48(%rsp)
movq 0x4c62(%rip), %rax      # 0x7030
movq %rax, 0x50(%rsp)
movq 0x4c5e(%rip), %rax      # 0x7038
movq %rax, 0x58(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
vmovdqa (%rax), %ymm0
vmovdqa %ymm0, 0x7d86(%rip)     # 0xa180
movq 0x4c5f(%rip), %rax      # 0x7060
movq %rax, 0x20(%rsp)
movq 0x4c5b(%rip), %rax      # 0x7068
movq %rax, 0x28(%rsp)
movq 0x4c57(%rip), %rax      # 0x7070
movq %rax, 0x30(%rsp)
movq 0x4c53(%rip), %rax      # 0x7078
movq %rax, 0x38(%rsp)
movq 0x4c0f(%rip), %rax      # 0x7040
movq %rax, (%rsp)
movq 0x4c0c(%rip), %rax      # 0x7048
movq %rax, 0x8(%rsp)
movq 0x4c08(%rip), %rax      # 0x7050
movq %rax, 0x10(%rsp)
movq 0x4c04(%rip), %rax      # 0x7058
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2b70
vmovdqa %ymm0, 0x7d35(%rip)     # 0xa1a0
movq %rsp, %rdi
callq 0x2b70
vmovdqa %ymm0, 0x7d45(%rip)     # 0xa1c0
movq %rbp, %rsp
popq %rbp
vzeroupper
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x28f8
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl -0x18(%rbp), %ecx
shll %ecx
addl %ecx, %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2c10
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x28b6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movl -0x24(%rbp), %r8d
callq 0x2490
jmp 0x28e6
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movslq -0x1c(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movl -0x14(%rbp), %eax
subl -0x1c(%rbp), %eax
movslq %eax, %rdx
shlq $0x2, %rdx
callq 0x20d0
jmp 0x28e8
movl -0x18(%rbp), %eax
shll %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x284d
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x8, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x2989
movl -0x2c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x2958
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x38(%rbp), %rax
movl %eax, %ecx
callq 0x2830
jmp 0x2971
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x38(%rbp), %rax
movl %eax, %ecx
callq 0x2830
jmp 0x2973
movq -0x38(%rbp), %rax
shlq %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2923
movl -0x2c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x29b0
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2c50
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
jmp 0x29c5
leaq -0x20(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2c50
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: sid1607[P]avx2-merge-sort/merge_sort.cpp
// Function: merge_sort(int*, int*, unsigned long)
std::pair<int *, int *> merge_sort(int *a, int *b, size_t len) {
    __m256i rows[SIMD_SIZE];
  // if (len%64!=0) {
  //   // add padding
  //   auto i = a.size();
  //   auto end = ((i+64)/64)*64;
  //   while (i<end) {
  //     a.push_back(INT_MAX);
  //     i++;
  //   }
  //   // adjust b's size as well
  //   b.resize(a.size());
  // }

  assert(len%64 == 0);
  // assert(b.size() == a.size());

  for (size_t i=0; i < len; i+=SORT_SIZE) {
    for (int j=0; j<SORT_SIZE/SIMD_SIZE; j++) {
      rows[j] = load_reg256(&a[i+j*SIMD_SIZE]);
    }
    sort64(rows);
    for (int j=0; j<SORT_SIZE/SIMD_SIZE; j++) {
      store_reg256(&a[i+j*SIMD_SIZE], rows[j]);
    }
  }

  return merge(a, b, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, 0x138(%rsp)
movq %rsi, 0x130(%rsp)
movq %rdx, 0x128(%rsp)
movq 0x128(%rsp), %rax
andq $0x3f, %rax
cmpq $0x0, %rax
jne 0x2a1b
jmp 0x2a3a
leaq 0x465e(%rip), %rdi      # 0x7080
leaq 0x4663(%rip), %rsi      # 0x708c
movl $0x128, %edx            # imm = 0x128
leaq 0x4666(%rip), %rcx      # 0x709b
callq 0x20b0
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x128(%rsp), %rax
jae 0x2b22
movl $0x0, 0x14(%rsp)
cmpl $0x8, 0x14(%rsp)
jge 0x2aad
movq 0x138(%rsp), %rdi
movq 0x18(%rsp), %rax
movl 0x14(%rsp), %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
shlq $0x2, %rax
addq %rax, %rdi
callq 0x2b70
movslq 0x14(%rsp), %rcx
leaq 0x20(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
vmovdqa %ymm0, (%rax)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2a5e
leaq 0x20(%rsp), %rdi
vzeroupper
callq 0x2c80
movl $0x0, 0x10(%rsp)
cmpl $0x8, 0x10(%rsp)
jge 0x2b0d
movq 0x138(%rsp), %rdi
movq 0x18(%rsp), %rax
movl 0x10(%rsp), %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
shlq $0x2, %rax
addq %rax, %rdi
movslq 0x10(%rsp), %rax
leaq 0x20(%rsp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
callq 0x2be0
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x2ac2
jmp 0x2b0f
movq 0x18(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x18(%rsp)
jmp 0x2a43
movq 0x138(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0x2900
movq %rax, 0x140(%rsp)
movq %rdx, 0x148(%rsp)
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %rdx
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: sid1607[P]avx2-merge-sort/merge_sort.cpp
// Function: bitonic_merge(long long vector[4]&, long long vector[4]&)
inline void bitonic_merge(__m256i& a, __m256i& b) {
  // phase 1 - 8 against 8
  b = reverse(b);
  minmax(a,b);
  intra_register_sort(a,b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2cf0
movq -0x10(%rbp), %rax
vmovdqa %ymm0, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
vzeroupper
callq 0x2d40
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2df0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: sid1607[P]avx2-merge-sort/merge_sort.cpp
// Function: minmax(long long vector[4]&, long long vector[4]&)
inline void minmax(__m256i& a, __m256i& b){
  auto t = a;
  a = _mm256_min_epi32(a, b);
  b = _mm256_max_epi32(t, b);
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0xe0, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
vmovdqa (%rax), %ymm0
vmovdqa %ymm0, (%rsp)
movq 0x38(%rsp), %rax
vmovdqa (%rax), %ymm1
movq 0x30(%rsp), %rax
vmovdqa (%rax), %ymm0
vmovdqa %ymm1, 0x60(%rsp)
vmovdqa %ymm0, 0x40(%rsp)
vmovdqa 0x60(%rsp), %ymm0
vmovdqa 0x40(%rsp), %ymm1
vpminsd %ymm1, %ymm0, %ymm0
movq 0x38(%rsp), %rax
vmovdqa %ymm0, (%rax)
vmovdqa (%rsp), %ymm1
movq 0x30(%rsp), %rax
vmovdqa (%rax), %ymm0
vmovdqa %ymm1, 0xa0(%rsp)
vmovdqa %ymm0, 0x80(%rsp)
vmovdqa 0xa0(%rsp), %ymm0
vmovdqa 0x80(%rsp), %ymm1
vpmaxsd %ymm1, %ymm0, %ymm0
movq 0x30(%rsp), %rax
vmovdqa %ymm0, (%rax)
movq %rbp, %rsp
popq %rbp
vzeroupper
retq
nopw (%rax,%rax)
// File: sid1607[P]avx2-merge-sort/merge_sort.cpp
// Function: sort_columns(long long vector[4]&, long long vector[4]&, long long vector[4]&, long long vector[4]&, long long vector[4]&, long long vector[4]&, long long vector[4]&, long long vector[4]&)
inline void sort_columns(__m256i& row0, __m256i& row1, __m256i& row2, __m256i& row3,
                  __m256i& row4, __m256i& row5, __m256i& row6, __m256i& row7) {

    minmax(row0,row1);
    minmax(row2,row3);
    minmax(row4,row5);
    minmax(row6,row7);

    minmax(row0,row2);
    minmax(row1,row3);
    minmax(row4,row6);
    minmax(row5,row7);

    minmax(row1,row2);
    minmax(row0,row4);
    minmax(row5,row6);
    minmax(row3,row7);

    minmax(row1,row5);
    minmax(row2,row6);

    minmax(row1,row4);
    minmax(row3,row6);

    minmax(row2,row4);
    minmax(row3,row5);

    minmax(row3,row4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2d40
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2d40
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2d40
movq 0x10(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0x2d40
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2d40
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2d40
movq -0x28(%rbp), %rdi
movq 0x10(%rbp), %rsi
callq 0x2d40
movq -0x30(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0x2d40
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2d40
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x2d40
movq -0x30(%rbp), %rdi
movq 0x10(%rbp), %rsi
callq 0x2d40
movq -0x20(%rbp), %rdi
movq 0x18(%rbp), %rsi
callq 0x2d40
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2d40
movq -0x18(%rbp), %rdi
movq 0x10(%rbp), %rsi
callq 0x2d40
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x2d40
movq -0x20(%rbp), %rdi
movq 0x10(%rbp), %rsi
callq 0x2d40
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x2d40
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2d40
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x2d40
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movq 0x67c2(%rip), %rdi      # 0x9fd0
callq 0x20f0
movq %rax, %rdi
movq 0x678b(%rip), %rsi      # 0x9fa8
callq 0x2150
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3862
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq 0x678d(%rip), %rdi      # 0x9fd0
callq 0x21d0
movq %rax, %rdi
leaq 0x3896(%rip), %rsi      # 0x70e8
callq 0x2130
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3829
movq 0x6767(%rip), %rdi      # 0x9fd0
movq 0x6738(%rip), %rsi      # 0x9fa8
callq 0x2150
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
andq $-0x20, %rsp
subq $0x60, %rsp
vmovdqa %ymm0, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movq 0x672d(%rip), %rdi      # 0x9fd0
vzeroupper
callq 0x20f0
movq %rax, %rdi
movq 0x66f3(%rip), %rsi      # 0x9fa8
callq 0x2150
movl $0x0, 0x14(%rsp)
cmpl $0x8, 0x14(%rsp)
jge 0x38fa
movslq 0x14(%rsp), %rax
movl 0x20(%rsp,%rax,4), %esi
movq 0x66f7(%rip), %rdi      # 0x9fd0
callq 0x21d0
movq %rax, %rdi
leaq 0x3800(%rip), %rsi      # 0x70e8
callq 0x2130
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x38c2
movq 0x66cf(%rip), %rdi      # 0x9fd0
movq 0x66a0(%rip), %rsi      # 0x9fa8
callq 0x2150
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 $0x60, %rsp
vmovdqa %ymm0, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
cmpl $0x8, 0x14(%rsp)
jge 0x3a6f
movslq 0x14(%rsp), %rax
movl 0x20(%rsp,%rax,4), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x3a57
movb $0x0, 0x4f(%rsp)
jmp 0x3a74
movl 0x10(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x3a2f
movb $0x1, 0x4f(%rsp)
movb 0x4f(%rsp), %al
andb $0x1, %al
movq %rbp, %rsp
popq %rbp
vzeroupper
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x3ae2
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x18(%rbp), %eax
jge 0x3ac9
movb $0x0, -0x1(%rbp)
jmp 0x3ae6
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3aab
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3b64
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x20(%rbp), %eax
jge 0x3b2d
movb $0x0, -0x1(%rbp)
jmp 0x3b68
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x18(%rbp), %rcx
movslq -0x24(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
je 0x3b4b
movb $0x0, -0x1(%rbp)
jmp 0x3b68
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3b0f
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl $0x18, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x2100
movl %eax, %edi
callq 0x2120
callq 0x23a0
cmpl $0x2, -0x8(%rbp)
jne 0x40a1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x21a0
movl %eax, -0x18(%rbp)
jmp 0x40a8
movl $0x18, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jg 0x4169
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x4105
movl -0x24(%rbp), %edi
callq 0x3bb0
testb $0x1, %al
jne 0x40f8
movl $0x1, -0x4(%rbp)
jmp 0x4170
jmp 0x40fa
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x40db
movq 0x5ec4(%rip), %rdi      # 0x9fd0
leaq 0x2ff6(%rip), %rsi      # 0x7109
callq 0x2130
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x21d0
movq %rax, %rdi
leaq 0x2fbb(%rip), %rsi      # 0x70e8
callq 0x2130
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x21d0
movq %rax, %rdi
leaq 0x2ffa(%rip), %rsi      # 0x7141
callq 0x2130
movq %rax, %rdi
movq 0x5e52(%rip), %rsi      # 0x9fa8
callq 0x2150
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x40c8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x3cba
movq -0x18(%rbp), %rdi
callq 0x22a0
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x3cd5
movq -0x28(%rbp), %rdi
callq 0x22a0
movl $0x0, -0xc(%rbp)
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0x2c(%rbp)
addq $0x28, %rdi
callq 0x8b00
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jae 0x3d36
movq -0x20(%rbp), %rdi
addq $0x28, %rdi
movl -0xc(%rbp), %esi
callq 0x8b20
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x3d29
movq -0x38(%rbp), %rdi
callq 0x93c0
movq -0x38(%rbp), %rdi
movl $0x610, %esi            # imm = 0x610
callq 0x2210
jmp 0x3d2b
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3cdc
movq -0x20(%rbp), %rdi
addq $0x28, %rdi
callq 0x8f80
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movw %cx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movw %ax, -0x16(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq $0x0, -0x20(%rbp)
movl -0x14(%rbp), %edx
leaq -0x20(%rbp), %rsi
callq 0x8c50
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x4da8
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x28(%rbp), %rdx
movw 0x10(%rcx,%rdx,2), %cx
movw %cx, -0x2a(%rbp)
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, -0x44(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movzwl -0x2a(%rbp), %edi
callq 0x8b80
movl %eax, -0x48(%rbp)
movzwl -0x2a(%rbp), %edi
callq 0x8ba0
movl -0x48(%rbp), %edi
movl %eax, %esi
callq 0x8bc0
movl -0x44(%rbp), %edx
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rdi
movzwl -0x2a(%rbp), %esi
callq 0x93d0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4d30
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movzwl -0x16(%rbp), %esi
callq 0x9400
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x94a0
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x4e1f
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movzwl 0x410(%rax,%rcx,2), %esi
callq 0x9400
cmpl $-0x1, %eax
jne 0x4e12
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movzwl 0x410(%rax,%rcx,2), %esi
callq 0x9470
jmp 0x4e14
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4dcf
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x4e44
movq -0x58(%rbp), %rdi
callq 0x93c0
movq -0x58(%rbp), %rdi
movl $0x610, %esi            # imm = 0x610
callq 0x2210
movq -0x38(%rbp), %rdi
addq $0x28, %rdi
movl -0x24(%rbp), %esi
callq 0x8f40
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movw %dx, %ax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movw %ax, -0x16(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movzwl -0x16(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x58c2
movb $0x0, -0x1(%rbp)
jmp 0x5a36
movzwl -0x16(%rbp), %edi
callq 0x8b80
movl %eax, -0x1c(%rbp)
movzwl -0x16(%rbp), %edi
callq 0x8ba0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, -0x20(%rbp)
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x1c(%rbp), %edi
addl $0x1, %edi
movl -0x20(%rbp), %esi
callq 0x8bc0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
je 0x5932
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %edi
addl $0x1, %edi
movl -0x20(%rbp), %esi
callq 0x8bc0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x5a32
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %edi
subl $0x1, %edi
movl -0x20(%rbp), %esi
callq 0x8bc0
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
je 0x5988
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movl -0x1c(%rbp), %edi
subl $0x1, %edi
movl -0x20(%rbp), %esi
callq 0x8bc0
movl %eax, %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x5a32
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
addl $0x1, %esi
callq 0x8bc0
movl %eax, %ecx
movq -0x50(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
je 0x59da
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
addl $0x1, %esi
callq 0x8bc0
movl %eax, %ecx
movq -0x58(%rbp), %rax
movslq %ecx, %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x5a32
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
subl $0x1, %esi
callq 0x8bc0
movl %eax, %ecx
movq -0x60(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
je 0x5a2c
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
subl $0x1, %esi
callq 0x8bc0
movl %eax, %ecx
movq -0x68(%rbp), %rax
movslq %ecx, %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x5a32
movb $0x1, -0x1(%rbp)
jmp 0x5a36
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0x0, -0x15(%rbp)
callq 0x8ed0
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0xe761(%rip), %eax      # 0x141f0
jg 0x5b2b
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0xe74b(%rip), %eax      # 0x141f0
jg 0x5b1b
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x20(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x8bc0
movl %eax, -0x4c(%rbp)
jmp 0x5ac2
movq -0x58(%rbp), %rax
movl -0x4c(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x5b0e
movl -0x20(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x8c30
movw %ax, -0x5a(%rbp)
jmp 0x5ae3
movq -0x48(%rbp), %rdi
movw -0x5a(%rbp), %ax
movzwl %ax, %esi
callq 0x8ef0
jmp 0x5af5
jmp 0x5b0e
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x8f30
jmp 0x5b48
jmp 0x5b10
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x5a9c
jmp 0x5b1d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5a86
movb $0x1, -0x15(%rbp)
testb $0x1, -0x15(%rbp)
jne 0x5b3e
movq -0x48(%rbp), %rdi
callq 0x8f30
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2350
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movzwl -0x12(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x69bc
movb $0x0, -0x1(%rbp)
jmp 0x6a22
movzwl -0x12(%rbp), %edi
callq 0x8b80
movl %eax, -0x18(%rbp)
movzwl -0x12(%rbp), %edi
callq 0x8ba0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x8bc0
movq -0x30(%rbp), %rdi
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
leaq -0x28(%rbp), %rsi
callq 0x8c50
movq -0x28(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x6a1e
movb $0x1, -0x1(%rbp)
jmp 0x6a22
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movzwl -0x12(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x6a5e
movw $0x8000, -0x2(%rbp)     # imm = 0x8000
jmp 0x6ad1
movzwl -0x12(%rbp), %edi
callq 0x8b80
movl %eax, -0x18(%rbp)
movzwl -0x12(%rbp), %edi
callq 0x8ba0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x8bc0
movq -0x30(%rbp), %rdi
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
leaq -0x28(%rbp), %rsi
callq 0x8c50
movq -0x28(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x6acb
movq -0x28(%rbp), %rax
movw 0x410(%rax), %ax
movw %ax, -0x2(%rbp)
jmp 0x6ad1
movw $0x8000, -0x2(%rbp)     # imm = 0x8000
movw -0x2(%rbp), %ax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)