// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rdi, 0x48(%rsp)
movq 0x10(%rdi), %r12
movq %r12, 0x8(%rsp)
movl $0x0, 0x20(%rdx)
movq $0x0, 0x28(%rsp)
movq 0x28(%rdx), %rdi
movq %rdi, 0x38(%rsp)
movslq 0x24(%rdx), %rbx
movq %rbx, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
cmpq $0x0, 0x18(%rsi)
jne 0x6e9f5
movq %rdi, %r13
movl $0x80, %edi
callq 0x69d0
movq %rax, 0x18(%r15)
xorl %eax, %eax
movq 0x18(%r15), %rcx
movb $-0x1, (%rcx,%rax)
incq %rax
cmpq $0x80, %rax
jne 0x6e9c1
xorl %eax, %eax
leaq 0x2bac7(%rip), %rcx     # 0x9a4a4
movq %r13, %rdi
movsbq (%rax,%rcx), %rdx
movq 0x18(%r15), %rsi
movb %al, (%rsi,%rdx)
incq %rax
cmpq $0xa, %rax
jne 0x6e9e0
movq %r14, 0x10(%rsp)
movq %r12, (%rsp)
movq 0x8(%rsp), %rax
movq %rax, %r13
subq %r12, %r13
incq %r13
movq %r13, %rbp
shlq $0x20, %rbp
movq %r13, %r14
shlq $0x18, %r14
movabsq $0x100000000, %rcx      # imm = 0x100000000
movzbl (%rax), %edx
testl %edx, %edx
je 0x6eb3d
cmpl $0x9, %edx
je 0x6ea46
incq %rax
addq %rcx, %rbp
addq $0x1000000, %r14        # imm = 0x1000000
incq %r13
jmp 0x6ea24
leaq 0x1(%rax), %rcx
movq %rcx, 0x40(%rsp)
movq %rcx, 0x8(%rsp)
movb $0x0, (%rax)
leaq 0x5236a(%rip), %rax     # 0xc0dc8
cmpq $0x1, %r13
jg 0x6ea6d
cmpl $0x2, (%rax)
jge 0x6ecbe
cmpq $0x100, %r13            # imm = 0x100
jl 0x6ea7f
cmpl $0x0, (%rax)
jg 0x6ecd9
sarq $0x20, %rbp
cmpq %rbx, %rbp
jbe 0x6ead4
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, 0x30(%rsp)
callq 0x6c80
testq %rax, %rax
je 0x6eae9
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x6570
movq %rbp, 0x28(%rsp)
shrl $0x18, %r14d
movq 0x10(%rsp), %rbp
movb %r14b, 0xb(%rbp)
leaq 0x8(%rsp), %r12
movq 0x40(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x6a60
movw %ax, 0xc(%rbp)
movq (%r12), %rax
leaq 0x1(%rax), %r14
movq %r14, (%r12)
cmpb $0x9, (%rax)
jne 0x6eb47
movq %r14, (%rsp)
movq 0x8(%rsp), %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x6ef87
cmpl $0x9, %ecx
je 0x6eb72
incq %rax
jmp 0x6eb28
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rbp
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq 0x38(%rsp), %rcx
movq %rcx, 0x28(%rbp)
movl 0x28(%rsp), %ecx
movl %ecx, 0x20(%rbp)
movl 0x30(%rsp), %ecx
movl %ecx, 0x24(%rbp)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1(%rax), %r12
movq %r12, 0x8(%rsp)
movb $0x0, (%rax)
leaq 0x2bbf6(%rip), %rsi     # 0x9a77b
movq %r14, %rdi
callq 0x6a50
testl %eax, %eax
je 0x6ebcc
cmpl $0x0, (%r15)
jne 0x6eba7
leaq 0x5222a(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6ee00
movq %r15, %rdi
movq %r14, %rsi
callq 0x6d2a7
movl %eax, (%rbp)
testl %eax, %eax
jns 0x6ebd3
leaq 0x52208(%rip), %rax     # 0xc0dc8
cmpl $0x2, (%rax)
jl 0x6ebd3
callq 0x7e53
jmp 0x6ebd3
movl $0xffffffff, (%rbp)     # imm = 0xFFFFFFFF
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x6a60
decl %eax
movl %eax, 0x4(%rbp)
movq (%r13), %rcx
leaq 0x1(%rcx), %r14
movq %r14, (%r13)
cmpb $0x9, (%rcx)
jne 0x6eb47
testl %eax, %eax
jns 0x6ec23
cmpl $0x0, (%rbp)
js 0x6ec23
leaq 0x521b5(%rip), %rax     # 0xc0dc8
cmpl $0x2, (%rax)
jge 0x6eee0
movl $0xffffffff, (%rbp)     # imm = 0xFFFFFFFF
cmpl $0x0, (%rbp)
jns 0x6ec2d
orb $0x4, 0xc(%rbp)
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x6a60
movq 0x8(%rbp), %rcx
movzbl %al, %eax
shll $0x10, %eax
movq %rcx, %r14
andq $-0xff0001, %r14        # imm = 0xFF00FFFF
orq %rax, %r14
movq %r14, 0x8(%rbp)
movq (%r12), %rax
leaq 0x1(%rax), %rbx
movq %rbx, (%r12)
cmpb $0x9, (%rax)
jne 0x6eb47
cmpb $0x2a, (%rbx)
jne 0x6ece3
movabsq $0x400000000, %r14      # imm = 0x400000000
btq $0x22, %rcx
jb 0x6ec98
leaq 0x52139(%rip), %rax     # 0xc0dc8
cmpl $0x2, (%rax)
jge 0x6eed6
orq %r14, 0x8(%rbp)
movq %rbx, (%rsp)
movq 0x8(%rsp), %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x6ef87
cmpl $0x9, %ecx
je 0x6ede9
incq %rax
jmp 0x6eca5
movq %rdi, 0x50(%rsp)
callq 0x7e34
movq 0x50(%rsp), %rdi
leaq 0x520f4(%rip), %rax     # 0xc0dc8
jmp 0x6ea6d
callq 0x7fe2
jmp 0x6eb42
movq %rbx, (%rsp)
movq 0x8(%rsp), %rbx
incq %rbx
xorl %r13d, %r13d
movzbl -0x1(%rbx), %eax
testl %eax, %eax
je 0x6ed1d
cmpl $0x9, %eax
je 0x6ed1d
movsbq %al, %r12
callq 0x6790
movq (%rax), %rax
movb 0x1(%rax,%r12,2), %al
andb $0x8, %al
cmpb $0x1, %al
adcq $0x0, %r13
incq %rbx
jmp 0x6ecf2
movq %rbx, 0x8(%rsp)
movl $0xa, %r12d
movl $0xb, %ebx
cmpb $0x9, %al
jne 0x6eef6
testq %r13, %r13
sete %cl
leaq 0x52086(%rip), %rax     # 0xc0dc8
movl (%rax), %eax
testl %eax, %eax
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
je 0x6eeea
testl %eax, %eax
setg %al
cmpq $0x10000, %r13          # imm = 0x10000
setae %cl
andb %al, %cl
cmpb $0x1, %cl
je 0x6eef1
movabsq $0x1000000000000, %rcx  # imm = 0x1000000000000
movq %r13, %rax
shlq $0x30, %rax
decq %rcx
andq %rcx, %r14
orq %rax, %r14
movq %r14, 0x8(%rbp)
movzwl %r13w, %esi
shll $0x2, %esi
leaq 0x28(%rsp), %r14
addq (%r14), %rsi
movq %r14, %rdi
callq 0x6f93b
movq (%r14), %rdx
movq 0x10(%r14), %r13
addq %rdx, %r13
movq 0x8(%rbp), %rcx
movq %rcx, %rax
shrq $0x30, %rax
leaq (%rdx,%rax,4), %rdx
movq %rdx, (%r14)
jne 0x6ee0a
btq $0x22, %rcx
jb 0x6ee99
movabsq $0x1000000000000, %rdx  # imm = 0x1000000000000
xorl %ebx, %ebx
cmpq %rdx, %rcx
jae 0x6eeaa
xorl %r12d, %r12d
jmp 0x6eef6
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rsp)
movb $0x0, (%rax)
movl $0x1, %r12d
jmp 0x6ef08
callq 0x7e72
jmp 0x6eb47
xorl %r12d, %r12d
movq (%rsp), %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x6a60
shll $0x4, %eax
movl %eax, (%r13,%r12,4)
movq (%rsp), %rbp
movsbq (%rbp), %rcx
testq %rcx, %rcx
js 0x6ee3e
movq 0x18(%r15), %rdx
movsbl (%rdx,%rcx), %ecx
jmp 0x6ee43
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %ecx, %ecx
setns %dl
leaq 0x51f79(%rip), %rsi     # 0xc0dc8
cmpl $0x0, (%rsi)
setle %r14b
orb %dl, %r14b
je 0x6ee8d
orl %eax, %ecx
movl %ecx, (%r13,%r12,4)
xorl %ebx, %ebx
testb %r14b, %r14b
je 0x6eea3
incq %r12
incq %rbp
movq %rbp, (%rsp)
movq 0x10(%rsp), %rbp
movq 0x8(%rbp), %rcx
movq %rcx, %rax
shrq $0x30, %rax
cmpq %rax, %r12
jb 0x6ee0d
jmp 0x6edc1
callq 0x7eb0
movl $0xb, %ebx
jmp 0x6ee64
movl $0x1, %r12d
xorl %ebx, %ebx
jmp 0x6eef6
movq 0x10(%rsp), %rbp
jmp 0x6eef6
xorl %edx, %edx
xorl %r12d, %r12d
movl (%r13,%rdx,4), %esi
leal (%rsi,%rsi), %ecx
movl $0x3c1a7, %edi          # imm = 0x3C1A7
shrl %cl, %edi
shll $0x1e, %edi
sarl $0x1f, %edi
shrl $0x4, %esi
andl %edi, %esi
addl %esi, %r12d
incq %rdx
cmpq %rdx, %rax
jne 0x6eeaf
jmp 0x6eef6
callq 0x7f0d
jmp 0x6ec98
callq 0x7e91
jmp 0x6ec1c
callq 0x7eee
jmp 0x6eef6
callq 0x7ecf
testl %ebx, %ebx
je 0x6ef08
cmpl $0xb, %ebx
je 0x6eb47
jmp 0x6eb63
movslq 0x4(%rbp), %r8
movslq %r12d, %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 0x6ef60
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 0x6ef2d
jmp 0x6ef66
addl %r11d, %esi
movzwl %si, %edi
movw %di, 0x8(%rbp)
movq 0x8(%rsp), %r14
movq %r14, (%rsp)
movq %r14, %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x6ef87
cmpl $0x9, %ecx
je 0x6ef91
incq %rax
jmp 0x6ef76
movq %rax, 0x8(%rsp)
jmp 0x6eb47
leaq 0x1(%rax), %r12
movq %r12, 0x8(%rsp)
movb $0x0, (%rax)
leaq 0x21023(%rip), %rsi     # 0x8ffc7
movq %r14, %rdi
callq 0x6a50
testl %eax, %eax
je 0x6efd0
leaq 0x2b7c4(%rip), %rsi     # 0x9a77b
movq %r14, %rdi
callq 0x6a50
testl %eax, %eax
je 0x6efd5
movq %r15, %rdi
movq %r14, %rsi
callq 0x6d2a7
jmp 0x6efda
movl (%rbp), %eax
jmp 0x6efda
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x14(%rbp)
leaq 0x8(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x6a60
decl %eax
movl %eax, 0x18(%rbp)
movq (%r15), %rcx
leaq 0x1(%rcx), %r14
movq %r14, (%r15)
cmpb $0x9, (%rcx)
jne 0x6eb47
testl %eax, %eax
jns 0x6f02b
cmpl $0x0, 0x14(%rbp)
js 0x6f02b
leaq 0x51dad(%rip), %rax     # 0xc0dc8
cmpl $0x2, (%rax)
jge 0x6f89b
movl $0xffffffff, 0x14(%rbp) # imm = 0xFFFFFFFF
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x6a60
movl %eax, 0x1c(%rbp)
movq (%r15), %r14
leaq 0x1(%r14), %r12
movq %r12, (%r15)
cmpb $0x9, (%r14)
jne 0x6eb47
movq %r12, (%rsp)
movq 0x8(%rsp), %r15
movq %r15, %r13
notq %r13
xorl %ebp, %ebp
movzbl (%r15,%rbp), %eax
testl %eax, %eax
je 0x6f1be
cmpl $0x9, %eax
je 0x6f07f
incq %rbp
jmp 0x6f068
leaq (%r15,%rbp), %rax
incq %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x40(%rsp)
movb $0x0, -0x1(%rax)
leaq 0x2b6e0(%rip), %rsi     # 0x9a77b
movq %r12, %rdi
callq 0x6a50
testl %eax, %eax
je 0x6f1cb
movabsq $0x1000000000000, %rax  # imm = 0x1000000000000
movl %r14d, %ecx
notl %ecx
addl %ebp, %ecx
addl %r15d, %ecx
movq 0x10(%rsp), %rdx
movl %ecx, 0x10(%rdx)
movq 0x8(%rdx), %rdx
xorl %ecx, %ecx
movq %rdx, %rsi
shrq $0x30, %rsi
je 0x6f112
movl %edx, %edi
shrl $0x18, %edi
addq 0x38(%rsp), %rdi
xorl %r8d, %r8d
movl $0x3c1a7, %r9d          # imm = 0x3C1A7
xorl %ecx, %ecx
movl (%rdi,%r8,4), %r10d
leal (%r10,%r10), %r11d
btl %r11d, %r9d
movl $0x0, %r11d
sbbl %r11d, %r11d
shrl $0x4, %r10d
andl %r11d, %r10d
addl %r10d, %ecx
incq %r8
cmpq %r8, %rsi
jne 0x6f0eb
cmpq %rax, %rdx
jb 0x6f13c
negl %ecx
movl %r15d, %eax
subl %r14d, %eax
addq %rcx, %rax
addq %rbp, %rax
decq %rax
testl %eax, %eax
je 0x6f13c
leaq 0x51c95(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6f8af
movl %r15d, %eax
subl %r14d, %eax
addl %ebp, %eax
sarl %eax
movslq %eax, %rbx
leaq 0x28(%rsp), %r14
movq (%r14), %rsi
addq %rbx, %rsi
movq %r14, %rdi
callq 0x6f93b
movq (%r14), %rax
movq %r14, %rcx
movq 0x10(%r14), %r14
addq %rax, %r14
addq %rbx, %rax
movq %rax, (%rcx)
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x63b0
movq 0x10(%rsp), %r8
cmpl $0x0, 0x10(%r8)
jle 0x6f1d7
xorl %eax, %eax
leaq 0x28fff(%rip), %rdx     # 0x98190
xorl %esi, %esi
movsbq (%r12,%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 0x6f193
jmp 0x6f1d7
addq %rbp, %r15
movq %r15, 0x8(%rsp)
jmp 0x6eb42
movq 0x10(%rsp), %rax
movl $0x0, 0x10(%rax)
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rcx
leaq 0x1(%rcx), %rax
addq %rcx, %r13
subq %rbp, %r13
movzbl -0x1(%rax), %ecx
testl %ecx, %ecx
je 0x6f204
cmpl $0x9, %ecx
je 0x6f204
incq %rax
incq %r13
jmp 0x6f1ef
movq %rax, 0x8(%rsp)
movb $0x0, -0x1(%rax)
movq 0x10(%rsp), %rbx
movslq 0x10(%rbx), %rsi
leaq 0x28(%rsp), %r12
addq (%r12), %rsi
movq %r12, %rdi
callq 0x6f93b
movq (%r12), %rax
movq 0x10(%r12), %r14
addq %rax, %r14
movslq 0x10(%rbx), %rbx
addq %rbx, %rax
movq %rax, (%r12)
leaq 0x2b536(%rip), %rsi     # 0x9a77b
movq 0x40(%rsp), %rdi
callq 0x6a50
testl %eax, %eax
je 0x6f297
cmpq %r13, %rbx
movq 0x48(%rsp), %rbx
je 0x6f26d
leaq 0x51b64(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6f8a5
movq 0x10(%rsp), %rdx
cmpl $0x0, 0x10(%rdx)
jle 0x6f2b1
xorl %eax, %eax
leaq (%r15,%rax), %rcx
movb 0x1(%rbp,%rcx), %cl
addb $-0x21, %cl
movb %cl, (%r14,%rax)
incq %rax
movslq 0x10(%rdx), %rcx
cmpq %rcx, %rax
jl 0x6f27a
jmp 0x6f2b1
movq %r14, %rdi
movl $0xff, %esi
movq %rbx, %rdx
callq 0x63b0
movq 0x10(%rsp), %rdx
movq 0x48(%rsp), %rbx
movq 0x8(%rsp), %r15
movq %rdx, %rbp
movq 0x10(%rbx), %rax
addq (%rbx), %rax
cmpq %rax, %r15
jae 0x6f894
movq %r15, %r12
movq %r15, (%rsp)
movl $0x4, %ebp
movq %r15, %r13
movzbl (%r13), %eax
testl %eax, %eax
je 0x6f2ee
cmpl $0x9, %eax
je 0x6f2ee
incq %r13
decq %rbp
jmp 0x6f2d8
leaq 0x1(%r13), %r15
movq %r15, 0x8(%rsp)
movb $0x0, (%r13)
leaq -0x5(%rbp), %rax
cmpq $-0x6, %rax
jl 0x6f316
leaq 0x51abb(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
jg 0x6f424
movq %r12, %rdi
movl $0x2, %esi
leaq 0x28(%rsp), %rdx
callq 0x6f8b9
leaq 0x4(%r12), %rax
movq %rax, (%rsp)
movzbl 0x3(%r12), %edi
leaq 0x5(%r12), %r14
movq %r14, (%rsp)
leal -0x41(%rdi), %eax
cmpl $0x22, %eax
ja 0x6f38c
movabsq $0x500000005, %rcx      # imm = 0x500000005
btq %rax, %rcx
jae 0x6f38c
movl $0x41, %edi
leaq 0x28(%rsp), %r12
movq %r12, %rsi
callq 0x6f994
movsbl (%r14), %edi
movq %r12, %rsi
callq 0x6f994
movq 0x10(%rsp), %rbp
xorl %r14d, %r14d
testl %r14d, %r14d
je 0x6f2b9
jmp 0x6f885
movl %edi, %eax
andb $-0x21, %al
cmpb $0x49, %al
jne 0x6f3ca
cmpb $0x2d, (%r14)
movq %rsp, %rsi
movq %r14, %rdi
movl $0xa, %edx
jne 0x6f439
callq 0x6a60
movq %rax, %r14
cmpq $-0x80, %rax
movq 0x10(%rsp), %rbp
jl 0x6f49b
movl $0x63, %edi
jmp 0x6f453
cmpl $0x59, %edi
jle 0x6f470
cmpl $0x5a, %edi
je 0x6f482
cmpl $0x64, %edi
je 0x6f4e9
cmpl $0x66, %edi
jne 0x6f56e
movq %r14, %rdi
movq %rsp, %rsi
callq 0x6500
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x20(%rsp)
movl $0x66, %edi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x6f994
leaq 0x20(%rsp), %rdi
movl $0x4, %esi
jmp 0x6f516
callq 0x7fc3
movl $0xb, %r14d
movq 0x10(%rsp), %rbp
jmp 0x6f37e
callq 0x6200
movq %rax, %r14
cmpq $0xff, %rax
movq 0x10(%rsp), %rbp
ja 0x6f4b5
movl $0x43, %edi
leaq 0x28(%rsp), %r12
movq %r12, %rsi
callq 0x6f994
movl %r14d, %edi
movq %r12, %rsi
callq 0x6f994
jmp 0x6f37b
cmpl $0x42, %edi
je 0x6f523
cmpl $0x48, %edi
jne 0x6f56e
leaq 0x28(%rsp), %r12
movq %r12, %rsi
callq 0x6f994
negl %ebp
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
jmp 0x6f519
cmpq $-0x8000, %r14          # imm = 0x8000
jl 0x6f639
movw %r14w, 0x20(%rsp)
movl $0x73, %edi
jmp 0x6f4cd
cmpq $0xffff, %r14           # imm = 0xFFFF
ja 0x6f645
movw %r14w, 0x20(%rsp)
movl $0x53, %edi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x6f994
leaq 0x20(%rsp), %rdi
movl $0x2, %esi
jmp 0x6f666
movq %r14, %rdi
movq %rsp, %rsi
callq 0x6500
movsd %xmm0, 0x20(%rsp)
movl $0x64, %edi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x6f994
leaq 0x20(%rsp), %rdi
movl $0x8, %esi
movq %r14, %rdx
callq 0x6f8b9
jmp 0x6f376
cmpq $-0x3, %rbp
jl 0x6f540
leaq 0x51898(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
leaq 0x2b1c1(%rip), %rdi     # 0x9a6fb
jg 0x6f78f
leaq 0x6(%r12), %rax
movq %rax, (%rsp)
movzbl 0x5(%r12), %ebp
movl $0x0, 0x20(%rsp)
xorl %ecx, %ecx
movzbl (%rax), %edx
cmpl $0x2c, %edx
je 0x6f567
testl %edx, %edx
jne 0x6f569
jmp 0x6f593
incl %ecx
incq %rax
jmp 0x6f559
leaq 0x51853(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
movq 0x10(%rsp), %rbp
jle 0x6f37b
callq 0x7fa4
movl $0xb, %r14d
jmp 0x6f37e
movl %ecx, 0x20(%rsp)
movl $0x42, %edi
leaq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0x6f994
movl %ebp, %edi
movq %rbx, %rsi
callq 0x6f994
leaq 0x20(%rsp), %rdi
movl $0x4, %esi
movq %rbx, %rdx
callq 0x6f8b9
cmpl $0x62, %ebp
jle 0x6f673
cmpl $0x68, %ebp
jg 0x6f6db
cmpl $0x63, %ebp
je 0x6f7a1
cmpl $0x66, %ebp
jne 0x6f778
movq (%rsp), %rdi
xorl %r14d, %r14d
cmpq %r13, %rdi
leaq 0x28(%rsp), %rbx
movq %rsp, %r12
leaq 0x1c(%rsp), %rbp
jae 0x6f86c
incq %rdi
movq %r12, %rsi
callq 0x6500
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1c(%rsp)
movq %rbp, %rdi
movl $0x4, %esi
movq %rbx, %rdx
callq 0x6f8b9
movq (%rsp), %rdi
cmpq %r13, %rdi
jb 0x6f606
jmp 0x6f86c
movl %r14d, 0x20(%rsp)
movl $0x69, %edi
jmp 0x6f64f
movl %r14d, 0x20(%rsp)
movl $0x49, %edi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x6f994
leaq 0x20(%rsp), %rdi
movl $0x4, %esi
movq %r14, %rdx
callq 0x6f8b9
jmp 0x6f37b
cmpl $0x43, %ebp
je 0x6f73a
cmpl $0x49, %ebp
je 0x6f824
cmpl $0x53, %ebp
jne 0x6f778
movq (%rsp), %rdi
cmpq %r13, %rdi
leaq 0x28(%rsp), %rbx
movq %rsp, %r12
leaq 0x1c(%rsp), %rbp
jae 0x6f869
incq %rdi
xorl %r14d, %r14d
movq %r12, %rsi
xorl %edx, %edx
callq 0x6200
movw %ax, 0x1c(%rsp)
movq %rbp, %rdi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x6f8b9
movq (%rsp), %rdi
cmpq %r13, %rdi
jb 0x6f6a8
jmp 0x6f86c
cmpl $0x69, %ebp
je 0x6f7df
cmpl $0x73, %ebp
jne 0x6f778
movq (%rsp), %rdi
cmpq %r13, %rdi
leaq 0x28(%rsp), %rbx
movq %rsp, %r12
leaq 0x1c(%rsp), %rbp
jae 0x6f869
incq %rdi
xorl %r14d, %r14d
movq %r12, %rsi
xorl %edx, %edx
callq 0x6a60
movw %ax, 0x1c(%rsp)
movq %rbp, %rdi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x6f8b9
movq (%rsp), %rdi
cmpq %r13, %rdi
jb 0x6f707
jmp 0x6f86c
movq (%rsp), %rdi
cmpq %r13, %rdi
leaq 0x28(%rsp), %rbx
movq %rsp, %r12
jae 0x6f869
incq %rdi
xorl %r14d, %r14d
movq %r12, %rsi
xorl %edx, %edx
callq 0x6200
movzbl %al, %edi
movq %rbx, %rsi
callq 0x6f994
movq (%rsp), %rdi
cmpq %r13, %rdi
jb 0x6f74f
jmp 0x6f86c
leaq 0x51649(%rip), %rax     # 0xc0dc8
cmpl $0x0, (%rax)
leaq 0x2af98(%rip), %rdi     # 0x9a721
jle 0x6f869
callq 0x7f89
movl $0xb, %r14d
xorl %eax, %eax
jmp 0x6f86e
movq (%rsp), %rdi
cmpq %r13, %rdi
jae 0x6f869
leaq 0x28(%rsp), %rbx
movq %rsp, %r12
incq %rdi
xorl %r14d, %r14d
movq %r12, %rsi
xorl %edx, %edx
callq 0x6a60
movsbl %al, %edi
movq %rbx, %rsi
callq 0x6f994
movq (%rsp), %rdi
cmpq %r13, %rdi
jb 0x6f7b6
jmp 0x6f86c
movq (%rsp), %rdi
cmpq %r13, %rdi
leaq 0x28(%rsp), %rbx
movq %rsp, %r12
leaq 0x1c(%rsp), %rbp
jae 0x6f869
incq %rdi
xorl %r14d, %r14d
movq %r12, %rsi
xorl %edx, %edx
callq 0x6a60
movl %eax, 0x1c(%rsp)
movq %rbp, %rdi
movl $0x4, %esi
movq %rbx, %rdx
callq 0x6f8b9
movq (%rsp), %rdi
cmpq %r13, %rdi
jb 0x6f7f5
jmp 0x6f86c
movq (%rsp), %rdi
cmpq %r13, %rdi
leaq 0x28(%rsp), %rbx
movq %rsp, %r12
leaq 0x1c(%rsp), %rbp
jae 0x6f869
incq %rdi
xorl %r14d, %r14d
movq %r12, %rsi
xorl %edx, %edx
callq 0x6200
movl %eax, 0x1c(%rsp)
movq %rbp, %rdi
movl $0x4, %esi
movq %rbx, %rdx
callq 0x6f8b9
movq (%rsp), %rdi
cmpq %r13, %rdi
jb 0x6f83a
jmp 0x6f86c
xorl %r14d, %r14d
movb $0x1, %al
testb %al, %al
movq 0x10(%rsp), %rbp
movq 0x48(%rsp), %rbx
jne 0x6f37b
jmp 0x6f37e
cmpl $0xb, %r14d
je 0x6eb47
jmp 0x6eb63
xorl %eax, %eax
jmp 0x6eb4c
callq 0x7f2c
jmp 0x6f024
callq 0x7f6a
jmp 0x6eb42
callq 0x7f4b
jmp 0x6eb42