// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/cram/cram_codecs.c
// Function: cram_huffman_encode_init
cram_codec *cram_huffman_encode_init(cram_stats *st,
                                     enum cram_encoding codec,
                                     enum cram_external_type option,
                                     void *dat,
                                     int version, varint_vec *vv) {
    int *vals = NULL, *freqs = NULL, *lens = NULL, code, len;
    int *new_vals, *new_freqs;
    int i, max_val = 0, min_val = INT_MAX, k;
    size_t nvals, vals_alloc = 0;
    cram_codec *c;
    cram_huffman_code *codes;

    c = malloc(sizeof(*c));
    if (!c)
        return NULL;
    c->codec = E_HUFFMAN;

    /* Count number of unique symbols */
    for (nvals = i = 0; i < MAX_STAT_VAL; i++) {
        if (!st->freqs[i])
            continue;
        if (nvals >= vals_alloc) {
            vals_alloc = vals_alloc ? vals_alloc*2 : 1024;
            new_vals  = realloc(vals,  vals_alloc * sizeof(int));
            if (!new_vals) goto nomem;
            vals = new_vals;
            new_freqs = realloc(freqs, vals_alloc * sizeof(int));
            if (!new_freqs) goto nomem;
            freqs = new_freqs;
        }
        vals[nvals] = i;
        freqs[nvals] = st->freqs[i];
        assert(st->freqs[i] > 0);
        if (max_val < i) max_val = i;
        if (min_val > i) min_val = i;
        nvals++;
    }
    if (st->h) {
        khint_t k;

        for (k = kh_begin(st->h); k != kh_end(st->h); k++) {
            if (!kh_exist(st->h, k))
                continue;
            if (nvals >= vals_alloc) {
                vals_alloc = vals_alloc ? vals_alloc*2 : 1024;
                new_vals  = realloc(vals,  vals_alloc * sizeof(int));
                if (!new_vals) goto nomem;
                vals = new_vals;
                new_freqs = realloc(freqs, vals_alloc * sizeof(int));
                if (!new_freqs) goto nomem;
                freqs = new_freqs;
            }
            vals[nvals]= kh_key(st->h, k);
            freqs[nvals] = kh_val(st->h, k);
            assert(freqs[nvals] > 0);
            if (max_val < i) max_val = i;
            if (min_val > i) min_val = i;
            nvals++;
        }
    }

    assert(nvals > 0);

    new_freqs = realloc(freqs, 2*nvals*sizeof(*freqs));
    if (!new_freqs) goto nomem;
    freqs = new_freqs;
    lens = calloc(2*nvals, sizeof(*lens));
    if (!lens) goto nomem;

    /* Inefficient, use pointers to form chain so we can insert and maintain
     * a sorted list? This is currently O(nvals^2) complexity.
     */
    for (;;) {
        int low1 = INT_MAX, low2 = INT_MAX;
        int ind1 = 0, ind2 = 0;
        for (i = 0; i < nvals; i++) {
            if (freqs[i] < 0)
                continue;
            if (low1 > freqs[i])
                low2 = low1, ind2 = ind1, low1 = freqs[i], ind1 = i;
            else if (low2 > freqs[i])
                low2 = freqs[i], ind2 = i;
        }
        if (low2 == INT_MAX)
            break;

        freqs[nvals] = low1 + low2;
        lens[ind1] = nvals;
        lens[ind2] = nvals;
        freqs[ind1] *= -1;
        freqs[ind2] *= -1;
        nvals++;
    }
    nvals = nvals/2+1;

    /* Assign lengths */
    for (i = 0; i < nvals; i++) {
        int code_len = 0;
        for (k = lens[i]; k; k = lens[k])
            code_len++;
        lens[i] = code_len;
        freqs[i] *= -1;
        //fprintf(stderr, "%d / %d => %d\n", vals[i], freqs[i], lens[i]);
    }


    /* Sort, need in a struct */
    if (!(codes = malloc(nvals * sizeof(*codes))))
        goto nomem;
    for (i = 0; i < nvals; i++) {
        codes[i].symbol = vals[i];
        codes[i].len = lens[i];
    }
    qsort(codes, nvals, sizeof(*codes), code_sort);

    /*
     * Generate canonical codes from lengths.
     * Sort by length.
     * Start with 0.
     * Every new code of same length is +1.
     * Every new code of new length is +1 then <<1 per extra length.
     *
     * /\
     * a/\
     * /\/\
     * bcd/\
     *    ef
     *
     * a 1  0
     * b 3  4 (0+1)<<2
     * c 3  5
     * d 3  6
     * e 4  14  (6+1)<<1
     * f 5  15
     */
    code = 0; len = codes[0].len;
    for (i = 0; i < nvals; i++) {
        while (len != codes[i].len) {
            code<<=1;
            len++;
        }
        codes[i].code = code++;

        if (codes[i].symbol >= -1 && codes[i].symbol < MAX_HUFF)
            c->u.e_huffman.val2code[codes[i].symbol+1] = i;

        //fprintf(stderr, "sym %d, code %d, len %d\n",
        //      codes[i].symbol, codes[i].code, codes[i].len);
    }

    free(lens);
    free(vals);
    free(freqs);

    c->u.e_huffman.codes = codes;
    c->u.e_huffman.nvals = nvals;
    c->u.e_huffman.option = option;

    c->free = cram_huffman_encode_free;
    if (option == E_BYTE || option == E_BYTE_ARRAY) {
        if (c->u.e_huffman.codes[0].len == 0)
            c->encode = cram_huffman_encode_char0;
        else
            c->encode = cram_huffman_encode_char;
    } else if (option == E_INT || option == E_SINT) {
        if (c->u.e_huffman.codes[0].len == 0)
            c->encode = cram_huffman_encode_int0;
        else
            c->encode = cram_huffman_encode_int;
    } else if (option == E_LONG || option == E_SLONG) {
        if (c->u.e_huffman.codes[0].len == 0)
            c->encode = cram_huffman_encode_long0;
        else
            c->encode = cram_huffman_encode_long;
    } else {
        return NULL;
    }
    c->store = cram_huffman_encode_store;
    c->flush = NULL;

    return c;

 nomem:
    hts_log_error("Out of memory");
    free(vals);
    free(freqs);
    free(lens);
    free(c);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x68(%rbp)
movl $0x7fffffff, -0x6c(%rbp) # imm = 0x7FFFFFFF
movq $0x0, -0x80(%rbp)
movl $0x880, %edi            # imm = 0x880
callq 0x4650
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0xea5b7
movq $0x0, -0x8(%rbp)
jmp 0xeae3b
movq -0x88(%rbp), %rax
movl $0x3, (%rax)
movl $0x0, -0x64(%rbp)
movq $0x0, -0x78(%rbp)
cmpl $0x400, -0x64(%rbp)     # imm = 0x400
jge 0xea70c
movq -0x10(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xea5f3
jmp 0xea6fe
movq -0x78(%rbp), %rax
cmpq -0x80(%rbp), %rax
jb 0xea683
cmpq $0x0, -0x80(%rbp)
je 0xea618
movq -0x80(%rbp), %rax
shlq %rax
movq %rax, -0xb0(%rbp)
jmp 0xea626
movl $0x400, %eax            # imm = 0x400
movq %rax, -0xb0(%rbp)
jmp 0xea626
movq -0xb0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rdi
movq -0x80(%rbp), %rsi
shlq $0x2, %rsi
callq 0x4820
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xea652
jmp 0xeadf2
movq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rdi
movq -0x80(%rbp), %rsi
shlq $0x2, %rsi
callq 0x4820
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0xea67b
jmp 0xeadf2
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x64(%rbp), %edx
movq -0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x40(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0xea6b7
jmp 0xea6d6
leaq 0xeb58(%rip), %rdi      # 0xf9216
leaq 0xea6d(%rip), %rsi      # 0xf9132
movl $0xc76, %edx            # imm = 0xC76
leaq 0xeb56(%rip), %rcx      # 0xf9227
callq 0x42e0
movl -0x68(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0xea6e4
movl -0x64(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x64(%rbp), %eax
jle 0xea6f2
movl -0x64(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xea5d3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1000(%rax)
je 0xea8be
movl $0x0, -0x94(%rbp)
movl -0x94(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x1000(%rcx), %rcx
cmpl (%rcx), %eax
je 0xea8bc
movq -0x10(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x10(%rax), %rax
movl -0x94(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x94(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xea778
jmp 0xea8a8
movq -0x78(%rbp), %rax
cmpq -0x80(%rbp), %rax
jb 0xea808
cmpq $0x0, -0x80(%rbp)
je 0xea79d
movq -0x80(%rbp), %rax
shlq %rax
movq %rax, -0xb8(%rbp)
jmp 0xea7ab
movl $0x400, %eax            # imm = 0x400
movq %rax, -0xb8(%rbp)
jmp 0xea7ab
movq -0xb8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rdi
movq -0x80(%rbp), %rsi
shlq $0x2, %rsi
callq 0x4820
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xea7d7
jmp 0xeadf2
movq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rdi
movq -0x80(%rbp), %rsi
shlq $0x2, %rsi
callq 0x4820
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0xea800
jmp 0xeadf2
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x18(%rax), %rax
movl -0x94(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
movq -0x38(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0x1000(%rax), %rax
movq 0x20(%rax), %rax
movl -0x94(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x40(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movq -0x78(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0xea861
jmp 0xea880
leaq 0xea3a(%rip), %rdi      # 0xf92a2
leaq 0xe8c3(%rip), %rsi      # 0xf9132
movl $0xc8c, %edx            # imm = 0xC8C
leaq 0xe9ac(%rip), %rcx      # 0xf9227
callq 0x42e0
movl -0x68(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0xea88e
movl -0x64(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x64(%rbp), %eax
jle 0xea89c
movl -0x64(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0xea728
jmp 0xea8be
cmpq $0x0, -0x78(%rbp)
jbe 0xea8c7
jmp 0xea8e6
leaq 0xe9e5(%rip), %rdi      # 0xf92b3
leaq 0xe85d(%rip), %rsi      # 0xf9132
movl $0xc93, %edx            # imm = 0xC93
leaq 0xe946(%rip), %rcx      # 0xf9227
callq 0x42e0
movq -0x40(%rbp), %rdi
movq -0x78(%rbp), %rsi
shlq %rsi
shlq $0x2, %rsi
callq 0x4820
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0xea90a
jmp 0xeadf2
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x78(%rbp), %rdi
shlq %rdi
movl $0x4, %esi
callq 0x42f0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xea933
jmp 0xeadf2
jmp 0xea935
movl $0x7fffffff, -0x98(%rbp) # imm = 0x7FFFFFFF
movl $0x7fffffff, -0x9c(%rbp) # imm = 0x7FFFFFFF
movl $0x0, -0xa0(%rbp)
movl $0x0, -0xa4(%rbp)
movl $0x0, -0x64(%rbp)
movslq -0x64(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0xeaa08
movq -0x40(%rbp), %rax
movslq -0x64(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jge 0xea982
jmp 0xea9fa
movl -0x98(%rbp), %eax
movq -0x40(%rbp), %rcx
movslq -0x64(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0xea9c9
movl -0x98(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq -0x40(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x98(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0xa0(%rbp)
jmp 0xea9f8
movl -0x9c(%rbp), %eax
movq -0x40(%rbp), %rcx
movslq -0x64(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jle 0xea9f6
movq -0x40(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x9c(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0xa4(%rbp)
jmp 0xea9f8
jmp 0xea9fa
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xea964
cmpl $0x7fffffff, -0x9c(%rbp) # imm = 0x7FFFFFFF
jne 0xeaa16
jmp 0xeaa8a
movl -0x98(%rbp), %edx
addl -0x9c(%rbp), %edx
movq -0x40(%rbp), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x78(%rbp), %rax
movl %eax, %edx
movq -0x48(%rbp), %rax
movslq -0xa0(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x78(%rbp), %rax
movl %eax, %edx
movq -0x48(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movslq -0xa0(%rbp), %rcx
imull $-0x1, (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movslq -0xa4(%rbp), %rcx
imull $-0x1, (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0xea935
movq -0x78(%rbp), %rax
shrq %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x64(%rbp)
movslq -0x64(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0xeab12
movl $0x0, -0xa8(%rbp)
movq -0x48(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x70(%rbp)
cmpl $0x0, -0x70(%rbp)
je 0xeaae7
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
movq -0x48(%rbp), %rax
movslq -0x70(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x70(%rbp)
jmp 0xeaac2
movl -0xa8(%rbp), %edx
movq -0x48(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
movslq -0x64(%rbp), %rcx
imull $-0x1, (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xeaaa0
imulq $0x18, -0x78(%rbp), %rdi
callq 0x4650
movq %rax, -0x90(%rbp)
cmpq $0x0, %rax
jne 0xeab2e
jmp 0xeadf2
movl $0x0, -0x64(%rbp)
movslq -0x64(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0xeab8b
movq -0x38(%rbp), %rax
movslq -0x64(%rbp), %rcx
movslq (%rax,%rcx,4), %rcx
movq -0x90(%rbp), %rax
movslq -0x64(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x90(%rbp), %rax
movslq -0x64(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xeab35
movq -0x90(%rbp), %rdi
movq -0x78(%rbp), %rsi
movl $0x18, %edx
leaq -0x1082(%rip), %rcx     # 0xe9b20
callq 0x4990
movl $0x0, -0x4c(%rbp)
movq -0x90(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x50(%rbp)
movl $0x0, -0x64(%rbp)
movslq -0x64(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0xeac85
jmp 0xeabd2
movl -0x50(%rbp), %eax
movq -0x90(%rbp), %rcx
movslq -0x64(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
je 0xeabff
movl -0x4c(%rbp), %eax
shll %eax
movl %eax, -0x4c(%rbp)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0xeabd2
movl -0x4c(%rbp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x90(%rbp), %rax
movslq -0x64(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0x90(%rbp), %rax
movslq -0x64(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $-0x1, (%rax)
jl 0xeac75
movq -0x90(%rbp), %rax
movslq -0x64(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x80, (%rax)
jge 0xeac75
movl -0x64(%rbp), %edx
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rcx
movslq -0x64(%rbp), %rsi
imulq $0x18, %rsi, %rsi
addq %rsi, %rcx
movq (%rcx), %rcx
movl %edx, 0x70(%rax,%rcx,4)
jmp 0xeac77
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xeabc2
movq -0x48(%rbp), %rdi
callq 0x45a0
movq -0x38(%rbp), %rdi
callq 0x45a0
movq -0x40(%rbp), %rdi
callq 0x45a0
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x68(%rax)
movl -0x18(%rbp), %ecx
movq -0x88(%rbp), %rax
movl %ecx, 0x270(%rax)
movq -0x88(%rbp), %rax
leaq -0xbc0(%rip), %rcx      # 0xea120
movq %rcx, 0x20(%rax)
cmpl $0x3, -0x18(%rbp)
je 0xeacf0
cmpl $0x4, -0x18(%rbp)
jne 0xead2c
movq -0x88(%rbp), %rax
movq 0x60(%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0xead15
movq -0x88(%rbp), %rax
leaq -0x115f(%rip), %rcx     # 0xe9bb0
movq %rcx, 0x30(%rax)
jmp 0xead27
movq -0x88(%rbp), %rax
leaq -0x1153(%rip), %rcx     # 0xe9bd0
movq %rcx, 0x30(%rax)
jmp 0xeadc4
cmpl $0x1, -0x18(%rbp)
je 0xead38
cmpl $0x6, -0x18(%rbp)
jne 0xead71
movq -0x88(%rbp), %rax
movq 0x60(%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0xead5d
movq -0x88(%rbp), %rax
leaq -0xfd7(%rip), %rcx      # 0xe9d80
movq %rcx, 0x30(%rax)
jmp 0xead6f
movq -0x88(%rbp), %rax
leaq -0xfcb(%rip), %rcx      # 0xe9da0
movq %rcx, 0x30(%rax)
jmp 0xeadc2
cmpl $0x2, -0x18(%rbp)
je 0xead7d
cmpl $0x7, -0x18(%rbp)
jne 0xeadb6
movq -0x88(%rbp), %rax
movq 0x60(%rax), %rax
cmpl $0x0, 0x10(%rax)
jne 0xeada2
movq -0x88(%rbp), %rax
leaq -0xe4c(%rip), %rcx      # 0xe9f50
movq %rcx, 0x30(%rax)
jmp 0xeadb4
movq -0x88(%rbp), %rax
leaq -0xe40(%rip), %rcx      # 0xe9f70
movq %rcx, 0x30(%rax)
jmp 0xeadc0
movq $0x0, -0x8(%rbp)
jmp 0xeae3b
jmp 0xeadc2
jmp 0xeadc4
movq -0x88(%rbp), %rax
leaq -0xc72(%rip), %rcx      # 0xea160
movq %rcx, 0x38(%rax)
movq -0x88(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x88(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xeae3b
movl $0x1, %edi
leaq 0xe4bf(%rip), %rsi      # 0xf92bd
leaq 0x6dab(%rip), %rdx      # 0xf1bb0
movb $0x0, %al
callq 0x1b030
movq -0x38(%rbp), %rdi
callq 0x45a0
movq -0x40(%rbp), %rdi
callq 0x45a0
movq -0x48(%rbp), %rdi
callq 0x45a0
movq -0x88(%rbp), %rdi
callq 0x45a0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)