LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/zdelta.c
// Function: zd_uncompress
int ZEXPORT zd_uncompress(const Bytef *ref, uLong rsize,
			  Bytef *tar, uLongf* tsize,
			  const Bytef *delta, uLong dsize)
{
  int rval;
  int f = ZD_FINISH;
  zd_stream strm;  
 
  /* init io buffers */
  strm.base[0]       = (Bytef*) ref;
  strm.base_avail[0] = rsize;
  strm.refnum        = 1;

  strm.next_out  = (Bytef*) tar;
  strm.total_out = 0;
  strm.avail_out = *tsize;

  strm.next_in  = (Bytef*) delta;
  strm.total_in = 0;
  strm.avail_in = dsize;

  strm.zalloc = (alloc_func)0;
  strm.zfree  = (free_func)0;
  strm.opaque = (voidpf)0;
  rval = zd_inflateInit(&strm);

  if (rval != ZD_OK)
  {
    fprintf(stderr, "%s error: %d\n", "zd_InflateInit", rval);
    return rval;
  }

  /* decompress the data */
  rval = zd_inflate(&strm,f);
 
  if(rval != ZD_STREAM_END){
    zd_inflateEnd(&strm);
    return rval;
  }
  *tsize = strm.total_out;
  return zd_inflateEnd(&strm);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x98, %rsp
movq %rcx, %rbx
leaq 0x8(%rsp), %rax
movq %rdi, 0x30(%rax)
movq %rsi, 0x40(%rax)
movl $0x1, 0x48(%rax)
movq %rdx, 0x18(%rax)
xorl %ecx, %ecx
movq %rcx, 0x28(%rax)
movl (%rbx), %edx
movl %edx, 0x20(%rax)
movq %r8, (%rax)
movq %rcx, 0x10(%rax)
movl %r9d, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
movq %rcx, 0x70(%rax)
leaq 0x777e(%rip), %rsi      # 0x90bb
movq %rax, %rdi
movl $0x90, %edx
callq 0x4318
testl %eax, %eax
jne 0x198f
leaq 0x8(%rsp), %rdi
movl $0x4, %esi
callq 0x4327
cmpl $0x1, %eax
jne 0x1977
leaq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rax
movq %rax, (%rbx)
callq 0x41c1
movl %eax, %ebp
jmp 0x1983
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x41c1
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
movl %eax, %ebp
movq 0xc658(%rip), %rax      # 0xdff0
movq (%rax), %rdi
leaq 0x771f(%rip), %rsi      # 0x90c1
leaq 0x7732(%rip), %rdx      # 0x90db
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10d0
jmp 0x1983
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/deflate.c
// Function: zd_deflateParams
int ZEXPORT zd_deflateParams(strm, level, strategy)
    zd_streamp strm;
    int level;
    int strategy;
{
    deflate_state *s;
    compress_func func;
    int err = ZD_OK;

    if (strm == ZD_NULL || strm->state == ZD_NULL ||
	strm->refnum < 0 || strm->refnum > REFNUM) return ZD_STREAM_ERROR;
    s = strm->state;

    if (level == ZD_DEFAULT_COMPRESSION) {
	level = 7;
    }
    if (level < 0 || level > 9 || strategy < 0 || strategy > 8) {
	return ZD_STREAM_ERROR;
    }
    func = configuration_table[s->level].func;

    if (func != configuration_table[level].func && strm->total_in != 0) {
	/* Flush the last buffer: */
	err = zd_deflate(strm, Z_PARTIAL_FLUSH);
    }
    if (s->level != level) {
	s->level = level;
	s->max_lazy_match   = configuration_table[level].max_lazy;
	s->good_match       = configuration_table[level].good_length;
	s->nice_match       = configuration_table[level].nice_length;
	s->max_chain_length = configuration_table[level].max_chain;
    }
    s->strategy = strategy;
    return err;
}

// Assembly:
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x1f3f
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x58(%rdi), %r14
testq %r14, %r14
je 0x1f37
cmpl $0x1, 0x48(%rdi)
ja 0x1f37
movl %edx, %ebx
cmpl $-0x1, %esi
movl $0x7, %ebp
cmovnel %esi, %ebp
cmpl $0xa, %ebp
setae %cl
cmpl $0x9, %edx
setae %dl
orb %cl, %dl
jne 0x1f37
movslq 0xf4(%r14), %rcx
movq %rcx, %rax
shlq $0x4, %rax
leaq 0xbe6a(%rip), %r15      # 0xdd30
movq 0x8(%rax,%r15), %rdx
movl %ebp, %r12d
shlq $0x4, %r12
xorl %eax, %eax
cmpq 0x8(%r12,%r15), %rdx
je 0x1ef3
cmpq $0x0, 0x10(%rdi)
je 0x1ef3
movl $0x1, %esi
callq 0x1f40
movl 0xf4(%r14), %ecx
cmpl %ebp, %ecx
je 0x1f30
addq %r12, %r15
movl %ebp, 0xf4(%r14)
movzwl 0x2(%r15), %ecx
movl %ecx, 0xf0(%r14)
movzwl (%r15), %ecx
movl %ecx, 0xfc(%r14)
movzwl 0x4(%r15), %ecx
movl %ecx, 0x100(%r14)
movzwl 0x6(%r15), %ecx
movl %ecx, 0xec(%r14)
movl %ebx, 0xf8(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/deflate.c
// Function: zd_deflateEnd
int ZEXPORT zd_deflateEnd (strm)
    zd_streamp strm;
{
  int status;

  if (strm == ZD_NULL || strm->state == ZD_NULL) return ZD_STREAM_ERROR;
  
  status = strm->state->status;
  if (status != INIT_STATE && status != BUSY_STATE &&
      status != FINISH_STATE) {
    return ZD_STREAM_ERROR;
  }

  /* Deallocate in reverse order of allocations: */
  /* zdelta: deallocate zdelta buffers           */
  TRY_FREE(strm, strm->state->pending_buf);
  TRY_FREE(strm, strm->state->ref_head[0]);
  TRY_FREE(strm, strm->state->ref_prev[0]);
  TRY_FREE(strm, strm->state->head);
  TRY_FREE(strm, strm->state->prev);

  /* zdelta: strm->state->window now points at the middle of
   *         strm->state->ref_window
   */
  TRY_FREE(strm, strm->state->ref_window[0]);
  ZFREE(strm, strm->state);
  strm->state = ZD_NULL;
  return status == BUSY_STATE ? ZD_DATA_ERROR : ZD_OK;
}

// Assembly:
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x2625
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rsi
testq %rsi, %rsi
je 0x261f
movl 0x8(%rsi), %ebp
cmpl $0x2a, %ebp
je 0x2575
cmpl $0x29a, %ebp            # imm = 0x29A
je 0x2575
cmpl $0x71, %ebp
jne 0x261f
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x258c
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x80(%rsi), %rax
testq %rax, %rax
je 0x25a6
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x70(%rsi), %rax
testq %rax, %rax
je 0x25bd
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x78(%rsi), %rax
testq %rax, %rax
je 0x25d4
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x25eb
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x50(%rsi), %rax
testq %rax, %rax
je 0x2602
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
movq $0x0, 0x58(%rbx)
xorl %eax, %eax
cmpl $0x71, %ebp
setne %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/deflate.c
// Function: read_buf
local int read_buf(strm, buf, size)
     zd_streamp strm;
     Bytef *buf;
     unsigned size;
{
  unsigned len = strm->avail_in;

  if (len > size) len = size;
  if (len == 0) return 0;

  strm->avail_in  -= len;

  if (!strm->state->noheader) {
    strm->adler = zd_adler32(strm->adler, strm->next_in, len);
  }

  zmemcpy(buf, strm->next_in, len);
  strm->next_in  += len;
  strm->total_in += len;
  
  return (int)len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl 0x8(%rdi), %eax
cmpl %edx, %eax
cmovbl %eax, %ebx
testl %ebx, %ebx
je 0x37ee
movq %rsi, %r15
movq %rdi, %r14
subl %ebx, %eax
movl %eax, 0x8(%rdi)
movq 0x58(%rdi), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x37d6
movq (%r14), %rsi
movq 0x80(%r14), %rdi
movl %ebx, %edx
callq 0x66b0
movq %rax, 0x80(%r14)
movq (%r14), %rsi
movl %ebx, %r12d
movq %r15, %rdi
movq %r12, %rdx
callq 0x10f0
addq %r12, (%r14)
addq %r12, 0x10(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/inflate.c
// Function: zd_inflateReset
int ZEXPORT zd_inflateReset(z)
     zd_streamp z;
{
  if (z == ZD_NULL || z->state == ZD_NULL ||
      z->refnum<0 || z->refnum>REFNUM)
    return ZD_STREAM_ERROR;
  z->total_in = z->total_out = 0;
  z->msg = ZD_NULL;
  z->state->mode = z->state->nowrap ? BLOCKS : METHOD;
  inflate_blocks_reset(z->state->blocks, z, ZD_NULL);
  Tracev((stderr, "inflate: reset\n"));
  return ZD_OK;
}

// Assembly:
pushq %rbx
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x41bd
movq %rdi, %rsi
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x41bd
cmpl $0x1, 0x48(%rsi)
ja 0x41bd
xorl %ebx, %ebx
movq %rbx, 0x28(%rsi)
movq %rbx, 0x10(%rsi)
movq %rbx, 0x50(%rsi)
movl 0x18(%rax), %ecx
testl %ecx, %ecx
movl $0x7, %edx
cmovel %ecx, %edx
movl %edx, (%rax)
movq 0x20(%rax), %rdi
xorl %edx, %edx
callq 0x682c
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/inflate.c
// Function: zd_inflateEnd
int ZEXPORT zd_inflateEnd(z)
     zd_streamp z;
{
  if (z == ZD_NULL || z->state == ZD_NULL || z->zfree == ZD_NULL)
    return ZD_STREAM_ERROR;
  if (z->state->blocks != ZD_NULL)
    inflate_blocks_free(z->state->blocks, z);
  ZFREE(z, z->state);
  z->state = ZD_NULL;
  Tracev((stderr, "inflate: end\n"));
  return ZD_OK;
}

// Assembly:
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x420b
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rsi
testq %rsi, %rsi
je 0x420a
movq 0x68(%rbx), %rcx
testq %rcx, %rcx
je 0x420a
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0x41fa
movq %rbx, %rsi
callq 0x75d0
movq 0x58(%rbx), %rsi
movq 0x68(%rbx), %rcx
movq 0x70(%rbx), %rdi
callq *%rcx
movq $0x0, 0x58(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/inflate.c
// Function: zd_inflateInit2_
int ZEXPORT zd_inflateInit2_(z, w, version, stream_size)
     zd_streamp z;
     int w;
     const char *version;
     int stream_size;
{
  if (version == ZD_NULL || version[0] != ZDLIB_VERSION[0] ||
      stream_size != sizeof(zd_stream))
    return ZD_VERSION_ERROR;
  
  /* initialize state */
  if (z == ZD_NULL || z->refnum<0 || z->refnum>REFNUM)
    return ZD_STREAM_ERROR;
  z->msg = ZD_NULL;
  if (z->zalloc == ZD_NULL)
  {
    z->zalloc = zd_zcalloc;
    z->opaque = (voidpf)0;
  }
  if (z->zfree == ZD_NULL) z->zfree = zd_zcfree;
  if ((z->state = (struct zd_internal_state FAR *)
       ZALLOC(z,1,sizeof(struct zd_internal_state))) == ZD_NULL)
    return ZD_MEM_ERROR;
  z->state->blocks = ZD_NULL;

  /* suppress zdlib header or check at compile time */
#ifdef NO_ERROR_CHECK
  z->state->nowrap = 1;
#else
  z->state->nowrap = 0;
#endif

  /* handle undocumented nowrap option (no zdlib header or check) */
  if (w < 0)
  {
    w = - w;
    z->state->nowrap = 1;
  }

  /* set window size */
  if (w < 8 || w > 15)
  {
    zd_inflateEnd(z);
    return ZD_STREAM_ERROR;
  }
  z->state->wbits = (uInt)w;

  /* create inflate_blocks state */
  if ((z->state->blocks =
       inflate_blocks_new(z, z->state->nowrap ? ZD_NULL : zd_adler32,
			  (uInt)1 << w)) == ZD_NULL)
  {
    zd_inflateEnd(z);
    return ZD_MEM_ERROR;
  }
  Tracev((stderr, "inflate: allocated\n"));
  
  /* reset state */
  zd_inflateReset(z);

  return ZD_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0xfffffffa, %ebp       # imm = 0xFFFFFFFA
testq %rdx, %rdx
je 0x4311
cmpl $0x90, %ecx
jne 0x4311
cmpb $0x32, (%rdx)
jne 0x4311
movq %rdi, %rbx
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x4311
cmpl $0x1, 0x48(%rbx)
ja 0x4311
movl %esi, %r14d
movq $0x0, 0x50(%rbx)
movq 0x60(%rbx), %rax
testq %rax, %rax
jne 0x4275
leaq 0x2434(%rip), %rax      # 0x669d
movq %rax, 0x60(%rbx)
movq $0x0, 0x70(%rbx)
cmpq $0x0, 0x68(%rbx)
jne 0x4287
leaq 0x2423(%rip), %rcx      # 0x66a6
movq %rcx, 0x68(%rbx)
movq 0x70(%rbx), %rdi
movl $0x1, %esi
movl $0x28, %edx
callq *%rax
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x430c
movl %r14d, %edx
shrl $0x1f, %edx
movl %r14d, %ecx
negl %ecx
cmovsl %r14d, %ecx
movq $0x0, 0x20(%rax)
movl %edx, 0x18(%rax)
leal -0x10(%rcx), %edx
cmpl $-0x9, %edx
ja 0x42cc
movq %rbx, %rdi
callq 0x41c1
jmp 0x4311
movl %ecx, 0x1c(%rax)
testl %r14d, %r14d
js 0x42dd
leaq 0x23d5(%rip), %rsi      # 0x66b0
jmp 0x42df
xorl %esi, %esi
movl $0x1, %edx
shll %cl, %edx
movq %rbx, %rdi
callq 0x68da
movq 0x58(%rbx), %rcx
movq %rax, 0x20(%rcx)
movq %rbx, %rdi
testq %rax, %rax
je 0x4307
callq 0x4178
xorl %ebp, %ebp
jmp 0x4311
callq 0x41c1
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/inflate.c
// Function: zd_inflateSync
int ZEXPORT zd_inflateSync(z)
zd_streamp z;
{
  uInt n;       /* number of bytes to look at */
  Bytef *p;     /* pointer to bytes */
  uInt m;       /* number of marker bytes found in a row */
  uLong r, w;   /* temporaries to save total_in and total_out */

  /* set up */
  if (z == ZD_NULL || z->state == ZD_NULL)
    return ZD_STREAM_ERROR;
  if (z->state->mode != BAD)
  {
    z->state->mode = BAD;
    z->state->sub.marker = 0;
  }
  if ((n = z->avail_in) == 0)
    return ZD_BUF_ERROR;
  p = z->next_in;
  m = z->state->sub.marker;

  /* search */
  while (n && m < 4)
  {
    static const Byte mark[4] = {0, 0, 0xff, 0xff};
    if (*p == mark[m])
      m++;
    else if (*p)
      m = 0;
    else
      m = 4 - m;
    p++, n--;
  }

  /* restore */
  z->total_in += p - z->next_in;
  z->next_in = p;
  z->avail_in = n;
  z->state->sub.marker = m;

  /* return no joy or set up to restart on a new block */
  if (m != 4)
    return ZD_DATA_ERROR;
  r = z->total_in;  w = z->total_out;
  zd_inflateReset(z);
  z->total_in = r;  z->total_out = w;
  z->state->mode = BLOCKS;
  return ZD_OK;
}

// Assembly:
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x46cb
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rcx
testq %rcx, %rcx
je 0x46c6
cmpl $0xd, (%rcx)
je 0x461b
movl $0xd, (%rcx)
movl $0x0, 0x8(%rcx)
movl 0x8(%rbx), %edi
testl %edi, %edi
je 0x4677
movq (%rbx), %rdx
movq 0x58(%rbx), %rax
movl 0x8(%rax), %ecx
cmpl $0x3, %ecx
ja 0x467e
leaq 0x4b83(%rip), %r8       # 0x91bb
xorl %r9d, %r9d
movq %rdx, %rsi
movb (%rsi), %r11b
movl %ecx, %r14d
movl $0x4, %r10d
subl %ecx, %r10d
testb %r11b, %r11b
cmovnel %r9d, %r10d
cmpb (%r14,%r8), %r11b
je 0x465f
movl %r10d, %ecx
jmp 0x4661
incl %ecx
incq %rsi
leal -0x1(%rdi), %r10d
cmpl $0x1, %edi
je 0x4684
movl %r10d, %edi
cmpl $0x4, %ecx
jb 0x463e
jmp 0x4684
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
jmp 0x46c6
movq %rdx, %rsi
movl %edi, %r10d
movq %rsi, %rdi
subq %rdx, %rdi
addq %rdi, 0x10(%rbx)
movq %rsi, (%rbx)
movl %r10d, 0x8(%rbx)
movl %ecx, 0x8(%rax)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl $0x4, %ecx
jne 0x46c6
movq 0x10(%rbx), %r14
movq 0x28(%rbx), %r15
movq %rbx, %rdi
callq 0x4178
movq %r14, 0x10(%rbx)
movq %r15, 0x28(%rbx)
movq 0x58(%rbx), %rax
movl $0x7, (%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/trees.c
// Function: zd_tr_stored_block
void zd_tr_stored_block(s, buf, stored_len, eof)
     deflate_state *s;
     charf *buf;       /* input block */
     ulg stored_len;   /* length of input block */
     int eof;          /* true if this is the last block for a file */
{
  send_bits(s, (STORED_BLOCK<<1)+eof, 3);  /* send block type */
#ifdef DEBUG
  s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
  s->compressed_len += (stored_len + 4) << 3;
#endif
  copy_block(s, buf, (unsigned)stored_len, 1); /* with header */


  /* zdelta: restore the pointers in the reference window
   * currently there is no explicity mechanism to way to provide the 
   * decompressor with the positions of these pointers; 
   * when a non-empty store block is emitted, we should restore the pointer
   * states before the start of that block - that is where the decompressor
   * will expect them to be!
   */
  if(stored_len){ 
    s->rwptr[0]  = s->rwptr_save[0];
    s->rwptr[1]  = s->rwptr_save[1];
    s->stable[0] = s->stable_save[0];
    s->stable[1] = s->stable_save[1];
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %ecx, %eax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0x1a74(%rdi), %edx
movl %ecx, %esi
movl %edx, %ecx
shll %cl, %esi
orw 0x1a70(%rdi), %si
movw %si, 0x1a70(%rdi)
cmpl $0xe, %edx
jl 0x4cc7
movq 0x10(%rbx), %rcx
movslq 0x28(%rbx), %rdx
leal 0x1(%rdx), %edi
movl %edi, 0x28(%rbx)
movb %sil, (%rcx,%rdx)
movb 0x1a71(%rbx), %cl
movq 0x10(%rbx), %rdx
movslq 0x28(%rbx), %rsi
leal 0x1(%rsi), %edi
movl %edi, 0x28(%rbx)
movb %cl, (%rdx,%rsi)
movzwl %ax, %eax
movl 0x1a74(%rbx), %edx
movb $0x10, %cl
subb %dl, %cl
shrl %cl, %eax
movw %ax, 0x1a70(%rbx)
addl $-0xd, %edx
jmp 0x4cca
addl $0x3, %edx
movl %edx, 0x1a74(%rbx)
movq %rbx, %rdi
callq 0x5f5a
movl $0x8, 0x1a6c(%rbx)
movq 0x10(%rbx), %rax
movslq 0x28(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movq %r15, %rsi
movb %sil, (%rax,%rcx)
movq 0x10(%rbx), %rax
movslq 0x28(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movq %r15, %rdx
movb %dh, (%rax,%rcx)
movl %edx, %eax
xorl $0xffff, %eax           # imm = 0xFFFF
movq 0x10(%rbx), %rcx
movslq 0x28(%rbx), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movq 0x10(%rbx), %rcx
movslq 0x28(%rbx), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %ah, (%rcx,%rdx)
movq %r15, %rcx
testl %ecx, %ecx
je 0x4d5c
xorl %eax, %eax
movb (%r14,%rax), %cl
movq 0x10(%rbx), %rdx
movslq 0x28(%rbx), %rsi
leal 0x1(%rsi), %edi
movl %edi, 0x28(%rbx)
movb %cl, (%rdx,%rsi)
movq %r15, %rcx
incq %rax
cmpl %eax, %ecx
jne 0x4d3d
testq %rcx, %rcx
je 0x4d7d
movups 0x1a90(%rbx), %xmm0
movups %xmm0, 0x1a78(%rbx)
movq 0x1aa0(%rbx), %rax
movq %rax, 0x1a88(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/trees.c
// Function: bi_flush
local void bi_flush(s)
     deflate_state *s;
{
  if (s->bi_valid == 16) {
    put_short(s, s->bi_buf);
    s->bi_buf = 0;
    s->bi_valid = 0;
  } else if (s->bi_valid >= 8) {
    put_byte(s, (Byte)s->bi_buf);
    s->bi_buf >>= 8;
    s->bi_valid -= 8;
  }
}

// Assembly:
movl 0x1a74(%rdi), %eax
cmpl $0x10, %eax
jne 0x4f9d
movb 0x1a70(%rdi), %al
movq 0x10(%rdi), %rcx
movslq 0x28(%rdi), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movb 0x1a71(%rdi), %al
movq 0x10(%rdi), %rcx
movslq 0x28(%rdi), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movw $0x0, 0x1a70(%rdi)
xorl %eax, %eax
jmp 0x4fd0
cmpl $0x8, %eax
jl 0x4fd6
movb 0x1a70(%rdi), %al
movq 0x10(%rdi), %rcx
movslq 0x28(%rdi), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movzbl 0x1a71(%rdi), %eax
movw %ax, 0x1a70(%rdi)
movl 0x1a74(%rdi), %eax
addl $-0x8, %eax
movl %eax, 0x1a74(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/trees.c
// Function: pqdownheap
local void pqdownheap(s, tree, k)
    deflate_state *s;
    ct_data *tree;  /* the tree to restore */
    int k;               /* node to move down */
{
  int v = s->heap[k];
  int j = k << 1;  /* left son of k */
  while (j <= s->heap_len) {
    /* Set j to the smallest of the two sons: */
    if (j < s->heap_len &&
	smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
      j++;
    }
    /* Exit if v is smaller than both sons */
    if (smaller(tree, v, s->heap[j], s->depth)) break;
    
    /* Exchange v with the smallest son */
    s->heap[k] = s->heap[j];  k = j;
    
    /* And continue down the tree, setting j to the left son of k */
    j <<= 1;
  }
  s->heap[k] = v;
}

// Assembly:
movl %edx, %eax
movl 0xef0(%rdi,%rax,4), %eax
leal (%rdx,%rdx), %r8d
movl 0x17ec(%rdi), %r10d
cmpl %r10d, %r8d
jle 0x5fe8
movl %edx, %r9d
jmp 0x609a
pushq %rbp
pushq %r14
pushq %rbx
movslq %eax, %rcx
cmpl %r10d, %r8d
jge 0x6025
movl %r8d, %r11d
orl $0x1, %r11d
movslq %r11d, %rbx
movslq 0xef0(%rdi,%rbx,4), %r9
movslq %r8d, %r10
movslq 0xef0(%rdi,%r10,4), %r14
movzwl (%rsi,%r14,4), %ebp
cmpw %bp, (%rsi,%r9,4)
jae 0x607a
movq %rbx, %r10
movl %r11d, %r9d
jmp 0x602b
movslq %r8d, %r10
movl %r8d, %r9d
movl 0xef0(%rdi,%r10,4), %r8d
movslq %r8d, %r10
movzwl (%rsi,%r10,4), %r11d
cmpw %r11w, (%rsi,%rcx,4)
jb 0x6093
jne 0x6056
movb 0x17f4(%rdi,%rcx), %r11b
cmpb 0x17f4(%rdi,%r10), %r11b
jbe 0x6093
movslq %edx, %rdx
movl %r8d, 0xef0(%rdi,%rdx,4)
leal (%r9,%r9), %r8d
movl 0x17ec(%rdi), %r10d
movl %r9d, %edx
cmpl %r10d, %r8d
jle 0x5fef
jmp 0x6096
jne 0x6028
movb 0x17f4(%rdi,%r9), %bpl
movl %r8d, %r9d
cmpb 0x17f4(%rdi,%r14), %bpl
jbe 0x601d
jmp 0x602b
movl %edx, %r9d
popq %rbx
popq %r14
popq %rbp
movslq %r9d, %rcx
movl %eax, 0xef0(%rdi,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/trees.c
// Function: scan_tree
local void scan_tree (s, tree, max_code)
     deflate_state *s;
     ct_data *tree;   /* the tree to be scanned */
     int max_code;    /* and its largest code of non zero frequency */
{
  int n;                     /* iterates over all tree elements  */
  int prevlen = -1;          /* last emitted length              */
  int curlen;                /* length of current code           */
  int nextlen = tree[0].Len; /* length of next code              */
  int count = 0;             /* repeat count of the current code */
  int max_count = 7;         /* max repeat count                 */
  int min_count = 4;         /* min repeat count                 */
    
  if (nextlen == 0) max_count = 138, min_count = 3;
  tree[max_code+1].Len = (ush)0xffff; /* guard */

  for (n = 0; n <= max_code; n++) {
    curlen = nextlen; nextlen = tree[n+1].Len;
    if (++count < max_count && curlen == nextlen) {
      continue;
    } else if (count < min_count) {
      s->bl_tree[curlen].Freq += count;
    } else if (curlen != 0) {
      if (curlen != prevlen) s->bl_tree[curlen].Freq++;
      s->bl_tree[REP_3_6].Freq++;
    } else if (count <= 10) {
      s->bl_tree[REPZ_3_10].Freq++;
    } else {
      s->bl_tree[REPZ_11_138].Freq++;
    }
    count = 0; prevlen = curlen;
    if (nextlen == 0) {
      max_count = 138, min_count = 3;
    } else if (curlen == nextlen) {
      max_count = 6, min_count = 3;
    } else {
      max_count = 7, min_count = 4;
    }
  }
}

// Assembly:
movzwl 0x2(%rsi), %eax
movslq %edx, %rcx
movw $0xffff, 0x6(%rsi,%rcx,4) # imm = 0xFFFF
testl %ecx, %ecx
js 0x618a
pushq %r14
pushq %rbx
xorl %r9d, %r9d
testl %eax, %eax
setne %r9b
movl $0x8a, %ecx
movl $0x7, %r10d
cmovel %ecx, %r10d
addl $0x3, %r9d
incl %edx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
xorl %r14d, %r14d
movl %eax, %r8d
movzwl 0x6(%rsi,%rcx,4), %eax
leal 0x1(%r14), %r11d
cmpl %r10d, %r11d
jge 0x6101
cmpl %eax, %r8d
jne 0x6101
movl %ebx, %r8d
jmp 0x6175
cmpl %r9d, %r11d
jge 0x6114
movl %r8d, %r9d
addw %r11w, 0xd90(%rdi,%r9,4)
jmp 0x6149
testl %r8d, %r8d
je 0x6133
cmpl %ebx, %r8d
je 0x612a
movl %r8d, %r9d
incw 0xd90(%rdi,%r9,4)
incw 0xdd0(%rdi)
jmp 0x6149
cmpl $0x9, %r14d
jg 0x6142
incw 0xdd4(%rdi)
jmp 0x6149
incw 0xdd8(%rdi)
xorl %r11d, %r11d
testl %eax, %eax
je 0x6169
xorl %r10d, %r10d
cmpl %eax, %r8d
sete %r10b
movl $0x4, %r9d
subl %r10d, %r9d
xorl $0x7, %r10d
jmp 0x6175
movl $0x3, %r9d
movl $0x8a, %r10d
incq %rcx
movl %r11d, %r14d
movl %r8d, %ebx
cmpq %rcx, %rdx
jne 0x60e6
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/adler32.c
// Function: zd_adler32
uLong ZEXPORT zd_adler32(adler, buf, len)
    uLong adler;
    const Bytef *buf;
    uInt len;
{
    unsigned long s1 = adler & 0xffff;
    unsigned long s2 = (adler >> 16) & 0xffff;
    int k;

    if (buf == ZD_NULL) return 1L;

    while (len > 0) {
        k = len < NMAX ? len : NMAX;
        len -= k;
        while (k >= 16) {
            DO16(buf);
	    buf += 16;
            k -= 16;
        }
        if (k != 0) do {
            s1 += *buf++;
	    s2 += s1;
        } while (--k);
        s1 %= BASE;
        s2 %= BASE;
    }
    return (s2 << 16) | s1;
}

// Assembly:
testq %rsi, %rsi
je 0x6821
movl %edx, %r8d
movl %edi, %ecx
shrl $0x10, %ecx
movzwl %di, %edi
testl %edx, %edx
je 0x6818
pushq %rbx
movl $0x15b0, %r9d           # imm = 0x15B0
movabsq $0xf00e10d2fc5cd, %r10  # imm = 0xF00E10D2FC5CD
cmpl %r9d, %r8d
movl $0x15b0, %eax           # imm = 0x15B0
cmovbl %r8d, %eax
movl %eax, %edx
cmpl $0x10, %r8d
jb 0x67b0
movzbl (%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x1(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x2(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x3(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x4(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x5(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x6(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x7(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x8(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x9(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0xa(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0xb(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0xc(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0xd(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0xe(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0xf(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
addq $0x10, %rsi
addl $-0x10, %edx
cmpl $0xf, %edx
ja 0x66f5
testl %edx, %edx
je 0x67cb
movl %edx, %edx
xorl %r11d, %r11d
movzbl (%rsi,%r11), %ebx
addq %rbx, %rdi
addq %rdi, %rcx
incq %r11
cmpl %r11d, %edx
jne 0x67b5
addq %rdx, %rsi
subl %eax, %r8d
movq %rdi, %rax
mulq %r10
movq %rdi, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0xf, %rax
imulq $0xfff1, %rax, %rax     # imm = 0xFFF1
subq %rax, %rdi
movq %rcx, %rax
mulq %r10
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0xf, %rax
imulq $0xfff1, %rax, %rax     # imm = 0xFFF1
subq %rax, %rcx
testl %r8d, %r8d
jne 0x66dd
popq %rbx
shlq $0x10, %rcx
orq %rdi, %rcx
jmp 0x6826
movl $0x1, %ecx
movq %rcx, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/infblock.c
// Function: inflate_blocks_reset
void inflate_blocks_reset(s, z, c)
inflate_blocks_statef *s;
zd_streamp z;
uLongf *c;
{
  int i;
  if (c != ZD_NULL)
    *c = s->check;
  if (s->mode == BTREE || s->mode == DTREE)
    ZFREE(z, s->sub.trees.blens);
  if (s->mode == CODES)
    inflate_codes_free(s->sub.decode.codes, z);
  s->mode = TYPE;
  s->bitk = 0;
  s->bitb = 0;
  s->read = s->write = s->window;
  if (s->checkfn != ZD_NULL)
    z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)ZD_NULL, 0);
  Tracev((stderr, "inflate:   blocks reset\n"));

  /* zdelta: initialize reference window pointers 
   * this should be called only ONCE during the inflation process
   */
  for(i=0; i< 2*z->refnum; ++i){
    s->rwptr[i]  = 0;
    s->stable[i] = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x6842
movq 0x68(%rbx), %rax
movq %rax, (%rdx)
movl (%rbx), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x4, %ecx
jne 0x685c
movq 0x70(%r14), %rdi
movq 0x10(%rbx), %rsi
callq *0x68(%r14)
movl (%rbx), %eax
cmpl $0x6, %eax
jne 0x686d
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x8116
xorl %eax, %eax
movl %eax, (%rbx)
movl %eax, 0x2c(%rbx)
movq $0x0, 0x30(%rbx)
movq 0x40(%rbx), %rcx
movq 0x60(%rbx), %rax
movq %rcx, 0x58(%rbx)
movq %rcx, 0x50(%rbx)
testq %rax, %rax
je 0x68a4
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq *%rax
movq %rax, 0x68(%rbx)
movq %rax, 0x80(%r14)
movl 0x48(%r14), %ecx
testl %ecx, %ecx
jle 0x68d2
addl %ecx, %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
xorl %ecx, %ecx
xorl %edx, %edx
movq %rcx, 0x70(%rbx,%rdx,8)
movq %rcx, 0x80(%rbx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x68bd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/inftrees.c
// Function: inflate_trees_bits
int inflate_trees_bits(c, bb, tb, hp, z)
uIntf *c;               /* 19 code lengths */
uIntf *bb;              /* bits tree desired/actual depth */
inflate_huft * FAR *tb; /* bits tree result */
inflate_huft *hp;       /* space for trees */
zd_streamp z;            /* for messages */
{
  int r;
  uInt hn = 0;          /* hufts used in space */
  uIntf *v;             /* work area for huft_build */

  if ((v = (uIntf*)ZALLOC(z, 19, sizeof(uInt))) == ZD_NULL)
    return ZD_MEM_ERROR;
  r = huft_build(c, 19, 19, (uIntf*)ZD_NULL, (uIntf*)ZD_NULL,
                 tb, bb, hp, &hn, v);
  if (r == ZD_DATA_ERROR)
    z->msg = (char*)"oversubscribed dynamic bit lengths tree";
  else if (r == ZD_BUF_ERROR || *bb == 0)
  {
    z->msg = (char*)"incomplete dynamic bit lengths tree";
    r = ZD_DATA_ERROR;
  }
  ZFREE(z, v);
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbp
movl $0x0, 0x4(%rsp)
movq 0x70(%r8), %rdi
movl $0x13, %esi
movl $0x4, %edx
callq *0x60(%r8)
testq %rax, %rax
je 0x85f7
movq %rax, %r14
leaq 0x4(%rsp), %rax
movq %rbp, %rdi
movl $0x13, %esi
movl $0x13, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r13, %r9
pushq %r14
pushq %rax
pushq %r12
pushq %r15
callq 0x862f
addq $0x20, %rsp
cmpl $-0x5, %eax
je 0x8604
movl %eax, %ebp
cmpl $-0x3, %eax
jne 0x85fe
leaq 0x28bb(%rip), %rax      # 0xaeb0
jmp 0x860b
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
jmp 0x861e
cmpl $0x0, (%r15)
jne 0x8614
leaq 0x28cd(%rip), %rax      # 0xaed8
movq %rax, 0x50(%rbx)
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
movq 0x70(%rbx), %rdi
movq %r14, %rsi
callq *0x68(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/snej[P]zdelta/infutil.c
// Function: inflate_flush
int inflate_flush(s, z, r)
inflate_blocks_statef *s;
zd_streamp z;
int r;
{
  uInt n;
  Bytef *p;
  Bytef *q;

  /* local copies of source and destination pointers */
  p = z->next_out;
  q = s->read;

  /* compute number of bytes to copy as far as end of window */
  n = (uInt)((q <= s->write ? s->write : s->end) - q);
  if (n > z->avail_out) n = z->avail_out;
  if (n && r == ZD_BUF_ERROR) r = ZD_OK;

  /* update counters */
  z->avail_out -= n;
  z->total_out += n;

  /* update check information */
  if (s->checkfn != ZD_NULL)
    z->adler = s->check = (*s->checkfn)(s->check, q, n);

  /* copy as far as end of window */
  zmemcpy(p, q, n);
  p += n;
  q += n;

  /* see if more to copy at beginning of window */
  if (q == s->end)
  {
    /* wrap pointers */
    q = s->window;
    if (s->write == s->end)
      s->write = s->window;

    /* compute bytes to copy */
    n = (uInt)(s->write - q);
    if (n > z->avail_out) n = z->avail_out;
    if (n && r == ZD_BUF_ERROR) r = ZD_OK;

    /* update counters */
    z->avail_out -= n;
    z->total_out += n;

    /* update check information */
    if (s->checkfn != ZD_NULL)
      z->adler = s->check = (*s->checkfn)(s->check, q, n);

    /* copy */
    zmemcpy(p, q, n);
    p += n;
    q += n;
  }

  /* update pointers */
  z->next_out = p;
  s->read = q;

  /* done */
  return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rdi), %r12
movq 0x58(%rdi), %r13
cmpq %r13, %r12
jbe 0x8c86
movq 0x48(%rbx), %r13
movq 0x18(%r14), %rbp
subl %r12d, %r13d
movl 0x20(%r14), %eax
cmpl %r13d, %eax
cmovbl %eax, %r13d
xorl %r15d, %r15d
testl %r13d, %r13d
cmovel %edx, %r15d
cmpl $-0x5, %edx
cmovnel %edx, %r15d
subl %r13d, %eax
movl %eax, 0x20(%r14)
addq %r13, 0x28(%r14)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x8cd4
movq 0x68(%rbx), %rdi
movq %r12, %rsi
movl %r13d, %edx
callq *%rax
movq %rax, 0x68(%rbx)
movq %rax, 0x80(%r14)
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10f0
addq %r13, %rbp
addq %r13, %r12
cmpq 0x48(%rbx), %r12
je 0x8cf3
movl %r15d, %r13d
jmp 0x8d6f
movq %rbp, (%rsp)
movq 0x40(%rbx), %rax
movq 0x58(%rbx), %rbp
cmpq %r12, %rbp
movq %rax, %r12
jne 0x8d0e
movq %r12, 0x58(%rbx)
movq %r12, %rbp
subl %r12d, %ebp
movl 0x20(%r14), %eax
cmpl %ebp, %eax
cmovbl %eax, %ebp
xorl %r13d, %r13d
testl %ebp, %ebp
cmovel %r15d, %r13d
cmpl $-0x5, %r15d
cmovnel %r15d, %r13d
subl %ebp, %eax
movl %eax, 0x20(%r14)
addq %rbp, 0x28(%r14)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x8d54
movq 0x68(%rbx), %rdi
movq %r12, %rsi
movl %ebp, %edx
callq *%rax
movq %rax, 0x68(%rbx)
movq %rax, 0x80(%r14)
movq (%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x10f0
addq %rbp, %r15
addq %rbp, %r12
movq %r15, %rbp
movq %rbp, 0x18(%r14)
movq %r12, 0x50(%rbx)
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Genymobile[P]hiredis/test.c
// Function: connect
static redisContext *connect(struct config config) {
    redisContext *c = NULL;

    if (config.type == CONN_TCP) {
        c = redisConnect(config.tcp.host, config.tcp.port);
    } else if (config.type == CONN_UNIX) {
        printf("Unix connection not supported\n");
        exit(1);
    } else if (config.type == CONN_FD) {
        printf("Unix connection not supported\n");
        exit(1);
    } else {
        assert(NULL);
    }

    if (c == NULL) {
        printf("Connection error: can't allocate redis context\n");
        exit(1);
    } else if (c->err) {
        printf("Connection error: %s\n", c->errstr);
        redisFree(c);
        exit(1);
    }

    return select_database(c);
}

// Assembly:
pushq %rbx
movl 0x10(%rsp), %eax
testl %eax, %eax
jne 0x4e7c
leaq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %esi
callq 0x5d16
testq %rax, %rax
je 0x4eb7
movq %rax, %rbx
cmpl $0x0, (%rax)
jne 0x4ecd
leaq 0x5e92(%rip), %rsi      # 0xacc0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x655d
testq %rax, %rax
je 0x4eec
movq %rax, %rdi
callq 0x4fb0
leaq 0x5eb5(%rip), %rsi      # 0xad05
movq %rbx, %rdi
xorl %eax, %eax
callq 0x655d
testq %rax, %rax
je 0x4f0b
cmpl $0x3, (%rax)
jne 0x4e8f
cmpq $0x0, 0x8(%rax)
jne 0x4e8f
movq %rax, %rdi
callq 0x4fb0
movq %rbx, %rax
popq %rbx
retq
cmpl $0x1, %eax
je 0x4e86
cmpl $0x2, %eax
jne 0x4e98
leaq 0x63f2(%rip), %rdi      # 0xb27f
jmp 0x4ebe
leaq 0x6436(%rip), %rdi      # 0xb2cc
jmp 0x4ebe
leaq 0x696f(%rip), %rdi      # 0xb80e
leaq 0x59d4(%rip), %rsi      # 0xa87a
leaq 0x5dd8(%rip), %rcx      # 0xac85
movl $0x6a, %edx
callq 0x2140
leaq 0x63df(%rip), %rdi      # 0xb29d
callq 0x2090
movl $0x1, %edi
callq 0x2290
movq %rbx, %rsi
addq $0x4, %rsi
leaq 0x5dcf(%rip), %rdi      # 0xacaa
xorl %eax, %eax
callq 0x2100
movq %rbx, %rdi
callq 0x5b72
jmp 0x4ec3
leaq 0x5dd6(%rip), %rdi      # 0xacc9
leaq 0x5980(%rip), %rsi      # 0xa87a
leaq 0x5dd6(%rip), %rcx      # 0xacd7
movl $0x3b, %edx
callq 0x2140
leaq 0x5db7(%rip), %rdi      # 0xacc9
leaq 0x5961(%rip), %rsi      # 0xa87a
leaq 0x5db7(%rip), %rcx      # 0xacd7
movl $0x40, %edx
callq 0x2140
// File: /workspace/github_c_makefile_star2_O3/Genymobile[P]hiredis/test.c
// Function: disconnect
static int disconnect(redisContext *c, int keep_fd) {
    redisReply *reply;

    /* Make sure we're on DB 9. */
    reply = redisCommand(c,"SELECT 9");
    assert(reply != NULL);
    freeReplyObject(reply);
    reply = redisCommand(c,"FLUSHDB");
    assert(reply != NULL);
    freeReplyObject(reply);

    /* Free the context as well, but keep the fd if requested. */
    if (keep_fd)
        return redisFreeKeepFd(c);
    redisFree(c);
    return -1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x5d8b(%rip), %rsi      # 0xacc0
xorl %eax, %eax
callq 0x655d
testq %rax, %rax
je 0x4f70
movq %rax, %rdi
callq 0x4fb0
leaq 0x5de0(%rip), %rsi      # 0xad30
movq %rbx, %rdi
xorl %eax, %eax
callq 0x655d
testq %rax, %rax
je 0x4f8f
movq %rax, %rdi
callq 0x4fb0
movq %rbx, %rdi
popq %rbx
jmp 0x5b72
leaq 0x5d52(%rip), %rdi      # 0xacc9
leaq 0x58fc(%rip), %rsi      # 0xa87a
leaq 0x5d87(%rip), %rcx      # 0xad0c
movl $0x51, %edx
callq 0x2140
leaq 0x5d33(%rip), %rdi      # 0xacc9
leaq 0x58dd(%rip), %rsi      # 0xa87a
leaq 0x5d68(%rip), %rcx      # 0xad0c
movl $0x54, %edx
callq 0x2140
nop
// File: /workspace/github_c_makefile_star2_O3/Genymobile[P]hiredis/hiredis.c
// Function: redisFree
void redisFree(redisContext *c) {
    if (c == NULL)
        return;
    if (c->fd > 0)
#ifdef _WIN32
        closesocket(c->fd);
#else
        close(c->fd);
#endif
    if (c->obuf != NULL)
        sdsfree(c->obuf);
    if (c->reader != NULL)
        redisReaderFree(c->reader);
    if (c->tcp.host)
        free(c->tcp.host);
    if (c->tcp.source_addr)
        free(c->tcp.source_addr);
    if (c->unix_sock.path)
        free(c->unix_sock.path);
    if (c->timeout)
        free(c->timeout);
    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x5bfd
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rdi), %edi
testl %edi, %edi
jle 0x5b8e
callq 0x2160
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x5b9f
callq 0x696f
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x5bb0
callq 0x8012
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
je 0x5bc1
callq 0x2040
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0x5bd2
callq 0x2040
movq 0xc8(%rbx), %rdi
testq %rdi, %rdi
je 0x5be3
callq 0x2040
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x5bf4
callq 0x2040
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O3/Genymobile[P]hiredis/hiredis.c
// Function: redisBufferWrite
int redisBufferWrite(redisContext *c, int *done) {
    int nwritten;

    /* Return early when the context has seen an error. */
    if (c->err)
        return REDIS_ERR;

    if (sdslen(c->obuf) > 0) {
#if _WIN32
        nwritten = send(c->fd,c->obuf,sdslen(c->obuf), 0);
#else
        nwritten = write(c->fd,c->obuf,sdslen(c->obuf));
#endif
        if (nwritten == -1) {
            if ((errno == EAGAIN && !(c->flags & REDIS_BLOCK)) || (errno == EINTR)) {
                /* Try again later */
            } else {
                __redisSetError(c,REDIS_ERR_IO,NULL);
                return REDIS_ERR;
            }
        } else if (nwritten > 0) {
            if (nwritten == (signed)sdslen(c->obuf)) {
                sdsfree(c->obuf);
                c->obuf = sdsempty();
            } else {
                sdsrange(c->obuf,nwritten,-1);
            }
        }
    }
    if (done != NULL) *done = (sdslen(c->obuf) == 0);
    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x0, (%rdi)
jne 0x6172
movq %rsi, %r14
movq %rdi, %rbx
movq 0x90(%rdi), %rsi
movslq -0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x6158
movl 0x84(%rbx), %edi
callq 0x20d0
cmpl $-0x1, %eax
je 0x610e
testl %eax, %eax
jle 0x6158
movq 0x90(%rbx), %rdi
cmpl %eax, -0x8(%rdi)
jne 0x614c
callq 0x696f
callq 0x68cf
movq %rax, 0x90(%rbx)
jmp 0x6158
callq 0x2060
movl (%rax), %ecx
cmpl $0x4, %ecx
je 0x6158
cmpl $0xb, %ecx
jne 0x6128
testb $0x1, 0x88(%rbx)
je 0x6158
movl $0x1, (%rbx)
addq $0x4, %rbx
movl (%rax), %ecx
leaq 0x53a0(%rip), %rdx      # 0xb4db
movl $0x80, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2110
jmp 0x6172
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7335
xorl %ebp, %ebp
testq %r14, %r14
je 0x6172
movq 0x90(%rbx), %rax
xorl %ecx, %ecx
cmpl $0x0, -0x8(%rax)
sete %cl
movl %ecx, (%r14)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Genymobile[P]hiredis/net.c
// Function: redisSetBlocking
static int redisSetBlocking(redisContext *c, int blocking) {
#ifdef _WIN32
    int iResult;
    unsigned long flag;
    if (blocking)
        flag = 0;
    else
        flag = 1;
    iResult = ioctlsocket(c->fd, FIONBIO, &flag);
    if (iResult != NO_ERROR)
    {
        SETERRNO;
        __redisSetErrorFromErrno(c,REDIS_ERR_IO,"fcntl(F_SETFL)");
        redisContextCloseFd(c->fd);
        return REDIS_ERR;
    }
#else
    int flags;

    /* Set the socket nonblocking.
     * Note that fcntl(2) for F_GETFL and F_SETFL can't be
     * interrupted by a signal. */
    if ((flags = fcntl(c->fd, F_GETFL)) == -1) {
        __redisSetErrorFromErrno(c,REDIS_ERR_IO,"fcntl(F_GETFL)");
        redisContextCloseFd(c);
        return REDIS_ERR;
    }

    if (blocking)
        flags &= ~O_NONBLOCK;
    else
        flags |= O_NONBLOCK;

    if (fcntl(c->fd, F_SETFL, flags) == -1) {
        __redisSetErrorFromErrno(c,REDIS_ERR_IO,"fcntl(F_SETFL)");
        redisContextCloseFd(c);
        return REDIS_ERR;
    }
#endif
    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movl 0x84(%rdi), %edi
xorl %ebp, %ebp
movl $0x3, %esi
xorl %eax, %eax
callq 0x20c0
cmpl $-0x1, %eax
je 0x923e
xorl %edx, %edx
testl %r14d, %r14d
sete %dl
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
shll $0xb, %edx
orl %eax, %edx
movl 0x84(%rbx), %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x20c0
cmpl $-0x1, %eax
jne 0x926b
leaq 0x27d2(%rip), %rsi      # 0xba0e
jmp 0x9245
leaq 0x27ba(%rip), %rsi      # 0xb9ff
movq %rbx, %rdi
callq 0x8b0c
movl 0x84(%rbx), %edi
testl %edi, %edi
js 0x9266
callq 0x2160
movl $0xffffffff, 0x84(%rbx) # imm = 0xFFFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./regex.c
// Function: regex
regex_t*
regex(const char *pattern)
{
	int i = 0;
	unsigned int hash = 0;
	regex_t *re = NULL;
	RegexCache *rc = NULL;

	while (pattern[i])
	{
		hash = 33 * hash + pattern[i++];
	}

	// have we compiled this regex before?
	for (i = 0; i < REGEX_CACHE; i++)
	{
		rc = &regex_cache[i];
		if (rc->hash == hash && rc->pattern && !strcmp(pattern, rc->pattern))
		{
			re = &rc->regex;
			rc->used++;
			break;
		}
	}
	if (!re)
	{
		int slot = 0;
		// look for a free cache slot
		for (i = 0; i < REGEX_CACHE; i++)
		{
			if (!regex_cache[i].pattern)
			{
				slot = i;
				break;
			}
		}
		if (regex_cache[slot].pattern)
		{
			// choose the least used
			for (i = 0; i < REGEX_CACHE; i++)
			{
				if (regex_cache[i].used < regex_cache[slot].used)
				{
					slot = i;
					break;
				}
			}
		}

		rc = &regex_cache[slot];

		if (rc->pattern)
		{
			regfree(&rc->regex);
			free(rc->pattern);
		}

		rc->used = 0;
		rc->hash = 0;
		rc->pattern = NULL;

		re = &rc->regex;

		if (regcomp(re, pattern, REG_EXTENDED) != 0)
		{
			fprintf(stderr, "regex compile failure: %s", pattern);
			re = NULL;
		}
		if (re)
		{
			rc->pattern = strdup(pattern);
			rc->hash = hash;
			rc->used = 1;
		}
	}
	return re;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %al
testb %al, %al
je 0x3f89
leaq 0x1(%rbx), %rcx
xorl %ebp, %ebp
movl %ebp, %edx
shll $0x5, %edx
addl %ebp, %edx
movsbl %al, %ebp
addl %edx, %ebp
movb (%rcx), %al
incq %rcx
testb %al, %al
jne 0x3f72
jmp 0x3f8b
xorl %ebp, %ebp
xorl %r15d, %r15d
leaq 0xa91b(%rip), %r14      # 0xe8b0
cmpl %ebp, (%r15,%r14)
jne 0x3fb5
movq 0x8(%r15,%r14), %rsi
testq %rsi, %rsi
je 0x3fb5
movq %rbx, %rdi
callq 0x3470
testl %eax, %eax
je 0x4078
addq $0x58, %r15
cmpq $0x2c0, %r15            # imm = 0x2C0
jne 0x3f95
leaq 0xa8ef(%rip), %rcx      # 0xe8b8
xorl %eax, %eax
cmpq $0x0, (%rcx)
je 0x3fe0
incq %rax
addq $0x58, %rcx
cmpq $0x8, %rax
jne 0x3fcb
xorl %eax, %eax
movl %eax, %ecx
imulq $0x58, %rcx, %rcx
cmpq $0x0, 0x8(%rcx,%r14)
je 0x4012
addq %r14, %rcx
movl 0x50(%rcx), %edx
leaq 0xa905(%rip), %rsi      # 0xe900
xorl %ecx, %ecx
cmpl %edx, (%rsi)
jb 0x4010
incq %rcx
addq $0x58, %rsi
cmpq $0x8, %rcx
jne 0x3ffd
jmp 0x4012
movl %ecx, %eax
cltq
imulq $0x58, %rax, %rax
leaq (%r14,%rax), %r15
cmpq $0x0, 0x8(%rax,%r14)
je 0x4036
leaq 0x10(%r15), %rdi
callq 0x34d0
movq 0x8(%r15), %rdi
callq 0x3220
xorl %eax, %eax
movl %eax, 0x50(%r15)
movl %eax, (%r15)
movq $0x0, 0x8(%r15)
leaq 0x10(%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x3360
testl %eax, %eax
jne 0x4091
movq %rbx, %rdi
callq 0x3430
movq %rax, 0x8(%r15)
movl %ebp, (%r15)
movl $0x1, 0x50(%r15)
jmp 0x4083
addq %r15, %r14
addq $0x10, %r14
incl 0x40(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x9f50(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
leaq 0x6076(%rip), %rsi      # 0xa118
xorl %r14d, %r14d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3660
jmp 0x4083
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./regex.c
// Function: regex_cache_empty
void
regex_cache_empty()
{
	for (int i = 0; i < REGEX_CACHE; i++)
	{
		RegexCache *rc = &regex_cache[i];
		if (rc->pattern)
		{
			regfree(&rc->regex);
			free(rc->pattern);
			rc->used = 0;
			rc->hash = 0;
			rc->pattern = NULL;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r14d, %r14d
leaq 0xa7da(%rip), %r15      # 0xe8b0
xorl %r12d, %r12d
cmpq $0x0, 0x8(%r12,%r15)
je 0x410a
leaq (%r12,%r15), %rbx
addq $0x10, %rbx
movq %rbx, %rdi
callq 0x34d0
movq -0x8(%rbx), %rdi
callq 0x3220
movl %r14d, 0x40(%rbx)
movl %r14d, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
addq $0x58, %r12
cmpq $0x2c0, %r12            # imm = 0x2C0
jne 0x40d9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./regex.c
// Function: regex_match
int
regex_match(const char *pattern, const char *subject)
{
	int r = 0; regmatch_t pmatch[REGEX_GROUPS];
	regex_t *re = regex(pattern);
	if (re && subject && (r = regexec(re, subject, REGEX_GROUPS, pmatch, 0) == 0))
	{
		for (int i = 0; i < REGEX_GROUPS && pmatch[i].rm_so != (size_t)-1; i++)
		{
			free(regex_matches[i]);
			int len = pmatch[i].rm_eo - pmatch[i].rm_so;
			regex_matches[i] = malloc(len + 1);
			strncpy(regex_matches[i], subject + pmatch[i].rm_so, len);
			regex_matches[i][len] = 0;
		}
	}
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
callq 0x3f5c
testq %rax, %rax
sete %cl
movq %rbx, 0x8(%rsp)
testq %rbx, %rbx
sete %dl
xorl %ebp, %ebp
orb %cl, %dl
jne 0x41d5
leaq 0x10(%rsp), %rcx
xorl %ebp, %ebp
movl $0x8, %edx
movq %rax, %rdi
movq 0x8(%rsp), %rsi
xorl %r8d, %r8d
callq 0x3180
testl %eax, %eax
jne 0x41d5
xorl %r13d, %r13d
movl $0x1, %ebp
cmpl $-0x1, 0x10(%rsp,%r13)
je 0x41d5
leaq 0xa9e5(%rip), %rbx      # 0xeb70
movq (%r13,%rbx), %rdi
callq 0x3220
movslq 0x14(%rsp,%r13), %r14
movslq 0x10(%rsp,%r13), %r15
subq %r15, %r14
leaq 0x1(%r14), %rdi
callq 0x3150
movq %rax, %r12
movq %rax, (%r13,%rbx)
addq 0x8(%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3570
movb $0x0, (%r12,%r14)
addq $0x8, %r13
cmpq $0x40, %r13
jne 0x417c
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./textbox.c
// Function: textbox_font
void textbox_font(Textbox *tb, char *font, char *fg, char *bg)
{
	if (tb->font) XftFontClose(display, tb->font);
	tb->font = XftFontOpenName(display, DefaultScreen(display), font);

	XftColorAllocName(display, DefaultVisual(display, DefaultScreen(display)), DefaultColormap(display, DefaultScreen(display)), fg, &tb->color_fg);
	XftColorAllocName(display, DefaultVisual(display, DefaultScreen(display)), DefaultColormap(display, DefaultScreen(display)), bg, &tb->color_bg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq 0x28(%rdi), %rsi
testq %rsi, %rsi
je 0x43b3
movq 0xa802(%rip), %rdi      # 0xebb0
callq 0x30a0
movq 0xa7f6(%rip), %rdi      # 0xebb0
movl 0xe0(%rdi), %esi
movq %r12, %rdx
callq 0x3460
movq %rax, 0x28(%r14)
movq 0xa7dd(%rip), %rdi      # 0xebb0
movq 0xe8(%rdi), %rax
movslq 0xe0(%rdi), %rcx
shlq $0x7, %rcx
movq 0x40(%rax,%rcx), %rsi
movq 0x50(%rax,%rcx), %rdx
leaq 0x30(%r14), %r8
movq %r15, %rcx
callq 0x3390
movq 0xa7ae(%rip), %rdi      # 0xebb0
movq 0xe8(%rdi), %rax
movslq 0xe0(%rdi), %rcx
shlq $0x7, %rcx
movq 0x40(%rax,%rcx), %rsi
movq 0x50(%rax,%rcx), %rdx
addq $0x40, %r14
movq %rbx, %rcx
movq %r14, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3390
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./textbox.c
// Function: textbox_text
void textbox_text(Textbox *tb, char *text)
{
	if (tb->text) free(tb->text);
	tb->text = strdup(text ? text: "");
	tb->cursor = MAX(0, MIN(strlen(tb->text), tb->cursor));
	textbox_extents(tb);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rdi), %rdi
testq %rdi, %rdi
je 0x4450
callq 0x3220
testq %r14, %r14
leaq 0x62b0(%rip), %rdi      # 0xa70a
cmovneq %r14, %rdi
callq 0x3430
movq %rax, 0x50(%rbx)
movq %rax, %rdi
callq 0x3250
movswq 0x20(%rbx), %rcx
cmpq %rcx, %rax
cmovbl %eax, %ecx
movw %cx, 0x20(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x451b