// File: /workspace/github_c_makefile_star2_O0/snej[P]zdelta/deflate.c
// Function: delta_deflate_slow
local block_state delta_deflate_slow(deflate_state *s, int flush){

  IPos hash_head = NIL;
  int bflush;           /* set if current block must be flushed */
  zd_streamp strm = s->strm;
  int refnum = strm->refnum;
  int rw; 
  /* data structures containing statistics for the sliding reference window */
  pointer_history ph;

  for(rw=0; rw<refnum; ++rw){
    ph.sum_len[rw]   = ph.sum_ptr[rw]  = 0;
    ph.front_ptr[rw] = ph.back_ptr[rw] = ph.ch_flag[rw] = 0;
  }

  for (;;){

    if (s->lookahead < MIN_LOOKAHEAD) {
      fill_window(s);
      if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
	return need_more;
      }
      if (s->lookahead == 0) break; /* flush the current block */
    }
    
    s->prev_length    = s->match_length;
    s->prev_match     = s->match_start;
    s->prev_ptr       = s->match_ptr;
    s->prev_sign      = s->match_sign;
    s->prev_distance  = s->match_distance;
    s->prev_benefit   = s->match_benefit;
    s->match_length   = MIN_MATCH - 1;
    s->match_distance = ZD_UNREACHABLE;
    s->match_benefit  = 0;
    if (s->lookahead >= MIN_MATCH && s->strategy!=ZD_HUFFMAN_ONLY) {
      INSERT_STRING(s, s->strstart, hash_head);
    
      /* Find the match giving the greates benefit */
      /* search in the reference data    */
      for(rw=0; rw<refnum; ++rw){
	if (s->ref_head[rw][s->ins_h] != NIL && 
	    s->match_length < s->max_lazy_match) 
	{
	  /* To simplify the code, we prevent matches with the string
	   * of window index 0 (in particular we have to avoid a match
	   * of the string with itself at the start of the input file).
	   */
	  reference_longest_match (s, s->ref_head[rw][s->ins_h], rw);
	  /* reference_longest_match() sets match_start, match_ptr, match_sign,
	   * match_length, match_distance
	   */
	}
      }
      /* search in the target data       */
      if (hash_head != NIL &&  s->match_length < s->max_lazy_match && 
	  s->strstart - hash_head <= ZD_UNREACHABLE) {
	/* To simplify the code, we prevent matches with the string
	 * of window index 0 (in particular we have to avoid a match
	 * of the string with itself at the start of the input file).
	 */
	target_longest_match (s, hash_head);
	/* target_longest_match() sets s->match_start, s->match_ptr,
	 * s->match_sign, s->match_length,  s->match_distance
	 */
      }
    }
    /* write the match
     * the minimum length is MIN_MATCH, so we can substract it and we'll
     * still have a positive number
     */
    if(s->prev_benefit>0 && s->prev_benefit>=s->match_benefit){ 
      /* the previous match is better than the current */

      uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
      /* Do not insert strings in hash table beyond this. */

      /* update best_ptr, but only if it is a base copy */
      if(s->prev_ptr != ZD_TARP){

	rw = s->prev_ptr/2;
	/* output reference window match */
	_tr_tally_dist_ref(s, s->prev_distance, s->prev_length-3,
			   ZCODE(s->prev_sign,s->prev_ptr), bflush);
	/* update reference pointers */
	UPDATE_REF_POINTERS(s->prev_ptr, s->prev_match, 
			    s->prev_length, s->prev_distance);

	/* slide reference data here */
	if(strm->base_avail[rw] > 0) 
	  slide_ref_window(s, &ph, rw, s->prev_length, s->prev_match);
      }
      else{
	/* output target match */
	_tr_tally_dist_tar(s, s->prev_distance, s->prev_length-3, bflush);
      }
      /* Insert in hash table all strings up to the end of the match.
       * strstart-1 and strstart are already inserted. If there is not
       * enough lookahead, the last two strings are not inserted in
       * the hash table.
       */
      s->lookahead -= s->prev_length-1;
      s->prev_length -= 2;
      do {
	if (++s->strstart <= max_insert) {
	  INSERT_STRING(s, s->strstart, hash_head);
	}
      } while (--s->prev_length != 0);
      s->match_available = 0;
      s->match_length   = MIN_MATCH-1;
      s->match_distance = ZD_UNREACHABLE;
      s->match_benefit  = 0;
      s->strstart++; 
      if (bflush) FLUSH_BLOCK(s, 0);
    }
    else if(s->match_available){
      /* If there was no match at the previous position, output a
       * single literal. If there was a match but the current match
       * is longer, truncate the previous match to a single literal.
       */
      _tr_tally_lit(s, s->window[s->strstart-1], bflush);
      if (bflush) {
	FLUSH_BLOCK_ONLY(s, 0);
      }
      s->strstart++;
      s->lookahead--;
      if (s->strm->avail_out == 0) return need_more;
    }
    else{
      /* There is no previous match to compare with, wait for
       * the next step to decide.
       */
      s->match_available = 1;
      s->strstart++;
      s->lookahead--;
    }
  }

  if (s->match_available) {
    _tr_tally_lit(s, s->window[s->strstart-1], bflush);
    s->match_available = 0;
  }
  
  FLUSH_BLOCK(s, flush == ZD_FINISH);
  return flush == ZD_FINISH ? finish_done : block_done;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3f60, %rsp           # imm = 0x3F60
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x4386
movslq -0x30(%rbp), %rax
movq $0x0, -0x50(%rbp,%rax,8)
movslq -0x30(%rbp), %rax
movq $0x0, -0x58(%rbp,%rax,8)
movslq -0x30(%rbp), %rax
movl $0x0, -0x38(%rbp,%rax,4)
movslq -0x30(%rbp), %rax
movl $0x0, -0x3c(%rbp,%rax,4)
movslq -0x30(%rbp), %rax
movl $0x0, -0x40(%rbp,%rax,4)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4335
jmp 0x4388
movq -0x10(%rbp), %rax
cmpl $0x1006, 0xbc(%rax)     # imm = 0x1006
jae 0x43d7
movq -0x10(%rbp), %rdi
callq 0x5140
movq -0x10(%rbp), %rax
cmpl $0x1006, 0xbc(%rax)     # imm = 0x1006
jae 0x43c3
cmpl $0x0, -0x14(%rbp)
jne 0x43c3
movl $0x0, -0x4(%rbp)
jmp 0x512b
movq -0x10(%rbp), %rax
cmpl $0x0, 0xbc(%rax)
jne 0x43d5
jmp 0x4f8a
jmp 0x43d7
movq -0x10(%rbp), %rax
movl 0xa8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movq -0x10(%rbp), %rax
movl 0xb8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xac(%rax)
movq -0x10(%rbp), %rax
movl 0xc0(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc4(%rax)
movq -0x10(%rbp), %rax
movl 0xc8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xcc(%rax)
movq -0x10(%rbp), %rax
movq 0xd0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
movq -0x10(%rbp), %rax
movl 0xe0(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe8(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0xa8(%rax)
movq -0x10(%rbp), %rax
movq $0x8000, 0xd0(%rax) # imm = 0x8000
movq -0x10(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x10(%rbp), %rax
cmpl $0x3, 0xbc(%rax)
jb 0x4602
movq -0x10(%rbp), %rax
cmpl $0x0, 0xf8(%rax)
je 0x4602
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x9c(%rcx), %ecx
shll %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rdx
movl 0xb4(%rdx), %edx
addl $0x2, %edx
movl %edx, %edx
movzbl (%rax,%rdx), %eax
xorl %eax, %ecx
movq -0x10(%rbp), %rax
andl 0x98(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x88(%rcx), %ecx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x18(%rbp)
movw %ax, %dx
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0xb4(%rcx), %ecx
movq -0x10(%rbp), %rsi
andl 0x40(%rsi), %ecx
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x88(%rcx), %ecx
movw %dx, (%rax,%rcx,2)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x45c4
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq 0x80(%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movl 0x88(%rcx), %ecx
movzwl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
je 0x45b7
movq -0x10(%rbp), %rax
movl 0xa8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xf0(%rcx), %eax
jae 0x45b7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq 0x80(%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movl 0x88(%rcx), %ecx
movzwl (%rax,%rcx,2), %esi
movl -0x30(%rbp), %edx
callq 0x5510
jmp 0x45b9
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x454c
cmpl $0x0, -0x18(%rbp)
je 0x4600
movq -0x10(%rbp), %rax
movl 0xa8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xf0(%rcx), %eax
jae 0x4600
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
subl -0x18(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
ja 0x4600
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x5c30
jmp 0x4602
movq -0x10(%rbp), %rax
cmpl $0x0, 0xe8(%rax)
jle 0x4db3
movq -0x10(%rbp), %rax
movl 0xe8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xe0(%rcx), %eax
jl 0x4db3
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0xbc(%rcx), %eax
subl $0x3, %eax
movl %eax, -0x3edc(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0xc4(%rax)
je 0x49b9
movq -0x10(%rbp), %rax
movl 0xc4(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0xe4(%rax), %eax
subl $0x3, %eax
movw %ax, -0x3ede(%rbp)
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rax
movw %ax, -0x3ee0(%rbp)
movw -0x3ee0(%rbp), %dx
movq -0x10(%rbp), %rax
movq 0x1a48(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x1a44(%rcx), %ecx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movl 0xcc(%rax), %eax
movq -0x10(%rbp), %rcx
orl 0xc4(%rcx), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq 0x1a50(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x1a44(%rcx), %ecx
movb %dl, (%rax,%rcx)
movw -0x3ede(%rbp), %dx
movq -0x10(%rbp), %rax
movq 0x1a38(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x1a44(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x1a44(%rsi)
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
addq $0x104, %rax            # imm = 0x104
movq %rax, -0x3ef0(%rbp)
movzwl -0x3ede(%rbp), %eax
cmpl $0x100, %eax            # imm = 0x100
jge 0x474c
movzwl -0x3ede(%rbp), %eax
movl %eax, %ecx
leaq 0xbc90(%rip), %rax      # 0x103d0
movzbl (%rax,%rcx), %eax
movl %eax, -0x3ef4(%rbp)
jmp 0x479f
movzwl -0x3ede(%rbp), %eax
cmpl $0xfff, %eax            # imm = 0xFFF
jne 0x4770
leaq 0xbc6f(%rip), %rax      # 0x103d0
movzbl 0x140(%rax), %eax
movl %eax, -0x3ef8(%rbp)
jmp 0x4793
movzwl -0x3ede(%rbp), %eax
sarl $0x6, %eax
addl $0x100, %eax            # imm = 0x100
movslq %eax, %rcx
leaq 0xbc47(%rip), %rax      # 0x103d0
movzbl (%rax,%rcx), %eax
movl %eax, -0x3ef8(%rbp)
movl -0x3ef8(%rbp), %eax
movl %eax, -0x3ef4(%rbp)
movq -0x3ef0(%rbp), %rax
movl -0x3ef4(%rbp), %ecx
movq -0x10(%rbp), %rdx
movl 0xcc(%rdx), %edi
movq -0x10(%rbp), %rdx
orl 0xc4(%rdx), %edi
andl $0x80, %edi
movl $0x4a, %edx
movl $0x25, %esi
cmpl $0x0, %edi
cmovnel %esi, %edx
addl %edx, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,4), %dx
addw $0x1, %dx
movw %dx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
addq $0x480, %rax            # imm = 0x480
movq %rax, -0x3f00(%rbp)
movzwl -0x3ee0(%rbp), %eax
cmpl $0x100, %eax            # imm = 0x100
jge 0x4822
movzwl -0x3ee0(%rbp), %eax
movl %eax, %ecx
leaq 0xb9ba(%rip), %rax      # 0x101d0
movzbl (%rax,%rcx), %eax
movl %eax, -0x3f04(%rbp)
jmp 0x4845
movzwl -0x3ee0(%rbp), %eax
sarl $0x7, %eax
addl $0x100, %eax            # imm = 0x100
movslq %eax, %rcx
leaq 0xb995(%rip), %rax      # 0x101d0
movzbl (%rax,%rcx), %eax
movl %eax, -0x3f04(%rbp)
movq -0x3f00(%rbp), %rax
movl -0x3f04(%rbp), %ecx
addl $0x101, %ecx            # imm = 0x101
movslq %ecx, %rcx
movw (%rax,%rcx,4), %dx
addw $0x1, %dx
movw %dx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0xcc(%rcx), %ecx
movq -0x10(%rbp), %rdx
orl 0xc4(%rdx), %ecx
andl $0x1f, %ecx
movl %ecx, %ecx
movw 0xd7c(%rax,%rcx,4), %dx
addw $0x1, %dx
movw %dx, 0xd7c(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x1a44(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x1a40(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x100, 0xd8(%rax) # imm = 0x100
jbe 0x4933
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xc4(%rcx), %rcx
cmpl $0x0, 0x1a88(%rax,%rcx,4)
je 0x4902
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xc4(%rcx), %rcx
movl $0x0, 0x1a88(%rax,%rcx,4)
jmp 0x4931
movq -0x10(%rbp), %rax
movl 0xac(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0xe4(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xc4(%rcx), %rcx
movq %rdx, 0x1a78(%rax,%rcx,8)
jmp 0x497c
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xc4(%rcx), %rcx
movl $0x1, 0x1a88(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0xac(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0xe4(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xc4(%rcx), %rcx
movq %rdx, 0x1a78(%rax,%rcx,8)
movq -0x28(%rbp), %rax
movslq -0x30(%rbp), %rcx
cmpq $0x0, 0x40(%rax,%rcx,8)
jbe 0x49b4
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0xe4(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0xac(%rax), %r8d
leaq -0x3ed8(%rbp), %rsi
callq 0x6100
jmp 0x4b93
movq -0x10(%rbp), %rax
movl 0xe4(%rax), %eax
subl $0x3, %eax
movw %ax, -0x3ee2(%rbp)
movq -0x10(%rbp), %rax
movq 0xd8(%rax), %rax
movw %ax, -0x3ee4(%rbp)
movw -0x3ee4(%rbp), %dx
movq -0x10(%rbp), %rax
movq 0x1a48(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x1a44(%rcx), %ecx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movq 0x1a50(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x1a44(%rcx), %ecx
movb $0x20, (%rax,%rcx)
movw -0x3ee2(%rbp), %dx
movq -0x10(%rbp), %rax
movq 0x1a38(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x1a44(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x1a44(%rsi)
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
addq $0x104, %rax            # imm = 0x104
movq %rax, -0x3f10(%rbp)
movzwl -0x3ee2(%rbp), %eax
cmpl $0x100, %eax            # imm = 0x100
jge 0x4a80
movzwl -0x3ee2(%rbp), %eax
movl %eax, %ecx
leaq 0xb95c(%rip), %rax      # 0x103d0
movzbl (%rax,%rcx), %eax
movl %eax, -0x3f14(%rbp)
jmp 0x4ad3
movzwl -0x3ee2(%rbp), %eax
cmpl $0xfff, %eax            # imm = 0xFFF
jne 0x4aa4
leaq 0xb93b(%rip), %rax      # 0x103d0
movzbl 0x140(%rax), %eax
movl %eax, -0x3f18(%rbp)
jmp 0x4ac7
movzwl -0x3ee2(%rbp), %eax
sarl $0x6, %eax
addl $0x100, %eax            # imm = 0x100
movslq %eax, %rcx
leaq 0xb913(%rip), %rax      # 0x103d0
movzbl (%rax,%rcx), %eax
movl %eax, -0x3f18(%rbp)
movl -0x3f18(%rbp), %eax
movl %eax, -0x3f14(%rbp)
movq -0x3f10(%rbp), %rax
movl -0x3f14(%rbp), %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,4), %dx
addw $0x1, %dx
movw %dx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
addq $0x480, %rax            # imm = 0x480
movq %rax, -0x3f20(%rbp)
movzwl -0x3ee4(%rbp), %eax
cmpl $0x100, %eax            # imm = 0x100
jge 0x4b2a
movzwl -0x3ee4(%rbp), %eax
movl %eax, %ecx
leaq 0xb6b2(%rip), %rax      # 0x101d0
movzbl (%rax,%rcx), %eax
movl %eax, -0x3f24(%rbp)
jmp 0x4b4d
movzwl -0x3ee4(%rbp), %eax
sarl $0x7, %eax
addl $0x100, %eax            # imm = 0x100
movslq %eax, %rcx
leaq 0xb68d(%rip), %rax      # 0x101d0
movzbl (%rax,%rcx), %eax
movl %eax, -0x3f24(%rbp)
movq -0x3f20(%rbp), %rax
movl -0x3f24(%rbp), %ecx
addl $0x101, %ecx            # imm = 0x101
movslq %ecx, %rcx
movw (%rax,%rcx,4), %dx
addw $0x1, %dx
movw %dx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x1a44(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x1a40(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0xe4(%rax), %edx
subl $0x1, %edx
movq -0x10(%rbp), %rax
movl 0xbc(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0xbc(%rax)
movq -0x10(%rbp), %rax
movl 0xe4(%rax), %ecx
subl $0x2, %ecx
movl %ecx, 0xe4(%rax)
movq -0x10(%rbp), %rcx
movl 0xb4(%rcx), %eax
addl $0x1, %eax
movl %eax, 0xb4(%rcx)
cmpl -0x3edc(%rbp), %eax
ja 0x4c8b
movq -0x10(%rbp), %rax
movl 0x88(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x9c(%rcx), %ecx
shll %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rdx
movl 0xb4(%rdx), %edx
addl $0x2, %edx
movl %edx, %edx
movzbl (%rax,%rdx), %eax
xorl %eax, %ecx
movq -0x10(%rbp), %rax
andl 0x98(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x88(%rcx), %ecx
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x18(%rbp)
movw %ax, %dx
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0xb4(%rcx), %ecx
movq -0x10(%rbp), %rsi
andl 0x40(%rsi), %ecx
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x88(%rcx), %ecx
movw %dx, (%rax,%rcx,2)
jmp 0x4c8d
movq -0x10(%rbp), %rcx
movl 0xe4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0xe4(%rcx)
cmpl $0x0, %eax
jne 0x4bc5
movq -0x10(%rbp), %rax
movl $0x0, 0xb0(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0xa8(%rax)
movq -0x10(%rbp), %rax
movq $0x8000, 0xd0(%rax) # imm = 0x8000
movq -0x10(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xb4(%rax)
cmpl $0x0, -0x1c(%rbp)
je 0x4dae
movq -0x10(%rbp), %rax
movq %rax, -0x3f30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
jl 0x4d39
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x3f38(%rbp)
jmp 0x4d44
xorl %eax, %eax
movq %rax, -0x3f38(%rbp)
jmp 0x4d44
movq -0x3f30(%rbp), %rdi
movq -0x3f38(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
subq 0xa0(%rax), %rdx
xorl %ecx, %ecx
callq 0x7ce0
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3280
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0x4dac
movl $0x0, -0x4(%rbp)
jmp 0x512b
jmp 0x4dae
jmp 0x4f85
movq -0x10(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
je 0x4f4f
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0xb4(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x3ee5(%rbp)
movq -0x10(%rbp), %rax
movq 0x1a50(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x1a44(%rcx), %ecx
movb $0x40, (%rax,%rcx)
movzbl -0x3ee5(%rbp), %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movq 0x1a48(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x1a44(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x1a44(%rsi)
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movzbl -0x3ee5(%rbp), %ecx
movw 0x480(%rax,%rcx,4), %dx
addw $0x1, %dx
movw %dx, 0x480(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x1a44(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x1a40(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x4f0e
movq -0x10(%rbp), %rax
movq %rax, -0x3f40(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
jl 0x4eb4
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x3f48(%rbp)
jmp 0x4ebf
xorl %eax, %eax
movq %rax, -0x3f48(%rbp)
jmp 0x4ebf
movq -0x3f40(%rbp), %rdi
movq -0x3f48(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
subq 0xa0(%rax), %rdx
xorl %ecx, %ecx
callq 0x7ce0
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3280
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xb4(%rax)
movq -0x10(%rbp), %rax
movl 0xbc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xbc(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0x4f4d
movl $0x0, -0x4(%rbp)
jmp 0x512b
jmp 0x4f83
movq -0x10(%rbp), %rax
movl $0x1, 0xb0(%rax)
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xb4(%rax)
movq -0x10(%rbp), %rax
movl 0xbc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xbc(%rax)
jmp 0x4f85
jmp 0x4388
movq -0x10(%rbp), %rax
cmpl $0x0, 0xb0(%rax)
je 0x5055
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0xb4(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x3ee6(%rbp)
movq -0x10(%rbp), %rax
movq 0x1a50(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x1a44(%rcx), %ecx
movb $0x40, (%rax,%rcx)
movzbl -0x3ee6(%rbp), %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movq 0x1a48(%rax), %rax
movq -0x10(%rbp), %rsi
movl 0x1a44(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x1a44(%rsi)
movl %ecx, %ecx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movzbl -0x3ee6(%rbp), %ecx
movw 0x480(%rax,%rcx,4), %dx
addw $0x1, %dx
movw %dx, 0x480(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl 0x1a44(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x1a40(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0xb0(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x3f50(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
jl 0x508f
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0xa0(%rcx), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x3f58(%rbp)
jmp 0x509a
xorl %eax, %eax
movq %rax, -0x3f58(%rbp)
jmp 0x509a
movq -0x3f50(%rbp), %rdi
movq -0x3f58(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
subq 0xa0(%rax), %rdx
cmpl $0x4, -0x14(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x7ce0
movq -0x10(%rbp), %rax
movl 0xb4(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x3280
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x20(%rax)
jne 0x5115
movl -0x14(%rbp), %edx
xorl %eax, %eax
movl $0x2, %ecx
cmpl $0x4, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x512b
movl -0x14(%rbp), %edx
movl $0x1, %eax
movl $0x3, %ecx
cmpl $0x4, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x3f60, %rsp           # imm = 0x3F60
popq %rbp
retq
nopw (%rax,%rax)