// File: Wombozo[P]harmony/src/user.cpp
// Function: handle_cd()
static void handle_cd()
{
    std::string root, type;
    do
    {
        std::cin.clear();
        std::cout << "Select the root note of the chord you want to display : ";
        std::cin >> root;
    } while (!valid_user_note_input(root));
    do
    {
        std::cin.clear();
        std::cout << "Select the type chord you want : ";
        std::cin >> type;
    } while (!valid_user_type_chord_input(type));
    Note *tmp = u_parse_note(root);
    if (!type.compare("M"))
        type = "";
    Chord c(tmp, type);
    std::cout << c.getName() << " : " << c.displayNotes() << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
leaq -0x20(%rbp), %rdi
callq 0x3300
leaq -0x40(%rbp), %rdi
callq 0x3300
movq 0x962c(%rip), %rdi      # 0x20fe0
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x3390
jmp 0x179c7
movq 0x9602(%rip), %rdi      # 0x20fd0
leaq 0x1b5f(%rip), %rsi      # 0x19534
callq 0x3220
jmp 0x179dc
movq 0x95fd(%rip), %rdi      # 0x20fe0
leaq -0x20(%rbp), %rsi
callq 0x32c0
jmp 0x179ee
jmp 0x179f0
leaq -0x20(%rbp), %rdi
callq 0x82c0
movb %al, -0x109(%rbp)
jmp 0x17a01
movb -0x109(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x179ad
jmp 0x17a0f
movq 0x95ca(%rip), %rdi      # 0x20fe0
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x3390
jmp 0x17a29
movq 0x95a0(%rip), %rdi      # 0x20fd0
leaq 0x1b36(%rip), %rsi      # 0x1956d
callq 0x3220
jmp 0x17a3e
movq 0x959b(%rip), %rdi      # 0x20fe0
leaq -0x40(%rbp), %rsi
callq 0x32c0
jmp 0x17a50
jmp 0x17a52
leaq -0x40(%rbp), %rdi
callq 0x95d0
movb %al, -0x10a(%rbp)
jmp 0x17a63
movb -0x10a(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x17a0f
leaq -0x20(%rbp), %rdi
callq 0xa0a0
movq %rax, -0x118(%rbp)
jmp 0x17a81
movq -0x118(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x40(%rbp), %rdi
leaq 0x1857(%rip), %rsi      # 0x192ee
callq 0x30b0
cmpl $0x0, %eax
jne 0x17ac6
leaq 0x1afa(%rip), %rsi      # 0x195a2
leaq -0x40(%rbp), %rdi
callq 0x32f0
jmp 0x17ab3
jmp 0x17ac6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17bfa
movq -0x58(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0xca00
jmp 0x17adc
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xf2a0
jmp 0x17af1
movq 0x94d8(%rip), %rdi      # 0x20fd0
leaq -0xe8(%rbp), %rsi
callq 0x3210
movq %rax, -0x120(%rbp)
jmp 0x17b0d
movq -0x120(%rbp), %rdi
leaq 0x1a84(%rip), %rsi      # 0x1959f
callq 0x3220
movq %rax, -0x128(%rbp)
jmp 0x17b29
leaq -0x108(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0xf130
jmp 0x17b3e
movq -0x128(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x3210
movq %rax, -0x130(%rbp)
jmp 0x17b5a
movq -0x130(%rbp), %rdi
movq 0x9450(%rip), %rsi      # 0x20fb8
callq 0x3250
jmp 0x17b6f
leaq -0x108(%rbp), %rdi
callq 0x3190
leaq -0xe8(%rbp), %rdi
callq 0x3190
leaq -0xc8(%rbp), %rdi
callq 0xe5f0
leaq -0x40(%rbp), %rdi
callq 0x3190
leaq -0x20(%rbp), %rdi
callq 0x3190
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17bee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17be2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x3190
leaq -0xe8(%rbp), %rdi
callq 0x3190
leaq -0xc8(%rbp), %rdi
callq 0xe5f0
leaq -0x40(%rbp), %rdi
callq 0x3190
leaq -0x20(%rbp), %rdi
callq 0x3190
movq -0x48(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)