// File: Wombozo[P]harmony/src/user.cpp
// Function: handle_sd()
static void handle_sd()
{
    std::string tonic, scale;
    do
    {
        std::cin.clear();
        std::cout << "Select the tonic : ";
        std::cin >> tonic;
    } while (!valid_user_note_input(tonic));
    do
    {
        std::cin.clear();
        std::cout << "Select the scale : ";
        std::cin >> std::ws;
        std::getline(std::cin, scale);
    } while (!valid_user_type_scale_input(scale));
    Note *tmp = u_parse_note(tonic);
    Scale s(tmp, scale);
    std::cout << tmp->display() + " " + scale + " scale is : " + s.display() << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
leaq -0x20(%rbp), %rdi
callq 0x3300
leaq -0x40(%rbp), %rdi
callq 0x3300
movq 0x939c(%rip), %rdi      # 0x20fe0
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x3390
jmp 0x17c57
movq 0x9372(%rip), %rdi      # 0x20fd0
leaq 0x192a(%rip), %rsi      # 0x1958f
callq 0x3220
jmp 0x17c6c
movq 0x936d(%rip), %rdi      # 0x20fe0
leaq -0x20(%rbp), %rsi
callq 0x32c0
jmp 0x17c7e
jmp 0x17c80
leaq -0x20(%rbp), %rdi
callq 0x82c0
movb %al, -0x171(%rbp)
jmp 0x17c91
movb -0x171(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x17c3d
jmp 0x17c9f
movq 0x933a(%rip), %rdi      # 0x20fe0
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x3390
jmp 0x17cb9
movq 0x9310(%rip), %rdi      # 0x20fd0
leaq 0x18dc(%rip), %rsi      # 0x195a3
callq 0x3220
jmp 0x17cce
movq 0x930b(%rip), %rdi      # 0x20fe0
movq 0x92ec(%rip), %rsi      # 0x20fc8
callq 0x30c0
jmp 0x17ce3
movq 0x92f6(%rip), %rdi      # 0x20fe0
leaq -0x40(%rbp), %rsi
callq 0x3080
jmp 0x17cf5
jmp 0x17cf7
leaq -0x40(%rbp), %rdi
callq 0x91c0
movb %al, -0x172(%rbp)
jmp 0x17d08
movb -0x172(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x17c9f
leaq -0x20(%rbp), %rdi
callq 0xa0a0
movq %rax, -0x180(%rbp)
jmp 0x17d26
movq -0x180(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x169f0
jmp 0x17d47
movq -0x58(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x150(%rbp), %rdi
callq *%rax
jmp 0x17d5c
leaq 0x183e(%rip), %rdx      # 0x195a1
leaq -0x130(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xa330
jmp 0x17d78
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0xfc40
jmp 0x17d91
leaq 0x181f(%rip), %rdx      # 0x195b7
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0xa330
jmp 0x17dad
leaq -0x170(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x177c0
jmp 0x17dc2
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x170(%rbp), %rdx
callq 0x18450
jmp 0x17dde
movq 0x91eb(%rip), %rdi      # 0x20fd0
leaq -0xd0(%rbp), %rsi
callq 0x3210
movq %rax, -0x188(%rbp)
jmp 0x17dfa
movq -0x188(%rbp), %rdi
movq 0x91b0(%rip), %rsi      # 0x20fb8
callq 0x3250
jmp 0x17e0f
leaq -0xd0(%rbp), %rdi
callq 0x3190
leaq -0x170(%rbp), %rdi
callq 0x3190
leaq -0xf0(%rbp), %rdi
callq 0x3190
leaq -0x110(%rbp), %rdi
callq 0x3190
leaq -0x130(%rbp), %rdi
callq 0x3190
leaq -0x150(%rbp), %rdi
callq 0x3190
leaq -0xb0(%rbp), %rdi
callq 0x17780
leaq -0x40(%rbp), %rdi
callq 0x3190
leaq -0x20(%rbp), %rdi
callq 0x3190
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17f49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17f3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17f31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17f25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17f19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17f0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x17f01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3190
leaq -0x170(%rbp), %rdi
callq 0x3190
leaq -0xf0(%rbp), %rdi
callq 0x3190
leaq -0x110(%rbp), %rdi
callq 0x3190
leaq -0x130(%rbp), %rdi
callq 0x3190
leaq -0x150(%rbp), %rdi
callq 0x3190
leaq -0xb0(%rbp), %rdi
callq 0x17780
leaq -0x40(%rbp), %rdi
callq 0x3190
leaq -0x20(%rbp), %rdi
callq 0x3190
movq -0x48(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)