// File: /workspace/github_c_makefile_star2_O2/samtools[P]htslib/htscodecs/htscodecs/arith_dynamic.c
// Function: arith_uncompress_to
unsigned char *arith_uncompress_to(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;
    unsigned char *tmp_free = NULL;

    if (in_size == 0)
        return NULL;

    if (*in & X_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;
            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 (!arith_uncompress_to(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 & X_PACK;
    int do_rle  = order & X_RLE;
    int do_cat  = order & X_CAT;
    int no_size = order & X_NOSZ;
    int do_ext  = order & X_EXT;
    order &= 3;

    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;

    if (osz >= INT_MAX)
        return NULL;

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
        // Limit maximum size to get fast turnaround on fuzzing test cases
        if (osz > 100000)
            goto err;
#endif

    if (no_size && !out)
        return NULL; // Need one or the other

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

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

    // Need In, Out and Tmp buffers with temporary buffer of the same size
    // as output.  Our entropy decode is either arithmetic (with/without RLE)
    // or external (bz2, gzip, lzma) but with an optional unPACK transform
    // at the end.
    //
    // To avoid pointless memcpy when unpacking we switch around which
    // buffers we're writing to accordingly.

    // Format is pack meta data if present, followed by compressed data.
    if (do_pack) {
        if (!(tmp_free = tmp = malloc(*out_size)))
            goto err;
        tmp1 = tmp;  // uncompress
        tmp2 = out;  // unpack
    } else {
        // no pack
        tmp  = NULL;
        tmp1 = out;  // uncompress
        tmp2 = out;  // NOP
    }

    
    // 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;
    }

    //fprintf(stderr, "    meta_size %d bytes\n", (int)(in - orig_in)); //c-size

    // uncompress RLE data.  in -> tmp1
    if (in_size) {
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
        // Limit maximum size to get fast turnaround on fuzzing test cases
        if (tmp1_size > 100000)
            goto err;
#endif
        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 if (do_ext) {
#ifdef HAVE_LIBBZ2
            if (BZ_OK != BZ2_bzBuffToBuffDecompress((char *)tmp1, &tmp1_size,
                                                    (char *)in, in_size, 0, 0))
                goto err;
#else
            fprintf(stderr, "Htscodecs has been compiled without libbz2 support\n");
            goto err;
#endif
          } else {
            // in -> tmp1
            if (do_rle) {
                tmp1 = order == 1
                    ? arith_uncompress_O1_RLE(in, in_size, tmp1, tmp1_size)
                    : arith_uncompress_O0_RLE(in, in_size, tmp1, tmp1_size);
            } else {
                //if (order == 2)
                //    tmp1 = arith_uncompress_O2(in, in_size, tmp1, tmp1_size)
                //else
                tmp1 = order == 1
                    ? arith_uncompress_O1(in, in_size, tmp1, tmp1_size)
                    : arith_uncompress_O0(in, in_size, tmp1, tmp1_size);
            }
            if (!tmp1)
                goto err;
        }
    } else {
        tmp1_size = 0;
    }

    if (do_pack) {
        // Unpack bits via pack-map.  tmp1 -> tmp2
        if (npacked_sym == 1)
            unpacked_sz = tmp1_size;
        //uint8_t *porig = unpack(tmp2, tmp2_size, unpacked_sz, npacked_sym, map);
        //memcpy(tmp3, porig, unpacked_sz);
        if (!hts_unpack(tmp1, tmp1_size, tmp2, unpacked_sz, npacked_sym, map))
            goto err;
        tmp2_size = unpacked_sz;
    } else {
        tmp2_size = tmp1_size;
    }

    if (tmp)
        free(tmp);

    *out_size = tmp2_size;
    return tmp2;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc88, %rsp            # imm = 0xC88
testl %esi, %esi
je 0x4a76b
movq %rcx, %r13
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbp
movl %esi, %eax
leaq (%rdi,%rax), %rsi
movzbl (%rdi), %r12d
testb $0x8, %r12b
movq %rsi, 0x38(%rsp)
jne 0x4a439
incq %rbp
testb $0x10, %r12b
movq %rbp, 0x8(%rsp)
jne 0x4a48e
movq %r13, %rbx
movl %r12d, %r13d
movq %r14, %r12
leaq 0x880(%rsp), %r14
movq %rbp, %rdi
movq %r14, %rdx
callq 0x4adde
movl %eax, %ebp
movl (%r14), %r8d
movq %r12, %r14
movl %r13d, %r12d
movq %rbx, %r13
jmp 0x4a49c
movq %rax, 0x30(%rsp)
leaq 0x1(%rbp), %rdi
leaq 0x64(%rsp), %rdx
callq 0x4adde
movl %eax, %ebx
leal 0x1(%rbx), %eax
cmpl %r15d, %eax
jae 0x4a76b
movl %eax, %eax
movzbl (%rbp,%rax), %eax
movq %rax, 0x20(%rsp)
testl %eax, %eax
je 0x4a76b
movl 0x64(%rsp), %r12d
testq %r14, %r14
je 0x4a4f2
movq %rbp, 0x8(%rsp)
xorl %ebp, %ebp
cmpl (%r13), %r12d
je 0x4a51f
jmp 0x4a76d
movl (%r13), %r8d
movl %r8d, 0x880(%rsp)
xorl %ebp, %ebp
cmpl $0x7ffffffe, %r8d       # imm = 0x7FFFFFFE
ja 0x4a76b
movl %r12d, %eax
andl $0x10, %eax
shrl $0x4, %eax
testq %r14, %r14
sete %cl
testb %al, %cl
jne 0x4a76b
movl %r8d, %edi
testq %r14, %r14
je 0x4a5dd
cmpl %r8d, (%r13)
jb 0x4a76b
movq %r13, %rax
movq %rdi, %r13
movq %rax, 0x10(%rsp)
movl %r8d, (%rax)
movq $0x0, 0x48(%rsp)
jmp 0x4a605
cmpl $0x7ffffffe, %r12d      # imm = 0x7FFFFFFE
ja 0x4a76b
movq %r12, %rdi
callq 0x4680
testq %rax, %rax
je 0x4a76b
movq %rax, %r14
movq %rbp, 0x8(%rsp)
movl %r12d, (%r13)
movq %rax, %rbp
movq %r14, 0x28(%rsp)
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movl %r12d, %eax
xorl %edx, %edx
movq 0x20(%rsp), %rcx
divl %ecx
movl %eax, 0x58(%rsp)
movq %rdx, 0x40(%rsp)
addl $0x2, %ebx
xorl %r12d, %r12d
movl %ecx, %eax
movq %rax, 0x48(%rsp)
xorl %r13d, %r13d
xorl %r14d, %r14d
movl %ebx, %edi
cmpq %r13, 0x48(%rsp)
je 0x4a6e4
cmpq 0x40(%rsp), %r13
movl 0x58(%rsp), %eax
adcl $0x0, %eax
movl %eax, 0x880(%rsp,%r13,4)
testq %r13, %r13
je 0x4a58b
movl 0x87c(%rsp,%r13,4), %eax
addl 0x7c(%rsp,%r13,4), %eax
jmp 0x4a58d
xorl %eax, %eax
movl %eax, 0x80(%rsp,%r13,4)
addq 0x8(%rsp), %rdi
leaq (%rsp,%r12), %rdx
addq $0x480, %rdx            # imm = 0x480
movq 0x38(%rsp), %rsi
callq 0x4adde
addl %eax, %ebx
cmpl %r15d, %ebx
ja 0x4a763
movl 0x480(%rsp,%r13,4), %eax
leal -0x1(%rax), %ecx
cmpl %r15d, %ecx
jae 0x4a763
addq %rax, %r14
incq %r13
addq $0x4, %r12
jmp 0x4a556
movq %r13, 0x10(%rsp)
movl %r8d, (%r13)
movq %rdi, %r13
movl %r8d, %ebx
callq 0x4680
movl %ebx, %r8d
movq %rax, %r14
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x4a76b
movslq %ebp, %rbx
addq %rbx, 0x8(%rsp)
notl %ebx
addl %r15d, %ebx
movl %r8d, 0x80(%rsp)
testb %r12b, %r12b
js 0x4a782
xorps %xmm0, %xmm0
andl $0x0, 0x50(%rsp)
movaps %xmm0, 0x70(%rsp)
xorl %r13d, %r13d
movq %r14, %r15
movq $0x0, 0x58(%rsp)
testl %ebx, %ebx
movq 0x10(%rsp), %rbp
je 0x4a80a
testb $0x20, %r12b
jne 0x4a817
testb $0x4, %r12b
jne 0x4a847
movq %rbp, 0x10(%rsp)
movl %r12d, %eax
andl $0x3, %eax
testb $0x40, %r12b
movl %r8d, 0x38(%rsp)
jne 0x4a8ae
cmpl $0x1, %eax
jne 0x4aa38
movq %r13, 0x20(%rsp)
movq %r15, %r13
movl $0x41000, %edi          # imm = 0x41000
callq 0x6412c
testq %rax, %rax
je 0x4ac68
movq %rax, %r15
movl %r12d, 0x30(%rsp)
movq %r14, 0x28(%rsp)
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
testl %eax, %eax
movl $0x100, %r14d           # imm = 0x100
cmovnel %eax, %r14d
xorl %r12d, %r12d
cmpq $0x41000, %r12          # imm = 0x41000
je 0x4aa66
leaq (%r15,%r12), %rdi
movl %r14d, %esi
callq 0x4b089
addq $0x410, %r12            # imm = 0x410
jmp 0x4a6c2
addq %rdi, %r14
cmpq 0x30(%rsp), %r14
ja 0x4a763
movq 0x18(%rsp), %rdi
callq 0x4680
testq %rax, %rax
je 0x4a763
movq %rax, %r12
xorl %r13d, %r13d
cmpq %r13, 0x48(%rsp)
je 0x4a917
movl 0x880(%rsp,%r13,4), %r15d
movl %r15d, 0x54(%rsp)
movl %r14d, %esi
subl %ebx, %esi
jb 0x4a871
movl %ebx, %edi
addq 0x8(%rsp), %rdi
movl 0x80(%rsp,%r13,4), %edx
addq %r12, %rdx
leaq 0x54(%rsp), %rcx
callq 0x4a3c1
testq %rax, %rax
je 0x4a871
cmpl %r15d, 0x54(%rsp)
jne 0x4a871
addl 0x480(%rsp,%r13,4), %ebx
incq %r13
jmp 0x4a703
movq %rbp, %rdi
callq 0x45c0
xorl %ebp, %ebp
movq %rbp, %rax
addq $0xc88, %rsp            # imm = 0xC88
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r8d, %ebp
movq %r13, %r15
movq %r13, %rdi
callq 0x4680
testq %rax, %rax
je 0x4a83f
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rcx
movaps %xmm0, (%rcx)
leaq 0x50(%rsp), %r8
andl $0x0, (%r8)
movq 0x8(%rsp), %r13
movq %r13, %rdi
movl %ebx, %esi
movq %r15, 0x58(%rsp)
movq %r15, %rdx
callq 0x4e8ed
testb %al, %al
je 0x4a800
movl %r12d, 0x30(%rsp)
movq %r14, %r12
movzbl %al, %r15d
addq %r15, %r13
leaq 0x480(%rsp), %r14
movq %r13, %rdi
movq 0x38(%rsp), %rsi
movq %r14, %rdx
callq 0x4adde
movl (%r14), %r8d
cmpl %ebp, %r8d
jbe 0x4a881
movq 0x20(%rsp), %r13
jmp 0x4ad3d
andl $0x0, 0x80(%rsp)
jmp 0x4acf1
cmpl %ebx, %r8d
ja 0x4ad3d
cmpl (%rbp), %r8d
ja 0x4ad3d
movl %r8d, %edx
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x43c0
jmp 0x4acf1
xorl %r13d, %r13d
jmp 0x4ad3d
leaq 0x80(%rsp), %rsi
movq %r15, %rdi
movq 0x8(%rsp), %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4560
testl %eax, %eax
jne 0x4ad3d
jmp 0x4acf1
movq %rbp, %rdi
callq 0x45c0
movq %r12, %rdi
jmp 0x4a766
addl %eax, %r15d
subl %r15d, %ebx
cltq
addq %rax, %r13
movq %r13, 0x8(%rsp)
movl %r8d, 0x80(%rsp)
movq 0x20(%rsp), %r13
movq %r13, %r15
movq %r12, %r14
movl 0x30(%rsp), %r12d
jmp 0x4a63f
cmpl $0x1, %eax
jne 0x4aa4c
movq %r14, 0x28(%rsp)
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
testl %eax, %eax
movl $0x100, %r14d           # imm = 0x100
cmovnel %eax, %r14d
movl $0x41000, %edi          # imm = 0x41000
callq 0x6412c
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x4acdf
movq %r15, 0x18(%rsp)
xorl %r15d, %r15d
cmpq $0x41000, %r15          # imm = 0x41000
je 0x4aac3
movq 0x40(%rsp), %rax
leaq (%rax,%r15), %rdi
movl %r14d, %esi
callq 0x4b089
addq $0x410, %r15            # imm = 0x410
jmp 0x4a8f0
xorl %eax, %eax
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r9
subl %r9d, %ecx
movq 0x10(%rsp), %rbx
movq 0x28(%rsp), %rbp
jb 0x4a9f2
xorl %eax, %eax
cmpq $0x2, %r9
je 0x4ac72
cmpl $0x4, %r9d
jne 0x4a9ee
movq 0x18(%rsp), %rcx
cmpl $0x40, %ecx
jb 0x4ad5f
addl $-0x40, %ecx
xorl %eax, %eax
movq %rbp, %rdx
cmpq %rcx, %rax
jae 0x4ad5a
movq %rdx, %rsi
xorl %edi, %edi
cmpq $0x10, %rdi
je 0x4a9a0
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x4a997
movl 0x80(%rsp,%r8,4), %r9d
addl %edi, %r9d
movb (%r12,%r9), %r9b
movb %r9b, (%rsi,%r8)
incq %r8
jmp 0x4a979
incq %rdi
addq $0x4, %rsi
jmp 0x4a970
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x4a9b5
addl $0x10, 0x80(%rsp,%rsi,4)
incq %rsi
jmp 0x4a9a2
addq $0x40, %rax
addq $0x40, %rdx
jmp 0x4a962
movslq %eax, %rdx
addq %rbp, %rdx
xorl %esi, %esi
cmpq %rsi, %r9
je 0x4a9ec
movl 0x80(%rsp,%rsi,4), %edi
leal 0x1(%rdi), %r8d
movl %r8d, 0x80(%rsp,%rsi,4)
movb (%r12,%rdi), %dil
movb %dil, (%rdx,%rsi)
incq %rsi
jmp 0x4a9c7
addl %esi, %eax
cmpl %ecx, %eax
jb 0x4a9bf
movslq %eax, %rcx
leaq (%rcx,%rbp), %rax
movl %ecx, %ecx
xorl %edx, %edx
leal (%rcx,%rdx), %esi
cmpl %esi, 0x18(%rsp)
jbe 0x4aa24
movl 0x80(%rsp,%rdx,4), %esi
leal 0x1(%rsi), %edi
movl %edi, 0x80(%rsp,%rdx,4)
movb (%r12,%rsi), %sil
movb %sil, (%rax,%rdx)
incq %rdx
jmp 0x4a9fd
movq %r12, %rdi
callq 0x45c0
movq 0x18(%rsp), %rax
movl %eax, (%rbx)
jmp 0x4a76d
movq 0x8(%rsp), %rdi
movl %ebx, %esi
movq %r15, %rdx
movl %r8d, %ecx
callq 0x4afe6
jmp 0x4aa5e
movq 0x8(%rsp), %rdi
movl %ebx, %esi
movq %r15, %rdx
movl %r8d, %ecx
callq 0x4ae64
movq %rax, %r15
jmp 0x4ace7
movq 0x8(%rsp), %rdx
leaq 0x1(%rdx), %rax
movl %ebx, %ecx
addq %rdx, %rcx
leaq 0x480(%rsp), %rbx
movq %rax, 0x18(%rbx)
movq %rax, 0x20(%rbx)
movq %rcx, 0x28(%rbx)
movq %rbx, %rdi
callq 0x4b357
movl 0x38(%rsp), %r14d
xorl %r12d, %r12d
xorl %eax, %eax
movq 0x10(%rsp), %rbp
cmpq %r12, %r14
je 0x4aafc
movzbl %al, %eax
imulq $0x410, %rax, %rdi      # imm = 0x410
addq %r15, %rdi
movq %rbx, %rsi
callq 0x4b3a2
movb %al, (%r13,%r12)
incq %r12
jmp 0x4aa9f
movl $0x42030, %edi          # imm = 0x42030
callq 0x6412c
testq %rax, %rax
je 0x4acd5
movq %rax, %rbp
xorl %r15d, %r15d
movq 0x28(%rsp), %r14
cmpq $0x42030, %r15          # imm = 0x42030
je 0x4ab24
leaq (%r15,%rbp), %rdi
callq 0x4b0da
addq $0x418, %r15            # imm = 0x418
jmp 0x4aae1
xorl %eax, %eax
cmpl $0x0, 0x4b8(%rsp)
cmovsq %rax, %r13
movq %r15, %rdi
movq %r13, %r15
callq 0x64291
movq 0x28(%rsp), %r14
movl 0x30(%rsp), %r12d
jmp 0x4ac5e
movq %r13, 0x20(%rsp)
movq 0x8(%rsp), %rdx
leaq 0x1(%rdx), %rax
movl %ebx, %ecx
addq %rdx, %rcx
leaq 0x480(%rsp), %rdi
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
callq 0x4b357
movq 0x18(%rsp), %r15
leaq 0x1(%r15), %rax
movq %rax, 0x68(%rsp)
xorl %edi, %edi
xorl %r13d, %r13d
movl 0x38(%rsp), %esi
movl %r12d, 0x30(%rsp)
cmpl %esi, %edi
jae 0x4ac39
movzbl %r13b, %eax
movq %rdi, %rbx
imulq $0x410, %rax, %rdi      # imm = 0x410
addq 0x40(%rsp), %rdi
leaq 0x480(%rsp), %rsi
callq 0x4b3a2
movl %eax, %r13d
movq %rbx, 0x8(%rsp)
movslq %ebx, %r12
movb %r13b, (%r15,%r12)
movzbl %r13b, %r15d
xorl %edx, %edx
movl %r15d, %ecx
movl %edx, %ebx
movslq %ecx, %r14
imulq $0x418, %r14, %rdi      # imm = 0x418
addq %rbp, %rdi
leaq 0x480(%rsp), %rsi
callq 0x4b444
movzwl %ax, %eax
xorl %ecx, %ecx
cmpl $0x101, %r14d           # imm = 0x101
setl %cl
addl %r14d, %ecx
cmpl %r15d, %r14d
movl $0x100, %edx            # imm = 0x100
cmovel %edx, %ecx
cmpw $0x3, %ax
jne 0x4abf4
leal (%rbx,%rax), %edx
cmpl 0x38(%rsp), %edx
jb 0x4abac
addq 0x68(%rsp), %r12
movq 0x8(%rsp), %rdi
leal 0x1(%rdi), %ecx
addl %eax, %ebx
negl %ebx
xorl %eax, %eax
movq 0x18(%rsp), %r15
movl 0x38(%rsp), %esi
movl %ebx, %edx
addl %eax, %edx
je 0x4ac26
leal (%rcx,%rax), %edx
cmpl %edx, %esi
jbe 0x4ac26
movb %r13b, (%r12,%rax)
incq %rax
jmp 0x4ac10
addl %eax, %edi
incl %edi
movq 0x28(%rsp), %r14
movl 0x30(%rsp), %r12d
jmp 0x4ab6c
xorl %eax, %eax
cmpl $0x0, 0x4b8(%rsp)
cmovsq %rax, %r15
movq 0x40(%rsp), %rdi
callq 0x64291
movq %rbp, %rdi
callq 0x64291
movq 0x10(%rsp), %rbp
movq 0x20(%rsp), %r13
jmp 0x4acec
xorl %r15d, %r15d
movq 0x20(%rsp), %r13
jmp 0x4ace7
movq 0x18(%rsp), %rcx
cmpl $0x8, %ecx
jb 0x4ada1
addl $-0x8, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jae 0x4ad9c
xorl %edx, %edx
cmpl $0x4, %edx
je 0x4acc0
movslq %eax, %rsi
addq %rbp, %rsi
xorl %edi, %edi
cmpq $0x2, %rdi
je 0x4acba
movl 0x80(%rsp,%rdi,4), %r8d
addl %edx, %r8d
movb (%r12,%r8), %r8b
movb %r8b, (%rsi,%rdi)
incq %rdi
jmp 0x4ac9c
addl %edi, %eax
incl %edx
jmp 0x4ac8f
xorl %edx, %edx
cmpq $0x2, %rdx
je 0x4ac85
addl $0x4, 0x80(%rsp,%rdx,4)
incq %rdx
jmp 0x4acc2
movq 0x40(%rsp), %rdi
callq 0x64291
xorl %r15d, %r15d
movq 0x28(%rsp), %r14
movq 0x10(%rsp), %rbp
testq %r15, %r15
je 0x4ad3d
testb %r12b, %r12b
js 0x4acff
movl 0x80(%rsp), %ebx
jmp 0x4ad30
movl 0x50(%rsp), %r8d
cmpl $0x1, %r8d
movl 0x80(%rsp), %esi
movq 0x58(%rsp), %rcx
cmoveq %rsi, %rcx
leaq 0x70(%rsp), %r9
movq %r15, %rdi
movq %r14, %rdx
movq %rcx, %rbx
callq 0x4e95d
testq %rax, %rax
je 0x4ad3d
movq %r13, %rdi
callq 0x45c0
movl %ebx, (%rbp)
jmp 0x4ad52
movq %r13, %rdi
callq 0x45c0
movq 0x48(%rsp), %rdi
callq 0x45c0
xorl %r14d, %r14d
movq %r14, %rbp
jmp 0x4a76d
movq 0x18(%rsp), %rcx
addl $-0x4, %ecx
cmpl %ecx, %eax
jae 0x4a9f2
movslq %eax, %rdx
addq %rbp, %rdx
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x4ad98
movl 0x80(%rsp,%rsi,4), %edi
leal 0x1(%rdi), %r8d
movl %r8d, 0x80(%rsp,%rsi,4)
movb (%r12,%rdi), %dil
movb %dil, (%rdx,%rsi)
incq %rsi
jmp 0x4ad72
addl %esi, %eax
jmp 0x4ad62
movq 0x18(%rsp), %rcx
addl $-0x2, %ecx
cmpl %ecx, %eax
jae 0x4a9f2
movslq %eax, %rdx
addq %rbp, %rdx
xorl %esi, %esi
cmpq $0x2, %rsi
je 0x4adda
movl 0x80(%rsp,%rsi,4), %edi
leal 0x1(%rdi), %r8d
movl %r8d, 0x80(%rsp,%rsi,4)
movb (%r12,%rdi), %dil
movb %dil, (%rdx,%rsi)
incq %rsi
jmp 0x4adb4
addl %esi, %eax
jmp 0x4ada4