// File: WojciechMula[P]utf16utf8/src/sse.cpp
// Function: sse_convert_valid_utf8_to_utf16_lemire(unsigned char const*, unsigned long, unsigned short*)
size_t sse_convert_valid_utf8_to_utf16_lemire(const uint8_t* input, size_t size, uint16_t* output) {
  size_t pos = 0;
  uint16_t *start = output;
  while (pos + 16 <= size) {
    //////////////////////////////
    // Could go faster if we grab large
    // blocks of data, larger than
    // 16 bytes?
    //////////////////////////////
    const __m128i in = _mm_loadu_si128((__m128i *)(input + pos));
    const uint16_t non_ascii_chars = uint16_t(_mm_movemask_epi8(in));
    // ASCII is likely common in many cases, we want a fast path.
    if(non_ascii_chars == 0) {
        // could use _mm256_cvtepu8_epi16/_mm_cvtepu8_epi16 (SSE4.1)
        const __m128i out1 = _mm_unpacklo_epi8(in, _mm_setzero_si128());// order of parameter determines endianness
        _mm_storeu_si128((__m128i*)output, out1);
        output += 8;
        const __m128i out2 = _mm_unpackhi_epi8(in, _mm_setzero_si128());
        _mm_storeu_si128((__m128i*)output, out2);
        output += 8;
        pos += 16;
        continue;
    }
    // 
    // Otherwise, we use an approach where we try to process up to 12 input bytes.
    // Why 12 input bytes and not 16? Because we are concerned with the size of the lookup tables.
    // Also 12 is nicely divisible by two and three.
    //
    //const __m128i maxtwobyte = _mm_set1_epi8(uint8_t(0xdf));
    //uint16_t istwobytes = uint16_t(_mm_movemask_epi8(_mm_cmpeq_epi8(_mm_max_epu8(maxtwobyte, in), maxtwobyte)));
    // The most significant 4 bits (high nibble) can be used to classify the bytes, as
    // to whether they start a new code point.
    const __m128i hn = _mm_set1_epi8(uint8_t(0xF));
    const __m128i in_high_nibbles = _mm_and_si128(hn, _mm_srli_epi16(in, 4));
    // We could remove the UTF8 headers with one instruction:
    //const __m128i masks = _mm_shuffle_epi8(_mm_set_epi8(0xf0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0), in_high_nibbles);
    const uint16_t start_of_code_point = uint16_t(_mm_movemask_epi8(_mm_shuffle_epi8(_mm_set_epi8(0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff), in_high_nibbles)));
    /////////////
    // ASCII characters are the start and the end of a code point 
    // and anything immediately before the start of a code point 
    // must be the end of a start of code point.
    ///////////
    const uint16_t end_of_code_point = uint16_t((start_of_code_point >> 1) | (! non_ascii_chars));
    const uint16_t twelvebits_mask = 0xFFF;
    const uint16_t twelvebits_end_of_code_point = end_of_code_point&twelvebits_mask;
    const uint8_t idx = utf8bigindex[twelvebits_end_of_code_point][0];
    const uint8_t consumed = utf8bigindex[twelvebits_end_of_code_point][1];
    //
    // Let us first try to see if we are in the easy two-byte scenario
    //
    if(idx < 64) {
        // this is a relatively easy scenario
        // we process SIX (6) input code-words. The max length in bytes of six code words
        // spanning between 1 and 2 bytes each is 12 bytes.
        // On processors where pdep/pext is fast, we might be able to use a small lookup table.
        const __m128i sh = _mm_loadu_si128((const __m128i *)shufutf8[idx]);
        const __m128i perm = _mm_shuffle_epi8(in, sh);
        const __m128i ascii = _mm_and_si128(perm,_mm_set1_epi16(0x7f));
        const __m128i highbyte = _mm_and_si128(perm,_mm_set1_epi16(0x1f00));
        const __m128i composed = _mm_or_si128(ascii,_mm_srli_epi16(highbyte,2));
        _mm_storeu_si128((__m128i*)output, composed);
        output += 6;
        pos += consumed;
    } else if (idx < 145) {
        const __m128i sh = _mm_loadu_si128((const __m128i *)shufutf8[idx]);
        const __m128i perm = _mm_shuffle_epi8(in, sh);
        const __m128i ascii = _mm_and_si128(perm,_mm_set1_epi32(0x7f)); // 7 or 6 bits
        const __m128i middlebyte = _mm_and_si128(perm,_mm_set1_epi32(0x3f00)); // 5 or 6 bits
        const __m128i middlebyte_shifted = _mm_srli_epi32(middlebyte,2);
        const __m128i highbyte = _mm_and_si128(perm,_mm_set1_epi32(0x0f0000)); // 4 bits
        const __m128i highbyte_shifted = _mm_srli_epi32(highbyte,4);
        const __m128i composed = _mm_or_si128(_mm_or_si128(ascii,middlebyte_shifted),highbyte_shifted);
        const __m128i composed_repacked = _mm_packus_epi32(composed,composed);
        _mm_storeu_si128((__m128i*)output,  composed_repacked);
        output += 4;
        pos += consumed;
    } else if(idx < 209) {
        const __m128i sh = _mm_loadu_si128((const __m128i *)shufutf8[idx]);
        const __m128i perm = _mm_shuffle_epi8(in, sh);
        const __m128i ascii = _mm_and_si128(perm,_mm_set1_epi32(0x7f)); 
        const __m128i middlebyte = _mm_and_si128(perm,_mm_set1_epi32(0x3f00));
        const __m128i middlebyte_shifted = _mm_srli_epi32(middlebyte,2);
        __m128i middlehighbyte = _mm_and_si128(perm,_mm_set1_epi32(0x3f0000));//_mm_xor_si128(_mm_and_si128(perm,_mm_set1_epi32(0x3f0000)), );
        // correct for spurious high bit
        const __m128i correct = _mm_srli_epi32(_mm_and_si128(perm,_mm_set1_epi32(0x400000)),1);
        middlehighbyte = _mm_xor_si128(correct, middlehighbyte);
        const __m128i middlehighbyte_shifted = _mm_srli_epi32(middlehighbyte,4);
        const __m128i highbyte = _mm_and_si128(perm,_mm_set1_epi32(0x07000000));
        const __m128i highbyte_shifted = _mm_srli_epi32(highbyte,6);
        const __m128i composed = _mm_or_si128(_mm_or_si128(ascii,middlebyte_shifted),_mm_or_si128(highbyte_shifted,middlehighbyte_shifted));
        const __m128i composedminus = _mm_sub_epi32(composed,_mm_set1_epi32(0x10000));
        const __m128i lowtenbits = _mm_and_si128(composedminus,_mm_set1_epi32(0x3ff));
        const __m128i hightenbits = _mm_srli_epi32(composedminus,10);
        const __m128i lowtenbitsadd = _mm_add_epi32(lowtenbits,_mm_set1_epi32(0xDC00));
        const __m128i hightenbitsadd = _mm_add_epi32(hightenbits,_mm_set1_epi32(0xD800));
        const __m128i lowtenbitsaddshifted = _mm_slli_epi32(lowtenbitsadd,16);
        const __m128i surrogates = _mm_or_si128(hightenbitsadd,lowtenbitsaddshifted);
        uint32_t basic_buffer[4];
        _mm_storeu_si128((__m128i*)basic_buffer,  composed);
        uint32_t surrogate_buffer[4];
        _mm_storeu_si128((__m128i*)surrogate_buffer,  surrogates);
        for(size_t i = 0; i < 3; i++) {
            if(basic_buffer[i]<65536) {
                *output = uint16_t(basic_buffer[i]);
                output++;
            } else {
                output[0] = uint16_t(surrogate_buffer[i] &0xFFFF);
                output[1] = uint16_t(surrogate_buffer[i] >> 16);
                output += 2;
            }
        }
        pos += consumed;        
    } else {
        // here we know that there is an error???
    }
  }
  size_t len = strlen_utf8_to_utf16_with_length(input + pos, size - pos);
  utf8_to_utf16_with_length(input + pos, size - pos, output);
  output += len;
  return output - start;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb40, %rsp            # imm = 0xB40
movq %rdi, -0x868(%rbp)
movq %rsi, -0x870(%rbp)
movq %rdx, -0x878(%rbp)
movq $0x0, -0x880(%rbp)
movq -0x878(%rbp), %rax
movq %rax, -0x888(%rbp)
movq -0x880(%rbp), %rax
addq $0x10, %rax
cmpq -0x870(%rbp), %rax
ja 0x6a27
movq -0x868(%rbp), %rax
addq -0x880(%rbp), %rax
movq %rax, -0x848(%rbp)
movq -0x848(%rbp), %rax
vmovdqu (%rax), %xmm0
vmovdqa %xmm0, -0x8a0(%rbp)
vmovdqa -0x8a0(%rbp), %xmm0
vmovdqa %xmm0, -0x5c0(%rbp)
vmovdqa -0x5c0(%rbp), %xmm0
vpmovmskb %xmm0, %eax
movw %ax, -0x8a2(%rbp)
movzwl -0x8a2(%rbp), %eax
cmpl $0x0, %eax
jne 0x56b5
vmovdqa -0x8a0(%rbp), %xmm2
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, -0x5a0(%rbp)
vmovdqa -0x5a0(%rbp), %xmm1
vmovdqa %xmm2, -0x3f0(%rbp)
vmovdqa %xmm1, -0x400(%rbp)
vmovdqa -0x3f0(%rbp), %xmm1
vmovdqa -0x400(%rbp), %xmm2
vpunpcklbw %xmm2, %xmm1, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3],xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
vmovdqa %xmm1, -0x8c0(%rbp)
movq -0x878(%rbp), %rax
vmovdqa -0x8c0(%rbp), %xmm1
movq %rax, -0x460(%rbp)
vmovdqa %xmm1, -0x470(%rbp)
vmovdqa -0x470(%rbp), %xmm1
movq -0x460(%rbp), %rax
vmovdqu %xmm1, (%rax)
movq -0x878(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x878(%rbp)
vmovdqa -0x8a0(%rbp), %xmm1
vmovdqa %xmm0, -0x5b0(%rbp)
vmovdqa -0x5b0(%rbp), %xmm0
vmovdqa %xmm1, -0x3d0(%rbp)
vmovdqa %xmm0, -0x3e0(%rbp)
vmovdqa -0x3d0(%rbp), %xmm0
vmovdqa -0x3e0(%rbp), %xmm1
vpunpckhbw %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[8],xmm1[8],xmm0[9],xmm1[9],xmm0[10],xmm1[10],xmm0[11],xmm1[11],xmm0[12],xmm1[12],xmm0[13],xmm1[13],xmm0[14],xmm1[14],xmm0[15],xmm1[15]
vmovdqa %xmm0, -0x8d0(%rbp)
movq -0x878(%rbp), %rax
vmovdqa -0x8d0(%rbp), %xmm0
movq %rax, -0x478(%rbp)
vmovdqa %xmm0, -0x490(%rbp)
vmovdqa -0x490(%rbp), %xmm0
movq -0x478(%rbp), %rax
vmovdqu %xmm0, (%rax)
movq -0x878(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x878(%rbp)
movq -0x880(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x880(%rbp)
jmp 0x5519
movb $0xf, -0x3b1(%rbp)
movb -0x3b1(%rbp), %al
movb %al, -0xb31(%rbp)
movb %al, -0x391(%rbp)
movb %al, -0x392(%rbp)
movb %al, -0x393(%rbp)
movb %al, -0x394(%rbp)
movb %al, -0x395(%rbp)
movb %al, -0x396(%rbp)
movb %al, -0x397(%rbp)
movb %al, -0x398(%rbp)
movb %al, -0x399(%rbp)
movb %al, -0x39a(%rbp)
movb %al, -0x39b(%rbp)
movb %al, -0x39c(%rbp)
movb %al, -0x39d(%rbp)
movb %al, -0x39e(%rbp)
movb %al, -0x39f(%rbp)
movb %al, -0x3a0(%rbp)
movzbl -0x3a0(%rbp), %eax
vmovd %eax, %xmm0
movzbl -0x39f(%rbp), %eax
vpinsrb $0x1, %eax, %xmm0, %xmm0
movzbl -0x39e(%rbp), %eax
vpinsrb $0x2, %eax, %xmm0, %xmm0
movzbl -0x39d(%rbp), %eax
vpinsrb $0x3, %eax, %xmm0, %xmm0
movzbl -0x39c(%rbp), %eax
vpinsrb $0x4, %eax, %xmm0, %xmm0
movzbl -0x39b(%rbp), %eax
vpinsrb $0x5, %eax, %xmm0, %xmm0
movzbl -0x39a(%rbp), %eax
vpinsrb $0x6, %eax, %xmm0, %xmm0
movzbl -0x399(%rbp), %eax
vpinsrb $0x7, %eax, %xmm0, %xmm0
movzbl -0x398(%rbp), %eax
vpinsrb $0x8, %eax, %xmm0, %xmm0
movzbl -0x397(%rbp), %eax
vpinsrb $0x9, %eax, %xmm0, %xmm0
movzbl -0x396(%rbp), %eax
vpinsrb $0xa, %eax, %xmm0, %xmm0
movzbl -0x395(%rbp), %eax
vpinsrb $0xb, %eax, %xmm0, %xmm0
movzbl -0x394(%rbp), %eax
vpinsrb $0xc, %eax, %xmm0, %xmm0
movzbl -0x393(%rbp), %eax
vpinsrb $0xd, %eax, %xmm0, %xmm0
movzbl -0x392(%rbp), %eax
vpinsrb $0xe, %eax, %xmm0, %xmm0
movzbl -0x391(%rbp), %eax
vpinsrb $0xf, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x3b0(%rbp)
vmovdqa -0x3b0(%rbp), %xmm0
vmovdqa %xmm0, -0x8e0(%rbp)
vmovdqa -0x8e0(%rbp), %xmm1
vmovdqa -0x8a0(%rbp), %xmm0
vmovdqa %xmm0, -0x410(%rbp)
movl $0x4, -0x414(%rbp)
vmovdqa -0x410(%rbp), %xmm0
vmovd -0x414(%rbp), %xmm2
vpsrlw %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, -0x6d0(%rbp)
vmovdqa %xmm0, -0x6e0(%rbp)
vmovdqa -0x6d0(%rbp), %xmm0
vmovdqa -0x6e0(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x8f0(%rbp)
movb $-0x1, -0x365(%rbp)
movb $-0x1, -0x366(%rbp)
movb $-0x1, -0x367(%rbp)
movb $-0x1, -0x368(%rbp)
movb $0x0, -0x369(%rbp)
movb $0x0, -0x36a(%rbp)
movb $0x0, -0x36b(%rbp)
movb $0x0, -0x36c(%rbp)
movb $-0x1, -0x36d(%rbp)
movb $-0x1, -0x36e(%rbp)
movb $-0x1, -0x36f(%rbp)
movb $-0x1, -0x370(%rbp)
movb $-0x1, -0x371(%rbp)
movb $-0x1, -0x372(%rbp)
movb $-0x1, -0x373(%rbp)
movb $-0x1, -0x374(%rbp)
movzbl -0x374(%rbp), %eax
vmovd %eax, %xmm0
movzbl -0x373(%rbp), %eax
vpinsrb $0x1, %eax, %xmm0, %xmm0
movzbl -0x372(%rbp), %eax
vpinsrb $0x2, %eax, %xmm0, %xmm0
movzbl -0x371(%rbp), %eax
vpinsrb $0x3, %eax, %xmm0, %xmm0
movzbl -0x370(%rbp), %eax
vpinsrb $0x4, %eax, %xmm0, %xmm0
movzbl -0x36f(%rbp), %eax
vpinsrb $0x5, %eax, %xmm0, %xmm0
movzbl -0x36e(%rbp), %eax
vpinsrb $0x6, %eax, %xmm0, %xmm0
movzbl -0x36d(%rbp), %eax
vpinsrb $0x7, %eax, %xmm0, %xmm0
movzbl -0x36c(%rbp), %eax
vpinsrb $0x8, %eax, %xmm0, %xmm0
movzbl -0x36b(%rbp), %eax
vpinsrb $0x9, %eax, %xmm0, %xmm0
movzbl -0x36a(%rbp), %eax
vpinsrb $0xa, %eax, %xmm0, %xmm0
movzbl -0x369(%rbp), %eax
vpinsrb $0xb, %eax, %xmm0, %xmm0
movzbl -0x368(%rbp), %eax
vpinsrb $0xc, %eax, %xmm0, %xmm0
movzbl -0x367(%rbp), %eax
vpinsrb $0xd, %eax, %xmm0, %xmm0
movzbl -0x366(%rbp), %eax
vpinsrb $0xe, %eax, %xmm0, %xmm0
movzbl -0x365(%rbp), %eax
vpinsrb $0xf, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x390(%rbp)
vmovdqa -0x390(%rbp), %xmm1
vmovdqa -0x8f0(%rbp), %xmm0
vmovdqa %xmm1, -0x520(%rbp)
vmovdqa %xmm0, -0x530(%rbp)
vmovdqa -0x520(%rbp), %xmm0
vmovdqa -0x530(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x5d0(%rbp)
vmovdqa -0x5d0(%rbp), %xmm0
vpmovmskb %xmm0, %eax
movw %ax, -0x8f2(%rbp)
movzwl -0x8f2(%rbp), %eax
sarl %eax
cmpw $0x0, -0x8a2(%rbp)
setne %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
movw %ax, -0x8f4(%rbp)
movw $0xfff, -0x8f6(%rbp)    # imm = 0xFFF
movzwl -0x8f4(%rbp), %eax
andl $0xfff, %eax            # imm = 0xFFF
movw %ax, -0x8f8(%rbp)
movzwl -0x8f8(%rbp), %eax
movl %eax, %ecx
leaq 0x107d8(%rip), %rax     # 0x16230
movb (%rax,%rcx,2), %al
movb %al, -0x8f9(%rbp)
movzwl -0x8f8(%rbp), %eax
movl %eax, %ecx
leaq 0x107bf(%rip), %rax     # 0x16230
movb 0x1(%rax,%rcx,2), %al
movb %al, -0x8fa(%rbp)
movzbl -0x8f9(%rbp), %eax
cmpl $0x40, %eax
jge 0x5d95
movzbl -0x8f9(%rbp), %eax
shll $0x4, %eax
movl %eax, %ecx
leaq 0x12792(%rip), %rax     # 0x18230
addq %rcx, %rax
movq %rax, -0x850(%rbp)
movq -0x850(%rbp), %rax
vmovdqu (%rax), %xmm0
vmovdqa %xmm0, -0x910(%rbp)
vmovdqa -0x8a0(%rbp), %xmm1
vmovdqa -0x910(%rbp), %xmm0
vmovdqa %xmm1, -0x540(%rbp)
vmovdqa %xmm0, -0x550(%rbp)
vmovdqa -0x540(%rbp), %xmm0
vmovdqa -0x550(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x920(%rbp)
vmovdqa -0x920(%rbp), %xmm1
movw $0x7f, -0x6b2(%rbp)
movw -0x6b2(%rbp), %ax
movw %ax, -0xb36(%rbp)
movw %ax, -0x1a2(%rbp)
movw %ax, -0x1a4(%rbp)
movw %ax, -0x1a6(%rbp)
movw %ax, -0x1a8(%rbp)
movw %ax, -0x1aa(%rbp)
movw %ax, -0x1ac(%rbp)
movw %ax, -0x1ae(%rbp)
movw %ax, -0x1b0(%rbp)
movzwl -0x1b0(%rbp), %eax
vmovd %eax, %xmm0
movzwl -0x1ae(%rbp), %eax
vpinsrw $0x1, %eax, %xmm0, %xmm0
movzwl -0x1ac(%rbp), %eax
vpinsrw $0x2, %eax, %xmm0, %xmm0
movzwl -0x1aa(%rbp), %eax
vpinsrw $0x3, %eax, %xmm0, %xmm0
movzwl -0x1a8(%rbp), %eax
vpinsrw $0x4, %eax, %xmm0, %xmm0
movzwl -0x1a6(%rbp), %eax
vpinsrw $0x5, %eax, %xmm0, %xmm0
movzwl -0x1a4(%rbp), %eax
vpinsrw $0x6, %eax, %xmm0, %xmm0
movzwl -0x1a2(%rbp), %eax
vpinsrw $0x7, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x1c0(%rbp)
vmovdqa -0x1c0(%rbp), %xmm0
vmovdqa %xmm1, -0x6f0(%rbp)
vmovdqa %xmm0, -0x700(%rbp)
vmovdqa -0x6f0(%rbp), %xmm0
vmovdqa -0x700(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x930(%rbp)
vmovdqa -0x920(%rbp), %xmm1
movw $0x1f00, -0x6b4(%rbp)   # imm = 0x1F00
movw -0x6b4(%rbp), %ax
movw %ax, -0xb34(%rbp)
movw %ax, -0x182(%rbp)
movw %ax, -0x184(%rbp)
movw %ax, -0x186(%rbp)
movw %ax, -0x188(%rbp)
movw %ax, -0x18a(%rbp)
movw %ax, -0x18c(%rbp)
movw %ax, -0x18e(%rbp)
movw %ax, -0x190(%rbp)
movzwl -0x190(%rbp), %eax
vmovd %eax, %xmm0
movzwl -0x18e(%rbp), %eax
vpinsrw $0x1, %eax, %xmm0, %xmm0
movzwl -0x18c(%rbp), %eax
vpinsrw $0x2, %eax, %xmm0, %xmm0
movzwl -0x18a(%rbp), %eax
vpinsrw $0x3, %eax, %xmm0, %xmm0
movzwl -0x188(%rbp), %eax
vpinsrw $0x4, %eax, %xmm0, %xmm0
movzwl -0x186(%rbp), %eax
vpinsrw $0x5, %eax, %xmm0, %xmm0
movzwl -0x184(%rbp), %eax
vpinsrw $0x6, %eax, %xmm0, %xmm0
movzwl -0x182(%rbp), %eax
vpinsrw $0x7, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x1a0(%rbp)
vmovdqa -0x1a0(%rbp), %xmm0
vmovdqa %xmm1, -0x710(%rbp)
vmovdqa %xmm0, -0x720(%rbp)
vmovdqa -0x710(%rbp), %xmm0
vpand -0x720(%rbp), %xmm0, %xmm0
vmovdqa %xmm0, -0x940(%rbp)
vmovdqa -0x930(%rbp), %xmm1
vmovdqa -0x940(%rbp), %xmm0
vmovdqa %xmm0, -0x430(%rbp)
movl $0x2, -0x434(%rbp)
vmovdqa -0x430(%rbp), %xmm0
movl -0x434(%rbp), %eax
vmovd %eax, %xmm2
vpsrlw %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, -0x5e0(%rbp)
vmovdqa %xmm0, -0x5f0(%rbp)
vmovdqa -0x5e0(%rbp), %xmm0
vpor -0x5f0(%rbp), %xmm0, %xmm0
vmovdqa %xmm0, -0x950(%rbp)
movq -0x878(%rbp), %rax
vmovdqa -0x950(%rbp), %xmm0
movq %rax, -0x498(%rbp)
vmovdqa %xmm0, -0x4b0(%rbp)
vmovdqa -0x4b0(%rbp), %xmm0
movq -0x498(%rbp), %rax
vmovdqu %xmm0, (%rax)
movq -0x878(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x878(%rbp)
movzbl -0x8fa(%rbp), %eax
addq -0x880(%rbp), %rax
movq %rax, -0x880(%rbp)
jmp 0x6a22
movzbl -0x8f9(%rbp), %eax
cmpl $0x91, %eax
jge 0x6140
movzbl -0x8f9(%rbp), %eax
shll $0x4, %eax
movl %eax, %ecx
leaq 0x12476(%rip), %rax     # 0x18230
addq %rcx, %rax
movq %rax, -0x858(%rbp)
movq -0x858(%rbp), %rax
vmovdqu (%rax), %xmm0
vmovdqa %xmm0, -0x960(%rbp)
vmovdqa -0x8a0(%rbp), %xmm1
vmovdqa -0x960(%rbp), %xmm0
vmovdqa %xmm1, -0x560(%rbp)
vmovdqa %xmm0, -0x570(%rbp)
vmovdqa -0x560(%rbp), %xmm0
vmovdqa -0x570(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x970(%rbp)
vmovdqa -0x970(%rbp), %xmm1
movl $0x7f, -0x338(%rbp)
movl -0x338(%rbp), %eax
movl %eax, -0x164(%rbp)
movl %eax, -0x168(%rbp)
movl %eax, -0x16c(%rbp)
movl %eax, -0x170(%rbp)
movl -0x16c(%rbp), %edx
movl -0x168(%rbp), %ecx
movl -0x164(%rbp), %eax
vmovd -0x170(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x180(%rbp)
vmovdqa -0x180(%rbp), %xmm0
vmovdqa %xmm1, -0x730(%rbp)
vmovdqa %xmm0, -0x740(%rbp)
vmovdqa -0x730(%rbp), %xmm0
vmovdqa -0x740(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x980(%rbp)
vmovdqa -0x970(%rbp), %xmm1
movl $0x3f00, -0x33c(%rbp)   # imm = 0x3F00
movl -0x33c(%rbp), %eax
movl %eax, -0x144(%rbp)
movl %eax, -0x148(%rbp)
movl %eax, -0x14c(%rbp)
movl %eax, -0x150(%rbp)
movl -0x14c(%rbp), %edx
movl -0x148(%rbp), %ecx
movl -0x144(%rbp), %eax
vmovd -0x150(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x160(%rbp)
vmovdqa -0x160(%rbp), %xmm0
vmovdqa %xmm1, -0x750(%rbp)
vmovdqa %xmm0, -0x760(%rbp)
vmovdqa -0x750(%rbp), %xmm0
vmovdqa -0x760(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x990(%rbp)
vmovdqa -0x990(%rbp), %xmm0
vmovdqa %xmm0, -0x270(%rbp)
movl $0x2, -0x274(%rbp)
vmovdqa -0x270(%rbp), %xmm0
vmovd -0x274(%rbp), %xmm1
vpsrld %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x9a0(%rbp)
vmovdqa -0x970(%rbp), %xmm1
movl $0xf0000, -0x340(%rbp)  # imm = 0xF0000
movl -0x340(%rbp), %eax
movl %eax, -0x124(%rbp)
movl %eax, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
movl %eax, -0x130(%rbp)
movl -0x12c(%rbp), %edx
movl -0x128(%rbp), %ecx
movl -0x124(%rbp), %eax
vmovd -0x130(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x140(%rbp)
vmovdqa -0x140(%rbp), %xmm0
vmovdqa %xmm1, -0x770(%rbp)
vmovdqa %xmm0, -0x780(%rbp)
vmovdqa -0x770(%rbp), %xmm0
vpand -0x780(%rbp), %xmm0, %xmm0
vmovdqa %xmm0, -0x9b0(%rbp)
vmovdqa -0x9b0(%rbp), %xmm0
vmovdqa %xmm0, -0x290(%rbp)
movl $0x4, -0x294(%rbp)
vmovdqa -0x290(%rbp), %xmm0
movl -0x294(%rbp), %eax
vmovd %eax, %xmm1
vpsrld %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x9c0(%rbp)
vmovdqa -0x980(%rbp), %xmm1
vmovdqa -0x9a0(%rbp), %xmm0
vmovdqa %xmm1, -0x600(%rbp)
vmovdqa %xmm0, -0x610(%rbp)
vmovdqa -0x600(%rbp), %xmm0
vpor -0x610(%rbp), %xmm0, %xmm1
vmovdqa -0x9c0(%rbp), %xmm0
vmovdqa %xmm1, -0x620(%rbp)
vmovdqa %xmm0, -0x630(%rbp)
vmovdqa -0x620(%rbp), %xmm0
vpor -0x630(%rbp), %xmm0, %xmm0
vmovdqa %xmm0, -0x9d0(%rbp)
vmovdqa -0x9d0(%rbp), %xmm1
vmovdqa -0x9d0(%rbp), %xmm0
vmovdqa %xmm1, -0x250(%rbp)
vmovdqa %xmm0, -0x260(%rbp)
vmovdqa -0x250(%rbp), %xmm0
vmovdqa -0x260(%rbp), %xmm1
vpackusdw %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x9e0(%rbp)
movq -0x878(%rbp), %rax
vmovdqa -0x9e0(%rbp), %xmm0
movq %rax, -0x4b8(%rbp)
vmovdqa %xmm0, -0x4d0(%rbp)
vmovdqa -0x4d0(%rbp), %xmm0
movq -0x4b8(%rbp), %rax
vmovdqu %xmm0, (%rax)
movq -0x878(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x878(%rbp)
movzbl -0x8fa(%rbp), %eax
addq -0x880(%rbp), %rax
movq %rax, -0x880(%rbp)
jmp 0x6a20
movzbl -0x8f9(%rbp), %eax
cmpl $0xd1, %eax
jge 0x6a1c
movzbl -0x8f9(%rbp), %eax
shll $0x4, %eax
movl %eax, %ecx
leaq 0x120cb(%rip), %rax     # 0x18230
addq %rcx, %rax
movq %rax, -0x860(%rbp)
movq -0x860(%rbp), %rax
vmovdqu (%rax), %xmm0
vmovdqa %xmm0, -0x9f0(%rbp)
vmovdqa -0x8a0(%rbp), %xmm1
vmovdqa -0x9f0(%rbp), %xmm0
vmovdqa %xmm1, -0x580(%rbp)
vmovdqa %xmm0, -0x590(%rbp)
vmovdqa -0x580(%rbp), %xmm0
vmovdqa -0x590(%rbp), %xmm1
vpshufb %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa00(%rbp)
vmovdqa -0xa00(%rbp), %xmm1
movl $0x7f, -0x344(%rbp)
movl -0x344(%rbp), %eax
movl %eax, -0x104(%rbp)
movl %eax, -0x108(%rbp)
movl %eax, -0x10c(%rbp)
movl %eax, -0x110(%rbp)
movl -0x10c(%rbp), %edx
movl -0x108(%rbp), %ecx
movl -0x104(%rbp), %eax
vmovd -0x110(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x120(%rbp)
vmovdqa -0x120(%rbp), %xmm0
vmovdqa %xmm1, -0x790(%rbp)
vmovdqa %xmm0, -0x7a0(%rbp)
vmovdqa -0x790(%rbp), %xmm0
vmovdqa -0x7a0(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa10(%rbp)
vmovdqa -0xa00(%rbp), %xmm1
movl $0x3f00, -0x348(%rbp)   # imm = 0x3F00
movl -0x348(%rbp), %eax
movl %eax, -0xe4(%rbp)
movl %eax, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
movl %eax, -0xf0(%rbp)
movl -0xec(%rbp), %edx
movl -0xe8(%rbp), %ecx
movl -0xe4(%rbp), %eax
vmovd -0xf0(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x100(%rbp)
vmovdqa -0x100(%rbp), %xmm0
vmovdqa %xmm1, -0x7b0(%rbp)
vmovdqa %xmm0, -0x7c0(%rbp)
vmovdqa -0x7b0(%rbp), %xmm0
vmovdqa -0x7c0(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa20(%rbp)
vmovdqa -0xa20(%rbp), %xmm0
vmovdqa %xmm0, -0x2b0(%rbp)
movl $0x2, -0x2b4(%rbp)
vmovdqa -0x2b0(%rbp), %xmm0
vmovd -0x2b4(%rbp), %xmm1
vpsrld %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa30(%rbp)
vmovdqa -0xa00(%rbp), %xmm1
movl $0x3f0000, -0x34c(%rbp) # imm = 0x3F0000
movl -0x34c(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl %eax, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
movl %eax, -0xd0(%rbp)
movl -0xcc(%rbp), %edx
movl -0xc8(%rbp), %ecx
movl -0xc4(%rbp), %eax
vmovd -0xd0(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0xe0(%rbp)
vmovdqa -0xe0(%rbp), %xmm0
vmovdqa %xmm1, -0x7d0(%rbp)
vmovdqa %xmm0, -0x7e0(%rbp)
vmovdqa -0x7d0(%rbp), %xmm0
vmovdqa -0x7e0(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa40(%rbp)
vmovdqa -0xa00(%rbp), %xmm1
movl $0x400000, -0x350(%rbp) # imm = 0x400000
movl -0x350(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl %eax, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
movl %eax, -0xb0(%rbp)
movl -0xac(%rbp), %edx
movl -0xa8(%rbp), %ecx
movl -0xa4(%rbp), %eax
vmovd -0xb0(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0xc0(%rbp)
vmovdqa -0xc0(%rbp), %xmm0
vmovdqa %xmm1, -0x7f0(%rbp)
vmovdqa %xmm0, -0x800(%rbp)
vmovdqa -0x7f0(%rbp), %xmm0
vmovdqa -0x800(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0x2d0(%rbp)
movl $0x1, -0x2d4(%rbp)
vmovdqa -0x2d0(%rbp), %xmm0
vmovd -0x2d4(%rbp), %xmm1
vpsrld %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa50(%rbp)
vmovdqa -0xa50(%rbp), %xmm1
vmovdqa -0xa40(%rbp), %xmm0
vmovdqa %xmm1, -0x230(%rbp)
vmovdqa %xmm0, -0x240(%rbp)
vmovdqa -0x230(%rbp), %xmm0
vmovdqa -0x240(%rbp), %xmm1
vpxor %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa40(%rbp)
vmovdqa -0xa40(%rbp), %xmm0
vmovdqa %xmm0, -0x2f0(%rbp)
movl $0x4, -0x2f4(%rbp)
vmovdqa -0x2f0(%rbp), %xmm0
vmovd -0x2f4(%rbp), %xmm1
vpsrld %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa60(%rbp)
vmovdqa -0xa00(%rbp), %xmm1
movl $0x7000000, -0x354(%rbp) # imm = 0x7000000
movl -0x354(%rbp), %eax
movl %eax, -0x84(%rbp)
movl %eax, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
movl %eax, -0x90(%rbp)
movl -0x8c(%rbp), %edx
movl -0x88(%rbp), %ecx
movl -0x84(%rbp), %eax
vmovd -0x90(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0xa0(%rbp)
vmovdqa -0xa0(%rbp), %xmm0
vmovdqa %xmm1, -0x810(%rbp)
vmovdqa %xmm0, -0x820(%rbp)
vmovdqa -0x810(%rbp), %xmm0
vmovdqa -0x820(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa70(%rbp)
vmovdqa -0xa70(%rbp), %xmm0
vmovdqa %xmm0, -0x310(%rbp)
movl $0x6, -0x314(%rbp)
vmovdqa -0x310(%rbp), %xmm0
vmovd -0x314(%rbp), %xmm1
vpsrld %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa80(%rbp)
vmovdqa -0xa10(%rbp), %xmm1
vmovdqa -0xa30(%rbp), %xmm0
vmovdqa %xmm1, -0x640(%rbp)
vmovdqa %xmm0, -0x650(%rbp)
vmovdqa -0x640(%rbp), %xmm0
vmovdqa -0x650(%rbp), %xmm1
vpor %xmm1, %xmm0, %xmm1
vmovdqa -0xa80(%rbp), %xmm2
vmovdqa -0xa60(%rbp), %xmm0
vmovdqa %xmm2, -0x660(%rbp)
vmovdqa %xmm0, -0x670(%rbp)
vmovdqa -0x660(%rbp), %xmm0
vmovdqa -0x670(%rbp), %xmm2
vpor %xmm2, %xmm0, %xmm0
vmovdqa %xmm1, -0x680(%rbp)
vmovdqa %xmm0, -0x690(%rbp)
vmovdqa -0x680(%rbp), %xmm0
vmovdqa -0x690(%rbp), %xmm1
vpor %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xa90(%rbp)
vmovdqa -0xa90(%rbp), %xmm1
movl $0x10000, -0x358(%rbp)  # imm = 0x10000
movl -0x358(%rbp), %eax
movl %eax, -0x64(%rbp)
movl %eax, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
movl %eax, -0x70(%rbp)
movl -0x6c(%rbp), %edx
movl -0x68(%rbp), %ecx
movl -0x64(%rbp), %eax
vmovd -0x70(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x80(%rbp)
vmovdqa -0x80(%rbp), %xmm0
vmovdqa %xmm1, -0x210(%rbp)
vmovdqa %xmm0, -0x220(%rbp)
vmovdqa -0x210(%rbp), %xmm0
vmovdqa -0x220(%rbp), %xmm1
vpsubd %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xaa0(%rbp)
vmovdqa -0xaa0(%rbp), %xmm1
movl $0x3ff, -0x35c(%rbp)    # imm = 0x3FF
movl -0x35c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl %eax, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %edx
movl -0x48(%rbp), %ecx
movl -0x44(%rbp), %eax
vmovd -0x50(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x60(%rbp)
vmovdqa -0x60(%rbp), %xmm0
vmovdqa %xmm1, -0x830(%rbp)
vmovdqa %xmm0, -0x840(%rbp)
vmovdqa -0x830(%rbp), %xmm0
vmovdqa -0x840(%rbp), %xmm1
vpand %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xab0(%rbp)
vmovdqa -0xaa0(%rbp), %xmm0
vmovdqa %xmm0, -0x330(%rbp)
movl $0xa, -0x334(%rbp)
vmovdqa -0x330(%rbp), %xmm0
vmovd -0x334(%rbp), %xmm1
vpsrld %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xac0(%rbp)
vmovdqa -0xab0(%rbp), %xmm1
movl $0xdc00, -0x360(%rbp)   # imm = 0xDC00
movl -0x360(%rbp), %eax
movl %eax, -0x24(%rbp)
movl %eax, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %edx
movl -0x28(%rbp), %ecx
movl -0x24(%rbp), %eax
vmovd -0x30(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x40(%rbp)
vmovdqa -0x40(%rbp), %xmm0
vmovdqa %xmm1, -0x1d0(%rbp)
vmovdqa %xmm0, -0x1e0(%rbp)
vmovdqa -0x1d0(%rbp), %xmm0
vmovdqa -0x1e0(%rbp), %xmm1
vpaddd %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xad0(%rbp)
vmovdqa -0xac0(%rbp), %xmm1
movl $0xd800, -0x364(%rbp)   # imm = 0xD800
movl -0x364(%rbp), %eax
movl %eax, -0x4(%rbp)
movl %eax, -0x8(%rbp)
movl %eax, -0xc(%rbp)
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %edx
movl -0x8(%rbp), %ecx
movl -0x4(%rbp), %eax
vmovd -0x10(%rbp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm0
vmovdqa %xmm0, -0x20(%rbp)
vmovdqa -0x20(%rbp), %xmm0
vmovdqa %xmm1, -0x1f0(%rbp)
vmovdqa %xmm0, -0x200(%rbp)
vmovdqa -0x1f0(%rbp), %xmm0
vmovdqa -0x200(%rbp), %xmm1
vpaddd %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xae0(%rbp)
vmovdqa -0xad0(%rbp), %xmm0
vmovdqa %xmm0, -0x450(%rbp)
movl $0x10, -0x454(%rbp)
vmovdqa -0x450(%rbp), %xmm0
movl -0x454(%rbp), %eax
vmovd %eax, %xmm1
vpslld %xmm1, %xmm0, %xmm0
vmovdqa %xmm0, -0xaf0(%rbp)
vmovdqa -0xae0(%rbp), %xmm1
vmovdqa -0xaf0(%rbp), %xmm0
vmovdqa %xmm1, -0x6a0(%rbp)
vmovdqa %xmm0, -0x6b0(%rbp)
vmovdqa -0x6a0(%rbp), %xmm0
vpor -0x6b0(%rbp), %xmm0, %xmm0
vmovdqa %xmm0, -0xb00(%rbp)
leaq -0xb10(%rbp), %rax
vmovdqa -0xa90(%rbp), %xmm0
movq %rax, -0x4d8(%rbp)
vmovdqa %xmm0, -0x4f0(%rbp)
vmovdqa -0x4f0(%rbp), %xmm0
movq -0x4d8(%rbp), %rax
vmovdqu %xmm0, (%rax)
leaq -0xb20(%rbp), %rax
vmovdqa -0xb00(%rbp), %xmm0
movq %rax, -0x4f8(%rbp)
vmovdqa %xmm0, -0x510(%rbp)
vmovdqa -0x510(%rbp), %xmm0
movq -0x4f8(%rbp), %rax
vmovdqu %xmm0, (%rax)
movq $0x0, -0xb28(%rbp)
cmpq $0x3, -0xb28(%rbp)
jae 0x6a05
movq -0xb28(%rbp), %rax
cmpl $0x10000, -0xb10(%rbp,%rax,4) # imm = 0x10000
jae 0x699b
movq -0xb28(%rbp), %rax
movl -0xb10(%rbp,%rax,4), %eax
movw %ax, %cx
movq -0x878(%rbp), %rax
movw %cx, (%rax)
movq -0x878(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x878(%rbp)
jmp 0x69ec
movq -0xb28(%rbp), %rax
movl -0xb20(%rbp,%rax,4), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movw %ax, %cx
movq -0x878(%rbp), %rax
movw %cx, (%rax)
movq -0xb28(%rbp), %rax
movl -0xb20(%rbp,%rax,4), %eax
shrl $0x10, %eax
movw %ax, %cx
movq -0x878(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x878(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x878(%rbp)
jmp 0x69ee
movq -0xb28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb28(%rbp)
jmp 0x694a
movzbl -0x8fa(%rbp), %eax
addq -0x880(%rbp), %rax
movq %rax, -0x880(%rbp)
jmp 0x6a1e
jmp 0x6a1e
jmp 0x6a20
jmp 0x6a22
jmp 0x5519
movq -0x868(%rbp), %rdi
addq -0x880(%rbp), %rdi
movq -0x870(%rbp), %rsi
subq -0x880(%rbp), %rsi
callq 0x6ab0
movq %rax, -0xb30(%rbp)
movq -0x868(%rbp), %rdi
addq -0x880(%rbp), %rdi
movq -0x870(%rbp), %rsi
subq -0x880(%rbp), %rsi
movq -0x878(%rbp), %rdx
callq 0x6b20
movq -0xb30(%rbp), %rax
shlq %rax
addq -0x878(%rbp), %rax
movq %rax, -0x878(%rbp)
movq -0x878(%rbp), %rax
movq -0x888(%rbp), %rcx
subq %rcx, %rax
sarq %rax
addq $0xb40, %rsp            # imm = 0xB40
popq %rbp
retq
nopl (%rax)