// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xcf0, %rsp            # imm = 0xCF0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x8426b
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x845d4
movl $0x1, -0x4c(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movl -0x4c(%rbp), %eax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
leaq -0x44(%rbp), %rdx
callq 0x84b30
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jb 0x842bf
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movq -0x10(%rbp), %rax
movl -0x4c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x4c(%rbp)
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x1, -0x5c(%rbp)
jae 0x842ea
movq $0x0, -0x8(%rbp)
jmp 0x84b19
cmpq $0x0, -0x20(%rbp)
jne 0x84335
cmpl $0x7fffffff, -0x44(%rbp) # imm = 0x7FFFFFFF
jb 0x84307
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movl -0x44(%rbp), %eax
movl %eax, %edi
callq 0x4650
movq %rax, -0x20(%rbp)
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x8432c
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movl -0x44(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x44(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
je 0x84356
movq -0x38(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jae 0x84465
movl -0x44(%rbp), %eax
xorl %edx, %edx
divl -0x5c(%rbp)
movl %eax, %ecx
movl -0x44(%rbp), %eax
xorl %edx, %edx
divl -0x5c(%rbp)
cmpl -0x50(%rbp), %edx
seta %al
andb $0x1, %al
movzbl %al, %eax
addl %eax, %ecx
movslq -0x50(%rbp), %rax
movl %ecx, -0x860(%rbp,%rax,4)
cmpl $0x0, -0x50(%rbp)
je 0x843c0
movl -0x50(%rbp), %eax
subl $0x1, %eax
cltq
movl -0xc60(%rbp,%rax,4), %eax
movl -0x50(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addl -0x860(%rbp,%rcx,4), %eax
movl %eax, -0xcd8(%rbp)
jmp 0x843ca
xorl %eax, %eax
movl %eax, -0xcd8(%rbp)
jmp 0x843ca
movl -0xcd8(%rbp), %ecx
movslq -0x50(%rbp), %rax
movl %ecx, -0xc60(%rbp,%rax,4)
movq -0x10(%rbp), %rdi
movl -0x4c(%rbp), %eax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movslq -0x50(%rbp), %rax
leaq -0x460(%rbp), %rdx
shlq $0x2, %rax
addq %rax, %rdx
callq 0x84b30
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movslq -0x50(%rbp), %rax
movl -0x460(%rbp,%rax,4), %eax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x14(%rbp), %eax
ja 0x8443f
movslq -0x50(%rbp), %rax
movl -0x460(%rbp,%rax,4), %eax
cmpl -0x14(%rbp), %eax
ja 0x8443f
movslq -0x50(%rbp), %rax
cmpl $0x1, -0x460(%rbp,%rax,4)
jae 0x84455
movq -0x38(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x84b19
jmp 0x84457
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x8435d
movl -0x4c(%rbp), %eax
addq -0x58(%rbp), %rax
movl -0x14(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x8448a
movq -0x38(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movl -0x4c(%rbp), %eax
addq -0x58(%rbp), %rax
movl %eax, -0x14(%rbp)
movl -0x44(%rbp), %eax
movl %eax, %edi
callq 0x4650
movq %rax, -0xc68(%rbp)
cmpq $0x0, -0xc68(%rbp)
jne 0x844c5
movq -0x38(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jae 0x84595
movslq -0x50(%rbp), %rax
movl -0x860(%rbp,%rax,4), %eax
movl %eax, -0x48(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jae 0x84510
movq -0x38(%rbp), %rdi
callq 0x45a0
movq -0xc68(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movq -0x10(%rbp), %rdi
movl -0x4c(%rbp), %eax
addq %rax, %rdi
movl -0x14(%rbp), %esi
subl -0x4c(%rbp), %esi
movq -0xc68(%rbp), %rdx
movslq -0x50(%rbp), %rax
movl -0xc60(%rbp,%rax,4), %eax
addq %rax, %rdx
leaq -0x48(%rbp), %rcx
callq 0x84220
cmpq $0x0, %rax
je 0x84554
movl -0x48(%rbp), %eax
movslq -0x50(%rbp), %rcx
cmpl -0x860(%rbp,%rcx,4), %eax
je 0x84576
movq -0x38(%rbp), %rdi
callq 0x45a0
movq -0xc68(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movslq -0x50(%rbp), %rax
movl -0x460(%rbp,%rax,4), %eax
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x844cc
movq -0x20(%rbp), %rdi
movq -0xc68(%rbp), %rsi
movl -0x44(%rbp), %edx
movl -0x5c(%rbp), %ecx
leaq -0xc60(%rbp), %r8
callq 0x84c80
movq -0xc68(%rbp), %rdi
callq 0x45a0
movl -0x44(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x84b19
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0xc6c(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movl -0xc6c(%rbp), %eax
andl $0x80, %eax
movl %eax, -0xc70(%rbp)
movl -0xc6c(%rbp), %eax
andl $0x40, %eax
movl %eax, -0xc74(%rbp)
movl -0xc6c(%rbp), %eax
andl $0x20, %eax
movl %eax, -0xc78(%rbp)
movl -0xc6c(%rbp), %eax
andl $0x10, %eax
movl %eax, -0xc7c(%rbp)
movl -0xc6c(%rbp), %eax
andl $0x4, %eax
movl %eax, -0xc80(%rbp)
movl -0xc6c(%rbp), %eax
andl $0x3, %eax
movl %eax, -0xc6c(%rbp)
movl $0x0, -0xc84(%rbp)
cmpl $0x0, -0xc7c(%rbp)
jne 0x84680
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0xc88(%rbp), %rdx
callq 0x84b30
movl %eax, -0xc84(%rbp)
jmp 0x84696
movl $0x0, -0xc84(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc88(%rbp)
movl -0xc84(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0xc84(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x7fffffff, -0xc88(%rbp) # imm = 0x7FFFFFFF
jb 0x846d1
movq $0x0, -0x8(%rbp)
jmp 0x84b19
cmpl $0x0, -0xc7c(%rbp)
je 0x846ee
cmpq $0x0, -0x20(%rbp)
jne 0x846ee
movq $0x0, -0x8(%rbp)
jmp 0x84b19
cmpq $0x0, -0x20(%rbp)
jne 0x8472b
movl -0xc88(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
callq 0x4650
movq %rax, -0x20(%rbp)
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x84729
movq $0x0, -0x8(%rbp)
jmp 0x84b19
jmp 0x84752
movq -0x28(%rbp), %rax
movl (%rax), %eax
cmpl -0xc88(%rbp), %eax
jae 0x84746
movq $0x0, -0x8(%rbp)
jmp 0x84b19
movl -0xc88(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0xc8c(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc90(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xc94(%rbp)
movq $0x0, -0xca0(%rbp)
movq $0x0, -0xca8(%rbp)
movq $0x0, -0xcb0(%rbp)
cmpl $0x0, -0xc70(%rbp)
je 0x847dc
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
callq 0x4650
movq %rax, -0xcb0(%rbp)
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x847c1
jmp 0x84aff
movq -0xcb0(%rbp), %rax
movq %rax, -0xca0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xca8(%rbp)
jmp 0x847fd
movq $0x0, -0xcb0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xca0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xca8(%rbp)
leaq -0xcc0(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4250
movl $0x0, -0xcc4(%rbp)
movq $0x0, -0xcd0(%rbp)
cmpl $0x0, -0xc70(%rbp)
je 0x848f4
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
leaq -0xcc0(%rbp), %rcx
leaq -0xcc4(%rbp), %r8
callq 0x8d780
movzbl %al, %eax
movl %eax, -0xc8c(%rbp)
cmpl $0x0, -0xc8c(%rbp)
jne 0x8486b
jmp 0x84aff
movl -0xc88(%rbp), %eax
movq %rax, -0xcd0(%rbp)
movl -0xc8c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0xc8c(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq -0xcd4(%rbp), %rdx
callq 0x84b30
movl %eax, -0xc84(%rbp)
movl -0xc84(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0xc84(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0xcd4(%rbp), %eax
cmpl -0xc90(%rbp), %eax
jbe 0x848e8
jmp 0x84aff
movl -0xcd4(%rbp), %eax
movl %eax, -0xc90(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x84a54
cmpl $0x0, -0xc78(%rbp)
je 0x84947
movl -0xc90(%rbp), %eax
cmpl -0x14(%rbp), %eax
jbe 0x84917
jmp 0x84aff
movl -0xc90(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jbe 0x8492a
jmp 0x84aff
movq -0xca0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0xc90(%rbp), %eax
movl %eax, %edx
callq 0x43b0
jmp 0x84a52
cmpl $0x0, -0xc80(%rbp)
je 0x84982
movq -0xca0(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
leaq -0xc90(%rbp), %rsi
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x4540
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x8497d
jmp 0x84aff
jmp 0x84a50
cmpl $0x0, -0xc74(%rbp)
je 0x849e6
cmpl $0x1, -0xc6c(%rbp)
jne 0x849b6
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0xca0(%rbp), %rdx
movl -0xc90(%rbp), %ecx
callq 0x84fa0
movq %rax, -0xce0(%rbp)
jmp 0x849d6
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0xca0(%rbp), %rdx
movl -0xc90(%rbp), %ecx
callq 0x85300
movq %rax, -0xce0(%rbp)
movq -0xce0(%rbp), %rax
movq %rax, -0xca0(%rbp)
jmp 0x84a3f
cmpl $0x1, -0xc6c(%rbp)
jne 0x84a11
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0xca0(%rbp), %rdx
movl -0xc90(%rbp), %ecx
callq 0x855e0
movq %rax, -0xce8(%rbp)
jmp 0x84a31
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0xca0(%rbp), %rdx
movl -0xc90(%rbp), %ecx
callq 0x85790
movq %rax, -0xce8(%rbp)
movq -0xce8(%rbp), %rax
movq %rax, -0xca0(%rbp)
cmpq $0x0, -0xca0(%rbp)
jne 0x84a4e
jmp 0x84aff
jmp 0x84a50
jmp 0x84a52
jmp 0x84a5e
movl $0x0, -0xc90(%rbp)
cmpl $0x0, -0xc70(%rbp)
je 0x84ac4
cmpl $0x1, -0xcc4(%rbp)
jne 0x84a7d
movl -0xc90(%rbp), %eax
movq %rax, -0xcd0(%rbp)
movq -0xca0(%rbp), %rdi
movl -0xc90(%rbp), %eax
movl %eax, %esi
movq -0xca8(%rbp), %rdx
movq -0xcd0(%rbp), %rcx
movl -0xcc4(%rbp), %r8d
leaq -0xcc0(%rbp), %r9
callq 0x8d8b0
cmpq $0x0, %rax
jne 0x84ab5
jmp 0x84aff
movq -0xcd0(%rbp), %rax
movl %eax, -0xc94(%rbp)
jmp 0x84ad0
movl -0xc90(%rbp), %eax
movl %eax, -0xc94(%rbp)
cmpq $0x0, -0xcb0(%rbp)
je 0x84ae6
movq -0xcb0(%rbp), %rdi
callq 0x45a0
movl -0xc94(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0xca8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x84b19
movq -0x40(%rbp), %rdi
callq 0x45a0
movq -0x38(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xcf0, %rsp            # imm = 0xCF0
popq %rbp
retq
nopw %cs:(%rax,%rax)