// File: joao18araujo[P]pierluigi/src/note.cpp
// Function: Note::enarmonies()
vector<Note> Note::enarmonies(){
  vector<Note> v;
  for(auto & p : notes_with_accidental_to_number){
    int note_position = notes_with_accidental_to_number[this->full_note()];
    if(p.first != this->full_note() &&
      (p.second % N_SCALE) == (note_position % N_SCALE)){
      Note n(*this);
      if(note_position > p.second)
        n.octave++;
      else if(note_position < p.second)
        n.octave--;

      n.set_full_note(p.first);
      v.push_back(n);
    }
  }

  return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x120(%rbp)
movq %rdi, %rax
movq %rax, -0x118(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movb $0x0, -0x11(%rbp)
callq 0xfb00
leaq 0x9c293a9(%rip), %rax   # 0x9c4cc08
movq %rax, -0x20(%rbp)
leaq 0x9c2939e(%rip), %rdi   # 0x9c4cc08
callq 0x24090
movq %rax, -0x28(%rbp)
leaq 0x9c2938e(%rip), %rdi   # 0x9c4cc08
callq 0x240c0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x240f0
testb $0x1, %al
jne 0x23899
jmp 0x23aa4
leaq -0x28(%rbp), %rdi
callq 0x24120
movq -0x110(%rbp), %rsi
movq %rax, -0x38(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x22ca0
jmp 0x238b8
leaq 0x9c29349(%rip), %rdi   # 0x9c4cc08
leaq -0x60(%rbp), %rsi
callq 0x23f70
movq %rax, -0x128(%rbp)
jmp 0x238d1
movq -0x128(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x134(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x62d0
movl -0x134(%rbp), %eax
movq -0x110(%rbp), %rsi
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x22ca0
jmp 0x23912
movq -0x130(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x1c910
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x135(%rbp)
jne 0x23936
jmp 0x23969
movq -0x38(%rbp), %rax
movl 0x20(%rax), %eax
movl $0xc, %ecx
cltd
idivl %ecx
movl %edx, -0x13c(%rbp)
movl -0x3c(%rbp), %eax
movl $0xc, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl -0x13c(%rbp), %edx
cmpl %eax, %edx
sete %al
movb %al, -0x135(%rbp)
movb -0x135(%rbp), %al
movb %al, -0x13d(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x62d0
movb -0x13d(%rbp), %al
testb $0x1, %al
jne 0x23990
jmp 0x23a94
movq -0x110(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x22ce0
jmp 0x239a5
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jle 0x239ed
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x23a0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x62d0
jmp 0x23aca
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x23a08
movl -0xa0(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x23a0a
movq -0x38(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x61f0
jmp 0x23a1c
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x230a0
jmp 0x23a31
leaq -0x108(%rbp), %rdi
callq 0x62d0
movq -0x120(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xff80
jmp 0x23a52
leaq -0xe8(%rbp), %rdi
callq 0xfd80
jmp 0x23a94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x23a86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x62d0
leaq -0xe8(%rbp), %rdi
callq 0xfd80
jmp 0x23aca
jmp 0x23a96
leaq -0x28(%rbp), %rdi
callq 0x24150
jmp 0x23883
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x23aba
movq -0x120(%rbp), %rdi
callq 0x100b0
movq -0x118(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x120(%rbp), %rdi
callq 0x100b0
movq -0x68(%rbp), %rdi
callq 0x6820
nop