// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/song_reader.cpp
// Function: SongReader::song_to_voice_string[abi:cxx11](Song&)
string SongReader::song_to_voice_string(Song & song){
  string counterpoint_voice = "\n\nCounterpointVoice = {\n\t" +
          song_clef_to_string(song) + " " +
          scale_to_string(song.scale) + " " +
          compass_time_to_string(song.time) + "\n\t";

  Note prev;
  int note_count = 0;
  for(auto note : song.notes){
    prev = note;
    note_count++;
    if(note_count > 1){
      if(note_count % 10 == 1) counterpoint_voice += "\n\t";
      else counterpoint_voice += " ";
    }
    counterpoint_voice += SongReader::note_to_string(note);
  }

  counterpoint_voice += "\n}\n\n";

  return counterpoint_voice;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rsi, %r12
movq %rdi, %r15
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
callq 0x1879c
leaq 0x10d0f(%rip), %rsi     # 0x29731
leaq 0x70(%rsp), %rdi
movq %rbx, %rdx
callq 0x18e88
leaq 0x107d6(%rip), %rdx     # 0x2920c
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xf94d
leaq 0x18(%r12), %rsi
leaq 0x1d8(%rsp), %rdi
callq 0x98ec
leaq 0x50(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x18596
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xf96c
leaq 0x10782(%rip), %rdx     # 0x2920c
leaq 0xd0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xf94d
movq 0xc8(%r12), %rsi
leaq 0x30(%rsp), %rdi
callq 0x186be
leaq 0x128(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0xf96c
leaq 0x10c79(%rip), %rdx     # 0x29748
leaq 0x128(%rsp), %rsi
movq %r15, %rdi
callq 0xf94d
leaq 0x128(%rsp), %rdi
callq 0x51b0
leaq 0x30(%rsp), %rdi
callq 0x51b0
leaq 0xd0(%rsp), %rdi
callq 0x51b0
leaq 0x10(%rsp), %rdi
callq 0x51b0
leaq 0x50(%rsp), %rdi
callq 0x51b0
leaq 0x1d8(%rsp), %rdi
callq 0x9946
leaq 0x90(%rsp), %rdi
callq 0x51b0
leaq 0x70(%rsp), %rdi
callq 0x51b0
leaq 0xb0(%rsp), %rdi
callq 0x51b0
leaq 0x128(%rsp), %rdi
callq 0x12712
movq (%r12), %r13
movq 0x8(%r12), %rax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
pushq $0x1
popq %rbp
movl %ebp, %eax
xorl %edx, %edx
pushq $0xa
popq %rcx
divl %ecx
cmpq 0x8(%rsp), %r13
je 0x18c32
movl %eax, %ebx
movq %r15, %r12
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x12676
leaq 0x128(%rsp), %rdi
movq %r15, %rsi
callq 0x97e8
movl %r14d, %r15d
subl $0x1, %r15d
jb 0x18bcc
imull $-0xa, %ebx, %eax
leaq 0x10b90(%rip), %rsi     # 0x29748
cmpl %r14d, %eax
je 0x18bc4
leaq 0x10648(%rip), %rsi     # 0x2920c
movq %r12, %rdi
callq 0x5620
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x12676
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x18102
movq %r12, %rdi
movq %r14, %rsi
callq 0x5650
movq %r14, %rdi
callq 0x51b0
leaq 0x180(%rsp), %rdi
callq 0x979a
leaq 0xd0(%rsp), %rdi
callq 0x979a
addq $0x58, %r13
incl %ebp
movl %r15d, %r14d
movq %r12, %r15
jmp 0x18b69
leaq 0x10b12(%rip), %rsi     # 0x2974b
movq %r15, %rdi
callq 0x5620
leaq 0x128(%rsp), %rdi
callq 0x979a
movq %r15, %rax
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x18d3f
movq %rax, %r14
jmp 0x18d4c
movq %rax, %r14
leaq 0x128(%rsp), %rdi
callq 0x51b0
jmp 0x18c88
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x51b0
jmp 0x18c97
movq %rax, %r14
leaq 0xd0(%rsp), %rdi
callq 0x51b0
jmp 0x18ca9
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x51b0
jmp 0x18cb8
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x51b0
leaq 0x1d8(%rsp), %rdi
callq 0x9946
leaq 0x90(%rsp), %rdi
callq 0x51b0
leaq 0x70(%rsp), %rdi
callq 0x51b0
leaq 0xb0(%rsp), %rdi
jmp 0x18d4f
movq %rax, %r14
jmp 0x18cc2
movq %rax, %r14
jmp 0x18ccf
movq %rax, %r14
jmp 0x18cdc
movq %rax, %r14
jmp 0x18ce6
jmp 0x18d2c
movq %rax, %r14
jmp 0x18d18
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x51b0
leaq 0x180(%rsp), %rdi
callq 0x979a
jmp 0x18d2f
movq %rax, %r14
jmp 0x18d3c
movq %rax, %r14
leaq 0xd0(%rsp), %rdi
callq 0x979a
movq %r12, %r15
leaq 0x128(%rsp), %rdi
callq 0x979a
movq %r15, %rdi
callq 0x51b0
movq %r14, %rdi
callq 0x55d0