LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_writer.h
// Function: file_writer<bool>::file_writer()
file_writer() : m_fdFile(-1)
      {
        m_Buffer = (BYTE*)malloc(4 * 1024);
        if(m_Buffer)
        {
          m_dwCurrentByte = 0;
          m_dwBytesInBuffer = 4 * 1024;
          m_dwBitsInByte = 8;
          m_bitBuffer = 0;
        }
      }

// Assembly:
pushq %rbx
movq %rdi, %rbx
orl $-0x1, (%rdi)
movl $0x1000, %edi           # imm = 0x1000
callq 0x2130
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x262d
movabsq $0x100000000000, %rax   # imm = 0x100000000000
movq %rax, 0x14(%rbx)
movl $0x8, 0x1c(%rbx)
movb $0x0, 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/adaptive_model.h
// Function: adaptive_model<unsigned char>::encode_symbol(unsigned char)
void adaptive_model<symbolT>::encode_symbol(symbolT symbol)
{
  if (m_encoder)
  {
    m_encoder->encode(cum_count(idx<symbolT>::from_symbol(symbol) - 1),
                      cum_count(idx<symbolT>::from_symbol(symbol)), //symbol_to_index(symbol)),
                      total_count());
    update(symbol);    
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x26f6
movq 0x10(%rbx), %rax
movzbl %sil, %r14d
movl (%rax,%r14,4), %esi
movl 0x4(%rax,%r14,4), %edx
movl 0x8(%rbx), %ecx
decl %ecx
movl (%rax,%rcx,4), %ecx
callq 0x2cb2
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2d6a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_writer.h
// Function: file_writer<bool>::~file_writer()
~file_writer()
      {        
        DWORD nBytesWritten;
        
        nBytesWritten = write(m_fdFile, m_Buffer, m_dwCurrentByte);       
        ASSERT(nBytesWritten == m_dwCurrentByte);

        while(m_dwBitsInByte)
        {
          m_bitBuffer <<= 1;
          --m_dwBitsInByte;
        }

        nBytesWritten = write(m_fdFile, &m_bitBuffer, sizeof(BYTE));
        ASSERT(nBytesWritten == sizeof(BYTE));
    
        close(m_fdFile);
        free(m_Buffer);
      }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
movq 0x8(%rbx), %rsi
movl 0x14(%rbx), %edx
callq 0x2040
movl 0x1c(%rbx), %eax
leaq 0x10(%rbx), %rsi
movb 0x10(%rbx), %cl
decl %eax
cmpl $-0x1, %eax
je 0x2749
addb %cl, %cl
movb %cl, 0x10(%rbx)
movl %eax, 0x1c(%rbx)
jmp 0x2738
movl (%rbx), %edi
pushq $0x1
popq %rdx
callq 0x2040
movl (%rbx), %edi
callq 0x21b0
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x2120
movq %rax, %rdi
callq 0x29d1
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_map.h
// Function: file_map<unsigned char>::~file_map()
~file_map()
    {     
      if (m_bHand)
      {
        lseek(m_fdFile, 0, SEEK_SET);
        write(m_fdFile, m_FileMap, m_dwFileSize);
        //free(m_FileMap);
      }
      else
      {      
        munmap(m_FileMap, m_dwFileSize);
      }
      close(m_fdFile);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x25(%rdi)
jne 0x2791
movl (%rbx), %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
movl (%rbx), %edi
movq 0x10(%rbx), %rsi
movl 0x18(%rbx), %edx
callq 0x2040
jmp 0x279d
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
callq 0x2090
movl (%rbx), %edi
callq 0x21b0
popq %rbx
retq
movq %rax, %rdi
callq 0x29d1
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_writer.h
// Function: file_writer<unsigned char>::file_writer()
file_writer() : m_fdFile(-1)
      {
        m_tBuffer = (T*)malloc(4 * 1024);
        if(m_tBuffer)
        {
          m_dwCurrentElem = 0;
          m_dwElemsInBuffer = (4 * 1024) / sizeof(T);
        }
      }

// Assembly:
pushq %rbx
movq %rdi, %rbx
orl $-0x1, (%rdi)
movl $0x1000, %edi           # imm = 0x1000
callq 0x2130
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x283e
movabsq $0x100000000000, %rax   # imm = 0x100000000000
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/arithmetic_decoder.h
// Function: arithmetic_decoder::arithmetic_decoder(file_map<bool>*)
arithmetic_decoder(file_map<bit>* fm): top_value(0xFFFFFFFF), 
                                         l(0), 
                                         u(top_value), 
                                         tag(0)
  {  
    m_input = fm;
    for (size_t i = 0; i < (sizeof(tag) * 8); ++i)
    {
      tag <<= 1;
      tag += m_input->read_next();
    }
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movaps 0x7a6(%rip), %xmm0      # 0x3010
movups %xmm0, 0x8(%rdi)
movq %rsi, (%rdi)
xorl %eax, %eax
pushq $0x20
popq %r14
subq $0x1, %r14
jb 0x2895
addl %eax, %eax
movl %eax, 0x14(%rbx)
movq (%rbx), %rdi
callq 0x2a68
movzbl %al, %eax
addl 0x14(%rbx), %eax
movl %eax, 0x14(%rbx)
jmp 0x2877
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/adaptive_model.h
// Function: adaptive_model<unsigned char>::decode_symbol()
symbolT adaptive_model<symbolT>::decode_symbol()
{
  symbolT symbol;
  if (m_decoder)
  {  
    DWORD target = m_decoder->decode_target(total_count());    
    DWORD index = search_index(target);

    m_decoder->decode(cum_count(index - 1),
                      cum_count(index),
                      total_count());

    symbol = idx<symbolT>::to_symbol(index);
    update(symbol);
  }

  return symbol;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
movl 0x8(%rbx), %eax
decl %eax
movq 0x10(%rbx), %rcx
movl (%rcx,%rax,4), %esi
callq 0x2e6a
movq %rbx, %rdi
movl %eax, %esi
callq 0x2e8e
movl %eax, %r14d
movq 0x30(%rbx), %rdi
leal -0x1(%r14), %eax
movq 0x10(%rbx), %rcx
movl (%rcx,%rax,4), %esi
movl %r14d, %eax
movl (%rcx,%rax,4), %edx
movl 0x8(%rbx), %eax
decl %eax
movl (%rcx,%rax,4), %ecx
callq 0x2eba
decb %r14b
movzbl %r14b, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2d6a
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_writer.h
// Function: file_writer<unsigned char>::send(unsigned char)
inline bool send(T t)
      {
        m_tBuffer[m_dwCurrentElem] = t;
        if (++m_dwCurrentElem == m_dwElemsInBuffer)
        {
          DWORD nBytesWritten = write(m_fdFile, m_tBuffer, 
                                    m_dwElemsInBuffer * sizeof(T));
          
          m_dwCurrentElem = 0;
          ASSERT(nBytesWritten == (m_dwElemsInBuffer * sizeof(T)));
          if (nBytesWritten != (m_dwElemsInBuffer * sizeof(T))) 
            return false;
        }
        return true;
      }

// Assembly:
movq 0x8(%rdi), %rax
movl 0x10(%rdi), %ecx
movb %sil, (%rax,%rcx)
movl 0x10(%rdi), %eax
incl %eax
movl %eax, 0x10(%rdi)
cmpl 0x14(%rdi), %eax
jne 0x297d
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
movq 0x8(%rbx), %rsi
movl %eax, %edx
callq 0x2040
andl $0x0, 0x10(%rbx)
cmpl %eax, 0x14(%rbx)
popq %rbx
jne 0x2980
movb $0x1, %al
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_writer.h
// Function: file_writer<unsigned char>::~file_writer()
~file_writer()
      {
        DWORD nBytesWritten = write(m_fdFile, m_tBuffer, m_dwCurrentElem * sizeof(T));
        
        ASSERT(nBytesWritten == (m_dwCurrentElem * sizeof(T)));    
        close(m_fdFile);
        free(m_tBuffer);
      }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
movq 0x8(%rbx), %rsi
movl 0x10(%rbx), %edx
callq 0x2040
movl (%rbx), %edi
callq 0x21b0
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x2120
movq %rax, %rdi
callq 0x29d1
nop
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_map.h
// Function: file_map<bool>::create(char*, unsigned int)
bool create(char* szFileName, DWORD dwFileSize = 0)
    {
      m_fdFile = open(szFileName, O_RDWR);
      
      ASSERT(m_fdFile != -1);
      if (m_fdFile != -1)
      {
        if (dwFileSize == 0)
        {
          struct stat stFile;
        
          fstat(m_fdFile, &stFile);     
          m_dwFileSize = stFile.st_size;
        }
        else
        {
          m_dwFileSize = dwFileSize;
        }
        
              m_FileMap = (BYTE*)mmap(0, m_dwFileSize, PROT_READ | PROT_WRITE, 
                                      MAP_PRIVATE, m_fdFile, 0);
        m_DataMap = m_FileMap + m_dwSizeOfHeader;
          
        ASSERT(m_FileMap != MAP_FAILED);
        if (m_FileMap != MAP_FAILED)
        {
          m_iCurrentByte = 0;
          m_nBitsInCurrentByte = 0;
          m_CurrentByte = 0;
          return true;
        }               
      }
      return false;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl %edx, %ebp
movq %rsi, %rax
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x2
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
callq 0x20c0
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x2a58
testl %ebp, %ebp
jne 0x2a1d
movq %rsp, %r14
movl %eax, %edi
movq %r14, %rsi
callq 0x2160
movl 0x30(%r14), %ebp
movl (%rbx), %eax
movl %ebp, 0x18(%rbx)
movl %ebp, %esi
xorl %r14d, %r14d
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
xorl %edi, %edi
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x2190
movq %rax, 0x10(%rbx)
movl 0x28(%rbx), %ecx
addq %rax, %rcx
movq %rcx, 0x8(%rbx)
cmpq $-0x1, %rax
je 0x2a58
movb $0x0, 0x24(%rbx)
andq $0x0, 0x1c(%rbx)
movb $0x1, %r14b
movl %r14d, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_map.h
// Function: file_map<bool>::read_next()
inline bit read_next()
    {
      if (m_nBitsInCurrentByte == 0) 
      {
        m_CurrentByte = m_DataMap[m_iCurrentByte++];
        m_nBitsInCurrentByte = 8;
      }
    
      bit retval = (MSB(m_CurrentByte) ? 1 : 0);
      m_CurrentByte <<= 1;
      --m_nBitsInCurrentByte;
    
      return (retval);
    }

// Assembly:
movl 0x20(%rdi), %ecx
testl %ecx, %ecx
je 0x2a77
leaq 0x24(%rdi), %rax
decl %ecx
jmp 0x2a87
movl 0x1c(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x1c(%rdi)
addq 0x8(%rdi), %rax
pushq $0x7
popq %rcx
movb (%rax), %al
leal (%rax,%rax), %edx
movb %dl, 0x24(%rdi)
movl %ecx, 0x20(%rdi)
shrb $0x7, %al
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_map.h
// Function: file_map<unsigned char>::create(char*, unsigned int)
bool create(char* szFileName, DWORD dwFileSize = 0)
    {
      m_fdFile = open(szFileName, O_RDWR);
      
      ASSERT(m_fdFile != -1);
      if (m_fdFile != -1)
      {
        struct stat stFile;     
        fstat(m_fdFile, &stFile);       
        
        if (dwFileSize == 0)
        {
          m_dwFileSize = stFile.st_size;          
          m_FileMap = (BYTE*)mmap(0, m_dwFileSize, PROT_READ | PROT_WRITE, 
                                  MAP_SHARED, m_fdFile, 0);                               
          m_bHand = false;
        }
        else
        {
          m_dwFileSize = dwFileSize;
          
          m_FileMap = (BYTE*)malloc(m_dwFileSize);
          
          ASSERT(m_FileMap != NULL);  
          if (m_FileMap == NULL)
            m_FileMap = (BYTE*)MAP_FAILED;
          
          /*m_FileMap = (BYTE*)mmap(0, m_dwFileSize, PROT_READ | PROT_WRITE, 
                                  MAP_ANON, -1, 0);*/
                                  
          read(m_fdFile, m_FileMap, stFile.st_size);
          m_bHand = true;
        }
        
        m_DataMap = (T*)(m_FileMap + m_dwSizeOfHeader);
          
        ASSERT(m_FileMap != MAP_FAILED);
        if (m_FileMap == MAP_FAILED)
        {
          //throw new bad_alloc();
        }
        else
        {
          m_iCurrentElem = 0;          
          return true;
        }        
      }
      return false;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl %edx, %ebp
movq %rsi, %rax
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x2
popq %rsi
movq %rax, %rdi
xorl %eax, %eax
callq 0x20c0
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x2b45
movq %rsp, %rsi
movl %eax, %edi
callq 0x2160
testl %ebp, %ebp
je 0x2b01
movl %ebp, 0x18(%rbx)
movl %ebp, %edi
callq 0x2130
xorl %esi, %esi
cmpq $0x1, %rax
sbbq %rsi, %rsi
orq %rax, %rsi
movq %rsi, 0x10(%rbx)
movl (%rbx), %edi
movq 0x30(%rsp), %rdx
callq 0x2140
movq 0x10(%rbx), %rax
movb $0x1, %r14b
jmp 0x2b25
movq 0x30(%rsp), %rax
movl %eax, %esi
movl %eax, 0x18(%rbx)
movl (%rbx), %r8d
xorl %r14d, %r14d
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
xorl %edi, %edi
xorl %r9d, %r9d
callq 0x2190
movq %rax, 0x10(%rbx)
movb %r14b, 0x25(%rbx)
movl 0x20(%rbx), %ecx
addq %rax, %rcx
movq %rcx, 0x8(%rbx)
cmpq $-0x1, %rax
je 0x2b42
andl $0x0, 0x1c(%rbx)
movb $0x1, %r14b
jmp 0x2b45
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/arithmetic_encoder.h
// Function: arithmetic_encoder::encode(unsigned int, unsigned int, unsigned int)
inline void encode(DWORD lower_bound, DWORD upper_bound, DWORD total)
  {    
    bool e3_cond = false;
    bool eql_cond;

    QWORD range = (QWORD)(u - l) + 1;

    ASSERT(l < u);
    ASSERT((lower_bound <= upper_bound) && (upper_bound <= total));
    
    u = l + (DWORD)(((range * upper_bound) / total) - 1);
    l = l + (DWORD)((range * lower_bound) / total);

    while( (eql_cond = (MSB(u) == MSB(l))) ||
           (e3_cond  = (M2SB(l) == 1) && (M2SB(u) == 0)) )
    {  
      if(eql_cond)
      {
        bit bit_to_send = ((MSB(u) == 0) ? 0 : 1);
        m_output->send(bit_to_send);
        
        l <<= 1;
        u <<= 1;
        u |= 1;

        while (scale3 > 0)
        {
          m_output->send(!bit_to_send);
          --scale3;
        }
      }
      else if (e3_cond)
      {
        l <<= 1;
        u <<= 1;
        u |= 1;
        
        l += MSB_MASK; 
        u += MSB_MASK;

        ++scale3;
      }
    }
    ASSERT(l < u);
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %r8d
movq %rdi, %rbx
movl 0xc(%rdi), %edi
movl 0x10(%rbx), %r9d
subl %edi, %r9d
incq %r9
movl %edx, %eax
imulq %r9, %rax
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
leal (%rdi,%rax), %esi
decl %esi
movl %esi, 0x10(%rbx)
movl %r8d, %eax
imulq %r9, %rax
xorl %edx, %edx
divq %rcx
addl %edi, %eax
movl %eax, 0xc(%rbx)
movl %eax, %ecx
xorl %esi, %ecx
js 0x2d3a
xorl %ebp, %ebp
testl %esi, %esi
setns %bpl
movq (%rbx), %rdi
shrl $0x1f, %esi
callq 0x2db2
shll 0xc(%rbx)
movl 0x10(%rbx), %ecx
movl 0x14(%rbx), %eax
leal 0x1(,%rcx,2), %ecx
movl %ecx, 0x10(%rbx)
testl %eax, %eax
jle 0x2d32
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x2db2
movl 0x14(%rbx), %eax
decl %eax
movl %eax, 0x14(%rbx)
jmp 0x2d1a
movl 0xc(%rbx), %eax
movl 0x10(%rbx), %esi
jmp 0x2cee
btl $0x1e, %esi
jb 0x2d63
movl %eax, %ecx
andl $0x40000000, %ecx       # imm = 0x40000000
je 0x2d63
addl %eax, %eax
andl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
movl %eax, 0xc(%rbx)
leal -0x7fffffff(,%rsi,2), %esi
movl %esi, 0x10(%rbx)
incl 0x14(%rbx)
jmp 0x2cee
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/adaptive_model.h
// Function: adaptive_model<unsigned char>::update(unsigned char)
void adaptive_model<symbolT>::update(symbolT new_symbol)
{
  for (DWORD j = idx<symbolT>::from_symbol(new_symbol); j < dwSize; ++j)
  {
    ++(m_cum_count[j]);
    
  } 

  if (m_cum_count[dwSize - 1] >= ((DWORD)UPPER_LIMIT >> 2) )
  {
    for (DWORD i = 1; i < dwSize; ++i)
    {
      m_cum_count[i] >>= 1;
      while (m_cum_count[i] <= m_cum_count[i - 1])
        ++m_cum_count[i];
    }
  }
}

// Assembly:
movq 0x10(%rdi), %rax
movl %esi, %ecx
incq %rcx
movl 0x8(%rdi), %edx
cmpq %rdx, %rcx
jae 0x2d80
incl (%rax,%rcx,4)
jmp 0x2d70
leal -0x1(%rdx), %ecx
cmpl $0x3fffffff, (%rax,%rcx,4) # imm = 0x3FFFFFFF
jb 0x2db1
pushq $0x1
popq %rcx
movl %edx, %edx
cmpq %rdx, %rcx
jae 0x2db1
movl -0x4(%rax,%rcx,4), %edx
movl (%rax,%rcx,4), %esi
shrl %esi
incl %edx
cmpl %edx, %esi
cmoval %esi, %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
movl 0x8(%rdi), %edx
jmp 0x2d8f
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/u_file_writer.h
// Function: file_writer<bool>::send(bool)
inline bool send(bit b)
      {
        if (m_dwBitsInByte == 0)
        {
          m_Buffer[m_dwCurrentByte] = m_bitBuffer; 

          if (++m_dwCurrentByte == m_dwBytesInBuffer)
          {      
            DWORD nBytesWritten = write(m_fdFile, m_Buffer, m_dwBytesInBuffer);
          
            m_dwCurrentByte = 0;
            
            ASSERT(nBytesWritten == m_dwBytesInBuffer);
            if (nBytesWritten != m_dwBytesInBuffer)
              return false;
          }

          m_dwBitsInByte = 8;
          m_bitBuffer = 0;
        }

        --m_dwBitsInByte;
        m_bitBuffer <<= 1;

        if (b) m_bitBuffer += 0x1;  
        
        return true;
      }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl 0x1c(%rdi), %ebp
movb 0x10(%rdi), %al
testl %ebp, %ebp
je 0x2dcb
decl %ebp
addb %al, %al
jmp 0x2e0b
movq 0x8(%r14), %rcx
movl 0x14(%r14), %edx
movb %al, (%rcx,%rdx)
movl 0x14(%r14), %eax
incl %eax
movl %eax, 0x14(%r14)
pushq $0x7
popq %rbp
cmpl 0x18(%r14), %eax
jne 0x2e09
movl (%r14), %edi
movq 0x8(%r14), %rsi
movl %eax, %edx
callq 0x2040
andl $0x0, 0x14(%r14)
movq %rax, %rcx
xorl %eax, %eax
cmpl %ecx, 0x18(%r14)
je 0x2e0b
jmp 0x2e17
xorl %eax, %eax
movl %ebp, 0x1c(%r14)
orb %al, %bl
movb %bl, 0x10(%r14)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/arithmetic_encoder.h
// Function: arithmetic_encoder::encode_eof()
inline void encode_eof()
  {
    for (size_t i = 0; i < sizeof(DWORD) * 8; ++i)
    {
      bit bit_to_send = ((MSB(l) == 0) ? 0 : 1);
      m_output->send(bit_to_send);
        
      l <<= 1;
      while (scale3 > 0)
      {
        m_output->send(!bit_to_send);
        --scale3;
      }
    }
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq $0x20, %r14
je 0x2e65
movl 0xc(%rbx), %esi
xorl %ebp, %ebp
testl %esi, %esi
setns %bpl
movq (%rbx), %rdi
shrl $0x1f, %esi
callq 0x2db2
shll 0xc(%rbx)
movl 0x14(%rbx), %eax
testl %eax, %eax
jle 0x2e60
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x2db2
movl 0x14(%rbx), %eax
decl %eax
movl %eax, 0x14(%rbx)
jmp 0x2e48
incq %r14
jmp 0x2e26
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/adaptive_model.h
// Function: adaptive_model<unsigned char>::search_index(unsigned int)
inline DWORD search_index(DWORD target)
  {
    DWORD k;
    for (k = 1; k < dwSize; ++k)
      if ((m_cum_count[k - 1] <= target) && (target <m_cum_count[k]))
        break;
    return k;
  }

// Assembly:
movl 0x8(%rdi), %ecx
movq 0x10(%rdi), %rdx
cmpl $0x2, %ecx
pushq $0x1
popq %rax
cmovael %ecx, %eax
pushq $0x1
popq %rdi
cmpq %rcx, %rdi
jae 0x2eb8
cmpl %esi, -0x4(%rdx,%rdi,4)
ja 0x2eb1
cmpl %esi, (%rdx,%rdi,4)
ja 0x2eb6
incq %rdi
jmp 0x2ea1
movl %edi, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/arithmetic/arithmetic_decoder.h
// Function: arithmetic_decoder::decode(unsigned int, unsigned int, unsigned int)
inline void decode(DWORD lower_bound, DWORD upper_bound, DWORD total)
  {
    bool eql_cond, e3_cond;
    QWORD range = (QWORD)u - l + 1;

    ASSERT(l < u);   
    ASSERT((lower_bound <= upper_bound) && (upper_bound <= total));
    
    u = l + (DWORD)(((range * upper_bound) / total) - 1);
    l = l + (DWORD)((range * lower_bound) / total);

    while( (eql_cond = (MSB(u) == MSB(l))) ||
           (e3_cond  = ((M2SB(l) == 1) && (M2SB(u) == 0))) )
    {  
      if(eql_cond)
      {
        l <<= 1;
        u <<= 1;
        tag <<= 1;
        
        u += 1;
        
        bit b = m_input->read_next();        
        ASSERT (((tag + b)  == tag + 1) || ((tag + b) == tag));        
        tag += b;
      }
      else if (e3_cond)
      {
        l <<= 1;
        u <<= 1;
        tag <<= 1;
        u += 1;
        
        bit b = m_input->read_next();
        ASSERT (((tag + b) == tag + 1) || ((tag + b) == tag));
        tag += b;
        
        l += MSB_MASK; 
        u += MSB_MASK;
        tag += MSB_MASK;
      }
    }
    ASSERT(l < u);
  }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xc(%rdi), %edi
movl 0x10(%rbx), %r8d
subq %rdi, %r8
incq %r8
movl %edx, %eax
imulq %r8, %rax
movl %ecx, %r9d
xorl %edx, %edx
divq %r9
leal (%rdi,%rax), %ecx
decl %ecx
movl %ecx, 0x10(%rbx)
movl %esi, %eax
imulq %r8, %rax
xorl %edx, %edx
divq %r9
addl %edi, %eax
movl %eax, 0xc(%rbx)
movl $0x80000000, %ebp       # imm = 0x80000000
movl %eax, %edx
xorl %ecx, %edx
js 0x2f26
addl %eax, %eax
movl %eax, 0xc(%rbx)
shll 0x14(%rbx)
leal 0x1(,%rcx,2), %eax
movl %eax, 0x10(%rbx)
movq (%rbx), %rdi
callq 0x2a68
movzbl %al, %eax
addl %eax, 0x14(%rbx)
movl 0xc(%rbx), %eax
movl 0x10(%rbx), %ecx
jmp 0x2ef8
btl $0x1e, %ecx
jb 0x2f6d
movl %eax, %edx
andl $0x40000000, %edx       # imm = 0x40000000
je 0x2f6d
addl %eax, %eax
movl %eax, 0xc(%rbx)
shll 0x14(%rbx)
leal 0x1(,%rcx,2), %eax
movl %eax, 0x10(%rbx)
movq (%rbx), %rdi
callq 0x2a68
movzbl %al, %edx
addl 0x14(%rbx), %edx
movl 0xc(%rbx), %eax
xorl %ebp, %eax
movl %eax, 0xc(%rbx)
movl 0x10(%rbx), %ecx
xorl %ebp, %ecx
movl %ecx, 0x10(%rbx)
xorl %ebp, %edx
movl %edx, 0x14(%rbx)
jmp 0x2ef8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/perf/dispatch.c
// Function: dispatch_accept
struct dispatch_state *
dispatch_accept(int s, struct wire_requestqueue * Q, struct perfstats * P)
{
	struct dispatch_state * D;

	/* Bake a cookie. */
	if ((D = malloc(sizeof(struct dispatch_state))) == NULL)
		goto err0;

	/* Initialize dispatcher. */
	D->readq = NULL;
	D->writeq = NULL;
	D->read_cookie = NULL;
	D->Q = Q;
	D->nrequests = 0;
	D->P = P;

	/* Accept a connection. */
	if ((D->accept_cookie = network_accept(s, callback_accept, D)) == NULL)
		goto err1;

	/* Success! */
	return (D);

err1:
	free(D);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
pushq $0x40
popq %rdi
callq 0x22a0
testq %rax, %rax
je 0x2ef6
movq %rax, %rbx
andq $0x0, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %r15, 0x28(%rax)
andq $0x0, 0x30(%rax)
movq %r14, 0x38(%rax)
leaq 0x2b(%rip), %rsi        # 0x2f06
movl %ebp, %edi
movq %rax, %rdx
callq 0x5984
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x2ef8
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/perf/dispatch.c
// Function: dispatch_done
void
dispatch_done(struct dispatch_state * D)
{

	/* Sanity-check. */
	assert(D->accept_cookie == NULL);
	assert(D->read_cookie == NULL);
	assert(D->nrequests == 0);

	/* Free the buffered reader and writer. */
	netbuf_read_free(D->readq);
	netbuf_write_free(D->writeq);

	/* Close the socket. */
	if (close(D->s))
		warnp("close");

	/* Free memory. */
	free(D);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x18(%rdi)
jne 0x314b
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x316a
cmpq $0x0, 0x30(%rbx)
jne 0x3189
movq 0x8(%rbx), %rdi
callq 0x546b
movq 0x10(%rbx), %rdi
callq 0x5820
movl (%rbx), %edi
callq 0x21d0
testl %eax, %eax
je 0x313c
callq 0x20a0
cmpl $0x0, (%rax)
je 0x312e
movq %rax, %r14
leaq 0x8c39(%rip), %rdi      # 0xbd5a
xorl %eax, %eax
callq 0x80c9
andl $0x0, (%r14)
jmp 0x313c
leaq 0x8c25(%rip), %rdi      # 0xbd5a
xorl %eax, %eax
callq 0x8258
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
leaq 0x811e(%rip), %rdi      # 0xb270
leaq 0x8130(%rip), %rsi      # 0xb289
leaq 0x8134(%rip), %rcx      # 0xb294
movl $0x12d, %edx            # imm = 0x12D
callq 0x21b0
leaq 0x814f(%rip), %rdi      # 0xb2c0
leaq 0x8111(%rip), %rsi      # 0xb289
leaq 0x8115(%rip), %rcx      # 0xb294
movl $0x12e, %edx            # imm = 0x12E
callq 0x21b0
leaq 0x8147(%rip), %rdi      # 0xb2d7
leaq 0x80f2(%rip), %rsi      # 0xb289
leaq 0x80f6(%rip), %rcx      # 0xb294
movl $0x12f, %edx            # imm = 0x12F
callq 0x21b0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/perf/dispatch.c
// Function: callback_gotresponse
static int
callback_gotresponse(void * cookie, uint8_t * buf, size_t buflen)
{
	struct forwardee * F = cookie;
	struct dispatch_state * D = F->D;
	struct wire_packet P;
	struct timeval t_end;
	uint64_t ID = F->ID;

	/* Get the completion time and compute request duration. */
	if (monoclock_get(&t_end))
		goto err1;

	/* Record the request duration. */
	if (perfstats_add(D->P, F->reqtype, timeval_diff(F->t_start, t_end)))
		goto err1;

	/* This request is no longer in flight. */
	D->nrequests--;

	/* Free the cookie. */
	mpool_forwardee_free(F);

	/* Did the request fail? */
	if (buf == NULL)
		goto failed;

	/* Send the response back to the client. */
	P.ID = ID;
	P.buf = buf;
	P.len = buflen;
	if (wire_writepacket(D->writeq, &P))
		goto err0;

	/* Success! */
	return (0);

failed:
	/*
	 * Stop reading requests -- if the target failed we won't be able to do
	 * anything useful with them anyway!  Once in-flight requests have been
	 * failed, dispatch_alive will return zero.
	 */
	if (D->read_cookie != NULL) {
		wire_readpacket_wait_cancel(D->read_cookie);
		D->read_cookie = NULL;
	}

	/* The failed request has been successfully handled. */
	return (0);

err1:
	mpool_forwardee_free(F);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %r12
movq 0x8(%rdi), %r13
leaq 0x8(%rsp), %rdi
callq 0x6f28
testl %eax, %eax
jne 0x33b9
movq 0x38(%r12), %rdi
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq 0x10(%r15), %rax
cvtsi2sd %rax, %xmm1
subq 0x18(%r15), %rcx
cvtsi2sd %rcx, %xmm0
movl 0x20(%r15), %esi
mulsd 0x7ebc(%rip), %xmm0     # 0xb268
addsd %xmm1, %xmm0
callq 0x3671
testl %eax, %eax
je 0x33d4
movq %r15, %rdi
callq 0x346e
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
decq 0x30(%r12)
movq %r15, %rdi
callq 0x346e
testq %r14, %r14
je 0x3408
leaq 0x18(%rsp), %rsi
movq %r13, (%rsi)
movq %r14, 0x10(%rsi)
movq %rbx, 0x8(%rsi)
movq 0x10(%r12), %rdi
callq 0x9ac4
testl %eax, %eax
jne 0x33c1
xorl %ebx, %ebx
jmp 0x33c4
movq 0x20(%r12), %rdi
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x33c4
callq 0x9224
andq $0x0, 0x20(%r12)
jmp 0x33c4
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/perf/perfstats.c
// Function: perfstats_init
struct perfstats *
perfstats_init(struct logging_file * L, long w)
{
	struct perfstats * P;

	/* Bake a cookie. */
	if ((P = malloc(sizeof(struct perfstats))) == NULL)
		goto err0;
	P->L = L;
	P->secsperreport = w;
	if ((P->stats = reqstatslist_init(0)) == NULL)
		goto err1;

	/* Statistics prior to now have been reported. */
	if (timetrunc(&P->lastreport, P->secsperreport))
		goto err2;

	/* Start a timer. */
	if ((P->timer_cookie = events_timer_register_double(callback_timer,
	    P, 0.5)) == NULL)
		goto err2;

	/* Success! */
	return (P);

err2:
	reqstatslist_free(P->stats);
err1:
	free(P);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x28
popq %rdi
callq 0x22a0
testq %rax, %rax
je 0x35d1
movq %rax, %rbx
movq %r15, (%rax)
movq %r14, 0x8(%rax)
pushq $0x8
popq %rsi
xorl %edi, %edi
callq 0x3c9c
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x35c9
movq %rbx, %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0x35fe
testl %eax, %eax
je 0x35dc
movq 0x20(%rbx), %rdi
callq 0x3d33
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x50(%rip), %rdi        # 0x3633
movsd 0x7e0d(%rip), %xmm0     # 0xb3f8
movq %rbx, %rsi
callq 0x4fb6
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x35d3
jmp 0x35c0
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/perf/perfstats.c
// Function: poke
static int
poke(struct perfstats * P)
{
	time_t t_now;

	/* Get the current time. */
	if (timetrunc(&t_now, P->secsperreport))
		goto err0;

	/* Is it time to flush statistics? */
	if (t_now != P->lastreport) {
		if (flush(P))
			goto err0;
		P->lastreport = t_now;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq %rsp, %rdi
callq 0x35fe
pushq $-0x1
popq %rbp
testl %eax, %eax
jne 0x385c
movq (%rsp), %rax
cmpq 0x10(%rbx), %rax
je 0x385a
movq %rbx, %rdi
callq 0x38af
testl %eax, %eax
jne 0x385c
movq (%rsp), %rax
movq %rax, 0x10(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]kivaloo/perf/perfstats.c
// Function: perfstats_done
int
perfstats_done(struct perfstats * P)
{
	int rc;

	/* Flush any unreported statistics. */
	rc = flush(P);

	/* Cancel the timer if we're waiting for a callback. */
	if (P->timer_cookie) {
		events_timer_cancel(P->timer_cookie);
		P->timer_cookie = NULL;
	}

	/* Free our state. */
	reqstatslist_free(P->stats);
	free(P);

	/* Return code from flush(). */
	return (rc);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x38af
movl %eax, %ebp
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3895
callq 0x4feb
andq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
callq 0x3d33
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/phluid61[P]hsf/src/innerlist.c
// Function: SH_InnerList__init
SH_InnerList*
SH_InnerList__init(int* err) {
	SH_InnerList* obj;

	__cascade(err, (SH_InnerList*)0);

	obj = (SH_InnerList*)malloc(sizeof(SH_InnerList));
	if ((SH_InnerList*)0 == obj) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (SH_InnerList*)0;
	}

	obj->count = 0;

	__clear(err);
	return obj;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x117e
cmpl $0x0, (%rbx)
je 0x117e
xorl %eax, %eax
jmp 0x11a7
movl $0x808, %edi            # imm = 0x808
callq 0x1080
testq %rax, %rax
je 0x1199
andq $0x0, 0x800(%rax)
xorl %ecx, %ecx
jmp 0x11a0
movl $0x80000001, %ecx       # imm = 0x80000001
xorl %eax, %eax
testq %rbx, %rbx
je 0x11a7
movl %ecx, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/phluid61[P]hsf/src/innerlist.c
// Function: SH_InnerList__add
void
SH_InnerList__add(SH_InnerList* obj, SH_Item* item, int* err) {
	__cascade(err,);
	if (obj->count >= SH_INNERLIST_CAPACITY) {
		__raise(err, SH_E_LIST_OVERFLOW);
		return;
	}
	obj->_list[obj->count++] = item;
	__clear(err);
}

// Assembly:
testq %rdx, %rdx
je 0x1241
cmpl $0x0, (%rdx)
je 0x1260
retq
movq 0x800(%rdi), %rax
cmpq $0xff, %rax
ja 0x1240
leaq 0x1(%rax), %rcx
movq %rcx, 0x800(%rdi)
movq %rsi, (%rdi,%rax,8)
retq
movq 0x800(%rdi), %rax
cmpq $0x100, %rax            # imm = 0x100
jb 0x1276
movl $0x300001, (%rdx)       # imm = 0x300001
retq
leaq 0x1(%rax), %rcx
movq %rcx, 0x800(%rdi)
movq %rsi, (%rdi,%rax,8)
andl $0x0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/phluid61[P]hsf/src/innerlist.c
// Function: _SH_InnerList__to_s_item
void
__SH_InnerList__to_s_item(SH_Item* obj, void* ptr, int* err) {
	__SH_InnerList__string* str;

	sh_char_t* s;

	int local_err = SH_E_NO_ERROR;

	__cascade(err,);

	str = (__SH_InnerList__string*)ptr;

	s = SH_Item__to_s(obj, &local_err);
	if (local_err) {
		__raise(err, local_err);
		return;
	}

	str->a[str->n ++] = s; str->length += strlen((const char*)s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
andl $0x0, 0xc(%rsp)
testq %rdx, %rdx
je 0x134f
cmpl $0x0, (%r14)
jne 0x1389
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0x1090
movl (%r15), %ecx
testl %ecx, %ecx
je 0x136d
testq %r14, %r14
je 0x1389
movl %ecx, (%r14)
jmp 0x1389
movq 0x8(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movq %rax, 0x10(%rbx,%rcx,8)
movq %rax, %rdi
callq 0x1060
addq %rax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/phluid61[P]hsf/src/innerlist.c
// Function: SH_InnerList__to_s
sh_char_t*
SH_InnerList__to_s(SH_InnerList* obj, int* err) {
	sh_char_t* tmp_s;
	sh_char_t* s;
	sh_char_t* ptr;

	size_t i;
	size_t n;
	size_t total;

	__SH_InnerList__string str;
	str.length = (size_t)0;
	str.n = (size_t)0;

	SH_InnerList__each(obj, &__SH_InnerList__to_s_item, (void*)(&str), err);
	if (__catch(err)) {
		for (i = 0; i < str.n; i++) {
			free(str.a[i]);
		}
		__cascade(err, (sh_char_t*)0);
	}

	total = 2; /* '(' and ')' */
	total += str.length;
	if (str.n > 1)
		total += (str.n - 1); /* ' ' between items */
	total += 1; /* NULL */

	s = (sh_char_t*)malloc(sizeof(sh_char_t) * total);
	if ((sh_char_t*)0 == s) {
		__raise(err, SH_E_MALLOC_ERROR);
		return (sh_char_t*)0;
	}

	ptr = s;

	*ptr = '(';
	ptr ++;

	for (i = 0; i < str.n; i++) {
		if (i > 0) {
			*ptr = ' ';
			ptr ++;
		}

		tmp_s = str.a[i];
		n = strlen((const char*)tmp_s);
		memcpy((void*)ptr, (const void*)tmp_s, n);
		free(str.a[i]);
		ptr += n;
	}

	*ptr = ')';
	ptr ++;

	*ptr = SH_CHAR_C(0);

	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x810, %rsp            # imm = 0x810
movq %rsi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movq 0x2c2a(%rip), %rsi      # 0x3fe0
movq %r14, %rcx
callq 0x1050
testq %r14, %r14
je 0x13eb
cmpl $0x0, (%r14)
je 0x13eb
xorl %ebx, %ebx
cmpq 0x8(%rsp), %rbx
jae 0x13e1
movq 0x10(%rsp,%rbx,8), %rdi
callq 0x1030
incq %rbx
jmp 0x13cb
cmpl $0x0, (%r14)
jne 0x147c
movq (%rsp), %rax
movq 0x8(%rsp), %r15
xorl %ecx, %ecx
movq %r15, %rdx
subq $0x1, %rdx
cmovaeq %rdx, %rcx
leaq (%rax,%rcx), %rdi
addq $0x3, %rdi
callq 0x1080
testq %rax, %rax
je 0x1470
movq %rax, %rbx
movb $0x28, (%rax)
movq %rax, %r14
incq %r14
xorl %r13d, %r13d
cmpq %r15, %r13
jae 0x1468
testq %r13, %r13
je 0x1433
movb $0x20, (%r14)
incq %r14
movq 0x10(%rsp,%r13,8), %r15
movq %r15, %rdi
callq 0x1060
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1070
movq 0x10(%rsp,%r13,8), %rdi
callq 0x1030
addq %r12, %r14
incq %r13
movq 0x8(%rsp), %r15
jmp 0x1422
movw $0x29, (%r14)
jmp 0x147e
testq %r14, %r14
je 0x147c
movl $0x80000001, (%r14)     # imm = 0x80000001
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x810, %rsp            # imm = 0x810
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/aes.c
// Function: AES_Encrypt
void AES_Encrypt(const AES_Ctx *Ctx, const unsigned char *Pt, size_t Length, unsigned char *Ct)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i) {
		rijndaelEncrypt(Ctx->RoundKeys, Ctx->Rounds, Pt, Ct);
		Pt += 0x10;
		Ct += 0x10;
	}

	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
shrq $0x4, %r14
subq $0x1, %r14
jb 0x4888
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x284b
addq $0x10, %r15
addq $0x10, %rbx
jmp 0x4862
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/aes.c
// Function: AES_Decrypt
void AES_Decrypt(const AES_Ctx *Ctx, const unsigned char *Ct, size_t Length, unsigned char *Pt)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i) {
		rijndaelDecrypt(Ctx->RoundKeys, Ctx->Rounds, Ct, Pt);
		Pt += 16;
		Ct += 16;
	}

	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
shrq $0x4, %r14
subq $0x1, %r14
jb 0x48d2
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3864
addq $0x10, %rbx
addq $0x10, %r15
jmp 0x48ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/aes.c
// Function: AES_EncryptCBC
void AES_EncryptCBC(const AES_Ctx *Ctx, const unsigned char *Pt, size_t Length, unsigned char *Ct)
{
	unsigned char oneBlock[16];
	const size_t blockCount = Length / 16;

	memcpy(oneBlock, Pt, sizeof(oneBlock));
	_XOR16B(oneBlock, Ctx->IV);
	rijndaelEncrypt(Ctx->RoundKeys, Ctx->Rounds, oneBlock, Ct);
	Pt += 0x10;
	Ct += 0x10;
	for (size_t i = 1; i < blockCount; ++i) {
		memcpy(oneBlock, Pt, sizeof(oneBlock));
		_XOR16B(oneBlock, Ct - 0x10);
		rijndaelEncrypt(Ctx->RoundKeys, Ctx->Rounds, oneBlock, Ct);
		Pt += 0x10;
		Ct += 0x10;
	}

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r13
movq %rsi, %r14
movq %rdi, %r15
shrq $0x4, %rdx
movq %rdx, 0x8(%rsp)
movups (%rsi), %xmm0
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
leaq 0x1e0(%rdi), %rsi
movq %r12, %rdi
callq 0x4985
movl 0x1f0(%r15), %esi
movq %r15, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x284b
addq $0x10, %r14
pushq $0x1
popq %rbx
cmpq 0x8(%rsp), %rbx
jae 0x4976
leaq 0x10(%r13), %rbp
movups (%r14), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x4985
movl 0x1f0(%r15), %esi
movq %r15, %rdi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x284b
incq %rbx
addq $0x10, %r14
movq %rbp, %r13
jmp 0x4936
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/aes.c
// Function: AES_DecryptCBC
void AES_DecryptCBC(const AES_Ctx *Ctx, const unsigned char *Ct, size_t Length, unsigned char *Pt)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i)
		rijndaelDecrypt(Ctx->RoundKeys, Ctx->Rounds, Ct + i*0x10, Pt + i*0x10);

	_XOR16B(Pt, Ctx->IV);
	for (size_t i = 1; i < blockCount; ++i)
		_XOR16B(Pt + i * 0x10, Ct + (i - 1) * 0x10);

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
shrq $0x4, %r14
movq %rcx, %r13
movq %rsi, %rbp
movq %r14, (%rsp)
subq $0x1, %r14
jb 0x49e4
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x3864
addq $0x10, %rbp
addq $0x10, %r13
jmp 0x49be
addq $0x1e0, %r12            # imm = 0x1E0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4985
addq $0x10, %rbx
pushq $0x1
popq %r12
movq (%rsp), %r14
cmpq %r14, %r12
jae 0x4a1f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4985
incq %r12
addq $0x10, %r15
addq $0x10, %rbx
jmp 0x4a02
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/aes.c
// Function: AES_EncryptECB
void AES_EncryptECB(const AES_Ctx *Ctx, const unsigned char *Pt, size_t Length, unsigned char *Ct)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i)
		rijndaelEncrypt(Ctx->RoundKeys, Ctx->Rounds, Pt + i * 0x10, Ct + i * 0x10);

	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
shrq $0x4, %r14
subq $0x1, %r14
jb 0x4a6c
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x284b
addq $0x10, %r15
addq $0x10, %rbx
jmp 0x4a46
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/aes.c
// Function: AES_DecryptECB
void AES_DecryptECB(const AES_Ctx *Ctx, const unsigned char *Ct, size_t Length, unsigned char *Pt)
{
	const size_t blockCount = Length / 0x10;

	for (size_t i = 0; i < blockCount; ++i)
		rijndaelDecrypt(Ctx->RoundKeys, Ctx->Rounds, Ct + i * 0x10, Pt + i * 0x10);

	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
shrq $0x4, %r14
subq $0x1, %r14
jb 0x4ab6
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3864
addq $0x10, %r15
addq $0x10, %rbx
jmp 0x4a90
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/aes.c
// Function: AESDecryptCTS
void AESDecryptCTS(const AES_Ctx *Ctx, const unsigned char *Ct, size_t Length, unsigned char *Pt)
{
	const size_t blockCount = (Length + 15) / 16;
	const size_t lastLen = (Length % 16) ? (Length % 16) : 16;
	unsigned char buffer[32];
	unsigned char buffer2[32];

	if (blockCount > 2)
		AES_DecryptCBC(Ctx, Ct, (blockCount - 2)*16, Pt);

	Pt += (blockCount - 2) * 16;
	memset(buffer, 0, sizeof(buffer));
	memcpy(buffer, Pt, lastLen + 16);
	AES_Decrypt(Ctx, buffer, 16, buffer2);
	memcpy(buffer, buffer2, 16);
	_XOR16B(buffer, buffer + 16);
	memcpy(buffer + 16 + lastLen, buffer + lastLen, 16 - lastLen);
	AES_Decrypt(Ctx, buffer + 16, 16, buffer2);
	_XOR16B(buffer2, Ct + 16*(blockCount - 2));
	memcpy(Pt, buffer2, 16);
	memcpy(Pt + 16, buffer, lastLen);

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r14
movq %rdx, %rbx
leaq 0xf(%rdx), %r15
cmpq $0x2f, %r15
movq %rsi, 0x18(%rsp)
jbe 0x4afd
andq $-0x10, %r15
addq $-0x20, %r15
movq %rdi, %r13
movq %r15, %rdx
movq %r14, %rcx
callq 0x4999
jmp 0x4b08
andl $0x30, %r15d
addq $-0x20, %r15
movq %rdi, %r13
andl $0xf, %ebx
pushq $0x10
popq %rbp
cmoveq %rbp, %rbx
movq %r14, 0x10(%rsp)
addq %r15, %r14
movq %r14, 0x8(%rsp)
leaq 0x10(%rbx), %r12
subq %rbx, %rbp
leaq (%rsp,%rbx), %rdi
addq $0x30, %rdi
movq %rdi, (%rsp)
xorl %esi, %esi
movq %rbp, %rdx
callq 0x2100
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2170
leaq 0x40(%rsp), %r12
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
pushq $0x10
popq %r14
movq %r14, %rdx
movq %r12, %rcx
callq 0x4894
movaps (%r12), %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
leaq (%rdi,%r14), %r12
movq %r12, %rsi
callq 0x4985
leaq (%rsp,%rbx), %rsi
addq $0x20, %rsi
movq (%rsp), %rdi
movq %rbp, %rdx
callq 0x2170
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %r12
movq %r14, %rdx
leaq 0x40(%rsp), %r14
movq %r14, %rcx
callq 0x4894
movq 0x18(%rsp), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x4985
movaps (%r14), %xmm0
movq 0x10(%rsp), %rax
movups %xmm0, (%rax,%r15)
movq 0x8(%rsp), %rdi
addq %r12, %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x2170
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/auth.c
// Function: AuthKeyGen
void AuthKeyGen(const char *Password, unsigned char *Salt, unsigned int SaltLen, uint32_t IterationCount, unsigned char Key[16])
{
	sha256_ctx ctx;
	unsigned char digest[256/8];

	sha256_init(&ctx);
	sha256_update(&ctx, Salt, SaltLen);
	sha256_update(&ctx, (unsigned char *)Password, (unsigned int)strlen(Password));
	for (size_t i = 0; i < IterationCount - 1; ++i) {
		sha256_final(&ctx, digest);
		sha256_init(&ctx);
		sha256_update(&ctx, Salt, SaltLen);
		sha256_update(&ctx, digest, sizeof(digest));
	}

	sha256_final(&ctx, digest);
	memcpy(Key, digest, 0x10);

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, 0x8(%rsp)
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x67b7
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x67db
movq %rbx, %rdi
callq 0x20c0
movq %r12, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x67db
decl %r14d
leaq 0x10(%rsp), %r13
pushq $0x20
popq %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0x6880
subq $0x1, %r14
jb 0x4c80
movq %r12, %rdi
callq 0x67b7
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x67db
movq %r12, %rdi
movq %r13, %rsi
movl %ebx, %edx
callq 0x67db
jmp 0x4c4b
movaps 0x10(%rsp), %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/logging.c
// Function: LogMsg
void LogMsg(uint32_t Level, const char *Format, ...)
{
	va_list vs;
	char msg[4096];

	if (_loggingFlags & Level) {
		if (_logStream == NULL)
			_logStream = stderr;

		memset(msg, 0, sizeof(msg));
		va_start(vs, Format);
		vsnprintf(msg, sizeof(msg), Format, vs);
		fputs(msg, _logStream);
		fflush(_logStream);
		va_end(vs);
	}

	return;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x10d8, %rsp           # imm = 0x10D8
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x50ad
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testl %edi, 0xc09d(%rip)      # 0x11150
je 0x513e
movq %rsi, %rbx
cmpq $0x0, 0xc9f4(%rip)      # 0x11ab8
jne 0x50d7
movq 0xbf2b(%rip), %rax      # 0x10ff8
movq (%rax), %rax
movq %rax, 0xc9e1(%rip)      # 0x11ab8
leaq 0xd0(%rsp), %r14
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
xorl %esi, %esi
callq 0x2100
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x10f0(%rsp), %rax
movq %rax, 0x8(%rcx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rcx)
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2070
movq 0xc98e(%rip), %rsi      # 0x11ab8
movq %r14, %rdi
callq 0x20f0
movq 0xc97f(%rip), %rdi      # 0x11ab8
callq 0x2190
addq $0x10d8, %rsp           # imm = 0x10D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/logging.c
// Function: LogSetFile
int LogSetFile(const char *FileName)
{
	int ret = 0;

	_logStream = fopen(FileName, "wb");
	if (_logStream == NULL)
		ret = errno;

	return ret;
}

// Assembly:
pushq %rax
leaq 0x80f9(%rip), %rsi      # 0xd24a
callq 0x21e0
movq %rax, %rcx
movq %rax, 0xc958(%rip)      # 0x11ab8
xorl %eax, %eax
testq %rcx, %rcx
jne 0x516e
callq 0x2050
movl (%rax), %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/MartinDrab[P]netpipe/netpipe.c
// Function: sockaddrstr
char *sockaddrstr(const struct sockaddr *Addr)
{
	size_t len = 0;
	char *ret = NULL;
	const struct sockaddr_in *in4 = NULL;
	const struct sockaddr_in6 *in6 = NULL;
	const unsigned char *bytes = NULL;
	const unsigned short *words = NULL;

	len = 128;
	ret = (char *)malloc(len);
	if (ret == NULL)
		return ret;

	memset(ret, 0, len);
	switch (Addr->sa_family) {
		case AF_INET:
			in4 = (struct sockaddr_in *)Addr;
			bytes = (unsigned char *)&in4->sin_addr;
			snprintf(ret, len, "%u.%u.%u.%u:%u", bytes[0], bytes[1], bytes[2], bytes[3], ntohs(in4->sin_port));
			break;
		case AF_INET6:
			in6 = (struct sockaddr_in6 *)Addr;
			words = (unsigned short *)&in6->sin6_addr;
			snprintf(ret, len, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x:%u", words[0], words[1], words[2], words[3], words[4], words[5], words[6], words[7], ntohs(in6->sin6_port));
			break;
		default:
			free(ret);
			ret = NULL;
			break;
	}

	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rdi
movl $0x80, %esi
callq 0x2140
testq %rax, %rax
je 0x524b
movq %rax, %rbx
movzwl (%r14), %eax
cmpl $0xa, %eax
je 0x51e6
cmpl $0x2, %eax
jne 0x5243
movzbl 0x4(%r14), %ecx
movzbl 0x5(%r14), %r8d
movzbl 0x6(%r14), %r9d
movzbl 0x7(%r14), %r10d
movzwl 0x2(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r11d
leaq 0x80dd(%rip), %rdx      # 0xd2ac
movl $0x80, %esi
movq %rbx, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x20e0
popq %rcx
popq %rdx
jmp 0x524d
movzwl 0x8(%r14), %ecx
movzwl 0xa(%r14), %r8d
movzwl 0xc(%r14), %r9d
movzwl 0xe(%r14), %r10d
movzwl 0x10(%r14), %r11d
movzwl 0x12(%r14), %r15d
movzwl 0x14(%r14), %r12d
movzwl 0x16(%r14), %r13d
movzwl 0x2(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %r14d
leaq 0x8099(%rip), %rdx      # 0xd2bb
movl $0x80, %esi
movq %rbx, %rdi
xorl %eax, %eax
pushq %r14
pushq %r13
pushq %r12
pushq %r15
pushq %r11
pushq %r10
callq 0x20e0
addq $0x30, %rsp
jmp 0x524d
movq %rbx, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq