// File: /workspace/github_cpp_makefile_star2_O1/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 $0x298, %rsp            # imm = 0x298
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x170(%rsp), %rbx
movq %rbx, %rdi
callq 0x255c6
leaq 0x15cd1(%rip), %rcx     # 0x3b6e1
movl $0x19, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x53b0
leaq 0x160(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x25a52
movq %rdx, 0x150(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x160(%rsp)
jmp 0x25a59
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x150(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1577d(%rip), %rsi     # 0x3b1fc
callq 0x5650
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x25aac
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x25ab4
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x18(%r14), %rsi
leaq 0x1e8(%rsp), %rdi
movq %rcx, (%rdi)
movq 0x20(%r14), %rax
movq %rax, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq 0x30(%r14), %rax
movq %rax, 0x18(%rdi)
movups 0x38(%r14), %xmm0
movups %xmm0, 0x20(%rdi)
movq %rcx, 0x30(%rdi)
leaq 0x50(%rsp), %rdx
movq %rdi, (%rdx)
callq 0xb2d2
leaq 0x220(%rsp), %rbx
leaq 0x50(%r14), %rsi
movq %rbx, %rdi
callq 0x1a9c6
leaq 0x278(%rsp), %rdi
leaq 0x288(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0xa8(%r14), %rsi
movq 0xb0(%r14), %rdx
addq %rsi, %rdx
callq 0xb544
leaq 0x70(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x25010
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x78(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x25b79
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x25b9e
leaq 0x80(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x25b99
movq 0x80(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x25baf
movq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x5110
jmp 0x25bbd
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x53b0
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x25be1
movq %rsi, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x25be7
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x155f1(%rip), %rsi     # 0x3b1fc
leaq 0x10(%rsp), %rdi
callq 0x5650
leaq 0xa0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x25c45
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x25c4b
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xc8(%r14), %rsi
leaq 0x50(%rsp), %rdi
callq 0x25236
movq 0x90(%rsp), %rcx
movq 0x98(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbx, %rcx
je 0x25ca2
movq 0xa0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x25cc1
leaq 0x60(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x25cbc
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x25cd5
movq 0x50(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x5110
jmp 0x25ce3
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x53b0
leaq 0x108(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x25d10
movq %rsi, 0xf8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x108(%rsp)
jmp 0x25d16
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x100(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x159bb(%rip), %rsi     # 0x3b6f8
leaq 0xf8(%rsp), %rdi
callq 0x5650
movq 0x8(%rsp), %rsi
leaq 0x10(%rsi), %rdi
movq %rdi, (%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rdi, 0xe8(%rsp)
je 0x25d79
movq %rdx, (%rsi)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsi)
jmp 0x25d7f
movups (%rcx), %xmm0
movups %xmm0, (%rdi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25db7
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25dd2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x25def
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25e0a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25e2b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x278(%rsp), %rdi
cmpq %r13, %rdi
je 0x25e48
movq 0x288(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x258(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25e69
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x238(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25e8a
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x1e8(%rsp), %rdi
callq 0xb51e
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x25eae
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x150(%rsp), %rdi
cmpq %r15, %rdi
je 0x25ecb
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25eec
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0xf8(%rsp), %rdi
callq 0x1aa88
movq (%r14), %r13
movq 0x8(%r14), %rax
movq %rax, 0xf0(%rsp)
cmpq %rax, %r13
je 0x260b6
leaq 0x100(%rsp), %r14
leaq 0x98(%rsp), %rbp
xorl %r15d, %r15d
movl $0x1, %r12d
leaq 0x90(%rsp), %rdi
movq %r13, %rsi
callq 0x1a9c6
movq 0x90(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x51e0
leaq 0x120(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x51e0
movq 0x40(%rbp), %rax
movq 0x46(%rbp), %rcx
movq %rcx, 0x46(%r14)
movq %rax, 0x40(%r14)
movl %r15d, %ebx
subl $0x1, %ebx
jb 0x25fb5
movl %r12d, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rcx, %rax
shrq $0x23, %rax
leal (%rax,%rax,4), %eax
leal (%r15,%rax,2), %eax
leaq 0x15758(%rip), %rsi     # 0x3b6f8
testl %eax, %eax
je 0x25fab
leaq 0x15251(%rip), %rsi     # 0x3b1fc
movq 0x8(%rsp), %rdi
callq 0x5650
leaq 0x190(%rsp), %r15
movq %r15, %rdi
leaq 0x90(%rsp), %rsi
callq 0x1a9c6
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x248dc
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x5110
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2600a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x1b8(%rsp), %rdi
leaq 0x1c8(%rsp), %rax
cmpq %rax, %rdi
je 0x2602f
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x26054
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x26079
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x2609e
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x5360
addq $0x58, %r13
incl %r12d
movl %ebx, %r15d
cmpq 0xf0(%rsp), %r13
jne 0x25f2a
leaq 0x1563e(%rip), %rsi     # 0x3b6fb
movq 0x8(%rsp), %rdi
callq 0x5650
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x260e8
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26109
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x8(%rsp), %rax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2626c
movq %rax, %r14
jmp 0x262c3
movq %rax, %r14
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26156
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x26156
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26176
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x26176
movq %rax, %r14
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x26198
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x26198
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x261b8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x261b8
movq %rax, %r14
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x261de
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5360
jmp 0x261de
movq %rax, %r14
leaq 0x1e8(%rsp), %rdi
callq 0xb206
jmp 0x2620f
movq %rax, %r14
movq %rbx, %rdi
callq 0xb116
jmp 0x261fd
movq %rax, %r14
leaq 0x1e8(%rsp), %rdi
callq 0xb51e
jmp 0x2620f
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x26226
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5360
movq 0x150(%rsp), %rdi
cmpq %r15, %rdi
je 0x26243
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x262e3
movq 0x180(%rsp), %rsi
jmp 0x262db
movq %rax, %r14
jmp 0x26226
movq %rax, %r14
jmp 0x26243
movq %rax, %r14
jmp 0x262b6
jmp 0x262a6
movq %rax, %r14
jmp 0x26297
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x26297
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5360
leaq 0x190(%rsp), %rdi
callq 0xb116
jmp 0x262a9
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0xb116
leaq 0xf8(%rsp), %rdi
callq 0xb116
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x262e3
movq (%rax), %rsi
incq %rsi
callq 0x5360
movq %r14, %rdi
callq 0x55e0
nop