// File: /workspace/github_cpp_makefile_star2_O1/fgheng[P]keysound/src/Audio.cc
// Function: Audio::from_dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Audio::from_dir(const std::string &str) {
    bool has_file = false;
    // 目录	List
    for (int i = 0; i < 256; i++) {
        if (wav_datas[i].data) continue;
        if (read_wav(str + "/" + KEYS[i].first + ".wav", wav_datas[i])) {
            has_file = true;
            datas[KEYS[i].second] = i;
        }
        else {
            datas[KEYS[i].second] = 0;
        }
    }

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x48(%rsp)
movq %rdi, %r14
leaq 0x18(%rsp), %rbp
leaq 0xc1b8(%rip), %r12      # 0x13360
xorl %r15d, %r15d
leaq 0x58(%rsp), %r13
movq %rdi, 0x50(%rsp)
xorl %esi, %esi
cmpq $0x0, (%r14)
jne 0x7342
movl %esi, 0x4(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x7ea6
movq %r13, %rdi
leaq 0x724d(%rip), %rsi      # 0xe43d
callq 0x3630
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r13, %rbx
movq %r13, %rdi
callq 0x3110
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x722c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x7233
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
leaq 0x38(%rsp), %rbp
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x8(%rsp), %rdi
leaq 0x71e3(%rip), %rsi      # 0xe43f
callq 0x3630
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7284
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x728b
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x50(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %r14, %rdx
callq 0x7a28
movl %eax, %ebp
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x72d3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x72ef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x730b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3390
testb %bpl, %bpl
movl $0x0, %eax
cmovnel %r15d, %eax
movl 0x4(%rsp), %esi
movzbl %sil, %esi
movl $0x1, %ecx
cmovnel %ecx, %esi
movzwl 0x20(%r12), %ecx
movq 0x50(%rsp), %rdx
movw %ax, 0x1000(%rdx,%rcx,2)
leaq 0x18(%rsp), %rbp
movq %rbx, %r13
incq %r15
addq $0x28, %r12
addq $0x10, %r14
cmpq $0x100, %r15            # imm = 0x100
jne 0x71b7
testb $0x1, %sil
je 0x736f
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xbc4a(%rip), %rdi      # 0x12fc0
leaq 0x70c7(%rip), %rsi      # 0xe444
callq 0x3360
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x32e0
movq %rax, %rdi
callq 0x31a0
movl $0x1, %edi
callq 0x3410
movq %rax, %rbx
jmp 0x73cc
jmp 0x73a8
movq %rax, %rbx
jmp 0x73e8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x73cc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x73e8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x7404
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rdi
callq 0x35e0