LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/snej[P]zdelta/zd_mem.c
// Function: zd_free
size_t zd_free(zd_mem_buffer *m){

  int n=0;
  
  if(m->size >0){
    free(m->buffer);
    m->pos= NULL;
    n= m->size; m->size=0;
    /*m->buffer= NULL;*/
  }
  
  return n;
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x1546
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movslq 0x10(%rbx), %rax
movups %xmm0, 0x8(%rbx)
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/snej[P]zdelta/zd_mem.c
// Function: zd_memcpy
size_t zd_memcpy(zd_mem_buffer *m, void *data, size_t n){

  size_t avail=0;
  avail = (m->size - (m->pos - m->buffer));
  if(avail < n)
    if(zd_realloc(m, (n-avail)+1)== 0)
      return 0;
  
  memcpy(m->pos, data, n);
  m->pos += n;
  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdi), %rax
subq 0x8(%rdi), %rax
movq %rsi, %r15
addq 0x10(%rdi), %rax
cmpq %rdx, %rax
jae 0x157d
movq %rbx, %rsi
subq %rax, %rsi
incq %rsi
movq %r14, %rdi
callq 0x14c0
testq %rax, %rax
je 0x1599
movq 0x8(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x10f0
addq %rbx, 0x8(%r14)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %ebx, %ebx
jmp 0x1590
// File: /workspace/github_c_makefile_star2_O1/snej[P]zdelta/zd_mem.c
// Function: dread_file
int ZEXPORT dread_file(FILE *input, zd_mem_buffer* buffer){

  int nbread;

  assert(input!=NULL);
  assert(buffer!=NULL);
  zd_alloc(buffer, ZD_BUF_SIZE);
  for(;;){

    /* read data */
    nbread = fread((void *) buffer->pos, 
		   sizeof(Byte), (size_t) ZD_BUF_SIZE, input); 
    buffer->pos=buffer->pos+nbread;

    /* check for end of file */
    if(feof(input)){
      return (buffer->pos - buffer->buffer);
    }

    /* check for io error */
    if(ferror(input)){
      zd_free(buffer);
      return ZD_ERRNO;
    }

    /* increase the buffer */
    if(!zd_realloc(buffer, ZD_BUF_SIZE)){
      zd_free(buffer);
      /* not enough memory */
      return ZD_MEM_ERROR;
    }
  }		
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x163c
movq %rsi, %rbx
testq %rsi, %rsi
je 0x165b
movq %rdi, %r14
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x1474
movq 0x8(%rbx), %rdi
movl $0x1, %esi
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rcx
callq 0x1050
cltq
addq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x10e0
testl %eax, %eax
jne 0x1613
movq %r14, %rdi
callq 0x1040
testl %eax, %eax
jne 0x161a
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x14c0
testq %rax, %rax
jne 0x15c6
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
jmp 0x161f
movl 0x8(%rbx), %ebp
subl (%rbx), %ebp
jmp 0x1635
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x0, 0x10(%rbx)
je 0x1635
movq (%rbx), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7a2e(%rip), %rdi      # 0x9071
leaq 0x7a33(%rip), %rsi      # 0x907d
leaq 0x7a35(%rip), %rcx      # 0x9086
movl $0x53, %edx
callq 0x1070
leaq 0x7a4c(%rip), %rdi      # 0x90ae
leaq 0x7a14(%rip), %rsi      # 0x907d
leaq 0x7a16(%rip), %rcx      # 0x9086
movl $0x54, %edx
callq 0x1070
nop
// File: /workspace/github_c_makefile_star2_O1/snej[P]zdelta/zdelta.c
// Function: zd_compress
int ZEXPORT zd_compress(const Bytef *ref,  uLong rsize,
			const Bytef *tar,  uLong tsize,
			Bytef *delta, uLongf *dsize)
{
  int rval;
  zd_stream strm;   

  /* init io buffers */
  strm.base[0]  = (Bytef*) ref;
  strm.base_avail[0] = rsize;
  strm.base_out[0] = 0;
  strm.refnum      = 1;

  strm.next_in  = (Bytef*) tar;
  strm.total_in = 0;
  strm.avail_in = tsize;

  strm.next_out  = delta; 
  strm.total_out = 0;
  strm.avail_out = *dsize; 

  /* init the rest of the stream structure */
  strm.zalloc = (alloc_func)0;
  strm.zfree = (free_func)0;
  strm.opaque = (voidpf)0;
  rval = zd_deflateInit(&strm, ZD_DEFAULT_COMPRESSION);
  if (rval != ZD_OK)
  {
    fprintf(stderr, "%s error: %d\n", "deflateInit", rval);
    return rval;
  }

  /* compress the data */
  rval = zd_deflate(&strm,ZD_FINISH);
  if(rval != ZD_STREAM_END){
    zd_deflateEnd(&strm);
    return rval == ZD_OK ? ZD_BUF_ERROR : rval;
  }

  *dsize = strm.total_out;
  /* release memory */
  return zd_deflateEnd(&strm);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %r9, %rbx
movq %rsp, %rax
movq %rdi, 0x30(%rax)
movq %rsi, 0x40(%rax)
xorl %esi, %esi
movq %rsi, 0x38(%rax)
movl $0x1, 0x48(%rax)
movq %rdx, (%rax)
movq %rsi, 0x10(%rax)
movl %ecx, 0x8(%rax)
movq %r8, 0x18(%rax)
movq %rsi, 0x28(%rax)
movl (%r9), %ecx
movl %ecx, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
movq %rsi, 0x70(%rax)
leaq 0x79ef(%rip), %rdx      # 0x90bb
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x90, %ecx
callq 0x222b
testl %eax, %eax
jne 0x172c
movq %rsp, %rdi
movl $0x4, %esi
callq 0x1f2e
cmpl $0x1, %eax
jne 0x1707
movq %rsp, %rdi
movq 0x28(%rdi), %rax
movq %rax, (%rbx)
callq 0x25a2
movl %eax, %ebp
jmp 0x171e
movl %eax, %r14d
movq %rsp, %rdi
callq 0x25a2
testl %r14d, %r14d
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
cmovnel %r14d, %ebp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebp
movq 0xc8bb(%rip), %rax      # 0xdff0
movq (%rax), %rdi
leaq 0x7982(%rip), %rsi      # 0x90c1
leaq 0x7989(%rip), %rdx      # 0x90cf
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10d0
jmp 0x171e
// File: /workspace/github_c_makefile_star2_O1/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 0x778c(%rip), %rsi      # 0x90bb
movq %rax, %rdi
movl $0x90, %edx
callq 0x43af
testl %eax, %eax
jne 0x1981
leaq 0x8(%rsp), %rdi
movl $0x4, %esi
callq 0x43be
cmpl $0x1, %eax
jne 0x1969
leaq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rax
movq %rax, (%rbx)
callq 0x425d
movl %eax, %ebp
jmp 0x1975
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x425d
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
movl %eax, %ebp
movq 0xc666(%rip), %rax      # 0xdff0
movq (%rax), %rdi
leaq 0x772d(%rip), %rsi      # 0x90c1
leaq 0x7740(%rip), %rdx      # 0x90db
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10d0
jmp 0x1975
// File: /workspace/github_c_makefile_star2_O1/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 0x1f2d
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x58(%rdi), %r14
testq %r14, %r14
je 0x1f25
cmpl $0x1, 0x48(%rdi)
ja 0x1f25
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 0x1f25
movslq 0xf4(%r14), %rax
shlq $0x4, %rax
leaq 0xbe7a(%rip), %r15      # 0xdd30
movq 0x8(%rax,%r15), %rcx
movl %ebp, %r12d
shlq $0x4, %r12
xorl %eax, %eax
cmpq 0x8(%r12,%r15), %rcx
je 0x1edc
cmpq $0x0, 0x10(%rdi)
je 0x1edc
movl $0x1, %esi
callq 0x1f2e
cmpl %ebp, 0xf4(%r14)
je 0x1f1e
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_O1/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 0x267a
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rcx
testq %rcx, %rcx
je 0x2674
movl 0x8(%rcx), %ebp
cmpl $0x2a, %ebp
je 0x25dc
cmpl $0x29a, %ebp            # imm = 0x29A
je 0x25dc
cmpl $0x71, %ebp
jne 0x2674
movq 0x10(%rcx), %rsi
testq %rsi, %rsi
je 0x25ec
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
movq 0x58(%rbx), %rax
movq 0x80(%rax), %rsi
testq %rsi, %rsi
je 0x2603
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
movq 0x58(%rbx), %rax
movq 0x70(%rax), %rsi
testq %rsi, %rsi
je 0x2617
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
movq 0x58(%rbx), %rax
movq 0x78(%rax), %rsi
testq %rsi, %rsi
je 0x262b
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
movq 0x58(%rbx), %rax
movq 0x68(%rax), %rsi
testq %rsi, %rsi
je 0x263f
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
movq 0x58(%rbx), %rax
movq 0x50(%rax), %rsi
testq %rsi, %rsi
je 0x2653
movq 0x70(%rbx), %rdi
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_O1/snej[P]zdelta/deflate.c
// Function: flush_pending
local void flush_pending(strm)
     zd_streamp strm;
{
  unsigned len = strm->state->pending;
  
  if (len > strm->avail_out) len = strm->avail_out;
  if (len == 0) return;
  
  zmemcpy(strm->next_out, strm->state->pending_out, len);
  strm->next_out  += len;
  strm->state->pending_out  += len;
  strm->total_out += len;
  strm->avail_out  -= len;
  strm->state->pending -= len;
  if (strm->state->pending == 0) {
    strm->state->pending_out = strm->state->pending_buf;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x58(%rdi), %rax
movl 0x28(%rax), %ecx
movl 0x20(%rdi), %ebp
cmpl %ebp, %ecx
cmovbl %ecx, %ebp
testl %ebp, %ebp
je 0x26c8
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x20(%rax), %rsi
movl %ebp, %r14d
movq %r14, %rdx
callq 0x10f0
addq %r14, 0x18(%rbx)
movq 0x58(%rbx), %rax
addq %r14, 0x20(%rax)
addq %r14, 0x28(%rbx)
subl %ebp, 0x20(%rbx)
subl %ebp, 0x28(%rax)
jne 0x26c8
movq 0x10(%rax), %rcx
movq %rcx, 0x20(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x388c
movq %rsi, %r15
movq %rdi, %r14
subl %ebx, %eax
movl %eax, 0x8(%rdi)
movq 0x58(%rdi), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x3872
movq (%r14), %rsi
movq 0x80(%r14), %rdi
movl %ebx, %edx
callq 0x6400
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)
jmp 0x388e
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4259
movq %rdi, %rsi
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x4259
cmpl $0x1, 0x48(%rsi)
ja 0x4259
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 0x6590
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x42a2
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rcx
testq %rcx, %rcx
je 0x42a1
cmpq $0x0, 0x68(%rbx)
je 0x42a1
movq 0x20(%rcx), %rdi
testq %rdi, %rdi
je 0x428c
movq %rbx, %rsi
callq 0x7403
movq 0x58(%rbx), %rsi
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
movq $0x0, 0x58(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x43a8
cmpl $0x90, %ecx
jne 0x43a8
cmpb $0x32, (%rdx)
jne 0x43a8
movq %rdi, %rbx
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x43a8
cmpl $0x1, 0x48(%rbx)
ja 0x43a8
movl %esi, %r14d
movq $0x0, 0x50(%rbx)
cmpq $0x0, 0x60(%rbx)
jne 0x430a
leaq 0x20ef(%rip), %rax      # 0x63ed
movq %rax, 0x60(%rbx)
movq $0x0, 0x70(%rbx)
cmpq $0x0, 0x68(%rbx)
jne 0x431c
leaq 0x20de(%rip), %rax      # 0x63f6
movq %rax, 0x68(%rbx)
movq 0x70(%rbx), %rdi
movl $0x1, %esi
movl $0x28, %edx
callq *0x60(%rbx)
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x43a3
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 0x4362
movq %rbx, %rdi
callq 0x425d
jmp 0x43a8
movl %ecx, 0x1c(%rax)
cmpl $0x0, 0x18(%rax)
jne 0x4374
leaq 0x208e(%rip), %rsi      # 0x6400
jmp 0x4376
xorl %esi, %esi
movl $0x1, %edx
shll %cl, %edx
movq %rbx, %rdi
callq 0x663a
movq 0x58(%rbx), %rcx
movq %rax, 0x20(%rcx)
movq %rbx, %rdi
testq %rax, %rax
je 0x439e
callq 0x4214
xorl %ebp, %ebp
jmp 0x43a8
callq 0x425d
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4772
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rcx
testq %rcx, %rcx
je 0x476d
cmpl $0xd, (%rcx)
je 0x46c2
movl $0xd, (%rcx)
movl $0x0, 0x8(%rcx)
movl 0x8(%rbx), %edi
testl %edi, %edi
je 0x471e
movq (%rbx), %rdx
movq 0x58(%rbx), %rax
movl 0x8(%rax), %ecx
cmpl $0x3, %ecx
ja 0x4725
leaq 0x4adc(%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 0x4706
movl %r10d, %ecx
jmp 0x4708
incl %ecx
incq %rsi
leal -0x1(%rdi), %r10d
cmpl $0x1, %edi
je 0x472b
movl %r10d, %edi
cmpl $0x4, %ecx
jb 0x46e5
jmp 0x472b
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
jmp 0x476d
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 0x476d
movq 0x10(%rbx), %r14
movq 0x28(%rbx), %r15
movq %rbx, %rdi
callq 0x4214
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
nop
// File: /workspace/github_c_makefile_star2_O1/snej[P]zdelta/trees.c
// Function: init_block
local void init_block(s)
    deflate_state *s;
{
  int n; /* iterates over tree elements */

  /* Initialize the trees. */    
  for (n = 0; n < L_CODES;  n++)  s->dyn_ltree[n].Freq  = 0;
  for (n = 0; n < D_CODES;  n++)  s->dyn_dtree[n].Freq  = 0;
  for (n = 0; n < Z_CODES; n++)  s->dyn_ztree[n].Freq  = 0; /* zdelta */
  for (n = 0; n < BL_CODES; n++)  s->bl_tree[n].Freq    = 0;
    
  s->dyn_dtree[END_BLOCK].Freq = 1;
  s->opt_len = s->static_len = 0L;
  s->last_lit = s->matches = 0;
}

// Assembly:
xorl %eax, %eax
movw $0x0, 0x104(%rdi,%rax,4)
incq %rax
cmpq $0x6f, %rax
jne 0x4805
xorl %eax, %eax
movw $0x0, 0x480(%rdi,%rax,4)
incq %rax
cmpq $0x11f, %rax            # imm = 0x11F
jne 0x481a
xorl %eax, %eax
movw $0x0, 0xd7c(%rdi,%rax,4)
incq %rax
cmpq $0x1, %rax
je 0x4831
xorl %eax, %eax
movw $0x0, 0xd90(%rdi,%rax,4)
incq %rax
cmpq $0x13, %rax
jne 0x4846
movw $0x1, 0x880(%rdi)
xorl %eax, %eax
movl %eax, 0x1a44(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x1a58(%rdi)
movl %eax, 0x1a68(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x48ee
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 0x48f1
addl $0x3, %edx
movl %edx, 0x1a74(%rbx)
movq %rbx, %rdi
callq 0x5c51
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 0x4983
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 0x4964
testq %rcx, %rcx
je 0x49a4
movq 0x1a90(%rbx), %rax
movq %rax, 0x1a78(%rbx)
movups 0x1a98(%rbx), %xmm0
movups %xmm0, 0x1a80(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4bdc
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 0x4c0f
cmpl $0x8, %eax
jl 0x4c15
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_O1/snej[P]zdelta/trees.c
// Function: bi_windup
local void bi_windup(s)
     deflate_state *s;
{
  if (s->bi_valid > 8) {
    put_short(s, s->bi_buf);
  } else if (s->bi_valid > 0) {
    put_byte(s, (Byte)s->bi_buf);
  }
  s->bi_buf = 0;
  s->bi_valid = 0;
#ifdef DEBUG
  s->bits_sent = (s->bits_sent+7) & ~7;
#endif
}

// Assembly:
movl 0x1a74(%rdi), %eax
cmpl $0x9, %eax
jl 0x5c87
movb 0x1a70(%rdi), %dl
leaq 0x10(%rdi), %rcx
movq 0x10(%rdi), %rsi
leaq 0x28(%rdi), %rax
movslq 0x28(%rdi), %r8
leal 0x1(%r8), %r9d
movl %r9d, 0x28(%rdi)
movb %dl, (%rsi,%r8)
movzbl 0x1a71(%rdi), %edx
jmp 0x5c9a
testl %eax, %eax
jle 0x5caa
movzwl 0x1a70(%rdi), %edx
leaq 0x10(%rdi), %rcx
leaq 0x28(%rdi), %rax
movq (%rcx), %rcx
movslq (%rax), %rsi
leal 0x1(%rsi), %r8d
movl %r8d, (%rax)
movb %dl, (%rcx,%rsi)
movw $0x0, 0x1a70(%rdi)
movl $0x0, 0x1a74(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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), %r9d
movl 0x17ec(%rdi), %r10d
cmpl %r10d, %r9d
jle 0x5cdf
movl %edx, %r8d
jmp 0x5d88
pushq %rbx
movslq %eax, %rcx
cmpl %r10d, %r9d
jge 0x5d2f
movl %r9d, %r10d
orl $0x1, %r10d
movslq %r10d, %r8
movslq 0xef0(%rdi,%r8,4), %r8
movslq %r9d, %r11
movslq 0xef0(%rdi,%r11,4), %r11
movzwl (%rsi,%r11,4), %ebx
cmpw %bx, (%rsi,%r8,4)
jae 0x5d16
movl %r10d, %r8d
jmp 0x5d32
jne 0x5d2f
movb 0x17f4(%rdi,%r8), %bl
movl %r9d, %r8d
cmpb 0x17f4(%rdi,%r11), %bl
jbe 0x5d11
jmp 0x5d32
movl %r9d, %r8d
movslq %r8d, %r9
movl 0xef0(%rdi,%r9,4), %r9d
movslq %r9d, %r10
movzwl (%rsi,%r10,4), %r11d
cmpw %r11w, (%rsi,%rcx,4)
jb 0x5d84
jne 0x5d60
movb 0x17f4(%rdi,%rcx), %r11b
cmpb 0x17f4(%rdi,%r10), %r11b
jbe 0x5d84
movslq %edx, %rdx
movl %r9d, 0xef0(%rdi,%rdx,4)
leal (%r8,%r8), %r9d
movl 0x17ec(%rdi), %r10d
movl %r8d, %edx
cmpl %r10d, %r9d
jle 0x5ce3
jmp 0x5d87
movl %edx, %r8d
popq %rbx
movslq %r8d, %rcx
movl %eax, 0xef0(%rdi,%rcx,4)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e78
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 0x5def
cmpl %eax, %r8d
jne 0x5def
movl %ebx, %r8d
jmp 0x5e63
cmpl %r9d, %r11d
jge 0x5e02
movl %r8d, %r9d
addw %r11w, 0xd90(%rdi,%r9,4)
jmp 0x5e37
testl %r8d, %r8d
je 0x5e21
cmpl %ebx, %r8d
je 0x5e18
movl %r8d, %r9d
incw 0xd90(%rdi,%r9,4)
incw 0xdd0(%rdi)
jmp 0x5e37
cmpl $0x9, %r14d
jg 0x5e30
incw 0xdd4(%rdi)
jmp 0x5e37
incw 0xdd8(%rdi)
xorl %r11d, %r11d
testl %eax, %eax
je 0x5e57
xorl %r10d, %r10d
cmpl %eax, %r8d
sete %r10b
movl $0x4, %r9d
subl %r10d, %r9d
xorl $0x7, %r10d
jmp 0x5e63
movl $0x3, %r9d
movl $0x8a, %r10d
incq %rcx
movl %r11d, %r14d
movl %r8d, %ebx
cmpq %rcx, %rdx
jne 0x5dd4
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x6586
movl %edx, %r8d
movl %edi, %ecx
shrl $0x10, %ecx
movzwl %di, %edi
testl %edx, %edx
je 0x657d
pushq %r14
pushq %rbx
movl $0x15b0, %r9d           # imm = 0x15B0
movabsq $0xf00e10d2fc5cd, %r10  # imm = 0xF00E10D2FC5CD
cmpl %r9d, %r8d
movl $0x15b0, %eax           # imm = 0x15B0
cmovbl %r8d, %eax
cmpl $0x10, %r8d
jb 0x6504
movl %eax, %edx
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
leal -0x10(%rdx), %r11d
cmpl $0x1f, %edx
movl %r11d, %edx
jg 0x6447
jmp 0x6507
movl %eax, %r11d
testl %r11d, %r11d
je 0x652e
leal -0x1(%r11), %edx
movl %r11d, %r11d
xorl %ebx, %ebx
movzbl (%rsi,%rbx), %r14d
addq %r14, %rdi
addq %rdi, %rcx
incq %rbx
cmpl %ebx, %r11d
jne 0x6515
addq %rdx, %rsi
incq %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 0x642f
popq %rbx
popq %r14
shlq $0x10, %rcx
orq %rdi, %rcx
jmp 0x658b
movl $0x1, %ecx
movq %rcx, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x65a6
movq 0x68(%rbx), %rax
movq %rax, (%rdx)
movl (%rbx), %eax
andl $-0x2, %eax
cmpl $0x4, %eax
jne 0x65bc
movq 0x70(%r14), %rdi
movq 0x10(%rbx), %rsi
callq *0x68(%r14)
cmpl $0x6, (%rbx)
jne 0x65cd
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x7ecd
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 0x6604
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 0x6632
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 0x661d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x83af
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 0x83e7
addq $0x20, %rsp
cmpl $-0x5, %eax
je 0x83bc
movl %eax, %ebp
cmpl $-0x3, %eax
jne 0x83b6
leaq 0x2a63(%rip), %rax      # 0xae10
jmp 0x83c3
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
jmp 0x83d6
cmpl $0x0, (%r15)
jne 0x83cc
leaq 0x2a75(%rip), %rax      # 0xae38
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_O1/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), %r15
movq 0x58(%rdi), %r13
cmpq %r13, %r15
jbe 0x8a6e
movq 0x48(%rbx), %r13
movq 0x18(%r14), %r12
subl %r15d, %r13d
movl 0x20(%r14), %eax
cmpl %r13d, %eax
cmovbl %eax, %r13d
xorl %ebp, %ebp
testl %r13d, %r13d
cmovel %edx, %ebp
cmpl $-0x5, %edx
cmovnel %edx, %ebp
subl %r13d, %eax
movl %eax, 0x20(%r14)
addq %r13, 0x28(%r14)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x8ab9
movq 0x68(%rbx), %rdi
movq %r15, %rsi
movl %r13d, %edx
callq *%rax
movq %rax, 0x68(%rbx)
movq %rax, 0x80(%r14)
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x10f0
addq %r13, %r12
addq %r13, %r15
movq 0x48(%rbx), %rax
cmpq %rax, %r15
jne 0x8b45
movq 0x40(%rbx), %r15
cmpq %rax, 0x58(%rbx)
jne 0x8ae4
movq %r15, 0x58(%rbx)
movl 0x58(%rbx), %r13d
subl %r15d, %r13d
movl 0x20(%r14), %eax
cmpl %r13d, %eax
cmovbl %eax, %r13d
xorl %ecx, %ecx
testl %r13d, %r13d
cmovel %ebp, %ecx
cmpl $-0x5, %ebp
cmovnel %ebp, %ecx
movl %ecx, %ebp
subl %r13d, %eax
movl %eax, 0x20(%r14)
addq %r13, 0x28(%r14)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x8b31
movq 0x68(%rbx), %rdi
movq %r15, %rsi
movl %r13d, %edx
callq *%rax
movq %rax, 0x68(%rbx)
movq %rax, 0x80(%r14)
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x10f0
addq %r13, %r12
addq %r13, %r15
movq %r12, 0x18(%r14)
movq %r15, 0x50(%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_O1/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 0x4f0e
leaq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %esi
callq 0x5e4f
testq %rax, %rax
je 0x4f49
movq %rax, %rbx
cmpl $0x0, (%rax)
jne 0x4f5f
leaq 0x5e09(%rip), %rsi      # 0xacc9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x66dc
testq %rax, %rax
je 0x4f7e
movq %rax, %rdi
callq 0x5040
leaq 0x5e2c(%rip), %rsi      # 0xad0e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x66dc
testq %rax, %rax
je 0x4f9d
cmpl $0x3, (%rax)
jne 0x4f21
cmpq $0x0, 0x8(%rax)
jne 0x4f21
movq %rax, %rdi
callq 0x5040
movq %rbx, %rax
popq %rbx
retq
cmpl $0x1, %eax
je 0x4f18
cmpl $0x2, %eax
jne 0x4f2a
leaq 0x6369(%rip), %rdi      # 0xb288
jmp 0x4f50
leaq 0x63ad(%rip), %rdi      # 0xb2d5
jmp 0x4f50
leaq 0x68dd(%rip), %rdi      # 0xb80e
leaq 0x594b(%rip), %rsi      # 0xa883
leaq 0x5d4f(%rip), %rcx      # 0xac8e
movl $0x6a, %edx
callq 0x2140
leaq 0x6356(%rip), %rdi      # 0xb2a6
callq 0x2090
movl $0x1, %edi
callq 0x2290
movq %rbx, %rsi
addq $0x4, %rsi
leaq 0x5d46(%rip), %rdi      # 0xacb3
xorl %eax, %eax
callq 0x2100
movq %rbx, %rdi
callq 0x5cab
jmp 0x4f55
leaq 0x5d4d(%rip), %rdi      # 0xacd2
leaq 0x58f7(%rip), %rsi      # 0xa883
leaq 0x5d4d(%rip), %rcx      # 0xace0
movl $0x3b, %edx
callq 0x2140
leaq 0x5d2e(%rip), %rdi      # 0xacd2
leaq 0x58d8(%rip), %rsi      # 0xa883
leaq 0x5d2e(%rip), %rcx      # 0xace0
movl $0x40, %edx
callq 0x2140
// File: /workspace/github_c_makefile_star2_O1/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 0x5d02(%rip), %rsi      # 0xacc9
xorl %eax, %eax
callq 0x66dc
testq %rax, %rax
je 0x5002
movq %rax, %rdi
callq 0x5040
leaq 0x5d57(%rip), %rsi      # 0xad39
movq %rbx, %rdi
xorl %eax, %eax
callq 0x66dc
testq %rax, %rax
je 0x5021
movq %rax, %rdi
callq 0x5040
movq %rbx, %rdi
popq %rbx
jmp 0x5cab
leaq 0x5cc9(%rip), %rdi      # 0xacd2
leaq 0x5873(%rip), %rsi      # 0xa883
leaq 0x5cfe(%rip), %rcx      # 0xad15
movl $0x51, %edx
callq 0x2140
leaq 0x5caa(%rip), %rdi      # 0xacd2
leaq 0x5854(%rip), %rsi      # 0xa883
leaq 0x5cdf(%rip), %rcx      # 0xad15
movl $0x54, %edx
callq 0x2140
// File: /workspace/github_c_makefile_star2_O1/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 0x5d36
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rdi), %edi
testl %edi, %edi
jle 0x5cc7
callq 0x2160
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x5cd8
callq 0x6acd
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x5ce9
callq 0x8250
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
je 0x5cfa
callq 0x2040
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0x5d0b
callq 0x2040
movq 0xc8(%rbx), %rdi
testq %rdi, %rdi
je 0x5d1c
callq 0x2040
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x5d2d
callq 0x2040
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x62fa
movq %rsi, %r14
movq %rdi, %rbx
movq 0x90(%rdi), %rsi
movslq -0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x62e0
movl 0x84(%rbx), %edi
callq 0x20d0
cmpl $-0x1, %eax
je 0x628f
testl %eax, %eax
jle 0x62e0
movq 0x90(%rbx), %rdi
cmpl %eax, -0x8(%rdi)
jne 0x62d4
callq 0x6acd
callq 0x6a7b
movq %rax, 0x90(%rbx)
jmp 0x62e0
callq 0x2060
movl (%rax), %ecx
cmpl $0x4, %ecx
je 0x62e0
cmpl $0xb, %ecx
jne 0x62b0
cmpl $0x4, %ecx
je 0x62e0
movl 0x88(%rbx), %ecx
andl $0x1, %ecx
je 0x62e0
movl $0x1, (%rbx)
addq $0x4, %rbx
movl (%rax), %ecx
leaq 0x5228(%rip), %rdx      # 0xb4eb
movl $0x80, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2110
jmp 0x62fa
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x74e2
xorl %ebp, %ebp
testq %r14, %r14
je 0x62fa
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_O1/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 0x948a
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 0x94c1
leaq 0x2586(%rip), %rsi      # 0xba0e
jmp 0x9491
leaq 0x256e(%rip), %rsi      # 0xb9ff
movq %rbx, %rdi
callq 0x8d0c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x94c1
movl 0x84(%rbx), %edi
testl %edi, %edi
js 0x94c1
callq 0x2160
movl $0xffffffff, 0x84(%rbx) # imm = 0xFFFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq