// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/sam.c
// Function: sam_format1_append
static int sam_format1_append(const bam_hdr_t *h, const bam1_t *b, kstring_t *str)
{
    int i, r = 0;
    uint8_t *s, *end;
    const bam1_core_t *c = &b->core;

    if (c->l_qname == 0)
        return -1;
    r |= kputsn_(bam_get_qname(b), c->l_qname-1-c->l_extranul, str);
    r |= kputc_('\t', str); // query name
    r |= kputw(c->flag, str); r |= kputc_('\t', str); // flag
    if (c->tid >= 0) { // chr
        r |= kputs(h->target_name[c->tid] , str);
        r |= kputc_('\t', str);
    } else r |= kputsn_("*\t", 2, str);
    r |= kputll(c->pos + 1, str); r |= kputc_('\t', str); // pos
    r |= kputw(c->qual, str); r |= kputc_('\t', str); // qual
    if (c->n_cigar) { // cigar
        uint32_t *cigar = bam_get_cigar(b);
        for (i = 0; i < c->n_cigar; ++i) {
            r |= kputw(bam_cigar_oplen(cigar[i]), str);
            r |= kputc_(bam_cigar_opchr(cigar[i]), str);
        }
    } else r |= kputc_('*', str);
    r |= kputc_('\t', str);
    if (c->mtid < 0) r |= kputsn_("*\t", 2, str); // mate chr
    else if (c->mtid == c->tid) r |= kputsn_("=\t", 2, str);
    else {
        r |= kputs(h->target_name[c->mtid], str);
        r |= kputc_('\t', str);
    }
    r |= kputll(c->mpos + 1, str); r |= kputc_('\t', str); // mate pos
    r |= kputll(c->isize, str); r |= kputc_('\t', str); // template len
    if (c->l_qseq) { // seq and qual
        uint8_t *s = bam_get_seq(b);
        if (ks_resize(str, str->l+2+2*c->l_qseq) < 0) goto mem_err;
        char *cp = str->s + str->l;

        // Sequence, 2 bases at a time
        nibble2base(s, cp, c->l_qseq);
        cp[c->l_qseq] = '\t';
        cp += c->l_qseq+1;

        // Quality
        s = bam_get_qual(b);
        i = 0;
        if (s[0] == 0xff) {
            cp[i++] = '*';
        } else {
            add33((uint8_t *)cp, s, c->l_qseq); // cp[i] = s[i]+33;
            i = c->l_qseq;
        }
        cp[i] = 0;
        cp += i;
        str->l = cp - str->s;
    } else r |= kputsn_("*\t*", 3, str);

    s = bam_get_aux(b); // aux
    end = b->data + b->l_data;

    while (end - s >= 4) {
        r |= kputc_('\t', str);
        if ((s = (uint8_t *)sam_format_aux1(s, s[2], s+3, end, str)) == NULL)
            goto bad_aux;
    }
    r |= kputsn("", 0, str); // nul terminate
    if (r < 0) goto mem_err;

    return str->l;

 bad_aux:
    hts_log_error("Corrupted aux data for read %.*s flag %d",
                  b->core.l_qname, bam_get_qname(b), b->core.flag);
    errno = EINVAL;
    return -1;

 mem_err:
    hts_log_error("Out of memory");
    errno = ENOMEM;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movzwl 0x12(%rsi), %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x2be17
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movzbl 0xf(%rsi), %r13d
notq %r13
addq %rax, %r13
movq (%rdx), %rax
addq %r13, %rax
jae 0x2aee8
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x2af48
movq 0x38(%r12), %rbx
cmpq $0x1, %rax
movq %rax, %rcx
adcq $0x0, %rcx
cmpq %rcx, 0x8(%r14)
jae 0x2af33
movq %rcx, %rdx
shrq %rdx
xorl %ebp, %ebp
movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rsi, %rax
cmovbeq %rdx, %rbp
addq %rcx, %rbp
movq 0x10(%r14), %rdi
movq %rbp, %rsi
callq 0x4840
testq %rax, %rax
je 0x2aee0
movq %rax, 0x10(%r14)
movq %rbp, 0x8(%r14)
movq 0x10(%r14), %rdi
addq (%r14), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x43c0
addq %r13, (%r14)
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2af8d
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b272
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %ebx
orl %r13d, %ebx
movzwl 0x10(%r12), %edi
movq %r14, %rsi
callq 0x32cef
movl %eax, %ebp
orl %ebx, %ebp
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2affe
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b27c
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %ebp
movslq 0x8(%r12), %rax
testq %rax, %rax
movq %r12, 0x8(%rsp)
js 0x2b0c3
movq 0x20(%r15), %rcx
movq (%rcx,%rax,8), %rbx
testq %rbx, %rbx
je 0x2b0e3
movq %rbx, %rdi
callq 0x41d0
movq %rax, %r13
movq (%r14), %rcx
addq %rcx, %rax
addq $0x2, %rax
cmpq %rcx, %rax
jbe 0x2b0f0
cmpq %rax, 0x8(%r14)
jae 0x2b09e
movq %rax, %rcx
shrq %rcx
xorl %r12d, %r12d
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x2be4e
movq %rax, 0x10(%r14)
movq %r12, 0x8(%r14)
movq 0x8(%rsp), %r12
movq 0x10(%r14), %rdi
addq (%r14), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x43c0
movq (%r14), %rax
addq %r13, %rax
movq %rax, (%r14)
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x2b101
movq (%r14), %rax
cmpq $-0x2, %rax
jb 0x2b286
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x2b160
callq 0x4050
movl $0xe, (%rax)
jmp 0x2b0fb
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2b146
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b738
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %r13d
orl %ebp, %r13d
movq (%r12), %rbp
movq (%r14), %rax
addq $0x17, %rax
cmpq %rax, 0x8(%r14)
jae 0x2b1ad
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b2f0
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
cmpq $-0x2, %rbp
jg 0x2b1ca
notq %rbp
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x2d, (%rcx,%rax)
jmp 0x2b1cd
incq %rbp
movq %rbp, %rax
shrq $0x20, %rax
jne 0x2b1e7
movl %ebp, %edi
movq %r14, %rsi
callq 0x32cef
movl %eax, %ebx
jmp 0x2b2f5
movl $0x1, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
addq %rax, %rax
leaq (%rax,%rax,4), %rax
incl %ecx
cmpq %rax, %rbp
jae 0x2b1f1
movq 0x10(%r14), %rsi
addq (%r14), %rsi
leal 0x2(%rcx), %edi
leaq 0x6c580(%rip), %r8      # 0x97790
movabsq $0x28f5c28f5c28f5c3, %r9 # imm = 0x28F5C28F5C28F5C3
movq %rbp, %r10
movq %rbp, %rax
shrq $0x2, %rax
mulq %r9
movq %rdx, %rbp
shrq $0x2, %rbp
imulq $0x64, %rbp, %rax
movq %r10, %rdx
subq %rax, %rdx
movl %ecx, %eax
movzwl (%r8,%rdx,2), %edx
movw %dx, (%rsi,%rax)
addl $-0x2, %ecx
cmpq $0x3e7, %r10            # imm = 0x3E7
ja 0x2b21a
cmpl $-0x1, %ecx
jne 0x2b25b
orb $0x30, %bpl
movb %bpl, (%rsi)
movl %edi, %eax
addq (%r14), %rax
movq %rax, (%r14)
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
xorl %ebx, %ebx
jmp 0x2b2f5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2afa4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2b015
addq $0x2, %rax
cmpq $0x1, %rax
movq %rax, %rcx
adcq $0x0, %rcx
cmpq %rcx, 0x8(%r14)
jae 0x2b2d4
movq %rcx, %rdx
shrq %rdx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rsi, %rax
cmovbeq %rdx, %rbx
addq %rcx, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b0db
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
movw $0x92a, (%rcx,%rax)     # imm = 0x92A
addq $0x2, (%r14)
movl $0x2, %r13d
jmp 0x2b160
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
orl %r13d, %ebx
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2b343
movq %rax, %rcx
shrq %rcx
xorl %r12d, %r12d
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b6aa
movq %rax, 0x10(%r14)
movq %r12, 0x8(%r14)
movq 0x8(%rsp), %r12
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %ebx
movzbl 0xe(%r12), %edi
movq %r14, %rsi
callq 0x32cef
movl %eax, %ebp
orl %ebx, %ebp
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2b3b3
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b6b9
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %ebp
cmpl $0x0, 0x14(%r12)
movq %r15, 0x18(%rsp)
je 0x2b4b4
cmpl $0x0, 0x14(%r12)
je 0x2b512
movzwl 0x12(%r12), %eax
addq 0x38(%r12), %rax
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
movq %r14, 0x10(%rsp)
movq 0x20(%rsp), %r13
movl (%r13,%r15,4), %edi
shrl $0x4, %edi
movq %r14, %rsi
callq 0x32cef
movl %eax, %ebx
movl (%r13,%r15,4), %eax
andl $0xf, %eax
leaq 0x6fbb6(%rip), %rcx     # 0x9afdd
movb (%rax,%rcx), %r13b
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2b475
movq %rax, %rcx
shrq %rcx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
movl $0x0, %r12d
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b4a8
movq %rax, 0x10(%r14)
movq %r12, 0x8(%r14)
movq 0x8(%rsp), %r12
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb %r13b, (%rcx,%rax)
movl $0x1, %eax
orl %ebx, %ebp
orl %eax, %ebp
incq %r15
movl 0x14(%r12), %eax
cmpq %rax, %r15
movq 0x10(%rsp), %r14
jb 0x2b401
jmp 0x2b512
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %r12
jmp 0x2b48c
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2b4f9
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2be3a
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x2a, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %ebp
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
movq 0x18(%rsp), %r15
jae 0x2b55c
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b6c3
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %r13d
orl %ebp, %r13d
movslq 0x1c(%r12), %rax
testq %rax, %rax
js 0x2b5f1
cmpl 0x8(%r12), %eax
jne 0x2b614
movq (%r14), %rax
cmpq $-0x2, %rax
jae 0x2b5fe
addq $0x2, %rax
cmpq $0x1, %rax
movq %rax, %rcx
adcq $0x0, %rcx
cmpq %rcx, 0x8(%r14)
jae 0x2b5df
movq %rcx, %rdx
shrq %rdx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rsi, %rax
cmovbeq %rdx, %rbx
addq %rcx, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b609
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
movw $0x93d, (%rcx,%rax)     # imm = 0x93D
jmp 0x2b729
movq (%r14), %rax
cmpq $-0x2, %rax
jb 0x2b6ce
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x2b7bf
movq 0x20(%r15), %rcx
movq (%rcx,%rax,8), %rbx
testq %rbx, %rbx
je 0x2b742
movq %rbx, %rdi
callq 0x41d0
movq %rax, %r12
movq (%r14), %rcx
addq %rcx, %rax
addq $0x2, %rax
cmpq %rcx, %rax
jbe 0x2b74f
cmpq %rax, 0x8(%r14)
jae 0x2b682
movq %rax, %rcx
shrq %rcx
xorl %ebp, %ebp
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbp
addq %rax, %rbp
movq 0x10(%r14), %rdi
movq %rbp, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b75a
movq %rax, 0x10(%r14)
movq %rbp, 0x8(%r14)
movq 0x10(%r14), %rdi
addq (%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x43c0
movq (%r14), %rax
addq %r12, %rax
movq %rax, (%r14)
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x2b760
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %r12
jmp 0x2b35a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2b3ca
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x2b574
addq $0x2, %rax
cmpq $0x1, %rax
movq %rax, %rcx
adcq $0x0, %rcx
cmpq %rcx, 0x8(%r14)
jae 0x2b71c
movq %rcx, %rdx
shrq %rdx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rsi, %rax
cmovbeq %rdx, %rbx
addq %rcx, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b609
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
movw $0x92a, (%rcx,%rax)     # imm = 0x92A
addq $0x2, (%r14)
movl $0x2, %r12d
jmp 0x2b7bf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2b15d
callq 0x4050
movl $0xe, (%rax)
jmp 0x2b75a
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2b7a5
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2be44
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %r12d
orl %r13d, %r12d
movq 0x8(%rsp), %rax
movq 0x20(%rax), %r13
movq (%r14), %rax
addq $0x17, %rax
cmpq %rax, 0x8(%r14)
jae 0x2b811
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b8d4
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
cmpq $-0x2, %r13
jg 0x2b82e
notq %r13
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x2d, (%rcx,%rax)
jmp 0x2b831
incq %r13
movq %r13, %rax
shrq $0x20, %rax
jne 0x2b84c
movl %r13d, %edi
movq %r14, %rsi
callq 0x32cef
movl %eax, %ebp
jmp 0x2b8d9
movl $0x1, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
addq %rax, %rax
leaq (%rax,%rax,4), %rax
incl %ecx
cmpq %rax, %r13
jae 0x2b856
movq 0x10(%r14), %rsi
addq (%r14), %rsi
leal 0x2(%rcx), %edi
leaq 0x6bf1b(%rip), %r8      # 0x97790
movabsq $0x28f5c28f5c28f5c3, %r9 # imm = 0x28F5C28F5C28F5C3
movq %r13, %r10
movq %r13, %rax
shrq $0x2, %rax
mulq %r9
movq %rdx, %r13
shrq $0x2, %r13
imulq $0x64, %r13, %rax
movq %r10, %rdx
subq %rax, %rdx
movl %ecx, %eax
movzwl (%r8,%rdx,2), %edx
movw %dx, (%rsi,%rax)
addl $-0x2, %ecx
cmpq $0x3e7, %r10            # imm = 0x3E7
ja 0x2b87f
cmpl $-0x1, %ecx
jne 0x2b8c0
orb $0x30, %r13b
movb %r13b, (%rsi)
movl %edi, %eax
addq (%r14), %rax
movq %rax, (%r14)
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
xorl %ebp, %ebp
jmp 0x2b8d9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
orl %r12d, %ebp
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
movq 0x8(%rsp), %r15
jae 0x2b926
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2ba44
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %ebp
movq 0x28(%r15), %r12
movq (%r14), %rax
addq $0x17, %rax
cmpq %rax, 0x8(%r14)
jae 0x2b989
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2ba4e
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
testq %r12, %r12
jns 0x2b9a3
negq %r12
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x2d, (%rcx,%rax)
movq %r12, %rax
shrq $0x20, %rax
jne 0x2b9bc
movl %r12d, %edi
movq %r14, %rsi
callq 0x32cef
jmp 0x2ba53
movl $0x1, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
addq %rax, %rax
leaq (%rax,%rax,4), %rax
incl %ecx
cmpq %rax, %r12
jae 0x2b9c6
movq 0x10(%r14), %rsi
addq (%r14), %rsi
leal 0x2(%rcx), %edi
leaq 0x6bdab(%rip), %r8      # 0x97790
movabsq $0x28f5c28f5c28f5c3, %r9 # imm = 0x28F5C28F5C28F5C3
movq %r12, %r10
movq %r12, %rax
shrq $0x2, %rax
mulq %r9
movq %rdx, %r12
shrq $0x2, %r12
imulq $0x64, %r12, %rax
movq %r10, %rdx
subq %rax, %rdx
movl %ecx, %eax
movzwl (%r8,%rdx,2), %edx
movw %dx, (%rsi,%rax)
addl $-0x2, %ecx
cmpq $0x3e7, %r10            # imm = 0x3E7
ja 0x2b9ef
cmpl $-0x1, %ecx
jne 0x2ba30
orb $0x30, %r12b
movb %r12b, (%rsi)
movl %edi, %eax
addq (%r14), %rax
movq %rax, (%r14)
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x2ba53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2b93d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
orl %eax, %ebp
movq (%r14), %rax
incq %rax
cmpq %rax, 0x8(%r14)
movq 0x8(%rsp), %r15
jae 0x2ba9f
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bc05
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %ebp
movslq 0x18(%r15), %rax
testq %rax, %rax
je 0x2bbb3
movq 0x38(%r15), %rdx
movl 0x14(%r15), %ebx
movq %r14, %r13
movzwl 0x12(%r15), %r14d
movq (%r13), %rcx
leaq (%rcx,%rax,2), %rax
addq $0x2, %rax
cmpq %rax, 0x8(%r13)
jae 0x2bb30
movq %rdx, 0x10(%rsp)
movq %rax, %rcx
shrq %rcx
xorl %r12d, %r12d
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %r12
addq %rax, %r12
movq 0x10(%r13), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x2be28
movq %rax, 0x10(%r13)
movq %r12, 0x8(%r13)
movq 0x8(%rsp), %r15
movq 0x10(%rsp), %rdx
addq %r14, %rdx
shll $0x2, %ebx
addq %rdx, %rbx
movq 0x10(%r13), %r12
addq (%r13), %r12
movl 0x18(%r15), %edx
leaq 0x8dc3c(%rip), %rax     # 0xb9788
movq %rbx, %rdi
movq %r12, %rsi
callq *(%rax)
movslq 0x18(%r15), %rax
movb $0x9, (%rax,%r12)
movslq 0x18(%r15), %rdx
leaq 0x1(%rdx), %rsi
leaq (%rdx,%r12), %rax
incq %rax
movl 0x14(%r15), %edi
shll $0x2, %edi
addq 0x38(%r15), %rdi
movzwl 0x12(%r15), %ecx
addq %rdi, %rcx
sarl %esi
movslq %esi, %rsi
cmpb $-0x1, (%rsi,%rcx)
movq %r13, %r14
je 0x2bbd1
movl %edx, %edx
testq %rdx, %rdx
je 0x2bbad
addq %rsi, %rcx
xorl %esi, %esi
movb (%rcx,%rsi), %dil
addb $0x21, %dil
movb %dil, (%rax,%rsi)
incq %rsi
cmpq %rsi, %rdx
jne 0x2bb99
movslq 0x18(%r15), %rcx
jmp 0x2bbd9
movq (%r14), %rax
cmpq $-0x3, %rax
jb 0x2bc0f
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2bc78
movb $0x2a, (%rax)
movl $0x1, %ecx
leaq (%rax,%rcx), %rdx
movb $0x0, (%rax,%rcx)
subq 0x10(%r14), %rdx
movq %rdx, (%r14)
xorl %eax, %eax
testl %eax, %eax
je 0x2bc7a
cmpl $0x5, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
je 0x2bdf2
jmp 0x2be17
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2bab6
addq $0x3, %rax
cmpq $0x1, %rax
movq %rax, %rcx
adcq $0x0, %rcx
cmpq %rcx, 0x8(%r14)
jae 0x2bc5d
movq %rcx, %rdx
shrq %rdx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rsi, %rax
cmovbeq %rdx, %rbx
addq %rcx, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bbc7
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
movb $0x2a, 0x2(%rcx,%rax)
movw $0x92a, (%rcx,%rax)     # imm = 0x92A
addq $0x3, (%r14)
movl $0x3, %eax
orl %eax, %ebp
movq 0x38(%r15), %rax
movl 0x14(%r15), %ecx
shll $0x2, %ecx
movzwl 0x12(%r15), %r12d
addq %rax, %r12
addq %rcx, %r12
movslq 0x18(%r15), %rcx
leal 0x1(%rcx), %edx
sarl %edx
movslq %edx, %rdx
addq %rcx, %r12
addq %rdx, %r12
movslq 0x40(%r15), %r13
addq %rax, %r13
xorl %r15d, %r15d
movq %r13, %rcx
subq %r12, %rcx
movq (%r14), %rax
cmpq $0x4, %rcx
jl 0x2bd42
incq %rax
cmpq %rax, 0x8(%r14)
jae 0x2bcfb
movq %rax, %rbx
shrq %rbx
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rcx, %rax
cmovaq %r15, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bd3b
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%r14)
movb $0x9, (%rcx,%rax)
movl $0x1, %eax
orl %eax, %ebp
movzbl 0x2(%r12), %esi
leaq 0x3(%r12), %rdx
movq %r12, %rdi
movq %r13, %rcx
movq %r14, %r8
callq 0x2ca0b
movq %rax, %r12
testq %rax, %rax
jne 0x2bcac
jmp 0x2bd96
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2bd12
subq $-0x2, %rax
jae 0x2bdd4
cmpq %rax, 0x8(%r14)
jae 0x2bd87
movq %rax, %rcx
shrq %rcx
xorl %ebx, %ebx
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %rbx
addq %rax, %rbx
movq 0x10(%r14), %rdi
movq %rbx, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bddf
movq %rax, 0x10(%r14)
movq %rbx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
jmp 0x2bde4
movq 0x8(%rsp), %rax
movzwl 0x12(%rax), %ecx
movq 0x38(%rax), %r8
movzwl 0x10(%rax), %r9d
leaq 0x6f9e3(%rip), %rsi     # 0x9b792
leaq 0x6f9ef(%rip), %rdx     # 0x9b7a5
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
callq 0x4050
movl $0x16, (%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2be17
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
orl %ebp, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
js 0x2bdf2
movl (%r14), %ebx
jmp 0x2be17
leaq 0x6f999(%rip), %rsi     # 0x9b792
leaq 0x6e885(%rip), %rdx     # 0x9a685
movl $0x1, %edi
xorl %eax, %eax
callq 0x14378
callq 0x4050
movl $0xc, (%rax)
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x5, %eax
movq %r13, %r14
movq 0x8(%rsp), %r15
jmp 0x2bbea
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2b510
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2b7bc
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq 0x8(%rsp), %r12
jmp 0x2b101