LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: clear_strip(int**)
void clear_strip(int **strip){
    //cout << "clear_strip()" << endl;
    for (int i = 0; i < strip_width; i++) {
        for (int j = 0; j < strip_height; j++) {
            strip[i][j] = 0;
        }
    }
}

// Assembly:
xorl %eax, %eax
movslq 0xb0f8(%rip), %rcx      # 0x11370
cmpq %rcx, %rax
jge 0x629d
xorl %ecx, %ecx
movslq 0xb0ee(%rip), %rdx      # 0x11374
cmpq %rdx, %rcx
jge 0x6298
movq (%rdi,%rax,8), %rdx
andl $0x0, (%rdx,%rcx,4)
incq %rcx
jmp 0x627f
incq %rax
jmp 0x6271
retq
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: search_fit(int, int, int, int&, int&, int&, int**)
bool search_fit(int item, int item_w, int item_h, int &a, int &b, int &h, int **strip){
    //cout << "search_fit()" << endl;
    bool fit = true;

    for (int y = 0; y < strip_height; y++)
    {
        for (int x = 0; x < strip_width; x++)
        {
            if (strip[x][y]  == 0 && item_w + x - 1 < strip_width) // empty space
            {
                for (a = x; a < x + item_w; a++)
                {
                    if (strip[a][y] != 0 || strip[a][y+item_h-1] != 0)
                    {
                        fit = false;
                        break;
                    }
                }
                if(fit)
                {
                    for (b = y; b < y + item_h; b++)
                    {
                        if (strip[x][b] != 0 || strip[x+item_w-1][b] != 0)
                        {
                            fit = false;
                            break;
                        }
                    }
                }

                if (fit){
                    a = x;
                    b = y;
                    if (h < b + item_h){
                        h = b + item_h;
                    }
                    return fit;
                }
            }
            else
            {
                if (item_w + x >= strip_width)
                {
                    x = strip_width;
                }
                else
                {
                    x = x + bs[strip[x][y]-1].width - 1;
                }
            }
            fit = true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, -0x10(%rsp)
movq 0x38(%rsp), %r10
movslq %edx, %r9
xorl %eax, %eax
movq %r9, -0x8(%rsp)
movslq 0xb08e(%rip), %rdi      # 0x11374
cmpq %rdi, %rax
jge 0x63b5
leaq (%rax,%r9), %rbx
movq 0xb05e(%rip), %r14      # 0x11358
addq $-0x4, %r14
xorl %r15d, %r15d
movl 0xb069(%rip), %ebp      # 0x11370
cmpl %ebp, %r15d
jge 0x6390
movslq %r15d, %r11
movq (%r10,%r11,8), %r12
movslq (%r12,%rax,4), %r13
leal (%r15,%rsi), %r9d
testq %r13, %r13
jne 0x634c
cmpl %ebp, %r9d
jg 0x634c
movslq %r9d, %r13
movl %r11d, (%rcx)
cmpq %r13, %r11
jge 0x6361
movq (%r10,%r11,8), %r9
cmpl $0x0, (%r9,%rax,4)
jne 0x6383
incq %r11
cmpl $0x0, -0x4(%r9,%rbx,4)
je 0x632c
jmp 0x6383
cmpl %ebp, %r9d
jge 0x6386
imulq $0xc, %r13, %r9
movl (%r14,%r9), %r9d
leal (%r15,%r9), %ebp
decl %ebp
jmp 0x6386
movq %rax, %r11
movl %r11d, (%r8)
cmpq %rbx, %r11
jge 0x639d
cmpl $0x0, (%r12,%r11,4)
jne 0x6383
movq -0x8(%r10,%r13,8), %r9
cmpl $0x0, (%r9,%r11,4)
leaq 0x1(%r11), %r11
je 0x6364
movl %r15d, %ebp
incl %ebp
movl %ebp, %r15d
jmp 0x6301
incq %rax
movq -0x8(%rsp), %r9
jmp 0x62df
movl %r15d, (%rcx)
movl %eax, (%r8)
addl %eax, %edx
movq -0x10(%rsp), %rcx
cmpl %edx, (%rcx)
jge 0x63b5
movq -0x10(%rsp), %rcx
movl %edx, (%rcx)
cmpq %rdi, %rax
setl %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: is_in(solution, std::vector<solution, std::allocator<solution>>)
bool is_in(solution tmp, vector<solution> tmp_sols)
{
    bool all = true;
    for (int i = 0; i < (int)tmp_sols.size(); i++) {
        for (int j = 0; j < (int)tmp.items.size(); j++) {
            if(tmp.items[j] != tmp_sols[i].items[j]){
                all = false;
            }
            if(!all){
                break;
            }
        }
    }
    return all;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rsi), %r8
movq 0x8(%rsi), %rax
subq %r8, %rax
movabsq $0x60, %rcx
cqto
idivq %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
movb $0x1, %cl
xorl %esi, %esi
cmpq %rax, %rsi
je 0x6434
movq (%rdi), %r9
movq 0x8(%rdi), %r10
subq %r9, %r10
shrq $0x2, %r10
imulq $0x60, %rsi, %r11
addq %r8, %r11
testl %r10d, %r10d
cmovlel %edx, %r10d
xorl %ebx, %ebx
cmpq %rbx, %r10
je 0x642f
movl (%r9,%rbx,4), %ebp
movq (%r11), %r14
cmpl (%r14,%rbx,4), %ebp
movzbl %cl, %ecx
cmovnel %edx, %ecx
incq %rbx
testb $0x1, %cl
jne 0x6411
incq %rsi
jmp 0x63ee
andb $0x1, %cl
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: place_item(int, int, int, int, int, int**)
void place_item(int item, int item_w, int item_h, int a, int b, int **strip){
    //cout << "place_item()" << endl;
    for (int i = a; i < a + item_w; i++) {
        for (int j = b; j < b + item_h; j++) {
            strip[i][j] = item;
        }
    }
}

// Assembly:
addl %ecx, %esi
addl %r8d, %edx
movslq %r8d, %rax
movslq %edx, %rdx
movslq %ecx, %rcx
movslq %esi, %rsi
movq %rax, %r8
cmpq %rsi, %rcx
jl 0x6464
jmp 0x646e
movq (%r9,%rcx,8), %r10
movl %edi, (%r10,%r8,4)
incq %r8
cmpq %rdx, %r8
jl 0x6459
incq %rcx
jmp 0x644f
retq
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: fitness_calculation_one(solution&)
void fitness_calculation_one(solution &tmp){

    //cout << "fitness_calculation_one()" << endl;
    int j;
    int n = (int)tmp.items.size();
    int item, item_w, item_h;
    int a, b;

    tmp.height  = 0;
    tmp.fitness = 0.0;
    tmp.p = 0.0;
    clear_strip(tmp.strip);

    for (j = 0; j < n; j++)
    {
        a = 0;
        b = 0;
        item   = tmp.items[j];
        item_w = bs.at(item-1).width;
        item_h = bs.at(item-1).height;
        if(search_fit(item,item_w,item_h, a, b, tmp.height, tmp.strip)){
            place_item(item,item_w,item_h, a, b, tmp.strip);
            tmp.a[j] = a;
            tmp.b[j] = b;
        }
        tmp.p += item_w * item_h;
    }
    tmp.p = (tmp.p*100)/(float)(strip_width * tmp.height);
    tmp.fitness = tmp.height;
    //print_one_solution(tmp);
    //print_strip(tmp);
    //getchar();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r14
subq (%rdi), %r14
shrq $0x2, %r14
leaq 0x4c(%rdi), %rax
movq %rax, 0x18(%rsp)
andl $0x0, 0x50(%rdi)
andq $0x0, 0x48(%rdi)
movq 0x58(%rdi), %rdi
callq 0x626f
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
movq %r14, 0x20(%rsp)
cmpq %r15, 0x20(%rsp)
je 0x656b
andl $0x0, 0x14(%rsp)
andl $0x0, 0x10(%rsp)
movq (%rbx), %rax
movslq (%rax,%r15,4), %r12
leaq -0x1(%r12), %r13
leaq 0xae7b(%rip), %r14      # 0x11358
movq %r14, %rdi
movq %r13, %rsi
callq 0x7420
movl 0x8(%rax), %ebp
movq %r14, %rdi
movq %r13, %rsi
callq 0x7420
movl 0x4(%rax), %r13d
movq 0x58(%rbx), %rax
movq %rax, (%rsp)
movl %ebp, %esi
movl %r13d, %edx
leaq 0x14(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0x62c1
testb %al, %al
je 0x6550
movl 0x14(%rsp), %r14d
movl 0x10(%rsp), %r8d
movq 0x58(%rbx), %r9
movl %r12d, %edi
movl %ebp, %esi
movl %r13d, %edx
movl %r14d, %ecx
movl %r8d, %r12d
callq 0x643e
movq 0x18(%rbx), %rax
movl %r14d, (%rax,%r15,4)
movq 0x30(%rbx), %rax
movl %r12d, (%rax,%r15,4)
imull %ebp, %r13d
cvtsi2ss %r13d, %xmm0
addss 0x48(%rbx), %xmm0
movss %xmm0, 0x48(%rbx)
incq %r15
jmp 0x64b5
movss 0x48(%rbx), %xmm0
movl 0x4c(%rbx), %eax
movl 0xadf7(%rip), %ecx      # 0x11370
imull %eax, %ecx
cvtsi2ss %ecx, %xmm1
mulss 0x4a7c(%rip), %xmm0     # 0xb004
divss %xmm1, %xmm0
movss %xmm0, 0x48(%rbx)
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x50(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: solutions_improvement(std::vector<solution, std::allocator<solution>>&)
void solutions_improvement(vector<solution> &tmp_sols)
{
    //cout << "solutions_improvement()" << endl;
    int N = (int)bs.size();
    int counter = 0;
    int a, b, tmp, before, after;
    for (int i = 0; i < (int)tmp_sols.size(); i++) {

        // Swap
        before = tmp_sols[i].fitness;
        while(counter < N/4)
        {
            a = (rand() % (N));
            b = (rand() % (N));

            tmp = tmp_sols[i].items[a];
            tmp_sols[i].items[a] = tmp_sols[i].items[b];
            tmp_sols[i].items[b] = tmp;

            fitness_calculation_one(tmp_sols[i]);

            after = tmp_sols[i].fitness;
            if ( after < before){
                counter = N;
            }

            counter++;
        }
        counter = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0xaae6(%rip), %rax      # 0x11360
subq 0xaad7(%rip), %rax      # 0x11358
pushq $0xc
popq %rcx
cqto
idivq %rcx
movq %rax, %r14
pushq $0x4
popq %rcx
cltd
idivl %ecx
movl %eax, 0xc(%rsp)
movq (%rdi), %rcx
xorl %esi, %esi
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
pushq $0x60
popq %rdi
idivq %rdi
cltq
cmpq %rax, %rsi
jge 0x6923
movq %rsi, 0x10(%rsp)
imulq $0x60, %rsi, %r13
cvttss2si 0x50(%rcx,%r13), %r12d
xorl %ebp, %ebp
cmpl 0xc(%rsp), %ebp
jge 0x6916
callq 0x4090
cltd
idivl %r14d
movl %edx, %r15d
callq 0x4090
cltd
idivl %r14d
movq (%rbx), %rdi
movslq %r15d, %rax
movq (%rdi,%r13), %rcx
addq %r13, %rdi
movl (%rcx,%rax,4), %esi
movslq %edx, %rdx
movl (%rcx,%rdx,4), %r8d
movl %r8d, (%rcx,%rax,4)
movl %esi, (%rcx,%rdx,4)
callq 0x646f
movq (%rbx), %rcx
cvttss2si 0x50(%rcx,%r13), %eax
cmpl %r12d, %eax
cmovll %r14d, %ebp
incl %ebp
jmp 0x68c3
movq 0x10(%rsp), %rsi
incq %rsi
jmp 0x689b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: refset_build()
void refset_build()
{
    //cout << "refset_build()" << endl;
    int i;
    vector<solution> tmp;
    // Order solutions by the fitness
    for (i = 0; i < popsize; i++) {
        tmp.push_back(sols[i]);
    }
    sort_solutions(tmp);
    // Select the «b» best solutions and adding to RefSet
    for (i = 0; i < b; i++) {
        refset.push_back(tmp[i]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsp, %rbx
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpb $0x1, 0xaa2a(%rip)      # 0x11380
jne 0x6979
cmpq $0x31, %r15
ja 0x6979
movq 0xa933(%rip), %rsi      # 0x11298
addq %r14, %rsi
movq %rbx, %rdi
callq 0x7464
incq %r15
addq $0x60, %r14
jmp 0x694f
movq %rsp, %rdi
callq 0x62ab
xorl %r14d, %r14d
leaq 0xa925(%rip), %rbx      # 0x112b0
cmpq $0x3c0, %r14            # imm = 0x3C0
je 0x69a9
movq (%rsp), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x7464
addq $0x60, %r14
jmp 0x698b
movq %rsp, %rdi
callq 0x4b28
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x69bf
jmp 0x69bf
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4b28
movq %rbx, %rdi
callq 0x4440
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: save_best_solution(std::vector<solution, std::allocator<solution>>)
void save_best_solution(vector<solution> tmp)
{
    //cout << "save_best_solution()" << endl;
    sort_solutions(tmp);
    best = tmp[0];
    fitness_calculation_one(best);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x62ab
movq (%rbx), %rsi
leaq 0xa913(%rip), %rbx      # 0x112f8
movq %rbx, %rdi
callq 0x4fb8
movq %rbx, %rdi
popq %rbx
jmp 0x646f
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: refset_modification(std::vector<solution, std::allocator<solution>>)
void refset_modification(vector<solution> tmp_sols)
{
    //cout << "refset_modification()" << endl;

    int i;
    vector<solution> tmp;

    // Adding «new_set» elements
    for (i = 0; i < b*(b-1)/2; i++) {
        tmp.push_back(tmp_sols[i]);
    }

    // Adding previous «refset» elements
    for (i = 0; i < b; i++) {
        tmp.push_back(refset[i]);
    }

    // Sorting «tmp» solutions
    sort_solutions(tmp);

    // Removing all «refset« values
    refset.clear();

    // Adding new «b» «refset» values
    for (i = 0; i < b; i++) {
        refset.push_back(tmp[i]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
xorl %r15d, %r15d
cmpq $0x10e0, %r15           # imm = 0x10E0
je 0x6e84
movq (%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x7464
addq $0x60, %r15
jmp 0x6e67
xorl %r14d, %r14d
movq %rsp, %rbx
cmpq $0x3c0, %r14            # imm = 0x3C0
je 0x6eab
movq 0xa416(%rip), %rsi      # 0x112b0
addq %r14, %rsi
movq %rbx, %rdi
callq 0x7464
addq $0x60, %r14
jmp 0x6e8a
movq %rsp, %rdi
callq 0x62ab
leaq 0xa3f6(%rip), %rbx      # 0x112b0
movq %rbx, %rdi
callq 0x743e
xorl %r14d, %r14d
cmpq $0x3c0, %r14            # imm = 0x3C0
je 0x6ee3
movq (%rsp), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x7464
addq $0x60, %r14
jmp 0x6ec5
movq %rsp, %rdi
callq 0x4b28
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x6efb
jmp 0x6efb
jmp 0x6efb
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4b28
movq %rbx, %rdi
callq 0x4440
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: shift_left(solution)
solution shift_left(solution tmp)
{
    int n = (int)tmp.items.size();
    int value = tmp.items[0];
    for (int i = 0; i < n; i++) {
        tmp.items[i] = tmp.items[i+1];
    }
    tmp.items[n-1] = value;
    return tmp;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
movq %rcx, %rdi
shrq $0x2, %rdi
movl (%rax), %edx
xorl %r8d, %r8d
testl %edi, %edi
cmovlel %r8d, %edi
cmpq %r8, %rdi
je 0x6f41
movl 0x4(%rax,%r8,4), %r9d
movl %r9d, (%rax,%r8,4)
incq %r8
jmp 0x6f2e
shlq $0x1e, %rcx
movabsq $-0x100000000, %rdi     # imm = 0xFFFFFFFF00000000
addq %rcx, %rdi
sarq $0x1e, %rdi
movl %edx, (%rax,%rdi)
movq %rbx, %rdi
callq 0x74e2
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: solutions_improvement2(std::vector<solution, std::allocator<solution>>)
vector<solution> solutions_improvement2(vector<solution> tmp)
{
    //cout << "solutions_improvement2()" << endl;

    vector<solution> candidates, final;
    solution tmp_sol;
    for (int i = 0; i < tmp.size(); i++) {

        int j = 0, v = 0, diff = 0;
        candidates.clear();
        tmp_sol = tmp[i];
        while(j < (int)tmp_sol.items.size()/3)
        {
            tmp_sol = shift_left(tmp_sol);
            fitness_calculation_one(tmp_sol);
            if(abs(tmp[i].fitness - tmp_sol.fitness) > diff)
            {
                diff = abs(tmp[i].fitness - tmp_sol.fitness);
                v = j;
            }
            j++;
            candidates.push_back(tmp_sol);
        }
        final.push_back(candidates[v]);
    }
    return final;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rsi, %rbx
leaq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movaps %xmm0, (%rax)
movq %rdi, (%rsp)
movups %xmm0, (%rdi)
leaq 0x40(%rsp), %r12
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
andq $0x0, 0x40(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
xorl %r14d, %r14d
leaq 0xa8(%rsp), %r13
leaq 0x108(%rsp), %rbp
movq %rsi, 0x8(%rsp)
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cqto
pushq $0x60
popq %rcx
idivq %rcx
cmpq %r14, %rax
jbe 0x70dd
leaq 0x10(%rsp), %rdi
callq 0x743e
movq %r14, 0x30(%rsp)
imulq $0x60, %r14, %rcx
movq (%rbx), %rsi
movq %rcx, 0x38(%rsp)
addq %rcx, %rsi
movq %r12, %rdi
callq 0x4fb8
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
shrq $0x2, %rax
cltd
pushq $0x3
popq %rcx
idivl %ecx
cmpl %eax, %ebx
jge 0x70b6
movq %r13, %rdi
movq %r12, %rsi
callq 0x4c28
movq %rbp, %rdi
movq %r13, %rsi
callq 0x6f0e
movq %r12, %rdi
movq %rbp, %rsi
callq 0x753e
movq %rbp, %rdi
callq 0x4c8c
movq %r13, %rdi
callq 0x4c8c
movq %r12, %rdi
callq 0x646f
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movss 0x50(%rax,%rcx), %xmm0
subss 0x90(%rsp), %xmm0
andps 0x3f82(%rip), %xmm0     # 0xb010
cvtsi2ss %r15d, %xmm1
ucomiss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cmoval %ebx, %r14d
cmoval %eax, %r15d
incl %ebx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7464
jmp 0x7016
movslq %r14d, %rax
imulq $0x60, %rax, %rsi
addq 0x10(%rsp), %rsi
movq (%rsp), %rdi
callq 0x7464
movq 0x30(%rsp), %r14
incq %r14
movq 0x8(%rsp), %rbx
jmp 0x6fd0
leaq 0x40(%rsp), %rdi
callq 0x4c8c
leaq 0x10(%rsp), %rdi
callq 0x4b28
movq (%rsp), %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x710b
jmp 0x710b
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x4c8c
movq (%rsp), %rdi
callq 0x4b28
leaq 0x10(%rsp), %rdi
callq 0x4b28
movq %r14, %rdi
callq 0x4440
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: refset_rebuild()
void refset_rebuild()
{
    //cout << "refset_rebuild()" << endl;
    // Removing the worst b/2 solutions
    sort_solutions(refset);
    refset.erase(refset.end()-(b/2), refset.end());

    // Generating «popsize» best random + local search
    vector<solution> new_sols;
    solutions_generation(new_sols);
    fitness_calculation(new_sols);
    new_sols = solutions_improvement2(new_sols);

    // Choosing the b/2 worst solutions
    sort_solutions(new_sols);
    refset.erase(refset.begin(),refset.end()-(b/2));

    for (int i = 0; i < (b/2); i++)
    {
        refset.push_back(new_sols[i]);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq 0xa16f(%rip), %rbx      # 0x112b0
movq %rbx, %rdi
callq 0x62ab
movq 0xa168(%rip), %rdx      # 0x112b8
leaq -0x1e0(%rdx), %rsi
movq %rbx, %rdi
callq 0x7584
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x65f1
movq %rsp, %rdi
callq 0x65a9
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x4ace
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x6f66
movq %rsp, %rbx
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x51aa
movq %r14, %rdi
callq 0x4b28
leaq 0x18(%rsp), %rdi
callq 0x4b28
movq %rbx, %rdi
callq 0x62ab
movq 0xa0e6(%rip), %rsi      # 0x112b0
leaq 0xa0df(%rip), %rdi      # 0x112b0
movq $-0x1e0, %rdx           # imm = 0xFE20
addq 0xa0d9(%rip), %rdx      # 0x112b8
callq 0x7584
xorl %r14d, %r14d
leaq 0xa0c2(%rip), %rbx      # 0x112b0
cmpq $0x1e0, %r14            # imm = 0x1E0
je 0x720c
movq (%rsp), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x7464
addq $0x60, %r14
jmp 0x71ee
movq %rsp, %rdi
callq 0x4b28
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x7231
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4b28
jmp 0x7234
jmp 0x7231
jmp 0x7231
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4b28
movq %rbx, %rdi
callq 0x4440
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: get_difference(std::vector<solution, std::allocator<solution>>, std::vector<solution, std::allocator<solution>>)
int get_difference(vector<solution> before, vector<solution> after)
{
    //cout << "get_difference()" << endl;
    int total = 0;
    for (int i = 0; i < b; i++) {
        total += abs(before[i].fitness-after[i].fitness);
    }
    return total;
}

// Assembly:
movq (%rdi), %rcx
movq (%rsi), %rdx
xorl %esi, %esi
movaps 0x3dbd(%rip), %xmm0     # 0xb010
xorl %eax, %eax
cmpq $0x3c0, %rsi            # imm = 0x3C0
je 0x727f
movss 0x50(%rcx,%rsi), %xmm1
subss 0x50(%rdx,%rsi), %xmm1
andps %xmm0, %xmm1
cvtsi2ss %eax, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %eax
addq $0x60, %rsi
jmp 0x7255
retq
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/upload.cpp
// Function: main
int main(int argc, char *argv[])
{
	unsigned short port = 65535;

	if (argc < 3)
	{
		printf("Usage: upload filename port\r\n");
		return 0;
	}

	port = atoi(argv[2]);

	printf("Attempting to upload %s to client connecting on port %d\r\n", argv[1], (int)port);
	file_upload(argv[1], port);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x2, %edi
jg 0x1725
leaq 0xab7(%rip), %rdi       # 0x21d5
callq 0x11b0
jmp 0x1756
movq %rsi, %rbx
movq 0x10(%rsi), %rdi
callq 0x11c0
movq 0x8(%rbx), %rsi
movzwl %ax, %r14d
leaq 0x94e(%rip), %rdi       # 0x208e
movl %r14d, %edx
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %rdi
movl %r14d, %esi
callq 0x14f0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Audio.cc
// Function: Audio::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Audio::init(const std::string &str) {
    if (is_dir(str)) {
        from_dir(str);
    } else if (is_json(str)) {
        from_json(str);
    } else if (is_wav(str)) {
        from_file(str);
    } else {
        std::cout << "not json or wav or dir" << std::endl;
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6e38
testb %al, %al
je 0x6341
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6408
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6e68
testb %al, %al
je 0x6362
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6580
movq %r14, %rdi
movq %rbx, %rsi
callq 0x68f2
testb %al, %al
je 0x6383
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x697e
movq 0xbc2e(%rip), %rdi      # 0x11fb8
leaq 0x6164(%rip), %rsi      # 0xc4f5
callq 0x3310
movq %rax, %rdi
callq 0x3180
pushq $0x1
popq %rdi
callq 0x33b0
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Audio.cc
// Function: Audio::from_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Audio::from_dir(const std::string &str) {
    bool has_file = false;
    // 目录	List
    for (int i = 0; i < 256; i++) {
        if (wav_datas[i].data) continue;
        if (read_wav(str + "/" + KEYS[i].first + ".wav", wav_datas[i])) {
            has_file = true;
            datas[KEYS[i].second] = i;
        }
        else {
            datas[KEYS[i].second] = 0;
        }
    }

    if (!has_file) {
        std::cout << "there's no file exist in " << str << std::endl;
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
leaq 0xbf18(%rip), %r12      # 0x12340
xorl %edx, %edx
leaq 0x48(%rsp), %rbx
leaq 0x68(%rsp), %rbp
movq %rdi, %r14
xorl %esi, %esi
cmpq $0x100, %rdx            # imm = 0x100
je 0x6505
cmpq $0x0, (%r14)
jne 0x64f5
movq %rsi, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq 0x8(%rsp), %rsi
leaq 0x60e2(%rip), %rdx      # 0xc550
callq 0x6ec1
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, 0x20(%rsp)
movq %r12, %rdx
callq 0x6ea2
movq %rbp, %rdi
movq %rbx, %r12
movq %rbx, %rsi
leaq 0x60bc(%rip), %rdx      # 0xc552
callq 0x6e83
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x69f2
movl %eax, %r13d
movq %rbp, %rdi
callq 0x3618
movq %r12, %rdi
callq 0x3618
leaq 0x28(%rsp), %rdi
callq 0x3618
movq %r12, %rbx
testb %r13b, %r13b
movl $0x0, %eax
movq 0x18(%rsp), %rdx
cmovnel %edx, %eax
movq 0x10(%rsp), %rsi
orb %r13b, %sil
movq 0x20(%rsp), %r12
movzwl 0x20(%r12), %ecx
movw %ax, 0x1000(%r15,%rcx,2)
incq %rdx
addq $0x28, %r12
addq $0x10, %r14
jmp 0x6439
testb $0x1, %sil
je 0x651d
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xba94(%rip), %rdi      # 0x11fb8
leaq 0x602c(%rip), %rsi      # 0xc557
callq 0x3310
movq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x32a0
movq %rax, %rdi
callq 0x3180
pushq $0x1
popq %rdi
callq 0x33b0
movq %rax, %rbx
jmp 0x6564
movq %rax, %rbx
jmp 0x656e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3618
leaq 0x48(%rsp), %rdi
callq 0x3618
leaq 0x28(%rsp), %rdi
callq 0x3618
movq %rbx, %rdi
callq 0x3570
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Audio.cc
// Function: Audio::is_wav(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool Audio::is_wav(const std::string &str) const {
    WAVE_HEADER header;
    std::ifstream f(str);

    if (f.is_open()) {
        f.read((char *)&header, sizeof(WAVE_HEADER));
        f.close();
        return tag_is_right(header.riff_id, header.riff_type);
    } else {
        f.close();
        return false;
    }
}

// Assembly:
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
leaq 0x38(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x34f0
leaq 0xb0(%rsp), %rdi
callq 0x30c0
testb %al, %al
je 0x6947
leaq 0x38(%rsp), %rdi
leaq 0xc(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x33e0
leaq 0x38(%rsp), %rdi
callq 0x3090
leaq 0x14(%rsp), %rdx
leaq 0xc(%rsp), %rsi
callq 0x6b82
movl %eax, %ebx
jmp 0x6953
leaq 0x38(%rsp), %rdi
callq 0x3090
xorl %ebx, %ebx
leaq 0x38(%rsp), %rdi
callq 0x30e0
movl %ebx, %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbx
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x30e0
movq %rbx, %rdi
callq 0x3570
nop
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Audio.cc
// Function: Audio::from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Audio::from_file(const std::string &str) {
    // 单独的音乐文件	Load separate music from file
    if (read_wav(str, wav_datas[0])) {
        for (int i = 1; i < 256; i++) {
            datas[i] = 0;
        }
    } else {
        std::cout << "read " << str << "error" << std::endl;
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, %rdx
callq 0x69f2
testb %al, %al
je 0x69b4
xorl %eax, %eax
cmpq $0xff, %rax
je 0x69ac
andw $0x0, 0x1002(%rbx,%rax,2)
incq %rax
jmp 0x6996
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xb5fd(%rip), %rdi      # 0x11fb8
leaq 0x5bfa(%rip), %rsi      # 0xc5bc
callq 0x3310
movq %rax, %rdi
movq %r14, %rsi
callq 0x32a0
leaq 0x621f(%rip), %rsi      # 0xcbf8
movq %rax, %rdi
callq 0x3310
movq %rax, %rdi
callq 0x3180
pushq $0x1
popq %rdi
callq 0x33b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Audio.cc
// Function: Audio::tag_is_right(unsigned char const*, unsigned char const*) const
bool Audio::tag_is_right(const uint8_t *riff_id, const uint8_t *riff_type) const {
    return (riff_id[0] == 'R' && riff_id[1] == 'I' &&
           riff_id[2] == 'F' && riff_id[3] == 'F' &&
           riff_type[0] == 'W' && riff_type[1] == 'A' &&
           riff_type[2] == 'V' && riff_type[3] == 'E');
}

// Assembly:
cmpb $0x52, (%rsi)
jne 0x6bb2
cmpb $0x49, 0x1(%rsi)
jne 0x6bb2
cmpb $0x46, 0x2(%rsi)
jne 0x6bb2
cmpb $0x46, 0x3(%rsi)
jne 0x6bb2
cmpb $0x57, (%rdx)
jne 0x6bb2
cmpb $0x41, 0x1(%rdx)
jne 0x6bb2
cmpb $0x56, 0x2(%rdx)
jne 0x6bb2
cmpb $0x45, 0x3(%rdx)
sete %al
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Audio.cc
// Function: Audio::get_wav_by_code(unsigned short)
WAV_DATA Audio::get_wav_by_code(uint16_t code) {
    if (code > 255) {
        return {nullptr, 0, 0, 0};
    } else if (datas[code] > 255) {
        return {nullptr, 0, 0, 0};
    }
    return wav_datas[datas[code]];
}

// Assembly:
xorl %eax, %eax
movl $0x0, %edx
cmpw $0xff, %si
ja 0x6beb
movzwl %si, %eax
movzwl 0x1000(%rdi,%rax,2), %ecx
xorl %eax, %eax
movl $0x0, %edx
cmpq $0xff, %rcx
ja 0x6beb
shll $0x4, %ecx
movq (%rdi,%rcx), %rax
movq 0x8(%rdi,%rcx), %rdx
retq
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/DeviceDetect.cc
// Function: get_event_id(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static std::string get_event_id(std::string buf) {
    auto pos = buf.find("event");

    // 未找到event	if the event was not found
    if (pos == std::string::npos) return "";

    auto pos_stop = buf.find("/", pos);
    if (pos_stop == std::string::npos) pos_stop = buf.size();

    auto event_id = buf.substr(pos+5, pos_stop-pos-1);

    return event_id;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4c07(%rip), %rsi      # 0xc69e
movq %r14, %rdi
xorl %edx, %edx
callq 0x3600
cmpq $-0x1, %rax
je 0x7ae0
movq %rax, %r15
leaq 0x4a9f(%rip), %rsi      # 0xc550
movq %r14, %rdi
movq %rax, %rdx
callq 0x3600
cmpq $-0x1, %rax
jne 0x7ac6
movq 0x8(%r14), %rax
leaq 0x5(%r15), %rdx
notq %r15
addq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x3350
jmp 0x7af4
leaq 0x4e88(%rip), %rsi      # 0xc96f
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x6efa
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::Mixer(unsigned int)
Mixer::Mixer(uint32_t buffer_len) : buffer_len(buffer_len) {
    if (buffer_len == 0) {
        buffer = nullptr;
        pos = buffer;
        buffer_start = buffer;
        buffer_end = buffer;
        std::cout << "buffer_len is 0" << std::endl;
        return;
    }

    buffer = new uint8_t[buffer_len];
    pos = buffer;
    buffer_start = buffer;
    buffer_end = buffer_start + buffer_len;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl %esi, 0x28(%rdi)
testl %esi, %esi
je 0x81ff
movl %esi, %r14d
movq %r14, %rdi
callq 0x3030
movq %rax, 0x30(%rbx)
movq %rax, 0x40(%rbx)
movq %rax, 0x38(%rbx)
addq %r14, %rax
movq %rax, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movq 0x9daa(%rip), %rdi      # 0x11fb8
leaq 0x45f1(%rip), %rsi      # 0xc806
callq 0x3310
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3180
nop
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::mix8(unsigned char*, unsigned int)
void Mixer::mix8(uint8_t *buf, uint32_t size) {
    if (buffer_end - pos < size) {
        // 传入的size要比pos 到 end大		The incoming size is larger than "pos" to "end"
        mtx.lock();
        for (int i = 0; i < buffer_end - pos; i++) {
            uint8_t A = *(pos + i);
            uint8_t B = *(buf + i);
            *(pos+i) = mix_uint8(A, B);
        }

        for (int i = 0; i < size - (buffer_end - pos); i++) {
            uint8_t A = *(buffer_start + i);
            uint8_t B = *(buf + (buffer_end - pos) + i);
            *(buffer_start+i) = mix_uint8(A, B);
        }

        mtx.unlock();
    } else {
        mtx.lock();
        for (int i = 0; i < size; i++) {
            uint8_t A = *(pos + i);
            uint8_t B = *(buf + i);
            *(pos+i) = mix_uint8(A, B);
        }
        mtx.unlock();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %r15
subq 0x40(%rdi), %r15
movl %edx, %r14d
callq 0x85fc
cmpq %r14, %r15
jge 0x82bc
xorl %ecx, %ecx
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rdx
movq %rdx, %rsi
subq %rax, %rsi
cmpq %rcx, %rsi
jle 0x8297
movb $0x0, (%rax,%rcx)
incq %rcx
jmp 0x827b
xorl %ecx, %ecx
movq %r14, %rsi
subq %rdx, %rsi
addq %rax, %rsi
cmpq %rcx, %rsi
jle 0x82d0
movq 0x38(%rbx), %rax
movb $0x0, (%rax,%rcx)
incq %rcx
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rdx
jmp 0x8299
xorl %eax, %eax
cmpq %rax, %r14
je 0x82d0
movq 0x40(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
jmp 0x82be
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3260
nop
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::mix16(unsigned char*, unsigned int)
void Mixer::mix16(uint8_t *buf, uint32_t size) {

    // 传入的buffer比较大， 超过了剩余的内存		The incoming buffer is relatively large and exceeds the remaining memory
    if (buffer_end - pos < size) {
        mtx.lock();
        for (int i = 0; i < (buffer_end-pos) / 2; i++) {
            int16_t A = *((int16_t *)pos + i);
            int16_t B = *((int16_t *)buf + i);
            *((int16_t *)pos + i) = mix_int16(A, B);
        }

        for (int i = 0; i < (size-(buffer_end-pos)) / 2; i++) {
            int16_t A = *((int16_t *)buffer_start + i);
            int16_t B = *((int16_t *)(buf + (buffer_end - pos)) + i);

            *((int16_t *)buffer_start + i) = mix_int16(A, B);
        }

        mtx.unlock();
    } else {
        mtx.lock();
        for (int i = 0; i < size / 2; i++) {
            int16_t A = *((int16_t *)pos + i);
            int16_t B = *((int16_t *)buf + i);
            *((int16_t *)pos + i) = mix_int16(A, B);
        }

        mtx.unlock();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x48(%rdi), %r13
subq 0x40(%rdi), %r13
movl %edx, %r12d
callq 0x85fc
cmpq %r12, %r13
jge 0x838d
movq 0x40(%rbx), %rcx
xorl %r13d, %r13d
pushq $0x2
popq %r15
movq 0x48(%rbx), %rdi
movq %rdi, %rax
subq %rcx, %rax
cqto
idivq %r15
cmpq %r13, %rax
jle 0x8348
movswl (%rcx,%r13,2), %esi
movswl (%r14,%r13,2), %edx
movq %rbx, %rdi
callq 0x8610
movq 0x40(%rbx), %rcx
movw %ax, (%rcx,%r13,2)
incq %r13
jmp 0x8314
xorl %r13d, %r13d
subq %rcx, %rdi
movq %r12, %rax
subq %rdi, %rax
cqto
idivq %r15
cmpq %r13, %rax
jle 0x83bc
movq 0x38(%rbx), %rax
movswl (%rax,%r13,2), %esi
addq %r14, %rdi
movswl (%rdi,%r13,2), %edx
movq %rbx, %rdi
callq 0x8610
movq 0x38(%rbx), %rcx
movw %ax, (%rcx,%r13,2)
incq %r13
movq 0x40(%rbx), %rcx
movq 0x48(%rbx), %rdi
jmp 0x834b
shrl %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x83bc
movq 0x40(%rbx), %rax
movswl (%rax,%r12,2), %esi
movswl (%r14,%r12,2), %edx
movq %rbx, %rdi
callq 0x8610
movq 0x40(%rbx), %rcx
movw %ax, (%rcx,%r12,2)
incq %r12
jmp 0x8393
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3260
nop
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::mix32(unsigned char*, unsigned int)
void Mixer::mix32(uint8_t *buf, uint32_t size) {
    // 传入的buffer比较大，		The incoming buffer is relatively large,
    // 超过了剩余的内存			Exceeded the remaining memory
    if (buffer_end - pos < size) {
        mtx.lock();
        for (int i = 0; i < (buffer_end-pos) / 4; i++) {
            int32_t A = *((int32_t *)pos + i);
            int32_t B = *((int32_t *)buf + i);
            *((int32_t *)pos + i) = mix_int32(A, B);
        }

        for (int i = 0; i < (size-(buffer_end-pos)) / 4; i++) {
            int32_t A = *((int32_t *)buffer_start + i);
            int32_t B = *((int32_t *)(buf + (buffer_end - pos)) + i);

            *((int32_t *)buffer_start + i) = mix_int32(A, B);
        }

        mtx.unlock();
    } else {
        mtx.lock();
        for (int i = 0; i < size / 4; i++) {
            int32_t A = *((int32_t *)pos + i);
            int32_t B = *((int32_t *)buf + i);
            *((int32_t *)pos + i) = mix_int32(A, B);
        }

        mtx.unlock();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x48(%rdi), %r13
subq 0x40(%rdi), %r13
movl %edx, %r15d
callq 0x85fc
movq 0x40(%rbx), %rsi
cmpq %r15, %r13
jge 0x844e
movq 0x48(%rbx), %rcx
subq %rsi, %rcx
pushq $0x4
popq %rdi
movq %rcx, %rax
cqto
idivq %rdi
xorl %edx, %edx
testq %rax, %rax
cmovleq %rdx, %rax
cmpq %rdx, %rax
je 0x848e
movslq (%rsi,%rdx,4), %r8
movslq (%r14,%rdx,4), %r9
leaq (%r9,%r8), %r10
imulq %r8, %r9
sarq $0x20, %r9
subq %r9, %r10
xorl %r8d, %r8d
cmpq $0x7fffffff, %r10       # imm = 0x7FFFFFFF
setle %r8b
addl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movl %r8d, (%rsi,%rdx,4)
incq %rdx
jmp 0x8414
shrl $0x2, %r12d
xorl %eax, %eax
cmpq %rax, %r12
je 0x84e0
movslq (%rsi,%rax,4), %rcx
movslq (%r14,%rax,4), %rdx
leaq (%rdx,%rcx), %rdi
imulq %rcx, %rdx
sarq $0x20, %rdx
subq %rdx, %rdi
xorl %ecx, %ecx
cmpq $0x7fffffff, %rdi       # imm = 0x7FFFFFFF
setle %cl
addl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, (%rsi,%rax,4)
incq %rax
jmp 0x8454
subq %rcx, %r15
movq %r15, %rax
cqto
idivq %rdi
movq 0x38(%rbx), %rdx
addq %rcx, %r14
xorl %ecx, %ecx
testq %rax, %rax
cmovleq %rcx, %rax
cmpq %rcx, %rax
je 0x84e0
movslq (%rdx,%rcx,4), %rsi
movslq (%r14,%rcx,4), %rdi
leaq (%rdi,%rsi), %r8
imulq %rsi, %rdi
sarq $0x20, %rdi
subq %rdi, %r8
xorl %esi, %esi
cmpq $0x7fffffff, %r8        # imm = 0x7FFFFFFF
setle %sil
addl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl %esi, (%rdx,%rcx,4)
incq %rcx
jmp 0x84a9
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3260
nop
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::get_mix(void (*)(unsigned char*, unsigned int), unsigned int)
void Mixer::get_mix(call_back func, uint32_t size) {
    // 取数据，pos会移动		Fetch data, pos will move
    mtx.lock();

    uint32_t buf_pos = 0;
    // uint32_t need = size;

    // 所需大于0		Need to be greater than 0
    while (size - buf_pos > 0) {
        if (size - buf_pos > buffer_end - pos) {
            // 所需大于mixer的buffer的当前位置到结尾	The current position to the end of the buffer that needs to be larger than the mixer
            func(pos, buffer_end - pos);
            // 拷贝过后的数据归0			Return the data after copying to 0
            std::memset(pos, 0, buffer_end-pos);
            buf_pos += buffer_end - pos;
            pos = buffer_start;
        } else {
            // 所需小于mixer的buffer当前位置到结尾	The current position of the buffer that needs to be smaller than the mixer to the end
            func(pos, size - buf_pos);
            std::memset(pos, 0, size - buf_pos);
            pos += size - buf_pos;

            // buf_pos += (size - buf_pos);
            break;
        }
    }

    // // 请求的数据块大于剩余的数据块，正常应该不会出现这种情况	The requested data block is larger than the remaining data blocks, normally this should not happen
    // if (size > buffer_end - pos) {
        // func(pos, buffer_end - pos);
        // std::memset(pos, 0, buffer_end-pos);

        // uint32_t left = size - (buffer_end - pos);
        // pos = buffer_start;
        // func(pos, left);
        // std::memset(pos, 0, left);
        // pos += left;

    // } else {
        // func(pos, size);
        // std::memset(pos, 0, size);
        // pos += size;
    // }
    mtx.unlock();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x85fc
xorl %r12d, %r12d
movl %ebp, %r15d
subl %r12d, %r15d
je 0x8562
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
cmpq %r15, %rsi
jge 0x854a
callq *%r14
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x31b0
movl 0x48(%rbx), %eax
subl 0x40(%rbx), %eax
addl %eax, %r12d
movq 0x38(%rbx), %rax
movq %rax, 0x40(%rbx)
jmp 0x850a
movl %r15d, %esi
callq *%r14
movq 0x40(%rbx), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x31b0
addq %r15, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3260
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/cJSON.cc
// Function: cJSON_InitHooks
void cJSON_InitHooks(cJSON_Hooks* hooks)
{
    if (!hooks) { /* Reset hooks */
        cJSON_malloc = malloc;
        cJSON_free = free;
        return;
    }

	cJSON_malloc = (hooks->malloc_fn)?hooks->malloc_fn:malloc;
	cJSON_free	 = (hooks->free_fn)?hooks->free_fn:free;
}

// Assembly:
testq %rdi, %rdi
je 0x8802
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
testq %rcx, %rcx
jne 0x87f4
movq 0x97cc(%rip), %rcx      # 0x11fc0
testq %rax, %rax
jne 0x8810
movq 0x97b0(%rip), %rax      # 0x11fb0
jmp 0x8810
movq 0x97a7(%rip), %rax      # 0x11fb0
movq 0x97b0(%rip), %rcx      # 0x11fc0
movq %rcx, 0x9b09(%rip)      # 0x12320
movq %rax, 0x9b0a(%rip)      # 0x12328
retq
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/cJSON.cc
// Function: cJSON_Delete
void cJSON_Delete(cJSON *c)
{
	cJSON *next;
	while (c)
	{
		next=c->next;
		if (!(c->type&cJSON_IsReference) && c->child) cJSON_Delete(c->child);
		if (!(c->type&cJSON_IsReference) && c->valuestring) cJSON_free(c->valuestring);
		if (!(c->type&cJSON_StringIsConst) && c->string) cJSON_free(c->string);
		cJSON_free(c);
		c=next;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rbx, %rbx
je 0x8883
movq (%rbx), %r14
movl 0x18(%rbx), %eax
btl $0x8, %eax
jb 0x8848
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8848
callq 0x881f
movl 0x18(%rbx), %eax
btl $0x8, %eax
jb 0x8860
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x8860
callq *0x9acb(%rip)           # 0x12328
movl 0x18(%rbx), %eax
btl $0x9, %eax
jb 0x8875
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x8875
callq *0x9ab3(%rip)           # 0x12328
movq %rbx, %rdi
callq *0x9aaa(%rip)           # 0x12328
movq %r14, %rbx
jmp 0x8826
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/cJSON.cc
// Function: cJSON_ParseWithOpts
cJSON *cJSON_ParseWithOpts(const char *value,const char **return_parse_end,int require_null_terminated)
{
	const char *end=0;
	cJSON *c=cJSON_New_Item();
	ep=0;
	if (!c) return 0;       /* memory fail */

	end=parse_value(c,skip(value));
	if (!end)	{cJSON_Delete(c);return 0;}	/* parse failure. ep is set. */

	/* if we require null-terminated JSON without appended garbage, skip and then check for a null terminator */
	if (require_null_terminated) {end=skip(end);if (*end) {cJSON_Delete(c);ep=end;return 0;}}
	if (return_parse_end) *return_parse_end=end;
	return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
pushq $0x40
popq %rdi
callq *0x9a7d(%rip)           # 0x12320
testq %rax, %rax
je 0x8905
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
andq $0x0, 0xc31b(%rip)      # 0x14be0
movq %r15, %rdi
callq 0x8df0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8931
testq %rax, %rax
je 0x8919
movq %rax, %r15
testl %ebp, %ebp
je 0x890f
movq %r15, %rdi
callq 0x8df0
movq %rax, %r15
cmpb $0x0, (%rax)
je 0x890f
movq %rbx, %rdi
callq 0x881f
movq %r15, 0xc2dd(%rip)      # 0x14be0
jmp 0x8921
andq $0x0, 0xc2d3(%rip)      # 0x14be0
jmp 0x8921
testq %r14, %r14
je 0x8923
movq %r15, (%r14)
jmp 0x8923
movq %rbx, %rdi
callq 0x881f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/cJSON.cc
// Function: print_value(cJSON*, int, int, printbuffer*)
static char *print_value(cJSON *item,int depth,int fmt,printbuffer *p)
{
	char *out=0;
	if (!item) return 0;
	if (p)
	{
		switch ((item->type)&255)
		{
			case cJSON_NULL:	{out=ensure(p,5);	if (out) strcpy(out,"null");	break;}
			case cJSON_False:	{out=ensure(p,6);	if (out) strcpy(out,"false");	break;}
			case cJSON_True:	{out=ensure(p,5);	if (out) strcpy(out,"true");	break;}
			case cJSON_Number:	out=print_number(item,p);break;
			case cJSON_String:	out=print_string(item,p);break;
			case cJSON_Array:	out=print_array(item,depth,fmt,p);break;
			case cJSON_Object:	out=print_object(item,depth,fmt,p);break;
		}
	}
	else
	{
		switch ((item->type)&255)
		{
			case cJSON_NULL:	out=cJSON_strdup("null");	break;
			case cJSON_False:	out=cJSON_strdup("false");break;
			case cJSON_True:	out=cJSON_strdup("true"); break;
			case cJSON_Number:	out=print_number(item,0);break;
			case cJSON_String:	out=print_string(item,0);break;
			case cJSON_Array:	out=print_array(item,depth,fmt,0);break;
			case cJSON_Object:	out=print_object(item,depth,fmt,0);break;
		}
	}
	return out;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x8ebe
movb 0x18(%rdi), %al
testq %rcx, %rcx
je 0x8e66
cmpb $0x6, %al
ja 0x8ebe
movzbl %al, %eax
leaq 0x3a91(%rip), %r8       # 0xc8d0
movslq (%r8,%rax,4), %rax
addq %r8, %rax
jmpq *%rax
pushq $0x6
popq %rsi
movq %rcx, %rdi
callq 0x9ad3
testq %rax, %rax
je 0x8ebe
movw $0x65, 0x4(%rax)
movl $0x736c6166, (%rax)     # imm = 0x736C6166
jmp 0x8ec0
cmpb $0x6, %al
ja 0x8ebe
movzbl %al, %eax
leaq 0x3a78(%rip), %rcx      # 0xc8ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3ac8(%rip), %rdi      # 0xc94c
jmp 0x8eec
pushq $0x5
popq %rsi
movq %rcx, %rdi
callq 0x9ad3
testq %rax, %rax
je 0x8ebe
movb $0x0, 0x4(%rax)
movl $0x6c6c756e, (%rax)     # imm = 0x6C6C756E
jmp 0x8ec0
pushq $0x5
popq %rsi
movq %rcx, %rdi
callq 0x9ad3
testq %rax, %rax
je 0x8ebe
movb $0x0, 0x4(%rax)
movl $0x65757274, (%rax)     # imm = 0x65757274
jmp 0x8ec0
xorl %eax, %eax
popq %rcx
retq
movq %rcx, %rsi
jmp 0x8edf
movq %rcx, %rsi
jmp 0x8ece
xorl %esi, %esi
popq %rax
jmp 0x9cea
leaq 0x3a6c(%rip), %rdi      # 0xc947
jmp 0x8eec
xorl %esi, %esi
popq %rax
jmp 0x9b6b
leaq 0x3a66(%rip), %rdi      # 0xc952
popq %rax
jmp 0x909b
xorl %ecx, %ecx
popq %rax
jmp 0x9cf3
xorl %ecx, %ecx
popq %rax
jmp 0x9faa
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/cJSON.cc
// Function: cJSON_PrintBuffered
char *cJSON_PrintBuffered(cJSON *item,int prebuffer,int fmt)
{
	printbuffer p;
	p.buffer=(char*)cJSON_malloc(prebuffer);
	p.length=prebuffer;
	p.offset=0;
	return print_value(item,0,fmt,&p);
	return p.buffer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rdi, %r14
movslq %esi, %r15
movq %r15, %rdi
callq *0x93f9(%rip)           # 0x12320
movq %rsp, %rcx
movq %rax, (%rcx)
movl %r15d, 0x8(%rcx)
andl $0x0, 0xc(%rcx)
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x8e1b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/fgheng[P]keysound/src/cJSON.cc
// Function: cJSON_Duplicate
cJSON *cJSON_Duplicate(cJSON *item,int recurse)
{
	cJSON *newitem,*cptr,*nptr=0,*newchild;
	/* Bail on bad ptr */
	if (!item) return 0;
	/* Create new item */
	newitem=cJSON_New_Item();
	if (!newitem) return 0;
	/* Copy over all vars */
	newitem->type=item->type&(~cJSON_IsReference),newitem->valueint=item->valueint,newitem->valuedouble=item->valuedouble;
	if (item->valuestring)	{newitem->valuestring=cJSON_strdup(item->valuestring);	if (!newitem->valuestring)	{cJSON_Delete(newitem);return 0;}}
	if (item->string)		{newitem->string=cJSON_strdup(item->string);			if (!newitem->string)		{cJSON_Delete(newitem);return 0;}}
	/* If non-recursive, then we're done! */
	if (!recurse) return newitem;
	/* Walk the ->next chain for the child. */
	cptr=item->child;
	while (cptr)
	{
		newchild=cJSON_Duplicate(cptr,1);		/* Duplicate (with recurse) each item in the ->next chain */
		if (!newchild) {cJSON_Delete(newitem);return 0;}
		if (nptr)	{nptr->next=newchild,newchild->prev=nptr;nptr=newchild;}	/* If newitem->child already set, then crosswire ->prev and ->next and move on */
		else		{newitem->child=newchild;nptr=newchild;}					/* Set newitem->child and move to it */
		cptr=cptr->next;
	}
	return newitem;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x9725
movl %esi, %ebp
movq %rdi, %r14
pushq $0x40
popq %rdi
callq *0x8cac(%rip)           # 0x12320
testq %rax, %rax
je 0x9725
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
andl 0x18(%r14), %eax
movl %eax, 0x18(%rbx)
movl 0x28(%r14), %eax
movl %eax, 0x28(%rbx)
movsd 0x30(%r14), %xmm0
movsd %xmm0, 0x30(%rbx)
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x96c7
callq 0x909b
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x971d
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x96de
callq 0x909b
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x971d
testl %ebp, %ebp
je 0x9727
addq $0x10, %r14
xorl %r15d, %r15d
pushq $0x1
popq %rbp
movq (%r14), %r14
testq %r14, %r14
je 0x9727
movq %r14, %rdi
movl %ebp, %esi
callq 0x9656
testq %rax, %rax
je 0x971d
testq %r15, %r15
je 0x9714
movq %rax, (%r15)
movq %r15, 0x8(%rax)
movq %rax, %r15
jmp 0x96ec
movq %rax, 0x10(%rbx)
movq %rax, %r15
jmp 0x96ec
movq %rbx, %rdi
callq 0x881f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq