LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x68, %rsp
leaq 0x9afe(%rip), %rbx      # 0x122b0
movq %rbx, %rdi
callq 0x6f19
movq 0x9af7(%rip), %rdx      # 0x122b8
leaq -0x1e0(%rdx), %rsi
movq %rbx, %rdi
callq 0xc842
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x73e4
movq %rsp, %rdi
callq 0x738e
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x4dda
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x82ce
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rdi
movaps %xmm0, (%rdi)
movq %rsp, %rbx
movaps (%rbx), %xmm0
movq 0x10(%rbx), %rax
leaq 0x38(%rsp), %r14
movups (%r14), %xmm1
movaps %xmm1, (%rbx)
movq 0x10(%r14), %rcx
movq %rcx, 0x10(%rbx)
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups %xmm1, (%r14)
movq $0x0, 0x10(%r14)
callq 0x4e76
movq %r14, %rdi
callq 0x4e76
leaq 0x20(%rsp), %rdi
callq 0x4e76
movq %rbx, %rdi
callq 0x6f19
movq 0x9a41(%rip), %rsi      # 0x122b0
leaq 0x9a3a(%rip), %rdi      # 0x122b0
movq $-0x1e0, %rdx           # imm = 0xFE20
addq 0x9a34(%rip), %rdx      # 0x122b8
callq 0xc842
xorl %r14d, %r14d
leaq 0x9a1d(%rip), %rbx      # 0x122b0
movq (%rsp), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x8b20
addq $0x60, %r14
cmpq $0x1e0, %r14            # imm = 0x1E0
jne 0x8893
movq %rsp, %rdi
callq 0x4e76
addq $0x68, %rsp
popq %rbx
popq %r14
retq
jmp 0x88d4
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4e76
jmp 0x88d7
jmp 0x88d4
jmp 0x88d4
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4e76
movq %rbx, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O1/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 0x476a(%rip), %xmm0     # 0xd060
xorl %eax, %eax
movss 0x50(%rcx,%rsi), %xmm1
subss 0x50(%rdx,%rsi), %xmm1
andps %xmm0, %xmm1
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %eax
addq $0x60, %rsi
cmpq $0x3c0, %rsi            # imm = 0x3C0
jne 0x88f8
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1767
leaq 0xa75(%rip), %rdi       # 0x21d5
callq 0x11b0
jmp 0x1798
movq %rsi, %rbx
movq 0x10(%rsi), %rdi
callq 0x11c0
movq 0x8(%rbx), %rsi
movzwl %ax, %r14d
leaq 0x90c(%rip), %rdi       # 0x208e
movl %r14d, %edx
xorl %eax, %eax
callq 0x1060
movq 0x8(%rbx), %rdi
movl %r14d, %esi
callq 0x151d
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
cmpl $0x6a, %edx
je 0x6f43
cmpl $0x66, %edx
je 0x6f2a
cmpl $0x64, %edx
jne 0x6fb3
movq (%rbx), %rdi
leaq 0x28(%rsp), %r15
movq %r15, %rsi
callq 0x32f0
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%r15), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x6f99
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7186
jmp 0x6f6a
movq %rbx, %rsi
callq 0x78fc
testb %al, %al
je 0x6fa2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x79b6
jmp 0x6f6a
leaq 0x7576(%rip), %rsi      # 0xe4c0
movl $0x5, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x35c0
cmpq $-0x1, %rax
je 0x6f90
movq %r14, %rdi
movq %rbx, %rsi
callq 0x740c
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f81
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x748f(%rip), %rsi      # 0xe426
jmp 0x6fa9
leaq 0x7459(%rip), %rsi      # 0xe3f9
jmp 0x6fa9
leaq 0x7465(%rip), %rsi      # 0xe40e
leaq 0x8(%rsp), %rdi
callq 0x3460
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0xbffc(%rip), %rdi      # 0x12fc0
callq 0x33d0
movq %rax, %rdi
callq 0x31a0
movl $0x1, %edi
callq 0x3410
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6ff5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rdi
callq 0x35e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x32f0
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%r15), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x7093
movq %r14, %rdi
movq %rbx, %rsi
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x7186
leaq 0x7426(%rip), %rsi      # 0xe4c0
movl $0x5, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x35c0
cmpq $-0x1, %rax
je 0x70c6
movq %r14, %rdi
movq %rbx, %rsi
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x740c
movq %rbx, %rsi
callq 0x78fc
testb %al, %al
je 0x70e9
movq %r14, %rdi
movq %rbx, %rsi
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x79b6
movq 0xbed0(%rip), %rdi      # 0x12fc0
leaq 0x72eb(%rip), %rsi      # 0xe3e2
callq 0x3360
movq %rax, %rdi
callq 0x31a0
movl $0x1, %edi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x8, %edx
callq 0x3550
leaq 0xb0(%rsp), %rdi
callq 0x30c0
testb %al, %al
je 0x797f
leaq 0x38(%rsp), %rdi
leaq 0xc(%rsp), %rsi
movl $0x2c, %edx
callq 0x3440
leaq 0x38(%rsp), %rdi
callq 0x30a0
xorl %ebx, %ebx
cmpb $0x52, 0xc(%rsp)
jne 0x798b
cmpb $0x49, 0xd(%rsp)
jne 0x798b
cmpb $0x46, 0xe(%rsp)
jne 0x798b
cmpb $0x46, 0xf(%rsp)
jne 0x798b
cmpb $0x57, 0x14(%rsp)
jne 0x798b
cmpb $0x41, 0x15(%rsp)
jne 0x798b
cmpb $0x56, 0x16(%rsp)
jne 0x798b
cmpb $0x45, 0x17(%rsp)
sete %bl
jmp 0x798b
leaq 0x38(%rsp), %rdi
callq 0x30a0
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 0x35e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7c6e
cmpb $0x49, 0x1(%rsi)
jne 0x7c6e
cmpb $0x46, 0x2(%rsi)
jne 0x7c6e
cmpb $0x46, 0x3(%rsi)
jne 0x7c6e
cmpb $0x57, (%rdx)
jne 0x7c6e
cmpb $0x41, 0x1(%rdx)
jne 0x7c6e
cmpb $0x56, 0x2(%rdx)
jne 0x7c6e
cmpb $0x45, 0x3(%rdx)
sete %al
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpl $0xff, %esi
ja 0x7ca8
movzwl %si, %eax
movzwl 0x1000(%rdi,%rax,2), %ecx
xorl %eax, %eax
movl $0x0, %edx
cmpq $0xff, %rcx
ja 0x7ca8
shll $0x4, %ecx
movq (%rdi,%rcx), %rax
movq 0x8(%rdi,%rcx), %rdx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5958(%rip), %rsi      # 0xe58b
movl $0x5, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x35c0
cmpq $-0x1, %rax
je 0x8c86
movq %rax, %r15
leaq 0x57eb(%rip), %rsi      # 0xe43d
movl $0x1, %ecx
movq %r14, %rdi
movq %rax, %rdx
callq 0x35c0
cmpq $-0x1, %rax
jne 0x8c6c
movq 0x8(%r14), %rax
leaq 0x5(%r15), %rdx
notq %r15
addq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x33a0
jmp 0x8c9f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x5c28(%rip), %rdx      # 0xe8bc
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x7e16
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
movl %esi, 0x28(%rdi)
testl %esi, %esi
je 0x951e
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 0x9a93(%rip), %rbx      # 0x12fc0
leaq 0x520a(%rip), %rsi      # 0xe73e
movl $0xf, %edx
movq %rbx, %rdi
callq 0x33d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3340
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3230
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movq 0x48(%rdi), %r15
subq 0x40(%rdi), %r15
movl %edx, %r14d
callq 0x34e0
cmpq %r14, %r15
jge 0x9623
testl %eax, %eax
jne 0x964f
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
subq %rax, %rcx
testq %rcx, %rcx
jle 0x95f4
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
incq %rcx
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rdx
subq %rax, %rdx
cmpq %rcx, %rdx
jg 0x95dd
movq %r14, %rax
subq 0x48(%rbx), %rax
addq 0x40(%rbx), %rax
testq %rax, %rax
jle 0x963d
xorl %eax, %eax
movq 0x38(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq %r14, %rcx
subq 0x48(%rbx), %rcx
incq %rax
addq 0x40(%rbx), %rcx
cmpq %rax, %rcx
jg 0x9606
jmp 0x963d
testl %eax, %eax
jne 0x964f
testl %ebp, %ebp
je 0x963d
xorl %eax, %eax
movq 0x40(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x962d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x32a0
movl %eax, %edi
callq 0x3210
// File: /workspace/github_cpp_makefile_star2_O1/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 0x34e0
cmpq %r12, %r13
jge 0x9761
testl %eax, %eax
jne 0x97ca
movq 0x40(%rbx), %rcx
movq 0x48(%rbx), %rax
subq %rcx, %rax
cmpq $0x2, %rax
jl 0x96f3
movq %rax, %rdx
shrq $0x3f, %rdx
addq %rax, %rdx
sarq %rdx
xorl %esi, %esi
movl $0x8012, %edi           # imm = 0x8012
movl $0x7fee, %r8d           # imm = 0x7FEE
movswl (%rcx,%rsi,2), %r9d
movswl (%r14,%rsi,2), %r10d
leal (%r10,%r9), %r11d
imull %r9d, %r10d
sarl $0x10, %r10d
subl %r10d, %r11d
cmpl $0xffff8000, %r11d      # imm = 0xFFFF8000
movl %r11d, %r9d
cmovll %edi, %r9d
cmpl $0x8000, %r11d          # imm = 0x8000
cmovgel %r8d, %r9d
movw %r9w, (%rcx,%rsi,2)
incq %rsi
cmpq %rsi, %rdx
jne 0x96b4
subq %rax, %r12
cmpq $0x2, %r12
jl 0x97b9
movq %r12, %rcx
shrq $0x3f, %rcx
addq %r12, %rcx
sarq %rcx
movq 0x38(%rbx), %rdx
addq %rax, %r14
xorl %eax, %eax
movl $0x8012, %esi           # imm = 0x8012
movl $0x7fee, %edi           # imm = 0x7FEE
movswl (%rdx,%rax,2), %r8d
movswl (%r14,%rax,2), %r9d
leal (%r9,%r8), %r10d
imull %r8d, %r9d
sarl $0x10, %r9d
subl %r9d, %r10d
cmpl $0xffff8000, %r10d      # imm = 0xFFFF8000
movl %r10d, %r8d
cmovll %esi, %r8d
cmpl $0x8000, %r10d          # imm = 0x8000
cmovgel %edi, %r8d
movw %r8w, (%rdx,%rax,2)
incq %rax
cmpq %rax, %rcx
jne 0x9720
jmp 0x97b9
testl %eax, %eax
jne 0x97ca
cmpl $0x2, %r15d
jb 0x97b9
shrl %r15d
movq 0x40(%rbx), %rax
xorl %ecx, %ecx
movl $0x8012, %edx           # imm = 0x8012
movl $0x7fee, %esi           # imm = 0x7FEE
movswl (%rax,%rcx,2), %edi
movswl (%r14,%rcx,2), %r8d
leal (%r8,%rdi), %r9d
imull %edi, %r8d
sarl $0x10, %r8d
subl %r8d, %r9d
cmpl $0xffff8000, %r9d       # imm = 0xFFFF8000
movl %r9d, %edi
cmovll %edx, %edi
cmpl $0x8000, %r9d           # imm = 0x8000
cmovgel %esi, %edi
movw %di, (%rax,%rcx,2)
incq %rcx
cmpq %rcx, %r15
jne 0x977e
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x32a0
movl %eax, %edi
callq 0x3210
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x48(%rdi), %r13
subq 0x40(%rdi), %r13
movl %edx, %r12d
callq 0x34e0
cmpq %r12, %r13
jge 0x98b9
testl %eax, %eax
jne 0x9912
movq 0x40(%rbx), %rcx
movq 0x48(%rbx), %rax
subq %rcx, %rax
leaq 0x3(%rax), %rdx
testq %rax, %rax
cmovnsq %rax, %rdx
cmpq $0x4, %rax
jl 0x985c
sarq $0x2, %rdx
xorl %esi, %esi
movslq (%rcx,%rsi,4), %rdi
movslq (%r14,%rsi,4), %r8
leaq (%r8,%rdi), %r9
imulq %rdi, %r8
sarq $0x20, %r8
subq %r8, %r9
xorl %edi, %edi
cmpq $0x7fffffff, %r9        # imm = 0x7FFFFFFF
setle %dil
addl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
movl %edi, (%rcx,%rsi,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x9827
subq %rax, %r12
leaq 0x3(%r12), %rcx
testq %r12, %r12
cmovnsq %r12, %rcx
cmpq $0x4, %r12
jl 0x9901
sarq $0x2, %rcx
movq 0x38(%rbx), %rdx
addq %rax, %r14
xorl %eax, %eax
movslq (%rdx,%rax,4), %rsi
movslq (%r14,%rax,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,%rax,4)
incq %rax
cmpq %rax, %rcx
jne 0x9882
jmp 0x9901
testl %eax, %eax
jne 0x9912
cmpl $0x4, %r15d
jb 0x9901
shrl $0x2, %r15d
movq 0x40(%rbx), %rax
xorl %ecx, %ecx
movslq (%rax,%rcx,4), %rdx
movslq (%r14,%rcx,4), %rsi
leaq (%rsi,%rdx), %rdi
imulq %rdx, %rsi
sarq $0x20, %rsi
subq %rsi, %rdi
xorl %edx, %edx
cmpq $0x7fffffff, %rdi       # imm = 0x7FFFFFFF
setle %dl
addl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movl %edx, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r15
jne 0x98cd
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x32a0
movl %eax, %edi
callq 0x3210
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x34e0
testl %eax, %eax
jne 0x99a6
testl %ebp, %ebp
je 0x9996
xorl %r12d, %r12d
movl %ebp, %eax
movl %eax, %r15d
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
cmpq %r15, %rsi
jge 0x997e
callq *%r14
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x31d0
movl 0x48(%rbx), %eax
subl 0x40(%rbx), %eax
addl %eax, %r12d
movq 0x38(%rbx), %rax
movq %rax, 0x40(%rbx)
movl %ebp, %eax
subl %r12d, %eax
jne 0x993c
jmp 0x9996
movl %r15d, %esi
callq *%r14
movq 0x40(%rbx), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x31d0
addq %r15, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x32a0
movl %eax, %edi
callq 0x3210
nop
// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/Mixer.cc
// Function: Mixer::get_mix(unsigned char*, unsigned int)
void Mixer::get_mix(uint8_t *buf, uint32_t size) {
    // 取数据，pos会移动	Fetch data, pos will move
    mtx.lock();

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

    while (size - buf_pos > 0) {
        if (size - buf_pos > buffer_end - pos) {
            std::memcpy(buf + buf_pos, 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 {
            std::memcpy(buf + buf_pos, 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 block
    // if (size > buffer_end - pos) {
        // std::cout << "---------------------" << std::endl;
        // std::cout << "pos start " << pos - buffer_start << std::endl;
        // std::cout << "size " << size << std::endl;
        // std::cout << "buffer_end - pos " << buffer_end - pos << std::endl;
        // std::memcpy(buf, pos, buffer_end - pos);
        // // 拷贝过后的数据归0			Return the data after copying to 0
        // std::memset(pos, 0, buffer_end-pos);

        // uint32_t left = size - (buffer_end - pos);
        // std::cout << "left is " << size - (buffer_end - pos) << std::endl;
        // std::memcpy(buf + (buffer_end - pos), buffer_start, left);
        // std::cout << "buf + (bufend - pos) " << (buffer_end - pos) << std::endl;
        // std::memset(buffer_start, 0, left);

        // pos = buffer_start + left;
        // std::cout << "pos end " << pos - buffer_start << std::endl;

    // } else {
        // std::memcpy(buf, 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 0x34e0
testl %eax, %eax
jne 0x9a43
testl %ebp, %ebp
je 0x9a33
xorl %r12d, %r12d
movl %ebp, %r15d
subl %r12d, %r15d
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdx
subq %rsi, %rdx
movl %r12d, %edi
addq %r14, %rdi
cmpq %r15, %rdx
jge 0x9a19
callq 0x32c0
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
subq %rdi, %rdx
xorl %esi, %esi
callq 0x31d0
movl 0x48(%rbx), %eax
subl 0x40(%rbx), %eax
addl %eax, %r12d
movq 0x38(%rbx), %rax
movq %rax, 0x40(%rbx)
cmpl %ebp, %r12d
jne 0x99ce
jmp 0x9a33
movq %r15, %rdx
callq 0x32c0
movq 0x40(%rbx), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x31d0
addq %r15, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x32a0
movl %eax, %edi
callq 0x3210
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x9c76
movq (%rdi), %rax
testq %rax, %rax
jne 0x9c64
movq 0x9364(%rip), %rax      # 0x12fc8
movq %rax, 0x96d5(%rip)      # 0x13340
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x9c84
jmp 0x9c8b
movq 0x934b(%rip), %rax      # 0x12fc8
movq %rax, 0x96bc(%rip)      # 0x13340
movq 0x932d(%rip), %rax      # 0x12fb8
movq %rax, 0x96b6(%rip)      # 0x13348
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x9cfb
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rbx, %r14
movq (%rbx), %rbx
testb $0x1, 0x19(%r14)
jne 0x9cba
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x9cba
callq 0x9c93
testb $0x1, 0x19(%r14)
jne 0x9cd0
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x9cd0
callq *0x9678(%rip)           # 0x13348
testb $0x2, 0x19(%r14)
jne 0x9ce6
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x9ce6
callq *0x9662(%rip)           # 0x13348
movq %r14, %rdi
callq *0x9659(%rip)           # 0x13348
testq %rbx, %rbx
jne 0x9c9f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x40, %edi
callq *0x962a(%rip)           # 0x13340
testq %rax, %rax
je 0x9d8e
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0xbec5(%rip) # 0x15c00
testq %r15, %r15
je 0x9d50
decq %r15
movb 0x1(%r15), %al
incq %r15
decb %al
cmpb $0x20, %al
jb 0x9d43
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9dbd
testq %rax, %rax
je 0x9da5
movq %rax, %r15
testl %ebp, %ebp
je 0x9d9b
decq %r15
movb 0x1(%r15), %al
incq %r15
decb %al
cmpb $0x20, %al
jb 0x9d6a
cmpb $0x0, (%r15)
je 0x9d9b
movq %rbx, %rdi
callq 0x9c93
movq %r15, 0xbe74(%rip)      # 0x15c00
jmp 0x9dad
movq $0x0, 0xbe67(%rip) # 0x15c00
jmp 0x9dad
testq %r14, %r14
je 0x9daf
movq %r15, (%r14)
jmp 0x9daf
movq %rbx, %rdi
callq 0x9c93
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa131
movb 0x18(%rdi), %al
testq %rcx, %rcx
je 0xa07c
cmpb $0x6, %al
ja 0xa131
movzbl %al, %eax
leaq 0x47ac(%rip), %r8       # 0xe810
movslq (%r8,%rax,4), %rax
addq %r8, %rax
jmpq *%rax
movq %rcx, %rdi
movl $0x6, %esi
callq 0xb45c
jmp 0xa0a2
cmpb $0x6, %al
ja 0xa131
movzbl %al, %eax
leaq 0x479e(%rip), %rcx      # 0xe82c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x6, %edi
callq *0x929e(%rip)           # 0x13340
testq %rax, %rax
je 0xa131
movw $0x65, 0x4(%rax)
movl $0x736c6166, (%rax)     # imm = 0x736C6166
jmp 0xa133
movq %rcx, %rdi
movl $0x5, %esi
callq 0xb45c
jmp 0xa0fc
movq %rcx, %rdi
movl $0x5, %esi
callq 0xb45c
jmp 0xa120
movq %rcx, %rsi
jmp 0xa10f
movq 0x20(%rdi), %rdi
movq %rcx, %rsi
jmp 0xa0eb
movq 0x20(%rdi), %rdi
xorl %esi, %esi
popq %rax
jmp 0xbf66
movl $0x5, %edi
callq *0x9244(%rip)           # 0x13340
testq %rax, %rax
je 0xa131
movb $0x0, 0x4(%rax)
movl $0x6c6c756e, (%rax)     # imm = 0x6C6C756E
jmp 0xa133
xorl %esi, %esi
popq %rax
jmp 0xb4fa
movl $0x5, %edi
callq *0x9220(%rip)           # 0x13340
testq %rax, %rax
je 0xa131
movb $0x0, 0x4(%rax)
movl $0x65757274, (%rax)     # imm = 0x65757274
jmp 0xa133
xorl %eax, %eax
popq %rcx
retq
xorl %ecx, %ecx
popq %rax
jmp 0xb682
xorl %ecx, %ecx
popq %rax
jmp 0xb9a2
// File: /workspace/github_cpp_makefile_star2_O1/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 *0x91d6(%rip)           # 0x13340
movq %rsp, %rcx
movq %rax, (%rcx)
movl %r15d, 0x8(%rcx)
movl $0x0, 0xc(%rcx)
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0xa040
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xacf1
movl %esi, %ebp
movq %rdi, %r14
movl $0x40, %edi
callq *0x8760(%rip)           # 0x13340
testq %rax, %rax
je 0xacf1
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), %r15
testq %r15, %r15
je 0xac64
movq %r15, %rdi
callq 0x3170
movq %rax, %r13
incq %r13
movq %r13, %rdi
callq *0x8704(%rip)           # 0x13340
testq %rax, %rax
je 0xac54
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x32c0
jmp 0xac57
xorl %r12d, %r12d
movq %r12, 0x20(%rbx)
testq %r12, %r12
je 0xace9
movq 0x38(%r14), %r15
testq %r15, %r15
je 0xaca8
movq %r15, %rdi
callq 0x3170
movq %rax, %r13
incq %r13
movq %r13, %rdi
callq *0x86bc(%rip)           # 0x13340
testq %rax, %rax
je 0xac9c
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x32c0
jmp 0xac9f
xorl %r12d, %r12d
movq %r12, 0x38(%rbx)
testq %r12, %r12
je 0xace9
testl %ebp, %ebp
je 0xacf3
movq 0x10(%r14), %r14
testq %r14, %r14
je 0xacf3
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x1, %esi
callq 0xabbc
testq %rax, %rax
je 0xace9
testq %r15, %r15
je 0xacd8
movq %rax, (%r15)
movq %r15, 0x8(%rax)
jmp 0xacdc
movq %rax, 0x10(%rbx)
movq (%r14), %r14
movq %rax, %r15
testq %r14, %r14
jne 0xacb8
jmp 0xacf3
movq %rbx, %rdi
callq 0x9c93
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/cJSON.cc
// Function: cJSON_Minify
void cJSON_Minify(char *json)
{
	char *into=json;
	while (*json)
	{
		if (*json==' ') json++;
		else if (*json=='\t') json++;	/* Whitespace characters. */
		else if (*json=='\r') json++;
		else if (*json=='\n') json++;
		else if (*json=='/' && json[1]=='/')  while (*json && *json!='\n') json++;	/* double-slash comments, to end of line. */
		else if (*json=='/' && json[1]=='*') {while (*json && !(*json=='*' && json[1]=='/')) json++;json+=2;}	/* multiline comments. */
		else if (*json=='\"'){*into++=*json++;while (*json && *json!='\"'){if (*json=='\\') *into++=*json++;*into++=*json++;}*into++=*json++;} /* string literals, which are \" sensitive. */
		else *into++=*json++;			/* All other characters. */
	}
	*into=0;	/* and null-terminate. */
}

// Assembly:
movq %rdi, %rax
movb (%rdi), %cl
movzbl %cl, %edx
cmpl $0x1f, %edx
jg 0xad23
cmpl $0x9, %edx
jle 0xad38
cmpl $0xa, %edx
je 0xad3a
cmpl $0xd, %edx
je 0xad3a
jmp 0xad88
cmpl $0x2f, %edx
je 0xad3f
cmpl $0x22, %edx
je 0xadb1
cmpl $0x20, %edx
je 0xad3a
jmp 0xad88
jne 0xad84
incq %rdi
jmp 0xad08
cmpb $0x2f, 0x1(%rdi)
jne 0xad56
movzbl (%rdi), %ecx
testl %ecx, %ecx
je 0xad08
cmpl $0xa, %ecx
je 0xad08
incq %rdi
jmp 0xad45
cmpl $0x22, %edx
je 0xadb1
cmpl $0x2f, %edx
jne 0xad88
cmpb $0x2a, 0x1(%rdi)
jne 0xad95
addq $0x2, %rdi
movzbl -0x2(%rdi), %ecx
cmpl $0x2a, %ecx
je 0xad79
testl %ecx, %ecx
jne 0xad7f
jmp 0xad08
cmpb $0x2f, -0x1(%rdi)
je 0xad08
incq %rdi
jmp 0xad6a
testl %edx, %edx
je 0xadd5
incq %rdi
movb %cl, (%rax)
incq %rax
jmp 0xad08
cmpb $0x22, %cl
je 0xadb1
jmp 0xad88
incq %rax
incq %rdi
jmp 0xadaf
addq $0x2, %rdi
movb %cl, 0x1(%rax)
addq $0x2, %rax
movb (%rdi), %cl
movb %cl, (%rax)
movzbl 0x1(%rdi), %ecx
cmpl $0x5c, %ecx
je 0xada4
testl %ecx, %ecx
je 0xadc5
cmpl $0x22, %ecx
jne 0xad9c
addq $0x2, %rdi
movb %cl, 0x1(%rax)
addq $0x2, %rax
jmp 0xad08
movb $0x0, (%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/cJSON.cc
// Function: parse_array(cJSON*, char const*)
static const char *parse_array(cJSON *item,const char *value)
{
	cJSON *child;
	if (*value!='[')	{ep=value;return 0;}	/* not an array! */

	item->type=cJSON_Array;
	value=skip(value+1);
	if (*value==']') return value+1;	/* empty array. */

	item->child=child=cJSON_New_Item();
	if (!item->child) return 0;		 /* memory fail */
	value=skip(parse_value(child,skip(value)));	/* skip any spacing, get the value. */
	if (!value) return 0;

	while (*value==',')
	{
		cJSON *new_item;
		if (!(new_item=cJSON_New_Item())) return 0; 	/* memory fail */
		child->next=new_item;new_item->prev=child;child=new_item;
		value=skip(parse_value(child,skip(value+1)));
		if (!value) return 0;	/* memory fail */
	}

	if (*value==']') return value+1;	/* end of array */
	ep=value;return 0;	/* malformed. */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpb $0x5b, (%rsi)
jne 0xb13c
movq %rdi, %r14
movl $0x5, 0x18(%rdi)
incq %rbx
movb (%rbx), %al
leal -0x1(%rax), %ecx
incq %rbx
cmpb $0x20, %cl
jb 0xb03c
cmpb $0x5d, %al
je 0xb145
movl $0x40, %edi
callq *0x82e4(%rip)           # 0x13340
movq %rax, %r15
testq %rax, %rax
je 0xb154
addq $-0x2, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
movq %r15, 0x10(%r14)
movb 0x1(%rbx), %al
incq %rbx
decb %al
cmpb $0x20, %al
jb 0xb086
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9dbd
movq %rax, %r14
testq %rax, %rax
je 0xb0b5
decq %r14
movb 0x1(%r14), %al
incq %r14
decb %al
cmpb $0x20, %al
jb 0xb0a8
testq %r14, %r14
je 0xb143
xorl %ebx, %ebx
movzbl (%r14), %eax
cmpl $0x2c, %eax
jne 0xb15a
movl $0x40, %edi
callq *0x8268(%rip)           # 0x13340
testq %rax, %rax
je 0xb134
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rax, (%r15)
movq %r15, 0x8(%rax)
movb 0x1(%r14), %al
incq %r14
decb %al
cmpb $0x20, %al
jb 0xb0f9
movq %r12, %rdi
movq %r14, %rsi
callq 0x9dbd
movq %rax, %r14
testq %rax, %rax
je 0xb129
decq %r14
movb 0x1(%r14), %al
incq %r14
decb %al
cmpb $0x20, %al
jb 0xb11c
testq %r14, %r14
setne %al
movq %r12, %r15
jmp 0xb136
xorl %eax, %eax
testb %al, %al
jne 0xb0c0
jmp 0xb145
movq %rbx, 0xaabd(%rip)      # 0x15c00
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, 0x10(%r14)
jmp 0xb143
cmpl $0x5d, %eax
jne 0xb167
incq %r14
movq %r14, %rbx
jmp 0xb145
movq %r14, 0xaa92(%rip)      # 0x15c00
jmp 0xb143
// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/cJSON.cc
// Function: parse_hex4(char const*)
static unsigned parse_hex4(const char *str)
{
	unsigned h=0;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	h=h<<4;str++;
	if (*str>='0' && *str<='9') h+=(*str)-'0'; else if (*str>='A' && *str<='F') h+=10+(*str)-'A'; else if (*str>='a' && *str<='f') h+=10+(*str)-'a'; else return 0;
	return h;
}

// Assembly:
movb (%rdi), %al
leal -0x30(%rax), %esi
movb $-0x30, %cl
movb $-0x30, %dl
cmpb $0xa, %sil
jb 0xb3af
leal -0x41(%rax), %esi
movb $-0x37, %dl
cmpb $0x6, %sil
jb 0xb3af
leal -0x61(%rax), %esi
movb $-0x57, %dl
cmpb $0x5, %sil
ja 0xb459
movb 0x1(%rdi), %sil
leal -0x30(%rsi), %r8d
cmpb $0xa, %r8b
jb 0xb3d9
leal -0x41(%rsi), %r8d
movb $-0x37, %cl
cmpb $0x6, %r8b
jb 0xb3d9
leal -0x61(%rsi), %r8d
movb $-0x57, %cl
cmpb $0x5, %r8b
ja 0xb459
movb 0x2(%rdi), %r8b
leal -0x30(%r8), %r11d
movb $-0x30, %r9b
movb $-0x30, %r10b
cmpb $0xa, %r11b
jb 0xb407
leal -0x41(%r8), %r11d
movb $-0x37, %r10b
cmpb $0x6, %r11b
jb 0xb407
leal -0x61(%r8), %r11d
movb $-0x57, %r10b
cmpb $0x5, %r11b
ja 0xb459
movb 0x3(%rdi), %dil
leal -0x30(%rdi), %r11d
cmpb $0xa, %r11b
jb 0xb42f
leal -0x41(%rdi), %r11d
movb $-0x37, %r9b
cmpb $0x6, %r11b
jb 0xb42f
leal -0x61(%rdi), %r11d
movb $-0x57, %r9b
cmpb $0x5, %r11b
ja 0xb459
addb %dl, %al
movzbl %al, %eax
addb %cl, %sil
movzbl %sil, %ecx
shll $0x8, %eax
shll $0x4, %ecx
addl %eax, %ecx
addb %r10b, %r8b
movzbl %r8b, %edx
addl %ecx, %edx
shll $0x4, %edx
addb %r9b, %dil
movzbl %dil, %eax
addl %edx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/cJSON.cc
// Function: ensure(printbuffer*, int)
static char* ensure(printbuffer *p,int needed)
{
	char *newbuffer;int newsize;
	if (!p || !p->buffer) return 0;
	needed+=p->offset;
	if (needed<=p->length) return p->buffer+p->offset;

	newsize=pow2gt(needed);
	newbuffer=(char*)cJSON_malloc(newsize);
	if (!newbuffer) {cJSON_free(p->buffer);p->length=0,p->buffer=0;return 0;}
	if (newbuffer) memcpy(newbuffer,p->buffer,p->length);
	cJSON_free(p->buffer);
	p->length=newsize;
	p->buffer=newbuffer;
	return newbuffer+p->offset;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0xb4d4
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0xc(%rdi), %rcx
addl %ecx, %esi
cmpl 0x8(%rdi), %esi
jle 0xb4d7
decl %esi
movl %esi, %eax
sarl %eax
orl %esi, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %ebp
sarl $0x10, %ebp
orl %ecx, %ebp
incl %ebp
movslq %ebp, %rdi
callq *0x7e9b(%rip)           # 0x13340
testq %rax, %rax
je 0xb4dc
movq %rax, %r14
movq (%rbx), %rsi
movslq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x32c0
movq (%rbx), %rdi
callq *0x7e83(%rip)           # 0x13348
movl %ebp, 0x8(%rbx)
movq %r14, (%rbx)
movslq 0xc(%rbx), %rax
addq %r14, %rax
jmp 0xb4f5
xorl %eax, %eax
retq
addq %rcx, %rax
jmp 0xb4f5
movq (%rbx), %rdi
callq *0x7e63(%rip)           # 0x13348
movl $0x0, 0x8(%rbx)
movq $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/cJSON.cc
// Function: print_number(cJSON*, printbuffer*)
static char *print_number(cJSON *item,printbuffer *p)
{
	char *str=0;
	double d=item->valuedouble;
	if (d==0)
	{
		if (p)	str=ensure(p,2);
		else	str=(char*)cJSON_malloc(2);	/* special case for 0. */
		if (str) strcpy(str,"0");
	}
	else if (fabs(((double)item->valueint)-d)<=DBL_EPSILON && d<=INT_MAX && d>=INT_MIN)
	{
		if (p)	str=ensure(p,21);
		else	str=(char*)cJSON_malloc(21);	/* 2^64+1 can be represented in 21 chars. */
		if (str)	sprintf(str,"%d",item->valueint);
	}
	else
	{
		if (p)	str=ensure(p,64);
		else	str=(char*)cJSON_malloc(64);	/* This is a nice tradeoff. */
		if (str)
		{
			if (fabs(floor(d)-d)<=DBL_EPSILON && fabs(d)<1.0e60)sprintf(str,"%.0f",d);
			else if (fabs(d)<1.0e-6 || fabs(d)>1.0e9)			sprintf(str,"%e",d);
			else												sprintf(str,"%f",d);
		}
	}
	return str;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movsd 0x30(%rdi), %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jne 0xb526
jp 0xb526
testq %rsi, %rsi
je 0xb577
movq %rsi, %rdi
movl $0x2, %esi
callq 0xb45c
jmp 0xb582
ucomisd 0x328a(%rip), %xmm2     # 0xe7b8
jb 0xb598
movsd 0x3288(%rip), %xmm0     # 0xe7c0
ucomisd %xmm2, %xmm0
jb 0xb598
movq %rdi, %r14
xorps %xmm0, %xmm0
cvtsi2sdl 0x28(%rdi), %xmm0
subsd %xmm2, %xmm0
andpd 0x32ab(%rip), %xmm0     # 0xe800
movsd 0x326b(%rip), %xmm1     # 0xe7c8
ucomisd %xmm0, %xmm1
jb 0xb598
testq %rsi, %rsi
je 0xb5b1
movq %rsi, %rdi
movl $0x15, %esi
callq 0xb45c
jmp 0xb5bc
movl $0x2, %edi
callq *0x7dbe(%rip)           # 0x13340
movq %rax, %rbx
testq %rax, %rax
je 0xb63d
movw $0x30, (%rbx)
jmp 0xb677
movapd %xmm2, (%rsp)
testq %rsi, %rsi
je 0xb5de
movq %rsi, %rdi
movl $0x40, %esi
callq 0xb45c
jmp 0xb5e9
movl $0x15, %edi
callq *0x7d84(%rip)           # 0x13340
movq %rax, %rbx
testq %rax, %rax
je 0xb63d
movl 0x28(%r14), %edx
leaq 0x32d8(%rip), %rsi      # 0xe8a7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3090
jmp 0xb677
movl $0x40, %edi
callq *0x7d57(%rip)           # 0x13340
movq %rax, %rbx
testq %rax, %rax
movapd (%rsp), %xmm0
je 0xb63d
callq 0x3590
movapd (%rsp), %xmm4
movapd 0x31f8(%rip), %xmm2     # 0xe800
movapd %xmm4, %xmm1
andpd %xmm2, %xmm1
movsd 0x31b8(%rip), %xmm3     # 0xe7d0
ucomisd %xmm1, %xmm3
jbe 0xb641
subsd %xmm4, %xmm0
andpd %xmm2, %xmm0
movsd 0x319a(%rip), %xmm2     # 0xe7c8
ucomisd %xmm0, %xmm2
jb 0xb641
leaq 0x326f(%rip), %rsi      # 0xe8aa
jmp 0xb669
xorl %ebx, %ebx
jmp 0xb677
movsd 0x318f(%rip), %xmm0     # 0xe7d8
ucomisd %xmm1, %xmm0
ja 0xb662
ucomisd 0x3189(%rip), %xmm1     # 0xe7e0
ja 0xb662
leaq 0x3252(%rip), %rsi      # 0xe8b2
jmp 0xb669
leaq 0x3246(%rip), %rsi      # 0xe8af
movq %rbx, %rdi
movapd %xmm4, %xmm0
movb $0x1, %al
callq 0x3090
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/main.cc
// Function: signal_handler(int)
static void signal_handler(int signal) {
    stop_detect();
    stop_play();

    // 删除文件		Delete Files
    post_process();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
callq 0x8314
callq 0x9a4c
movl $0x0, 0xc(%rsp)
leaq 0x1f04(%rip), %rdi      # 0xeafd
leaq 0x1fff(%rip), %rsi      # 0xebff
callq 0x33f0
testq %rax, %rax
je 0xcc49
movq %rax, %rbx
leaq 0x1c93(%rip), %rsi      # 0xe8a7
leaq 0xc(%rsp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x3620
cmpl $0x1, %eax
jne 0xcc49
movq %rbx, %rdi
callq 0x3370
movl 0xc(%rsp), %ebx
callq 0x34d0
cmpl %eax, %ebx
jne 0xcc49
leaq 0x1eb9(%rip), %rdi      # 0xeafd
callq 0x3600
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/utils.cc
// Function: add_event_id(int)
void add_event_id(int event_id) {
    if (event_id > FILE_NUMS) {
        std::cout << "add error file is lager" << std::endl;
        return;
    }
    mtx.lock();
    key_detects_bool[event_id] = true;
    mtx.unlock();
}

// Assembly:
pushq %rbx
cmpl $0x401, %edi            # imm = 0x401
jl 0xcfb3
movq 0x6049(%rip), %rbx      # 0x12fc0
leaq 0x1c6b(%rip), %rsi      # 0xebe9
movl $0x17, %edx
movq %rbx, %rdi
callq 0x33d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3340
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
popq %rbx
jmp 0x3230
movl %edi, %ebx
leaq 0x9144(%rip), %rdi      # 0x16100
callq 0x34e0
testl %eax, %eax
jne 0xcfe0
movslq %ebx, %rax
leaq 0x8d31(%rip), %rcx      # 0x15d00
movb $0x1, (%rax,%rcx)
leaq 0x9126(%rip), %rdi      # 0x16100
popq %rbx
jmp 0x32a0
movl %eax, %edi
callq 0x3210