LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: cmaureir[P]strip-packing/scattersearch.cpp
// Function: print_solutions(std::vector<solution, std::allocator<solution>>)
void print_solutions(vector<solution> tmp){

    for (int i = 0; i < (int)tmp.size(); i++)
    {
        cout << "Solution " << i << ":\t";
        for (int j = 0; j < (int)tmp[i].items.size(); j++)
        {
            cout << tmp[i].items[j] <<  " ";
        }
        cout << " | " << tmp[i].height << " | " << tmp[i].p << "%" << endl;
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
callq 0x5bd0
movq %rax, %rcx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jge 0x9a98
movq 0x1865d(%rip), %rdi     # 0x21fd8
leaq 0xd9a7(%rip), %rsi      # 0x17329
callq 0x42e0
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x4520
movq %rax, %rdi
leaq 0xd997(%rip), %rsi      # 0x17333
callq 0x42e0
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movslq -0xc(%rbp), %rsi
callq 0xbd00
movq %rax, %rdi
callq 0x53e0
movq %rax, %rcx
movl -0x20(%rbp), %eax
cmpl %ecx, %eax
jge 0x9a0e
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0xbd00
movq %rax, %rdi
movslq -0x10(%rbp), %rsi
callq 0xbcc0
movl (%rax), %esi
movq 0x185e9(%rip), %rdi     # 0x21fd8
callq 0x4520
movq %rax, %rdi
leaq 0xd687(%rip), %rsi      # 0x17085
callq 0x42e0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x99a8
movq 0x185c3(%rip), %rdi     # 0x21fd8
leaq 0xd6a9(%rip), %rsi      # 0x170c5
callq 0x42e0
movq -0x18(%rbp), %rdi
movq %rax, -0x30(%rbp)
movslq -0xc(%rbp), %rsi
callq 0xbd00
movq -0x30(%rbp), %rdi
movl 0x4c(%rax), %esi
callq 0x4520
movq %rax, %rdi
leaq 0xd67d(%rip), %rsi      # 0x170c5
callq 0x42e0
movq -0x18(%rbp), %rdi
movq %rax, -0x28(%rbp)
movslq -0xc(%rbp), %rsi
callq 0xbd00
movq -0x28(%rbp), %rdi
movss 0x48(%rax), %xmm0
callq 0x4210
movq %rax, %rdi
leaq 0xd653(%rip), %rsi      # 0x170c9
callq 0x42e0
movq %rax, %rdi
movq 0x18513(%rip), %rsi     # 0x21f98
callq 0x4320
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9957
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x18960(%rip), %eax     # 0x22418
jge 0x9afb
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x18952(%rip), %eax     # 0x2241c
jge 0x9aee
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x9ac1
jmp 0x9af0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9aaf
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
callq 0x5bd0
movq %rax, %rcx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jge 0x9e4a
movl $0x0, -0x1c(%rbp)
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, -0x38(%rbp)
callq 0x53e0
movq %rax, %rcx
movl -0x38(%rbp), %eax
cmpl %ecx, %eax
jge 0x9e3a
movq -0x30(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xbcc0
movq -0x28(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movslq -0x18(%rbp), %rsi
callq 0xbd00
movq %rax, %rdi
movslq -0x1c(%rbp), %rsi
callq 0xbcc0
movq %rax, %rcx
movl -0x3c(%rbp), %eax
cmpl (%rcx), %eax
je 0x9e25
movb $0x0, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x9e2d
jmp 0x9e3a
jmp 0x9e2f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x9dd3
jmp 0x9e3c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9db3
movb -0x11(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movq %r9, -0x20(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x10(%rbp), %ecx
addl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jge 0x9ecc
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x14(%rbp), %ecx
addl -0xc(%rbp), %ecx
cmpl %ecx, %eax
jge 0x9ebf
movl -0x4(%rbp), %edx
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x9e91
jmp 0x9ec1
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x9e7e
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x17fcd(%rip), %rdi     # 0x22400
callq 0xbc50
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5bd0
movq %rax, %rcx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jge 0xa58a
movq -0x8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xbd00
cvttss2si 0x50(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0xc(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x30(%rbp), %eax
cmpl %ecx, %eax
jge 0xa575
callq 0x40b0
cltd
idivl -0xc(%rbp)
movl %edx, -0x14(%rbp)
callq 0x40b0
cltd
idivl -0xc(%rbp)
movl %edx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xbd00
movq %rax, %rdi
movslq -0x14(%rbp), %rsi
callq 0xbcc0
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xbd00
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0xbcc0
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xbd00
movq %rax, %rdi
movslq -0x14(%rbp), %rsi
callq 0xbcc0
movl -0x38(%rbp), %ecx
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xbd00
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0xbcc0
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xbd00
movq %rax, %rdi
callq 0x9ed0
movq -0x8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0xbd00
cvttss2si 0x50(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xa567
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xa47b
movl $0x0, -0x10(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xa449
addq $0x40, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq -0x20(%rbp), %rdi
callq 0xb730
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x17e77(%rip), %eax     # 0x22428
jge 0xa5f5
movslq -0x4(%rbp), %rsi
leaq 0x17d82(%rip), %rdi     # 0x22340
callq 0xbd00
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0xbe30
jmp 0xa5d1
jmp 0xa5d3
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa5a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4eb0
jmp 0xa64c
leaq -0x20(%rbp), %rdi
callq 0x9b20
jmp 0xa600
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x17d18(%rip), %eax     # 0x22328
jge 0xa63d
movslq -0x4(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xbd00
movq %rax, %rsi
leaq 0x17d2f(%rip), %rdi     # 0x22358
callq 0xbe30
jmp 0xa630
jmp 0xa632
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa607
leaq -0x20(%rbp), %rdi
callq 0x4eb0
addq $0x30, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x4550
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xb730
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x44(%rbp)
movl 0x173cc(%rip), %eax     # 0x22328
movl 0x173c6(%rip), %ecx     # 0x22328
subl $0x1, %ecx
imull %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
jge 0xafbb
movq -0x40(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0xbd00
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0xbe30
jmp 0xaf94
jmp 0xaf96
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xaf50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4eb0
jmp 0xb05b
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x1735d(%rip), %eax     # 0x22328
jge 0xaff8
movslq -0xc(%rbp), %rsi
leaq 0x17380(%rip), %rdi     # 0x22358
callq 0xbd00
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0xbe30
jmp 0xafeb
jmp 0xafed
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xafc2
leaq -0x28(%rbp), %rdi
callq 0x9b20
jmp 0xb003
leaq 0x1734e(%rip), %rdi     # 0x22358
callq 0xbd70
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x17309(%rip), %eax     # 0x22328
jge 0xb04c
movslq -0xc(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0xbd00
movq %rax, %rsi
leaq 0x17320(%rip), %rdi     # 0x22358
callq 0xbe30
jmp 0xb03f
jmp 0xb041
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb016
leaq -0x28(%rbp), %rdi
callq 0x4eb0
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4550
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x28(%rbp)
movq %rdi, %rax
movq -0x28(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq %rax, %rcx
movq %rcx, -0x30(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
callq 0x53e0
movq -0x28(%rbp), %rdi
movl %eax, -0x14(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0xbcc0
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xb0f3
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbcc0
movq -0x28(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movslq -0x1c(%rbp), %rsi
callq 0xbcc0
movl -0x3c(%rbp), %ecx
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb0b7
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbcc0
movl -0x40(%rbp), %ecx
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl %ecx, (%rax)
callq 0xbf70
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x16c59(%rip), %eax     # 0x22328
jge 0xb722
movq -0x28(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0xbd00
movq -0x20(%rbp), %rdi
movss 0x50(%rax), %xmm0
movss %xmm0, -0x2c(%rbp)
movslq -0x18(%rbp), %rsi
callq 0xbd00
movss -0x2c(%rbp), %xmm0
subss 0x50(%rax), %xmm0
callq 0xc070
movaps %xmm0, %xmm1
cvtsi2ssl -0x14(%rbp), %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xb6c6
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movw $0xffff, -0x12(%rbp)    # imm = 0xFFFF
cmpl $0x3, -0x8(%rbp)
jge 0x18b9
leaq 0x92c(%rip), %rdi       # 0x21d5
movb $0x0, %al
callq 0x1060
movl $0x0, -0x4(%rbp)
jmp 0x18fc
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x11d0
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movzwl -0x12(%rbp), %edx
leaq 0x916(%rip), %rdi       # 0x21f3
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movzwl -0x12(%rbp), %esi
callq 0x15d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: fgheng[P]keysound/src/Audio.cc
// Function: Audio::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void Audio::init(const std::string &str, int flag) {
    std::string err;
    switch (flag) {
        case 'd':
            if (is_dir(str)) from_dir(str);
            else {
                err = "please use directory";
                goto init_failed;
            }
            return;
        case 'f':
            if (is_wav(str)) from_file(str);
            else {
                err = "please write a wav file";
                goto init_failed;
            }
            return;
        case 'j':
            if (is_json(str)) from_json(str);
            else {
                err = "please use a json file";
                goto init_failed;
            }
            return;
        default:
            goto init_failed;
            break;
    }

init_failed:
    std::cout << err << std::endl;
    exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x44f0
movl -0x14(%rbp), %eax
movl %eax, -0x4c(%rbp)
subl $0x64, %eax
je 0x771c
jmp 0x7701
movl -0x4c(%rbp), %eax
subl $0x66, %eax
je 0x7785
jmp 0x770b
movl -0x4c(%rbp), %eax
subl $0x6a, %eax
je 0x77ce
jmp 0x7817
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9210
movb %al, -0x59(%rbp)
jmp 0x772e
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x7737
jmp 0x7762
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7ad0
jmp 0x7746
jmp 0x7779
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4728
jmp 0x785a
leaq 0xeda3(%rip), %rsi      # 0x1650c
leaq -0x38(%rbp), %rdi
callq 0x44e0
jmp 0x7774
jmp 0x7819
movl $0x1, -0x48(%rbp)
jmp 0x784b
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8390
movb %al, -0x5a(%rbp)
jmp 0x7797
movb -0x5a(%rbp), %al
testb $0x1, %al
jne 0x77a0
jmp 0x77b1
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x84b0
jmp 0x77af
jmp 0x77c5
leaq 0xed69(%rip), %rsi      # 0x16521
leaq -0x38(%rbp), %rdi
callq 0x44e0
jmp 0x77c3
jmp 0x7819
movl $0x1, -0x48(%rbp)
jmp 0x784b
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9260
movb %al, -0x5b(%rbp)
jmp 0x77e0
movb -0x5b(%rbp), %al
testb $0x1, %al
jne 0x77e9
jmp 0x77fa
movq -0x58(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7cd0
jmp 0x77f8
jmp 0x780e
leaq 0xed38(%rip), %rsi      # 0x16539
leaq -0x38(%rbp), %rdi
callq 0x44e0
jmp 0x780c
jmp 0x7819
movl $0x1, -0x48(%rbp)
jmp 0x784b
jmp 0x7819
movq 0x17798(%rip), %rdi     # 0x1efb8
leaq -0x38(%rbp), %rsi
callq 0x4310
movq %rax, -0x68(%rbp)
jmp 0x782f
movq -0x68(%rbp), %rdi
movq 0x1774e(%rip), %rsi     # 0x1ef88
callq 0x4400
jmp 0x7841
movl $0x1, %edi
callq 0x4480
leaq -0x38(%rbp), %rdi
callq 0x4728
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4670
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
callq 0x9210
testb $0x1, %al
jne 0x7957
jmp 0x7966
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7ad0
jmp 0x79da
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9260
testb $0x1, %al
jne 0x7979
jmp 0x7988
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7cd0
jmp 0x79d8
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8390
testb $0x1, %al
jne 0x799b
jmp 0x79aa
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x84b0
jmp 0x79d6
movq 0x17607(%rip), %rdi     # 0x1efb8
leaq 0xeb3d(%rip), %rsi      # 0x164f5
callq 0x43a0
movq %rax, %rdi
movq 0x175c1(%rip), %rsi     # 0x1ef88
callq 0x4400
movl $0x1, %edi
callq 0x4480
jmp 0x79d8
jmp 0x79da
addq $0x20, %rsp
popq %rbp
retq
// File: 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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movb $0x0, -0x11(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x100, -0x18(%rbp)     # imm = 0x100
jge 0x7c7c
movq -0x90(%rbp), %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x7b23
jmp 0x7c6e
movq -0x10(%rbp), %rsi
leaq 0xea22(%rip), %rdx      # 0x16550
leaq -0x78(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x9340
movq -0x98(%rbp), %rsi
movslq -0x18(%rbp), %rax
leaq (%rax,%rax,4), %rcx
leaq 0x1787c(%rip), %rax     # 0x1f3d0
leaq (%rax,%rcx,8), %rdx
leaq -0x58(%rbp), %rdi
callq 0x92f0
jmp 0x7b63
leaq 0xe9e8(%rip), %rdx      # 0x16552
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x92a0
jmp 0x7b79
movq -0x90(%rbp), %rdi
movslq -0x18(%rbp), %rax
shlq $0x4, %rax
movq %rdi, %rdx
addq %rax, %rdx
leaq -0x38(%rbp), %rsi
callq 0x8560
movb %al, -0x99(%rbp)
jmp 0x7b9f
leaq -0x38(%rbp), %rdi
callq 0x4728
leaq -0x58(%rbp), %rdi
callq 0x4728
leaq -0x78(%rbp), %rdi
callq 0x4728
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x7bc6
jmp 0x7c45
movq -0x90(%rbp), %rax
movb $0x1, -0x11(%rbp)
movl -0x18(%rbp), %ecx
movw %cx, %dx
movslq -0x18(%rbp), %rsi
leaq 0x177ee(%rip), %rcx     # 0x1f3d0
imulq $0x28, %rsi, %rsi
addq %rsi, %rcx
movzwl 0x20(%rcx), %ecx
movw %dx, 0x1000(%rax,%rcx,2)
jmp 0x7c6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x7c3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x7c31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4728
leaq -0x58(%rbp), %rdi
callq 0x4728
leaq -0x78(%rbp), %rdi
callq 0x4728
jmp 0x7cc3
movq -0x90(%rbp), %rax
movslq -0x18(%rbp), %rdx
leaq 0x17779(%rip), %rcx     # 0x1f3d0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x20(%rcx), %ecx
movw $0x0, 0x1000(%rax,%rcx,2)
jmp 0x7c6e
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7af9
testb $0x1, -0x11(%rbp)
jne 0x7cba
movq 0x1732f(%rip), %rdi     # 0x1efb8
leaq 0xe8c7(%rip), %rsi      # 0x16557
callq 0x43a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x4310
movq %rax, %rdi
movq 0x172dd(%rip), %rsi     # 0x1ef88
callq 0x4400
movl $0x1, %edi
callq 0x4480
addq $0xa0, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x4670
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x250(%rbp), %rdi
movq %rdi, -0x270(%rbp)
movl $0x8, %edx
callq 0x45e0
movq -0x270(%rbp), %rdi
callq 0x45d0
movb %al, -0x261(%rbp)
jmp 0x83de
movb -0x261(%rbp), %al
testb $0x1, %al
jne 0x83ea
jmp 0x8462
leaq -0x250(%rbp), %rdi
leaq -0x44(%rbp), %rsi
movl $0x2c, %edx
callq 0x44c0
jmp 0x8401
leaq -0x250(%rbp), %rdi
callq 0x40b0
jmp 0x840f
movq -0x278(%rbp), %rdi
leaq -0x3c(%rbp), %rdx
leaq -0x44(%rbp), %rsi
callq 0x8830
movb %al, -0x279(%rbp)
jmp 0x842b
movb -0x279(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movl $0x1, -0x260(%rbp)
jmp 0x847e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x40f0
jmp 0x8498
leaq -0x250(%rbp), %rdi
callq 0x40b0
jmp 0x8470
movb $0x0, -0x1(%rbp)
movl $0x1, -0x260(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x40f0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x258(%rbp), %rdi
callq 0x4670
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq %rdx, %rdi
callq 0x8560
testb $0x1, %al
jne 0x84da
jmp 0x8509
movl $0x1, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0x8507
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movw $0x0, 0x1000(%rax,%rcx,2)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x84e1
jmp 0x8550
movq 0x16aa8(%rip), %rdi     # 0x1efb8
leaq 0xe0a5(%rip), %rsi      # 0x165bc
callq 0x43a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x4310
movq %rax, %rdi
leaq 0xe7d2(%rip), %rsi      # 0x16d04
callq 0x43a0
movq %rax, %rdi
movq 0x16a47(%rip), %rsi     # 0x1ef88
callq 0x4400
movl $0x1, %edi
callq 0x4480
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x52, %ecx
movb %al, -0x19(%rbp)
jne 0x88cd
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x49, %ecx
movb %al, -0x19(%rbp)
jne 0x88cd
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %ecx
xorl %eax, %eax
cmpl $0x46, %ecx
movb %al, -0x19(%rbp)
jne 0x88cd
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %ecx
xorl %eax, %eax
cmpl $0x46, %ecx
movb %al, -0x19(%rbp)
jne 0x88cd
movq -0x18(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x57, %ecx
movb %al, -0x19(%rbp)
jne 0x88cd
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x41, %ecx
movb %al, -0x19(%rbp)
jne 0x88cd
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %ecx
xorl %eax, %eax
cmpl $0x56, %ecx
movb %al, -0x19(%rbp)
jne 0x88cd
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x45, %eax
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x18(%rbp)
movw %ax, -0x1a(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movzwl -0x1a(%rbp), %eax
cmpl $0xff, %eax
jle 0x891f
movq $0x0, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
movw $0x0, -0x4(%rbp)
movw $0x0, -0x2(%rbp)
jmp 0x897b
movq -0x28(%rbp), %rax
movzwl -0x1a(%rbp), %ecx
movzwl 0x1000(%rax,%rcx,2), %eax
cmpl $0xff, %eax
jle 0x8953
movq $0x0, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
movw $0x0, -0x4(%rbp)
movw $0x0, -0x2(%rbp)
jmp 0x897b
jmp 0x8955
movq -0x28(%rbp), %rax
movzwl -0x1a(%rbp), %ecx
movzwl 0x1000(%rax,%rcx,2), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: fgheng[P]keysound/src/DeviceDetect.cc
// Function: start_exists_device(Audio*, Mixer*)
static void start_exists_device(Audio *audio, Mixer *mixer) {
    // 执行命令，获得键盘设备文件	Execute the command to get the keyboard device file
    FILE *pip = popen(cmd1.c_str(), "r");

    if (!pip) {
        std::cout << "error occured" << std::endl;
    }

    char buf[64];
    while (!feof(pip)) {
        std::memset(buf, '\0', 64);
        if (fgets(buf, 64, pip) != NULL) {
            // 创建键盘监控线程		Create keyboard monitoring thread
            std::string str_event_id = get_event_id(buf);
            str_event_id.erase(str_event_id.size() - 1);
            all_threads.push_back(std::thread(key_detect, str_event_id, audio, mixer));
        }
    }

    pclose(pip);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x16686(%rip), %rdi     # 0x21be0
callq 0x4170
movq %rax, %rdi
leaq 0xacd2(%rip), %rsi      # 0x1623b
callq 0x4110
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xb59b
movq 0x13a38(%rip), %rdi     # 0x1efb8
leaq 0xb14b(%rip), %rsi      # 0x166d2
callq 0x43a0
movq %rax, %rdi
movq 0x139f2(%rip), %rsi     # 0x1ef88
callq 0x4400
jmp 0xb59d
movq -0x18(%rbp), %rdi
callq 0x4590
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb5b7
jmp 0xb733
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x41d0
leaq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x40, %esi
callq 0x45b0
cmpq $0x0, %rax
je 0xb72e
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x4680
movq -0xc8(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x93e0
jmp 0xb60f
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xb840
jmp 0xb621
leaq -0xa0(%rbp), %rdi
callq 0x4728
leaq -0xa1(%rbp), %rdi
callq 0x4420
leaq -0x80(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x4250
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
decq %rsi
movq $-0x1, %rdx
callq 0x40d0
jmp 0xb664
leaq 0x1df5(%rip), %rsi      # 0xd460
leaq -0xc0(%rbp), %rdi
leaq -0x80(%rbp), %rdx
leaq -0x8(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0xbb60
jmp 0xb685
leaq 0x16594(%rip), %rdi     # 0x21c20
leaq -0xc0(%rbp), %rsi
callq 0xbb30
jmp 0xb69a
leaq -0xc0(%rbp), %rdi
callq 0xbc30
leaq -0x80(%rbp), %rdi
callq 0x4728
jmp 0xb72e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xb6e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4728
leaq -0xa1(%rbp), %rdi
callq 0x4420
jmp 0xb745
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0xb723
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xbc30
leaq -0x80(%rbp), %rdi
callq 0x4728
jmp 0xb745
jmp 0xb59d
movq -0x18(%rbp), %rdi
callq 0x4510
addq $0xd0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x4670
nopw %cs:(%rax,%rax)
// File: fgheng[P]keysound/src/DeviceDetect.cc
// Function: init_socket()
static int init_socket() {
    int sock_fd;
    struct sockaddr_nl sa;

    sock_fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_KOBJECT_UEVENT);
    if (sock_fd < 0) {
        std::cout << "init socket error" << std::endl;
        return -1;
    }

    std::memset(&sa, 0, sizeof(struct sockaddr_nl));
    sa.nl_family = AF_NETLINK;
    sa.nl_pid = getpid();
    sa.nl_groups = 1;

    int i = bind(sock_fd, (struct sockaddr *)&sa, sizeof(struct sockaddr_nl));
    if (i < 0) {
        std::cout << "init socket bind error occured" << std::endl;
        close(sock_fd);
        return -1;
    }

    return sock_fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x10, %edi
movl $0x3, %esi
movl $0xf, %edx
callq 0x40e0
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0xb7b0
movq 0x1382c(%rip), %rdi     # 0x1efb8
leaq 0xaf1c(%rip), %rsi      # 0x166af
callq 0x43a0
movq %rax, %rdi
movq 0x137e6(%rip), %rsi     # 0x1ef88
callq 0x4400
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb828
leaq -0x14(%rbp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x41d0
movw $0x10, -0x14(%rbp)
callq 0x4560
movl %eax, -0x10(%rbp)
movl $0x1, -0xc(%rbp)
movl -0x8(%rbp), %edi
leaq -0x14(%rbp), %rsi
movl $0xc, %edx
callq 0x4070
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0xb822
movq 0x137c2(%rip), %rdi     # 0x1efb8
leaq 0xaec4(%rip), %rsi      # 0x166c1
callq 0x43a0
movq %rax, %rdi
movq 0x1377c(%rip), %rsi     # 0x1ef88
callq 0x4400
movl -0x8(%rbp), %edi
callq 0x46f0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb828
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rsi, -0x58(%rbp)
movq %rdi, %rax
movq -0x58(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq %rax, %rcx
movq %rcx, -0x48(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
leaq 0xae31(%rip), %rsi      # 0x1669e
xorl %eax, %eax
movl %eax, %edx
callq 0x4710
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
jne 0xb8c6
leaq -0x19(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x4680
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rdx
leaq 0xb14b(%rip), %rsi      # 0x169e8
callq 0x93e0
jmp 0xb8a4
leaq -0x19(%rbp), %rdi
callq 0x4420
jmp 0xb92c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x19(%rbp), %rdi
callq 0x4420
jmp 0xb936
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xac7b(%rip), %rsi      # 0x16550
callq 0x4710
movq %rax, -0x38(%rbp)
cmpq $-0x1, -0x38(%rbp)
jne 0xb8f2
movq -0x58(%rbp), %rdi
callq 0x4250
movq %rax, -0x38(%rbp)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdi
movb $0x0, -0x39(%rbp)
movq -0x18(%rbp), %rdx
addq $0x5, %rdx
movq -0x38(%rbp), %rcx
subq -0x18(%rbp), %rcx
subq $0x1, %rcx
callq 0x43e0
movb $0x1, -0x39(%rbp)
testb $0x1, -0x39(%rbp)
jne 0xb92a
movq -0x50(%rbp), %rdi
callq 0x4728
jmp 0xb92c
movq -0x48(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x4670
nop
// File: fgheng[P]keysound/src/DeviceDetect.cc
// Function: is_keyboard(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
static bool is_keyboard(std::string &event_id) {
    if (event_id.empty()) return false;

    FILE *pip = popen((cmd2 + event_id).c_str(), "r");

    if (!pip) {
        std::cout << "error occured" << std::endl;
        return false;
    }

    char buf[8];
    char *tmp = fgets(buf, 8, pip);

    pclose(pip);

    if (tmp) return true;
    else return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4620
testb $0x1, %al
jne 0xb9cb
jmp 0xb9d4
movb $0x0, -0x1(%rbp)
jmp 0xba91
movq -0x10(%rbp), %rdx
leaq 0x16221(%rip), %rsi     # 0x21c00
leaq -0x38(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0xbdf0
movq -0x68(%rbp), %rdi
callq 0x4170
movq %rax, %rdi
leaq 0xa83c(%rip), %rsi      # 0x1623b
callq 0x4110
movq %rax, -0x60(%rbp)
jmp 0xba0a
leaq -0x38(%rbp), %rdi
callq 0x4728
movq -0x60(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xba61
movq 0x1358f(%rip), %rdi     # 0x1efb8
leaq 0xaca2(%rip), %rsi      # 0x166d2
callq 0x43a0
movq %rax, %rdi
movq 0x13549(%rip), %rsi     # 0x1ef88
callq 0x4400
movb $0x0, -0x1(%rbp)
jmp 0xba91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4728
jmp 0xba9c
leaq -0x4c(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x8, %esi
callq 0x45b0
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4510
cmpq $0x0, -0x58(%rbp)
je 0xba8d
movb $0x1, -0x1(%rbp)
jmp 0xba91
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4670
nopw %cs:(%rax,%rax)
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0xe230
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x28(%rax)
cmpl $0x0, -0xc(%rbp)
jne 0xd924
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
movq 0x30(%rax), %rcx
movq %rcx, 0x40(%rax)
movq 0x30(%rax), %rcx
movq %rcx, 0x38(%rax)
movq 0x30(%rax), %rcx
movq %rcx, 0x48(%rax)
movq 0x116b1(%rip), %rdi     # 0x1efb8
leaq 0x8ef8(%rip), %rsi      # 0x16806
callq 0x43a0
movq %rax, %rdi
movq 0x1166b(%rip), %rsi     # 0x1ef88
callq 0x4400
jmp 0xd957
movl -0xc(%rbp), %eax
movl %eax, %edi
callq 0x4030
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
movq 0x30(%rax), %rcx
movq %rcx, 0x40(%rax)
movq 0x30(%rax), %rcx
movq %rcx, 0x38(%rax)
movq 0x38(%rax), %rcx
movl -0xc(%rbp), %edx
addq %rdx, %rcx
movq %rcx, 0x48(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::mix(unsigned char*, unsigned int, unsigned short)
void Mixer::mix(uint8_t *buf, uint32_t size, uint16_t bits_per_sample) {
    // 如果长度大于buffer_len，那么后面的应该截取掉，	If the length is greater than buffer_len, then the latter should be intercepted,
    // 虽然不太可能出现这种情况，但还是加上判断吧	although this is unlikely  to happen, let's be sure.
    if (buf == nullptr || buffer_len == 0) return;
    if (size > buffer_len) size = buffer_len;

    switch (bits_per_sample) {
        case 8:
            mix8(buf, size);
            break;
        case 16:
            mix16(buf, size);
            break;
        case 32:
            mix32(buf, size);
            break;
        default:
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %cx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movw %ax, -0x16(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xd993
movq -0x20(%rbp), %rax
cmpl $0x0, 0x28(%rax)
jne 0xd995
jmp 0xda05
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x28(%rcx), %eax
jbe 0xd9ab
movq -0x20(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x14(%rbp)
movzwl -0x16(%rbp), %eax
movl %eax, -0x24(%rbp)
subl $0x8, %eax
je 0xd9cd
jmp 0xd9b9
movl -0x24(%rbp), %eax
subl $0x10, %eax
je 0xd9df
jmp 0xd9c3
movl -0x24(%rbp), %eax
subl $0x20, %eax
je 0xd9f1
jmp 0xda03
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xda10
jmp 0xda05
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xdbb0
jmp 0xda05
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xdda0
jmp 0xda05
jmp 0xda05
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xe250
movl $0x0, -0x18(%rbp)
movl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl $0x0, %eax
jbe 0xe064
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, %eax
movq 0x48(%rdx), %rcx
movq 0x40(%rdx), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jle 0xe019
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x40(%rdx), %rdi
movq 0x48(%rdx), %rcx
movq 0x40(%rdx), %rdx
subq %rdx, %rcx
movl %ecx, %esi
callq *%rax
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
movq 0x48(%rax), %rdx
movq 0x40(%rax), %rax
subq %rax, %rdx
xorl %esi, %esi
callq 0x41d0
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rdx
movq 0x40(%rax), %rcx
subq %rcx, %rdx
movl -0x18(%rbp), %ecx
addq %rdx, %rcx
movl %ecx, -0x18(%rbp)
movq 0x38(%rax), %rcx
movq %rcx, 0x40(%rax)
jmp 0xe05f
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x40(%rcx), %rdi
movl -0x14(%rbp), %esi
subl -0x18(%rbp), %esi
callq *%rax
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
movl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x41d0
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %edx
subl -0x18(%rbp), %edx
movq 0x40(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x40(%rax)
jmp 0xe064
jmp 0xdf97
movq -0x20(%rbp), %rdi
callq 0xe2a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::mix_int16(short, short)
inline int16_t Mixer::mix_int16(int16_t A, int16_t B) {
    // 应该改为内联汇编，使用汇编判断溢出位				Should be changed to inline assembly, use assembly to determine the overflow bit
    // uint16_t C = A + B
    // 如果溢出，C = xxx						If it overflows, C = xxx
    // 该函数应该改为右值引用?						Should this function be changed to an rvalue reference?

    // 参考 http://blog.sina.com.cn/s/blog_4d61a7570101arsr.html	Reference: http://blog.sina.com.cn/s/blog_4d61a7570101arsr.html
    int32_t A1 = static_cast<int32_t>(A);
    int32_t B1 = static_cast<int32_t>(B);
    int32_t C = A1 + B1 - (A1 * B1 >> 0x10);

    if (C > 32767) C = 32750;
    else if (C < -32768) C = -32750;

    return static_cast<int16_t>(C);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %dx, %ax
movw %si, %cx
movq %rdi, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movw %ax, -0xc(%rbp)
movswl -0xa(%rbp), %eax
movl %eax, -0x10(%rbp)
movswl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
movl -0x10(%rbp), %ecx
imull -0x14(%rbp), %ecx
sarl $0x10, %ecx
subl %ecx, %eax
movl %eax, -0x18(%rbp)
cmpl $0x7fff, -0x18(%rbp)    # imm = 0x7FFF
jle 0xe30b
movl $0x7fee, -0x18(%rbp)    # imm = 0x7FEE
jmp 0xe31d
cmpl $0xffff8000, -0x18(%rbp) # imm = 0xFFFF8000
jge 0xe31b
movl $0xffff8012, -0x18(%rbp) # imm = 0xFFFF8012
jmp 0xe31d
movl -0x18(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::mix_int32(int, int)
inline int32_t Mixer::mix_int32(int32_t A, int32_t B) {
    int64_t A1 = static_cast<int64_t>(A);
    int64_t B1 = static_cast<int64_t>(B);
    int64_t C = A1 + B1 - (A1 * B1 >> 0x20);

    if (C > 2147483647) C = 2147483647;
    else if (C < 2147483648) C = -2147483648;

    return static_cast<int32_t>(C);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movslq -0xc(%rbp), %rax
movq %rax, -0x18(%rbp)
movslq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
imulq -0x20(%rbp), %rcx
sarq $0x20, %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x7fffffff, -0x28(%rbp) # imm = 0x7FFFFFFF
jle 0xe37e
movq $0x7fffffff, -0x28(%rbp) # imm = 0x7FFFFFFF
jmp 0xe393
movl $0x80000000, %eax       # imm = 0x80000000
cmpq %rax, -0x28(%rbp)
jge 0xe391
movq $-0x80000000, -0x28(%rbp) # imm = 0x80000000
jmp 0xe393
movq -0x28(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe65d
movq 0x1097a(%rip), %rax     # 0x1efc0
movq %rax, 0x10d63(%rip)     # 0x1f3b0
movq 0x1095c(%rip), %rax     # 0x1efb0
movq %rax, 0x10d5d(%rip)     # 0x1f3b8
jmp 0xe6bd
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xe674
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xe681
movq 0x10945(%rip), %rax     # 0x1efc0
movq %rax, -0x10(%rbp)
jmp 0xe681
movq -0x10(%rbp), %rax
movq %rax, 0x10d24(%rip)     # 0x1f3b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe6a5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xe6b2
movq 0x10904(%rip), %rax     # 0x1efb0
movq %rax, -0x18(%rbp)
jmp 0xe6b2
movq -0x18(%rbp), %rax
movq %rax, 0x10cfb(%rip)     # 0x1f3b8
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe77f
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0xe70b
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xe70b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xe6c0
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0xe738
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xe738
movq 0x10c8a(%rip), %rax     # 0x1f3b8
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
jne 0xe765
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xe765
movq 0x10c5d(%rip), %rax     # 0x1f3b8
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rdi
callq *%rax
movq 0x10c4c(%rip), %rax     # 0x1f3b8
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe6cc
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)