// File: /workspace/github_cpp_makefile_star2_O3/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 0x16a2a(%rip), %rsi     # 0x3b68a
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movl $0x10, %edx
callq 0x26350
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 0x316eb
movl %eax, %ebp
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x24cb8
movq 0x130(%rsp), %rsi
subq %rdi, %rsi
callq 0x5360
leaq 0x48(%rsp), %rdi
callq 0x263b8
testb %bpl, %bpl
je 0x24ef7
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 0xb50a
leaq 0xb8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x16976(%rip), %rdx     # 0x3b6fa
leaq 0xa8(%rsp), %rdi
movq %rdx, %rsi
callq 0xb5f8
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 0x1a870
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0xb50a
leaq 0xc8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x1cfee
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x24e14
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24e35
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0xe0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24e56
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24e73
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24e8f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x24ea6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x24ebd
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x24ed4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x2408d(%rip), %rsi     # 0x48f68
leaq 0x120(%rsp), %rdi
callq 0x52a0
leaq 0x1a0(%rsp), %rdi
callq 0x5130
jmp 0x24eff
movq %rbx, %rdi
callq 0x1ca74
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 0x24f39
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x24f39
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0xb0e0
jmp 0x24f4b
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24f70
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x24f70
movq %r14, %r15
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x24fc2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x24fc2
jmp 0x24fbc
movq %rax, %rbx
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x24fb0
movq 0x130(%rsp), %rsi
subq %rdi, %rsi
callq 0x5360
leaq 0x48(%rsp), %rdi
callq 0x263b8
jmp 0x25028
movq %r14, %r15
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x24fd9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x24ff0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x25007
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x23f5a(%rip), %rsi     # 0x48f68
leaq 0x120(%rsp), %rdi
callq 0x52a0
leaq 0x1a0(%rsp), %rdi
callq 0x5130
movq %rbx, %rdi
callq 0x55e0