// File: /workspace/github_cpp_makefile_star2_O3/diegofilbal[P]YourJam/src/playlist.cpp
// Function: Playlist::operator-(Musica const&) const
Playlist* Playlist::operator-(Musica const &musica) const{

    // Insere todas as músicas da playlist local utilizando o método sobrecarregado de inserção
    Playlist* playlist_final = new Playlist(*this);

    if(playlist_final->getLista()->buscaMusica(musica)){ // Verifica se a música recebida por parâmetro está na playlist
        for(int i = 0; i < playlist_final->getLista()->getTamanho(); i++){ // Percorre a lista e procura a posição em que a música a ser removida está posicionada
            if(playlist_final->getLista()->buscaMusicaPos(i)->getNome() == musica.getNome() && playlist_final->getLista()->buscaMusicaPos(i)->getArtista() == musica.getArtista()){
                playlist_final->remove(i); // Remove a música
            }
        }
    }

    return playlist_final;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl $0x30, %edi
callq 0x2110
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
callq 0x1075e
movq 0x20(%rbx), %r15
leaq -0xd8(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x38ac
leaq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
callq 0x38ac
leaq -0xe8(%rbp), %rsi
movq %r15, %rdi
callq 0x3296
movq %rax, %r15
leaq -0xe8(%rbp), %rdi
callq 0x1063e
testq %r15, %r15
je 0x11071
movq 0x20(%rbx), %rdi
callq 0x2bfe
testl %eax, %eax
jle 0x11071
xorl %r15d, %r15d
leaq -0x38(%rbp), %r12
movq 0x20(%rbx), %rdi
movl %r15d, %esi
callq 0x2c08
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x10674
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x10674
movq -0x40(%rbp), %rdx
cmpq -0x80(%rbp), %rdx
jne 0x10f93
testq %rdx, %rdx
je 0x10f9b
movq -0x88(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x2120
testl %eax, %eax
je 0x10f9b
xorl %r13d, %r13d
jmp 0x11028
movq 0x20(%rbx), %rdi
movl %r15d, %esi
callq 0x2c08
leaq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x106aa
leaq -0xa8(%rbp), %rdi
movq %r14, %rsi
callq 0x106aa
movq -0x60(%rbp), %rdx
cmpq -0xa0(%rbp), %rdx
jne 0x10fef
movq -0xa8(%rbp), %r12
testq %rdx, %rdx
je 0x10ffb
movq -0x68(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
testl %eax, %eax
sete %r13b
jmp 0x10ffe
movq -0xa8(%rbp), %r12
xorl %r13d, %r13d
jmp 0x10ffe
movb $0x1, %r13b
leaq -0x98(%rbp), %rax
cmpq %rax, %r12
je 0x11012
movq %r12, %rdi
callq 0x20f0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x11024
callq 0x20f0
leaq -0x38(%rbp), %r12
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x1103d
callq 0x20f0
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x1104b
callq 0x20f0
testb %r13b, %r13b
je 0x1105c
movq 0x20(%rbx), %rdi
movl %r15d, %esi
callq 0x2f64
incl %r15d
movq 0x20(%rbx), %rdi
callq 0x2bfe
cmpl %eax, %r15d
jl 0x10f49
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0xe8(%rbp), %rdi
callq 0x1063e
jmp 0x110f6
movq %rax, %r14
movq -0xe8(%rbp), %rdi
cmpq %r12, %rdi
jne 0x110f1
jmp 0x110f6
movq %rax, %r14
movq %rbx, %rdi
jmp 0x110f1
movq %rax, %r14
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x110ca
callq 0x20f0
jmp 0x110ca
movq %rax, %r14
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x110e4
callq 0x20f0
jmp 0x110e4
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x110f6
callq 0x20f0
movq %r14, %rdi
callq 0x21a0