// File: sbingner[P]kerneldec/lzfse/src/lzfse_decode_base.c
// Function: lzfse_decode
int lzfse_decode(lzfse_decoder_state *s) {
  while (1) {
    // Are we inside a block?
    switch (s->block_magic) {
    case LZFSE_NO_BLOCK_MAGIC: {
      // We need at least 4 bytes of magic number to identify next block
      if (s->src + 4 > s->src_end)
        return LZFSE_STATUS_SRC_EMPTY; // SRC truncated
      uint32_t magic = load4(s->src);

      if (magic == LZFSE_ENDOFSTREAM_BLOCK_MAGIC) {
        s->src += 4;
        s->end_of_stream = 1;
        return LZFSE_STATUS_OK; // done
      }

      if (magic == LZFSE_UNCOMPRESSED_BLOCK_MAGIC) {
        if (s->src + sizeof(uncompressed_block_header) > s->src_end)
          return LZFSE_STATUS_SRC_EMPTY; // SRC truncated
        // Setup state for uncompressed block
        uncompressed_block_decoder_state *bs = &(s->uncompressed_block_state);
        bs->n_raw_bytes =
            load4(s->src + offsetof(uncompressed_block_header, n_raw_bytes));
        s->src += sizeof(uncompressed_block_header);
        s->block_magic = magic;
        break;
      }

      if (magic == LZFSE_COMPRESSEDLZVN_BLOCK_MAGIC) {
        if (s->src + sizeof(lzvn_compressed_block_header) > s->src_end)
          return LZFSE_STATUS_SRC_EMPTY; // SRC truncated
        // Setup state for compressed LZVN block
        lzvn_compressed_block_decoder_state *bs =
            &(s->compressed_lzvn_block_state);
        bs->n_raw_bytes =
            load4(s->src + offsetof(lzvn_compressed_block_header, n_raw_bytes));
        bs->n_payload_bytes = load4(
            s->src + offsetof(lzvn_compressed_block_header, n_payload_bytes));
        bs->d_prev = 0;
        s->src += sizeof(lzvn_compressed_block_header);
        s->block_magic = magic;
        break;
      }

      if (magic == LZFSE_COMPRESSEDV1_BLOCK_MAGIC ||
          magic == LZFSE_COMPRESSEDV2_BLOCK_MAGIC) {
        lzfse_compressed_block_header_v1 header1;
        size_t header_size = 0;

        // Decode compressed headers
        if (magic == LZFSE_COMPRESSEDV2_BLOCK_MAGIC) {
          // Check we have the fixed part of the structure
          if (s->src + offsetof(lzfse_compressed_block_header_v2, freq) > s->src_end)
            return LZFSE_STATUS_SRC_EMPTY; // SRC truncated

          // Get size, and check we have the entire structure
          const lzfse_compressed_block_header_v2 *header2 =
              (const lzfse_compressed_block_header_v2 *)s->src; // not aligned, OK
          header_size = lzfse_decode_v2_header_size(header2);
          if (s->src + header_size > s->src_end)
            return LZFSE_STATUS_SRC_EMPTY; // SRC truncated
          int decodeStatus = lzfse_decode_v1(&header1, header2);
          if (decodeStatus != 0)
            return LZFSE_STATUS_ERROR; // failed
        } else {
          if (s->src + sizeof(lzfse_compressed_block_header_v1) > s->src_end)
            return LZFSE_STATUS_SRC_EMPTY; // SRC truncated
          memcpy(&header1, s->src, sizeof(lzfse_compressed_block_header_v1));
          header_size = sizeof(lzfse_compressed_block_header_v1);
        }

        // We require the header + entire encoded block to be present in SRC
        // during the entire block decoding.
        // This can be relaxed somehow, if it becomes a limiting factor, at the
        // price of a more complex state maintenance.
        // For DST, we can't easily require space for the entire decoded block,
        // because it may expand to something very very large.
        if (s->src + header_size + header1.n_literal_payload_bytes +
                header1.n_lmd_payload_bytes >
            s->src_end)
          return LZFSE_STATUS_SRC_EMPTY; // need all encoded block

        // Sanity checks
        if (lzfse_check_block_header_v1(&header1) != 0) {
          return LZFSE_STATUS_ERROR;
        }

        // Skip header
        s->src += header_size;

        // Setup state for compressed V1 block from header
        lzfse_compressed_block_decoder_state *bs =
            &(s->compressed_lzfse_block_state);
        bs->n_lmd_payload_bytes = header1.n_lmd_payload_bytes;
        bs->n_matches = header1.n_matches;
        fse_init_decoder_table(LZFSE_ENCODE_LITERAL_STATES,
                               LZFSE_ENCODE_LITERAL_SYMBOLS,
                               header1.literal_freq, bs->literal_decoder);
        fse_init_value_decoder_table(
            LZFSE_ENCODE_L_STATES, LZFSE_ENCODE_L_SYMBOLS, header1.l_freq,
            l_extra_bits, l_base_value, bs->l_decoder);
        fse_init_value_decoder_table(
            LZFSE_ENCODE_M_STATES, LZFSE_ENCODE_M_SYMBOLS, header1.m_freq,
            m_extra_bits, m_base_value, bs->m_decoder);
        fse_init_value_decoder_table(
            LZFSE_ENCODE_D_STATES, LZFSE_ENCODE_D_SYMBOLS, header1.d_freq,
            d_extra_bits, d_base_value, bs->d_decoder);

        // Decode literals
        {
          fse_in_stream in;
          const uint8_t *buf_start = s->src_begin;
          s->src += header1.n_literal_payload_bytes; // skip literal payload
          const uint8_t *buf = s->src; // read bits backwards from the end
          if (fse_in_init(&in, header1.literal_bits, &buf, buf_start) != 0)
            return LZFSE_STATUS_ERROR;

          fse_state state0 = header1.literal_state[0];
          fse_state state1 = header1.literal_state[1];
          fse_state state2 = header1.literal_state[2];
          fse_state state3 = header1.literal_state[3];

          for (uint32_t i = 0; i < header1.n_literals; i += 4) // n_literals is multiple of 4
          {
#if FSE_IOSTREAM_64
            if (fse_in_flush(&in, &buf, buf_start) != 0)
              return LZFSE_STATUS_ERROR; // [57, 64] bits
            bs->literals[i + 0] =
                fse_decode(&state0, bs->literal_decoder, &in); // 10b max
            bs->literals[i + 1] =
                fse_decode(&state1, bs->literal_decoder, &in); // 10b max
            bs->literals[i + 2] =
                fse_decode(&state2, bs->literal_decoder, &in); // 10b max
            bs->literals[i + 3] =
                fse_decode(&state3, bs->literal_decoder, &in); // 10b max
#else
            if (fse_in_flush(&in, &buf, buf_start) != 0)
              return LZFSE_STATUS_ERROR; // [25, 23] bits
            bs->literals[i + 0] =
                fse_decode(&state0, bs->literal_decoder, &in); // 10b max
            bs->literals[i + 1] =
                fse_decode(&state1, bs->literal_decoder, &in); // 10b max
            if (fse_in_flush(&in, &buf, buf_start) != 0)
              return LZFSE_STATUS_ERROR; // [25, 23] bits
            bs->literals[i + 2] =
                fse_decode(&state2, bs->literal_decoder, &in); // 10b max
            bs->literals[i + 3] =
                fse_decode(&state3, bs->literal_decoder, &in); // 10b max
#endif
          }

          bs->current_literal = bs->literals;
        } // literals

        // SRC is not incremented to skip the LMD payload, since we need it
        // during block decode.
        // We will increment SRC at the end of the block only after this point.

        // Initialize the L,M,D decode stream, do not start decoding matches
        // yet, and store decoder state
        {
          fse_in_stream in;
          // read bits backwards from the end
          const uint8_t *buf = s->src + header1.n_lmd_payload_bytes;
          if (fse_in_init(&in, header1.lmd_bits, &buf, s->src) != 0)
            return LZFSE_STATUS_ERROR;

          bs->l_state = header1.l_state;
          bs->m_state = header1.m_state;
          bs->d_state = header1.d_state;
          bs->lmd_in_buf = (uint32_t)(buf - s->src);
          bs->l_value = bs->m_value = 0;
          //  Initialize D to an illegal value so we can't erroneously use
          //  an uninitialized "previous" value.
          bs->d_value = -1;
          bs->lmd_in_stream = in;
        }

        s->block_magic = magic;
        break;
      }

      // Here we have an invalid magic number
      return LZFSE_STATUS_ERROR;
    } // LZFSE_NO_BLOCK_MAGIC

    case LZFSE_UNCOMPRESSED_BLOCK_MAGIC: {
      uncompressed_block_decoder_state *bs = &(s->uncompressed_block_state);

      //  Compute the size (in bytes) of the data that we will actually copy.
      //  This size is minimum(bs->n_raw_bytes, space in src, space in dst).

      uint32_t copy_size = bs->n_raw_bytes; // bytes left to copy
      if (copy_size == 0) {
        s->block_magic = 0;
        break;
      } // end of block

      if (s->src_end <= s->src)
        return LZFSE_STATUS_SRC_EMPTY; // need more SRC data
      const size_t src_space = s->src_end - s->src;
      if (copy_size > src_space)
        copy_size = (uint32_t)src_space; // limit to SRC data (> 0)

      if (s->dst_end <= s->dst)
        return LZFSE_STATUS_DST_FULL; // need more DST capacity
      const size_t dst_space = s->dst_end - s->dst;
      if (copy_size > dst_space)
        copy_size = (uint32_t)dst_space; // limit to DST capacity (> 0)

      // Now that we know that the copy size is bounded to the source and
      // dest buffers, go ahead and copy the data.
      // We always have copy_size > 0 here
      memcpy(s->dst, s->src, copy_size);
      s->src += copy_size;
      s->dst += copy_size;
      bs->n_raw_bytes -= copy_size;

      break;
    } // LZFSE_UNCOMPRESSED_BLOCK_MAGIC

    case LZFSE_COMPRESSEDV1_BLOCK_MAGIC:
    case LZFSE_COMPRESSEDV2_BLOCK_MAGIC: {
      lzfse_compressed_block_decoder_state *bs =
          &(s->compressed_lzfse_block_state);
      // Require the entire LMD payload to be in SRC
      if (s->src_end <= s->src ||
          bs->n_lmd_payload_bytes > (size_t)(s->src_end - s->src))
        return LZFSE_STATUS_SRC_EMPTY;

      int status = lzfse_decode_lmd(s);
      if (status != LZFSE_STATUS_OK)
        return status;

      s->block_magic = LZFSE_NO_BLOCK_MAGIC;
      s->src += bs->n_lmd_payload_bytes; // to next block
      break;
    } // LZFSE_COMPRESSEDV1_BLOCK_MAGIC || LZFSE_COMPRESSEDV2_BLOCK_MAGIC

    case LZFSE_COMPRESSEDLZVN_BLOCK_MAGIC: {
      lzvn_compressed_block_decoder_state *bs =
          &(s->compressed_lzvn_block_state);
      if (bs->n_payload_bytes > 0 && s->src_end <= s->src)
        return LZFSE_STATUS_SRC_EMPTY; // need more SRC data

      // Init LZVN decoder state
      lzvn_decoder_state dstate;
      memset(&dstate, 0x00, sizeof(dstate));
      dstate.src = s->src;
      dstate.src_end = s->src_end;
      if (dstate.src_end - s->src > bs->n_payload_bytes)
        dstate.src_end = s->src + bs->n_payload_bytes; // limit to payload bytes
      dstate.dst_begin = s->dst_begin;
      dstate.dst = s->dst;
      dstate.dst_end = s->dst_end;
      if (dstate.dst_end - s->dst > bs->n_raw_bytes)
        dstate.dst_end = s->dst + bs->n_raw_bytes; // limit to raw bytes
      dstate.d_prev = bs->d_prev;
      dstate.end_of_stream = 0;

      // Run LZVN decoder
      lzvn_decode(&dstate);

      // Update our state
      size_t src_used = dstate.src - s->src;
      size_t dst_used = dstate.dst - s->dst;
      if (src_used > bs->n_payload_bytes || dst_used > bs->n_raw_bytes)
        return LZFSE_STATUS_ERROR; // sanity check
      s->src = dstate.src;
      s->dst = dstate.dst;
      bs->n_payload_bytes -= (uint32_t)src_used;
      bs->n_raw_bytes -= (uint32_t)dst_used;
      bs->d_prev = (uint32_t)dstate.d_prev;

      // Test end of block
      if (bs->n_payload_bytes == 0 && bs->n_raw_bytes == 0 &&
          dstate.end_of_stream) {
        s->block_magic = 0;
        break;
      } // block done

      // Check for invalid state
      if (bs->n_payload_bytes == 0 || bs->n_raw_bytes == 0 ||
          dstate.end_of_stream)
        return LZFSE_STATUS_ERROR;

      // Here, block is not done and state is valid, so we need more space in dst.
      return LZFSE_STATUS_DST_FULL;
    }

    default:
      return LZFSE_STATUS_ERROR; // invalid magic

    } // switch magic

  } // block loop

  return LZFSE_STATUS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x710, %rsp            # imm = 0x710
movq %rdi, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x6f4(%rbp)
testl %eax, %eax
je 0x78e7
jmp 0x7898
movl -0x6f4(%rbp), %eax
subl $0x2d787662, %eax       # imm = 0x2D787662
je 0x8e87
jmp 0x78ab
movl -0x6f4(%rbp), %eax
subl $0x31787662, %eax       # imm = 0x31787662
je 0x8ff6
jmp 0x78be
movl -0x6f4(%rbp), %eax
subl $0x32787662, %eax       # imm = 0x32787662
je 0x8ff6
jmp 0x78d1
movl -0x6f4(%rbp), %eax
subl $0x6e787662, %eax       # imm = 0x6E787662
je 0x90b0
jmp 0x934d
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq $0x4, %rax
movq -0x2c8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x7911
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x288(%rbp)
movq -0x288(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28c(%rbp)
movl -0x28c(%rbp), %eax
movl %eax, -0x2cc(%rbp)
cmpl $0x24787662, -0x2cc(%rbp) # imm = 0x24787662
jne 0x7977
movq -0x2c8(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x2c8(%rbp), %rax
movl $0x1, 0x30(%rax)
movl $0x0, -0x2c0(%rbp)
jmp 0x935e
cmpl $0x2d787662, -0x2cc(%rbp) # imm = 0x2D787662
jne 0x7a1e
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq $0x8, %rax
movq -0x2c8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x79b1
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
movq -0x2c8(%rbp), %rax
addq $0xb904, %rax           # imm = 0xB904
movq %rax, -0x2d8(%rbp)
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq $0x4, %rax
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x29c(%rbp)
movl -0x29c(%rbp), %ecx
movq -0x2d8(%rbp), %rax
movl %ecx, (%rax)
movq -0x2c8(%rbp), %rax
movq (%rax), %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
movl -0x2cc(%rbp), %ecx
movq -0x2c8(%rbp), %rax
movl %ecx, 0x34(%rax)
jmp 0x9359
cmpl $0x6e787662, -0x2cc(%rbp) # imm = 0x6E787662
jne 0x7b07
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq $0xc, %rax
movq -0x2c8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x7a58
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
movq -0x2c8(%rbp), %rax
addq $0xb8f8, %rax           # imm = 0xB8F8
movq %rax, -0x2e0(%rbp)
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq $0x4, %rax
movq %rax, -0x2a8(%rbp)
movq -0x2a8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2ac(%rbp)
movl -0x2ac(%rbp), %ecx
movq -0x2e0(%rbp), %rax
movl %ecx, (%rax)
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq $0x8, %rax
movq %rax, -0x2b8(%rbp)
movq -0x2b8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2bc(%rbp)
movl -0x2bc(%rbp), %ecx
movq -0x2e0(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x2e0(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x2c8(%rbp), %rax
movq (%rax), %rcx
addq $0xc, %rcx
movq %rcx, (%rax)
movl -0x2cc(%rbp), %ecx
movq -0x2c8(%rbp), %rax
movl %ecx, 0x34(%rax)
jmp 0x9359
cmpl $0x31787662, -0x2cc(%rbp) # imm = 0x31787662
je 0x7b23
cmpl $0x32787662, -0x2cc(%rbp) # imm = 0x32787662
jne 0x8e78
movq $0x0, -0x5f0(%rbp)
cmpl $0x32787662, -0x2cc(%rbp) # imm = 0x32787662
jne 0x7bee
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq $0x20, %rax
movq -0x2c8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x7b68
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x5f8(%rbp)
movq -0x5f8(%rbp), %rdi
callq 0x9370
movl %eax, %eax
movq %rax, -0x5f0(%rbp)
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq -0x5f0(%rbp), %rax
movq -0x2c8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x7bbb
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
movq -0x5f8(%rbp), %rsi
leaq -0x5e4(%rbp), %rdi
callq 0x93a0
movl %eax, -0x5fc(%rbp)
cmpl $0x0, -0x5fc(%rbp)
je 0x7bec
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
jmp 0x7c40
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq $0x304, %rax            # imm = 0x304
movq -0x2c8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x7c1a
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
movq -0x2c8(%rbp), %rax
movq (%rax), %rsi
leaq -0x5e4(%rbp), %rdi
movl $0x304, %edx            # imm = 0x304
callq 0x30c0
movq $0x304, -0x5f0(%rbp) # imm = 0x304
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
addq -0x5f0(%rbp), %rax
movl -0x5d0(%rbp), %ecx
addq %rcx, %rax
movl -0x5cc(%rbp), %ecx
addq %rcx, %rax
movq -0x2c8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x7c7f
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
leaq -0x5e4(%rbp), %rax
movq %rax, -0x270(%rbp)
movl $0x0, -0x274(%rbp)
movl -0x274(%rbp), %eax
movq -0x270(%rbp), %rcx
movl (%rcx), %esi
movl $0x1, %ecx
xorl %edx, %edx
cmpl $0x31787662, %esi       # imm = 0x31787662
cmovel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movq -0x270(%rbp), %rcx
movl 0xc(%rcx), %esi
movl $0x2, %ecx
xorl %edx, %edx
cmpl $0x9c40, %esi           # imm = 0x9C40
cmovbel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movq -0x270(%rbp), %rcx
movl 0x10(%rcx), %esi
movl $0x4, %ecx
xorl %edx, %edx
cmpl $0x2710, %esi           # imm = 0x2710
cmovbel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movq -0x270(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x27c(%rbp)
movl -0x274(%rbp), %eax
movzwl -0x27c(%rbp), %esi
movl $0x8, %ecx
xorl %edx, %edx
cmpl $0x400, %esi            # imm = 0x400
cmovll %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movzwl -0x27a(%rbp), %esi
movl $0x10, %ecx
xorl %edx, %edx
cmpl $0x400, %esi            # imm = 0x400
cmovll %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movzwl -0x278(%rbp), %esi
movl $0x20, %ecx
xorl %edx, %edx
cmpl $0x400, %esi            # imm = 0x400
cmovll %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movzwl -0x276(%rbp), %esi
movl $0x40, %ecx
xorl %edx, %edx
cmpl $0x400, %esi            # imm = 0x400
cmovll %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movq -0x270(%rbp), %rcx
movzwl 0x2c(%rcx), %esi
movl $0x80, %ecx
xorl %edx, %edx
cmpl $0x40, %esi
cmovll %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movq -0x270(%rbp), %rcx
movzwl 0x2e(%rcx), %esi
movl $0x100, %ecx            # imm = 0x100
xorl %edx, %edx
cmpl $0x40, %esi
cmovll %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movl -0x274(%rbp), %eax
movq -0x270(%rbp), %rcx
movzwl 0x30(%rcx), %esi
movl $0x200, %ecx            # imm = 0x200
xorl %edx, %edx
cmpl $0x100, %esi            # imm = 0x100
cmovll %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movq -0x270(%rbp), %rax
addq $0x32, %rax
movq %rax, -0xc8(%rbp)
movq $0x14, -0xd0(%rbp)
movq $0x40, -0xd8(%rbp)
movq $0x0, -0xe0(%rbp)
movl $0x0, -0xe4(%rbp)
movslq -0xe4(%rbp), %rax
cmpq -0xd0(%rbp), %rax
jae 0x7ea7
movq -0xc8(%rbp), %rax
movslq -0xe4(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
addq -0xe0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x7e66
movq -0xe0(%rbp), %rdx
movq -0xd8(%rbp), %rsi
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmoval %ecx, %eax
movl %eax, -0x280(%rbp)
movl -0x274(%rbp), %eax
movl -0x280(%rbp), %esi
movl $0x400, %ecx            # imm = 0x400
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movq -0x270(%rbp), %rax
addq $0x5a, %rax
movq %rax, -0xf0(%rbp)
movq $0x14, -0xf8(%rbp)
movq $0x40, -0x100(%rbp)
movq $0x0, -0x108(%rbp)
movl $0x0, -0x10c(%rbp)
movslq -0x10c(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jae 0x7f67
movq -0xf0(%rbp), %rax
movslq -0x10c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
addq -0x108(%rbp), %rax
movq %rax, -0x108(%rbp)
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0x7f26
movq -0x108(%rbp), %rdx
movq -0x100(%rbp), %rsi
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmoval %ecx, %eax
movl %eax, -0x280(%rbp)
movl -0x274(%rbp), %eax
movl -0x280(%rbp), %esi
movl $0x800, %ecx            # imm = 0x800
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movq -0x270(%rbp), %rax
addq $0x82, %rax
movq %rax, -0x118(%rbp)
movq $0x40, -0x120(%rbp)
movq $0x100, -0x128(%rbp) # imm = 0x100
movq $0x0, -0x130(%rbp)
movl $0x0, -0x134(%rbp)
movslq -0x134(%rbp), %rax
cmpq -0x120(%rbp), %rax
jae 0x8029
movq -0x118(%rbp), %rax
movslq -0x134(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
addq -0x130(%rbp), %rax
movq %rax, -0x130(%rbp)
movl -0x134(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x134(%rbp)
jmp 0x7fe8
movq -0x130(%rbp), %rdx
movq -0x128(%rbp), %rsi
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmoval %ecx, %eax
movl %eax, -0x280(%rbp)
movl -0x274(%rbp), %eax
movl -0x280(%rbp), %esi
movl $0x1000, %ecx           # imm = 0x1000
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
movq -0x270(%rbp), %rax
addq $0x102, %rax            # imm = 0x102
movq %rax, -0x140(%rbp)
movq $0x100, -0x148(%rbp) # imm = 0x100
movq $0x400, -0x150(%rbp) # imm = 0x400
movq $0x0, -0x158(%rbp)
movl $0x0, -0x15c(%rbp)
movslq -0x15c(%rbp), %rax
cmpq -0x148(%rbp), %rax
jae 0x80eb
movq -0x140(%rbp), %rax
movslq -0x15c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
addq -0x158(%rbp), %rax
movq %rax, -0x158(%rbp)
movl -0x15c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x15c(%rbp)
jmp 0x80aa
movq -0x158(%rbp), %rdx
movq -0x150(%rbp), %rsi
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
cmoval %ecx, %eax
movl %eax, -0x280(%rbp)
movl -0x274(%rbp), %eax
movl -0x280(%rbp), %esi
movl $0x2000, %ecx           # imm = 0x2000
xorl %edx, %edx
cmpl $0x0, %esi
cmovel %edx, %ecx
orl %ecx, %eax
movl %eax, -0x274(%rbp)
cmpl $0x0, -0x274(%rbp)
je 0x8149
movl -0x274(%rbp), %eax
orl $0x80000000, %eax       # imm = 0x80000000
movl %eax, -0x264(%rbp)
jmp 0x8153
movl $0x0, -0x264(%rbp)
cmpl $0x0, -0x264(%rbp)
je 0x816b
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
movq -0x5f0(%rbp), %rcx
movq -0x2c8(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x2c8(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x608(%rbp)
movl -0x5cc(%rbp), %ecx
movq -0x608(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x5d4(%rbp), %ecx
movq -0x608(%rbp), %rax
movl %ecx, (%rax)
leaq -0x5e4(%rbp), %rdx
addq $0x102, %rdx            # imm = 0x102
movq -0x608(%rbp), %rcx
addq $0xc40, %rcx            # imm = 0xC40
movl $0x400, %edi            # imm = 0x400
movl $0x100, %esi            # imm = 0x100
callq 0xdbc0
leaq -0x5e4(%rbp), %rdx
addq $0x32, %rdx
movq -0x608(%rbp), %r9
addq $0x40, %r9
movl $0x40, %edi
movl $0x14, %esi
leaq 0x7f0e(%rip), %rcx      # 0x10110
leaq 0x7f27(%rip), %r8       # 0x10130
callq 0xdda0
leaq -0x5e4(%rbp), %rdx
addq $0x5a, %rdx
movq -0x608(%rbp), %r9
addq $0x240, %r9             # imm = 0x240
movl $0x40, %edi
movl $0x14, %esi
leaq 0x7f48(%rip), %rcx      # 0x10180
leaq 0x7f61(%rip), %r8       # 0x101a0
callq 0xdda0
leaq -0x5e4(%rbp), %rdx
addq $0x82, %rdx
movq -0x608(%rbp), %r9
addq $0x440, %r9             # imm = 0x440
movl $0x100, %edi            # imm = 0x100
movl $0x40, %esi
leaq 0x7f7f(%rip), %rcx      # 0x101f0
leaq 0x7fb8(%rip), %r8       # 0x10230
callq 0xdda0
movq -0x2c8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x620(%rbp)
movl -0x5d0(%rbp), %edx
movq -0x2c8(%rbp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x628(%rbp)
movl -0x5c8(%rbp), %ecx
movq -0x620(%rbp), %rax
leaq -0x618(%rbp), %rdx
movq %rdx, -0x220(%rbp)
movl %ecx, -0x224(%rbp)
leaq -0x628(%rbp), %rcx
movq %rcx, -0x230(%rbp)
movq %rax, -0x238(%rbp)
cmpl $0x0, -0x224(%rbp)
je 0x8360
movq -0x230(%rbp), %rax
movq (%rax), %rax
movq -0x238(%rbp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jae 0x8320
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x8434
movq -0x230(%rbp), %rax
movq (%rax), %rcx
addq $-0x8, %rcx
movq %rcx, (%rax)
movq -0x220(%rbp), %rax
movq -0x230(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movl -0x224(%rbp), %ecx
addl $0x40, %ecx
movq -0x220(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x83e7
movq -0x230(%rbp), %rax
movq (%rax), %rax
movq -0x238(%rbp), %rcx
addq $0x7, %rcx
cmpq %rcx, %rax
jae 0x8389
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x8434
movq -0x230(%rbp), %rax
movq (%rax), %rcx
addq $-0x7, %rcx
movq %rcx, (%rax)
movq -0x220(%rbp), %rax
movq -0x230(%rbp), %rcx
movq (%rcx), %rcx
movl (%rcx), %edx
movl %edx, (%rax)
movw 0x4(%rcx), %dx
movw %dx, 0x4(%rax)
movb 0x6(%rcx), %cl
movb %cl, 0x6(%rax)
movq -0x220(%rbp), %rax
movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF
andq (%rax), %rcx
movq %rcx, (%rax)
movl -0x224(%rbp), %ecx
addl $0x38, %ecx
movq -0x220(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x220(%rbp), %rax
cmpl $0x38, 0x8(%rax)
jl 0x841e
movq -0x220(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jge 0x841e
movq -0x220(%rbp), %rax
movq (%rax), %rax
movq -0x220(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x842a
movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF
jmp 0x8434
movl $0x0, -0x214(%rbp)
cmpl $0x0, -0x214(%rbp)
je 0x844c
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
movw -0x5c4(%rbp), %ax
movw %ax, -0x62a(%rbp)
movw -0x5c2(%rbp), %ax
movw %ax, -0x62c(%rbp)
movw -0x5c0(%rbp), %ax
movw %ax, -0x62e(%rbp)
movw -0x5be(%rbp), %ax
movw %ax, -0x630(%rbp)
movl $0x0, -0x634(%rbp)
movl -0x634(%rbp), %eax
cmpl -0x5d8(%rbp), %eax
jae 0x8bfc
movq -0x620(%rbp), %rax
leaq -0x618(%rbp), %rcx
movq %rcx, -0x1e8(%rbp)
leaq -0x628(%rbp), %rcx
movq %rcx, -0x1f0(%rbp)
movq %rax, -0x1f8(%rbp)
movq -0x1e8(%rbp), %rcx
movl $0x3f, %eax
subl 0x8(%rcx), %eax
andl $-0x8, %eax
movl %eax, -0x1fc(%rbp)
movq -0x1f0(%rbp), %rax
movq (%rax), %rax
movl -0x1fc(%rbp), %ecx
sarl $0x3, %ecx
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
cmpq -0x1f8(%rbp), %rax
jae 0x8526
movl $0xffffffff, -0x1e0(%rbp) # imm = 0xFFFFFFFF
jmp 0x861e
movq -0x208(%rbp), %rcx
movq -0x1f0(%rbp), %rax
movq %rcx, (%rax)
movq -0x208(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x210(%rbp)
movq -0x1e8(%rbp), %rax
movq (%rax), %rax
movl -0x1fc(%rbp), %ecx
shlq %cl, %rax
movq %rax, -0x700(%rbp)
movq -0x210(%rbp), %rdi
movl -0x1fc(%rbp), %esi
callq 0xa570
movq -0x700(%rbp), %rcx
orq %rax, %rcx
movq -0x1e8(%rbp), %rax
movq %rcx, (%rax)
movl -0x1fc(%rbp), %ecx
movq -0x1e8(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movq -0x1e8(%rbp), %rax
cmpl $0x38, 0x8(%rax)
jl 0x85d4
movq -0x1e8(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jge 0x85d4
movq -0x1e8(%rbp), %rax
movq (%rax), %rax
movq -0x1e8(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x85f3
jmp 0x85ff
leaq 0x8304(%rip), %rdi      # 0x108df
leaq 0x8170(%rip), %rsi      # 0x10752
movl $0x178, %edx            # imm = 0x178
leaq 0x831d(%rip), %rcx      # 0x1090b
callq 0x3070
movl $0x0, -0x1e0(%rbp)
jmp 0x861e
leaq 0x81a9(%rip), %rdi      # 0x107af
leaq 0x8145(%rip), %rsi      # 0x10752
movl $0x178, %edx            # imm = 0x178
leaq 0x82f2(%rip), %rcx      # 0x1090b
callq 0x3070
cmpl $0x0, -0x1e0(%rbp)
je 0x8636
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
movq -0x608(%rbp), %rax
addq $0xc40, %rax            # imm = 0xC40
leaq -0x62a(%rbp), %rcx
movq %rcx, -0x168(%rbp)
movq %rax, -0x170(%rbp)
leaq -0x618(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x170(%rbp), %rax
movq -0x168(%rbp), %rcx
movzwl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x17c(%rbp)
movl -0x17c(%rbp), %eax
sarl $0x10, %eax
movzwl %ax, %eax
movl %eax, -0x704(%rbp)
movq -0x178(%rbp), %rcx
movl -0x17c(%rbp), %eax
andl $0xff, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
cmpl $0x0, -0xb4(%rbp)
jl 0x86cc
movl -0xb4(%rbp), %eax
movq -0xb0(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x86eb
leaq 0x8289(%rip), %rdi      # 0x1095c
leaq 0x8078(%rip), %rsi      # 0x10752
movl $0x198, %edx            # imm = 0x198
leaq 0x8294(%rip), %rcx      # 0x1097a
callq 0x3070
movl -0xb4(%rbp), %edx
movq -0xb0(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0xb0(%rbp), %rax
movq (%rax), %rax
movq -0xb0(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
movq %rax, -0xc0(%rbp)
movq -0xb0(%rbp), %rax
movq (%rax), %rdi
movq -0xb0(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xa570
movq %rax, %rdx
movl -0x704(%rbp), %eax
movq -0xb0(%rbp), %rcx
movq %rdx, (%rcx)
movq -0xc0(%rbp), %rcx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x168(%rbp), %rax
movw %cx, (%rax)
movslq -0x17c(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x8, -0x5c(%rbp)
movl $0x8, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, %ecx
shrq %cl, %rdi
movl -0x60(%rbp), %esi
callq 0xa570
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb %al, %dl
movq -0x608(%rbp), %rax
movl -0x634(%rbp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
movb %dl, 0x1c40(%rax,%rcx)
movq -0x608(%rbp), %rax
addq $0xc40, %rax            # imm = 0xC40
leaq -0x62c(%rbp), %rcx
movq %rcx, -0x188(%rbp)
movq %rax, -0x190(%rbp)
leaq -0x618(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x190(%rbp), %rax
movq -0x188(%rbp), %rcx
movzwl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x19c(%rbp)
movl -0x19c(%rbp), %eax
sarl $0x10, %eax
movzwl %ax, %eax
movl %eax, -0x708(%rbp)
movq -0x198(%rbp), %rcx
movl -0x19c(%rbp), %eax
andl $0xff, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
jl 0x8849
movl -0x9c(%rbp), %eax
movq -0x98(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x8868
leaq 0x810c(%rip), %rdi      # 0x1095c
leaq 0x7efb(%rip), %rsi      # 0x10752
movl $0x198, %edx            # imm = 0x198
leaq 0x8117(%rip), %rcx      # 0x1097a
callq 0x3070
movl -0x9c(%rbp), %edx
movq -0x98(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x98(%rbp), %rax
movq (%rax), %rax
movq -0x98(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq (%rax), %rdi
movq -0x98(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xa570
movq %rax, %rdx
movl -0x708(%rbp), %eax
movq -0x98(%rbp), %rcx
movq %rdx, (%rcx)
movq -0xa8(%rbp), %rcx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x188(%rbp), %rax
movw %cx, (%rax)
movslq -0x19c(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x8, -0x44(%rbp)
movl $0x8, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, %ecx
shrq %cl, %rdi
movl -0x48(%rbp), %esi
callq 0xa570
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb %al, %dl
movq -0x608(%rbp), %rax
movl -0x634(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb %dl, 0x1c40(%rax,%rcx)
movq -0x608(%rbp), %rax
addq $0xc40, %rax            # imm = 0xC40
leaq -0x62e(%rbp), %rcx
movq %rcx, -0x1a8(%rbp)
movq %rax, -0x1b0(%rbp)
leaq -0x618(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b0(%rbp), %rax
movq -0x1a8(%rbp), %rcx
movzwl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1bc(%rbp)
movl -0x1bc(%rbp), %eax
sarl $0x10, %eax
movzwl %ax, %eax
movl %eax, -0x70c(%rbp)
movq -0x1b8(%rbp), %rcx
movl -0x1bc(%rbp), %eax
andl $0xff, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jl 0x89c0
movl -0x84(%rbp), %eax
movq -0x80(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x89df
leaq 0x7f95(%rip), %rdi      # 0x1095c
leaq 0x7d84(%rip), %rsi      # 0x10752
movl $0x198, %edx            # imm = 0x198
leaq 0x7fa0(%rip), %rcx      # 0x1097a
callq 0x3070
movl -0x84(%rbp), %edx
movq -0x80(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x80(%rbp), %rax
movq (%rax), %rax
movq -0x80(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
movq %rax, -0x90(%rbp)
movq -0x80(%rbp), %rax
movq (%rax), %rdi
movq -0x80(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xa570
movq %rax, %rdx
movl -0x70c(%rbp), %eax
movq -0x80(%rbp), %rcx
movq %rdx, (%rcx)
movq -0x90(%rbp), %rcx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x1a8(%rbp), %rax
movw %cx, (%rax)
movslq -0x1bc(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x8, -0x2c(%rbp)
movl $0x8, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, %ecx
shrq %cl, %rdi
movl -0x30(%rbp), %esi
callq 0xa570
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb %al, %dl
movq -0x608(%rbp), %rax
movl -0x634(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb %dl, 0x1c40(%rax,%rcx)
movq -0x608(%rbp), %rax
addq $0xc40, %rax            # imm = 0xC40
leaq -0x630(%rbp), %rcx
movq %rcx, -0x1c8(%rbp)
movq %rax, -0x1d0(%rbp)
leaq -0x618(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d0(%rbp), %rax
movq -0x1c8(%rbp), %rcx
movzwl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1dc(%rbp)
movl -0x1dc(%rbp), %eax
sarl $0x10, %eax
movzwl %ax, %eax
movl %eax, -0x710(%rbp)
movq -0x1d8(%rbp), %rcx
movl -0x1dc(%rbp), %eax
andl $0xff, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
jl 0x8b1c
movl -0x6c(%rbp), %eax
movq -0x68(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x8b3b
leaq 0x7e39(%rip), %rdi      # 0x1095c
leaq 0x7c28(%rip), %rsi      # 0x10752
movl $0x198, %edx            # imm = 0x198
leaq 0x7e44(%rip), %rcx      # 0x1097a
callq 0x3070
movl -0x6c(%rbp), %edx
movq -0x68(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rax
movq (%rax), %rdi
movq -0x68(%rbp), %rax
movl 0x8(%rax), %esi
callq 0xa570
movq %rax, %rdx
movl -0x710(%rbp), %eax
movq -0x68(%rbp), %rcx
movq %rdx, (%rcx)
movq -0x78(%rbp), %rcx
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x1c8(%rbp), %rax
movw %cx, (%rax)
movslq -0x1dc(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x8, -0x14(%rbp)
movl $0x8, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %ecx
shrq %cl, %rdi
movl -0x18(%rbp), %esi
callq 0xa570
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb %al, %dl
movq -0x608(%rbp), %rax
movl -0x634(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb %dl, 0x1c40(%rax,%rcx)
movl -0x634(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x634(%rbp)
jmp 0x848e
movq -0x608(%rbp), %rcx
addq $0x1c40, %rcx           # imm = 0x1C40
movq -0x608(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
movl -0x5cc(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x650(%rbp)
movl -0x5bc(%rbp), %ecx
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
leaq -0x648(%rbp), %rdx
movq %rdx, -0x248(%rbp)
movl %ecx, -0x24c(%rbp)
leaq -0x650(%rbp), %rcx
movq %rcx, -0x258(%rbp)
movq %rax, -0x260(%rbp)
cmpl $0x0, -0x24c(%rbp)
je 0x8cda
movq -0x258(%rbp), %rax
movq (%rax), %rax
movq -0x260(%rbp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jae 0x8c9a
movl $0xffffffff, -0x23c(%rbp) # imm = 0xFFFFFFFF
jmp 0x8dae
movq -0x258(%rbp), %rax
movq (%rax), %rcx
addq $-0x8, %rcx
movq %rcx, (%rax)
movq -0x248(%rbp), %rax
movq -0x258(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movl -0x24c(%rbp), %ecx
addl $0x40, %ecx
movq -0x248(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x8d61
movq -0x258(%rbp), %rax
movq (%rax), %rax
movq -0x260(%rbp), %rcx
addq $0x7, %rcx
cmpq %rcx, %rax
jae 0x8d03
movl $0xffffffff, -0x23c(%rbp) # imm = 0xFFFFFFFF
jmp 0x8dae
movq -0x258(%rbp), %rax
movq (%rax), %rcx
addq $-0x7, %rcx
movq %rcx, (%rax)
movq -0x248(%rbp), %rax
movq -0x258(%rbp), %rcx
movq (%rcx), %rcx
movl (%rcx), %edx
movl %edx, (%rax)
movw 0x4(%rcx), %dx
movw %dx, 0x4(%rax)
movb 0x6(%rcx), %cl
movb %cl, 0x6(%rax)
movq -0x248(%rbp), %rax
movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF
andq (%rax), %rcx
movq %rcx, (%rax)
movl -0x24c(%rbp), %ecx
addl $0x38, %ecx
movq -0x248(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x248(%rbp), %rax
cmpl $0x38, 0x8(%rax)
jl 0x8d98
movq -0x248(%rbp), %rax
cmpl $0x40, 0x8(%rax)
jge 0x8d98
movq -0x248(%rbp), %rax
movq (%rax), %rax
movq -0x248(%rbp), %rcx
movl 0x8(%rcx), %ecx
shrq %cl, %rax
cmpq $0x0, %rax
je 0x8da4
movl $0xffffffff, -0x23c(%rbp) # imm = 0xFFFFFFFF
jmp 0x8dae
movl $0x0, -0x23c(%rbp)
cmpl $0x0, -0x23c(%rbp)
je 0x8dc6
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
movw -0x5b8(%rbp), %cx
movq -0x608(%rbp), %rax
movw %cx, 0x34(%rax)
movw -0x5b6(%rbp), %cx
movq -0x608(%rbp), %rax
movw %cx, 0x36(%rax)
movw -0x5b4(%rbp), %cx
movq -0x608(%rbp), %rax
movw %cx, 0x38(%rax)
movq -0x650(%rbp), %rax
movq -0x2c8(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x608(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x608(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x608(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x608(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x608(%rbp), %rax
movq -0x648(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x640(%rbp), %rcx
movq %rcx, 0x28(%rax)
movl -0x2cc(%rbp), %ecx
movq -0x2c8(%rbp), %rax
movl %ecx, 0x34(%rax)
jmp 0x9359
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
movq -0x2c8(%rbp), %rax
addq $0xb904, %rax           # imm = 0xB904
movq %rax, -0x658(%rbp)
movq -0x658(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x65c(%rbp)
cmpl $0x0, -0x65c(%rbp)
jne 0x8ec6
movq -0x2c8(%rbp), %rax
movl $0x0, 0x34(%rax)
jmp 0x9359
movq -0x2c8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x2c8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x8eec
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
movq -0x2c8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x2c8(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x668(%rbp)
movl -0x65c(%rbp), %eax
cmpq -0x668(%rbp), %rax
jbe 0x8f27
movq -0x668(%rbp), %rax
movl %eax, -0x65c(%rbp)
movq -0x2c8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x2c8(%rbp), %rcx
cmpq 0x18(%rcx), %rax
ja 0x8f4e
movl $0xfffffffe, -0x2c0(%rbp) # imm = 0xFFFFFFFE
jmp 0x935e
movq -0x2c8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x2c8(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x670(%rbp)
movl -0x65c(%rbp), %eax
cmpq -0x670(%rbp), %rax
jbe 0x8f8a
movq -0x670(%rbp), %rax
movl %eax, -0x65c(%rbp)
movq -0x2c8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x2c8(%rbp), %rax
movq (%rax), %rsi
movl -0x65c(%rbp), %eax
movl %eax, %edx
callq 0x30c0
movl -0x65c(%rbp), %edx
movq -0x2c8(%rbp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x65c(%rbp), %edx
movq -0x2c8(%rbp), %rax
movq 0x18(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x18(%rax)
movl -0x65c(%rbp), %edx
movq -0x658(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
jmp 0x9359
movq -0x2c8(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x678(%rbp)
movq -0x2c8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x2c8(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x9046
movq -0x678(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x2c8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x2c8(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x9055
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
movq -0x2c8(%rbp), %rdi
callq 0x96d0
movl %eax, -0x67c(%rbp)
cmpl $0x0, -0x67c(%rbp)
je 0x9081
movl -0x67c(%rbp), %eax
movl %eax, -0x2c0(%rbp)
jmp 0x935e
movq -0x2c8(%rbp), %rax
movl $0x0, 0x34(%rax)
movq -0x678(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x2c8(%rbp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
jmp 0x9359
movq -0x2c8(%rbp), %rax
addq $0xb8f8, %rax           # imm = 0xB8F8
movq %rax, -0x688(%rbp)
movq -0x688(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jbe 0x90f7
movq -0x2c8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x2c8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x90f7
movl $0xffffffff, -0x2c0(%rbp) # imm = 0xFFFFFFFF
jmp 0x935e
leaq -0x6e0(%rbp), %rdi
xorl %esi, %esi
movl $0x58, %edx
callq 0x3080
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x6e0(%rbp)
movq -0x2c8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x6d8(%rbp)
movq -0x6d8(%rbp), %rax
movq -0x2c8(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq -0x688(%rbp), %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jle 0x916e
movq -0x2c8(%rbp), %rax
movq (%rax), %rax
movq -0x688(%rbp), %rcx
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x6d8(%rbp)
movq -0x2c8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x6c8(%rbp)
movq -0x2c8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x6d0(%rbp)
movq -0x2c8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x6c0(%rbp)
movq -0x6c0(%rbp), %rax
movq -0x2c8(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq -0x688(%rbp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jle 0x91e5
movq -0x2c8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x688(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x6c0(%rbp)
movq -0x688(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x698(%rbp)
movl $0x0, -0x690(%rbp)
leaq -0x6e0(%rbp), %rdi
callq 0xbee0
movq -0x6e0(%rbp), %rax
movq -0x2c8(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x6e8(%rbp)
movq -0x6d0(%rbp), %rax
movq -0x2c8(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x6f0(%rbp)
movq -0x6e8(%rbp), %rax
movq -0x688(%rbp), %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
ja 0x926e
movq -0x6f0(%rbp), %rax
movq -0x688(%rbp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
jbe 0x927d
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
movq -0x6e0(%rbp), %rcx
movq -0x2c8(%rbp), %rax
movq %rcx, (%rax)
movq -0x6d0(%rbp), %rcx
movq -0x2c8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x6e8(%rbp), %rax
movl %eax, %edx
movq -0x688(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movq -0x6f0(%rbp), %rax
movl %eax, %edx
movq -0x688(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x698(%rbp), %rax
movl %eax, %ecx
movq -0x688(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x688(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x9313
movq -0x688(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x9313
cmpl $0x0, -0x690(%rbp)
je 0x9313
movq -0x2c8(%rbp), %rax
movl $0x0, 0x34(%rax)
jmp 0x9359
movq -0x688(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x9335
movq -0x688(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9335
cmpl $0x0, -0x690(%rbp)
je 0x9341
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
movl $0xfffffffe, -0x2c0(%rbp) # imm = 0xFFFFFFFE
jmp 0x935e
movl $0xfffffffd, -0x2c0(%rbp) # imm = 0xFFFFFFFD
jmp 0x935e
jmp 0x7882
movl -0x2c0(%rbp), %eax
addq $0x710, %rsp            # imm = 0x710
popq %rbp
retq
nopl (%rax)