// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/sam.c
// Function: sam_parse1
int sam_parse1(kstring_t *s, bam_hdr_t *h, bam1_t *b)
{
#define _read_token(_p) (_p); for (; *(_p) && *(_p) != '\t'; ++(_p)); if (*(_p) != '\t') goto err_ret; *(_p)++ = 0
#define _read_token_aux(_p) (_p); for (; *(_p) && *(_p) != '\t'; ++(_p)); *(_p)++ = 0 // this is different in that it does not test *(_p)=='\t'
#define _get_mem(type_t, _x, _s, _l) ks_resize((_s), (_s)->l + (_l)); *(_x) = (type_t*)((_s)->s + (_s)->l); (_s)->l += (_l)
#define _parse_err(cond, msg) do { if ((cond) && hts_verbose >= 1) { fprintf(stderr, "[E::%s] " msg "\n", __func__); goto err_ret; } } while (0)
#define _parse_warn(cond, msg) if ((cond) && hts_verbose >= 2) fprintf(stderr, "[W::%s] " msg "\n", __func__)

    uint8_t *t;
    char *p = s->s, *q;
    int i;
    kstring_t str;
    bam1_core_t *c = &b->core;

    str.l = b->l_data = 0;
    str.s = (char*)b->data; str.m = b->m_data;
    memset(c, 0, 32);
    if (h->cigar_tab == 0) {
        h->cigar_tab = (int8_t*) malloc(128);
        for (i = 0; i < 128; ++i)
            h->cigar_tab[i] = -1;
        for (i = 0; BAM_CIGAR_STR[i]; ++i)
            h->cigar_tab[(int)BAM_CIGAR_STR[i]] = i;
    }
    // qname
    q = _read_token(p);
    _parse_warn(p - q <= 1, "empty query name");
    _parse_err(p - q > 255, "query name too long");
    kputsn_(q, p - q, &str);
    c->l_qname = p - q;
    // flag
    c->flag = strtol(p, &p, 0);
    if (*p++ != '\t') goto err_ret; // malformated flag
    // chr
    q = _read_token(p);
    if (strcmp(q, "*")) {
        _parse_err(h->n_targets == 0, "missing SAM header");
        c->tid = bam_name2id(h, q);
        _parse_warn(c->tid < 0, "urecognized reference name; treated as unmapped");
    } else c->tid = -1;
    // pos
    c->pos = strtol(p, &p, 10) - 1;
    if (*p++ != '\t') goto err_ret;
    if (c->pos < 0 && c->tid >= 0) {
        _parse_warn(1, "mapped query cannot have zero coordinate; treated as unmapped");
        c->tid = -1;
    }
    if (c->tid < 0) c->flag |= BAM_FUNMAP;
    // mapq
    c->qual = strtol(p, &p, 10);
    if (*p++ != '\t') goto err_ret;
    // cigar
    if (*p != '*') {
        uint32_t *cigar;
        size_t n_cigar = 0;
        for (q = p; *p && *p != '\t'; ++p)
            if (!isdigit(*p)) ++n_cigar;
        if (*p++ != '\t') goto err_ret;
        _parse_err(n_cigar == 0, "no CIGAR operations");
        _parse_err(n_cigar >= 65536, "too many CIGAR operations");
        c->n_cigar = n_cigar;
        _get_mem(uint32_t, &cigar, &str, c->n_cigar * sizeof(uint32_t));
        for (i = 0; i < c->n_cigar; ++i, ++q) {
            int op;
            cigar[i] = strtol(q, &q, 10)<<BAM_CIGAR_SHIFT;
            op = (uint8_t)*q >= 128? -1 : h->cigar_tab[(int)*q];
            _parse_err(op < 0, "unrecognized CIGAR operator");
            cigar[i] |= op;
        }
        // can't use bam_endpos() directly as some fields not yet set up
        i = (!(c->flag&BAM_FUNMAP))? bam_cigar2rlen(c->n_cigar, cigar) : 1;
    } else {
        _parse_warn(!(c->flag&BAM_FUNMAP), "mapped query must have a CIGAR; treated as unmapped");
        c->flag |= BAM_FUNMAP;
        q = _read_token(p);
        i = 1;
    }
    c->bin = hts_reg2bin(c->pos, c->pos + i, 14, 5);
    // mate chr
    q = _read_token(p);
    if (strcmp(q, "=") == 0) c->mtid = c->tid;
    else if (strcmp(q, "*") == 0) c->mtid = -1;
    else c->mtid = bam_name2id(h, q);
    // mpos
    c->mpos = strtol(p, &p, 10) - 1;
    if (*p++ != '\t') goto err_ret;
    if (c->mpos < 0 && c->mtid >= 0) {
        _parse_warn(1, "mapped mate cannot have zero coordinate; treated as unmapped");
        c->mtid = -1;
    }
    // tlen
    c->isize = strtol(p, &p, 10);
    if (*p++ != '\t') goto err_ret;
    // seq
    q = _read_token(p);
    if (strcmp(q, "*")) {
        c->l_qseq = p - q - 1;
        i = bam_cigar2qlen(c->n_cigar, (uint32_t*)(str.s + c->l_qname));
        _parse_err(c->n_cigar && i != c->l_qseq, "CIGAR and query sequence are of different length");
        i = (c->l_qseq + 1) >> 1;
        _get_mem(uint8_t, &t, &str, i);
        memset(t, 0, i);
        for (i = 0; i < c->l_qseq; ++i)
            t[i>>1] |= seq_nt16_table[(int)q[i]] << ((~i&1)<<2);
    } else c->l_qseq = 0;
    // qual
    q = _read_token_aux(p);
    _get_mem(uint8_t, &t, &str, c->l_qseq);
    if (strcmp(q, "*")) {
        _parse_err(p - q - 1 != c->l_qseq, "SEQ and QUAL are of different length");
        for (i = 0; i < c->l_qseq; ++i) t[i] = q[i] - 33;
    } else memset(t, 0xff, c->l_qseq);
    // aux
    // Note that (like the bam1_core_t fields) this aux data in b->data is
    // stored in host endianness; so there is no byte swapping needed here.
    while (p < s->s + s->l) {
        uint8_t type;
        q = _read_token_aux(p); // FIXME: can be accelerated for long 'B' arrays
        _parse_err(p - q - 1 < 6, "incomplete aux field");
        kputsn_(q, 2, &str);
        q += 3; type = *q++; ++q; // q points to value
        if (type == 'A' || type == 'a' || type == 'c' || type == 'C') {
            kputc_('A', &str);
            kputc_(*q, &str);
        } else if (type == 'i' || type == 'I') {
            if (*q == '-') {
                long x = strtol(q, &q, 10);
                if (x >= INT8_MIN) {
                    kputc_('c', &str); kputc_(x, &str);
                } else if (x >= INT16_MIN) {
                    int16_t y = x;
                    kputc_('s', &str); kputsn_((char*)&y, 2, &str);
                } else {
                    int32_t y = x;
                    kputc_('i', &str); kputsn_(&y, 4, &str);
                }
            } else {
                unsigned long x = strtoul(q, &q, 10);
                if (x <= UINT8_MAX) {
                    kputc_('C', &str); kputc_(x, &str);
                } else if (x <= UINT16_MAX) {
                    uint16_t y = x;
                    kputc_('S', &str); kputsn_(&y, 2, &str);
                } else {
                    uint32_t y = x;
                    kputc_('I', &str); kputsn_(&y, 4, &str);
                }
            }
        } else if (type == 'f') {
            float x;
            x = strtod(q, &q);
            kputc_('f', &str); kputsn_(&x, 4, &str);
        } else if (type == 'd') {
            double x;
            x = strtod(q, &q);
            kputc_('d', &str); kputsn_(&x, 8, &str);
        } else if (type == 'Z' || type == 'H') {
            kputc_(type, &str);kputsn_(q, p - q, &str); // note that this include the trailing NULL
        } else if (type == 'B') {
            int32_t n;
            char *r;
            _parse_err(p - q - 1 < 3, "incomplete B-typed aux field");
            type = *q++; // q points to the first ',' following the typing byte
            for (r = q, n = 0; *r; ++r)
                if (*r == ',') ++n;
            kputc_('B', &str); kputc_(type, &str); kputsn_(&n, 4, &str);
            // FIXME: to evaluate which is faster: a) aligned array and then memmove(); b) unaligned array; c) kputsn_()
            if (type == 'c')      while (q + 1 < p) { int8_t   x = strtol(q + 1, &q, 0); kputc_(x, &str); }
            else if (type == 'C') while (q + 1 < p) { uint8_t  x = strtoul(q + 1, &q, 0); kputc_(x, &str); }
            else if (type == 's') while (q + 1 < p) { int16_t  x = strtol(q + 1, &q, 0); kputsn_(&x, 2, &str); }
            else if (type == 'S') while (q + 1 < p) { uint16_t x = strtoul(q + 1, &q, 0); kputsn_(&x, 2, &str); }
            else if (type == 'i') while (q + 1 < p) { int32_t  x = strtol(q + 1, &q, 0); kputsn_(&x, 4, &str); }
            else if (type == 'I') while (q + 1 < p) { uint32_t x = strtoul(q + 1, &q, 0); kputsn_(&x, 4, &str); }
            else if (type == 'f') while (q + 1 < p) { float    x = strtod(q + 1, &q);    kputsn_(&x, 4, &str); }
            else _parse_err(1, "unrecognized type");
        } else _parse_err(1, "unrecognized type");
    }
    b->data = (uint8_t*)str.s; b->l_data = str.l; b->m_data = str.m;
    return 0;

#undef _parse_warn
#undef _parse_err
#undef _get_mem
#undef _read_token_aux
#undef _read_token
err_ret:
    b->data = (uint8_t*)str.s; b->l_data = str.l; b->m_data = str.m;
    return -2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, 0x30(%rsp)
movq 0x10(%rdi), %r13
movl $0x0, 0x20(%rdx)
movq $0x0, 0x40(%rsp)
movq 0x28(%rdx), %rax
movq %rax, 0x38(%rsp)
movq %rax, 0x50(%rsp)
movslq 0x24(%rdx), %rbx
movq %rbx, 0x48(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
cmpq $0x0, 0x18(%rsi)
jne 0x6e94b
movl $0x80, %edi
callq 0x69d0
movq %rax, 0x18(%r12)
xorl %eax, %eax
movq 0x18(%r12), %rcx
movb $-0x1, (%rcx,%rax)
incq %rax
cmpq $0x80, %rax
jne 0x6e918
xorl %eax, %eax
leaq 0x2bd97(%rip), %rcx     # 0x9a6cc
movsbq (%rax,%rcx), %rdx
movq 0x18(%r12), %rsi
movb %al, (%rsi,%rdx)
incq %rax
cmpq $0xa, %rax
jne 0x6e935
movq %r14, 0x8(%rsp)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %r13, (%rsp)
leaq 0x1(%r13), %r14
movl $0x1000000, %r15d       # imm = 0x1000000
movl $0x1, %eax
movq %rcx, %rbp
movzbl -0x1(%r14), %edx
testl %edx, %edx
je 0x6f0ca
cmpl $0x9, %edx
je 0x6e994
incq %r14
addq %rcx, %rbp
addq $0x1000000, %r15        # imm = 0x1000000
incq %rax
jmp 0x6e970
movq %r14, 0x20(%rsp)
movb $0x0, -0x1(%r14)
cmpq $0x2, %rax
setl %dl
leaq 0x5241c(%rip), %rcx     # 0xc0dc8
movl (%rcx), %ecx
cmpl $0x2, %ecx
setge %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x6eb04
cmpq $0x100, %rax            # imm = 0x100
setge %al
testl %ecx, %ecx
setg %cl
andb %al, %cl
cmpb $0x1, %cl
je 0x6eb0e
sarq $0x20, %rbp
cmpq %rbx, %rbp
jbe 0x6ea3e
leaq -0x1(%rbp), %rax
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x48(%rsp)
movq 0x38(%rsp), %rdi
callq 0x6c80
testq %rax, %rax
je 0x6eafd
movq %rax, 0x50(%rsp)
movq %rax, %rdi
jmp 0x6ea43
movq 0x38(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movq %r13, %rsi
movq %rbp, %rdx
callq 0x6570
movq %rbp, 0x40(%rsp)
shrl $0x18, %r15d
movq 0x8(%rsp), %rbx
movb %r15b, 0xb(%rbx)
leaq 0x20(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x6a60
movw %ax, 0xc(%rbx)
movq (%r13), %rax
cmpb $0x9, (%rax)
jne 0x6f0ca
leaq 0x1(%rax), %rsi
movq %rsi, (%rsp)
leaq 0x2(%rax), %r14
movzbl -0x1(%r14), %ecx
testl %ecx, %ecx
je 0x6f0ca
cmpl $0x9, %ecx
je 0x6eaab
incq %r14
jmp 0x6ea94
movq %r14, 0x20(%rsp)
movb $0x0, -0x1(%r14)
cmpb $0x2a, (%rsi)
jne 0x6eac0
cmpb $0x0, 0x2(%rax)
je 0x6eb18
cmpl $0x0, (%r12)
movq 0x8(%rsp), %rbx
jne 0x6eadc
leaq 0x522f5(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6eec3
movq %r12, %rdi
callq 0x6d242
movl %eax, (%rbx)
testl %eax, %eax
jns 0x6eb23
leaq 0x522d7(%rip), %rax     # 0xc0dc8
cmpl $0x2, (%rax)
jl 0x6eb23
callq 0x7e1e
jmp 0x6eb23
xorl %ebp, %ebp
jmp 0x6ea58
callq 0x7dff
jmp 0x6e9db
callq 0x7de0
jmp 0x6f0ca
movq 0x8(%rsp), %rbx
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
leaq 0x20(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x6a60
decl %eax
movl %eax, 0x4(%rbx)
movq (%r13), %rcx
leaq 0x1(%rcx), %r14
movq %r14, (%r13)
cmpb $0x9, (%rcx)
jne 0x6f0ca
movq 0x8(%rsp), %rbx
movl (%rbx), %ecx
testl %eax, %eax
js 0x6eb63
testl %ecx, %ecx
jns 0x6eb81
jmp 0x6eb7d
testl %ecx, %ecx
js 0x6eb7d
leaq 0x5225a(%rip), %rax     # 0xc0dc8
cmpl $0x2, (%rax)
jge 0x6f0ad
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
orb $0x4, 0xc(%rbx)
leaq 0x20(%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x6a60
movq 0x8(%rbx), %rcx
movzbl %al, %eax
shll $0x10, %eax
movq %rcx, %rdx
andq $-0xff0001, %rdx        # imm = 0xFF00FFFF
orq %rax, %rdx
movq %rdx, 0x28(%rsp)
movq %rdx, 0x8(%rbx)
movq (%r13), %r13
cmpb $0x9, (%r13)
jne 0x6f0ca
leaq 0x1(%r13), %r14
movb (%r14), %bl
cmpb $0x2a, %bl
jne 0x6ec28
movabsq $0x400000000, %rbx      # imm = 0x400000000
btq $0x22, %rcx
jb 0x6edd8
leaq 0x521db(%rip), %rax     # 0xc0dc8
cmpl $0x2, (%rax)
movq 0x8(%rsp), %r14
movq 0x28(%rsp), %rax
jl 0x6ede2
movq 0x503d1(%rip), %rax     # 0xbefd8
movq (%rax), %rdi
leaq 0x2bc09(%rip), %rsi     # 0x9a81a
leaq 0x2bad9(%rip), %rdx     # 0x9a6f1
xorl %eax, %eax
callq 0x6a90
movq 0x8(%r14), %rax
jmp 0x6ede2
movq %r14, (%rsp)
addq $0x2, %r13
xorl %r15d, %r15d
testb %bl, %bl
je 0x6ec60
movzbl %bl, %eax
cmpl $0x9, %eax
je 0x6ec60
callq 0x6790
movq (%rax), %rax
movsbq %bl, %rcx
movb 0x1(%rax,%rcx,2), %al
andb $0x8, %al
cmpb $0x1, %al
adcq $0x0, %r15
movb (%r13), %bl
incq %r13
jmp 0x6ec33
movq %r13, 0x20(%rsp)
cmpb $0x9, %bl
jne 0x6f0ca
testq %r15, %r15
sete %cl
leaq 0x5214d(%rip), %rax     # 0xc0dc8
movl (%rax), %eax
testl %eax, %eax
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
je 0x6f0b7
testl %eax, %eax
setg %al
cmpq $0x10000, %r15          # imm = 0x10000
setae %cl
andb %al, %cl
cmpb $0x1, %cl
je 0x6f0be
movabsq $0x1000000000000, %rcx  # imm = 0x1000000000000
movq %r15, %rax
shlq $0x30, %rax
decq %rcx
movq 0x28(%rsp), %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq 0x8(%rsp), %rax
movq %rdx, 0x8(%rax)
movzwl %r15w, %eax
leaq (,%rax,4), %rsi
addq %rbp, %rsi
leaq 0x40(%rsp), %rbp
movq %rbp, %rdi
callq 0x6f806
movq (%rbp), %rdx
movq 0x10(%rbp), %rax
movq %rax, 0x38(%rsp)
leaq (%rax,%rdx), %rbx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq %rcx, %rax
shrq $0x30, %rax
leaq (%rdx,%rax,4), %rdx
movq %rdx, (%rbp)
je 0x6ed89
xorl %r15d, %r15d
movq %rsp, %rbp
movq %r14, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x6a60
shll $0x4, %eax
movl %eax, (%rbx,%r15,4)
movq (%rsp), %r14
movsbq (%r14), %rcx
testq %rcx, %rcx
js 0x6ed4b
movq 0x18(%r12), %rdx
movsbl (%rdx,%rcx), %ecx
jmp 0x6ed50
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jns 0x6ed64
leaq 0x5206d(%rip), %rdx     # 0xc0dc8
cmpl $0x0, (%rdx)
jg 0x6f0c5
orl %eax, %ecx
movl %ecx, (%rbx,%r15,4)
incq %r15
incq %r14
movq %r14, (%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq %rcx, %rax
shrq $0x30, %rax
cmpq %rax, %r15
jb 0x6ed1c
movl $0x1, %edx
btq $0x22, %rcx
jb 0x6ee13
xorl %edx, %edx
movabsq $0x1000000000000, %rsi  # imm = 0x1000000000000
cmpq %rsi, %rcx
movq 0x8(%rsp), %r14
jb 0x6ee18
xorl %esi, %esi
xorl %edx, %edx
movl (%rbx,%rsi,4), %edi
leal (%rdi,%rdi), %ecx
movl $0x3c1a7, %r8d          # imm = 0x3C1A7
shrl %cl, %r8d
shll $0x1e, %r8d
sarl $0x1f, %r8d
shrl $0x4, %edi
andl %r8d, %edi
addl %edi, %edx
incq %rsi
cmpq %rsi, %rax
jne 0x6edaf
jmp 0x6ee18
movq 0x8(%rsp), %r14
movq 0x28(%rsp), %rax
orq %rbx, %rax
movq %rax, 0x8(%r14)
addq $0x2, %r13
movzbl -0x1(%r13), %eax
testl %eax, %eax
je 0x6f0ca
cmpl $0x9, %eax
je 0x6ee04
incq %r13
jmp 0x6eded
movq %r13, 0x20(%rsp)
movb $0x0, -0x1(%r13)
movl $0x1, %edx
movq 0x8(%rsp), %r14
movslq 0x4(%r14), %r8
movslq %edx, %rax
leaq (%r8,%rax), %r9
decq %r9
movl $0x1249, %esi           # imm = 0x1249
movl $0xe, %eax
movl $0x6, %r10d
movl $0xc, %edx
xorl %edi, %edi
movq %r8, %r11
movl %eax, %ecx
sarq %cl, %r11
movq %r9, %rbx
sarq %cl, %rbx
cmpq %rbx, %r11
je 0x6ee70
addq $0x3, %rax
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %r11d
addl %r11d, %esi
decl %r10d
addl $-0x3, %edx
cmpl $0x1, %r10d
ja 0x6ee3d
jmp 0x6ee76
addl %r11d, %esi
movzwl %si, %edi
movw %di, 0x8(%r14)
movq %r13, (%rsp)
leaq 0x1(%r13), %r14
movzbl -0x1(%r14), %eax
testl %eax, %eax
je 0x6f0ca
cmpl $0x9, %eax
je 0x6ee9a
incq %r14
jmp 0x6ee83
movq %r14, 0x20(%rsp)
movb $0x0, -0x1(%r14)
movzbl (%r13), %eax
cmpl $0x2a, %eax
je 0x6eecd
cmpl $0x3d, %eax
movq 0x8(%rsp), %rbx
jne 0x6eedd
cmpb $0x0, 0x1(%r13)
jne 0x6eedd
movl (%rbx), %eax
jmp 0x6eee8
callq 0x7e3d
jmp 0x6f0ca
cmpb $0x0, 0x1(%r13)
movq 0x8(%rsp), %rbx
je 0x6f0a3
movq %r12, %rdi
movq %r13, %rsi
callq 0x6d242
movl %eax, 0x14(%rbx)
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x6a60
decl %eax
movl %eax, 0x18(%rbx)
movq (%r12), %rcx
leaq 0x1(%rcx), %r14
movq %r14, (%r12)
cmpb $0x9, (%rcx)
jne 0x6f0ca
testl %eax, %eax
movq 0x8(%rsp), %rbx
jns 0x6ef40
cmpl $0x0, 0x14(%rbx)
js 0x6ef40
leaq 0x51e98(%rip), %rax     # 0xc0dc8
cmpl $0x2, (%rax)
jge 0x6f71e
movl $0xffffffff, 0x14(%rbx) # imm = 0xFFFFFFFF
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x6a60
movl %eax, 0x1c(%rbx)
movq (%r12), %rbp
cmpb $0x9, (%rbp)
jne 0x6f0ca
xorl %r12d, %r12d
movzbl 0x1(%rbp,%r12), %eax
testl %eax, %eax
je 0x6f0ca
cmpl $0x9, %eax
je 0x6ef81
incq %r12
jmp 0x6ef69
leaq (%r12,%rbp), %r13
addq $0x2, %r13
movq %r13, 0x20(%rsp)
movb $0x0, -0x1(%r13)
cmpb $0x2a, 0x1(%rbp)
movq 0x38(%rsp), %r11
jne 0x6efa8
cmpb $0x0, 0x2(%rbp)
je 0x6f0fb
movq 0x8(%rsp), %rax
movl %r12d, 0x10(%rax)
movq 0x8(%rax), %rax
movq %rax, %rcx
shrq $0x30, %rcx
je 0x6f022
movabsq $0x1000000000000, %rdx  # imm = 0x1000000000000
movl %eax, %esi
shrl $0x18, %esi
addq %rsi, %r11
xorl %r8d, %r8d
movl $0x3c1a7, %r9d          # imm = 0x3C1A7
xorl %r10d, %r10d
movl %r10d, %edi
movl (%r11,%r8,4), %esi
leal (%rsi,%rsi), %r10d
btl %r10d, %r9d
movl $0x0, %r10d
sbbl %r10d, %r10d
shrl $0x4, %esi
andl %r10d, %esi
leal (%rsi,%rdi), %r10d
incq %r8
cmpq %r8, %rcx
jne 0x6efdc
cmpq %rdx, %rax
jb 0x6f022
addl %edi, %esi
cmpl %r12d, %esi
je 0x6f022
leaq 0x51daf(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6f73c
leal 0x1(%r12), %eax
sarl %eax
movslq %eax, %r15
leaq 0x40(%rsp), %rbx
movq (%rbx), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x6f806
movq (%rbx), %rax
movq 0x10(%rbx), %r14
addq %rax, %r14
addq %r15, %rax
movq %rax, (%rbx)
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x63b0
movq 0x8(%rsp), %r8
cmpl $0x0, 0x10(%r8)
jle 0x6f107
xorl %eax, %eax
leaq 0x2923b(%rip), %rdx     # 0x982b0
xorl %esi, %esi
movsbq 0x1(%rbp,%rsi), %rcx
movb (%rdx,%rcx), %dil
movl %eax, %ecx
notb %cl
andb $0x4, %cl
shlb %cl, %dil
movl %esi, %ecx
shrl %ecx
orb %dil, (%r14,%rcx)
incq %rsi
movslq 0x10(%r8), %rcx
addb $0x4, %al
cmpq %rcx, %rsi
jl 0x6f077
jmp 0x6f107
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6eee8
callq 0x7e5c
jmp 0x6eb77
callq 0x7eb9
jmp 0x6f0ca
callq 0x7e9a
jmp 0x6f0ca
callq 0x7e7b
movq 0x50(%rsp), %rax
movq 0x8(%rsp), %rdx
movq %rax, 0x28(%rdx)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq 0x40(%rsp), %rbx
movl %ebx, 0x20(%rdx)
movl 0x48(%rsp), %ecx
movl %ecx, 0x24(%rdx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
movl $0x0, 0x10(%rax)
leaq (%r12,%rbp), %rax
addq $0x3, %rax
movq %r13, (%rsp)
xorl %r15d, %r15d
movzbl -0x1(%rax), %ecx
testl %ecx, %ecx
je 0x6f12b
cmpl $0x9, %ecx
je 0x6f12b
incq %rax
incq %r15
jmp 0x6f116
movq %rax, 0x20(%rsp)
movb $0x0, -0x1(%rax)
movq 0x8(%rsp), %r14
movslq 0x10(%r14), %rsi
leaq 0x40(%rsp), %rbx
addq (%rbx), %rsi
movq %rbx, %rdi
callq 0x6f806
movq %rbx, %rax
movq (%rbx), %rbx
movq 0x10(%rax), %rsi
leaq (%rsi,%rbx), %rdi
movslq 0x10(%r14), %rdx
addq %rdx, %rbx
movq %rbx, (%rax)
cmpb $0x2a, (%r13)
jne 0x6f174
cmpb $0x0, 0x3(%rbp,%r12)
je 0x6f1af
cmpq %r15, %rdx
je 0x6f189
leaq 0x51c48(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6f728
testl %edx, %edx
movq 0x8(%rsp), %rdx
jle 0x6f1c4
xorl %eax, %eax
movb (%r13), %cl
addb $-0x21, %cl
movb %cl, (%rdi,%rax)
incq %rax
movslq 0x10(%rdx), %rcx
incq %r13
cmpq %rcx, %rax
jl 0x6f194
jmp 0x6f1c4
movq %rsi, %r14
movl $0xff, %esi
callq 0x63b0
movq %r14, %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %r13
movq 0x30(%rsp), %rcx
movq 0x10(%rcx), %rax
addq (%rcx), %rax
cmpq %rax, %r13
jae 0x6f713
leaq 0x40(%rsp), %r12
leaq 0x2b739(%rip), %rax     # 0x9a923
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rbx
movq %r13, %r14
xorl %r15d, %r15d
movzbl (%r14,%r15), %eax
testl %eax, %eax
je 0x6f20d
cmpl $0x9, %eax
je 0x6f20d
incq %r15
jmp 0x6f1fa
leaq (%r14,%r15), %r13
incq %r13
movq %r13, 0x20(%rsp)
movb $0x0, -0x1(%r13)
cmpq $0x5, %r15
jg 0x6f234
leaq 0x51b9d(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6f732
movq %r14, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x6f77e
movzbl 0x3(%r14), %edi
leaq 0x5(%r14), %rbp
movq %rbp, (%rsp)
leal -0x41(%rdi), %eax
cmpl $0x22, %eax
ja 0x6f297
movabsq $0x500000005, %rcx      # imm = 0x500000005
btq %rax, %rcx
jae 0x6f297
movl $0x41, %edi
movq %r12, %rsi
callq 0x6f85f
movsbl (%rbp), %edi
movq %r12, %rsi
callq 0x6f85f
movq 0x10(%rbx), %rax
addq (%rbx), %rax
cmpq %rax, %r13
jb 0x6f1f4
jmp 0x6f704
movl %edi, %eax
andb $-0x21, %al
cmpb $0x49, %al
jne 0x6f2c9
cmpb $0x2d, (%rbp)
movq %rsp, %rsi
movq %rbp, %rdi
movl $0xa, %edx
jne 0x6f304
callq 0x6a60
movq %rax, %r14
cmpq $-0x80, %rax
jl 0x6f352
movl $0x63, %edi
jmp 0x6f319
cmpl $0x59, %edi
movq %rsp, %rsi
jle 0x6f329
cmpl $0x5a, %edi
je 0x6f33b
cmpl $0x64, %edi
je 0x6f39b
cmpl $0x66, %edi
jne 0x6f41b
movq %rbp, %rdi
callq 0x6500
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x18(%rsp)
movl $0x66, %edi
jmp 0x6f4eb
callq 0x6200
movq %rax, %r14
cmpq $0xff, %rax
ja 0x6f36c
movl $0x43, %edi
movq %r12, %rsi
callq 0x6f85f
movl %r14d, %edi
jmp 0x6f27a
cmpl $0x42, %edi
je 0x6f3c5
cmpl $0x48, %edi
jne 0x6f41b
movq %r12, %rsi
callq 0x6f85f
addl $-0x4, %r15d
movq %rbp, %rdi
movl %r15d, %esi
jmp 0x6f4fd
cmpq $-0x8000, %r14          # imm = 0x8000
jb 0x6f4d5
movw %r14w, 0x18(%rsp)
movl $0x73, %edi
jmp 0x6f384
cmpq $0xffff, %r14           # imm = 0xFFFF
ja 0x6f4e1
movw %r14w, 0x18(%rsp)
movl $0x53, %edi
movq %r12, %rsi
callq 0x6f85f
leaq 0x18(%rsp), %rdi
movl $0x2, %esi
jmp 0x6f4fd
movq %rbp, %rdi
callq 0x6500
movsd %xmm0, 0x18(%rsp)
movl $0x64, %edi
movq %r12, %rsi
callq 0x6f85f
leaq 0x18(%rsp), %rdi
movl $0x8, %esi
jmp 0x6f4fd
movl $0x4, %eax
subq %r15, %rax
cmpq $-0x3, %rax
jl 0x6f3e3
leaq 0x519ee(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6f75c
leaq (%r14,%r15), %rax
movq %rax, 0x28(%rsp)
leaq 0x6(%r14), %rbp
movq %rbp, (%rsp)
movzbl 0x5(%r14), %r14d
movl $0x0, 0x18(%rsp)
xorl %eax, %eax
movq %rbp, %rcx
movzbl (%rcx), %edx
cmpl $0x2c, %edx
je 0x6f414
testl %edx, %edx
jne 0x6f416
jmp 0x6f430
incl %eax
incq %rcx
jmp 0x6f406
leaq 0x519a6(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jle 0x6f282
jmp 0x6f746
movl %eax, 0x18(%rsp)
movl $0x42, %edi
movq %r12, %rsi
callq 0x6f85f
movl %r14d, %edi
movq %r12, %rsi
callq 0x6f85f
leaq 0x18(%rsp), %rdi
movl $0x4, %esi
movq %r12, %rdx
callq 0x6f77e
cmpl $0x62, %r14d
jle 0x6f50a
cmpl $0x68, %r14d
jg 0x6f574
cmpl $0x63, %r14d
je 0x6f62e
cmpl $0x66, %r14d
jne 0x6f614
cmpq $0x7, %r15
movq 0x30(%rsp), %rbx
movq %rsp, %r14
movq 0x28(%rsp), %r15
jb 0x6f282
incq %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x6500
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rsp)
leaq 0x14(%rsp), %rdi
movl $0x4, %esi
movq %r12, %rdx
callq 0x6f77e
movq (%rsp), %rbp
cmpq %r15, %rbp
jb 0x6f49d
jmp 0x6f282
movl %r14d, 0x18(%rsp)
movl $0x69, %edi
jmp 0x6f4eb
movl %r14d, 0x18(%rsp)
movl $0x49, %edi
movq %r12, %rsi
callq 0x6f85f
leaq 0x18(%rsp), %rdi
movl $0x4, %esi
movq %r12, %rdx
callq 0x6f77e
jmp 0x6f282
cmpl $0x43, %r14d
je 0x6f5d4
cmpl $0x49, %r14d
je 0x6f6b9
cmpl $0x53, %r14d
jne 0x6f614
cmpq $0x7, %r15
movq 0x30(%rsp), %rbx
movq %rsp, %r14
movq 0x28(%rsp), %r15
jb 0x6f282
incq %rbp
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6200
movw %ax, 0x14(%rsp)
leaq 0x14(%rsp), %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x6f77e
movq (%rsp), %rbp
cmpq %r15, %rbp
jb 0x6f53f
jmp 0x6f282
cmpl $0x69, %r14d
je 0x6f66e
cmpl $0x73, %r14d
jne 0x6f614
cmpq $0x7, %r15
movq 0x30(%rsp), %rbx
movq %rsp, %r14
movq 0x28(%rsp), %r15
jb 0x6f282
incq %rbp
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6a60
movw %ax, 0x14(%rsp)
leaq 0x14(%rsp), %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x6f77e
movq (%rsp), %rbp
cmpq %r15, %rbp
jb 0x6f59f
jmp 0x6f282
cmpq $0x7, %r15
movq 0x30(%rsp), %rbx
movq %rsp, %r14
movq 0x28(%rsp), %r15
jb 0x6f282
incq %rbp
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6200
movzbl %al, %edi
movq %r12, %rsi
callq 0x6f85f
movq (%rsp), %rbp
cmpq %r15, %rbp
jb 0x6f5eb
jmp 0x6f282
leaq 0x517ad(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
movq 0x30(%rsp), %rbx
jle 0x6f282
jmp 0x6f750
cmpq $0x7, %r15
movq 0x30(%rsp), %rbx
movq %rsp, %r14
movq 0x28(%rsp), %r15
jb 0x6f282
incq %rbp
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6a60
movsbl %al, %edi
movq %r12, %rsi
callq 0x6f85f
movq (%rsp), %rbp
cmpq %r15, %rbp
jb 0x6f645
jmp 0x6f282
cmpq $0x7, %r15
movq 0x30(%rsp), %rbx
movq %rsp, %r14
movq 0x28(%rsp), %r15
jb 0x6f282
incq %rbp
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6a60
movl %eax, 0x14(%rsp)
leaq 0x14(%rsp), %rdi
movl $0x4, %esi
movq %r12, %rdx
callq 0x6f77e
movq (%rsp), %rbp
cmpq %r15, %rbp
jb 0x6f685
jmp 0x6f282
cmpq $0x7, %r15
movq 0x30(%rsp), %rbx
movq %rsp, %r14
movq 0x28(%rsp), %r15
jb 0x6f282
incq %rbp
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x6200
movl %eax, 0x14(%rsp)
leaq 0x14(%rsp), %rdi
movl $0x4, %esi
movq %r12, %rdx
callq 0x6f77e
movq (%rsp), %rbp
cmpq %r15, %rbp
jb 0x6f6d0
jmp 0x6f282
movq 0x40(%rsp), %rbx
movq 0x50(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rsi, 0x28(%rdx)
xorl %eax, %eax
jmp 0x6f0e2
callq 0x7ed8
jmp 0x6ef39
callq 0x7f16
jmp 0x6f0ca
callq 0x7f54
jmp 0x6f0ca
callq 0x7ef7
jmp 0x6f0ca
callq 0x7f35
jmp 0x6f0ca
leaq 0x2b1f2(%rip), %rax     # 0x9a949
movq %rax, 0x38(%rsp)
movq 0x4f875(%rip), %rax     # 0xbefd8
movq (%rax), %rdi
leaq 0x2af84(%rip), %rdx     # 0x9a6f1
movq 0x38(%rsp), %rsi
xorl %eax, %eax
callq 0x6a90
jmp 0x6f0ca