LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: NovaGL[P]HarmonyHubControl/csocket.cpp
// Function: csocket::resolveHost(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, hostent**)
int csocket::resolveHost(const std::string& szRemoteHostName, struct hostent** pHostEnt)
{
    if (szRemoteHostName.length() == 0) 
    {
        return FAILURE;
    }

    if ( ! s_bSocketsInitialized )
    {
#ifdef _WIN32
        WORD wVersionRequested;  
        WSADATA wsaData; 
        int err; 

        wVersionRequested = MAKEWORD(2, 0); 
        err = WSAStartup(wVersionRequested, &wsaData); 
#endif
    }

    *pHostEnt = gethostbyname( szRemoteHostName.c_str() );

    if (*pHostEnt == NULL) 
    {
        unsigned long uhostname = inet_addr ( szRemoteHostName.c_str() );
        *pHostEnt = gethostbyaddr( reinterpret_cast<char *>(&uhostname), 
            sizeof(unsigned long),
            AF_INET);

        if (*pHostEnt == NULL)
        {
            return FAILURE;
        }
    }

    return SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3540
cmpq $0x0, %rax
jne 0x14b5b
movl $0x1, -0x4(%rbp)
jmp 0x14bdb
testb $0x1, 0x101ade(%rip)    # 0x116640
jne 0x14b66
jmp 0x14b66
movq -0x10(%rbp), %rdi
callq 0x31c0
movq %rax, %rdi
callq 0x3440
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x14bd4
movq -0x10(%rbp), %rdi
callq 0x31c0
movq %rax, %rdi
callq 0x3380
movl %eax, %eax
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
movl $0x8, %esi
movl $0x2, %edx
callq 0x34d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x14bd2
movl $0x1, -0x4(%rbp)
jmp 0x14bdb
jmp 0x14bd4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: NovaGL[P]HarmonyHubControl/csocket.cpp
// Function: csocket::canRead(bool*, float)
int csocket::canRead( bool* readyToRead, float waitTime )
{
    if (m_socketState != CONNECTED )
    {
        return ERROR_INAPPROPRIATE_STATE;
    }

    fd_set  fds;
    FD_ZERO(&fds);
    FD_SET(m_socket, &fds);
    int     nfds = 0;

    timeval timeout;

    if ( waitTime <= 0.0f ) 
    {
        timeout.tv_sec = 0;
        timeout.tv_usec = 0;
    } 
    else 
    {
        timeout.tv_sec  = (int)(waitTime);
        timeout.tv_usec = (int)(1000000.0f * 
            (waitTime - (float)timeout.tv_sec));
    }

    
#ifdef _WIN32
    nfds = m_socket+1;
#endif

    int n = select(nfds, &fds, NULL, NULL, &timeout);
    if ( n < 0 ) 
    {
        m_socketState = ERRORED;
        return FAILURE;
    }

    if (n == 1) 
    {
        *readyToRead = true;
        return SUCCESS;
    }

    if (n == 0)
    {
        *readyToRead = false;
    }

    return SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpl $0x1, 0x2c(%rax)
je 0x14e95
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x15000
jmp 0x14e97
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpq $0x10, %rax
jae 0x14ee1
movq -0xb0(%rbp), %rax
movl -0xa4(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x14eaf
jmp 0x14ee3
movq -0xd8(%rbp), %rax
movl 0x8(%rax), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movq -0xd8(%rbp), %rax
movl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
movl 0x8(%rax), %eax
movl $0x40, %esi
cltd
idivl %esi
cltq
orq -0xa0(%rbp,%rax,8), %rcx
movq %rcx, -0xa0(%rbp,%rax,8)
movl $0x0, -0xb4(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x1c(%rbp), %xmm0
jb 0x14f51
movq $0x0, -0xc8(%rbp)
movq $0x0, -0xc0(%rbp)
jmp 0x14f8a
cvttss2si -0x1c(%rbp), %eax
cltq
movq %rax, -0xc8(%rbp)
movss -0x1c(%rbp), %xmm1
cvtsi2ssq -0xc8(%rbp), %xmm0
subss %xmm0, %xmm1
movss 0x500f(%rip), %xmm0     # 0x19f88
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cltq
movq %rax, -0xc0(%rbp)
movl -0xb4(%rbp), %edi
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
leaq -0xc8(%rbp), %r8
movq %rcx, %rdx
callq 0x3350
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
jge 0x14fd0
movq -0xd8(%rbp), %rax
movl $0x2, 0x2c(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x15000
cmpl $0x1, -0xcc(%rbp)
jne 0x14fe9
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x15000
cmpl $0x0, -0xcc(%rbp)
jne 0x14ff9
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: NovaGL[P]HarmonyHubControl/csocket.cpp
// Function: csocket::read(char*, unsigned int, bool)
int csocket::read( char* pDataBuffer, unsigned int numBytesToRead, bool bReadAll )
{
    if (m_socketState != CONNECTED ) 
    {
        return ERROR_INAPPROPRIATE_STATE;
    }

    int numBytesRemaining = numBytesToRead;
    int numBytesRead = 0;

    do 
    {
#ifdef _WIN32
        numBytesRead = recv( m_socket, pDataBuffer, numBytesRemaining, 0 );
#else
        numBytesRead = static_cast<int>(::read( m_socket, pDataBuffer, numBytesRemaining));
#endif

        if (numBytesRead < 0)
        {
            if ( bReadAll ) 
            {
#ifdef _WIN32
                Sleep(BLOCK_RETRY_INTERVAL_MSECS);
#else
                usleep(BLOCK_RETRY_INTERVAL_MSECS * 1000);
#endif
            } 
            else 
            {
                return numBytesRead;
            }
        } 
        
        if ( numBytesRead > 0 ) 
        {
            numBytesRemaining -= numBytesRead;
            pDataBuffer += numBytesRead;
        }

        if (numBytesRead == 0)
        {
            break;              
        }
        
    } while ((numBytesRemaining > 0) && (bReadAll) );

    return(numBytesToRead - numBytesRemaining);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
andb $0x1, %al
movb %al, -0x1d(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x1, 0x2c(%rax)
je 0x15044
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x150d7
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x3510
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jge 0x1508a
testb $0x1, -0x1d(%rbp)
je 0x15080
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x34f0
jmp 0x15088
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x150d7
jmp 0x1508a
cmpl $0x0, -0x28(%rbp)
jle 0x150ac
movl -0x28(%rbp), %ecx
movl -0x24(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x150b4
jmp 0x150ce
jmp 0x150b6
xorl %eax, %eax
cmpl $0x0, -0x24(%rbp)
movb %al, -0x31(%rbp)
jle 0x150c7
movb -0x1d(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x15051
movl -0x1c(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: NovaGL[P]HarmonyHubControl/csocket.cpp
// Function: csocket::write(char const*, unsigned int)
int csocket::write( const char* pDataBuffer, unsigned int numBytesToWrite )
{
    if (m_socketState != CONNECTED ) 
    {
        return ERROR_INAPPROPRIATE_STATE;
    }

    int numBytesRemaining = numBytesToWrite;
    int numBytestWritten = 0;

    while (numBytesRemaining  > 0) 
    {
#ifdef _WIN32
        numBytestWritten = send( m_socket, pDataBuffer, numBytesRemaining, 0 );
#else
        numBytestWritten= ::write( m_socket, pDataBuffer, numBytesRemaining );
#endif

        if (numBytestWritten < 0) 
        {
            m_socketState = ERRORED;
            return numBytestWritten;      
        }

        numBytesRemaining  -= numBytestWritten;
        pDataBuffer += numBytestWritten;
    }

    return(numBytesToWrite - numBytesRemaining);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x1, 0x2c(%rax)
je 0x1510a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x15174
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
jle 0x1516b
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x3180
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x1514d
movq -0x30(%rbp), %rax
movl $0x2, 0x2c(%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x15174
movl -0x24(%rbp), %ecx
movl -0x20(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x15117
movl -0x1c(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Themaister[P]umusd/alsa.cpp
// Function: ALSA::stop()
void ALSA::stop()
{
   if (pcm)
   {
      snd_pcm_drop(pcm);
      snd_pcm_close(pcm);
   }

   pcm = nullptr;
   fds.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x30(%rax)
je 0x5b45
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x5050
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x5430
movq -0x10(%rbp), %rdi
movq $0x0, 0x30(%rdi)
addq $0x38, %rdi
callq 0x67b0
addq $0x10, %rsp
popq %rbp
retq
// File: Themaister[P]umusd/alsa.cpp
// Function: ALSA::write(std::vector<unsigned char, std::allocator<unsigned char>> const&)
void ALSA::write(const FF::Buffer &buf)
{
   auto buffer = buf.data();
   auto size = snd_pcm_bytes_to_frames(pcm, buf.size());

   while (size)
   {
      auto frames = snd_pcm_writei(pcm, buffer, size);
      if (frames == -EPIPE || frames == -EINTR || frames == -ESTRPIPE)
      {
         if (snd_pcm_recover(pcm, frames, 1) < 0)
            throw std::runtime_error("Failed to recover ALSA.\n");
      }
      else if (frames < 0)
         throw std::runtime_error("ALSA failed to write.\n");

      buffer += snd_pcm_frames_to_bytes(pcm, frames);
      size -= frames;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6950
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6970
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x51c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x63ee
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5090
movq %rax, -0x28(%rbp)
cmpq $-0x20, -0x28(%rbp)
je 0x62f6
cmpq $-0x4, -0x28(%rbp)
je 0x62f6
cmpq $-0x56, -0x28(%rbp)
jne 0x6368
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x28(%rbp), %rax
movl %eax, %esi
movl $0x1, %edx
callq 0x5480
cmpl $0x0, %eax
jge 0x6366
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
leaq 0x1fddd(%rip), %rsi     # 0x2610b
callq 0x5140
jmp 0x6335
movq -0x50(%rbp), %rdi
movq 0x34c50(%rip), %rsi     # 0x3af90
movq 0x34c99(%rip), %rdx     # 0x3afe0
callq 0x5260
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x56d0
jmp 0x63f4
jmp 0x63c1
cmpq $0x0, -0x28(%rbp)
jge 0x63bf
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
leaq 0x1fd9a(%rip), %rsi     # 0x26124
callq 0x5140
jmp 0x6391
movq -0x58(%rbp), %rdi
movq 0x34bf4(%rip), %rsi     # 0x3af90
movq 0x34c3d(%rip), %rdx     # 0x3afe0
callq 0x5260
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x56d0
jmp 0x63f4
jmp 0x63c1
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x53e0
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x62bd
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x52a0
nopl (%rax)
// File: Themaister[P]umusd/alsa.cpp
// Function: ALSA::pollfds[abi:cxx11]() const
EventHandled::PollList ALSA::pollfds() const
{
   EventHandled::PollList list;
   for (auto fd : fds)
   {
      list.push_back({fd.fd,
            (fd.events & POLLIN ? EPOLLIN : 0) |
            (fd.events & POLLOUT ? EPOLLOUT : 0)});
   }

   return list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x6990
movq -0x58(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x69b0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x69e0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6a10
testb $0x1, %al
jne 0x6465
jmp 0x64b8
leaq -0x28(%rbp), %rdi
callq 0x6a50
movq -0x68(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x40(%rbp)
movzwl -0x34(%rbp), %eax
andl $0x5, %eax
movl %eax, -0x3c(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x6a70
jmp 0x6494
jmp 0x6496
leaq -0x28(%rbp), %rdi
callq 0x6ab0
jmp 0x6452
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x6ad0
jmp 0x64d5
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x64cb
movq -0x68(%rbp), %rdi
callq 0x6ad0
movq -0x60(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x52a0
nop
// File: Themaister[P]umusd/alsa.cpp
// Function: ALSA::handle(EventHandler&)
void ALSA::handle(EventHandler &handler)
{
   if (!pcm)
      return;

   for (auto &fd : fds)
      fd.revents = 0;

   if (poll(fds.data(), fds.size(), 0) < 0)
      throw std::runtime_error("ALSA poll failed.");

   unsigned short revents;
   if (snd_pcm_poll_descriptors_revents(pcm, fds.data(),
            fds.size(), &revents) < 0)
      throw std::runtime_error("ALSA revents failed.\n");

   if (!(revents & POLLOUT))
      return;

   Audio::handle(handler);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, 0x30(%rax)
jne 0x6504
jmp 0x668c
movq -0x48(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6af0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6b20
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x6b50
testb $0x1, %al
jne 0x653d
jmp 0x655f
leaq -0x20(%rbp), %rdi
callq 0x6b90
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movw $0x0, 0x6(%rax)
leaq -0x20(%rbp), %rdi
callq 0x6bb0
jmp 0x652a
movq -0x48(%rbp), %rdi
addq $0x38, %rdi
callq 0x6910
movq -0x48(%rbp), %rdi
movq %rax, -0x50(%rbp)
addq $0x38, %rdi
callq 0x6930
movq -0x50(%rbp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x54f0
cmpl $0x0, %eax
jge 0x65e3
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x58(%rbp)
leaq 0x1fb90(%rip), %rsi     # 0x2613b
callq 0x5140
jmp 0x65b2
movq -0x58(%rbp), %rdi
movq 0x349d3(%rip), %rsi     # 0x3af90
movq 0x34a1c(%rip), %rdx     # 0x3afe0
callq 0x5260
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x56d0
jmp 0x6692
movq -0x48(%rbp), %rdi
movq 0x30(%rdi), %rax
movq %rax, -0x68(%rbp)
addq $0x38, %rdi
callq 0x6910
movq -0x48(%rbp), %rdi
movq %rax, -0x60(%rbp)
addq $0x38, %rdi
callq 0x6930
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl %eax, %edx
leaq -0x3e(%rbp), %rcx
callq 0x5750
cmpl $0x0, %eax
jge 0x6671
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
leaq 0x1fb11(%rip), %rsi     # 0x2614d
callq 0x5140
jmp 0x6643
movq -0x70(%rbp), %rdi
movq 0x34942(%rip), %rsi     # 0x3af90
movq 0x3498b(%rip), %rdx     # 0x3afe0
callq 0x5260
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0x56d0
jmp 0x6692
movzwl -0x3e(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x667f
jmp 0x668c
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8400
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x52a0
nopl (%rax,%rax)
// File: Themaister[P]umusd/audio.cpp
// Function: Audio::handle(EventHandler&)
void Audio::handle(EventHandler &handler)
{
   if (auto tmp = ff.lock())
   {
      auto buf = tmp->decode();
      if (buf.empty())
      {
         try
         {
            remote->next();
         }
         catch(...)
         {}
      }
      else
         write(buf);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x50(%rbp)
addq $0x18, %rsi
leaq -0x20(%rbp), %rdi
callq 0x8540
leaq -0x20(%rbp), %rdi
callq 0x8570
testb $0x1, %al
jne 0x8437
jmp 0x84e4
leaq -0x20(%rbp), %rdi
callq 0x8590
movq %rax, %rdi
callq 0x175a0
movq %rax, -0x58(%rbp)
jmp 0x844e
movq -0x58(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x85b0
jmp 0x845d
leaq -0x38(%rbp), %rdi
callq 0x86a0
testb $0x1, %al
jne 0x846c
jmp 0x84c6
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
callq *%rax
jmp 0x847f
jmp 0x84ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x84f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rdi
callq 0x5080
callq 0x5660
jmp 0x84ab
jmp 0x84ad
jmp 0x84db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x86e0
jmp 0x84f3
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
leaq -0x38(%rbp), %rsi
callq *%rax
jmp 0x84d9
jmp 0x84db
leaq -0x38(%rbp), %rdi
callq 0x86e0
leaq -0x20(%rbp), %rdi
callq 0x8740
addq $0x60, %rsp
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x8740
movq -0x40(%rbp), %rdi
callq 0x52a0
nopw %cs:(%rax,%rax)
nop
// File: Themaister[P]umusd/command.cpp
// Function: SocketReply::handle(EventHandler&)
void SocketReply::handle(EventHandler &handler)
{
   size_t to_write = data.size() - ptr;

   ssize_t ret = write(fd, data.data() + ptr, to_write);
   if (ret <= 0)
   {
      handler.remove(*this);
      end_cb(false);
   }
   else
      ptr += ret;

   if (ptr >= data.size())
   {
      handler.remove(*this);
      end_cb(true);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x20, %rdi
callq 0x5510
movq -0x28(%rbp), %rdi
subq 0x40(%rdi), %rax
movq %rax, -0x18(%rbp)
movl 0x18(%rdi), %eax
movl %eax, -0x2c(%rbp)
addq $0x20, %rdi
callq 0x50d0
movl -0x2c(%rbp), %edi
movq %rax, %rsi
movq -0x28(%rbp), %rax
addq 0x40(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x5710
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jg 0xaa4c
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x14c30
movq -0x28(%rbp), %rdi
addq $0x48, %rdi
xorl %esi, %esi
callq 0x106d0
jmp 0xaa5c
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq -0x28(%rbp), %rdi
movq 0x40(%rdi), %rax
movq %rax, -0x38(%rbp)
addq $0x20, %rdi
callq 0x5510
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jb 0xaa9c
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x14c30
movq -0x28(%rbp), %rdi
addq $0x48, %rdi
movl $0x1, %esi
callq 0x106d0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Themaister[P]umusd/command.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> metadata_action[abi:cxx11]<Command::init_command_map()::$_11::operator()(EventHandler&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>) const::'lambda'(FF::MediaInfo const&)>(Remote const&, Command::init_command_map()::$_11::operator()(EventHandler&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>) const::'lambda'(FF::MediaInfo const&))
inline std::string metadata_action(const Remote &remote, Delegate func)
{
   try
   {
      return func(remote.media_info());
   }
   catch(const std::exception &e)
   {
      std::cerr << e.what() << std::endl;
      return "";
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xb8(%rbp)
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rsi
movq (%rsi), %rax
movq 0x48(%rax), %rax
leaq -0x88(%rbp), %rdi
callq *%rax
jmp 0xeaca
movq -0xb8(%rbp), %rdi
leaq -0x9(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0xec30
jmp 0xeae3
leaq -0x88(%rbp), %rdi
callq 0x14460
jmp 0xec06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xeb26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x14460
movl -0x94(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xec16
movq -0x90(%rbp), %rdi
callq 0x5080
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq 0x2c432(%rip), %rdi     # 0x3af98
callq 0x55d0
movq %rax, -0xc0(%rbp)
jmp 0xeb74
movq -0xc0(%rbp), %rdi
movq 0x2c426(%rip), %rsi     # 0x3afa8
callq 0x5730
jmp 0xeb89
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x5370
movq -0xb8(%rbp), %rdi
movq -0xc8(%rbp), %rdx
leaq 0x17f23(%rip), %rsi     # 0x26ad4
callq 0x67d0
jmp 0xebb8
leaq -0xa1(%rbp), %rdi
callq 0x5040
callq 0x5660
jmp 0xec06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xebfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xa1(%rbp), %rdi
callq 0x5040
callq 0x5660
jmp 0xec04
jmp 0xec16
movq -0xb0(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x52a0
movq %rax, %rdi
callq 0x6700
nopw (%rax,%rax)
// File: Themaister[P]umusd/./utils.hpp
// Function: string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline std::vector<std::string> string_split(const std::string &str, const std::string &delim)
{
   std::vector<std::string> res;
   auto tmp = str;

   char *cookie;
   const char *s = strtok_r(&tmp[0], delim.c_str(), &cookie);
   while (s)
   {
      res.push_back(s);
      s = strtok_r(nullptr, delim.c_str(), &cookie);
   }

   return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x10bf0
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x5100
jmp 0x10180
xorl %eax, %eax
movl %eax, %esi
leaq -0x40(%rbp), %rdi
callq 0x5030
movq %rax, -0xa0(%rbp)
jmp 0x10196
movq -0x18(%rbp), %rdi
callq 0x5460
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
leaq -0x58(%rbp), %rdx
callq 0x5180
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x1028e
movq -0x60(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x5370
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x67d0
jmp 0x101f8
movq -0x98(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x10c10
jmp 0x1020a
leaq -0x80(%rbp), %rdi
callq 0x5670
leaq -0x81(%rbp), %rdi
callq 0x5040
movq -0x18(%rbp), %rdi
callq 0x5460
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edi
leaq -0x58(%rbp), %rdx
callq 0x5180
movq %rax, -0x60(%rbp)
jmp 0x101b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x102ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x102a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x10280
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x5670
leaq -0x81(%rbp), %rdi
callq 0x5040
jmp 0x102a3
movb $0x1, -0x19(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5670
testb $0x1, -0x19(%rbp)
jne 0x102ba
jmp 0x102ae
leaq -0x40(%rbp), %rdi
callq 0x5670
jmp 0x102ca
movq -0x98(%rbp), %rdi
callq 0x102e0
movq -0x90(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x102e0
movq -0x48(%rbp), %rdi
callq 0x52a0
nop
// File: Themaister[P]umusd/./utils.hpp
// Function: string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline std::string string_join(const std::vector<std::string> &list, const std::string &delim)
{
   std::string res;
   for (auto &str : list)
   {
      res += str;
      res += delim;
   }

   return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x5520
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x12fc0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x12ff0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x13020
testb $0x1, %al
jne 0x12f3d
jmp 0x12f8c
leaq -0x30(%rbp), %rdi
callq 0x13060
movq -0x60(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
callq 0x50e0
jmp 0x12f59
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x50e0
jmp 0x12f68
jmp 0x12f6a
leaq -0x30(%rbp), %rdi
callq 0x13080
jmp 0x12f2a
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x5670
jmp 0x12fa9
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x12f9f
movq -0x60(%rbp), %rdi
callq 0x5670
movq -0x58(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x52a0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Themaister[P]umusd/command.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> plain_action<std::_Bind<void (Remote::* (Remote*))()>>(std::_Bind<void (Remote::* (Remote*))()>)
inline std::string plain_action(Delegate func)
{
   try
   {
      func();
      return "OK";
   }
   catch(const std::exception &e)
   {
      std::cerr << e.what() << std::endl;
      return "ERROR";
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rsi, -0x48(%rbp)
movq %rdi, %rax
movq -0x48(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq %rax, %rcx
movq %rcx, -0x38(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
callq 0x13a00
jmp 0x1389d
leaq -0x1d(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x5370
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rdx
leaq 0x12cea(%rip), %rsi     # 0x265a3
callq 0x67d0
jmp 0x138c0
leaq -0x1d(%rbp), %rdi
callq 0x5040
jmp 0x139a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x138f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1d(%rbp), %rdi
callq 0x5040
movl -0x1c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x139ab
movq -0x18(%rbp), %rdi
callq 0x5080
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq 0x27673(%rip), %rdi     # 0x3af98
callq 0x55d0
movq %rax, -0x58(%rbp)
jmp 0x13930
movq -0x58(%rbp), %rdi
movq 0x2766d(%rip), %rsi     # 0x3afa8
callq 0x5730
jmp 0x13942
leaq -0x29(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x5370
movq -0x40(%rbp), %rdi
movq -0x60(%rbp), %rdx
leaq 0x12c48(%rip), %rsi     # 0x265a6
callq 0x67d0
jmp 0x13965
leaq -0x29(%rbp), %rdi
callq 0x5040
callq 0x5660
jmp 0x139a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x13998
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x5040
callq 0x5660
jmp 0x1399f
jmp 0x139ab
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x52a0
movq %rax, %rdi
callq 0x6700
nopl (%rax)
// File: Themaister[P]umusd/eventhandler.cpp
// Function: EventHandler::add(std::weak_ptr<EventHandled>)
void EventHandler::add(std::weak_ptr<EventHandled> handler)
{
   auto fd_ptr = handler.lock();

   for (auto fd : fd_ptr->pollfds())
   {
      struct epoll_event event{};
      event.events = fd.events;
      event.data.fd = fd.fd;

      cb_map[event.data.fd] = [this, handler]() {
         if (auto tmp = handler.lock())
            tmp->handle(*this);
      };

      if (epoll_ctl(epfd, EPOLL_CTL_ADD, event.data.fd, &event) < 0)
         throw std::runtime_error("Failed to add epoll fd to list.\n");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rsi, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x153b0
movq -0x98(%rbp), %rdi
callq 0x153e0
movq %rax, %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x40(%rbp), %rdi
callq *%rax
jmp 0x149e2
leaq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x15400
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x80c0
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x15430
testb $0x1, %al
jne 0x14a34
leaq -0x40(%rbp), %rdi
callq 0x6ad0
jmp 0x14b93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x14ba5
leaq -0x58(%rbp), %rdi
callq 0x14850
movq -0xa8(%rbp), %rsi
movq %rax, %rcx
movq -0xa0(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x68(%rbp)
movl $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movl -0x64(%rbp), %ecx
movl %ecx, -0x78(%rbp)
movl -0x68(%rbp), %ecx
leaq -0x74(%rbp), %rdx
movq %rdx, -0xb8(%rbp)
movl %ecx, -0x74(%rbp)
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x15460
movq -0xa0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
addq $0x8, %rdi
callq 0x15490
movq %rax, -0xb0(%rbp)
jmp 0x14aae
movq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x14bc0
jmp 0x14ac3
leaq -0x90(%rbp), %rdi
callq 0x14c10
movq -0xa0(%rbp), %rax
movl (%rax), %edi
movl -0x74(%rbp), %edx
movl $0x1, %esi
leaq -0x78(%rbp), %rcx
callq 0x50b0
cmpl $0x0, %eax
jge 0x14b78
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
leaq 0x11b17(%rip), %rsi     # 0x26627
callq 0x5140
jmp 0x14b17
movq -0xc0(%rbp), %rdi
movq 0x2646b(%rip), %rsi     # 0x3af90
movq 0x264b4(%rip), %rdx     # 0x3afe0
callq 0x5260
jmp 0x14bb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x14c10
jmp 0x14b88
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x56d0
jmp 0x14b88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x14b88
jmp 0x14b7a
leaq -0x58(%rbp), %rdi
callq 0x15570
jmp 0x14a04
leaq -0x40(%rbp), %rdi
callq 0x6ad0
jmp 0x14ba5
leaq -0x20(%rbp), %rdi
callq 0x15590
addq $0xc0, %rsp
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x15590
movq -0x48(%rbp), %rdi
callq 0x52a0
nopw (%rax,%rax)
// File: Themaister[P]umusd/eventhandler.cpp
// Function: EventHandler::wait()
bool EventHandler::wait()
{
   struct epoll_event events[16];
   int ret = epoll_wait(epfd, events, 16, -1);
   if (ret < 0)
      throw std::runtime_error("epoll_wait() failed.\n");

   for (int i = 0; i < ret; i++)
   {
      auto cb = cb_map[events[i].data.fd];
      if (cb)
         cb();
   }

   return !killed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movl (%rax), %edi
leaq -0xd0(%rbp), %rsi
movl $0x10, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x5240
movl %eax, -0xd4(%rbp)
cmpl $0x0, -0xd4(%rbp)
jge 0x14dd3
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x118(%rbp)
leaq 0x118b9(%rip), %rsi     # 0x26648
callq 0x5140
jmp 0x14d96
movq -0x118(%rbp), %rdi
movq 0x261ec(%rip), %rsi     # 0x3af90
movq 0x26235(%rip), %rdx     # 0x3afe0
callq 0x5260
movq -0x118(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
callq 0x56d0
jmp 0x14ea0
movl $0x0, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
cmpl -0xd4(%rbp), %eax
jge 0x14e89
movq -0x110(%rbp), %rdi
addq $0x8, %rdi
movslq -0xe8(%rbp), %rax
leaq -0xd0(%rbp), %rsi
imulq $0xc, %rax, %rax
addq %rax, %rsi
addq $0x4, %rsi
callq 0x15490
movq %rax, %rsi
leaq -0x108(%rbp), %rdi
callq 0x15610
leaq -0x108(%rbp), %rdi
callq 0x156c0
testb $0x1, %al
jne 0x14e39
jmp 0x14e69
leaq -0x108(%rbp), %rdi
callq 0x156f0
jmp 0x14e47
jmp 0x14e69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x15730
jmp 0x14ea0
leaq -0x108(%rbp), %rdi
callq 0x15730
movl -0xe8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe8(%rbp)
jmp 0x14ddd
movq -0x110(%rbp), %rax
movb 0x4(%rax), %al
xorb $-0x1, %al
andb $0x1, %al
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0xe0(%rbp), %rdi
callq 0x52a0
nopl (%rax)
// File: Themaister[P]umusd/ffmpeg.cpp
// Function: FF::resolve_codecs()
void FF::resolve_codecs()
{
   for (unsigned i = 0; i < fctx->nb_streams; i++)
   {
      if (fctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
      {
         aud_stream = i;
         break;
      }
   }

   if (aud_stream < 0)
      throw std::runtime_error("Failed to locate audio stream.\n");

   AVCodec *codec = avcodec_find_decoder(fctx->streams[aud_stream]->codec->codec_id);
   if (!codec)
      throw std::runtime_error("Failed to locate decoder for stream.\n");

   actx = fctx->streams[aud_stream]->codec;
   if (avcodec_open2(actx, codec, nullptr) < 0)
   {
      actx = nullptr;
      throw std::runtime_error("Failed to open codec.\n");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x30(%rbp), %rcx
movl -0xc(%rbp), %eax
movq (%rcx), %rcx
cmpl 0x2c(%rcx), %eax
jae 0x16fff
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
cmpl $0x1, 0xc(%rax)
jne 0x16ff2
movq -0x30(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x10(%rax)
jmp 0x16fff
jmp 0x16ff4
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16fbb
movq -0x30(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jge 0x1705c
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
leaq 0xf6a1(%rip), %rsi      # 0x266c5
callq 0x5140
jmp 0x1702b
movq -0x38(%rbp), %rdi
movq 0x23f5a(%rip), %rsi     # 0x3af90
movq 0x23fa3(%rip), %rdx     # 0x3afe0
callq 0x5260
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x56d0
jmp 0x1716c
movq -0x30(%rbp), %rcx
movq (%rcx), %rax
movq 0x30(%rax), %rax
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movl 0x18(%rax), %edi
callq 0x53f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x170d9
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
leaq 0xf644(%rip), %rsi      # 0x266e5
callq 0x5140
jmp 0x170a8
movq -0x40(%rbp), %rdi
movq 0x23edd(%rip), %rsi     # 0x3af90
movq 0x23f26(%rip), %rdx     # 0x3afe0
callq 0x5260
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x56d0
jmp 0x1716c
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq 0x30(%rcx), %rcx
movslq 0x10(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x55a0
cmpl $0x0, %eax
jge 0x17166
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movl $0x10, %edi
callq 0x5540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
leaq 0xf5da(%rip), %rsi      # 0x2670b
callq 0x5140
jmp 0x17138
movq -0x48(%rbp), %rdi
movq 0x23e4d(%rip), %rsi     # 0x3af90
movq 0x23e96(%rip), %rdx     # 0x3afe0
callq 0x5260
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x56d0
jmp 0x1716c
addq $0x50, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x52a0
nopw %cs:(%rax,%rax)
// File: Themaister[P]umusd/ffmpeg.cpp
// Function: FF::get_media_info()
void FF::get_media_info()
{
   media_info.channels = actx->channels;
   media_info.rate = actx->sample_rate;
   media_info.fmt = fmt_conv(actx->sample_fmt);

   media_info.duration = fctx->streams[aud_stream]->duration * av_q2d(fctx->streams[aud_stream]->time_base);

   get_metadata(fctx->metadata);
   get_metadata(fctx->streams[aud_stream]->metadata);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq 0x8(%rdi), %rax
movl 0x194(%rax), %eax
movl %eax, 0x18(%rdi)
movq 0x8(%rdi), %rax
movl 0x190(%rax), %eax
movl %eax, 0x1c(%rdi)
movq 0x8(%rdi), %rax
movl 0x198(%rax), %esi
callq 0x17410
movq -0x18(%rbp), %rcx
movl %eax, 0x20(%rcx)
movq (%rcx), %rax
movq 0x30(%rax), %rax
movslq 0x10(%rcx), %rdx
movq (%rax,%rdx,8), %rax
cvtsi2sdq 0x28(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movq (%rcx), %rax
movq 0x30(%rax), %rax
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17580
movq -0x18(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x24(%rdi)
movq (%rdi), %rax
movq 0x4b0(%rax), %rsi
callq 0x17490
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
movslq 0x10(%rdi), %rcx
movq (%rax,%rcx,8), %rax
movq 0x48(%rax), %rsi
callq 0x17490
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Themaister[P]umusd/ffmpeg.cpp
// Function: FF::~FF()
FF::~FF()
{
   if (actx)
      avcodec_close(actx);
   if (fctx)
      avformat_close_input(&fctx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x1727c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5700
jmp 0x1727a
jmp 0x1727c
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x17293
movq -0x10(%rbp), %rdi
callq 0x5630
jmp 0x17291
jmp 0x17293
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
callq 0x86e0
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x14460
addq $0x10, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x6700
nop
// File: Themaister[P]umusd/ffmpeg.cpp
// Function: FF::operator=(FF&&)
FF& FF::operator=(FF &&ff)
{
   if (actx)
   {
      avcodec_close(actx);
      actx = nullptr;
   }

   if (fctx)
      avformat_close_input(&fctx);

   std::swap(fctx, ff.fctx);
   std::swap(actx, ff.actx);
   aud_stream = ff.aud_stream;
   media_info = ff.media_info;
   buffer = std::move(ff.buffer);
   planar_audio = ff.planar_audio;

   return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x17378
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5700
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1738b
movq -0x18(%rbp), %rdi
callq 0x5630
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x17ad0
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
callq 0x17b10
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, 0x10(%rdi)
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
addq $0x18, %rdi
callq 0x17b50
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x88, %rsi
addq $0x88, %rdi
callq 0x17bc0
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movb 0xa0(%rcx), %cl
andb $0x1, %cl
movb %cl, 0xa0(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Themaister[P]umusd/ffmpeg.cpp
// Function: FF::fmt_conv(AVSampleFormat)
FF::MediaInfo::Format FF::fmt_conv(AVSampleFormat fmt)
{
   switch (fmt)
   {
      case AV_SAMPLE_FMT_S16P:
         planar_audio = true;
      case AV_SAMPLE_FMT_S16: // Fallthrough
         return MediaInfo::Format::S16;

      case AV_SAMPLE_FMT_S32P:
         planar_audio = true; // Fallthrough
      case AV_SAMPLE_FMT_S32:
         return MediaInfo::Format::S32;

      case AV_SAMPLE_FMT_FLTP:
         planar_audio = true; // Fallthrough
      case AV_SAMPLE_FMT_FLT:
         return MediaInfo::Format::Float;

      default:
         return MediaInfo::Format::None;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x7, %eax
ja 0x17483
movq -0x20(%rbp), %rax
leaq 0xf222(%rip), %rcx      # 0x26660
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rax
movb $0x1, 0xa0(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x1748a
movq -0x28(%rbp), %rax
movb $0x1, 0xa0(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x1748a
movq -0x28(%rbp), %rax
movb $0x1, 0xa0(%rax)
movl $0x3, -0x4(%rbp)
jmp 0x1748a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: Themaister[P]umusd/ffmpeg.cpp
// Function: FF::get_metadata(AVDictionary*)
void FF::get_metadata(AVDictionary *meta)
{
   auto entry = av_dict_get(meta, "title", nullptr, 0);
   if (entry && entry->value)
      media_info.title = entry->value;

   entry = av_dict_get(meta, "artist", nullptr, 0);
   if (entry && entry->value)
      media_info.artist = entry->value;

   entry = av_dict_get(meta, "album", nullptr, 0);
   if (entry && entry->value)
      media_info.album = entry->value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xf1ff(%rip), %rsi      # 0x266b2
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x5640
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x174ed
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x174ed
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x18, %rdi
addq $0x10, %rdi
callq 0x51d0
movq -0x10(%rbp), %rdi
leaq 0xf1c0(%rip), %rsi      # 0x266b8
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x5640
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x17532
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x17532
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x18, %rdi
addq $0x30, %rdi
callq 0x51d0
movq -0x10(%rbp), %rdi
leaq 0xf182(%rip), %rsi      # 0x266bf
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x5640
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x17577
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x17577
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x18, %rdi
addq $0x50, %rdi
callq 0x51d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Themaister[P]umusd/ffmpeg.cpp
// Function: FF::seek(float)
bool FF::seek(float pos)
{
   int flags = (pos < last_pos) ? AVSEEK_FLAG_BACKWARD : 0;

   double seek_to = pos / av_q2d(fctx->streams[aud_stream]->time_base);
   if (seek_to < 0.0)
      seek_to = 0.0;

   if (av_seek_frame(fctx, aud_stream, seek_to, flags) < 0)
      return false;

   last_pos = pos;
   avcodec_flush_buffers(actx);
   return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movss -0x14(%rbp), %xmm1
movss 0x14(%rcx), %xmm0
xorl %eax, %eax
movl $0x1, %edx
ucomiss %xmm1, %xmm0
cmoval %edx, %eax
movl %eax, -0x18(%rbp)
movss -0x14(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movq (%rcx), %rax
movq 0x30(%rax), %rax
movslq 0x10(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x17580
movaps %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x17a24
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movl 0x10(%rax), %esi
cvttsd2si -0x20(%rbp), %rdx
movl -0x18(%rbp), %ecx
callq 0x55f0
cmpl $0x0, %eax
jge 0x17a47
movb $0x0, -0x1(%rbp)
jmp 0x17a62
movq -0x38(%rbp), %rax
movss -0x14(%rbp), %xmm0
movss %xmm0, 0x14(%rax)
movq 0x8(%rax), %rdi
callq 0x5530
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: Themaister[P]umusd/ffmpeg.cpp
// Function: void copy_deplanar<short>(unsigned char*, unsigned char**, int, int)
inline void copy_deplanar(std::uint8_t *out, std::uint8_t **in, int frames, int channels)
{
   T* out_ptr = reinterpret_cast<T*>(out);
   for (int c = 0; c < channels; c++, out_ptr++)
   {
      const T* in_ptr = reinterpret_cast<T*>(in[c]);
      for (int i = 0; i < frames; i++)
         out_ptr[i * channels] = in_ptr[i];
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x17d4a
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x17d31
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movw (%rax,%rcx,2), %dx
movq -0x20(%rbp), %rax
movl -0x34(%rbp), %ecx
imull -0x18(%rbp), %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x17d00
jmp 0x17d33
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x17ce1
popq %rbp
retq
nopl (%rax)
// File: Themaister[P]umusd/main.cpp
// Function: main
int main(int argc, char *argv[])
{
   try
   {
      Player p;
      p.run();
   }
   catch(const std::exception &e)
   {
      std::cerr << e.what() << std::endl;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x1a2e0
jmp 0x198e7
leaq -0x110(%rbp), %rdi
callq 0x1a590
jmp 0x198f5
leaq -0x110(%rbp), %rdi
callq 0x199e0
jmp 0x1999c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x19938
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x199e0
movl -0x11c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x199c3
movq -0x118(%rbp), %rdi
callq 0x5080
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
movq 0x21624(%rip), %rdi     # 0x3af98
callq 0x55d0
movq %rax, -0x130(%rbp)
jmp 0x19982
movq -0x130(%rbp), %rdi
movq 0x21618(%rip), %rsi     # 0x3afa8
callq 0x5730
jmp 0x19997
callq 0x5660
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
callq 0x5660
jmp 0x199c1
jmp 0x199c3
movq -0x118(%rbp), %rdi
callq 0x52a0
movq %rax, %rdi
callq 0x6700
nopw (%rax,%rax)
// File: Themaister[P]umusd/player.cpp
// Function: Player::play_media(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Player::play_media(const std::string &path)
{
   if (!path.empty())
      queue.current(path);

   ff = std::make_shared<FF>(queue.current());
   dev->set_media(ff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x51a0
testb $0x1, %al
jne 0x1a606
movq -0x48(%rbp), %rdi
addq $0x40, %rdi
movq -0x10(%rbp), %rsi
callq 0x1e220
movq -0x48(%rbp), %rdi
addq $0x40, %rdi
callq 0x1e360
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x1b560
movq -0x68(%rbp), %rsi
movq -0x48(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x60(%rbp)
callq 0x1b5d0
movq -0x68(%rbp), %rdi
callq 0x8740
movq -0x48(%rbp), %rdi
addq $0x20, %rdi
callq 0x1b4f0
movq -0x60(%rbp), %rsi
movq %rax, -0x58(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x1b600
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x83b0
jmp 0x1a672
leaq -0x30(%rbp), %rdi
callq 0x6db0
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6db0
movq -0x38(%rbp), %rdi
callq 0x52a0
nop