// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/htscodecs/htscodecs/rANS_static4x16pr.c
// Function: rans_uncompress_to_4x16
unsigned char *rans_uncompress_to_4x16(unsigned char *in,  unsigned int in_size,
                                       unsigned char *out, unsigned int *out_size) {
    unsigned char *in_end = in + in_size;
    unsigned char *out_free = NULL, *tmp_free = NULL, *meta_free = NULL;

    if (in_size == 0)
        return NULL;

    if (*in & RANS_ORDER_STRIPE) {
        unsigned int ulen, olen, c_meta_len = 1;
        int i;
        uint64_t clen_tot = 0;

        // Decode lengths
        c_meta_len += var_get_u32(in+c_meta_len, in_end, &ulen);
        if (c_meta_len >= in_size)
            return NULL;
        unsigned int N = in[c_meta_len++];
        if (N < 1)  // Must be at least one stripe
            return NULL;
        unsigned int clenN[256], ulenN[256], idxN[256];
        if (!out) {
            if (ulen >= INT_MAX)
                return NULL;
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
            if (ulen > 100000)
                return NULL;
#endif
            if (!(out_free = out = malloc(ulen))) {
                return NULL;
            }
            *out_size = ulen;
        }
        if (ulen != *out_size) {
            free(out_free);
            return NULL;
        }

        for (i = 0; i < N; i++) {
            ulenN[i] = ulen / N + ((ulen % N) > i);
            idxN[i] = i ? idxN[i-1] + ulenN[i-1] : 0;
            c_meta_len += var_get_u32(in+c_meta_len, in_end, &clenN[i]);
            clen_tot += clenN[i];
            if (c_meta_len > in_size || clenN[i] > in_size || clenN[i] < 1) {
                free(out_free);
                return NULL;
            }
        }

        // We can call this with a larger buffer, but once we've determined
        // how much we really use we limit it so the recursion becomes easier
        // to limit.
        if (c_meta_len + clen_tot > in_size) {
            free(out_free);
            return NULL;
        }
        in_size = c_meta_len + clen_tot;

        //fprintf(stderr, "    stripe meta %d\n", c_meta_len); //c-size

        // Uncompress the N streams
        unsigned char *outN = malloc(ulen);
        if (!outN) {
            free(out_free);
            return NULL;
        }
        for (i = 0; i < N; i++) {
            olen = ulenN[i];
            if (in_size < c_meta_len) {
                free(out_free);
                free(outN);
                return NULL;
            }
            if (!rans_uncompress_to_4x16(in+c_meta_len, in_size-c_meta_len, outN + idxN[i], &olen)
                || olen != ulenN[i]) {
                free(out_free);
                free(outN);
                return NULL;
            }
            c_meta_len += clenN[i];
        }

        unstripe(out, outN, ulen, N, idxN);

        free(outN);
        *out_size = ulen;
        return out;
    }

    int order = *in++;  in_size--;
    int do_pack = order & RANS_ORDER_PACK;
    int do_rle  = order & RANS_ORDER_RLE;
    int do_cat  = order & RANS_ORDER_CAT;
    int no_size = order & RANS_ORDER_NOSZ;
    int do_simd = order & RANS_ORDER_X32;
    order &= 1;

    int sz = 0;
    unsigned int osz;
    if (!no_size) {
        sz = var_get_u32(in, in_end, &osz);
    } else
        sz = 0, osz = *out_size;
    in += sz;
    in_size -= sz;

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    if (osz > 100000)
        return NULL;
#endif

    if (no_size && !out)
        goto err; // Need one or the other

    if (!out) {
        *out_size = osz;
        if (!(out = out_free = malloc(*out_size)))
            return NULL;
    } else {
        if (*out_size < osz)
        goto err;
        *out_size = osz;
    }

//    if (do_pack || do_rle) {
//      in += sz; // size field not needed when pure rANS
//      in_size -= sz;
//    }

    uint32_t c_meta_size = 0;
    unsigned int tmp1_size = *out_size;
    unsigned int tmp2_size = *out_size;
    unsigned int tmp3_size = *out_size;
    unsigned char *tmp1 = NULL, *tmp2 = NULL, *tmp3 = NULL, *tmp = NULL;

    // Need In, Out and Tmp buffers with temporary buffer of the same size
    // as output.  All use rANS, but with optional transforms (none, RLE,
    // Pack, or both).
    //
    //                    rans   unrle  unpack
    // If none:     in -> out
    // If RLE:      in -> tmp -> out
    // If Pack:     in -> tmp        -> out
    // If RLE+Pack: in -> out -> tmp -> out
    //                    tmp1   tmp2   tmp3
    //
    // So rans is in   -> tmp1
    // RLE     is tmp1 -> tmp2
    // Unpack  is tmp2 -> tmp3

    // Format is meta data (Pack and RLE in that order if present),
    // followed by rANS compressed data.

    if (do_pack || do_rle) {
        if (!(tmp = tmp_free = malloc(*out_size)))
            goto err;
        if (do_pack && do_rle) {
            tmp1 = out;
            tmp2 = tmp;
            tmp3 = out;
        } else if (do_pack) {
            tmp1 = tmp;
            tmp2 = tmp1;
            tmp3 = out;
        } else if (do_rle) {
            tmp1 = tmp;
            tmp2 = out;
            tmp3 = out;
        }
    } else {
        // neither
        tmp  = NULL;
        tmp1 = out;
        tmp2 = out;
        tmp3 = out;
    }

    // Decode the bit-packing map.
    uint8_t map[16] = {0};
    int npacked_sym = 0;
    uint64_t unpacked_sz = 0; // FIXME: rename to packed_per_byte
    if (do_pack) {
        c_meta_size = hts_unpack_meta(in, in_size, *out_size, map, &npacked_sym);
        if (c_meta_size == 0)
            goto err;

        unpacked_sz = osz;
        in      += c_meta_size;
        in_size -= c_meta_size;

        // New unpacked size.  We could derive this bit from *out_size
        // and npacked_sym.
        unsigned int osz;
        sz = var_get_u32(in, in_end, &osz);
        in += sz;
        in_size -= sz;
        if (osz > tmp1_size)
            goto err;
        tmp1_size = osz;
    }

    uint8_t *meta = NULL;
    uint32_t u_meta_size = 0;
    if (do_rle) {
        // Uncompress meta data
        uint32_t c_meta_size, rle_len, sz;
        sz  = var_get_u32(in,    in_end, &u_meta_size);
        sz += var_get_u32(in+sz, in_end, &rle_len);
        if (rle_len > tmp1_size) // should never grow
            goto err;
        if (u_meta_size & 1) {
            meta = in + sz;
            u_meta_size = u_meta_size/2 > (in_end-meta) ? (in_end-meta) : u_meta_size/2;
            c_meta_size = u_meta_size;
        } else {
            sz += var_get_u32(in+sz, in_end, &c_meta_size);
            u_meta_size /= 2;

            meta_free = meta = rans_dec_func(do_simd, 0)(in+sz, in_size-sz, NULL, u_meta_size);
            if (!meta)
                goto err;
        }
        if (c_meta_size+sz > in_size)
            goto err;
        in      += c_meta_size+sz;
        in_size -= c_meta_size+sz;
        tmp1_size = rle_len;
    }
    //fprintf(stderr, "    meta_size %d bytes\n", (int)(in - orig_in)); //c-size

    // uncompress RLE data.  in -> tmp1
    if (in_size) {
        if (do_cat) {
            //fprintf(stderr, "    CAT %d\n", tmp1_size); //c-size
            if (tmp1_size > in_size)
                goto err;
            if (tmp1_size > *out_size)
                goto err;
            memcpy(tmp1, in, tmp1_size);
        } else {
            tmp1 = rans_dec_func(do_simd, order)(in, in_size, tmp1, tmp1_size);
            if (!tmp1)
                goto err;
        }
    } else {
        tmp1_size = 0;
    }
    tmp2_size = tmp3_size = tmp1_size;

    if (do_rle) {
        // Unpack RLE.  tmp1 -> tmp2.
        if (u_meta_size == 0)
            goto err;
        uint64_t unrle_size = *out_size;
        int rle_nsyms = *meta ? *meta : 256;
        if (u_meta_size < 1+rle_nsyms)
            goto err;
        if (!hts_rle_decode(tmp1, tmp1_size,
                            meta+1+rle_nsyms, u_meta_size-(1+rle_nsyms),
                            meta+1, rle_nsyms, tmp2, &unrle_size))
            goto err;
        tmp3_size = tmp2_size = unrle_size;
        free(meta_free);
        meta_free = NULL;
    }
    if (do_pack) {
        // Unpack bits via pack-map.  tmp2 -> tmp3
        if (npacked_sym == 1)
            unpacked_sz = tmp2_size;
        //uint8_t *porig = unpack(tmp2, tmp2_size, unpacked_sz, npacked_sym, map);
        //memcpy(tmp3, porig, unpacked_sz);
        if (!hts_unpack(tmp2, tmp2_size, tmp3, unpacked_sz, npacked_sym, map))
            goto err;
        tmp3_size = unpacked_sz;
    }

    if (tmp)
        free(tmp);

    *out_size = tmp3_size;
    return tmp3;

 err:
    free(meta_free);
    free(out_free);
    free(tmp_free);
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc78, %rsp            # imm = 0xC78
testl %esi, %esi
je 0x67922
movq %rcx, %r8
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %rbp
movl %esi, %edi
leaq (%rdi,%rbp), %r9
movzbl (%rbp), %r14d
testb $0x8, %r14b
jne 0x6702c
leaq 0x1(%rbp), %rsi
testb $0x10, %r14b
jne 0x6706b
xorl %ebx, %ebx
cmpl $0x7, %r12d
jb 0x67230
movl $0x1, %eax
movzbl (%rbp,%rax), %edx
movl %ebx, %ecx
shll $0x7, %ecx
movl %edx, %ebx
andl $0x7f, %ebx
orl %ecx, %ebx
leaq 0x1(%rax), %rcx
testb %dl, %dl
jns 0x67025
cmpl $0x6, %eax
movq %rcx, %rax
jne 0x67004
addq %rcx, %rbp
subl %esi, %ebp
jmp 0x67070
leaq 0x1(%rbp), %rax
xorl %r13d, %r13d
cmpl $0x7, %r12d
jb 0x670a1
movl $0x1, %ecx
movzbl (%rbp,%rcx), %edx
movl %r13d, %esi
shll $0x7, %esi
movl %edx, %r13d
andl $0x7f, %r13d
orl %esi, %r13d
leaq 0x1(%rcx), %r14
testb %dl, %dl
jns 0x67063
cmpl $0x6, %ecx
movq %r14, %rcx
jne 0x6703e
addq %rbp, %r14
subl %eax, %r14d
jmp 0x670c0
movl (%r8), %ebx
xorl %ebp, %ebp
movl %r14d, %eax
andl $0x10, %eax
shrl $0x4, %eax
testq %r15, %r15
sete %cl
testb %al, %cl
jne 0x67095
testq %r15, %r15
je 0x67254
cmpl %ebx, (%r8)
jae 0x67281
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %ebx, %ebx
jmp 0x6790a
movl $0x0, %r14d
cmpl $0x1, %r12d
je 0x670c0
movsbl (%rax), %r13d
testl %r13d, %r13d
js 0x673ef
movl $0x1, %r14d
leal 0x1(%r14), %eax
cmpl %r12d, %eax
jae 0x67922
movl %eax, %eax
movzbl (%rbp,%rax), %r10d
testl %r10d, %r10d
je 0x67922
testq %r15, %r15
je 0x6739c
xorl %eax, %eax
cmpl (%r8), %r13d
jne 0x673e7
movq %rax, (%rsp)
movq %r9, %rsi
movq %r8, 0x28(%rsp)
movl %r13d, %eax
xorl %edx, %edx
divl %r10d
movl %eax, 0x10(%rsp)
addl $0x2, %r14d
xorl %ecx, %ecx
cmpl $0x1, %r10d
movl %r10d, 0x20(%rsp)
movl %r10d, %eax
adcl $0x0, %eax
movq %rax, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
leaq -0x5(%rdi), %rax
xorl %ebx, %ebx
cmpq %rdx, %rcx
movl 0x10(%rsp), %edi
adcl $0x0, %edi
movl %edi, 0x870(%rsp,%rcx,4)
movl $0x0, %edi
testq %rcx, %rcx
je 0x67158
movl 0x86c(%rsp,%rcx,4), %edi
addl 0x46c(%rsp,%rcx,4), %edi
movl %edi, 0x470(%rsp,%rcx,4)
movl %r14d, %r8d
leaq (%r8,%rbp), %rdi
cmpq %r8, %rax
jle 0x671a6
xorl %r10d, %r10d
xorl %r9d, %r9d
movzbl (%rdi,%r10), %r11d
movl %r9d, %r8d
shll $0x7, %r8d
movl %r11d, %r9d
andl $0x7f, %r9d
orl %r8d, %r9d
leaq 0x1(%r10), %r8
testb %r11b, %r11b
jns 0x67199
cmpl $0x5, %r10d
movq %r8, %r10
jne 0x67171
addq %rdi, %r8
movl %r9d, 0x70(%rsp,%rcx,4)
subl %edi, %r8d
jmp 0x671cc
cmpl %r12d, %r14d
jae 0x671c1
movsbl (%rdi), %r8d
testl %r8d, %r8d
js 0x671ff
movl %r8d, 0x70(%rsp,%rcx,4)
movl $0x1, %r8d
jmp 0x671cc
movl $0x0, 0x70(%rsp,%rcx,4)
xorl %r8d, %r8d
addl %r8d, %r14d
cmpl %r12d, %r14d
ja 0x6754c
movl 0x70(%rsp,%rcx,4), %edi
leal -0x1(%rdi), %r8d
cmpl %r12d, %r8d
jae 0x6754c
addq %rdi, %rbx
incq %rcx
cmpq 0x18(%rsp), %rcx
jne 0x6712f
jmp 0x6748c
xorl %r9d, %r9d
movq %rdi, %r8
movzbl (%r8), %r10d
incq %r8
movl %r9d, %r11d
shll $0x7, %r11d
movl %r10d, %r9d
andl $0x7f, %r9d
orl %r11d, %r9d
testb %r10b, %r10b
jns 0x6719c
cmpq %rsi, %r8
jb 0x67205
jmp 0x6719c
movl $0x0, %ebp
cmpl $0x1, %r12d
je 0x67070
movsbl (%rsi), %ebx
testl %ebx, %ebx
js 0x6755f
movl $0x1, %ebp
jmp 0x67070
movq %rsi, 0x18(%rsp)
movl %ebx, (%r8)
movq %r9, %r13
movl %ebx, %edi
movq %r8, %r15
callq 0x4680
movq %r13, %r9
movq %r15, %r8
movq %rax, %r15
movq %rax, 0x10(%rsp)
testq %rax, %rax
jne 0x67292
jmp 0x67922
movq %rsi, 0x18(%rsp)
movl %ebx, (%r8)
movq $0x0, 0x10(%rsp)
movl (%r8), %r11d
testb %r14b, %r14b
setns %al
testb $0x40, %r14b
sete %cl
testb %cl, %al
movq %r8, 0x28(%rsp)
jne 0x67301
movq %r9, (%rsp)
movq %r11, %r13
movq %r11, %rdi
callq 0x4680
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x67555
movl %r14d, %eax
andl $0x40, %eax
shrl $0x6, %eax
testb %r14b, %r14b
sets %cl
testb %al, %cl
movq (%rsp), %r9
je 0x67589
movq %r15, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r10
movq %r13, %r11
jmp 0x67319
movq $0x0, 0x8(%rsp)
movq %r15, 0x20(%rsp)
movq %r15, 0x30(%rsp)
movq 0x18(%rsp), %r10
movslq %ebp, %r13
addq %r13, %r10
notl %r13d
addl %r12d, %r13d
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movl $0x0, 0x40(%rsp)
testb %r14b, %r14b
js 0x6741e
movq $0x0, 0x50(%rsp)
movl %r14d, %edi
andl $0x4, %edi
testb $0x40, %r14b
je 0x67482
movl %edi, (%rsp)
movq %r9, %rax
subq %r10, %rax
cmpq $0x6, %rax
jl 0x675bd
xorl %ecx, %ecx
xorl %ebp, %ebp
movzbl (%r10,%rcx), %edx
movl %ebp, %eax
shll $0x7, %eax
movl %edx, %ebp
andl $0x7f, %ebp
orl %eax, %ebp
leaq 0x1(%rcx), %rax
testb %dl, %dl
jns 0x67391
cmpl $0x5, %ecx
movq %rax, %rcx
jne 0x67370
addq %r10, %rax
subl %r10d, %eax
jmp 0x675da
cmpl $0x7ffffffe, %r13d      # imm = 0x7FFFFFFE
ja 0x67922
movl %r10d, 0x20(%rsp)
movq %rdi, 0x8(%rsp)
movq %r9, (%rsp)
movq %r8, %rbx
movl %r13d, %edi
callq 0x4680
testq %rax, %rax
je 0x67922
movq %rbx, %r8
movl %r13d, (%rbx)
movq %rax, %r15
movq (%rsp), %r9
movq 0x8(%rsp), %rdi
movl 0x20(%rsp), %r10d
jmp 0x670e9
movq %rax, %rdi
jmp 0x6791d
xorl %r13d, %r13d
movq %rax, %r14
movzbl (%r14), %ecx
incq %r14
movl %r13d, %edx
shll $0x7, %edx
movl %ecx, %r13d
andl $0x7f, %r13d
orl %edx, %r13d
testb %cl, %cl
jns 0x67066
cmpq %r9, %r14
jb 0x673f5
jmp 0x67066
movq %r9, (%rsp)
leaq 0x60(%rsp), %rcx
leaq 0x40(%rsp), %r8
movq %r10, %rdi
movq %r13, 0x48(%rsp)
movl %r13d, %esi
movq %r11, %rdx
movq %r10, %r12
movq %r11, %r13
callq 0x64238
testb %al, %al
je 0x6747a
movq %r15, 0x38(%rsp)
movzbl %al, %r15d
addq %r15, %r12
leaq 0x70(%rsp), %rdx
movq %r12, %rdi
movq (%rsp), %rsi
callq 0x679d1
leaq 0x70(%rsp), %rcx
movl (%rcx), %ecx
cmpl %r13d, %ecx
cmovbl %ecx, %r13d
jbe 0x676cd
xorl %r12d, %r12d
jmp 0x67900
xorl %r12d, %r12d
xorl %edx, %edx
jmp 0x677f7
movl %r14d, %eax
addq %rax, %rbx
cmpq 0x8(%rsp), %rbx
ja 0x6754c
movl %r13d, %edi
callq 0x4680
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x6754c
movq %r15, 0x38(%rsp)
xorl %r12d, %r12d
movl 0x870(%rsp,%r12,4), %r15d
movl %r15d, 0x44(%rsp)
movl %ebx, %esi
subl %r14d, %esi
jb 0x67769
movl %r14d, %edi
addq %rbp, %rdi
movl 0x470(%rsp,%r12,4), %edx
addq 0x10(%rsp), %rdx
leaq 0x44(%rsp), %rcx
callq 0x66fb3
testq %rax, %rax
je 0x67769
cmpl %r15d, 0x44(%rsp)
jne 0x67769
addl 0x70(%rsp,%r12,4), %r14d
incq %r12
cmpq %r12, 0x18(%rsp)
jne 0x674bb
leaq 0x470(%rsp), %r8
movq 0x38(%rsp), %r15
movq %r15, %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
movl %r13d, %edx
movl 0x20(%rsp), %ecx
callq 0x67a5c
movq %rbx, %rdi
callq 0x45c0
movq 0x28(%rsp), %rax
movl %r13d, (%rax)
jmp 0x67925
movq (%rsp), %rdi
jmp 0x6791d
xorl %r12d, %r12d
xorl %ebp, %ebp
jmp 0x67905
xorl %ebx, %ebx
movq %rsi, %rbp
movzbl (%rbp), %eax
incq %rbp
movl %ebx, %ecx
shll $0x7, %ecx
movl %eax, %ebx
andl $0x7f, %ebx
orl %ecx, %ebx
testb %al, %al
jns 0x67028
cmpq %r9, %rbp
jb 0x67564
jmp 0x67028
testb %r14b, %r14b
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r10
movq %r13, %r11
js 0x6773b
testb $0x40, %r14b
je 0x6774f
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r15, 0x30(%rsp)
jmp 0x67319
xorl %ebp, %ebp
movl $0x0, %eax
cmpq %r9, %r10
jae 0x675da
movsbl (%r10), %ebp
testl %ebp, %ebp
js 0x6777c
movl $0x1, %eax
movq %r15, 0x38(%rsp)
movl %eax, %ecx
addq %r10, %rcx
movq %r9, %rdx
subq %rcx, %rdx
cmpq $0x6, %rdx
jl 0x6761d
xorl %edx, %edx
xorl %ebx, %ebx
movzbl (%rcx,%rdx), %esi
movl %ebx, %edi
shll $0x7, %edi
movl %esi, %ebx
andl $0x7f, %ebx
orl %edi, %ebx
leaq 0x1(%rdx), %r15
testb %sil, %sil
jns 0x67615
cmpl $0x5, %edx
movq %r15, %rdx
jne 0x675f4
addq %rcx, %r15
subl %ecx, %r15d
jmp 0x6763b
xorl %ebx, %ebx
movl $0x0, %r15d
cmpq %r9, %rcx
jae 0x6763b
movsbl (%rcx), %ebx
testl %ebx, %ebx
js 0x677a5
movl $0x1, %r15d
cmpl %r11d, %ebx
jbe 0x6764c
xorl %eax, %eax
xorl %r12d, %r12d
xorl %edx, %edx
jmp 0x677e7
addl %eax, %r15d
movl %r15d, %edx
addq %r10, %rdx
testb $0x1, %bpl
jne 0x676fd
movq %r11, 0x58(%rsp)
movq %rdx, %rdi
leaq 0x70(%rsp), %rdx
movq %r9, %rsi
movq %r10, 0x18(%rsp)
callq 0x679d1
addl %r15d, %eax
movq %rax, %r15
shrl %ebp
xorl %r12d, %r12d
movl (%rsp), %edi
xorl %esi, %esi
callq 0x67c28
movq 0x18(%rsp), %rcx
leaq (%rcx,%r15), %rdi
movq %r13, 0x48(%rsp)
movl %r13d, %esi
subl %r15d, %esi
xorl %edx, %edx
movl %ebp, %ecx
callq *%rax
testq %rax, %rax
je 0x677cf
movq %rax, %rdx
movq %rax, %r12
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r10
movq 0x58(%rsp), %r11
movq 0x48(%rsp), %r13
jmp 0x67714
movq %r13, %r11
movl %ebx, %ecx
movq %rcx, 0x50(%rsp)
cltq
addq %rax, %r12
addl %r15d, %eax
movq 0x48(%rsp), %r13
subl %eax, %r13d
movq 0x38(%rsp), %r15
movq 0x28(%rsp), %r8
movq (%rsp), %r9
movq %r12, %r10
jmp 0x67349
shrl %ebp
subq %rdx, %r9
cmpq %rbp, %r9
cmovgel %ebp, %r9d
movl %r9d, 0x70(%rsp)
xorl %r12d, %r12d
movl %r9d, %ebp
addl 0x70(%rsp), %r15d
movl %r13d, %ecx
subl %r15d, %ecx
jae 0x67728
xorl %eax, %eax
jmp 0x677e7
movl %r15d, %eax
addq %rax, %r10
movb $0x1, %al
movl %ecx, %r13d
movl %ebx, %r11d
jmp 0x677e7
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rax, 0x30(%rsp)
jmp 0x67319
movq $0x0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
xorl %r15d, %r15d
jmp 0x67319
movq (%rsp), %rdi
callq 0x45c0
movq 0x10(%rsp), %rdi
jmp 0x6791d
xorl %ebp, %ebp
movq %r10, %rax
movzbl (%rax), %ecx
incq %rax
movl %ebp, %edx
shll $0x7, %edx
movl %ecx, %ebp
andl $0x7f, %ebp
orl %edx, %ebp
testb %cl, %cl
jns 0x67394
cmpq %r9, %rax
jb 0x67781
jmp 0x67394
xorl %ebx, %ebx
movq %rcx, %r15
movzbl (%r15), %edx
incq %r15
movl %ebx, %esi
shll $0x7, %esi
movl %edx, %ebx
andl $0x7f, %ebx
orl %esi, %ebx
testb %dl, %dl
jns 0x67618
cmpq %r9, %r15
jb 0x677aa
jmp 0x67618
xorl %eax, %eax
xorl %edx, %edx
movq 0x28(%rsp), %r8
movq 0x18(%rsp), %r10
movq 0x58(%rsp), %r11
movq 0x48(%rsp), %r13
movl (%rsp), %edi
testb %al, %al
movq 0x38(%rsp), %r15
je 0x67900
testl %r13d, %r13d
je 0x67842
movq %r10, 0x18(%rsp)
testb $0x20, %r14b
jne 0x678f6
movl %r14d, %esi
andl $0x1, %esi
movq %r11, %rbx
movq %rdx, (%rsp)
callq 0x67c28
movq 0x18(%rsp), %rdi
movl %r13d, %esi
movq 0x20(%rsp), %rdx
movq %rbx, %r13
movl %ebx, %ecx
callq *%rax
movq (%rsp), %rdx
movq %rax, %rbx
testq %rax, %rax
jne 0x6784a
jmp 0x67900
xorl %r13d, %r13d
movq 0x20(%rsp), %rbx
testb $0x40, %r14b
je 0x678e4
testl %ebp, %ebp
je 0x67900
movq %r13, %r10
movq 0x28(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x70(%rsp)
movzbl (%rdx), %eax
testl %eax, %eax
movl $0x100, %r9d            # imm = 0x100
cmovnel %eax, %r9d
cmpl %r9d, %ebp
jbe 0x6793a
movl %r9d, %eax
notl %eax
movl %r10d, %esi
movl %r9d, %ecx
movq %rdx, %r8
addq %rcx, %rdx
incq %rdx
incq %r8
addl %eax, %ebp
leaq 0x70(%rsp), %rax
movq %rbx, %rdi
movq %rbp, %rcx
pushq %rax
pushq 0x38(%rsp)
movq %r10, %rbx
callq 0x7cead
addq $0x10, %rsp
testq %rax, %rax
movq 0x50(%rsp), %r13
je 0x6796d
movl 0x70(%rsp), %ebx
movq %r12, %rdi
callq 0x45c0
movq %rbx, %r10
movb $0x1, %al
xorl %r12d, %r12d
movq 0x8(%rsp), %rbp
jmp 0x67977
movq 0x8(%rsp), %rbp
movq %r13, %r10
movq 0x50(%rsp), %r13
jmp 0x6797b
cmpl %r13d, %r11d
ja 0x67900
cmpl (%r8), %r11d
jbe 0x67948
movq 0x8(%rsp), %rbp
movq 0x10(%rsp), %rbx
movq %r12, %rdi
callq 0x45c0
movq %rbx, %rdi
callq 0x45c0
movq %rbp, %rdi
callq 0x45c0
xorl %r15d, %r15d
movq %r15, %rax
addq $0xc78, %rsp            # imm = 0xC78
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movq 0x8(%rsp), %rbp
movq 0x50(%rsp), %r13
jmp 0x67977
movq %r11, %r13
movq %rdx, (%rsp)
movl %r11d, %edx
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0x43c0
movq (%rsp), %rdx
jmp 0x6784a
xorl %eax, %eax
movq 0x8(%rsp), %rbp
movq %rbx, %r10
testb %al, %al
je 0x67905
testb %r14b, %r14b
jns 0x679b1
movl 0x40(%rsp), %r8d
cmpl $0x1, %r8d
movl %r10d, %esi
cmoveq %rsi, %r13
leaq 0x60(%rsp), %r9
movq 0x30(%rsp), %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x642ae
testq %rax, %rax
je 0x67905
movl %r13d, %r10d
testq %rbp, %rbp
je 0x679c4
movq %rbp, %rdi
movq %r10, %rbx
callq 0x45c0
movq %rbx, %r10
movq 0x28(%rsp), %rax
movl %r10d, (%rax)
jmp 0x67925