// File: sbingner[P]kerneldec/lzfse/src/lzfse_encode_base.c
// Function: lzfse_encode_matches
static int lzfse_encode_matches(lzfse_encoder_state *s) {
  if (s->n_literals == 0 && s->n_matches == 0)
    return LZFSE_STATUS_OK; // nothing to store, OK

  uint32_t l_occ[LZFSE_ENCODE_L_SYMBOLS];
  uint32_t m_occ[LZFSE_ENCODE_M_SYMBOLS];
  uint32_t d_occ[LZFSE_ENCODE_D_SYMBOLS];
  uint32_t literal_occ[LZFSE_ENCODE_LITERAL_SYMBOLS];
  fse_encoder_entry l_encoder[LZFSE_ENCODE_L_SYMBOLS];
  fse_encoder_entry m_encoder[LZFSE_ENCODE_M_SYMBOLS];
  fse_encoder_entry d_encoder[LZFSE_ENCODE_D_SYMBOLS];
  fse_encoder_entry literal_encoder[LZFSE_ENCODE_LITERAL_SYMBOLS];
  int ok = 1;
  lzfse_compressed_block_header_v1 header1 = {0};
  lzfse_compressed_block_header_v2 *header2 = 0;

  // Keep initial state to be able to restore it if DST full
  uint8_t *dst0 = s->dst;
  uint32_t n_literals0 = s->n_literals;

  // Add 0x00 literals until n_literals multiple of 4, since we encode 4
  // interleaved literal streams.
  while (s->n_literals & 3) {
    uint32_t n = s->n_literals++;
    s->literals[n] = 0;
  }

  // Encode previous distance
  uint32_t d_prev = 0;
  for (uint32_t i = 0; i < s->n_matches; i++) {
    uint32_t d = s->d_values[i];
    if (d == d_prev)
      s->d_values[i] = 0;
    else
      d_prev = d;
  }

  // Clear occurrence tables
  memset(l_occ, 0, sizeof(l_occ));
  memset(m_occ, 0, sizeof(m_occ));
  memset(d_occ, 0, sizeof(d_occ));
  memset(literal_occ, 0, sizeof(literal_occ));

  // Update occurrence tables in all 4 streams (L,M,D,literals)
  uint32_t l_sum = 0;
  uint32_t m_sum = 0;
  for (uint32_t i = 0; i < s->n_matches; i++) {
    uint32_t l = s->l_values[i];
    l_sum += l;
    l_occ[l_base_from_value(l)]++;
  }
  for (uint32_t i = 0; i < s->n_matches; i++) {
    uint32_t m = s->m_values[i];
    m_sum += m;
    m_occ[m_base_from_value(m)]++;
  }
  for (uint32_t i = 0; i < s->n_matches; i++)
    d_occ[d_base_from_value(s->d_values[i])]++;
  for (uint32_t i = 0; i < s->n_literals; i++)
    literal_occ[s->literals[i]]++;

  // Make sure we have enough room for a _full_ V2 header
  if (s->dst + sizeof(lzfse_compressed_block_header_v2) > s->dst_end) {
    ok = 0;
    goto END;
  }
  header2 = (lzfse_compressed_block_header_v2 *)(s->dst);

  // Setup header V1
  header1.magic = LZFSE_COMPRESSEDV1_BLOCK_MAGIC;
  header1.n_raw_bytes = m_sum + l_sum;
  header1.n_matches = s->n_matches;
  header1.n_literals = s->n_literals;

  // Normalize occurrence tables to freq tables
  fse_normalize_freq(LZFSE_ENCODE_L_STATES, LZFSE_ENCODE_L_SYMBOLS, l_occ,
                     header1.l_freq);
  fse_normalize_freq(LZFSE_ENCODE_M_STATES, LZFSE_ENCODE_M_SYMBOLS, m_occ,
                     header1.m_freq);
  fse_normalize_freq(LZFSE_ENCODE_D_STATES, LZFSE_ENCODE_D_SYMBOLS, d_occ,
                     header1.d_freq);
  fse_normalize_freq(LZFSE_ENCODE_LITERAL_STATES, LZFSE_ENCODE_LITERAL_SYMBOLS,
                     literal_occ, header1.literal_freq);

  // Compress freq tables to V2 header, and get actual size of V2 header
  s->dst += lzfse_encode_v1_freq_table(header2, &header1);

  // Initialize encoder tables from freq tables
  fse_init_encoder_table(LZFSE_ENCODE_L_STATES, LZFSE_ENCODE_L_SYMBOLS,
                         header1.l_freq, l_encoder);
  fse_init_encoder_table(LZFSE_ENCODE_M_STATES, LZFSE_ENCODE_M_SYMBOLS,
                         header1.m_freq, m_encoder);
  fse_init_encoder_table(LZFSE_ENCODE_D_STATES, LZFSE_ENCODE_D_SYMBOLS,
                         header1.d_freq, d_encoder);
  fse_init_encoder_table(LZFSE_ENCODE_LITERAL_STATES,
                         LZFSE_ENCODE_LITERAL_SYMBOLS, header1.literal_freq,
                         literal_encoder);

  // Encode literals
  {
    fse_out_stream out;
    fse_out_init(&out);
    fse_state state0, state1, state2, state3;
    state0 = state1 = state2 = state3 = 0;

    uint8_t *buf = s->dst;
    uint32_t i = s->n_literals; // I multiple of 4
    // We encode starting from the last literal so we can decode starting from
    // the first
    while (i > 0) {
      if (buf + 16 > s->dst_end) {
        ok = 0;
        goto END;
      } // out full
      i -= 4;
      fse_encode(&state3, literal_encoder, &out, s->literals[i + 3]); // 10b
      fse_encode(&state2, literal_encoder, &out, s->literals[i + 2]); // 10b
#if !FSE_IOSTREAM_64
      fse_out_flush(&out, &buf);
#endif
      fse_encode(&state1, literal_encoder, &out, s->literals[i + 1]); // 10b
      fse_encode(&state0, literal_encoder, &out, s->literals[i + 0]); // 10b
      fse_out_flush(&out, &buf);
    }
    fse_out_finish(&out, &buf);

    // Update header with final encoder state
    header1.literal_bits = out.accum_nbits; // [-7, 0]
    header1.n_literal_payload_bytes = (uint32_t)(buf - s->dst);
    header1.literal_state[0] = state0;
    header1.literal_state[1] = state1;
    header1.literal_state[2] = state2;
    header1.literal_state[3] = state3;

    // Update state
    s->dst = buf;

  } // literals

  // Encode L,M,D
  {
    fse_out_stream out;
    fse_out_init(&out);
    fse_state l_state, m_state, d_state;
    l_state = m_state = d_state = 0;

    uint8_t *buf = s->dst;
    uint32_t i = s->n_matches;

    // Add 8 padding bytes to the L,M,D payload
    if (buf + 8 > s->dst_end) {
      ok = 0;
      goto END;
    } // out full
    store8(buf, 0);
    buf += 8;

    // We encode starting from the last match so we can decode starting from the
    // first
    while (i > 0) {
      if (buf + 16 > s->dst_end) {
        ok = 0;
        goto END;
      } // out full
      i -= 1;

      // D requires 23b max
      int32_t d_value = s->d_values[i];
      uint8_t d_symbol = d_base_from_value(d_value);
      int32_t d_nbits = d_extra_bits[d_symbol];
      int32_t d_bits = d_value - d_base_value[d_symbol];
      fse_out_push(&out, d_nbits, d_bits);
      fse_encode(&d_state, d_encoder, &out, d_symbol);
#if !FSE_IOSTREAM_64
      fse_out_flush(&out, &buf);
#endif

      // M requires 17b max
      int32_t m_value = s->m_values[i];
      uint8_t m_symbol = m_base_from_value(m_value);
      int32_t m_nbits = m_extra_bits[m_symbol];
      int32_t m_bits = m_value - m_base_value[m_symbol];
      fse_out_push(&out, m_nbits, m_bits);
      fse_encode(&m_state, m_encoder, &out, m_symbol);
#if !FSE_IOSTREAM_64
      fse_out_flush(&out, &buf);
#endif

      // L requires 14b max
      int32_t l_value = s->l_values[i];
      uint8_t l_symbol = l_base_from_value(l_value);
      int32_t l_nbits = l_extra_bits[l_symbol];
      int32_t l_bits = l_value - l_base_value[l_symbol];
      fse_out_push(&out, l_nbits, l_bits);
      fse_encode(&l_state, l_encoder, &out, l_symbol);
      fse_out_flush(&out, &buf);
    }
    fse_out_finish(&out, &buf);

    // Update header with final encoder state
    header1.n_lmd_payload_bytes = (uint32_t)(buf - s->dst);
    header1.lmd_bits = out.accum_nbits; // [-7, 0]
    header1.l_state = l_state;
    header1.m_state = m_state;
    header1.d_state = d_state;

    // Update state
    s->dst = buf;

  } // L,M,D

  // Final state update, here we had enough space in DST, and are not going to
  // revert state
  s->n_literals = 0;
  s->n_matches = 0;

  // Final payload size
  header1.n_payload_bytes =
      header1.n_literal_payload_bytes + header1.n_lmd_payload_bytes;

  // Encode state info in V2 header (we previously encoded the tables, now we
  // set the other fields)
  lzfse_encode_v1_state(header2, &header1);

END:
  if (!ok) {
    // Revert state, DST was full

    // Revert the d_prev encoding
    uint32_t d_prev = 0;
    for (uint32_t i = 0; i < s->n_matches; i++) {
      uint32_t d = s->d_values[i];
      if (d == 0)
        s->d_values[i] = d_prev;
      else
        d_prev = d;
    }

    // Revert literal count
    s->n_literals = n_literals0;

    // Revert DST
    s->dst = dst0;

    return LZFSE_STATUS_DST_FULL; // DST full
  }

  return LZFSE_STATUS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x18a0, %rsp           # imm = 0x18A0
movq %rdi, -0x3b0(%rbp)
movq -0x3b0(%rbp), %rax
cmpl $0x0, 0x5c(%rax)
jne 0x4f8b
movq -0x3b0(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x4f8b
movl $0x0, -0x3a4(%rbp)
jmp 0x6e38
movl $0x1, -0x1494(%rbp)
leaq -0x1798(%rbp), %rdi
xorl %esi, %esi
movl $0x304, %edx            # imm = 0x304
callq 0x3080
movq $0x0, -0x17a0(%rbp)
movq -0x3b0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x17a8(%rbp)
movq -0x3b0(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x17ac(%rbp)
movq -0x3b0(%rbp), %rax
movl 0x5c(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x5016
movq -0x3b0(%rbp), %rcx
movl 0x5c(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x5c(%rcx)
movl %eax, -0x17b0(%rbp)
movq -0x3b0(%rbp), %rax
movl -0x17b0(%rbp), %ecx
movb $0x0, 0x1d520(%rax,%rcx)
jmp 0x4fd5
movl $0x0, -0x17b4(%rbp)
movl $0x0, -0x17b8(%rbp)
movl -0x17b8(%rbp), %eax
movq -0x3b0(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jae 0x509d
movq -0x3b0(%rbp), %rax
movl -0x17b8(%rbp), %ecx
movl 0x138e0(%rax,%rcx,4), %eax
movl %eax, -0x17bc(%rbp)
movl -0x17bc(%rbp), %eax
cmpl -0x17b4(%rbp), %eax
jne 0x507e
movq -0x3b0(%rbp), %rax
movl -0x17b8(%rbp), %ecx
movl $0x0, 0x138e0(%rax,%rcx,4)
jmp 0x508a
movl -0x17bc(%rbp), %eax
movl %eax, -0x17b4(%rbp)
jmp 0x508c
movl -0x17b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17b8(%rbp)
jmp 0x502a
leaq -0x400(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x3080
leaq -0x450(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x3080
leaq -0x550(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3080
leaq -0x950(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x3080
movl $0x0, -0x17c0(%rbp)
movl $0x0, -0x17c4(%rbp)
movl $0x0, -0x17c8(%rbp)
movl -0x17c8(%rbp), %eax
movq -0x3b0(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jae 0x5172
movq -0x3b0(%rbp), %rax
movl -0x17c8(%rbp), %ecx
movl 0x60(%rax,%rcx,4), %eax
movl %eax, -0x17cc(%rbp)
movl -0x17cc(%rbp), %eax
addl -0x17c0(%rbp), %eax
movl %eax, -0x17c0(%rbp)
movl -0x17cc(%rbp), %edi
callq 0x71c0
movzbl %al, %eax
movl -0x400(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x400(%rbp,%rax,4)
movl -0x17c8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17c8(%rbp)
jmp 0x5107
movl $0x0, -0x17d0(%rbp)
movl -0x17d0(%rbp), %eax
movq -0x3b0(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jae 0x51ea
movq -0x3b0(%rbp), %rax
movl -0x17d0(%rbp), %ecx
movl 0x9ca0(%rax,%rcx,4), %eax
movl %eax, -0x17d4(%rbp)
movl -0x17d4(%rbp), %eax
addl -0x17c4(%rbp), %eax
movl %eax, -0x17c4(%rbp)
movl -0x17d4(%rbp), %edi
callq 0x71e0
movzbl %al, %eax
movl -0x450(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x450(%rbp,%rax,4)
movl -0x17d0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17d0(%rbp)
jmp 0x517c
movl $0x0, -0x17d8(%rbp)
movl -0x17d8(%rbp), %eax
movq -0x3b0(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jae 0x5244
movq -0x3b0(%rbp), %rax
movl -0x17d8(%rbp), %ecx
movl 0x138e0(%rax,%rcx,4), %edi
callq 0x7200
movzbl %al, %eax
movl -0x550(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x550(%rbp,%rax,4)
movl -0x17d8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17d8(%rbp)
jmp 0x51f4
movl $0x0, -0x17dc(%rbp)
movl -0x17dc(%rbp), %eax
movq -0x3b0(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jae 0x5297
movq -0x3b0(%rbp), %rax
movl -0x17dc(%rbp), %ecx
movzbl 0x1d520(%rax,%rcx), %eax
movl -0x950(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0x950(%rbp,%rax,4)
movl -0x17dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17dc(%rbp)
jmp 0x524e
movq -0x3b0(%rbp), %rax
movq 0x28(%rax), %rax
addq $0x2f0, %rax            # imm = 0x2F0
movq -0x3b0(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x52c4
movl $0x0, -0x1494(%rbp)
jmp 0x6d6f
movq -0x3b0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x17a0(%rbp)
movl $0x31787662, -0x1798(%rbp) # imm = 0x31787662
movl -0x17c4(%rbp), %eax
addl -0x17c0(%rbp), %eax
movl %eax, -0x1794(%rbp)
movq -0x3b0(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x1788(%rbp)
movq -0x3b0(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x178c(%rbp)
leaq -0x400(%rbp), %rdx
leaq -0x1798(%rbp), %rcx
addq $0x32, %rcx
movl $0x40, %edi
movl $0x14, %esi
callq 0xdfa0
leaq -0x450(%rbp), %rdx
leaq -0x1798(%rbp), %rcx
addq $0x5a, %rcx
movl $0x40, %edi
movl $0x14, %esi
callq 0xdfa0
leaq -0x550(%rbp), %rdx
leaq -0x1798(%rbp), %rcx
addq $0x82, %rcx
movl $0x100, %edi            # imm = 0x100
movl $0x40, %esi
callq 0xdfa0
leaq -0x950(%rbp), %rdx
leaq -0x1798(%rbp), %rcx
addq $0x102, %rcx            # imm = 0x102
movl $0x400, %edi            # imm = 0x400
movl $0x100, %esi            # imm = 0x100
callq 0xdfa0
movq -0x17a0(%rbp), %rdi
leaq -0x1798(%rbp), %rsi
callq 0x7320
movq %rax, %rcx
movq -0x3b0(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
leaq -0x1798(%rbp), %rdx
addq $0x32, %rdx
leaq -0x9f0(%rbp), %rcx
movl $0x40, %edi
movl $0x14, %esi
callq 0xdad0
leaq -0x1798(%rbp), %rdx
addq $0x5a, %rdx
leaq -0xa90(%rbp), %rcx
movl $0x40, %edi
movl $0x14, %esi
callq 0xdad0
leaq -0x1798(%rbp), %rdx
addq $0x82, %rdx
leaq -0xc90(%rbp), %rcx
movl $0x100, %edi            # imm = 0x100
movl $0x40, %esi
callq 0xdad0
leaq -0x1798(%rbp), %rdx
addq $0x102, %rdx            # imm = 0x102
leaq -0x1490(%rbp), %rcx
movl $0x400, %edi            # imm = 0x400
movl $0x100, %esi            # imm = 0x100
callq 0xdad0
leaq -0x17f0(%rbp), %rax
movq %rax, -0x388(%rbp)
movq -0x388(%rbp), %rax
movq $0x0, (%rax)
movq -0x388(%rbp), %rax
movl $0x0, 0x8(%rax)
movw $0x0, -0x17f8(%rbp)
movw $0x0, -0x17f6(%rbp)
movw $0x0, -0x17f4(%rbp)
movw $0x0, -0x17f2(%rbp)
movq -0x3b0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x1800(%rbp)
movq -0x3b0(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x1804(%rbp)
cmpl $0x0, -0x1804(%rbp)
jbe 0x5f29
movq -0x1800(%rbp), %rax
addq $0x10, %rax
movq -0x3b0(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x54ef
movl $0x0, -0x1494(%rbp)
jmp 0x6d6f
movl -0x1804(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x1804(%rbp)
leaq -0x1490(%rbp), %rcx
movq -0x3b0(%rbp), %rax
movl -0x1804(%rbp), %edx
addl $0x3, %edx
movl %edx, %edx
movb 0x1d520(%rax,%rdx), %al
leaq -0x17f8(%rbp), %rdx
movq %rdx, -0x158(%rbp)
movq %rcx, -0x160(%rbp)
leaq -0x17f0(%rbp), %rcx
movq %rcx, -0x168(%rbp)
movb %al, -0x169(%rbp)
movq -0x158(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x170(%rbp)
movq -0x160(%rbp), %rax
movzbl -0x169(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x178(%rbp)
movswl -0x178(%rbp), %eax
movl %eax, -0x17c(%rbp)
movswl -0x176(%rbp), %eax
movl %eax, -0x180(%rbp)
movswl -0x174(%rbp), %eax
movl %eax, -0x184(%rbp)
movswl -0x172(%rbp), %eax
movl %eax, -0x188(%rbp)
movl -0x170(%rbp), %eax
cmpl -0x17c(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x18c(%rbp)
cmpl $0x0, -0x18c(%rbp)
je 0x55d5
movl -0x180(%rbp), %eax
movl %eax, -0x186c(%rbp)
jmp 0x55e4
movl -0x180(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x186c(%rbp)
movl -0x186c(%rbp), %eax
movl %eax, -0x190(%rbp)
cmpl $0x0, -0x18c(%rbp)
je 0x5607
movl -0x184(%rbp), %eax
movl %eax, -0x1870(%rbp)
jmp 0x5613
movl -0x188(%rbp), %eax
movl %eax, -0x1870(%rbp)
movl -0x1870(%rbp), %eax
movw %ax, -0x192(%rbp)
movslq -0x170(%rbp), %rdi
movl -0x190(%rbp), %esi
callq 0x7850
movq %rax, -0x1a0(%rbp)
movq -0x168(%rbp), %rdx
movl -0x190(%rbp), %ecx
movq -0x1a0(%rbp), %rax
movq %rdx, -0xe0(%rbp)
movl %ecx, -0xe4(%rbp)
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq -0xe0(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0xe0(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0xe4(%rbp), %ecx
movq -0xe0(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0xe0(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x56c1
movq -0xe0(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x56c1
movq -0xe0(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x571c
jmp 0x56e0
leaq 0xb16b(%rip), %rdi      # 0x10833
leaq 0xb083(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0xb184(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0xe0(%rbp), %rax
movq (%rax), %rax
movq -0xe0(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x571c
leaq 0xb093(%rip), %rdi      # 0x10797
leaq 0xb047(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0xb148(%rip), %rcx      # 0x1085f
callq 0x3070
movzwl -0x192(%rbp), %eax
movl -0x170(%rbp), %edx
movl -0x190(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x158(%rbp), %rax
movw %cx, (%rax)
leaq -0x1490(%rbp), %rcx
movq -0x3b0(%rbp), %rax
movl -0x1804(%rbp), %edx
addl $0x2, %edx
movl %edx, %edx
movb 0x1d520(%rax,%rdx), %al
leaq -0x17f6(%rbp), %rdx
movq %rdx, -0x1a8(%rbp)
movq %rcx, -0x1b0(%rbp)
leaq -0x17f0(%rbp), %rcx
movq %rcx, -0x1b8(%rbp)
movb %al, -0x1b9(%rbp)
movq -0x1a8(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x1c0(%rbp)
movq -0x1b0(%rbp), %rax
movzbl -0x1b9(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x1c8(%rbp)
movswl -0x1c8(%rbp), %eax
movl %eax, -0x1cc(%rbp)
movswl -0x1c6(%rbp), %eax
movl %eax, -0x1d0(%rbp)
movswl -0x1c4(%rbp), %eax
movl %eax, -0x1d4(%rbp)
movswl -0x1c2(%rbp), %eax
movl %eax, -0x1d8(%rbp)
movl -0x1c0(%rbp), %eax
cmpl -0x1cc(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1dc(%rbp)
cmpl $0x0, -0x1dc(%rbp)
je 0x5819
movl -0x1d0(%rbp), %eax
movl %eax, -0x1874(%rbp)
jmp 0x5828
movl -0x1d0(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1874(%rbp)
movl -0x1874(%rbp), %eax
movl %eax, -0x1e0(%rbp)
cmpl $0x0, -0x1dc(%rbp)
je 0x584b
movl -0x1d4(%rbp), %eax
movl %eax, -0x1878(%rbp)
jmp 0x5857
movl -0x1d8(%rbp), %eax
movl %eax, -0x1878(%rbp)
movl -0x1878(%rbp), %eax
movw %ax, -0x1e2(%rbp)
movslq -0x1c0(%rbp), %rdi
movl -0x1e0(%rbp), %esi
callq 0x7850
movq %rax, -0x1f0(%rbp)
movq -0x1b8(%rbp), %rdx
movl -0x1e0(%rbp), %ecx
movq -0x1f0(%rbp), %rax
movq %rdx, -0xc8(%rbp)
movl %ecx, -0xcc(%rbp)
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq -0xc8(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0xc8(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0xcc(%rbp), %ecx
movq -0xc8(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0xc8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x5905
movq -0xc8(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x5905
movq -0xc8(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x5960
jmp 0x5924
leaq 0xaf27(%rip), %rdi      # 0x10833
leaq 0xae3f(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0xaf40(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0xc8(%rbp), %rax
movq (%rax), %rax
movq -0xc8(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x5960
leaq 0xae4f(%rip), %rdi      # 0x10797
leaq 0xae03(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0xaf04(%rip), %rcx      # 0x1085f
callq 0x3070
movzwl -0x1e2(%rbp), %eax
movl -0x1c0(%rbp), %edx
movl -0x1e0(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x1a8(%rbp), %rax
movw %cx, (%rax)
leaq -0x1490(%rbp), %rcx
movq -0x3b0(%rbp), %rax
movl -0x1804(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movb 0x1d520(%rax,%rdx), %al
leaq -0x17f4(%rbp), %rdx
movq %rdx, -0x1f8(%rbp)
movq %rcx, -0x200(%rbp)
leaq -0x17f0(%rbp), %rcx
movq %rcx, -0x208(%rbp)
movb %al, -0x209(%rbp)
movq -0x1f8(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x210(%rbp)
movq -0x200(%rbp), %rax
movzbl -0x209(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x218(%rbp)
movswl -0x218(%rbp), %eax
movl %eax, -0x21c(%rbp)
movswl -0x216(%rbp), %eax
movl %eax, -0x220(%rbp)
movswl -0x214(%rbp), %eax
movl %eax, -0x224(%rbp)
movswl -0x212(%rbp), %eax
movl %eax, -0x228(%rbp)
movl -0x210(%rbp), %eax
cmpl -0x21c(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x22c(%rbp)
cmpl $0x0, -0x22c(%rbp)
je 0x5a5d
movl -0x220(%rbp), %eax
movl %eax, -0x187c(%rbp)
jmp 0x5a6c
movl -0x220(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x187c(%rbp)
movl -0x187c(%rbp), %eax
movl %eax, -0x230(%rbp)
cmpl $0x0, -0x22c(%rbp)
je 0x5a8f
movl -0x224(%rbp), %eax
movl %eax, -0x1880(%rbp)
jmp 0x5a9b
movl -0x228(%rbp), %eax
movl %eax, -0x1880(%rbp)
movl -0x1880(%rbp), %eax
movw %ax, -0x232(%rbp)
movslq -0x210(%rbp), %rdi
movl -0x230(%rbp), %esi
callq 0x7850
movq %rax, -0x240(%rbp)
movq -0x208(%rbp), %rdx
movl -0x230(%rbp), %ecx
movq -0x240(%rbp), %rax
movq %rdx, -0xb0(%rbp)
movl %ecx, -0xb4(%rbp)
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq -0xb0(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0xb0(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0xb4(%rbp), %ecx
movq -0xb0(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0xb0(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x5b49
movq -0xb0(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x5b49
movq -0xb0(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x5ba4
jmp 0x5b68
leaq 0xace3(%rip), %rdi      # 0x10833
leaq 0xabfb(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0xacfc(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0xb0(%rbp), %rax
movq (%rax), %rax
movq -0xb0(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x5ba4
leaq 0xac0b(%rip), %rdi      # 0x10797
leaq 0xabbf(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0xacc0(%rip), %rcx      # 0x1085f
callq 0x3070
movzwl -0x232(%rbp), %eax
movl -0x210(%rbp), %edx
movl -0x230(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x1f8(%rbp), %rax
movw %cx, (%rax)
leaq -0x1490(%rbp), %rcx
movq -0x3b0(%rbp), %rax
movl -0x1804(%rbp), %edx
addl $0x0, %edx
movl %edx, %edx
movb 0x1d520(%rax,%rdx), %al
leaq -0x17f2(%rbp), %rdx
movq %rdx, -0x248(%rbp)
movq %rcx, -0x250(%rbp)
leaq -0x17f0(%rbp), %rcx
movq %rcx, -0x258(%rbp)
movb %al, -0x259(%rbp)
movq -0x248(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x260(%rbp)
movq -0x250(%rbp), %rax
movzbl -0x259(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x268(%rbp)
movswl -0x268(%rbp), %eax
movl %eax, -0x26c(%rbp)
movswl -0x266(%rbp), %eax
movl %eax, -0x270(%rbp)
movswl -0x264(%rbp), %eax
movl %eax, -0x274(%rbp)
movswl -0x262(%rbp), %eax
movl %eax, -0x278(%rbp)
movl -0x260(%rbp), %eax
cmpl -0x26c(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x27c(%rbp)
cmpl $0x0, -0x27c(%rbp)
je 0x5ca1
movl -0x270(%rbp), %eax
movl %eax, -0x1884(%rbp)
jmp 0x5cb0
movl -0x270(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1884(%rbp)
movl -0x1884(%rbp), %eax
movl %eax, -0x280(%rbp)
cmpl $0x0, -0x27c(%rbp)
je 0x5cd3
movl -0x274(%rbp), %eax
movl %eax, -0x1888(%rbp)
jmp 0x5cdf
movl -0x278(%rbp), %eax
movl %eax, -0x1888(%rbp)
movl -0x1888(%rbp), %eax
movw %ax, -0x282(%rbp)
movslq -0x260(%rbp), %rdi
movl -0x280(%rbp), %esi
callq 0x7850
movq %rax, -0x290(%rbp)
movq -0x258(%rbp), %rdx
movl -0x280(%rbp), %ecx
movq -0x290(%rbp), %rax
movq %rdx, -0x98(%rbp)
movl %ecx, -0x9c(%rbp)
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq -0x98(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x98(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0x9c(%rbp), %ecx
movq -0x98(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x98(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x5d8d
movq -0x98(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x5d8d
movq -0x98(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x5de8
jmp 0x5dac
leaq 0xaa9f(%rip), %rdi      # 0x10833
leaq 0xa9b7(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0xaab8(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0x98(%rbp), %rax
movq (%rax), %rax
movq -0x98(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x5de8
leaq 0xa9c7(%rip), %rdi      # 0x10797
leaq 0xa97b(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0xaa7c(%rip), %rcx      # 0x1085f
callq 0x3070
movzwl -0x282(%rbp), %eax
movl -0x260(%rbp), %edx
movl -0x280(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x248(%rbp), %rax
movw %cx, (%rax)
leaq -0x17f0(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x1800(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rax
movl 0x8(%rax), %eax
andl $-0x8, %eax
movl %eax, -0x134(%rbp)
movq -0x130(%rbp), %rax
movq (%rax), %rax
movq -0x128(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movl -0x134(%rbp), %edx
sarl $0x3, %edx
movq -0x130(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x134(%rbp), %ecx
movq -0x128(%rbp), %rax
movq (%rax), %rdx
movl %ecx, %ecx
shrq %cl, %rdx
movq %rdx, %rcx
movq %rcx, (%rax)
movl -0x134(%rbp), %edx
movq -0x128(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x128(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x5ec9
movq -0x128(%rbp), %rax
cmpl $0x7, 0x8(%rax)
jg 0x5ec9
movq -0x128(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x5f24
jmp 0x5ee8
leaq 0xa857(%rip), %rdi      # 0x10727
leaq 0xa87b(%rip), %rsi      # 0x10752
movl $0xc1, %edx
leaq 0xa87f(%rip), %rcx      # 0x10762
callq 0x3070
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq -0x128(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x5f24
leaq 0xa88b(%rip), %rdi      # 0x10797
leaq 0xa83f(%rip), %rsi      # 0x10752
movl $0xc2, %edx
leaq 0xa843(%rip), %rcx      # 0x10762
callq 0x3070
jmp 0x54bb
leaq -0x17f0(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x1800(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x7, %eax
andl $-0x8, %eax
movl %eax, -0x104(%rbp)
movq -0x100(%rbp), %rax
movq (%rax), %rax
movq -0xf8(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movl -0x104(%rbp), %edx
sarl $0x3, %edx
movq -0x100(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0xf8(%rbp), %rax
movq $0x0, (%rax)
movl -0x104(%rbp), %edx
movq -0xf8(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0xf8(%rbp), %rax
cmpl $-0x7, 0x8(%rax)
jl 0x5fcb
movq -0xf8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x5fea
leaq 0xa7ff(%rip), %rdi      # 0x107d1
leaq 0xa779(%rip), %rsi      # 0x10752
movl $0xeb, %edx
leaq 0xa818(%rip), %rcx      # 0x107fd
callq 0x3070
movl -0x17e8(%rbp), %eax
movl %eax, -0x177c(%rbp)
movq -0x1800(%rbp), %rax
movq -0x3b0(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x1784(%rbp)
movw -0x17f2(%rbp), %ax
movw %ax, -0x1778(%rbp)
movw -0x17f4(%rbp), %ax
movw %ax, -0x1776(%rbp)
movw -0x17f6(%rbp), %ax
movw %ax, -0x1774(%rbp)
movw -0x17f8(%rbp), %ax
movw %ax, -0x1772(%rbp)
movq -0x1800(%rbp), %rcx
movq -0x3b0(%rbp), %rax
movq %rcx, 0x28(%rax)
leaq -0x1818(%rbp), %rax
movq %rax, -0x390(%rbp)
movq -0x390(%rbp), %rax
movq $0x0, (%rax)
movq -0x390(%rbp), %rax
movl $0x0, 0x8(%rax)
movw $0x0, -0x181e(%rbp)
movw $0x0, -0x181c(%rbp)
movw $0x0, -0x181a(%rbp)
movq -0x3b0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x1828(%rbp)
movq -0x3b0(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x182c(%rbp)
movq -0x1828(%rbp), %rax
addq $0x8, %rax
movq -0x3b0(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x60e9
movl $0x0, -0x1494(%rbp)
jmp 0x6d6f
movq -0x1828(%rbp), %rax
movq %rax, -0x398(%rbp)
movq $0x0, -0x3a0(%rbp)
movq -0x398(%rbp), %rax
movq -0x3a0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1828(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x1828(%rbp)
cmpl $0x0, -0x182c(%rbp)
jbe 0x6c0a
movq -0x1828(%rbp), %rax
addq $0x10, %rax
movq -0x3b0(%rbp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x6159
movl $0x0, -0x1494(%rbp)
jmp 0x6d6f
movl -0x182c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x182c(%rbp)
movq -0x3b0(%rbp), %rax
movl -0x182c(%rbp), %ecx
movl 0x138e0(%rax,%rcx,4), %eax
movl %eax, -0x1830(%rbp)
movl -0x1830(%rbp), %edi
callq 0x7200
movb %al, -0x1831(%rbp)
movzbl -0x1831(%rbp), %eax
movl %eax, %ecx
leaq 0x8fbd(%rip), %rax      # 0xf160
movzbl (%rax,%rcx), %eax
movl %eax, -0x1838(%rbp)
movl -0x1830(%rbp), %eax
movzbl -0x1831(%rbp), %ecx
movl %ecx, %edx
leaq 0x8fdd(%rip), %rcx      # 0xf1a0
subl (%rcx,%rdx,4), %eax
movl %eax, -0x183c(%rbp)
movl -0x1838(%rbp), %ecx
movslq -0x183c(%rbp), %rax
leaq -0x1818(%rbp), %rdx
movq %rdx, -0x8(%rbp)
movl %ecx, -0xc(%rbp)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x8(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x6233
movq -0x8(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x6233
movq -0x8(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x6288
jmp 0x6252
leaq 0xa5f9(%rip), %rdi      # 0x10833
leaq 0xa511(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0xa612(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x6288
leaq 0xa527(%rip), %rdi      # 0x10797
leaq 0xa4db(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0xa5dc(%rip), %rcx      # 0x1085f
callq 0x3070
leaq -0xc90(%rbp), %rcx
movb -0x1831(%rbp), %al
leaq -0x181e(%rbp), %rdx
movq %rdx, -0x298(%rbp)
movq %rcx, -0x2a0(%rbp)
leaq -0x1818(%rbp), %rcx
movq %rcx, -0x2a8(%rbp)
movb %al, -0x2a9(%rbp)
movq -0x298(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x2b0(%rbp)
movq -0x2a0(%rbp), %rax
movzbl -0x2a9(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x2b8(%rbp)
movswl -0x2b8(%rbp), %eax
movl %eax, -0x2bc(%rbp)
movswl -0x2b6(%rbp), %eax
movl %eax, -0x2c0(%rbp)
movswl -0x2b4(%rbp), %eax
movl %eax, -0x2c4(%rbp)
movswl -0x2b2(%rbp), %eax
movl %eax, -0x2c8(%rbp)
movl -0x2b0(%rbp), %eax
cmpl -0x2bc(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2cc(%rbp)
cmpl $0x0, -0x2cc(%rbp)
je 0x634c
movl -0x2c0(%rbp), %eax
movl %eax, -0x188c(%rbp)
jmp 0x635b
movl -0x2c0(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x188c(%rbp)
movl -0x188c(%rbp), %eax
movl %eax, -0x2d0(%rbp)
cmpl $0x0, -0x2cc(%rbp)
je 0x637e
movl -0x2c4(%rbp), %eax
movl %eax, -0x1890(%rbp)
jmp 0x638a
movl -0x2c8(%rbp), %eax
movl %eax, -0x1890(%rbp)
movl -0x1890(%rbp), %eax
movw %ax, -0x2d2(%rbp)
movslq -0x2b0(%rbp), %rdi
movl -0x2d0(%rbp), %esi
callq 0x7850
movq %rax, -0x2e0(%rbp)
movq -0x2a8(%rbp), %rdx
movl -0x2d0(%rbp), %ecx
movq -0x2e0(%rbp), %rax
movq %rdx, -0x80(%rbp)
movl %ecx, -0x84(%rbp)
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq -0x80(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x80(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0x84(%rbp), %ecx
movq -0x80(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x80(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x6423
movq -0x80(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x6423
movq -0x80(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x6478
jmp 0x6442
leaq 0xa409(%rip), %rdi      # 0x10833
leaq 0xa321(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0xa422(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x6478
leaq 0xa337(%rip), %rdi      # 0x10797
leaq 0xa2eb(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0xa3ec(%rip), %rcx      # 0x1085f
callq 0x3070
movzwl -0x2d2(%rbp), %eax
movl -0x2b0(%rbp), %edx
movl -0x2d0(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x298(%rbp), %rax
movw %cx, (%rax)
movq -0x3b0(%rbp), %rax
movl -0x182c(%rbp), %ecx
movl 0x9ca0(%rax,%rcx,4), %eax
movl %eax, -0x1840(%rbp)
movl -0x1840(%rbp), %edi
callq 0x71e0
movb %al, -0x1841(%rbp)
movzbl -0x1841(%rbp), %eax
movl %eax, %ecx
leaq 0x8dc7(%rip), %rax      # 0xf2a0
movzbl (%rax,%rcx), %eax
movl %eax, -0x1848(%rbp)
movl -0x1840(%rbp), %eax
movzbl -0x1841(%rbp), %ecx
movl %ecx, %edx
leaq 0x8dc7(%rip), %rcx      # 0xf2c0
subl (%rcx,%rdx,4), %eax
movl %eax, -0x184c(%rbp)
movl -0x1848(%rbp), %ecx
movslq -0x184c(%rbp), %rax
leaq -0x1818(%rbp), %rdx
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x20(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x6569
movq -0x20(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x6569
movq -0x20(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x65be
jmp 0x6588
leaq 0xa2c3(%rip), %rdi      # 0x10833
leaq 0xa1db(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0xa2dc(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x65be
leaq 0xa1f1(%rip), %rdi      # 0x10797
leaq 0xa1a5(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0xa2a6(%rip), %rcx      # 0x1085f
callq 0x3070
leaq -0xa90(%rbp), %rcx
movb -0x1841(%rbp), %al
leaq -0x181c(%rbp), %rdx
movq %rdx, -0x2e8(%rbp)
movq %rcx, -0x2f0(%rbp)
leaq -0x1818(%rbp), %rcx
movq %rcx, -0x2f8(%rbp)
movb %al, -0x2f9(%rbp)
movq -0x2e8(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x300(%rbp)
movq -0x2f0(%rbp), %rax
movzbl -0x2f9(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x308(%rbp)
movswl -0x308(%rbp), %eax
movl %eax, -0x30c(%rbp)
movswl -0x306(%rbp), %eax
movl %eax, -0x310(%rbp)
movswl -0x304(%rbp), %eax
movl %eax, -0x314(%rbp)
movswl -0x302(%rbp), %eax
movl %eax, -0x318(%rbp)
movl -0x300(%rbp), %eax
cmpl -0x30c(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x31c(%rbp)
cmpl $0x0, -0x31c(%rbp)
je 0x6682
movl -0x310(%rbp), %eax
movl %eax, -0x1894(%rbp)
jmp 0x6691
movl -0x310(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1894(%rbp)
movl -0x1894(%rbp), %eax
movl %eax, -0x320(%rbp)
cmpl $0x0, -0x31c(%rbp)
je 0x66b4
movl -0x314(%rbp), %eax
movl %eax, -0x1898(%rbp)
jmp 0x66c0
movl -0x318(%rbp), %eax
movl %eax, -0x1898(%rbp)
movl -0x1898(%rbp), %eax
movw %ax, -0x322(%rbp)
movslq -0x300(%rbp), %rdi
movl -0x320(%rbp), %esi
callq 0x7850
movq %rax, -0x330(%rbp)
movq -0x2f8(%rbp), %rdx
movl -0x320(%rbp), %ecx
movq -0x330(%rbp), %rax
movq %rdx, -0x68(%rbp)
movl %ecx, -0x6c(%rbp)
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq -0x68(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x68(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0x6c(%rbp), %ecx
movq -0x68(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x68(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x674d
movq -0x68(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x674d
movq -0x68(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x67a2
jmp 0x676c
leaq 0xa0df(%rip), %rdi      # 0x10833
leaq 0x9ff7(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0xa0f8(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x67a2
leaq 0xa00d(%rip), %rdi      # 0x10797
leaq 0x9fc1(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0xa0c2(%rip), %rcx      # 0x1085f
callq 0x3070
movzwl -0x322(%rbp), %eax
movl -0x300(%rbp), %edx
movl -0x320(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x2e8(%rbp), %rax
movw %cx, (%rax)
movq -0x3b0(%rbp), %rax
movl -0x182c(%rbp), %ecx
movl 0x60(%rax,%rcx,4), %eax
movl %eax, -0x1850(%rbp)
movl -0x1850(%rbp), %edi
callq 0x71c0
movb %al, -0x1851(%rbp)
movzbl -0x1851(%rbp), %eax
movl %eax, %ecx
leaq 0x8b10(%rip), %rax      # 0xf310
movzbl (%rax,%rcx), %eax
movl %eax, -0x1858(%rbp)
movl -0x1850(%rbp), %eax
movzbl -0x1851(%rbp), %ecx
movl %ecx, %edx
leaq 0x8b10(%rip), %rcx      # 0xf330
subl (%rcx,%rdx,4), %eax
movl %eax, -0x185c(%rbp)
movl -0x1858(%rbp), %ecx
movslq -0x185c(%rbp), %rax
leaq -0x1818(%rbp), %rdx
movq %rdx, -0x38(%rbp)
movl %ecx, -0x3c(%rbp)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x38(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x6890
movq -0x38(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x6890
movq -0x38(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x68e5
jmp 0x68af
leaq 0x9f9c(%rip), %rdi      # 0x10833
leaq 0x9eb4(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0x9fb5(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x68e5
leaq 0x9eca(%rip), %rdi      # 0x10797
leaq 0x9e7e(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0x9f7f(%rip), %rcx      # 0x1085f
callq 0x3070
leaq -0x9f0(%rbp), %rcx
movb -0x1851(%rbp), %al
leaq -0x181a(%rbp), %rdx
movq %rdx, -0x338(%rbp)
movq %rcx, -0x340(%rbp)
leaq -0x1818(%rbp), %rcx
movq %rcx, -0x348(%rbp)
movb %al, -0x349(%rbp)
movq -0x338(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x350(%rbp)
movq -0x340(%rbp), %rax
movzbl -0x349(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x358(%rbp)
movswl -0x358(%rbp), %eax
movl %eax, -0x35c(%rbp)
movswl -0x356(%rbp), %eax
movl %eax, -0x360(%rbp)
movswl -0x354(%rbp), %eax
movl %eax, -0x364(%rbp)
movswl -0x352(%rbp), %eax
movl %eax, -0x368(%rbp)
movl -0x350(%rbp), %eax
cmpl -0x35c(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x36c(%rbp)
cmpl $0x0, -0x36c(%rbp)
je 0x69a9
movl -0x360(%rbp), %eax
movl %eax, -0x189c(%rbp)
jmp 0x69b8
movl -0x360(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x189c(%rbp)
movl -0x189c(%rbp), %eax
movl %eax, -0x370(%rbp)
cmpl $0x0, -0x36c(%rbp)
je 0x69db
movl -0x364(%rbp), %eax
movl %eax, -0x18a0(%rbp)
jmp 0x69e7
movl -0x368(%rbp), %eax
movl %eax, -0x18a0(%rbp)
movl -0x18a0(%rbp), %eax
movw %ax, -0x372(%rbp)
movslq -0x350(%rbp), %rdi
movl -0x370(%rbp), %esi
callq 0x7850
movq %rax, -0x380(%rbp)
movq -0x348(%rbp), %rdx
movl -0x370(%rbp), %ecx
movq -0x380(%rbp), %rax
movq %rdx, -0x50(%rbp)
movl %ecx, -0x54(%rbp)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq %cl, %rax
movq %rax, %rcx
movq -0x50(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movl -0x54(%rbp), %ecx
movq -0x50(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x50(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x6a74
movq -0x50(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jg 0x6a74
movq -0x50(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x6ac9
jmp 0x6a93
leaq 0x9db8(%rip), %rdi      # 0x10833
leaq 0x9cd0(%rip), %rsi      # 0x10752
movl $0x10b, %edx            # imm = 0x10B
leaq 0x9dd1(%rip), %rcx      # 0x1085f
callq 0x3070
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq -0x50(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x6ac9
leaq 0x9ce6(%rip), %rdi      # 0x10797
leaq 0x9c9a(%rip), %rsi      # 0x10752
movl $0x10c, %edx            # imm = 0x10C
leaq 0x9d9b(%rip), %rcx      # 0x1085f
callq 0x3070
movzwl -0x372(%rbp), %eax
movl -0x350(%rbp), %edx
movl -0x370(%rbp), %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x338(%rbp), %rax
movw %cx, (%rax)
leaq -0x1818(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x1828(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rax
movl 0x8(%rax), %eax
andl $-0x8, %eax
movl %eax, -0x14c(%rbp)
movq -0x148(%rbp), %rax
movq (%rax), %rax
movq -0x140(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movl -0x14c(%rbp), %edx
sarl $0x3, %edx
movq -0x148(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x14c(%rbp), %ecx
movq -0x140(%rbp), %rax
movq (%rax), %rdx
movl %ecx, %ecx
shrq %cl, %rdx
movq %rdx, %rcx
movq %rcx, (%rax)
movl -0x14c(%rbp), %edx
movq -0x140(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x140(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x6baa
movq -0x140(%rbp), %rax
cmpl $0x7, 0x8(%rax)
jg 0x6baa
movq -0x140(%rbp), %rax
cmpl $0x40, 0x8(%rax)
je 0x6c05
jmp 0x6bc9
leaq 0x9b76(%rip), %rdi      # 0x10727
leaq 0x9b9a(%rip), %rsi      # 0x10752
movl $0xc1, %edx
leaq 0x9b9e(%rip), %rcx      # 0x10762
callq 0x3070
movq -0x140(%rbp), %rax
movq (%rax), %rax
movq -0x140(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x6c05
leaq 0x9baa(%rip), %rdi      # 0x10797
leaq 0x9b5e(%rip), %rsi      # 0x10752
movl $0xc2, %edx
leaq 0x9b62(%rip), %rcx      # 0x10762
callq 0x3070
jmp 0x6125
leaq -0x1818(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x1828(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x7, %eax
andl $-0x8, %eax
movl %eax, -0x11c(%rbp)
movq -0x118(%rbp), %rax
movq (%rax), %rax
movq -0x110(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movl -0x11c(%rbp), %edx
sarl $0x3, %edx
movq -0x118(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x110(%rbp), %rax
movq $0x0, (%rax)
movl -0x11c(%rbp), %edx
movq -0x110(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x110(%rbp), %rax
cmpl $-0x7, 0x8(%rax)
jl 0x6cac
movq -0x110(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x6ccb
leaq 0x9b1e(%rip), %rdi      # 0x107d1
leaq 0x9a98(%rip), %rsi      # 0x10752
movl $0xeb, %edx
leaq 0x9b37(%rip), %rcx      # 0x107fd
callq 0x3070
movq -0x1828(%rbp), %rax
movq -0x3b0(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x1780(%rbp)
movl -0x1810(%rbp), %eax
movl %eax, -0x1770(%rbp)
movw -0x181a(%rbp), %ax
movw %ax, -0x176c(%rbp)
movw -0x181c(%rbp), %ax
movw %ax, -0x176a(%rbp)
movw -0x181e(%rbp), %ax
movw %ax, -0x1768(%rbp)
movq -0x1828(%rbp), %rcx
movq -0x3b0(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x3b0(%rbp), %rax
movl $0x0, 0x5c(%rax)
movq -0x3b0(%rbp), %rax
movl $0x0, 0x58(%rax)
movl -0x1784(%rbp), %eax
addl -0x1780(%rbp), %eax
movl %eax, -0x1790(%rbp)
movq -0x17a0(%rbp), %rdi
leaq -0x1798(%rbp), %rsi
callq 0x7490
cmpl $0x0, -0x1494(%rbp)
jne 0x6e2e
movl $0x0, -0x1860(%rbp)
movl $0x0, -0x1864(%rbp)
movl -0x1864(%rbp), %eax
movq -0x3b0(%rbp), %rcx
cmpl 0x58(%rcx), %eax
jae 0x6e00
movq -0x3b0(%rbp), %rax
movl -0x1864(%rbp), %ecx
movl 0x138e0(%rax,%rcx,4), %eax
movl %eax, -0x1868(%rbp)
cmpl $0x0, -0x1868(%rbp)
jne 0x6de1
movl -0x1860(%rbp), %edx
movq -0x3b0(%rbp), %rax
movl -0x1864(%rbp), %ecx
movl %edx, 0x138e0(%rax,%rcx,4)
jmp 0x6ded
movl -0x1868(%rbp), %eax
movl %eax, -0x1860(%rbp)
jmp 0x6def
movl -0x1864(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1864(%rbp)
jmp 0x6d90
movl -0x17ac(%rbp), %ecx
movq -0x3b0(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x17a8(%rbp), %rcx
movq -0x3b0(%rbp), %rax
movq %rcx, 0x28(%rax)
movl $0xfffffffe, -0x3a4(%rbp) # imm = 0xFFFFFFFE
jmp 0x6e38
movl $0x0, -0x3a4(%rbp)
movl -0x3a4(%rbp), %eax
addq $0x18a0, %rsp           # imm = 0x18A0
popq %rbp
retq
nopw (%rax,%rax)