// File: /workspace/github_cpp_makefile_star2_O1/joao18araujo[P]pierluigi/src/song_reader.cpp
// Function: SongReader::string_to_scale(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Scale SongReader::string_to_scale(string line){
  if(!regex_match(line, regex("\\\\key [a-g] \\\\(major|minor)")))
    return Scale();

  stringstream scale_line(line);
  string identificator, key, mode;
  scale_line >> identificator >> key >> mode;
  mode.erase(mode.begin());
  return Scale(key, mode);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x16a4a(%rip), %rsi     # 0x3b68a
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movl $0x10, %edx
callq 0x26334
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
xorps %xmm0, %xmm0
leaq 0x120(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x316c1
movl %eax, %ebp
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x24c98
movq 0x130(%rsp), %rsi
subq %rdi, %rsi
callq 0x5360
leaq 0x48(%rsp), %rdi
callq 0x2639c
testb %bpl, %bpl
je 0x24ed7
leaq 0x120(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x18, %edx
callq 0x5540
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
callq 0x5450
leaq 0x68(%rsp), %rsi
movq %rax, %rdi
callq 0x5450
leaq 0x28(%rsp), %rsi
movq %rax, %rdi
callq 0x5450
leaq 0x28(%rsp), %rdi
movl $0x1, %edx
xorl %esi, %esi
callq 0x5400
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xb544
leaq 0xb8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x16996(%rip), %rdx     # 0x3b6fa
leaq 0xa8(%rsp), %rdi
movq %rdx, %rsi
callq 0xb62c
movq %r14, %r15
leaq 0xc8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a814
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xb544
leaq 0xc8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x1cf8e
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x24df4
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24e15
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24e36
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24e53
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24e6f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x24e86
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x24e9d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x24eb4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x240ad(%rip), %rsi     # 0x48f68
leaq 0x120(%rsp), %rdi
callq 0x52a0
leaq 0x1a0(%rsp), %rdi
callq 0x5130
jmp 0x24edf
movq %rbx, %rdi
callq 0x1ca14
movq %rbx, %rax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x24f19
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x24f19
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xb116
jmp 0x24f2b
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24f50
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x24f50
movq %r14, %r15
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24fa2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x24fa2
jmp 0x24f9c
movq %rax, %rbx
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x24f90
movq 0x130(%rsp), %rsi
subq %rdi, %rsi
callq 0x5360
leaq 0x48(%rsp), %rdi
callq 0x2639c
jmp 0x25008
movq %r14, %r15
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x24fb9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x24fd0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x24fe7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x23f7a(%rip), %rsi     # 0x48f68
leaq 0x120(%rsp), %rdi
callq 0x52a0
leaq 0x1a0(%rsp), %rdi
callq 0x5130
movq %rbx, %rdi
callq 0x55e0