LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/lega911[P]ijson/src/utils.cpp
// Function: GC::release()
void GC::release() {
    for(auto const & i : _list) {
        switch(i.type) {
        case 1:
            {
                auto *it = (::Message*)i.ptr;
                delete it;
                break;
            }
        case 2:
            {
                auto *it = (::DirectMessage*)i.ptr;
                if(it->unlink() == 0) {
                    delete it;
                }
                break;
            }
        }
    }
    _list.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %r15
movq 0x8(%rdi), %r12
cmpq %r12, %r15
je 0x1685d
movq %rdi, %rbx
movl 0x8(%r15), %eax
cmpl $0x2, %eax
je 0x16827
cmpl $0x1, %eax
jne 0x16847
movq (%r15), %r14
testq %r14, %r14
je 0x16820
movq %r14, %rdi
callq 0x12ea6
movl $0x38, %esi
jmp 0x1683f
movq (%r15), %r14
lock
decl 0x3c(%r14)
jne 0x16847
leaq 0x28(%r14), %rdi
callq 0xc56a
movl $0x40, %esi
movq %r14, %rdi
callq 0x8320
addq $0x10, %r15
cmpq %r12, %r15
jne 0x16802
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x1685d
movq %rax, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lega911[P]ijson/src/buffer.h
// Function: Buffer::add_hex(unsigned long)
void add_hex(u64 n) {
        if(!n) {
            add("0", 1);
            return;
        }
        const char hex[] = "0123456789abcdef";
        char r[16];
        int i = 15;
        while(n) {
            r[i--] = hex[n & 0xf];
            n >>= 4;
        }
        add(&r[i + 1], 15-i);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x168d6
xorl %r15d, %r15d
leaq 0x1f3b(%rip), %rax      # 0x187c0
movq %rsi, %rcx
movl %esi, %edx
andl $0xf, %edx
movb (%rdx,%rax), %dl
movb %dl, -0x21(%rbp,%r15)
shrq $0x4, %rcx
decq %r15
cmpq $0xf, %rsi
movq %rcx, %rsi
ja 0x16888
leaq (%r15,%rbp), %r14
addq $-0x20, %r14
movl 0x8(%rbx), %esi
subl %r15d, %esi
movq %rbx, %rdi
callq 0xc596
movslq 0x8(%rbx), %rdi
addq (%rbx), %rdi
movq %r15, %rdx
negq %rdx
movq %r14, %rsi
callq 0x8270
subl %r15d, 0x8(%rbx)
jmp 0x168f1
movl 0x8(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0xc596
movq (%rbx), %rax
movslq 0x8(%rbx), %rcx
movb $0x30, (%rax,%rcx)
incl 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lega911[P]ijson/src/workerlist.cpp
// Function: WorkerItem::pop()
void WorkerItem::pop() {
    list->lock.lock();
    if(this == list->head) {
        list->head = this->next;
        if(list->head) list->head->prev = NULL;
    } else {
        if(this->prev) this->prev->next = this->next;
        if(this->next) this->next->prev = this->prev;
    }
    list->lock.unlock();
    delete this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x83f0
testl %eax, %eax
jne 0x16af9
movq (%rbx), %rdi
cmpq %rbx, 0x28(%rdi)
je 0x16ac6
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
testq %rcx, %rcx
je 0x16abf
movq %rax, 0x10(%rcx)
testq %rax, %rax
jne 0x16ad5
jmp 0x16ad9
movq 0x10(%rbx), %rax
movq %rax, 0x28(%rdi)
testq %rax, %rax
je 0x16ad9
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
callq 0x8240
movq %rbx, %rdi
callq 0x16a60
movl $0x20, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x8320
movl %eax, %edi
callq 0x81d0
// File: /workspace/github_cpp_makefile_star2_O3/lega911[P]ijson/src/workerlist.cpp
// Function: WorkerList::push(Connect*)
WorkerItem *WorkerList::push(Connect *conn) {
    WorkerItem *n = new WorkerItem(this, conn);
    lock.lock();
    if(head) {
        n->next = head;
        head->prev = n;
        head = n;
    } else head = n;
    lock.unlock();
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl $0x20, %edi
callq 0xed4c
movq %rax, %r14
movq %rbx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %r15, 0x18(%rax)
incl 0x8(%r15)
movq %rbx, %rdi
callq 0x83f0
testl %eax, %eax
jne 0x16b66
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x16b4c
movq %rax, 0x10(%r14)
movq %r14, 0x8(%rax)
movq %r14, 0x28(%rbx)
movq %rbx, %rdi
callq 0x8240
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x81d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::insertEnd(Song)
void LinkedList::insertEnd(Song value) {
  // Evita a adição de músicas repetidas
  if (search(value) != nullptr) {
    cout << "A música já existe no sistema." << endl;
  } else {
    node* temp = new node;

    temp->data = value;
    temp->next = nullptr;

    if (head == nullptr) {
      head =  temp;
      tail = temp;
      temp = nullptr;
    } else {
      tail->next = temp;
      tail = temp;
    }

    ++size;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x377e
leaq -0x40(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
callq 0x377e
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x2a0a
movq %rax, %r15
leaq -0x60(%rbp), %rdi
callq 0x9986
testq %r15, %r15
je 0x2589
movq 0xba84(%rip), %rbx      # 0xdfd0
leaq 0x7ab1(%rip), %rsi      # 0xa004
movl $0x20, %edx
movq %rbx, %rdi
callq 0x2120
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
jmp 0x25df
movl $0x48, %edi
callq 0x2100
movq %rax, %r15
movq %rax, %rdi
callq 0x9960
leaq 0x20(%r14), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x2040
movq %r15, %rdi
addq $0x20, %rdi
movq %r12, %rsi
callq 0x2040
movq $0x0, 0x40(%r15)
cmpq $0x0, (%rbx)
je 0x25d4
movq 0x8(%rbx), %rax
movq %r15, 0x40(%rax)
jmp 0x25d7
movq %r15, (%rbx)
movq %r15, 0x8(%rbx)
incq 0x10(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
jmp 0x260e
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x9986
jmp 0x2613
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x2613
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::operator+(LinkedList const&)
LinkedList LinkedList::operator+ (const LinkedList& secondList) {
  LinkedList finalList;

  // Percorre a lista atual copiando os valores para a lista final
  node* temp = head;
  while (temp != nullptr) {
    finalList.insertEnd(temp->data);

    temp = temp->next;
  }
  
  // Percorre a segunda lista copiando os valores para a lista final
  temp = secondList.head;
  while (temp != nullptr) {
    node* newNode = new node;

    newNode->data = temp->data;
    newNode->next = nullptr;
    
    if (finalList.head == nullptr) {
      finalList.head = newNode;
      finalList.tail = newNode;
      newNode = nullptr;
    } else {
      finalList.tail->next = newNode;
      finalList.tail = newNode;
    }

    finalList.size++;
    temp = temp->next;
  }
  
  return finalList;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r14
testq %r14, %r14
je 0x26ac
movq %rdx, -0x30(%rbp)
leaq -0x50(%rbp), %r15
leaq -0x40(%rbp), %r13
leaq -0x70(%rbp), %r12
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x377e
movq %r13, -0x50(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x377e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x24dc
movq %r12, %rdi
callq 0x9986
movq 0x40(%r14), %r14
testq %r14, %r14
jne 0x2656
movq (%rbx), %r12
movq -0x30(%rbp), %rdx
jmp 0x26af
xorl %r12d, %r12d
movq (%rdx), %r14
testq %r14, %r14
je 0x2718
movl $0x48, %edi
callq 0x2100
movq %rax, %r15
movq %rax, %rdi
callq 0x9960
movq %r15, %rdi
movq %r14, %rsi
callq 0x2040
movq %r15, %rdi
addq $0x20, %rdi
leaq 0x20(%r14), %rsi
callq 0x2040
movq $0x0, 0x40(%r15)
movq %r15, %rax
testq %r12, %r12
je 0x2702
movq 0x8(%rbx), %rax
movq %r15, 0x40(%rax)
movq %r12, %rax
movq %r15, 0x8(%rbx)
incq 0x10(%rbx)
movq 0x40(%r14), %r14
movq %rax, %r12
testq %r14, %r14
jne 0x26b7
jmp 0x271b
movq %r12, %rax
movq %rax, (%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r12, (%rbx)
movq %r15, %rdi
jmp 0x2750
movq %rax, %r14
jmp 0x276b
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x276b
callq 0x20e0
jmp 0x276b
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x9986
jmp 0x276b
movq %rax, %r14
movq %r12, (%rbx)
movq %rbx, %rdi
callq 0x23e0
movq %r14, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::operator>>(node*&)
void LinkedList::operator>> (node*& lastNode){ 
  if (size > 0) {
    lastNode->data = tail->data;
    lastNode->next = tail->next;

    removeLast();
  } else {
    lastNode = nullptr;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x27d8
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq (%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2040
addq $0x20, %r12
addq $0x20, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x2040
movq 0x8(%r14), %rax
movq 0x40(%rax), %rax
movq (%rbx), %rcx
movq %rax, 0x40(%rcx)
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x27e8
movq $0x0, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::removeLast()
void LinkedList::removeLast() {
  node* pre = nullptr;
  node* cur = nullptr;

  cur = head;

  while (cur->next != nullptr) {
    pre = cur;
    cur = cur->next;
  }

  tail = pre;
  pre->next = nullptr;

  --size;
  delete cur;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
xorl %ecx, %ecx
movq %rax, %rbx
movq %rcx, %rdx
movq 0x40(%rax), %rax
movq %rbx, %rcx
testq %rax, %rax
jne 0x27f3
movq %rdx, 0x8(%rdi)
movq $0x0, 0x40(%rdx)
decq 0x10(%rdi)
movq %rbx, %rdi
callq 0x9986
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::operator<<(node*&)
void LinkedList::operator<< (node*& newNode) {
  if (newNode == nullptr) {
    return;
  } else {
    insertEnd(newNode->data);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq (%rsi), %r15
testq %r15, %r15
je 0x2890
movq %rdi, %rbx
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x377e
leaq -0x38(%rbp), %rdi
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
callq 0x377e
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x24dc
leaq -0x58(%rbp), %rdi
callq 0x9986
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x9986
jmp 0x28ba
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x28ba
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::insertStart(Song)
void LinkedList::insertStart(Song value) {
  // Evita a adição de músicas repetidas
  if (search(value) != nullptr) {
    cout << "A música já existe no sistema." << endl;
  } else {
    node* temp = new node;

    temp->data = value;
    temp->next = head;
    head = temp;

    ++size;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x377e
leaq -0x40(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
callq 0x377e
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x2a0a
movq %rax, %r15
leaq -0x60(%rbp), %rdi
callq 0x9986
testq %r15, %r15
je 0x298d
movq 0xb680(%rip), %rbx      # 0xdfd0
leaq 0x76ad(%rip), %rsi      # 0xa004
movl $0x20, %edx
movq %rbx, %rdi
callq 0x2120
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
jmp 0x29ce
movl $0x48, %edi
callq 0x2100
movq %rax, %r15
movq %rax, %rdi
callq 0x9960
leaq 0x20(%r14), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x2040
movq %r15, %rdi
addq $0x20, %rdi
movq %r12, %rsi
callq 0x2040
movq (%rbx), %rax
movq %rax, 0x40(%r15)
movq %r15, (%rbx)
incq 0x10(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
jmp 0x29fd
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x9986
jmp 0x2a02
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x2a02
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::insertEnd(LinkedList&)
void LinkedList::insertEnd(LinkedList& toInsert) {
  // Tratamento para garantir que a nova lista não está vazia
  if (toInsert.getSize() < 1) {
    return;
  } else {
    node* temp = toInsert.getHead();

    while (temp != nullptr) {
      // Insere cada elemento no fim da lista atual
      insertEnd(temp->data);
      
      temp = temp->next;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpq $0x0, 0x10(%rsi)
je 0x2dc5
movq (%rsi), %r13
testq %r13, %r13
je 0x2dc5
movq %rdi, %rbx
leaq -0x48(%rbp), %r14
leaq -0x38(%rbp), %r12
leaq -0x68(%rbp), %r15
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x377e
movq %r12, -0x48(%rbp)
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x377e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24dc
movq %r15, %rdi
callq 0x9986
movq 0x40(%r13), %r13
testq %r13, %r13
jne 0x2d77
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x2df7
callq 0x20e0
jmp 0x2df7
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x9986
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::removeFirst()
void LinkedList::removeFirst() {
  node* temp = head;

  head = head->next;

  --size;
  delete temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rbx
movq 0x40(%rbx), %rax
movq %rax, (%rdi)
decq 0x10(%rdi)
movq %rbx, %rdi
callq 0x9986
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20e0
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::removePosition(unsigned long)
void LinkedList::removePosition(size_t pos) {
  node* pre = nullptr;
  node* cur = nullptr;

  if (pos == 1) {
    removeFirst();
  } else if (pos < size) {
    cur = head;

    for (size_t i = 1; i < pos; ++i) {
      pre = cur;
      cur = cur->next;
    }
    
    pre->next = cur->next;

    --size;
    delete cur;
  } else if (pos < 1) {
    return;
  } else {
    removeLast();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x1, %rsi
jne 0x3130
movq (%rdi), %rbx
movq 0x40(%rbx), %rax
movq %rax, (%rdi)
decq 0x10(%rdi)
jmp 0x315a
movq 0x10(%rdi), %rax
cmpq %rsi, %rax
jbe 0x3170
movq (%rdi), %rbx
decq %rsi
movq %rbx, %rcx
movq 0x40(%rbx), %rbx
decq %rsi
jne 0x313f
movq 0x40(%rbx), %rdx
movq %rdx, 0x40(%rcx)
decq %rax
movq %rax, 0x10(%rdi)
movq %rbx, %rdi
callq 0x9986
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x20e0
addq $0x8, %rsp
testq %rsi, %rsi
je 0x3180
popq %rbx
popq %rbp
jmp 0x27e8
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::removePosition(LinkedList&)
void LinkedList::removePosition(LinkedList& toRemove) {
  // Tratamento para garantir que a nova lista não está vazia
  if (toRemove.getSize() < 1) {
    return;
  } else {
    node* temp = toRemove.getHead();

    while (temp != nullptr) {
      // Obtém a posição da música na lista atual
      size_t pos = getPosition(temp->data);
  
      // Remove da lista atual
      if (pos > 0) {
        removePosition(pos);
      }                      
      
      temp = temp->next;
    }    
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpq $0x0, 0x10(%rsi)
je 0x3211
movq (%rsi), %r13
testq %r13, %r13
je 0x3211
movq %rdi, %rbx
leaq -0x38(%rbp), %r14
leaq -0x68(%rbp), %r15
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x377e
movq %r14, -0x48(%rbp)
movq 0x20(%r13), %rsi
movq 0x28(%r13), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x377e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x324c
movq %rax, %r12
movq %r15, %rdi
callq 0x9986
testq %r12, %r12
je 0x3208
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3114
movq 0x40(%r13), %r13
testq %r13, %r13
jne 0x31af
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x3243
callq 0x20e0
jmp 0x3243
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x9986
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/linkedList.cpp
// Function: LinkedList::display()
void LinkedList::display() {
  node* temp = head;
  size_t index = 1;

  while (temp != nullptr) {
    Song s = temp->data;
    cout << index << " - " << s.getTitle() << " - " << s.getArtist() << endl;
    temp = temp->next;
    ++index;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq (%rdi), %r12
testq %r12, %r12
je 0x3706
movl $0x1, %r14d
leaq -0xa8(%rbp), %r15
leaq 0x6a39(%rip), %r13      # 0xa025
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x377e
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x377e
movq 0xa997(%rip), %rdi      # 0xdfd0
movq %r14, %rsi
callq 0x2070
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2120
leaq -0x68(%rbp), %rdi
movq %r15, %rsi
callq 0x99bc
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x2120
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2120
leaq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x99e8
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x2120
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x36db
callq 0x20e0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x36ed
callq 0x20e0
movq 0x40(%r12), %r12
incq %r14
movq %r15, %rdi
callq 0x9986
testq %r12, %r12
jne 0x35ec
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x3776
callq 0x20e0
jmp 0x3776
jmp 0x3739
jmp 0x373e
movq %rax, %rbx
jmp 0x376a
movq %rax, %rbx
jmp 0x3758
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3758
callq 0x20e0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x376a
callq 0x20e0
leaq -0xa8(%rbp), %rdi
callq 0x9986
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/listOfPlaylists.cpp
// Function: ListOfPlaylists::~ListOfPlaylists()
ListOfPlaylists::~ListOfPlaylists() {
  if (size != 0) {
    node_* temp = nullptr;
    node_* cur = nullptr;

    cur = head;

    while (cur != nullptr) {
      temp = cur->next;
      delete cur->data;
      delete cur;
      cur = temp;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x10(%rdi)
sete %al
movq (%rdi), %rbx
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x387b
movq (%rbx), %r14
movq 0x8(%rbx), %r15
testq %r14, %r14
je 0x3863
movq %r14, %rdi
callq 0x8eb8
movq %r14, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x20e0
movq %r15, %rbx
testq %r15, %r15
jne 0x384f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/listOfPlaylists.cpp
// Function: ListOfPlaylists::getPlaylist(unsigned long)
Playlist* ListOfPlaylists::getPlaylist(size_t pos) {
  // Caso a posição seja inválida, retorna nullptr
  if (pos < 1 || pos > size) {
    return nullptr;
  } else {
    node_* temp = head;

    for (size_t i = 1; i < pos; ++i) {
      temp = temp->next;
    }
    // Retorna o ponteiro para a playlist correspondente
    return temp->data;
  }
}

// Assembly:
leaq -0x1(%rsi), %rcx
cmpq 0x10(%rdi), %rcx
jae 0x38b5
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
cmpq $0x2, %rsi
jb 0x38b0
movq 0x8(%rax), %rax
decq %rcx
jne 0x38a7
movq (%rax), %rax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/listOfPlaylists.cpp
// Function: ListOfPlaylists::searchPlaylist(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Playlist* ListOfPlaylists::searchPlaylist(string searchName) {
  node_* temp = head;

  while (temp != nullptr) {
    // Compara os nomes desconsiderando maiúsculas
    if ( toLowercase(temp->data->getName()) == toLowercase(searchName) ) {
      // Retorna o ponteiro para o nó correspondente
      return temp->data; 
    }

    temp = temp->next;
  }
  // Caso não encontre, retorna nullptr
  return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, -0x30(%rbp)
movq (%rdi), %r14
testq %r14, %r14
je 0x39ce
leaq -0x60(%rbp), %r12
leaq -0x70(%rbp), %rbx
movq (%r14), %rsi
leaq -0xb0(%rbp), %r15
movq %r15, %rdi
callq 0x946c
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x9a30
movq %r12, -0x70(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x377e
leaq -0x90(%rbp), %rdi
movq %rbx, %r13
movq %rbx, %rsi
callq 0x9a30
movq %r12, %rbx
movq -0x48(%rbp), %rdx
cmpq -0x88(%rbp), %rdx
jne 0x395e
movq -0x90(%rbp), %r12
testq %rdx, %rdx
je 0x396a
movq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x2110
testl %eax, %eax
sete %r15b
jmp 0x396d
movq -0x90(%rbp), %r12
xorl %r15d, %r15d
jmp 0x396d
movb $0x1, %r15b
leaq -0x80(%rbp), %rax
cmpq %rax, %r12
je 0x397e
movq %r12, %rdi
callq 0x20e0
movq -0x70(%rbp), %rdi
movq %rbx, %r12
cmpq %rbx, %rdi
je 0x398f
callq 0x20e0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
movq %r13, %rbx
je 0x39a4
callq 0x20e0
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x39bc
callq 0x20e0
testb %r15b, %r15b
jne 0x39d2
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x38e4
xorl %eax, %eax
jmp 0x39d5
movq (%r14), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x39fd
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x39fd
callq 0x20e0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3a14
callq 0x20e0
jmp 0x3a14
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x3a2c
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/listOfPlaylists.cpp
// Function: ListOfPlaylists::insertPlaylist(Playlist*)
void ListOfPlaylists::insertPlaylist(Playlist* value) {
  if (searchPlaylist(value->getName()) != nullptr) {
    cout << "Já existe uma playlist com esse nome no sistema." << endl;
  } else {
    node_* temp = new node_;

    temp->data = value;
    temp->next = nullptr;

    if (head == nullptr) {
      head =  temp;
      tail = temp;
      temp = nullptr;
    } else {
      tail->next = temp;
      tail = temp;
    }

    ++size;
    cout << "Playlist criada! Adicione algumas músicas." << endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x946c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38b8
movq %rax, %r15
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a73
callq 0x20e0
testq %r15, %r15
je 0x3a8d
movq 0xa551(%rip), %rdi      # 0xdfd0
leaq 0x65cd(%rip), %rsi      # 0xa053
movl $0x31, %edx
jmp 0x3ad0
movl $0x10, %edi
callq 0x2100
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
cmpq $0x0, (%rbx)
je 0x3ab2
movq 0x8(%rbx), %rcx
movq %rax, 0x8(%rcx)
jmp 0x3ab5
movq %rax, (%rbx)
movq %rax, 0x8(%rbx)
incq 0x10(%rbx)
movq 0xa50c(%rip), %rdi      # 0xdfd0
leaq 0x65ba(%rip), %rsi      # 0xa085
movl $0x2b, %edx
callq 0x2120
movq 0xa4f4(%rip), %rbx      # 0xdfd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b23
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/listOfPlaylists.cpp
// Function: ListOfPlaylists::removePlaylist(unsigned long)
void ListOfPlaylists::removePlaylist(size_t pos) {
  node_* pre = nullptr;
  node_* cur = nullptr;

  cur = head;

  if (pos == 1) {
    head = head->next;
  } else if (pos < size) {
    for (size_t i = 1; i < pos; ++i) {
      pre = cur;
      cur = cur->next;
    }
    
    pre->next = cur->next;
  } else {
    while (cur->next != nullptr) {
      pre = cur;
      cur = cur->next;
    }

    tail = pre;
    pre->next = nullptr;
  }

  --size;
  delete cur->data;
  delete cur;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
cmpq $0x1, %rsi
jne 0x3b49
movq 0x8(%rbx), %rax
movq %rax, (%rdi)
movq 0x10(%rdi), %rax
jmp 0x3b8e
movq 0x10(%rdi), %rax
cmpq %rsi, %rax
jbe 0x3b6b
decq %rsi
movq %rbx, %rcx
movq 0x8(%rbx), %rbx
decq %rsi
jne 0x3b55
movq 0x8(%rbx), %rdx
movq %rdx, 0x8(%rcx)
jmp 0x3b8e
xorl %edx, %edx
movq %rbx, %rcx
movq %rdx, %rsi
movq 0x8(%rbx), %rbx
movq %rcx, %rdx
testq %rbx, %rbx
jne 0x3b6d
movq %rsi, 0x8(%rdi)
movq $0x0, 0x8(%rsi)
movq %rcx, %rbx
decq %rax
movq %rax, 0x10(%rdi)
movq (%rbx), %r14
testq %r14, %r14
je 0x3ba5
movq %r14, %rdi
callq 0x8eb8
movq %r14, %rdi
callq 0x20e0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/listOfPlaylists.cpp
// Function: ListOfPlaylists::removeFromAll(Song)
void ListOfPlaylists::removeFromAll(Song target) {
  node_* temp = head;

  // Percorre as playlists do sistema
  while (temp != nullptr) {
    // Guarda a lista de músicas atual
    LinkedList* songs = temp->data->getSongs();

    // Verifica se o alvo está na lista 
    if (songs->search(target) != nullptr) {
      // Obtém a posição numérica da música
      size_t pos = songs->getPosition(target);
      // Remove a música da lista
      songs->removePosition(pos);
    }

    temp = temp->next;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq (%rdi), %r13
testq %r13, %r13
je 0x3cb9
movq %rsi, %rbx
leaq -0x68(%rbp), %r12
movq (%r13), %rdi
callq 0x9244
movq %rax, %r15
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x377e
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x377e
movq %r15, %rdi
movq %r12, %rsi
callq 0x2a0a
movq %rax, %r14
movq %r12, %rdi
callq 0x9986
testq %r14, %r14
je 0x3cac
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %r12
movq %r12, %rdi
callq 0x377e
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x377e
movq %r15, %rdi
movq %r12, %rsi
callq 0x324c
movq %rax, %r14
movq %r12, %rdi
callq 0x9986
movq %r15, %rdi
movq %r14, %rsi
callq 0x3114
leaq -0x68(%rbp), %r12
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x3be1
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
jmp 0x3d08
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
jmp 0x3cf5
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x3d0d
callq 0x20e0
jmp 0x3d0d
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x9986
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/listOfPlaylists.cpp
// Function: ListOfPlaylists::display()
void ListOfPlaylists::display() {
  node_* temp = head;
  size_t index = 1;
  string name = "";

  while (temp != nullptr) {
    name = temp->data->getName();
    cout << index << " - " << name << endl;
    temp = temp->next;
    ++index;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq (%rdi), %r12
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x62ef(%rip), %rdx      # 0xa028
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x3e36
testq %r12, %r12
je 0x3df5
movl $0x1, %ebx
leaq -0x68(%rbp), %r14
leaq 0x62c7(%rip), %r13      # 0xa025
movq (%r12), %rsi
movq %r14, %rdi
callq 0x946c
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x2130
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x3d88
callq 0x20e0
movq 0xa241(%rip), %rdi      # 0xdfd0
movq %rbx, %rsi
callq 0x2070
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2120
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x2120
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
movq 0x8(%r12), %r12
incq %rbx
testq %r12, %r12
jne 0x3d5e
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3e07
callq 0x20e0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e18
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3e2d
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::Playlist(Playlist const&)
Playlist::Playlist(const Playlist& old) {
  songs = new LinkedList;
  playing = nullptr;
  count = 1;
  name = old.name;

  node* temp = old.songs->getHead();

  while (temp != nullptr) {
    songs->insertEnd(temp->data);

    temp = temp->next;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x18, %edi
callq 0x2100
movq %rax, %r15
movq %rax, %rdi
callq 0x23cc
movq %r15, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
movq $0x1, 0x30(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2040
movq 0x20(%r14), %rdi
callq 0x28c2
movq %rax, %r14
testq %rax, %rax
je 0x8fc3
leaq -0x40(%rbp), %r15
leaq -0x70(%rbp), %r12
movq 0x20(%rbx), %r13
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x377e
movq %r15, -0x50(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x377e
movq %r13, %rdi
movq %r12, %rsi
callq 0x24dc
movq %r12, %rdi
callq 0x9986
movq 0x40(%r14), %r14
testq %r14, %r14
jne 0x8f71
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8fde
movq %rax, %r14
movq %r15, %rdi
jmp 0x8ff3
jmp 0x8fde
movq %rax, %r14
jmp 0x9006
movq %rax, %r14
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9006
callq 0x20e0
jmp 0x9006
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x9986
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x9014
callq 0x20e0
movq %r14, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::operator+(Playlist&)
Playlist Playlist::operator+ (Playlist& secondPlaylist) {
  Playlist result;
  
  // Insere as músicas da playlist atual na playlist final
  result.insertSong(*this); 

  // Insere as músicas da segunda playlist na playlist final
  result.insertSong(secondPlaylist);

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x8e44
movq %rbx, %rdi
movq %r15, %rsi
callq 0x906c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x906c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x8eb8
movq %r14, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::insertSong(Playlist&)
void Playlist::insertSong(Playlist& toInsert) {
  // Tratamento para garantir que a nova lista não está vazia
  if (toInsert.getSongs()->getSize() < 1) {
    return;
  } else {
    // Insere as músicas na playlist atual por meio de sobrecarga
    songs->insertEnd(*toInsert.getSongs());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rdi
callq 0x28d6
testq %rax, %rax
je 0x9098
movq 0x20(%r14), %rdi
movq 0x20(%rbx), %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2d48
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::operator+(Song&)
Playlist Playlist::operator+ (Song& toAdd) {
  Playlist result;

  // Insere as músicas da playlist atual na playlist final
  result.insertSong(*this); 

  // Insere a música do parâmetro no final
  result.songs->insertEnd(toAdd);

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8e44
movq %rbx, %rdi
movq %r14, %rsi
callq 0x906c
movq 0x20(%rbx), %r14
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x377e
leaq -0x40(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
callq 0x377e
leaq -0x60(%rbp), %rsi
movq %r14, %rdi
callq 0x24dc
leaq -0x60(%rbp), %rdi
callq 0x9986
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x9986
jmp 0x914b
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x914b
callq 0x20e0
jmp 0x914b
movq %rax, %r14
movq %rbx, %rdi
callq 0x8eb8
movq %r14, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::operator-(Playlist&)
Playlist Playlist::operator- (Playlist& secondPlaylist) {
  // Cria a playlist final a partir da playlist atual
  Playlist result(*this);

  node* temp = secondPlaylist.getSongs()->getHead();
  // Percorre a segunda playlist
  while (temp != nullptr) {
    // Procura a posição da música na playlist final
    size_t pos = result.getSongs()->getPosition(temp->data);

    
    if (pos > 0) {
      result.removeSong(pos);
    }

    temp = temp->next;
  }
  
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rdi, %rbx
callq 0x8ef6
movq 0x20(%r14), %rdi
callq 0x28c2
movq %rax, %r14
testq %rax, %rax
je 0x91f7
leaq -0x38(%rbp), %r15
leaq -0x68(%rbp), %r12
movq 0x20(%rbx), %r13
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x377e
movq %r15, -0x48(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x377e
movq %r13, %rdi
movq %r12, %rsi
callq 0x324c
movq %rax, %r13
movq %r12, %rdi
callq 0x9986
testq %r13, %r13
je 0x91ee
movq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x3114
movq 0x40(%r14), %r14
testq %r14, %r14
jne 0x9191
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9230
movq %rax, %r14
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x9233
callq 0x20e0
jmp 0x9233
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x9986
jmp 0x9233
movq %rax, %r14
movq %rbx, %rdi
callq 0x8eb8
movq %r14, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::operator-(Song&)
Playlist Playlist::operator- (Song& toRemove) {
  // Cria a playlist final a partir da playlist atual
  Playlist result(*this);

  // Obtém a posição da música na playlist final
  size_t pos = result.getSongs()->getPosition(toRemove);

  // Se existir, remove
  if (pos > 0) {
    result.removeSong(pos);
  }

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rdi, %rbx
callq 0x8ef6
movq 0x20(%rbx), %r14
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x377e
leaq -0x40(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
callq 0x377e
leaq -0x60(%rbp), %rsi
movq %r14, %rdi
callq 0x324c
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x9986
testq %r14, %r14
je 0x92db
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x3114
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x9986
jmp 0x930f
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x930f
callq 0x20e0
jmp 0x930f
movq %rax, %r14
movq %rbx, %rdi
callq 0x8eb8
movq %r14, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::operator>>(Song*&)
void Playlist::operator>> (Song*& lastSong) {
  if (songs->getSize() > 0) {
    node* temp = new node;
    // Extrai o ultimo nó da lista de músicas
    *songs >> temp;
    // Guarda a música desse nó
    *lastSong = temp->data;

    delete temp;
  } else {
    lastSong = nullptr;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
callq 0x28d6
testq %rax, %rax
je 0x93ac
movl $0x48, %edi
callq 0x2100
movq %rax, %r15
movq %rax, %rdi
callq 0x9960
leaq -0x28(%rbp), %r12
movq %r15, (%r12)
movq 0x20(%r14), %rdi
movq %r12, %rsi
callq 0x277c
movq (%r12), %r14
movq (%rbx), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2040
addq $0x20, %rbx
addq $0x20, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2040
movq (%r12), %rbx
testq %rbx, %rbx
je 0x93a2
movq %rbx, %rdi
callq 0x9986
movq %rbx, %rdi
callq 0x20e0
jmp 0x93b3
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::operator<<(Song*&)
void Playlist::operator<< (Song*& newSong) {
  if (newSong == nullptr) {
    return;
  } else {
    songs->insertEnd(*newSong);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq (%rsi), %r15
testq %r15, %r15
je 0x9439
movq 0x20(%rdi), %rbx
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %rdi
callq 0x377e
leaq -0x38(%rbp), %rdi
leaq -0x28(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
callq 0x377e
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x24dc
leaq -0x58(%rbp), %rdi
callq 0x9986
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x9986
jmp 0x9463
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x9463
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::moveSong(unsigned long, unsigned long)
void Playlist::moveSong(size_t start, size_t end) {
  if (start != end) {
    // Acessa o valor da música a ser movida
    node* target = songs->getNode(start);
    Song value = target->data;

    // Remove ela da posição atual
    songs->removePosition(start);

    // Insere ela na nova posição
    if (end < start) {
      songs->insertPosition(end, value);
    } else {
      songs->insertPosition(end + 1, value);
    } 

    // Cada vez que uma música for movida, playing recebe head
    playing = songs->getHead();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
cmpq %rdx, %rsi
je 0x969c
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x3592
movq %rax, %r15
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x377e
leaq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
callq 0x377e
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x3114
movq 0x20(%rbx), %r15
cmpq %r12, %r14
jae 0x9629
leaq -0xd8(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %r12
movq %r12, %rdi
callq 0x377e
leaq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
callq 0x377e
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2e00
jmp 0x967e
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %r12
movq %r12, %rdi
callq 0x377e
leaq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
callq 0x377e
incq %r14
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2e00
movq %r12, %rdi
callq 0x9986
movq 0x20(%rbx), %rdi
callq 0x28c2
movq %rax, 0x28(%rbx)
leaq -0x68(%rbp), %rdi
callq 0x9986
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
jmp 0x96c4
movq %rax, %rbx
leaq -0xe8(%rbp), %rdi
callq 0x9986
jmp 0x9703
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
jmp 0x96e1
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r13, %rdi
je 0x9703
callq 0x20e0
jmp 0x9703
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x970c
callq 0x20e0
jmp 0x970c
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x9986
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::removeSong(Playlist&)
size_t Playlist::removeSong(Playlist& toRemove) {
  // Tratamento para garantir que a nova playlist não está vazia
  if (toRemove.getSongs()->getSize() < 1) {
    return 0;
  } else {
    size_t removed = 0;

    node* temp = toRemove.getSongs()->getHead();

    while (temp != nullptr) {
      // Obtém a posição da música na playlist atual
      size_t pos = getSongs()->getPosition(temp->data);

      // Remove da playlist atual
      if (pos > 0) {
        removeSong(pos);
        ++removed;
      }

      temp = temp->next;
    }
    
    return removed;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rdi
callq 0x28d6
testq %rax, %rax
je 0x97c4
movq 0x20(%r14), %rdi
callq 0x28c2
testq %rax, %rax
je 0x97c4
movq %rax, %r15
xorl %r14d, %r14d
leaq -0x68(%rbp), %r13
movq 0x20(%rbx), %r12
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x377e
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x377e
movq %r12, %rdi
movq %r13, %rsi
callq 0x324c
movq %rax, %r12
movq %r13, %rdi
callq 0x9986
testq %r12, %r12
je 0x97b9
movq 0x20(%rbx), %rdi
movq %r12, %rsi
callq 0x3114
incq %r14
movq 0x40(%r15), %r15
testq %r15, %r15
jne 0x9755
jmp 0x97c7
xorl %r14d, %r14d
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x97fc
callq 0x20e0
jmp 0x97fc
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x9986
movq %rbx, %rdi
callq 0x2170
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/playlist.cpp
// Function: Playlist::displayAllSongs(node*)
void Playlist::displayAllSongs(node* current) {
  // Condição de parada
  if (current == nullptr) {
    count = 1;
    return;
  }
  // Imprime a música atual
  cout << count << " - " << current->data.getTitle() << " - " << current->data.getArtist() << endl;
  ++count;
  // Chamada recursiva
  displayAllSongs(current->next);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x9914
movq %rsi, %r14
movq 0x30(%rbx), %rsi
movq 0x478b(%rip), %rdi      # 0xdfd0
callq 0x2070
movq %rax, %r15
leaq 0x7d1(%rip), %rsi       # 0xa025
movl $0x3, %edx
movq %rax, %rdi
callq 0x2120
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x99bc
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x2120
movq %rax, %r15
leaq 0x79a(%rip), %rsi       # 0xa025
movl $0x3, %edx
movq %rax, %rdi
callq 0x2120
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x99e8
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %r15, %rdi
callq 0x2120
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2080
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98f0
callq 0x20e0
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9902
callq 0x20e0
incq 0x30(%rbx)
movq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x981c
jmp 0x991c
movq $0x1, 0x30(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x992b
movq %rax, %rbx
jmp 0x9945
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9945
callq 0x20e0
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9957
callq 0x20e0
movq %rbx, %rdi
callq 0x2170
nop
// File: /workspace/github_cpp_makefile_star2_O3/lorenatoscano[P]musify/src/utils.cpp
// Function: toLowercase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string toLowercase(string s) {
  string result = "";

  for (size_t i = 0; i < s.size(); i++) {
    result += tolower(s[i]);
  }
  
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x5d9(%rip), %rdx       # 0xa028
movq %rdx, %rsi
callq 0x3e36
cmpq $0x0, 0x8(%r14)
je 0x9a82
xorl %r12d, %r12d
movq (%r14), %rax
movsbl (%rax,%r12), %edi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x20c0
incq %r12
cmpq 0x8(%r14), %r12
jb 0x9a61
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x9a9e
callq 0x20e0
movq %r14, %rdi
callq 0x2170