// File: /workspace/github_c_makefile_star2_O0/snej[P]zdelta/deflate.c
// Function: lm_init
local void lm_init (s)
    deflate_state *s;
{
  int i;
  int refnum = s->strm->refnum;
  s->window_size = (ulg)2L*s->w_size;
  /*s->ref_window_size = (ulg)2L*s->w_size;*/

  s->strstart = 0;
  s->block_start = 0L;
  s->lookahead = 0;
  s->match_length = s->prev_length = MIN_MATCH-1;
  s->match_available = 0;
  s->ins_h = 0;
  s->match_benefit   = s->prev_benefit = 0;

  /* Set the default configuration parameters:
   */
  s->max_lazy_match   = configuration_table[s->level].max_lazy;
  s->good_match       = configuration_table[s->level].good_length;
  s->max_chain_length = configuration_table[s->level].max_chain;
  s->nice_match       = configuration_table[s->level].nice_length;

  /* zdelta: initialize reference data pointers */
  for(i=0; i<refnum*ZD_RPN; ++i){ 
    s->rwptr[i] = s->rwptr_save[i] = 0;
    s->stable[i] = s->stable_save[i] = 0;
  }
  for(i=0; i<refnum; ++i){
    s->stored_allowed[i] = 1;
    s->ref_window_size[i]  = (ulg)2L*s->w_size;
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x48(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, %ecx
shlq %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xb4(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xbc(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0xe4(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0xa8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xb0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xe8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x8(%rbp), %rax
movslq 0xf4(%rax), %rcx
leaq 0x11bf6(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x2(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xf0(%rax)
movq -0x8(%rbp), %rax
movslq 0xf4(%rax), %rcx
leaq 0x11bcf(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movzwl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xfc(%rax)
movq -0x8(%rbp), %rax
movslq 0xf4(%rax), %rcx
leaq 0x11ba9(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x6(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xec(%rax)
movq -0x8(%rbp), %rax
movslq 0xf4(%rax), %rcx
leaq 0x11b82(%rip), %rax     # 0x13d40
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x100(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x223f
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, 0x1a90(%rax,%rcx,8)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, 0x1a78(%rax,%rcx,8)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl $0x0, 0x1aa0(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl $0x0, 0x1a88(%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x21da
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x2282
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movb $0x1, 0x1aa8(%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, %edx
shlq %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, 0x60(%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2246
popq %rbp
retq
nopw %cs:(%rax,%rax)