// File: Alcaro[P]bridges/arlib/deps/miniz.c
// Function: tdefl_compress_fast
static mz_bool tdefl_compress_fast(tdefl_compressor *d)
{
  // Faster, minimally featured LZRW1-style match+parse loop with better register utilization. Intended for applications where raw throughput is valued more highly than ratio.
  mz_uint lookahead_pos = d->m_lookahead_pos, lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, total_lz_bytes = d->m_total_lz_bytes, num_flags_left = d->m_num_flags_left;
  mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags;
  mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK;

  while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size)))
  {
    const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096;
    mz_uint dst_pos = (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK;
    mz_uint num_bytes_to_process = (mz_uint)MZ_MIN(d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size);
    d->m_src_buf_left -= num_bytes_to_process;
    lookahead_size += num_bytes_to_process;

    while (num_bytes_to_process)
    {
      mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process);
      memcpy(d->m_dict + dst_pos, d->m_pSrc, n);
      if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1))
        memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos));
      d->m_pSrc += n;
      dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK;
      num_bytes_to_process -= n;
    }

    dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size);
    if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) break;

    while (lookahead_size >= 4)
    {
      mz_uint cur_match_dist, cur_match_len = 1;
      mz_uint8 *pCur_dict = d->m_dict + cur_pos;
      mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF;
      mz_uint hash = (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & TDEFL_LEVEL1_HASH_SIZE_MASK;
      mz_uint probe_pos = d->m_hash[hash];
      d->m_hash[hash] = (mz_uint16)lookahead_pos;

      if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= dict_size) && ((*(const mz_uint32 *)(d->m_dict + (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & 0xFFFFFF) == first_trigram))
      {
        const mz_uint16 *p = (const mz_uint16 *)pCur_dict;
        const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos);
        mz_uint32 probe_len = 32;
        do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) &&
          (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) );
        cur_match_len = ((mz_uint)(p - (const mz_uint16 *)pCur_dict) * 2) + (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q);
        if (!probe_len)
          cur_match_len = cur_match_dist ? TDEFL_MAX_MATCH_LEN : 0;

        if ((cur_match_len < TDEFL_MIN_MATCH_LEN) || ((cur_match_len == TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 8U*1024U)))
        {
          cur_match_len = 1;
          *pLZ_code_buf++ = (mz_uint8)first_trigram;
          *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
          d->m_huff_count[0][(mz_uint8)first_trigram]++;
        }
        else
        {
          mz_uint32 s0, s1;
          cur_match_len = MZ_MIN(cur_match_len, lookahead_size);

          MZ_ASSERT((cur_match_len >= TDEFL_MIN_MATCH_LEN) && (cur_match_dist >= 1) && (cur_match_dist <= TDEFL_LZ_DICT_SIZE));

          cur_match_dist--;

          pLZ_code_buf[0] = (mz_uint8)(cur_match_len - TDEFL_MIN_MATCH_LEN);
          *(mz_uint16 *)(&pLZ_code_buf[1]) = (mz_uint16)cur_match_dist;
          pLZ_code_buf += 3;
          *pLZ_flags = (mz_uint8)((*pLZ_flags >> 1) | 0x80);

          s0 = s_tdefl_small_dist_sym[cur_match_dist & 511];
          s1 = s_tdefl_large_dist_sym[cur_match_dist >> 8];
          d->m_huff_count[1][(cur_match_dist < 512) ? s0 : s1]++;

          d->m_huff_count[0][s_tdefl_len_sym[cur_match_len - TDEFL_MIN_MATCH_LEN]]++;
        }
      }
      else
      {
        *pLZ_code_buf++ = (mz_uint8)first_trigram;
        *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
        d->m_huff_count[0][(mz_uint8)first_trigram]++;
      }

      if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; }

      total_lz_bytes += cur_match_len;
      lookahead_pos += cur_match_len;
      dict_size = MZ_MIN(dict_size + cur_match_len, TDEFL_LZ_DICT_SIZE);
      cur_pos = (cur_pos + cur_match_len) & TDEFL_LZ_DICT_SIZE_MASK;
      MZ_ASSERT(lookahead_size >= cur_match_len);
      lookahead_size -= cur_match_len;

      if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8])
      {
        int n;
        d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
        d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
        if ((n = tdefl_flush_block(d, 0)) != 0)
          return (n < 0) ? MZ_FALSE : MZ_TRUE;
        total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left;
      }
    }

    while (lookahead_size)
    {
      mz_uint8 lit = d->m_dict[cur_pos];

      total_lz_bytes++;
      *pLZ_code_buf++ = lit;
      *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1);
      if (--num_flags_left == 0) { num_flags_left = 8; pLZ_flags = pLZ_code_buf++; }

      d->m_huff_count[0][lit]++;

      lookahead_pos++;
      dict_size = MZ_MIN(dict_size + 1, TDEFL_LZ_DICT_SIZE);
      cur_pos = (cur_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK;
      lookahead_size--;

      if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8])
      {
        int n;
        d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
        d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
        if ((n = tdefl_flush_block(d, 0)) != 0)
          return (n < 0) ? MZ_FALSE : MZ_TRUE;
        total_lz_bytes = d->m_total_lz_bytes; pLZ_code_buf = d->m_pLZ_code_buf; pLZ_flags = d->m_pLZ_flags; num_flags_left = d->m_num_flags_left;
      }
    }
  }

  d->m_lookahead_pos = lookahead_pos; d->m_lookahead_size = lookahead_size; d->m_dict_size = dict_size;
  d->m_total_lz_bytes = total_lz_bytes; d->m_pLZ_code_buf = pLZ_code_buf; d->m_pLZ_flags = pLZ_flags; d->m_num_flags_left = num_flags_left;
  return MZ_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, 0xb8(%rcx)
movb %al, -0x99(%rbp)
jne 0x5cc68
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0xa8(%rcx)
movb %al, -0x9a(%rbp)
je 0x5cc5c
cmpl $0x0, -0x18(%rbp)
setne %al
movb %al, -0x9a(%rbp)
movb -0x9a(%rbp), %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x5cc77
jmp 0x5d5a2
movl $0x1000, -0x40(%rbp)    # imm = 0x1000
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movl $0x1000, %ecx           # imm = 0x1000
subl -0x18(%rbp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x5ccba
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq %rax, -0xa8(%rbp)
jmp 0x5cccb
movl $0x1000, %eax           # imm = 0x1000
subl -0x18(%rbp), %eax
movl %eax, %eax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0xb8(%rax)
movl -0x48(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x5ce0c
movl $0x8000, %eax           # imm = 0x8000
subl -0x44(%rbp), %eax
cmpl -0x48(%rbp), %eax
jae 0x5cd1f
movl $0x8000, %eax           # imm = 0x8000
subl -0x44(%rbp), %eax
movl %eax, -0xac(%rbp)
jmp 0x5cd28
movl -0x48(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc8, %rdi
movl -0x44(%rbp), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rsi
movl -0x4c(%rbp), %eax
movl %eax, %edx
callq 0x4280
cmpl $0x101, -0x44(%rbp)     # imm = 0x101
jae 0x5cdd4
movq -0x10(%rbp), %rax
addq $0xc8, %rax
addq $0x8000, %rax           # imm = 0x8000
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0xb8(%rbp)
movl -0x4c(%rbp), %eax
movl $0x101, %ecx            # imm = 0x101
subl -0x44(%rbp), %ecx
cmpl %ecx, %eax
jae 0x5cda9
movl -0x4c(%rbp), %eax
movl %eax, -0xc4(%rbp)
jmp 0x5cdb7
movl $0x101, %eax            # imm = 0x101
subl -0x44(%rbp), %eax
movl %eax, -0xc4(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xc0(%rbp), %rdi
movl -0xc4(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x4280
movl -0x4c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0xb0(%rax)
movl -0x44(%rbp), %eax
addl -0x4c(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, -0x44(%rbp)
movl -0x4c(%rbp), %ecx
movl -0x48(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x48(%rbp)
jmp 0x5ccf8
movl $0x8000, %eax           # imm = 0x8000
subl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x5ce29
movl $0x8000, %eax           # imm = 0x8000
subl -0x18(%rbp), %eax
movl %eax, -0xc8(%rbp)
jmp 0x5ce32
movl -0x1c(%rbp), %eax
movl %eax, -0xc8(%rbp)
movl -0xc8(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xa8(%rax)
jne 0x5ce56
cmpl $0x1000, -0x18(%rbp)    # imm = 0x1000
jae 0x5ce56
jmp 0x5d5a2
jmp 0x5ce58
cmpl $0x4, -0x18(%rbp)
jb 0x5d3e9
movl $0x1, -0x54(%rbp)
movq -0x10(%rbp), %rax
addq $0xc8, %rax
movl -0x3c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl (%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl -0x64(%rbp), %ecx
shrl $0x11, %ecx
xorl %ecx, %eax
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl -0x68(%rbp), %ecx
movzwl 0x292aa(%rax,%rcx,2), %eax
movl %eax, -0x6c(%rbp)
movl -0x14(%rbp), %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movl -0x68(%rbp), %ecx
movw %dx, 0x292aa(%rax,%rcx,2)
movl -0x14(%rbp), %eax
subl -0x6c(%rbp), %eax
movzwl %ax, %eax
movl %eax, -0x50(%rbp)
cmpl -0x1c(%rbp), %eax
ja 0x5d22c
movq -0x10(%rbp), %rax
movl -0x6c(%rbp), %ecx
andl $0x7fff, %ecx           # imm = 0x7FFF
movl %ecx, -0x6c(%rbp)
movl %ecx, %ecx
movl 0xc8(%rax,%rcx), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
cmpl -0x64(%rbp), %eax
jne 0x5d22c
movq -0x60(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
addq $0xc8, %rax
movl -0x6c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movl $0x20, -0x84(%rbp)
jmp 0x5cf29
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x78(%rbp)
movzwl 0x2(%rax), %ecx
movq -0x80(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x80(%rbp)
movzwl 0x2(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xc9(%rbp)
jne 0x5d010
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x78(%rbp)
movzwl 0x2(%rax), %ecx
movq -0x80(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x80(%rbp)
movzwl 0x2(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xc9(%rbp)
jne 0x5d010
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x78(%rbp)
movzwl 0x2(%rax), %ecx
movq -0x80(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x80(%rbp)
movzwl 0x2(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xc9(%rbp)
jne 0x5d010
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x78(%rbp)
movzwl 0x2(%rax), %ecx
movq -0x80(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x80(%rbp)
movzwl 0x2(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xc9(%rbp)
jne 0x5d010
movl -0x84(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x84(%rbp)
cmpl $0x0, %eax
seta %al
movb %al, -0xc9(%rbp)
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0x5cf27
movq -0x78(%rbp), %rax
movq -0x60(%rbp), %rcx
subq %rcx, %rax
sarq %rax
shll %eax
movq -0x78(%rbp), %rcx
movzbl (%rcx), %ecx
movq -0x80(%rbp), %rdx
movzbl (%rdx), %edx
cmpl %edx, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x84(%rbp)
jne 0x5d068
movl -0x50(%rbp), %edx
xorl %eax, %eax
movl $0x102, %ecx            # imm = 0x102
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x54(%rbp)
cmpl $0x3, -0x54(%rbp)
jb 0x5d07d
cmpl $0x3, -0x54(%rbp)
jne 0x5d0ce
cmpl $0x2000, -0x50(%rbp)    # imm = 0x2000
jb 0x5d0ce
movl $0x1, -0x54(%rbp)
movl -0x64(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
sarl %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movl -0x64(%rbp), %ecx
movzbl %cl, %ecx
movw 0x81ca(%rax,%rcx,2), %dx
addw $0x1, %dx
movw %dx, 0x81ca(%rax,%rcx,2)
jmp 0x5d22a
movl -0x54(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x5d0e1
movl -0x54(%rbp), %eax
movl %eax, -0xd0(%rbp)
jmp 0x5d0ea
movl -0x18(%rbp), %eax
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
movl %eax, -0x54(%rbp)
cmpl $0x3, -0x54(%rbp)
jb 0x5d10a
cmpl $0x1, -0x50(%rbp)
jb 0x5d10a
cmpl $0x8000, -0x50(%rbp)    # imm = 0x8000
ja 0x5d10a
jmp 0x5d129
leaq 0xdf38(%rip), %rdi      # 0x6b049
leaq 0xdec4(%rip), %rsi      # 0x6afdc
movl $0x3a0, %edx            # imm = 0x3A0
leaq 0xdf8f(%rip), %rcx      # 0x6b0b3
callq 0x4200
movl -0x50(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x50(%rbp)
movl -0x54(%rbp), %eax
subl $0x3, %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movl -0x50(%rbp), %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, 0x1(%rax)
movq -0x30(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
sarl %eax
orl $0x80, %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movl -0x50(%rbp), %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, %eax
movl %eax, %ecx
leaq 0xe2ad(%rip), %rax      # 0x6b430
movzbl (%rax,%rcx), %eax
movl %eax, -0x88(%rbp)
movl -0x50(%rbp), %eax
shrl $0x8, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0xe492(%rip), %rax      # 0x6b630
movzbl (%rax,%rcx), %eax
movl %eax, -0x8c(%rbp)
movq -0x10(%rbp), %rax
addq $0x81ca, %rax           # imm = 0x81CA
addq $0x240, %rax            # imm = 0x240
movq %rax, -0xd8(%rbp)
cmpl $0x200, -0x50(%rbp)     # imm = 0x200
jae 0x5d1d6
movl -0x88(%rbp), %eax
movl %eax, -0xdc(%rbp)
jmp 0x5d1e2
movl -0x8c(%rbp), %eax
movl %eax, -0xdc(%rbp)
movq -0xd8(%rbp), %rax
movl -0xdc(%rbp), %ecx
movl %ecx, %ecx
movw (%rax,%rcx,2), %dx
addw $0x1, %dx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movl -0x54(%rbp), %ecx
subl $0x3, %ecx
movl %ecx, %ecx
movl %ecx, %edx
leaq 0xe49e(%rip), %rcx      # 0x6b6b0
movzwl (%rcx,%rdx,2), %ecx
movw 0x81ca(%rax,%rcx,2), %dx
addw $0x1, %dx
movw %dx, 0x81ca(%rax,%rcx,2)
jmp 0x5d271
movl -0x64(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
sarl %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movl -0x64(%rbp), %ecx
movzbl %cl, %ecx
movw 0x81ca(%rax,%rcx,2), %dx
addw $0x1, %dx
movw %dx, 0x81ca(%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x5d299
movl $0x8, -0x24(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movl -0x54(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x54(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
addl -0x54(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jae 0x5d2c6
movl -0x1c(%rbp), %eax
addl -0x54(%rbp), %eax
movl %eax, -0xe0(%rbp)
jmp 0x5d2d3
movl $0x8000, %eax           # imm = 0x8000
movl %eax, -0xe0(%rbp)
jmp 0x5d2d3
movl -0xe0(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x3c(%rbp), %eax
addl -0x54(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, -0x3c(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x54(%rbp), %eax
jb 0x5d2f4
jmp 0x5d313
leaq 0xdde8(%rip), %rdi      # 0x6b0e3
leaq 0xdcda(%rip), %rsi      # 0x6afdc
movl $0x3bd, %edx            # imm = 0x3BD
leaq 0xdda5(%rip), %rcx      # 0x6b0b3
callq 0x4200
movl -0x54(%rbp), %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x92aa, %rcx           # imm = 0x92AA
addq $0xfff8, %rcx           # imm = 0xFFF8
cmpq %rcx, %rax
jbe 0x5d3e4
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x5ec60
movl %eax, -0x90(%rbp)
cmpl $0x0, %eax
je 0x5d3b8
movl -0x90(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovll %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x5d5f3
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x5ce58
jmp 0x5d3eb
cmpl $0x0, -0x18(%rbp)
je 0x5d59d
movq -0x10(%rbp), %rax
movl -0x3c(%rbp), %ecx
movb 0xc8(%rax,%rcx), %al
movb %al, -0x91(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movb -0x91(%rbp), %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
sarl %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0x5d462
movl $0x8, -0x24(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movzbl -0x91(%rbp), %ecx
movw 0x81ca(%rax,%rcx,2), %dx
addw $0x1, %dx
movw %dx, 0x81ca(%rax,%rcx,2)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
cmpl $0x8000, %eax           # imm = 0x8000
jae 0x5d4a5
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x5d4b2
movl $0x8000, %eax           # imm = 0x8000
movl %eax, -0xe4(%rbp)
jmp 0x5d4b2
movl -0xe4(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, -0x3c(%rbp)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x92aa, %rcx           # imm = 0x92AA
addq $0xfff8, %rcx           # imm = 0xFFF8
cmpq %rcx, %rax
jbe 0x5d598
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x5ec60
movl %eax, -0x98(%rbp)
cmpl $0x0, %eax
je 0x5d56c
movl -0x98(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovll %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x5d5f3
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x24(%rbp)
jmp 0x5d3eb
jmp 0x5cc24
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nop