LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x21e0
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x2140
movq %rax, %rdi
callq 0x2c07
nop
// File: /workspace/github_c_makefile_star2_O3/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 %rdi, %rbx
xorl %r14d, %r14d
movq %rsi, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x20e0
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x2c94
testl %ebp, %ebp
jne 0x2c52
movq %rsp, %r14
movl %eax, %edi
movq %r14, %rsi
callq 0x2180
movl 0x30(%r14), %ebp
movl (%rbx), %eax
movl %ebp, 0x18(%rbx)
movl %ebp, %esi
xorl %r14d, %r14d
xorl %edi, %edi
movl $0x3, %edx
movl $0x2, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x21c0
movq %rax, 0x10(%rbx)
movl 0x28(%rbx), %ecx
addq %rax, %rcx
movq %rcx, 0x8(%rbx)
cmpq $-0x1, %rax
je 0x2c94
movb $0x0, 0x24(%rbx)
movq $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_O3/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 %rdi, %rbx
xorl %r14d, %r14d
movq %rsi, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x20e0
movl %eax, (%rbx)
cmpl $-0x1, %eax
je 0x2d59
movq %rsp, %rsi
movl %eax, %edi
callq 0x2180
testl %ebp, %ebp
je 0x2d0e
movl %ebp, 0x18(%rbx)
movl %ebp, %edi
callq 0x2150
xorl %esi, %esi
cmpq $0x1, %rax
sbbq %rsi, %rsi
orq %rax, %rsi
movq %rsi, 0x10(%rbx)
movl (%rbx), %edi
movq 0x30(%rsp), %rdx
callq 0x2160
movq 0x10(%rbx), %rax
movb $0x1, %r14b
jmp 0x2d36
movq 0x30(%rsp), %rax
movl %eax, %esi
movl %eax, 0x18(%rbx)
movl (%rbx), %r8d
xorl %r14d, %r14d
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
callq 0x21c0
movq %rax, 0x10(%rbx)
movb %r14b, 0x25(%rbx)
movl 0x20(%rbx), %ecx
addq %rax, %rcx
movq %rcx, 0x8(%rbx)
cmpq $-0x1, %rax
je 0x2d56
movl $0x0, 0x1c(%rbx)
movb $0x1, %r14b
jmp 0x2d59
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
leal 0x1(%rsi), %edx
movl 0x8(%rdi), %ecx
movq 0x10(%rdi), %rax
cmpl %ecx, %edx
jae 0x2fe1
movzbl %sil, %edx
incq %rdx
incl (%rax,%rdx,4)
incq %rdx
movl 0x8(%rdi), %ecx
cmpq %rcx, %rdx
jb 0x2fd3
leal -0x1(%rcx), %edx
cmpl $0x3fffffff, (%rax,%rdx,4) # imm = 0x3FFFFFFF
setb %dl
cmpl $0x2, %ecx
setb %cl
orb %dl, %cl
jne 0x3019
movl (%rax), %ecx
movl $0x1, %edx
movl (%rax,%rdx,4), %esi
shrl %esi
incl %ecx
cmpl %ecx, %esi
cmoval %esi, %ecx
movl %ecx, (%rax,%rdx,4)
incq %rdx
movl 0x8(%rdi), %esi
cmpq %rsi, %rdx
jb 0x2fff
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movl 0xc(%rbx), %ebp
movq (%rbx), %r15
movl 0x1c(%r15), %r12d
movb 0x10(%r15), %al
testl %r12d, %r12d
je 0x3042
decl %r12d
addb %al, %al
jmp 0x3081
movq 0x8(%r15), %rcx
movl 0x14(%r15), %edx
movb %al, (%rcx,%rdx)
movl 0x14(%r15), %eax
incl %eax
movl %eax, 0x14(%r15)
movl $0x7, %r12d
cmpl 0x18(%r15), %eax
jne 0x307f
movl (%r15), %edi
movq 0x8(%r15), %rsi
movl %eax, %edx
callq 0x2040
movl $0x0, 0x14(%r15)
cmpl %eax, 0x18(%r15)
jne 0x3090
xorl %eax, %eax
movl %r12d, 0x1c(%r15)
movl %ebp, %ecx
shrl $0x1f, %ecx
orb %al, %cl
movb %cl, 0x10(%r15)
shll 0xc(%rbx)
cmpl $0x0, 0x14(%rbx)
jle 0x310e
testl %ebp, %ebp
setns %bpl
movq (%rbx), %r15
movl 0x1c(%r15), %r12d
movb 0x10(%r15), %al
testl %r12d, %r12d
je 0x30b6
decl %r12d
addb %al, %al
jmp 0x30f5
movq 0x8(%r15), %rcx
movl 0x14(%r15), %edx
movb %al, (%rcx,%rdx)
movl 0x14(%r15), %eax
incl %eax
movl %eax, 0x14(%r15)
movl $0x7, %r12d
cmpl 0x18(%r15), %eax
jne 0x30f3
movl (%r15), %edi
movq 0x8(%r15), %rsi
movl %eax, %edx
callq 0x2040
movl $0x0, 0x14(%r15)
cmpl %eax, 0x18(%r15)
jne 0x3100
xorl %eax, %eax
orb %bpl, %al
movl %r12d, 0x1c(%r15)
movb %al, 0x10(%r15)
movl 0x14(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x14(%rbx)
cmpl $0x1, %eax
jg 0x309f
incq %r14
cmpq $0x20, %r14
jne 0x3028
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x40, %edi
callq 0x22a0
testq %rax, %rax
je 0x345c
movq %rax, %rbx
xorl %eax, %eax
movq %rax, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq %r15, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movq %r14, 0x38(%rbx)
leaq 0x2b(%rip), %rsi        # 0x346c
movl %ebp, %edi
movq %rbx, %rdx
callq 0x63d4
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x345e
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_O3/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 0x36cc
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x36eb
cmpq $0x0, 0x30(%rbx)
jne 0x370a
movq 0x8(%rbx), %rdi
callq 0x5e8a
movq 0x10(%rbx), %rdi
callq 0x6253
movl (%rbx), %edi
callq 0x21d0
testl %eax, %eax
je 0x36bd
callq 0x20a0
cmpl $0x0, (%rax)
je 0x36af
movq %rax, %r14
leaq 0xa6bb(%rip), %rdi      # 0xdd5a
xorl %eax, %eax
callq 0x8f6c
movl $0x0, (%r14)
jmp 0x36bd
leaq 0xa6a4(%rip), %rdi      # 0xdd5a
xorl %eax, %eax
callq 0x908b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2040
leaq 0x9b9d(%rip), %rdi      # 0xd270
leaq 0x9baf(%rip), %rsi      # 0xd289
leaq 0x9bb3(%rip), %rcx      # 0xd294
movl $0x12d, %edx            # imm = 0x12D
callq 0x21b0
leaq 0x9bce(%rip), %rdi      # 0xd2c0
leaq 0x9b90(%rip), %rsi      # 0xd289
leaq 0x9b94(%rip), %rcx      # 0xd294
movl $0x12e, %edx            # imm = 0x12E
callq 0x21b0
leaq 0x9bc6(%rip), %rdi      # 0xd2d7
leaq 0x9b71(%rip), %rsi      # 0xd289
leaq 0x9b75(%rip), %rcx      # 0xd294
movl $0x12f, %edx            # imm = 0x12F
callq 0x21b0
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x28, %edi
callq 0x22a0
testq %rax, %rax
je 0x3c87
movq %rax, %rbx
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movl $0x8, %esi
xorl %edi, %edi
callq 0x43a4
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x3c7f
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2290
cmpq $-0x1, %rax
je 0x3c76
movq 0x10(%rbx), %rcx
movq %rcx, %rax
cqto
idivq %r14
subq %rdx, %rcx
movq %rcx, 0x10(%rbx)
leaq 0x35(%rip), %rdi        # 0x3c92
movsd 0x9793(%rip), %xmm0     # 0xd3f8
movq %rbx, %rsi
callq 0x59ad
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x3c89
movq 0x20(%rbx), %rdi
callq 0x444c
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r14
leaq 0x8(%rsp), %rdi
callq 0x2290
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $-0x1, %rax
je 0x3f11
movq 0x8(%rsp), %rcx
movq %rcx, %rax
cqto
idivq %r14
subq %rdx, %rcx
movq %rcx, 0x8(%rsp)
cmpq 0x10(%rbx), %rcx
je 0x3f0f
movq %rbx, %rdi
callq 0x3f59
testl %eax, %eax
jne 0x3f11
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3f59
movl %eax, %ebp
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3f3f
callq 0x59e2
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
callq 0x444c
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
je 0x119c
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jne 0x11be
movl $0x808, %edi            # imm = 0x808
callq 0x1080
testq %rax, %rax
je 0x11b8
movq $0x0, 0x800(%rax)
movl $0x0, (%rbx)
jmp 0x11c0
movl $0x808, %edi            # imm = 0x808
callq 0x1080
testq %rax, %rax
je 0x11be
movq $0x0, 0x800(%rax)
jmp 0x11c0
movl $0x80000001, (%rbx)     # imm = 0x80000001
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1288
cmpl $0x0, (%rdx)
je 0x12a7
retq
movq 0x800(%rdi), %rax
cmpq $0xff, %rax
ja 0x1287
leaq 0x1(%rax), %rcx
movq %rcx, 0x800(%rdi)
movq %rsi, (%rdi,%rax,8)
retq
movq 0x800(%rdi), %rax
cmpq $0x100, %rax            # imm = 0x100
jb 0x12bd
movl $0x300001, (%rdx)       # imm = 0x300001
retq
leaq 0x1(%rax), %rcx
movq %rcx, 0x800(%rdi)
movq %rsi, (%rdi,%rax,8)
movl $0x0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2bbe(%rip), %rsi      # 0x3fe0
movq %r14, %rcx
callq 0x1050
testq %r14, %r14
je 0x1468
cmpl $0x0, (%r14)
movq 0x8(%rsp), %r15
je 0x146d
testq %r15, %r15
je 0x14f9
xorl %ebx, %ebx
movq 0x10(%rsp,%rbx,8), %rdi
callq 0x1030
incq %rbx
movq 0x8(%rsp), %r15
cmpq %r15, %rbx
jb 0x1445
cmpl $0x0, (%r14)
jne 0x14f9
jmp 0x146d
movq 0x8(%rsp), %r15
movq (%rsp), %rax
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 0x14ed
movq %rax, %rbx
movb $0x28, (%rax)
movq %rax, %r14
incq %r14
testq %r15, %r15
je 0x14e5
xorl %r13d, %r13d
testq %r13, %r13
je 0x14b0
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
cmpq 0x8(%rsp), %r13
jb 0x14a4
movw $0x29, (%r14)
jmp 0x14fb
testq %r14, %r14
je 0x14f9
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_O3/MartinDrab[P]netpipe/netpipe.c
// Function: usage
void usage(void)
{
	fprintf(stderr, "Usage: netpipe <mode> [options]\n");
	fprintf(stderr, "Supported modes:\n");
	fprintf(stderr, "  aa - accept connection from both source and destination\n");
	fprintf(stderr, "  ac - accept connection from the source, make connection to the target\n");
	fprintf(stderr, "  ca - make connection to the source, accept connection from the target\n");
	fprintf(stderr, "  cc - connect to both source and target\n");
	fprintf(stderr, "The connection to the target is established only after the source connection\n");
	fprintf(stderr, "Options:\n");
	for (const COMMAND_LINE_OPTION *c = _cmdOptions; c->Type != otUnknown; c++) {
		fprintf(stderr, "  %s", c->Names[0]);
		for (int i = 1 ; i < c->NameCount; i++)
			fprintf(stderr, ", %s", c->Names[i]);

		if (c->ArgumentType != NULL)
			fprintf(stderr, " <%s>", c->ArgumentType);

		if (c->Description)
			fprintf(stderr, " - %s", c->Description);

		fputc('\n', stderr);
	}

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xdd66(%rip), %r13      # 0xfff8
movq (%r13), %rcx
leaq 0xb5cb(%rip), %rdi      # 0xd868
pushq $0x20
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2210
movq (%r13), %rcx
leaq 0xb5d3(%rip), %rdi      # 0xd889
pushq $0x11
popq %rsi
movq %rbx, %rdx
callq 0x2210
movq (%r13), %rcx
leaq 0xb5cf(%rip), %rdi      # 0xd89b
pushq $0x3a
popq %rsi
movq %rbx, %rdx
callq 0x2210
movq (%r13), %rcx
leaq 0xb5f4(%rip), %rdi      # 0xd8d6
pushq $0x48
popq %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2210
movq (%r13), %rcx
leaq 0xb623(%rip), %rdi      # 0xd91f
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2210
movq (%r13), %rcx
leaq 0xb656(%rip), %rdi      # 0xd968
pushq $0x29
popq %rsi
movq %rbx, %rdx
callq 0x2210
movq (%r13), %rcx
leaq 0xb66a(%rip), %rdi      # 0xd992
pushq $0x4d
popq %rsi
movq %rbx, %rdx
callq 0x2210
movq (%r13), %rcx
leaq 0xb6a2(%rip), %rdi      # 0xd9e0
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x2210
cmpl $0x0, 0xde10(%rip)      # 0x10160
je 0x2401
leaq 0xde03(%rip), %r15      # 0x10160
leaq 0xb686(%rip), %rbx      # 0xd9ea
leaq 0xb684(%rip), %r14      # 0xd9ef
pushq $0xa
popq %rbp
movq (%r13), %rdi
movq 0x18(%r15), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2160
cmpq $0x2, 0x10(%r15)
jb 0x23af
pushq $0x4
popq %r12
movq (%r13), %rdi
movq (%r15,%r12,8), %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x2160
leaq 0x1(%r12), %rax
addq $-0x2, %r12
cmpq %r12, 0x10(%r15)
movq %rax, %r12
ja 0x238b
movq 0x28(%r15), %rdx
testq %rdx, %rdx
jne 0x23d9
movq 0x30(%r15), %rdx
testq %rdx, %rdx
jne 0x23ed
movq (%r13), %rsi
movl %ebp, %edi
callq 0x2120
cmpl $0x0, 0x38(%r15)
leaq 0x38(%r15), %r15
jne 0x236e
jmp 0x2401
movq (%r13), %rdi
leaq 0xb610(%rip), %rsi      # 0xd9f4
xorl %eax, %eax
callq 0x2160
jmp 0x23b8
movq (%r13), %rdi
leaq 0xb602(%rip), %rsi      # 0xd9fa
xorl %eax, %eax
callq 0x2160
jmp 0x23c1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
cmpq $0x10, %rdx
jb 0x4ad0
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
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x2a7f
addq $0x10, %r15
addq $0x10, %rbx
decq %r14
jne 0x4aa2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
cmpq $0x10, %rdx
jb 0x4b1d
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
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3a98
addq $0x10, %rbx
addq $0x10, %r15
decq %r14
jne 0x4aef
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movups (%rsi), %xmm0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movups 0x1e0(%rdi), %xmm1
xorps %xmm0, %xmm1
movaps %xmm1, (%rdx)
movl 0x1f0(%rdi), %esi
callq 0x2a7f
cmpq $0x20, %r14
jb 0x4ba6
shrq $0x4, %r14
decq %r14
addq $0x10, %r15
addq $0x10, %rbx
movq %rsp, %r13
movups (%r15), %xmm0
movaps %xmm0, (%rsp)
movups -0x10(%rbx), %xmm1
xorps %xmm0, %xmm1
movaps %xmm1, (%rsp)
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x2a7f
addq $0x10, %r15
addq $0x10, %rbx
decq %r14
jne 0x4b70
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq %rdx, %rax
shrq $0x4, %rax
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
cmpq $0x10, %rdx
jb 0x4c10
movq %rbx, %r13
movq %r14, %rbp
movq 0x8(%rsp), %r15
movl 0x1f0(%r12), %esi
movq %r12, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x3a98
addq $0x10, %rbp
addq $0x10, %r13
decq %r15
jne 0x4bed
xorl %eax, %eax
movb 0x1e0(%r12,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x4c12
cmpq $0x20, 0x10(%rsp)
movq 0x8(%rsp), %rsi
jb 0x4c5e
addq $0x10, %rbx
movl $0x1, %eax
xorl %ecx, %ecx
movb (%r14,%rcx), %dl
xorb %dl, (%rbx,%rcx)
incq %rcx
cmpq $0x10, %rcx
jne 0x4c3e
incq %rax
addq $0x10, %rbx
addq $0x10, %r14
cmpq %rsi, %rax
jne 0x4c3c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %r12
leaq 0xf(%rdx), %r15
cmpq $0x2f, %r15
movq %rsi, 0x18(%rsp)
jbe 0x4d45
andq $-0x10, %r15
addq $-0x20, %r15
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x4bb4
jmp 0x4d4d
andl $0x30, %r15d
addq $-0x20, %r15
andl $0xf, %ebx
movl $0x10, %eax
cmoveq %rax, %rbx
leaq (%r14,%r15), %rbp
leaq 0x10(%rbx), %r13
movq %r14, 0x10(%rsp)
movl $0x10, %r14d
subq %rbx, %r14
leaq (%rsp,%rbx), %rdi
addq $0x30, %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movq %r14, %rdx
callq 0x2100
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x2170
movl 0x1f0(%r12), %r13d
leaq 0x40(%rsp), %rcx
movq %r12, %rdi
movl %r13d, %esi
leaq 0x20(%rsp), %rdx
callq 0x3a98
leaq 0x40(%rsp), %rax
movaps (%rax), %xmm0
movl $0x10, %eax
leaq 0x20(%rsp), %rcx
addq %rcx, %rax
movq %rax, (%rsp)
xorps 0x10(%rcx), %xmm0
movaps %xmm0, (%rcx)
leaq (%rsp,%rbx), %rsi
addq $0x20, %rsi
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x2170
movq %r12, %rdi
movl %r13d, %esi
movq (%rsp), %rdx
leaq 0x40(%rsp), %r14
movq %r14, %rcx
callq 0x3a98
movq 0x18(%rsp), %rax
movups (%rax,%r15), %xmm0
xorps (%r14), %xmm0
movaps %xmm0, (%r14)
movq 0x10(%rsp), %rax
movups %xmm0, (%rax,%r15)
movl $0x10, %eax
addq %rax, %rbp
movq %rbp, %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
nop
// File: /workspace/github_c_makefile_star2_O3/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 $0xc8, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x6a2d
movq %r13, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x6a52
movq %r12, %rdi
callq 0x20c0
movq %r13, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x6a52
decl %r14d
je 0x4ed4
leaq 0x20(%rsp), %r12
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x6afb
movq %r12, %rdi
callq 0x6a2d
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x6a52
movq %r12, %rdi
movq %r13, %rsi
movl $0x20, %edx
callq 0x6a52
decq %r14
jne 0x4e9f
leaq 0x20(%rsp), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x6afb
movaps (%r14), %xmm0
movups %xmm0, (%rbx)
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x533d
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, 0xae0d(%rip)      # 0x10150
je 0x53ce
movq %rsi, %rbx
cmpq $0x0, 0xb764(%rip)      # 0x10ab8
jne 0x5367
movq 0xac9b(%rip), %rax      # 0xfff8
movq (%rax), %rax
movq %rax, 0xb751(%rip)      # 0x10ab8
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 0xb6fe(%rip), %rsi      # 0x10ab8
movq %r14, %rdi
callq 0x20f0
movq 0xb6ef(%rip), %rdi      # 0x10ab8
callq 0x2190
addq $0x10d8, %rsp           # imm = 0x10D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7e69(%rip), %rsi      # 0xd24a
callq 0x21e0
movq %rax, %rcx
movq %rax, 0xb6c8(%rip)      # 0x10ab8
xorl %eax, %eax
testq %rcx, %rcx
jne 0x53fe
callq 0x2050
movl (%rax), %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %edi
movl $0x80, %esi
callq 0x2140
testq %rax, %rax
je 0x54df
movq %rax, %rbx
movzwl (%r14), %eax
cmpl $0xa, %eax
je 0x547a
cmpl $0x2, %eax
jne 0x54d7
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 0x7e4b(%rip), %rdx      # 0xd2ac
movl $0x80, %esi
movq %rbx, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x20e0
addq $0x10, %rsp
jmp 0x54e1
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 0x7e05(%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 0x54e1
movq %rbx, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/netpipe.c
// Function: recv_fixed
static int _recv_fixed(SOCKET Socket, void *Buffer, size_t Length, int Flags)
{
	int ret = 0;

	if ((size_t)recv(Socket, Buffer, Length, Flags) != Length) {
		ret = errno;
		if (ret == 0)
			ret = EINTR;
	}

	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
xorl %ebx, %ebx
xorl %ecx, %ecx
callq 0x2040
cmpq %r14, %rax
je 0x66a5
callq 0x2050
movl (%rax), %eax
testl %eax, %eax
movl $0x4, %ebx
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/netpipe.c
// Function: StreamData
static int _StreamData(SOCKET Source, SOCKET Dest, uint32_t Flags)
{
	int ret = 0;
	ssize_t len = 0;
	char dataBuffer[4096];

	do {
		len = recv(Source, dataBuffer, sizeof(dataBuffer), 0);
		if (len > 0) {
			LogPacket("<<< %zu bytes received", len);
			len = send(Dest, dataBuffer, len, 0);
			if (len >= 0)
				LogPacket(">>> %zu bytes sent", len);
		}

		if (len == -1)
			ret = -1;
	} while (len > 0);

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movl %esi, %ebx
movl %edi, %ebp
movq %rsp, %r14
leaq 0x784e(%rip), %r15      # 0xdf1c
xorl %r12d, %r12d
movl $0x1000, %edx           # imm = 0x1000
movl %ebp, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2040
movq %rax, %r13
testq %rax, %rax
jle 0x673e
callq 0x2090
movl $0x8, %edi
movq %r15, %rsi
movl %eax, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52e4
movl %ebx, %edi
movq %r14, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x20d0
movq %rax, %r13
testq %rax, %rax
js 0x673e
callq 0x2090
movl $0x8, %edi
leaq 0x780f(%rip), %rsi      # 0xdf3a
movl %eax, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x52e4
testq %r13, %r13
jne 0x66d1
jmp 0x674c
xorl %r12d, %r12d
cmpq $-0x1, %r13
sete %r12b
negl %r12d
movl %r12d, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/randomness.c
// Function: RandomBuffer
int RandomBuffer(void *Buffer, uint32_t Size)
{
	int ret = 0;
#ifdef _WIN32
	HCRYPTPROV hCryptProv = 0;

	if (CryptAcquireContextW(&hCryptProv, NULL, L"Microsoft Base Cryptographic Provider v1.0", PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
		if (!CryptGenRandom(hCryptProv, Size, Buffer))
			ret = GetLastError();

		CryptReleaseContext(hCryptProv, 0);
	} else ret = GetLastError();
#else
	FILE *f = NULL;

	f = fopen("/dev/urandom", "r");
	if (f == NULL) {
		ret = errno;
		goto Exit;
	}

	if (fread(Buffer, 1, Size, f) != Size)
		ret = errno;

	fclose(f);
Exit:
#endif
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
leaq 0x77d5(%rip), %rdi      # 0xdf54
leaq 0x6f66(%rip), %rsi      # 0xd6ec
callq 0x21e0
testq %rax, %rax
je 0x67c1
movq %rax, %rbx
movl %ebp, %r15d
movl $0x1, %esi
movq %r14, %rdi
movq %r15, %rdx
movq %rax, %rcx
callq 0x2060
xorl %ebp, %ebp
cmpq %r15, %rax
je 0x67b7
callq 0x2050
movl (%rax), %ebp
movq %rbx, %rdi
callq 0x20a0
jmp 0x67c8
callq 0x2050
movl (%rax), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/sha2.c
// Function: sha256
void sha256(const unsigned char *message, unsigned int len, unsigned char *digest)
{
    sha256_ctx ctx;

    sha256_init(&ctx);
    sha256_update(&ctx, message, len);
    sha256_final(&ctx, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movaps 0x9cb2(%rip), %xmm0     # 0x106a0
movq %rsp, %r14
movups %xmm0, 0x98(%r14)
movaps 0x9c90(%rip), %xmm0     # 0x10690
movups %xmm0, 0x88(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x6a52
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6afb
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/sha2.c
// Function: sha256_update
void sha256_update(sha256_ctx *ctx, const unsigned char *message,
                   unsigned int len)
{
    unsigned int block_nb;
    unsigned int new_len, rem_len, tmp_len;
    const unsigned char *shifted_message;

    tmp_len = SHA256_BLOCK_SIZE - ctx->len;
    rem_len = len < tmp_len ? len : tmp_len;

    memcpy(&ctx->block[ctx->len], message, rem_len);

    if (ctx->len + len < SHA256_BLOCK_SIZE) {
        ctx->len += len;
        return;
    }

    new_len = len - rem_len;
    block_nb = new_len / SHA256_BLOCK_SIZE;

    shifted_message = message + rem_len;

    sha256_transf(ctx, ctx->block, 1);
    sha256_transf(ctx, shifted_message, block_nb);

    rem_len = new_len % SHA256_BLOCK_SIZE;

    memcpy(ctx->block, &shifted_message[block_nb << 6],
           rem_len);

    ctx->len = rem_len;
    ctx->tot_len += (block_nb + 1) << 6;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl $0x40, %r12d
subl %eax, %r12d
cmpl %edx, %r12d
cmovael %edx, %r12d
addq %rax, %rdi
addq $0x8, %rdi
movq %r12, %rdx
callq 0x2170
movl 0x4(%rbx), %r13d
addl %r14d, %r13d
cmpl $0x40, %r13d
jb 0x6ae8
leaq 0x8(%rbx), %rbp
subl %r12d, %r14d
movl %r14d, %r13d
shrl $0x6, %r13d
addq %r12, %r15
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x67d8
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x67d8
movl %r14d, %r13d
andl $0x3f, %r13d
andl $-0x40, %r14d
leaq (%r14,%r15), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x2170
movl (%rbx), %eax
addl %r14d, %eax
addl $0x40, %eax
movl %eax, (%rbx)
movl %r13d, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/sha2.c
// Function: sha512
void sha512(const unsigned char *message, unsigned int len,
            unsigned char *digest)
{
    sha512_ctx ctx;

    sha512_init(&ctx);
    sha512_update(&ctx, message, len);
    sha512_final(&ctx, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movaps 0x9905(%rip), %xmm0     # 0x10720
movq %rsp, %r14
movups %xmm0, 0x138(%r14)
movaps 0x98e3(%rip), %xmm0     # 0x10710
movups %xmm0, 0x128(%r14)
movaps 0x98c4(%rip), %xmm0     # 0x10700
movups %xmm0, 0x118(%r14)
movaps 0x98a5(%rip), %xmm0     # 0x106f0
movups %xmm0, 0x108(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x6e9f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6f4e
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/sha2.c
// Function: sha512_update
void sha512_update(sha512_ctx *ctx, const unsigned char *message,
                   unsigned int len)
{
    unsigned int block_nb;
    unsigned int new_len, rem_len, tmp_len;
    const unsigned char *shifted_message;

    tmp_len = SHA512_BLOCK_SIZE - ctx->len;
    rem_len = len < tmp_len ? len : tmp_len;

    memcpy(&ctx->block[ctx->len], message, rem_len);

    if (ctx->len + len < SHA512_BLOCK_SIZE) {
        ctx->len += len;
        return;
    }

    new_len = len - rem_len;
    block_nb = new_len / SHA512_BLOCK_SIZE;

    shifted_message = message + rem_len;

    sha512_transf(ctx, ctx->block, 1);
    sha512_transf(ctx, shifted_message, block_nb);

    rem_len = new_len % SHA512_BLOCK_SIZE;

    memcpy(ctx->block, &shifted_message[block_nb << 7],
           rem_len);

    ctx->len = rem_len;
    ctx->tot_len += (block_nb + 1) << 7;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl 0x4(%rdi), %eax
movl $0x80, %ebp
movl $0x80, %r12d
subl %eax, %r12d
cmpl %edx, %r12d
cmovael %edx, %r12d
addq %rax, %rdi
addq $0x8, %rdi
movq %r12, %rdx
callq 0x2170
movl 0x4(%rbx), %r13d
addl %r14d, %r13d
cmpl %ebp, %r13d
jb 0x6f3b
leaq 0x8(%rbx), %rbp
subl %r12d, %r14d
movl %r14d, %r13d
shrl $0x7, %r13d
addq %r12, %r15
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x6be8
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x6be8
movl %r14d, %r13d
andl $0x7f, %r13d
andl $-0x80, %r14d
leaq (%r14,%r15), %rsi
movq %rbp, %rdi
movq %r13, %rdx
callq 0x2170
movl (%rbx), %eax
addl %r14d, %eax
addl $0x80, %eax
movl %eax, (%rbx)
movl %r13d, 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/sha2.c
// Function: sha384
void sha384(const unsigned char *message, unsigned int len,
            unsigned char *digest)
{
    sha384_ctx ctx;

    sha384_init(&ctx);
    sha384_update(&ctx, message, len);
    sha384_final(&ctx, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movaps 0x9658(%rip), %xmm0     # 0x106e0
movq %rsp, %r14
movups %xmm0, 0x138(%r14)
movaps 0x9636(%rip), %xmm0     # 0x106d0
movups %xmm0, 0x128(%r14)
movaps 0x9617(%rip), %xmm0     # 0x106c0
movups %xmm0, 0x118(%r14)
movaps 0x95f8(%rip), %xmm0     # 0x106b0
movups %xmm0, 0x108(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x710c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x71bb
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/sha2.c
// Function: sha224
void sha224(const unsigned char *message, unsigned int len,
            unsigned char *digest)
{
    sha224_ctx ctx;

    sha224_init(&ctx);
    sha224_update(&ctx, message, len);
    sha224_final(&ctx, digest);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movl %esi, %edx
movq %rdi, %rsi
movaps 0x938b(%rip), %xmm0     # 0x10680
movq %rsp, %r14
movups %xmm0, 0x98(%r14)
movaps 0x9369(%rip), %xmm0     # 0x10670
movups %xmm0, 0x88(%r14)
movq $0x0, (%r14)
movq %r14, %rdi
callq 0x7359
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7402
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/MartinDrab[P]netpipe/utils.c
// Function: UtilsSetTimeouts
int UtilsSetTimeouts(SOCKET Socket, uint32_t Miliseconds)
{
	int ret = 0;
#ifdef _WIN32
	uint32_t timeout;
#else
	struct timeval timeout;
#endif

	memset(&timeout, 0, sizeof(timeout));
#ifdef _WIN32
	timeout = Miliseconds;
#else
	timeout.tv_sec = Miliseconds / 1000;
	timeout.tv_usec = (Miliseconds * 1000) % 1000000;
#endif
	ret = setsockopt(Socket, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));
	if (ret != 0) {
		ret = errno;
		goto Exit;
	}

	ret = setsockopt(Socket, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout));
	if (ret != 0) {
		ret = errno;
		goto Exit;
	}

Exit:
	return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl %esi, %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
movq %rsp, %rcx
movq %rax, (%rcx)
imull $0x3e8, %esi, %eax      # imm = 0x3E8
imulq $0x431bde83, %rax, %rdx # imm = 0x431BDE83
shrq $0x32, %rdx
imull $0xf4240, %edx, %edx    # imm = 0xF4240
subl %edx, %eax
movq %rax, 0x8(%rcx)
movl $0x1, %esi
movl $0x14, %edx
movl $0x10, %r8d
callq 0x2080
testl %eax, %eax
jne 0x755e
movq %rsp, %rcx
movl %ebx, %edi
movl $0x1, %esi
movl $0x15, %edx
movl $0x10, %r8d
callq 0x2080
testl %eax, %eax
je 0x756b
callq 0x2050
movl (%rax), %eax
addq $0x10, %rsp
popq %rbx
retq
xorl %eax, %eax
jmp 0x7565
// File: /workspace/github_c_makefile_star2_O3/adelciotto[P]plasma/src/rgb_plasma.c
// Function: InitSDL
int InitSDL(void) {
    SDL_Init(SDL_INIT_VIDEO);

    if (SDL_GetDesktopDisplayMode(0, &displayMode) != 0) {
        return -1;
    }

    window = SDL_CreateWindow(
        WINDOW_TITLE, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
        width * scale, height * scale, SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
    if (window == NULL) {
        return -1;
    }
    LogInfo("window created with size %dx%d", width, height);

    if (fullscreen) {
        SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
    }

    if (!interactive) {
        SDL_ShowCursor(SDL_DISABLE);
    }

    renderer = SDL_CreateRenderer(
        window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (renderer == NULL) {
        return -1;
    }
    LogInfo("renderer created with logical size %dx%d", width, height);

    SDL_RenderSetLogicalSize(renderer, width, height);

    texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGB888,
                                SDL_TEXTUREACCESS_STREAMING, width, height);
    if (texture == NULL) {
        return -1;
    }

    return 0;
}

// Assembly:
pushq %rbx
movl $0x20, %edi
callq 0x1140
leaq 0x2cb1(%rip), %rsi      # 0x4180
xorl %edi, %edi
callq 0x11f0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x14e3
movl %ebx, %eax
popq %rbx
retq
movl 0x2c4e(%rip), %r8d      # 0x4138
movl 0x2c40(%rip), %ecx      # 0x4130
imull %r8d, %ecx
imull 0x2c38(%rip), %r8d      # 0x4134
leaq 0xb9d(%rip), %rdi       # 0x20a0
movl $0x2fff0000, %esi       # imm = 0x2FFF0000
movl $0x2fff0000, %edx       # imm = 0x2FFF0000
movl $0x24, %r9d
callq 0x1060
movq %rax, 0x2c39(%rip)      # 0x4158
testq %rax, %rax
je 0x14df
movl 0x2c06(%rip), %edx      # 0x4130
movl 0x2c04(%rip), %ecx      # 0x4134
leaq 0xb74(%rip), %rsi       # 0x20ab
xorl %edi, %edi
xorl %eax, %eax
callq 0x1200
cmpl $0x0, 0x2c31(%rip)      # 0x4178
je 0x155a
movq 0x2c08(%rip), %rdi      # 0x4158
movl $0x1001, %esi           # imm = 0x1001
callq 0x1170
cmpl $0x0, 0x2c1b(%rip)      # 0x417c
jne 0x156a
xorl %edi, %edi
callq 0x1230
movq 0x2be7(%rip), %rdi      # 0x4158
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x6, %edx
callq 0x1040
movq %rax, 0x2bd4(%rip)      # 0x4160
testq %rax, %rax
je 0x14df
movl 0x2b95(%rip), %edx      # 0x4130
movl 0x2b93(%rip), %ecx      # 0x4134
leaq 0xb22(%rip), %rsi       # 0x20ca
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq 0x1200
movq 0x2ba6(%rip), %rdi      # 0x4160
movl 0x2b70(%rip), %esi      # 0x4130
movl 0x2b6e(%rip), %edx      # 0x4134
callq 0x10b0
movq 0x2b8e(%rip), %rdi      # 0x4160
movl 0x2b58(%rip), %ecx      # 0x4130
movl 0x2b55(%rip), %r8d      # 0x4134
movl $0x16161804, %esi       # imm = 0x16161804
movl $0x1, %edx
callq 0x1210
movq %rax, 0x2b73(%rip)      # 0x4168
cmpq $0x1, %rax
sbbl %ebx, %ebx
jmp 0x14df