LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x15af
movq %rsi, %rbx
testq %rsi, %rsi
je 0x15c8
movq %rdi, %r14
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x13f0
pushq $0x1
popq %r15
movq 0x8(%rbx), %rdi
movl $0x20000, %edx          # imm = 0x20000
movq %r15, %rsi
movq %r14, %rcx
callq 0x1050
cltq
addq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x10e0
testl %eax, %eax
jne 0x1597
movq %r14, %rdi
callq 0x1040
testl %eax, %eax
jne 0x159e
movl $0x20000, %esi          # imm = 0x20000
movq %rbx, %rdi
callq 0x1439
testq %rax, %rax
jne 0x1547
movq %rbx, %rdi
callq 0x149f
pushq $-0x4
jmp 0x15a8
movl 0x8(%rbx), %eax
subl (%rbx), %eax
jmp 0x15a9
movq %rbx, %rdi
callq 0x149f
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7abb(%rip), %rdi      # 0x9071
leaq 0x7ac0(%rip), %rsi      # 0x907d
leaq 0x7ac2(%rip), %rcx      # 0x9086
pushq $0x53
jmp 0x15df
leaq 0x7adf(%rip), %rdi      # 0x90ae
leaq 0x7aa7(%rip), %rsi      # 0x907d
leaq 0x7aa9(%rip), %rcx      # 0x9086
pushq $0x54
popq %rdx
callq 0x1070
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 %rsp, %rax
movq %rdi, 0x30(%rax)
movq %rsi, 0x40(%rax)
andq $0x0, 0x38(%rax)
movl $0x1, 0x48(%rax)
movq %rdx, (%rax)
andq $0x0, 0x10(%rax)
movl %ecx, 0x8(%rax)
movq %r8, 0x18(%rax)
andq $0x0, 0x28(%rax)
movq %r9, %rbx
movl (%r9), %ecx
movl %ecx, 0x20(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
andq $0x0, 0x70(%rax)
leaq 0x7a81(%rip), %rdx      # 0x90bb
pushq $-0x1
popq %rsi
movq %rax, %rdi
movl $0x90, %ecx
callq 0x206b
testl %eax, %eax
jne 0x1694
movq %rsp, %rdi
pushq $0x4
popq %rsi
callq 0x1e1a
cmpl $0x1, %eax
jne 0x1671
movq %rsp, %rdi
movq 0x28(%rdi), %rax
movq %rax, (%rbx)
callq 0x23be
movl %eax, %ebp
jmp 0x1686
movl %eax, %r14d
movq %rsp, %rdi
callq 0x23be
testl %r14d, %r14d
pushq $-0x5
popq %rbp
cmovnel %r14d, %ebp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebp
movq 0xc953(%rip), %rax      # 0xdff0
movq (%rax), %rdi
leaq 0x7a1a(%rip), %rsi      # 0x90c1
leaq 0x7a21(%rip), %rdx      # 0x90cf
movl %ebp, %ecx
xorl %eax, %eax
callq 0x10d0
jmp 0x1686
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x98, %rsp
leaq 0x8(%rsp), %rax
movq %rdi, 0x30(%rax)
movq %rsi, 0x40(%rax)
movl $0x1, 0x48(%rax)
movq %rdx, 0x18(%rax)
andq $0x0, 0x28(%rax)
movq %rcx, %r14
movl (%rcx), %ecx
movl %ecx, 0x20(%rax)
movq %r8, (%rax)
andq $0x0, 0x10(%rax)
movl %r9d, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
andq $0x0, 0x70(%rax)
leaq 0x783e(%rip), %rsi      # 0x90bb
movq %rax, %rdi
movl $0x90, %edx
callq 0x41da
testl %eax, %eax
jne 0x18ce
leaq 0x8(%rsp), %rdi
pushq $0x4
popq %rsi
callq 0x41e7
cmpl $0x1, %eax
jne 0x18b5
leaq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rax
movq %rax, (%r14)
callq 0x408c
movl %eax, %ebx
jmp 0x18c1
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x408c
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
movl %eax, %ebx
movq 0xc719(%rip), %rax      # 0xdff0
movq (%rax), %rdi
leaq 0x77e0(%rip), %rsi      # 0x90c1
leaq 0x77f3(%rip), %rdx      # 0x90db
movl %ebx, %ecx
xorl %eax, %eax
callq 0x10d0
jmp 0x18c1
// File: /workspace/github_c_makefile_star2_O2/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:
pushq $-0x2
popq %rax
testq %rdi, %rdi
je 0x1e19
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x58(%rdi), %r14
testq %r14, %r14
je 0x1e11
cmpl $0x1, 0x48(%rdi)
ja 0x1e11
movl %edx, %ebx
cmpl $-0x1, %esi
pushq $0x7
popq %rbp
cmovnel %esi, %ebp
cmpl $0xa, %ebp
setae %cl
cmpl $0x9, %edx
setae %dl
orb %cl, %dl
jne 0x1e11
movslq 0xf4(%r14), %rcx
movq %rcx, %rax
shlq $0x4, %rax
leaq 0xbf8e(%rip), %r15      # 0xdd30
movq 0x8(%rax,%r15), %rdx
movl %ebp, %r12d
shlq $0x4, %r12
xorl %eax, %eax
cmpq 0x8(%r12,%r15), %rdx
je 0x1dcd
cmpq $0x0, 0x10(%rdi)
je 0x1dcd
pushq $0x1
popq %rsi
callq 0x1e1a
movl 0xf4(%r14), %ecx
cmpl %ebp, %ecx
je 0x1e0a
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_O2/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:
pushq $-0x2
popq %rax
testq %rdi, %rdi
je 0x24a3
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rsi
testq %rsi, %rsi
je 0x249d
movl 0x8(%rsi), %ebp
cmpl $0x2a, %ebp
je 0x23f6
cmpl $0x29a, %ebp            # imm = 0x29A
je 0x23f6
cmpl $0x71, %ebp
jne 0x249d
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x240d
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x80(%rsi), %rax
testq %rax, %rax
je 0x2427
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x70(%rsi), %rax
testq %rax, %rax
je 0x243e
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x78(%rsi), %rax
testq %rax, %rax
je 0x2455
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x246c
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x50(%rsi), %rax
testq %rax, %rax
je 0x2483
movq 0x70(%rbx), %rdi
movq %rax, %rsi
callq *0x68(%rbx)
movq 0x58(%rbx), %rsi
movq 0x70(%rbx), %rdi
callq *0x68(%rbx)
andq $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_O2/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 0x2516
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 0x2516
movq 0x10(%rax), %rcx
movq %rcx, 0x20(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x36a5
movq %rsi, %r15
movq %rdi, %r14
subl %ebx, %eax
movl %eax, 0x8(%rdi)
movq 0x58(%rdi), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x368d
movq (%r14), %rsi
movq 0x80(%r14), %rdi
movl %ebx, %edx
callq 0x605c
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_O2/snej[P]zdelta/deflate.c
// Function: read_ref_buf
local int read_ref_buf(strm, buf, size, rw)
     zd_streamp strm;
     Bytef *buf;
     unsigned size;
     int rw;
{
  unsigned len = strm->base_avail[rw]; 

  if (len > size) len = size;
  if (len == 0) return 0;
  strm->base_avail[rw]  -= len;

  zmemcpy(buf, strm->base[rw], len);

  strm->base[rw]     += len;
  strm->base_out[rw] += len;

  return (int)len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movslq %ecx, %r12
movq 0x40(%rdi,%r12,8), %rax
cmpl %edx, %eax
cmovbl %eax, %ebx
testl %ebx, %ebx
je 0x4033
movq %rdi, %r14
movl %ebx, %r15d
subq %r15, %rax
movq %rax, 0x40(%rdi,%r12,8)
movq 0x30(%rdi,%r12,8), %rax
movq %rsi, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x10f0
addq %r15, 0x30(%r14,%r12,8)
addq %r15, 0x38(%r14,%r12,8)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x2
popq %rbx
testq %rdi, %rdi
je 0x4088
movq %rdi, %rsi
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x4088
cmpl $0x1, 0x48(%rsi)
ja 0x4088
andq $0x0, 0x28(%rsi)
andq $0x0, 0x10(%rsi)
andq $0x0, 0x50(%rsi)
movl 0x18(%rax), %ecx
testl %ecx, %ecx
pushq $0x7
popq %rdx
cmovel %ecx, %edx
movl %edx, (%rax)
movq 0x20(%rax), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x61a8
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq $-0x2
popq %rax
testq %rdi, %rdi
je 0x40d1
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rsi
testq %rsi, %rsi
je 0x40d0
movq 0x68(%rbx), %rcx
testq %rcx, %rcx
je 0x40d0
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0x40c3
movq %rbx, %rsi
callq 0x701e
movq 0x58(%rbx), %rsi
movq 0x68(%rbx), %rcx
movq 0x70(%rbx), %rdi
callq *%rcx
andq $0x0, 0x58(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq $-0x6
popq %rbp
testq %rdx, %rdx
je 0x41cf
cmpl $0x90, %ecx
jne 0x41cf
cmpb $0x32, (%rdx)
jne 0x41cf
movq %rdi, %rbx
pushq $-0x2
popq %rbp
testq %rdi, %rdi
je 0x41cf
cmpl $0x1, 0x48(%rbx)
ja 0x41cf
movl %esi, %r14d
andq $0x0, 0x50(%rbx)
movq 0x60(%rbx), %rax
testq %rax, %rax
jne 0x4135
leaq 0x1f1f(%rip), %rax      # 0x604b
movq %rax, 0x60(%rbx)
andq $0x0, 0x70(%rbx)
cmpq $0x0, 0x68(%rbx)
jne 0x4147
leaq 0x1f11(%rip), %rcx      # 0x6054
movq %rcx, 0x68(%rbx)
movq 0x70(%rbx), %rdi
pushq $0x1
popq %r15
pushq $0x28
popq %rdx
movl %r15d, %esi
callq *%rax
movq %rax, 0x58(%rbx)
pushq $-0x4
popq %r12
testq %rax, %rax
je 0x41cc
andq $0x0, 0x20(%rax)
movl %r14d, %edx
shrl $0x1f, %edx
movl %r14d, %ecx
negl %ecx
cmovsl %r14d, %ecx
movl %edx, 0x18(%rax)
leal -0x10(%rcx), %edx
cmpl $-0x9, %edx
ja 0x418d
movq %rbx, %rdi
callq 0x408c
jmp 0x41cf
movl %ecx, 0x1c(%rax)
testl %r14d, %r14d
js 0x419e
leaq 0x1ec0(%rip), %rsi      # 0x605c
jmp 0x41a0
xorl %esi, %esi
shll %cl, %r15d
movq %rbx, %rdi
movl %r15d, %edx
callq 0x6247
movq 0x58(%rbx), %rcx
movq %rax, 0x20(%rcx)
movq %rbx, %rdi
testq %rax, %rax
je 0x41c7
callq 0x4044
xorl %ebp, %ebp
jmp 0x41cf
callq 0x408c
movl %r12d, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq $-0x2
popq %rax
testq %rdi, %rdi
je 0x4573
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x58(%rdi), %rcx
testq %rcx, %rcx
je 0x4569
cmpl $0xd, (%rcx)
je 0x44d0
movl $0xd, (%rcx)
andl $0x0, 0x8(%rcx)
movl 0x8(%rbx), %eax
testq %rax, %rax
je 0x4562
movq (%rbx), %rsi
movq 0x58(%rbx), %rcx
movl 0x8(%rcx), %edx
xorl %r8d, %r8d
leaq 0x4ccb(%rip), %r9       # 0x91bb
pushq $0x4
popq %r10
xorl %edi, %edi
cmpl %edi, %eax
je 0x4525
cmpl $0x3, %edx
ja 0x4525
movb (%rsi,%rdi), %bpl
movl %edx, %r14d
movl %r10d, %r11d
subl %edx, %r11d
testb %bpl, %bpl
cmovnel %r8d, %r11d
cmpb (%r14,%r9), %bpl
je 0x451e
movl %r11d, %edx
jmp 0x4520
incl %edx
incq %rdi
jmp 0x44f6
addq %rdi, 0x10(%rbx)
addq %rdi, %rsi
movq %rsi, (%rbx)
subl %edi, %eax
movl %eax, 0x8(%rbx)
movl %edx, 0x8(%rcx)
cmpl $0x4, %edx
jne 0x4566
movq 0x10(%rbx), %r14
movq 0x28(%rbx), %r15
movq %rbx, %rdi
callq 0x4044
movq %r14, 0x10(%rbx)
movq %r15, 0x28(%rbx)
movq 0x58(%rbx), %rax
movl $0x7, (%rax)
xorl %eax, %eax
jmp 0x4569
pushq $-0x5
jmp 0x4568
pushq $-0x3
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpq $0x6f, %rax
je 0x4615
andw $0x0, 0x104(%rdi,%rax,4)
incq %rax
jmp 0x4601
xorl %eax, %eax
cmpq $0x11f, %rax            # imm = 0x11F
je 0x462d
andw $0x0, 0x480(%rdi,%rax,4)
incq %rax
jmp 0x4617
andw $0x0, 0xd7c(%rdi)
andw $0x0, 0xd80(%rdi)
xorl %eax, %eax
cmpq $0x13, %rax
je 0x4653
andw $0x0, 0xd90(%rdi,%rax,4)
incq %rax
jmp 0x463f
movw $0x1, 0x880(%rdi)
andl $0x0, 0x1a44(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x1a58(%rdi)
andl $0x0, 0x1a68(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x46e8
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 0x46eb
addl $0x3, %edx
movl %edx, 0x1a74(%rbx)
movq %rbx, %rdi
callq 0x5907
movl $0x8, 0x1a6c(%rbx)
movq 0x10(%rbx), %rsi
movslq 0x28(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movq %r15, %rax
movb %al, (%rsi,%rcx)
movq 0x10(%rbx), %rsi
movslq 0x28(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rbx)
movb %ah, (%rsi,%rcx)
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)
shrl $0x8, %eax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
movslq 0x28(%rbx), %rsi
leal 0x1(%rsi), %edi
movl %edi, 0x28(%rbx)
movb %al, (%rdx,%rsi)
movq %r15, %rax
cmpl %ecx, %eax
je 0x4764
movb (%r14,%rcx), %al
incq %rcx
jmp 0x4743
testq %r15, %r15
je 0x4785
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_O2/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 0x4998
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)
andw $0x0, 0x1a70(%rdi)
xorl %eax, %eax
jmp 0x49cb
cmpl $0x8, %eax
jl 0x49d1
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_O2/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 0x593d
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 0x5950
testl %eax, %eax
jle 0x5960
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)
andw $0x0, 0x1a70(%rdi)
andl $0x0, 0x1a74(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %eax
movl 0xef0(%rdi,%rax,4), %eax
movslq %eax, %rcx
movslq %edx, %r8
addl %edx, %edx
cmpl 0x17ec(%rdi), %edx
jg 0x5a0c
jge 0x59bf
movl %edx, %r10d
orl $0x1, %r10d
movslq %r10d, %r11
movslq 0xef0(%rdi,%r11,4), %rbx
movslq %edx, %r9
movslq 0xef0(%rdi,%r9,4), %r14
movzwl (%rsi,%r14,4), %ebp
cmpw %bp, (%rsi,%rbx,4)
jae 0x59f7
movq %r11, %r9
movl %r10d, %edx
jmp 0x59c2
movslq %edx, %r9
movl 0xef0(%rdi,%r9,4), %r9d
movslq %r9d, %r10
movzwl (%rsi,%r10,4), %r11d
cmpw %r11w, (%rsi,%rcx,4)
jb 0x5a0c
jne 0x59ed
movb 0x17f4(%rdi,%rcx), %r11b
cmpb 0x17f4(%rdi,%r10), %r11b
jbe 0x5a0c
movl %r9d, 0xef0(%rdi,%r8,4)
jmp 0x5980
jne 0x59c2
movb 0x17f4(%rdi,%rbx), %bl
cmpb 0x17f4(%rdi,%r14), %bl
jbe 0x59b7
jmp 0x59c2
movl %eax, 0xef0(%rdi,%r8,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzwl 0x2(%rsi), %ecx
xorl %ebx, %ebx
testl %ecx, %ecx
movl $0x8a, %eax
movl $0x7, %ebp
cmovel %eax, %ebp
setne %bl
addl $0x3, %ebx
movslq %edx, %rdx
orw $-0x1, 0x6(%rsi,%rdx,4)
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movl $0x4, %r9d
movl $0x3, %r10d
movl %r11d, %r15d
xorl %r14d, %r14d
cmpq %rdx, %r8
jg 0x5af1
movl %ecx, %r11d
movzwl 0x6(%rsi,%r8,4), %ecx
incq %r8
incl %r14d
cmpl %ebp, %r14d
jge 0x5a82
cmpl %ecx, %r11d
je 0x5a60
movl %r11d, %r12d
cmpl %ebx, %r14d
jge 0x5a9d
addl 0xd90(%rdi,%r12,4), %r14d
movw %r14w, 0xd90(%rdi,%r12,4)
jmp 0x5ad2
testl %r11d, %r11d
je 0x5ab9
cmpl %r15d, %r11d
je 0x5ab0
incw 0xd90(%rdi,%r12,4)
incw 0xdd0(%rdi)
jmp 0x5ad2
decl %r14d
cmpl $0x9, %r14d
ja 0x5acb
incw 0xdd4(%rdi)
jmp 0x5ad2
incw 0xdd8(%rdi)
xorl %ebp, %ebp
cmpl %ecx, %r11d
sete %bpl
movl %r9d, %ebx
subl %ebp, %ebx
xorl $0x7, %ebp
testl %ecx, %ecx
cmovel %eax, %ebp
cmovel %r10d, %ebx
jmp 0x5a5a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x619a
pushq %rbx
movl %edx, %r8d
movl %edi, %ecx
shrl $0x10, %ecx
movzwl %di, %edi
movl $0x15b0, %r9d           # imm = 0x15B0
movl $0xfff1, %r10d          # imm = 0xFFF1
testl %r8d, %r8d
je 0x6190
cmpl %r9d, %r8d
movl $0x15b0, %eax           # imm = 0x15B0
cmovbl %r8d, %eax
movl %eax, %edx
cmpl $0x10, %edx
jb 0x6150
movzbl (%rsi), %r11d
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x1(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x2(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x3(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x4(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x5(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x6(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x7(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0x8(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0x9(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0xa(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0xb(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0xc(%rsi), %edi
addq %r11, %rdi
addq %rdi, %rcx
movzbl 0xd(%rsi), %r11d
addq %rdi, %r11
addq %r11, %rcx
movzbl 0xe(%rsi), %ebx
addq %r11, %rbx
addq %rbx, %rcx
movzbl 0xf(%rsi), %edi
addq %rbx, %rdi
addq %rdi, %rcx
addq $0x10, %rsi
addl $-0x10, %edx
jmp 0x6094
testb $0xf, %al
je 0x6172
movl %eax, %edx
andl $0xf, %edx
xorl %r11d, %r11d
movzbl (%rsi,%r11), %ebx
addq %rbx, %rdi
addq %rdi, %rcx
incq %r11
cmpl %r11d, %edx
jne 0x615c
addq %r11, %rsi
subl %eax, %r8d
movq %rdi, %rax
xorl %edx, %edx
divq %r10
movq %rdx, %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %r10
movq %rdx, %rcx
jmp 0x607d
shlq $0x10, %rcx
orq %rdi, %rcx
popq %rbx
jmp 0x61a4
movabsq $0x1, %rcx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x61be
movq 0x68(%rbx), %rax
movq %rax, (%rdx)
movl (%rbx), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x4, %ecx
jne 0x61d8
movq 0x70(%r14), %rdi
movq 0x10(%rbx), %rsi
callq *0x68(%r14)
movl (%rbx), %eax
cmpl $0x6, %eax
jne 0x61e9
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x7b9d
andl $0x0, (%rbx)
andl $0x0, 0x2c(%rbx)
andq $0x0, 0x30(%rbx)
movq 0x40(%rbx), %rcx
movq 0x60(%rbx), %rax
movq %rcx, 0x58(%rbx)
movq %rcx, 0x50(%rbx)
testq %rax, %rax
je 0x621d
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq *%rax
movq %rax, 0x68(%rbx)
movq %rax, 0x80(%r14)
movslq 0x48(%r14), %rax
addq %rax, %rax
xorl %ecx, %ecx
cmpq %rax, %rcx
jge 0x623f
andq $0x0, 0x70(%rbx,%rcx,8)
andq $0x0, 0x80(%rbx,%rcx,8)
incq %rcx
jmp 0x6226
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, 0x4(%rsp)
movq 0x70(%r8), %rdi
pushq $0x13
popq %rsi
pushq $0x4
popq %rdx
callq *0x60(%r8)
testq %rax, %rax
je 0x8087
movq %rax, %r14
leaq 0x4(%rsp), %rax
pushq $0x13
popq %rdx
movq %rbp, %rdi
movl %edx, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r13, %r9
pushq %r14
pushq %rax
pushq %r12
pushq %r15
callq 0x80bb
addq $0x20, %rsp
cmpl $-0x5, %eax
je 0x8092
movl %eax, %ebp
cmpl $-0x3, %eax
jne 0x808c
leaq 0x2d8b(%rip), %rax      # 0xae10
jmp 0x8099
pushq $-0x4
popq %rbp
jmp 0x80aa
cmpl $0x0, (%r15)
jne 0x80a0
leaq 0x2d9f(%rip), %rax      # 0xae38
movq %rax, 0x50(%rbx)
pushq $-0x3
popq %rbp
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_O2/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 0x877a
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 0x87c8
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 0x87e7
movl %r15d, %r13d
jmp 0x8863
movq %rbp, (%rsp)
movq 0x40(%rbx), %rax
movq 0x58(%rbx), %rbp
cmpq %r12, %rbp
movq %rax, %r12
jne 0x8802
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 0x8848
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_O2/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 0x4cca
leaq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %esi
callq 0x59db
testq %rax, %rax
je 0x4cff
movq %rax, %rbx
cmpl $0x0, (%rax)
jne 0x4d13
leaq 0x5044(%rip), %rsi      # 0x9cc0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6044
testq %rax, %rax
je 0x4d32
movq %rax, %rdi
callq 0x4e08
leaq 0x5067(%rip), %rsi      # 0x9d05
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6044
testq %rax, %rax
je 0x4d4b
cmpl $0x3, (%rax)
jne 0x4cdd
cmpq $0x0, 0x8(%rax)
jne 0x4cdd
movq %rax, %rdi
callq 0x4e08
movq %rbx, %rax
popq %rbx
retq
cmpl $0x1, %eax
je 0x4cd4
cmpl $0x2, %eax
jne 0x4ce6
leaq 0x55a4(%rip), %rdi      # 0xa27f
jmp 0x4d06
leaq 0x55e8(%rip), %rdi      # 0xa2cc
jmp 0x4d06
leaq 0x5b31(%rip), %rdi      # 0xa81e
leaq 0x4b86(%rip), %rsi      # 0x987a
leaq 0x4f8a(%rip), %rcx      # 0x9c85
pushq $0x6a
jmp 0x4d62
leaq 0x5597(%rip), %rdi      # 0xa29d
callq 0x2090
pushq $0x1
popq %rdi
callq 0x2290
movq %rbx, %rsi
addq $0x4, %rsi
leaq 0x4f89(%rip), %rdi      # 0x9caa
xorl %eax, %eax
callq 0x2100
movq %rbx, %rdi
callq 0x588d
jmp 0x4d0b
leaq 0x4f90(%rip), %rdi      # 0x9cc9
leaq 0x4b3a(%rip), %rsi      # 0x987a
leaq 0x4f90(%rip), %rcx      # 0x9cd7
pushq $0x3b
jmp 0x4d62
leaq 0x4f77(%rip), %rdi      # 0x9cc9
leaq 0x4b21(%rip), %rsi      # 0x987a
leaq 0x4f77(%rip), %rcx      # 0x9cd7
pushq $0x40
popq %rdx
callq 0x2140
// File: /workspace/github_c_makefile_star2_O2/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 0x4f4d(%rip), %rsi      # 0x9cc0
xorl %eax, %eax
callq 0x6044
testq %rax, %rax
je 0x4dae
movq %rax, %rdi
callq 0x4e08
leaq 0x4fa2(%rip), %rsi      # 0x9d30
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6044
testq %rax, %rax
je 0x4dc7
movq %rax, %rdi
callq 0x4e08
movq %rbx, %rdi
popq %rbx
jmp 0x588d
leaq 0x4f14(%rip), %rdi      # 0x9cc9
leaq 0x4abe(%rip), %rsi      # 0x987a
leaq 0x4f49(%rip), %rcx      # 0x9d0c
pushq $0x51
jmp 0x4dde
leaq 0x4efb(%rip), %rdi      # 0x9cc9
leaq 0x4aa5(%rip), %rsi      # 0x987a
leaq 0x4f30(%rip), %rcx      # 0x9d0c
pushq $0x54
popq %rdx
callq 0x2140
// File: /workspace/github_c_makefile_star2_O2/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 0x5900
pushq %rbx
movq %rdi, %rbx
movl 0x84(%rdi), %edi
testl %edi, %edi
jle 0x58a5
callq 0x2160
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x58b6
callq 0x63a6
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x58c7
callq 0x74f5
movq 0xb0(%rbx), %rdi
callq 0x2040
movq 0xb8(%rbx), %rdi
callq 0x2040
movq 0xc8(%rbx), %rdi
callq 0x2040
movq 0xa8(%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
popq %rbx
jmp 0x2040
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x1
popq %rbp
cmpl $0x0, (%rdi)
jne 0x5da2
movq %rsi, %rbx
movq %rdi, %r14
movq 0x90(%rdi), %rsi
movslq -0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x5d89
movl 0x84(%r14), %edi
callq 0x20d0
cmpl $-0x1, %eax
je 0x5d55
testl %eax, %eax
jle 0x5d89
movq 0x90(%r14), %rdi
cmpl %eax, -0x8(%rdi)
jne 0x5d7f
callq 0x63a6
callq 0x636e
movq %rax, 0x90(%r14)
jmp 0x5d89
callq 0x2060
movl (%rax), %eax
cmpl $0x4, %eax
je 0x5d89
cmpl $0xb, %eax
jne 0x5d70
testb $0x1, 0x88(%r14)
je 0x5d89
pushq $0x1
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x57f6
jmp 0x5da2
pushq $-0x1
popq %rdx
movl %eax, %esi
callq 0x6b83
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x5da2
movq 0x90(%r14), %rax
xorl %ecx, %ecx
cmpl $0x0, -0x8(%rax)
sete %cl
movl %ecx, (%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x3
popq %rsi
xorl %eax, %eax
callq 0x20c0
cmpl $-0x1, %eax
je 0x85d1
xorl %edx, %edx
testl %r14d, %r14d
sete %dl
andl $0xfffff7ff, %eax       # imm = 0xFFFFF7FF
shll $0xb, %edx
orl %eax, %edx
movl 0x84(%rbx), %edi
pushq $0x4
popq %rsi
xorl %eax, %eax
callq 0x20c0
cmpl $-0x1, %eax
jne 0x85eb
leaq 0x244f(%rip), %rsi      # 0xaa1e
jmp 0x85d8
leaq 0x2437(%rip), %rsi      # 0xaa0f
movq %rbx, %rdi
callq 0x7f68
movq %rbx, %rdi
callq 0x86cf
pushq $-0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq