// File: /workspace/github_cpp_makefile_star2_O3/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, 0x68(%rsp)
movq %rdi, %r14
leaq 0x38(%rsp), %rbp
xorl %r12d, %r12d
leaq 0xc201(%rip), %rdx      # 0x13360
leaq 0x8(%rsp), %rdi
xorl %eax, %eax
movq %rax, 0x70(%rsp)
leaq 0x1(%r12), %rax
leaq (%r12,%r12,4), %rcx
leaq (%rdx,%rcx,8), %r15
addq $0x20, %r15
shlq $0x4, %r12
addq %r14, %r12
movq %r12, %r13
movq %rax, %r12
cmpq $0x0, (%r13)
jne 0x72f2
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rdi, %rbx
callq 0x7e42
movq %rbx, %rdi
leaq 0x727e(%rip), %rsi      # 0xe43d
callq 0x3630
movq -0x20(%r15), %rsi
movq -0x18(%r15), %rdx
movq %rbx, %rdi
callq 0x3110
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x71f7
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x71fe
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
leaq 0x58(%rsp), %rbp
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x7218(%rip), %rsi      # 0xe43f
callq 0x3630
movq %rbp, 0x48(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x724f
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x7256
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
leaq 0x48(%rsp), %rsi
movq %r13, %rdx
callq 0x79fe
movl %eax, %ebp
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x729c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x72b8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x72d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
testb %bpl, %bpl
jne 0x730c
movzwl (%r15), %eax
movw $0x0, 0x1000(%r14,%rax,2)
leaq 0x38(%rsp), %rbp
leaq 0x8(%rsp), %rdi
incq %r12
addq $0x28, %r15
addq $0x10, %r13
cmpq $0x101, %r12            # imm = 0x101
jne 0x7189
jmp 0x7340
movzwl (%r15), %eax
leal -0x1(%r12), %ecx
movw %cx, 0x1000(%r14,%rax,2)
movb $0x1, %al
cmpq $0x100, %r12            # imm = 0x100
leaq 0x38(%rsp), %rbp
leaq 0xc02d(%rip), %rdx      # 0x13360
leaq 0x8(%rsp), %rdi
jne 0x7166
jmp 0x7347
testb $0x1, 0x70(%rsp)
je 0x7356
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xbc63(%rip), %rdi      # 0x12fc0
leaq 0x70e0(%rip), %rsi      # 0xe444
callq 0x3360
movq %rax, %rdi
movq 0x68(%rsp), %rsi
callq 0x32e0
movq %rax, %rdi
callq 0x31a0
movl $0x1, %edi
callq 0x3410
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x73ac
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3390
jmp 0x73ac
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x73cf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3390
jmp 0x73cf
jmp 0x73cc
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x73eb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3390
movq %rbx, %rdi
callq 0x35e0
nop