// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/htscodecs/htscodecs/rANS_static32x16pr_avx512.c
// Function: rans_uncompress_O0_32x16_avx512
unsigned char *rans_uncompress_O0_32x16_avx512(unsigned char *in,
                                               unsigned int in_size,
                                               unsigned char *out,
                                               unsigned int out_sz) {
    if (in_size < 32*4) // 32-states at least
        return NULL;

    if (out_sz >= INT_MAX)
        return NULL; // protect against some overflow cases

    /* Load in the static tables */
    unsigned char *cp = in, *out_free = NULL;
    unsigned char *cp_end = in + in_size;
    int i;
    uint32_t s3[TOTFREQ]  __attribute__((aligned(64))); // For TF_SHIFT <= 12

    if (!out)
        out_free = out = malloc(out_sz);
    if (!out)
        return NULL;

    // Precompute reverse lookup of frequency.
    uint32_t F[256] = {0}, fsum;
    int fsz = decode_freq(cp, cp_end, F, &fsum);
    if (!fsz)
        goto err;
    cp += fsz;

    normalise_freq_shift(F, fsum, TOTFREQ);

    // Build symbols; fixme, do as part of decode, see the _d variant
    if (rans_F_to_s3(F, TF_SHIFT, s3))
        goto err;

    if (cp_end - cp < 32 * 4)
        goto err;

    int z;
    RansState Rv[32] __attribute__((aligned(64)));
    for (z = 0; z < 32; z++) {
        RansDecInit(&Rv[z], &cp);
        if (Rv[z] < RANS_BYTE_L)
            goto err;
    }

    uint16_t *sp = (uint16_t *)cp;

    int out_end = (out_sz&~(32-1));
    const uint32_t mask = (1u << TF_SHIFT)-1;

    __m512i maskv = _mm512_set1_epi32(mask); // set mask in all lanes
    __m512i R1 = _mm512_load_epi32(&Rv[0]);
    __m512i R2 = _mm512_load_epi32(&Rv[16]);

    // Start of the first loop iteration, which we do move to the end of the
    // loop for the next cycle so we can remove some of the instr. latency.
    __m512i masked1 = _mm512_and_epi32(R1, maskv);
    __m512i masked2 = _mm512_and_epi32(R2, maskv);
    __m512i S1 = _mm512_i32gather_epi32x(masked1, (int *)s3, sizeof(*s3));
    __m512i S2 = _mm512_i32gather_epi32x(masked2, (int *)s3, sizeof(*s3));

    uint8_t overflow[64+64] = {0};
    for (i=0; i < out_end; i+=32) {
      //for (z = 0; z < 16; z++) {

      // Protect against running off the end of in buffer.
      // We copy it to a worst-case local buffer when near the end.
      if ((uint8_t *)sp+64 > cp_end) {
        memmove(overflow, sp, cp_end - (uint8_t *)sp);
        sp = (uint16_t *)overflow;
        cp_end = overflow + sizeof(overflow);
      }

      //uint32_t S = s3[R[z] & mask];
      __m512i renorm_words1 = _mm512_cvtepu16_epi32(_mm256_loadu_si256((const __m256i *)sp)); // next 16 words

      //uint16_t f = S>>(TF_SHIFT+8), b = (S>>8) & mask;
      __m512i f1 = _mm512_srli_epi32(S1, TF_SHIFT+8);
      __m512i f2 = _mm512_srli_epi32(S2, TF_SHIFT+8);
      __m512i b1 = _mm512_and_epi32(_mm512_srli_epi32(S1, 8), maskv);
      __m512i b2 = _mm512_and_epi32(_mm512_srli_epi32(S2, 8), maskv);

      //R[z] = f * (R[z] >> TF_SHIFT) + b;
      // approx 10 cycle latency on mullo.
      R1 = _mm512_add_epi32(
               _mm512_mullo_epi32(
                   _mm512_srli_epi32(R1, TF_SHIFT), f1), b1);
      __mmask16 renorm_mask1, renorm_mask2;
      renorm_mask1=_mm512_cmplt_epu32_mask(R1, _mm512_set1_epi32(RANS_BYTE_L));
      R2 = _mm512_add_epi32(
               _mm512_mullo_epi32(
                   _mm512_srli_epi32(R2, TF_SHIFT), f2), b2);

      // renorm. this is the interesting part:
      renorm_mask2=_mm512_cmplt_epu32_mask(R2, _mm512_set1_epi32(RANS_BYTE_L));
      // advance by however many words we actually read
      sp += _mm_popcnt_u32(renorm_mask1);
      __m512i renorm_words2 = _mm512_cvtepu16_epi32(_mm256_loadu_si256(
                                      (const __m256i *)sp));

      // select masked only
      __m512i renorm_vals1, renorm_vals2;

      renorm_vals1 = _mm512_mask_expand_epi32(R1, renorm_mask1, renorm_words1);
      renorm_vals2 = _mm512_mask_expand_epi32(R2, renorm_mask2, renorm_words2);

      // For start of next loop iteration.  This has been moved here
      // (and duplicated to before the loop starts) so we can do something
      // with the latency period of gather, such as finishing up the
      // renorm offset and writing the results.
      __m512i S1_ = S1; // temporary copy for use in out[]=S later
      __m512i S2_ = S2;

      masked1 = _mm512_and_epi32(renorm_vals1, maskv);
      S1 = _mm512_i32gather_epi32x(masked1, (int *)s3, sizeof(*s3));
      masked2 = _mm512_and_epi32(renorm_vals2, maskv);
      S2 = _mm512_i32gather_epi32x(masked2, (int *)s3, sizeof(*s3));

      R1 = _mm512_mask_slli_epi32(R1, renorm_mask1, R1, 16);
      R2 = _mm512_mask_slli_epi32(R2, renorm_mask2, R2, 16);

      __m512i m16 = _mm512_set1_epi32(0xffff);
      renorm_vals1 = _mm512_maskz_and_epi32(renorm_mask1, renorm_vals1, m16);
      renorm_vals2 = _mm512_maskz_and_epi32(renorm_mask2, renorm_vals2, m16);

      // advance by however many words we actually read
      sp += _mm_popcnt_u32(renorm_mask2);

      R1 = _mm512_add_epi32(R1, renorm_vals1);
      R2 = _mm512_add_epi32(R2, renorm_vals2);

      //out[i+z] = S;
      _mm_storeu_si128((__m128i *)(out+i),    _mm512_cvtepi32_epi8(S1_));
      _mm_storeu_si128((__m128i *)(out+i+16), _mm512_cvtepi32_epi8(S2_));
    }

    _mm512_store_epi32(&Rv[ 0], R1);
    _mm512_store_epi32(&Rv[16], R2);

    for (z = out_sz & (32-1); z-- > 0; )
      out[out_end + z] = s3[Rv[z] & mask];

    return out;

 err:
    free(out_free);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x40, %rsp
subq $0x61c0, %rsp           # imm = 0x61C0
movq %rdi, 0x4ad8(%rsp)
movl %esi, 0x4ad4(%rsp)
movq %rdx, 0x4ac8(%rsp)
movl %ecx, 0x4ac4(%rsp)
cmpl $0x80, 0x4ad4(%rsp)
jae 0xa982b
movq $0x0, 0x4ae0(%rsp)
jmp 0xaa7d1
cmpl $0x7fffffff, 0x4ac4(%rsp) # imm = 0x7FFFFFFF
jb 0xa9849
movq $0x0, 0x4ae0(%rsp)
jmp 0xaa7d1
movq 0x4ad8(%rsp), %rax
movq %rax, 0x4ab8(%rsp)
movq $0x0, 0x4ab0(%rsp)
movq 0x4ad8(%rsp), %rax
movl 0x4ad4(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x4aa8(%rsp)
cmpq $0x0, 0x4ac8(%rsp)
jne 0xa98a8
movl 0x4ac4(%rsp), %eax
movl %eax, %edi
callq 0x4650
movq %rax, 0x4ac8(%rsp)
movq %rax, 0x4ab0(%rsp)
cmpq $0x0, 0x4ac8(%rsp)
jne 0xa98c4
movq $0x0, 0x4ae0(%rsp)
jmp 0xaa7d1
leaq 0x680(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x4250
movq 0x4ab8(%rsp), %rdi
movq 0x4aa8(%rsp), %rsi
leaq 0x680(%rsp), %rdx
leaq 0x67c(%rsp), %rcx
callq 0xaa7f0
movl %eax, 0x678(%rsp)
cmpl $0x0, 0x678(%rsp)
jne 0xa9913
jmp 0xaa7b8
movl 0x678(%rsp), %ecx
movq 0x4ab8(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x4ab8(%rsp)
leaq 0x680(%rsp), %rdi
movl 0x67c(%rsp), %esi
movl $0x1000, %edx           # imm = 0x1000
callq 0xaa8e0
leaq 0x680(%rsp), %rdi
leaq 0xa80(%rsp), %rdx
movl $0xc, %esi
callq 0xaa960
cmpl $0x0, %eax
je 0xa996d
jmp 0xaa7b8
movq 0x4aa8(%rsp), %rax
movq 0x4ab8(%rsp), %rcx
subq %rcx, %rax
cmpq $0x80, %rax
jge 0xa998d
jmp 0xaa7b8
movl $0x0, 0x674(%rsp)
cmpl $0x20, 0x674(%rsp)
jge 0xa99f5
movslq 0x674(%rsp), %rax
leaq 0x5c0(%rsp), %rdi
shlq $0x2, %rax
addq %rax, %rdi
leaq 0x4ab8(%rsp), %rsi
callq 0xaaa40
movslq 0x674(%rsp), %rax
cmpl $0x8000, 0x5c0(%rsp,%rax,4) # imm = 0x8000
jae 0xa99e0
jmp 0xaa7b8
jmp 0xa99e2
movl 0x674(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x674(%rsp)
jmp 0xa9998
movq 0x4ab8(%rsp), %rax
movq %rax, 0x5b8(%rsp)
movl 0x4ac4(%rsp), %eax
andl $-0x20, %eax
movl %eax, 0x5b4(%rsp)
movl $0xfff, 0x5b0(%rsp) # imm = 0xFFF
movl $0xfff, 0x4cfc(%rsp) # imm = 0xFFF
vpbroadcastd 0x4cfc(%rsp), %zmm0
vmovdqa64 %zmm0, 0x4c80(%rsp)
vmovdqa64 0x4c80(%rsp), %zmm0
vmovdqa64 %zmm0, 0x540(%rsp)
leaq 0x5c0(%rsp), %rax
movq %rax, 0x5638(%rsp)
movq 0x5638(%rsp), %rax
vmovdqa64 (%rax), %zmm0
vmovdqa64 %zmm0, 0x500(%rsp)
leaq 0x5c0(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x5630(%rsp)
movq 0x5630(%rsp), %rax
vmovdqa64 (%rax), %zmm0
vmovdqa64 %zmm0, 0x4c0(%rsp)
vmovdqa64 0x500(%rsp), %zmm1
vmovdqa64 0x540(%rsp), %zmm0
vmovdqa64 %zmm1, 0x4fc0(%rsp)
vmovdqa64 %zmm0, 0x4f80(%rsp)
vmovdqa64 0x4fc0(%rsp), %zmm0
vmovdqa64 0x4f80(%rsp), %zmm1
vpandd %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x480(%rsp)
vmovdqa64 0x4c0(%rsp), %zmm1
vmovdqa64 0x540(%rsp), %zmm0
vmovdqa64 %zmm1, 0x4f40(%rsp)
vmovdqa64 %zmm0, 0x4f00(%rsp)
vmovdqa64 0x4f40(%rsp), %zmm0
vmovdqa64 0x4f00(%rsp), %zmm1
vpandd %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x440(%rsp)
vmovdqa64 0x480(%rsp), %zmm0
leaq 0xa80(%rsp), %rdi
movl $0x4, %esi
callq 0xa9240
vmovdqa64 %zmm0, 0x400(%rsp)
vmovdqa64 0x440(%rsp), %zmm0
leaq 0xa80(%rsp), %rdi
movl $0x4, %esi
callq 0xa9240
vmovdqa64 %zmm0, 0x3c0(%rsp)
leaq 0x340(%rsp), %rdi
xorl %esi, %esi
movl $0x80, %edx
vzeroupper
callq 0x4250
movl $0x0, 0x4aa4(%rsp)
movl 0x4aa4(%rsp), %eax
cmpl 0x5b4(%rsp), %eax
jge 0xaa6c4
movq 0x5b8(%rsp), %rax
addq $0x40, %rax
cmpq 0x4aa8(%rsp), %rax
jbe 0xa9c1a
leaq 0x340(%rsp), %rdi
movq 0x5b8(%rsp), %rsi
movq 0x4aa8(%rsp), %rdx
movq 0x5b8(%rsp), %rax
subq %rax, %rdx
vzeroupper
callq 0x4810
leaq 0x340(%rsp), %rax
movq %rax, 0x5b8(%rsp)
leaq 0x340(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x4aa8(%rsp)
movq 0x5b8(%rsp), %rax
movq %rax, 0x4af0(%rsp)
movq 0x4af0(%rsp), %rax
vmovups (%rax), %ymm0
vmovaps %ymm0, 0x5660(%rsp)
vpmovzxwd 0x5660(%rsp), %zmm0
vmovdqa64 %zmm0, 0x300(%rsp)
vmovdqa64 0x400(%rsp), %zmm0
vmovdqa64 %zmm0, 0x52c0(%rsp)
movl $0x14, 0x52bc(%rsp)
vmovdqa64 0x52c0(%rsp), %zmm0
vmovd 0x52bc(%rsp), %xmm1
vpsrld %xmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x2c0(%rsp)
vmovdqa64 0x3c0(%rsp), %zmm0
vmovdqa64 %zmm0, 0x5240(%rsp)
movl $0x14, 0x523c(%rsp)
vmovdqa64 0x5240(%rsp), %zmm0
vmovd 0x523c(%rsp), %xmm1
vpsrld %xmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x280(%rsp)
vmovdqa64 0x400(%rsp), %zmm0
vmovdqa64 %zmm0, 0x51c0(%rsp)
movl $0x8, 0x51bc(%rsp)
vmovdqa64 0x51c0(%rsp), %zmm0
vmovd 0x51bc(%rsp), %xmm1
vpsrld %xmm1, %zmm0, %zmm1
vmovdqa64 0x540(%rsp), %zmm0
vmovdqa64 %zmm1, 0x4ec0(%rsp)
vmovdqa64 %zmm0, 0x4e80(%rsp)
vmovdqa64 0x4ec0(%rsp), %zmm0
vmovdqa64 0x4e80(%rsp), %zmm1
vpandq %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x240(%rsp)
vmovdqa64 0x3c0(%rsp), %zmm0
vmovdqa64 %zmm0, 0x5140(%rsp)
movl $0x8, 0x513c(%rsp)
vmovdqa64 0x5140(%rsp), %zmm0
vmovd 0x513c(%rsp), %xmm1
vpsrld %xmm1, %zmm0, %zmm1
vmovdqa64 0x540(%rsp), %zmm0
vmovdqa64 %zmm1, 0x4e40(%rsp)
vmovdqa64 %zmm0, 0x4e00(%rsp)
vmovdqa64 0x4e40(%rsp), %zmm0
vmovdqa64 0x4e00(%rsp), %zmm1
vpandq %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x200(%rsp)
vmovdqa64 0x500(%rsp), %zmm0
vmovdqa64 %zmm0, 0x50c0(%rsp)
movl $0xc, 0x50bc(%rsp)
vmovdqa64 0x50c0(%rsp), %zmm0
vmovd 0x50bc(%rsp), %xmm1
vpsrld %xmm1, %zmm0, %zmm1
vmovdqa64 0x2c0(%rsp), %zmm0
vmovdqa64 %zmm1, 0x53c0(%rsp)
vmovdqa64 %zmm0, 0x5380(%rsp)
vmovdqa64 0x53c0(%rsp), %zmm0
vmovdqa64 0x5380(%rsp), %zmm1
vpmulld %zmm1, %zmm0, %zmm1
vmovdqa64 0x240(%rsp), %zmm0
vmovdqa64 %zmm1, 0x55c0(%rsp)
vmovdqa64 %zmm0, 0x5580(%rsp)
vmovdqa64 0x55c0(%rsp), %zmm0
vmovdqa64 0x5580(%rsp), %zmm1
vpaddd %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x500(%rsp)
vmovdqa64 0x500(%rsp), %zmm0
movl $0x8000, 0x4c7c(%rsp) # imm = 0x8000
vpbroadcastd 0x4c7c(%rsp), %zmm1
vmovdqa64 %zmm1, 0x4c00(%rsp)
vmovdqa64 0x4c00(%rsp), %zmm1
vpcmpltud %zmm1, %zmm0, %k0
kmovw %k0, 0x1fe(%rsp)
vmovdqa64 0x4c0(%rsp), %zmm0
vmovdqa64 %zmm0, 0x5040(%rsp)
movl $0xc, 0x503c(%rsp)
vmovdqa64 0x5040(%rsp), %zmm0
vmovd 0x503c(%rsp), %xmm1
vpsrld %xmm1, %zmm0, %zmm1
vmovdqa64 0x280(%rsp), %zmm0
vmovdqa64 %zmm1, 0x5340(%rsp)
vmovdqa64 %zmm0, 0x5300(%rsp)
vmovdqa64 0x5340(%rsp), %zmm0
vmovdqa64 0x5300(%rsp), %zmm1
vpmulld %zmm1, %zmm0, %zmm1
vmovdqa64 0x200(%rsp), %zmm0
vmovdqa64 %zmm1, 0x5540(%rsp)
vmovdqa64 %zmm0, 0x5500(%rsp)
vmovdqa64 0x5540(%rsp), %zmm0
vmovdqa64 0x5500(%rsp), %zmm1
vpaddd %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x4c0(%rsp)
vmovdqa64 0x4c0(%rsp), %zmm0
movl $0x8000, 0x4bfc(%rsp) # imm = 0x8000
vpbroadcastd 0x4bfc(%rsp), %zmm1
vmovdqa64 %zmm1, 0x4b80(%rsp)
vmovdqa64 0x4b80(%rsp), %zmm1
vpcmpltud %zmm1, %zmm0, %k0
kmovw %k0, 0x1fc(%rsp)
movzwl 0x1fe(%rsp), %eax
movl %eax, 0x4afc(%rsp)
popcntl 0x4afc(%rsp), %ecx
movq 0x5b8(%rsp), %rax
leaq (%rax,%rcx,2), %rax
movq %rax, 0x5b8(%rsp)
movq 0x5b8(%rsp), %rax
movq %rax, 0x4ae8(%rsp)
movq 0x4ae8(%rsp), %rax
vmovups (%rax), %ymm0
vmovaps %ymm0, 0x5640(%rsp)
vpmovzxwd 0x5640(%rsp), %zmm0
vmovdqa64 %zmm0, 0x180(%rsp)
vmovdqa64 0x500(%rsp), %zmm1
movw 0x1fe(%rsp), %ax
vmovdqa64 0x300(%rsp), %zmm0
vmovdqa64 %zmm1, 0x57c0(%rsp)
movw %ax, 0x57be(%rsp)
vmovdqa64 %zmm0, 0x5740(%rsp)
vmovdqa64 0x5740(%rsp), %zmm1
vmovdqa64 0x57c0(%rsp), %zmm0
kmovw 0x57be(%rsp), %k1
vpexpandd %zmm1, %zmm0 {%k1}
vmovdqa64 %zmm0, 0x140(%rsp)
vmovdqa64 0x4c0(%rsp), %zmm1
movw 0x1fc(%rsp), %ax
vmovdqa64 0x180(%rsp), %zmm0
vmovdqa64 %zmm1, 0x5700(%rsp)
movw %ax, 0x56fe(%rsp)
vmovdqa64 %zmm0, 0x5680(%rsp)
vmovdqa64 0x5680(%rsp), %zmm1
vmovdqa64 0x5700(%rsp), %zmm0
kmovw 0x56fe(%rsp), %k1
vpexpandd %zmm1, %zmm0 {%k1}
vmovdqa64 %zmm0, 0x100(%rsp)
vmovdqa64 0x400(%rsp), %zmm0
vmovdqa64 %zmm0, 0xc0(%rsp)
vmovdqa64 0x3c0(%rsp), %zmm0
vmovdqa64 %zmm0, 0x80(%rsp)
vmovdqa64 0x140(%rsp), %zmm1
vmovdqa64 0x540(%rsp), %zmm0
vmovdqa64 %zmm1, 0x4dc0(%rsp)
vmovdqa64 %zmm0, 0x4d80(%rsp)
vmovdqa64 0x4dc0(%rsp), %zmm0
vmovdqa64 0x4d80(%rsp), %zmm1
vpandq %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x480(%rsp)
vmovdqa64 0x480(%rsp), %zmm0
leaq 0xa80(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movl $0x4, %esi
movl %esi, 0x3c(%rsp)
callq 0xa9240
movq 0x30(%rsp), %rdi
movl 0x3c(%rsp), %esi
vmovdqa64 %zmm0, 0x400(%rsp)
vmovdqa64 0x100(%rsp), %zmm1
vmovdqa64 0x540(%rsp), %zmm0
vmovdqa64 %zmm1, 0x4d40(%rsp)
vmovdqa64 %zmm0, 0x4d00(%rsp)
vmovdqa64 0x4d40(%rsp), %zmm0
vmovdqa64 0x4d00(%rsp), %zmm1
vpandq %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x440(%rsp)
vmovdqa64 0x440(%rsp), %zmm0
callq 0xa9240
vmovdqa64 %zmm0, 0x3c0(%rsp)
vmovdqa64 0x500(%rsp), %zmm0
movw 0x1fe(%rsp), %ax
vmovdqa64 %zmm0, 0x59c0(%rsp)
movw %ax, 0x59be(%rsp)
vmovdqa64 %zmm0, 0x5940(%rsp)
movl $0x10, 0x593c(%rsp)
vmovdqa64 0x5940(%rsp), %zmm0
movl 0x593c(%rsp), %eax
kmovw 0x59be(%rsp), %k1
vmovdqa64 %zmm0, 0x5d40(%rsp)
movl %eax, 0x5d3c(%rsp)
vmovdqa64 0x5d40(%rsp), %zmm1
vmovd 0x5d3c(%rsp), %xmm2
vmovdqa64 0x59c0(%rsp), %zmm0
vpslld %xmm2, %zmm1, %zmm0 {%k1}
vmovdqa64 %zmm0, 0x500(%rsp)
vmovdqa64 0x4c0(%rsp), %zmm0
movw 0x1fc(%rsp), %ax
vmovdqa64 %zmm0, 0x58c0(%rsp)
movw %ax, 0x58be(%rsp)
vmovdqa64 %zmm0, 0x5840(%rsp)
movl $0x10, 0x583c(%rsp)
vmovdqa64 0x5840(%rsp), %zmm0
movl 0x583c(%rsp), %eax
kmovw 0x58be(%rsp), %k1
vmovdqa64 %zmm0, 0x5dc0(%rsp)
movl %eax, 0x5dbc(%rsp)
vmovdqa64 0x5dc0(%rsp), %zmm1
vmovd 0x5dbc(%rsp), %xmm2
vmovdqa64 0x58c0(%rsp), %zmm0
vpslld %xmm2, %zmm1, %zmm0 {%k1}
vmovdqa64 %zmm0, 0x4c0(%rsp)
movl $0xffff, 0x4b7c(%rsp) # imm = 0xFFFF
vpbroadcastd 0x4b7c(%rsp), %zmm0
vmovdqa64 %zmm0, 0x4b00(%rsp)
vmovdqa64 0x4b00(%rsp), %zmm0
vmovdqa64 %zmm0, 0x40(%rsp)
movw 0x1fe(%rsp), %ax
vmovdqa64 0x140(%rsp), %zmm1
vmovdqa64 0x40(%rsp), %zmm0
movw %ax, 0x5b7e(%rsp)
vmovdqa64 %zmm1, 0x5b00(%rsp)
vmovdqa64 %zmm0, 0x5ac0(%rsp)
vxorps %xmm0, %xmm0, %xmm0
vmovdqa64 %zmm0, 0x5e00(%rsp)
vmovdqa64 0x5e00(%rsp), %zmm3
movw 0x5b7e(%rsp), %ax
vmovdqa64 0x5b00(%rsp), %zmm2
vmovdqa64 0x5ac0(%rsp), %zmm1
vmovdqa64 %zmm3, 0x5f40(%rsp)
movw %ax, 0x5f3e(%rsp)
vmovdqa64 %zmm2, 0x5ec0(%rsp)
vmovdqa64 %zmm1, 0x5e80(%rsp)
vmovdqa64 0x5ec0(%rsp), %zmm2
vmovdqa64 0x5e80(%rsp), %zmm1
kmovw 0x5f3e(%rsp), %k1
vmovdqa64 %zmm2, 0x5fc0(%rsp)
vmovdqa64 %zmm1, 0x5f80(%rsp)
vmovdqa64 0x5fc0(%rsp), %zmm2
vmovdqa64 0x5f80(%rsp), %zmm3
vmovdqa64 0x5f40(%rsp), %zmm1
vpandd %zmm3, %zmm2, %zmm1 {%k1}
vmovdqa64 %zmm1, 0x140(%rsp)
movw 0x1fc(%rsp), %ax
vmovdqa64 0x100(%rsp), %zmm2
vmovdqa64 0x40(%rsp), %zmm1
movw %ax, 0x5abe(%rsp)
vmovdqa64 %zmm2, 0x5a40(%rsp)
vmovdqa64 %zmm1, 0x5a00(%rsp)
vmovdqa64 %zmm0, 0x5e40(%rsp)
vmovdqa64 0x5e40(%rsp), %zmm2
movw 0x5abe(%rsp), %ax
vmovdqa64 0x5a40(%rsp), %zmm1
vmovdqa64 0x5a00(%rsp), %zmm0
vmovdqa64 %zmm2, 0x60c0(%rsp)
movw %ax, 0x60be(%rsp)
vmovdqa64 %zmm1, 0x6040(%rsp)
vmovdqa64 %zmm0, 0x6000(%rsp)
vmovdqa64 0x6040(%rsp), %zmm1
vmovdqa64 0x6000(%rsp), %zmm0
kmovw 0x60be(%rsp), %k1
vmovdqa64 %zmm1, 0x6140(%rsp)
vmovdqa64 %zmm0, 0x6100(%rsp)
vmovdqa64 0x6140(%rsp), %zmm1
vmovdqa64 0x6100(%rsp), %zmm2
vmovdqa64 0x60c0(%rsp), %zmm0
vpandd %zmm2, %zmm1, %zmm0 {%k1}
vmovdqa64 %zmm0, 0x100(%rsp)
movzwl 0x1fc(%rsp), %eax
movl %eax, 0x4af8(%rsp)
movl 0x4af8(%rsp), %eax
popcntl %eax, %ecx
movq 0x5b8(%rsp), %rax
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, 0x5b8(%rsp)
vmovdqa64 0x500(%rsp), %zmm1
vmovdqa64 0x140(%rsp), %zmm0
vmovdqa64 %zmm1, 0x54c0(%rsp)
vmovdqa64 %zmm0, 0x5480(%rsp)
vmovdqa64 0x54c0(%rsp), %zmm0
vmovdqa64 0x5480(%rsp), %zmm1
vpaddd %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x500(%rsp)
vmovdqa64 0x4c0(%rsp), %zmm1
vmovdqa64 0x100(%rsp), %zmm0
vmovdqa64 %zmm1, 0x5440(%rsp)
vmovdqa64 %zmm0, 0x5400(%rsp)
vmovdqa64 0x5440(%rsp), %zmm0
vmovdqa64 0x5400(%rsp), %zmm1
vpaddd %zmm1, %zmm0, %zmm0
vmovdqa64 %zmm0, 0x4c0(%rsp)
movq 0x4ac8(%rsp), %rax
movslq 0x4aa4(%rsp), %rcx
addq %rcx, %rax
vmovdqa64 0xc0(%rsp), %zmm0
vmovdqa64 %zmm0, 0x5c00(%rsp)
vmovdqa64 0x5c00(%rsp), %zmm0
vpmovdb %zmm0, %xmm0
movq %rax, 0x5bb8(%rsp)
vmovdqa %xmm0, 0x5ba0(%rsp)
vmovdqa 0x5ba0(%rsp), %xmm0
movq 0x5bb8(%rsp), %rax
vmovdqu %xmm0, (%rax)
movq 0x4ac8(%rsp), %rax
movslq 0x4aa4(%rsp), %rcx
addq %rcx, %rax
addq $0x10, %rax
vmovdqa64 0x80(%rsp), %zmm0
vmovdqa64 %zmm0, 0x5bc0(%rsp)
vmovdqa64 0x5bc0(%rsp), %zmm0
vpmovdb %zmm0, %xmm0
movq %rax, 0x5b98(%rsp)
vmovdqa %xmm0, 0x5b80(%rsp)
vmovdqa 0x5b80(%rsp), %xmm0
movq 0x5b98(%rsp), %rax
vmovdqu %xmm0, (%rax)
movl 0x4aa4(%rsp), %eax
addl $0x20, %eax
movl %eax, 0x4aa4(%rsp)
jmp 0xa9b9f
leaq 0x5c0(%rsp), %rax
vmovdqa64 0x500(%rsp), %zmm0
movq %rax, 0x5d30(%rsp)
vmovdqa64 %zmm0, 0x5cc0(%rsp)
vmovdqa64 0x5cc0(%rsp), %zmm0
movq 0x5d30(%rsp), %rax
vmovdqa64 %zmm0, (%rax)
leaq 0x5c0(%rsp), %rax
addq $0x40, %rax
vmovdqa64 0x4c0(%rsp), %zmm0
movq %rax, 0x5cb8(%rsp)
vmovdqa64 %zmm0, 0x5c40(%rsp)
vmovdqa64 0x5c40(%rsp), %zmm0
movq 0x5cb8(%rsp), %rax
vmovdqa64 %zmm0, (%rax)
movl 0x4ac4(%rsp), %eax
andl $0x1f, %eax
movl %eax, 0x674(%rsp)
movl 0x674(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0x674(%rsp)
cmpl $0x0, %eax
jle 0xaa7a6
movslq 0x674(%rsp), %rax
movl 0x5c0(%rsp,%rax,4), %eax
andl $0xfff, %eax            # imm = 0xFFF
movl %eax, %eax
movl 0xa80(%rsp,%rax,4), %eax
movb %al, %dl
movq 0x4ac8(%rsp), %rax
movl 0x5b4(%rsp), %ecx
addl 0x674(%rsp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0xaa751
movq 0x4ac8(%rsp), %rax
movq %rax, 0x4ae0(%rsp)
jmp 0xaa7d1
movq 0x4ab0(%rsp), %rdi
callq 0x45a0
movq $0x0, 0x4ae0(%rsp)
movq 0x4ae0(%rsp), %rax
movq %rbp, %rsp
popq %rbp
vzeroupper
retq
nopw %cs:(%rax,%rax)