// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/sam.c
// Function: fastq_format1
int fastq_format1(fastq_state *x, const bam1_t *b, kstring_t *str)
{
    unsigned flag = b->core.flag;
    int i, e = 0, len = b->core.l_qseq;
    uint8_t *seq, *qual;

    str->l = 0;

    // Name
    if (kputc(x->nprefix, str) == EOF || kputs(bam_get_qname(b), str) == EOF)
        return -1;

    // /1 or /2 suffix
    if (x && x->rnum && (flag & BAM_FPAIRED)) {
        int r12 = flag & (BAM_FREAD1 | BAM_FREAD2);
        if (r12 == BAM_FREAD1) {
            if (kputs("/1", str) == EOF)
                return -1;
        } else if (r12 == BAM_FREAD2) {
            if (kputs("/2", str) == EOF)
                return -1;
        }
    }

    // Illumina CASAVA tag.
    // This is <rnum>:<Y/N qcfail>:<control-bits>:<barcode-or-zero>
    if (x && x->casava) {
        int rnum = (flag & BAM_FREAD1)? 1 : (flag & BAM_FREAD2)? 2 : 0;
        char filtered = (flag & BAM_FQCFAIL)? 'Y' : 'N';
        uint8_t *bc = bam_aux_get(b, x->BC);
        if (ksprintf(str, " %d:%c:0:%s", rnum, filtered,
                     bc ? (char *)bc+1 : "0") < 0)
            return -1;

        if (bc && (*bc != 'Z' || (!isupper_c(bc[1]) && !islower_c(bc[1])))) {
            hts_log_warning("BC tag starts with non-sequence base; using '0'");
            str->l -= strlen((char *)bc)-2; // limit to 1 char
            str->s[str->l-1] = '0';
            str->s[str->l] = 0;
            bc = NULL;
        }

        // Replace any non-alpha with '+'.  Ie seq-seq to seq+seq
        if (bc) {
            int l = strlen((char *)bc+1);
            char *c = (char *)str->s + str->l - l;
            for (i = 0; i < l; i++) {
                if (!isalpha_c(c[i]))
                    c[i] = '+';
                else if (islower_c(c[i]))
                    c[i] = toupper_c(c[i]);
            }
        }
    }

    // Aux tags
    if (x && x->aux) {
        uint8_t *s = bam_get_aux(b), *end = b->data + b->l_data;
        while (s && end - s >= 4) {
            int tt = s[0]*256 + s[1];
            if (x->tags == NULL ||
                kh_get(tag, x->tags, tt) != kh_end(x->tags)) {
                e |= kputc_('\t', str) < 0;
                if (!(s = (uint8_t *)sam_format_aux1(s, s[2], s+3, end, str)))
                    return -1;
            } else {
                s = skip_aux(s+2, end);
            }
        }
        e |= kputsn("", 0, str) < 0; // nul terminate
    }

    if (ks_resize(str, str->l + 1 + len+1 + 2 + len+1 + 1) < 0) return -1;
    e |= kputc_('\n', str) < 0;

    // Seq line
    seq = bam_get_seq(b);
    if (flag & BAM_FREVERSE)
        for (i = len-1; i >= 0; i--)
            e |= kputc_("!TGKCYSBAWRDMHVN"[bam_seqi(seq, i)], str) < 0;
    else
        for (i = 0; i < len; i++)
            e |= kputc_(seq_nt16_str[bam_seqi(seq, i)], str) < 0;


    // Qual line
    if (x->nprefix == '@') {
        kputsn("\n+\n", 3, str);
        qual = bam_get_qual(b);
        if (qual[0] == 0xff)
            for (i = 0; i < len; i++)
                e |= kputc_('B', str) < 0;
        else if (flag & BAM_FREVERSE)
            for (i = len-1; i >= 0; i--)
                e |= kputc_(33 + qual[i], str) < 0;
        else
            for (i = 0; i < len; i++)
                e |= kputc_(33 + qual[i], str) < 0;

    }
    e |= kputc('\n', str) < 0;

    return e ? -1 : str->l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movzwl 0x10(%rsi), %r14d
movl 0x18(%rsi), %eax
movq %rax, 0x18(%rsp)
movq $0x0, (%rdx)
movq %rdi, 0x28(%rsp)
movb 0x78(%rdi), %bpl
movq 0x10(%rdx), %rax
cmpq $0x1, 0x8(%rdx)
ja 0x2b41c
movl $0x3, %esi
movq %rax, %rdi
callq 0x4840
testq %rax, %rax
je 0x2b5c0
movq %rax, 0x10(%rbx)
movq $0x3, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x2b41e
xorl %ecx, %ecx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb %bpl, (%rax,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq %r15, 0x20(%rsp)
movq 0x38(%r15), %r13
testq %r13, %r13
je 0x2b4a1
movq %r13, %rdi
callq 0x41d0
movq %rax, %r12
movq (%rbx), %rdi
addq %rdi, %rax
addq $0x2, %rax
cmpq %rdi, %rax
jbe 0x2b5b5
cmpq %rax, 0x8(%rbx)
jae 0x2b4b1
movq %rax, %rcx
shrq $0x3e, %rcx
movq %rax, %rdx
shrq %rdx
xorl %ebp, %ebp
testq %rcx, %rcx
cmoveq %rdx, %rbp
addq %rax, %rbp
movq 0x10(%rbx), %rdi
movq %rbp, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b5c0
movq %rax, 0x10(%rbx)
movq %rbp, 0x8(%rbx)
movq (%rbx), %rdi
jmp 0x2b4b5
callq 0x4050
movl $0xe, (%rax)
jmp 0x2b5c0
movq 0x10(%rbx), %rax
addq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x43c0
movq (%rbx), %rax
addq %r12, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $-0x1, %r12d
je 0x2b5c5
movq 0x28(%rsp), %rax
cmpl $0x0, 0x68(%rax)
sete %al
movl %r14d, %ebp
testb $0x1, %bpl
sete %cl
orb %al, %cl
jne 0x2b5fd
movl %ebp, %eax
andb $-0x40, %al
negb %al
jo 0x2b56b
movl %ebp, %eax
andl $0xc0, %eax
cmpl $0x40, %eax
jne 0x2b5fd
movq (%rbx), %rcx
movq %rcx, %rax
subq $-0x4, %rax
jae 0x2b5b5
cmpq %rax, 0x8(%rbx)
jae 0x2b5d4
movq %rax, %rcx
shrq $0x3e, %rcx
movq %rax, %rdx
shrq %rdx
xorl %r12d, %r12d
testq %rcx, %rcx
cmoveq %rdx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b5c0
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x2b5d8
movq (%rbx), %rcx
movq %rcx, %rax
subq $-0x4, %rax
jae 0x2b5b5
cmpq %rax, 0x8(%rbx)
jae 0x2b5e0
movq %rax, %rcx
shrq $0x3e, %rcx
movq %rax, %rdx
shrq %rdx
xorl %r12d, %r12d
testq %rcx, %rcx
cmoveq %rdx, %r12
addq %rax, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b5c0
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x2b5e4
callq 0x4050
movl $0x4b, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rax
movw $0x312f, (%rax,%rcx)    # imm = 0x312F
jmp 0x2b5ea
movq 0x10(%rbx), %rax
movw $0x322f, (%rax,%rcx)    # imm = 0x322F
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, (%rbx)
movb $0x0, 0x2(%rcx,%rax)
movl %ebp, 0xc(%rsp)
movq 0x28(%rsp), %rax
cmpl $0x0, 0x60(%rax)
je 0x2b749
movl 0xc(%rsp), %ebp
movl %ebp, %eax
shrl $0x6, %eax
andl $0x2, %eax
testb $0x40, %bpl
movl $0x1, %r12d
cmovel %eax, %r12d
movq 0x28(%rsp), %rax
leaq 0x6c(%rax), %rsi
movq 0x20(%rsp), %rdi
callq 0x2beb1
movq %rax, %r13
btl $0x9, %ebp
movl $0x4e, %eax
movl $0x59, %ecx
cmovael %eax, %ecx
leaq 0x1(%r13), %rbp
testq %r13, %r13
leaq 0x6b2b5(%rip), %r8      # 0x96914
cmovneq %rbp, %r8
leaq 0x6c5b4(%rip), %rsi     # 0x97c1e
movq %rbx, %rdi
movl %r12d, %edx
xorl %eax, %eax
callq 0x9ab7
testl %eax, %eax
js 0x2b5c0
testq %r13, %r13
je 0x2b749
cmpb $0x5a, (%r13)
jne 0x2b706
movzbl (%rbp), %r14d
callq 0x4510
movq %rax, %r12
movq (%rax), %rax
testb $0x3, 0x1(%rax,%r14,2)
je 0x2b706
movq %rbp, %rdi
callq 0x41d0
movq %rax, %r13
testl %r13d, %r13d
jle 0x2b749
movq 0x10(%rbx), %r14
addq (%rbx), %r14
movslq %r13d, %rax
subq %rax, %r14
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movzbl (%r14,%r15), %ebp
movq (%r12), %rax
movzwl (%rax,%rbp,2), %eax
movb $0x2b, %cl
btl $0xa, %eax
jae 0x2b6f8
btl $0x9, %eax
jae 0x2b6fc
callq 0x40a0
movq (%rax), %rax
movb (%rax,%rbp,4), %cl
movb %cl, (%r14,%r15)
incq %r15
cmpq %r15, %r13
jne 0x2b6d2
jmp 0x2b749
leaq 0x6c51d(%rip), %rsi     # 0x97c2a
leaq 0x6c524(%rip), %rdx     # 0x97c38
movl $0x3, %edi
xorl %eax, %eax
callq 0x13de5
movq %r13, %rdi
callq 0x41d0
movq (%rbx), %rcx
movq 0x10(%rbx), %rdx
subq %rax, %rcx
leaq 0x2(%rcx), %rax
movq %rax, (%rbx)
movb $0x30, 0x1(%rdx,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq 0x28(%rsp), %rax
cmpl $0x0, 0x64(%rax)
je 0x2b935
movq 0x20(%rsp), %rsi
movq 0x38(%rsi), %rdi
movl 0x14(%rsi), %ecx
shll $0x2, %ecx
movzwl 0x12(%rsi), %eax
addq %rdi, %rax
addq %rcx, %rax
movslq 0x18(%rsi), %rcx
leal 0x1(%rcx), %edx
sarl %edx
movslq %edx, %rdx
addq %rcx, %rax
addq %rdx, %rax
movslq 0x40(%rsi), %r13
addq %rdi, %r13
xorl %r14d, %r14d
movq %r14, 0x30(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x2b916
movq %r13, %rax
subq 0x10(%rsp), %rax
cmpq $0x4, %rax
jl 0x2b916
movq 0x28(%rsp), %rax
movq 0x70(%rax), %rbp
movq 0x10(%rsp), %rax
testq %rbp, %rbp
je 0x2b86e
movl (%rbp), %edx
testl %edx, %edx
je 0x2b83b
movzwl (%rax), %ecx
rolw $0x8, %cx
movzwl %cx, %edi
leal -0x1(%rdx), %r8d
movl %r8d, %r9d
andl %edi, %r9d
movq 0x10(%rbp), %r10
movl $0x1, %r11d
movl %r9d, %esi
movl %esi, %ecx
shrl $0x4, %ecx
movl (%r10,%rcx,4), %r14d
leal (%rsi,%rsi), %ecx
andl $0x1e, %ecx
movl %r14d, %r15d
shrl %cl, %r15d
testb $0x2, %r15b
jne 0x2b82f
testb $0x1, %r15b
jne 0x2b81f
movq 0x18(%rbp), %r15
movl %esi, %r12d
cmpl %edi, (%r15,%r12,4)
je 0x2b82f
addl %r11d, %esi
andl %r8d, %esi
incl %r11d
cmpl %r9d, %esi
jne 0x2b7f1
jmp 0x2b841
shrl %cl, %r14d
testb $0x3, %r14b
cmovnel %edx, %esi
jmp 0x2b83d
xorl %esi, %esi
cmpl %edx, %esi
jne 0x2b875
addq $0x2, %rax
movq %rax, %rdi
movq %r13, %rsi
callq 0x2ce89
testq %rax, %rax
je 0x2b916
movq %r13, %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
jge 0x2b7c0
jmp 0x2b916
movq 0x10(%rsp), %rdi
jmp 0x2b878
movq %rax, %rdi
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x2b8d1
movq %rdi, %r15
movq %rcx, %rax
shrq %rax
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rcx
movl $0x0, %ebp
cmovbeq %rax, %rbp
addq %rcx, %rbp
movq 0x10(%rbx), %rdi
movq %rbp, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b907
movq %rax, 0x10(%rbx)
movq %rbp, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq 0x30(%rsp), %r14
movq %r15, %rdi
jmp 0x2b8da
movq 0x10(%rbx), %rax
movq 0x30(%rsp), %r14
movq %rcx, (%rbx)
movb $0x9, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %r14d
movzbl 0x2(%rdi), %esi
leaq 0x3(%rdi), %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x2bf5c
testq %rax, %rax
jne 0x2b78d
jmp 0x2b5c0
movl $0x1, %eax
movq 0x30(%rsp), %r14
movq %r15, %rdi
jmp 0x2b8e3
leaq 0x6a450(%rip), %rdi     # 0x95d6d
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2706e
movl %eax, %r12d
shrl $0x1f, %r12d
orl 0x30(%rsp), %r12d
jmp 0x2b938
xorl %r12d, %r12d
movslq 0x18(%rsp), %rax
movq (%rbx), %rcx
movq 0x8(%rbx), %r13
leaq (%rcx,%rax,2), %rax
addq $0x6, %rax
cmpq %rax, %r13
jae 0x2b98e
movq %rax, %rcx
shrq %rcx
xorl %r13d, %r13d
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %r13
addq %rax, %r13
movq 0x10(%rbx), %rdi
movq %r13, %rsi
callq 0x4840
testq %rax, %rax
je 0x2b5c0
movq %rax, 0x10(%rbx)
movq %r13, 0x8(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
cmpq %rdx, %r13
jae 0x2b9da
movq %rdx, %rax
shrq %rax
xorl %r13d, %r13d
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rcx, %rdx
cmovbeq %rax, %r13
addq %rdx, %r13
movq 0x10(%rbx), %rdi
movq %r13, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bc29
movq %rax, 0x10(%rbx)
movq %r13, 0x8(%rbx)
movq (%rbx), %rcx
leaq 0x1(%rcx), %rdx
jmp 0x2b9de
movq 0x10(%rbx), %rax
movq 0x18(%rsp), %rsi
movl 0xc(%rsp), %edi
movq 0x20(%rsp), %r8
movq %rdx, (%rbx)
movb $0xa, (%rax,%rcx)
xorl %ebp, %ebp
movl 0x14(%r8), %eax
shll $0x2, %eax
addq 0x38(%r8), %rax
orl %r12d, %ebp
movzwl 0x12(%r8), %r8d
addq %rax, %r8
testb $0x10, %dil
movq %r8, 0x10(%rsp)
jne 0x2bade
testl %esi, %esi
jle 0x2bba2
xorl %r14d, %r14d
leaq 0x6a034(%rip), %rsi     # 0x95a60
xorl %r15d, %r15d
movl %r15d, %eax
shrl %eax
movzbl (%r8,%rax), %eax
movl %r14d, %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %eax
andl $0xf, %eax
movb (%rsi,%rax), %r13b
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x2baa5
movq %rcx, %rax
shrq %rax
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rcx
movl $0x0, %r12d
cmovbeq %rax, %r12
addq %rcx, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bacb
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq 0x10(%rsp), %r8
leaq 0x69fbd(%rip), %rsi     # 0x95a60
jmp 0x2baa9
movq 0x10(%rbx), %rax
movq %rcx, (%rbx)
movb %r13b, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %ebp
incl %r15d
addl $0x4, %r14d
cmpl %r15d, 0x18(%rsp)
jne 0x2ba2f
jmp 0x2bba2
movl $0x1, %eax
movq 0x10(%rsp), %r8
leaq 0x69f84(%rip), %rsi     # 0x95a60
jmp 0x2bab2
testl %esi, %esi
jle 0x2bba2
leal 0x1(%rsi), %r15d
leal (,%rsi,4), %r14d
leaq 0x6c16f(%rip), %rsi     # 0x97c68
leal -0x2(%r15), %eax
shrl %eax
movzbl (%r8,%rax), %eax
movl %r14d, %ecx
andb $0x4, %cl
shrl %cl, %eax
andl $0xf, %eax
movb (%rax,%rsi), %r13b
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x2bb6d
movq %rcx, %r12
shrq %r12
movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rax, %rcx
movl $0x0, %eax
cmovaq %rax, %r12
addq %rcx, %r12
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bb8f
movq %rax, 0x10(%rbx)
movq %r12, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq 0x10(%rsp), %r8
leaq 0x6c0fd(%rip), %rsi     # 0x97c68
jmp 0x2bb71
movq 0x10(%rbx), %rax
movq %rcx, (%rbx)
movb %r13b, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %ebp
decl %r15d
addl $-0x4, %r14d
cmpl $0x1, %r15d
ja 0x2baf9
jmp 0x2bba2
movl $0x1, %eax
movq 0x10(%rsp), %r8
leaq 0x6c0c8(%rip), %rsi     # 0x97c68
jmp 0x2bb7a
movq 0x28(%rsp), %rax
cmpb $0x40, 0x78(%rax)
jne 0x2be32
movq (%rbx), %rcx
movq %rcx, %rax
subq $-0x5, %rax
jae 0x2bc0d
cmpq %rax, 0x8(%rbx)
movq 0x18(%rsp), %r12
movl 0xc(%rsp), %r14d
movq 0x20(%rsp), %r13
jae 0x2bc41
movq %rax, %rcx
shrq %rcx
xorl %r15d, %r15d
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %r15
addq %rax, %r15
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bc63
movq %rax, 0x10(%rbx)
movq %r15, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x2bc45
callq 0x4050
movl $0x4b, (%rax)
movq 0x18(%rsp), %r12
movl 0xc(%rsp), %r14d
movq 0x20(%rsp), %r13
jmp 0x2bc63
movl $0x1, %ebp
movq 0x18(%rsp), %rsi
movl 0xc(%rsp), %edi
movq 0x20(%rsp), %r8
jmp 0x2b9f5
movq 0x10(%rbx), %rax
movb $0xa, 0x2(%rax,%rcx)
movw $0x2b0a, (%rax,%rcx)    # imm = 0x2B0A
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
leaq 0x3(%rax), %rdx
movq %rdx, (%rbx)
movb $0x0, 0x3(%rcx,%rax)
movq 0x38(%r13), %rax
movl 0x14(%r13), %ecx
movl 0x18(%r13), %edx
shll $0x2, %ecx
movzwl 0x12(%r13), %esi
leaq (%rax,%rsi), %r15
addq %rcx, %r15
incl %edx
sarl %edx
movslq %edx, %rdx
cmpb $-0x1, (%rdx,%r15)
je 0x2bd25
testb $0x10, %r14b
jne 0x2bd9a
testl %r12d, %r12d
jle 0x2be32
addq %rdx, %r15
xorl %r12d, %r12d
movb (%r15,%r12), %r13b
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x2bcfc
movq %rcx, %rax
shrq %rax
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rcx
movl $0x0, %r14d
cmovbeq %rax, %r14
addq %rcx, %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bd1e
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
jmp 0x2bd00
movq 0x10(%rbx), %rax
addb $0x21, %r13b
movq %rcx, (%rbx)
movb %r13b, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %ebp
incq %r12
cmpq %r12, 0x18(%rsp)
jne 0x2bca9
jmp 0x2be32
movl $0x1, %eax
jmp 0x2bd0d
testl %r12d, %r12d
jle 0x2be32
xorl %r15d, %r15d
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x2bd7a
movq %rcx, %r14
shrq %r14
movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rax, %rcx
cmovaq %r15, %r14
addq %rcx, %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4840
testq %rax, %rax
je 0x2bd93
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
jmp 0x2bd7e
movq 0x10(%rbx), %rax
movq %rcx, (%rbx)
movb $0x42, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %ebp
decl %r12d
jne 0x2bd31
jmp 0x2be32
movl $0x1, %eax
jmp 0x2bd87
testl %r12d, %r12d
jle 0x2be32
leaq 0x1(%r12), %r15
addq %rsi, %rdx
addq %r12, %rcx
addq %rdx, %rcx
leaq (%rax,%rcx), %r12
decq %r12
movb (%r12), %r13b
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq %rcx, 0x8(%rbx)
jae 0x2be0a
movq %rcx, %r14
shrq %r14
movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rax, %rcx
movl $0x0, %eax
cmovaq %rax, %r14
addq %rcx, %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4840
testq %rax, %rax
je 0x2be2b
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
jmp 0x2be0e
movq 0x10(%rbx), %rax
addb $0x21, %r13b
movq %rcx, (%rbx)
movb %r13b, (%rax,%rdx)
xorl %eax, %eax
orl %eax, %ebp
decq %r15
decq %r12
cmpq $0x1, %r15
ja 0x2bdb8
jmp 0x2be32
movl $0x1, %eax
jmp 0x2be1b
movq (%rbx), %rcx
leaq 0x2(%rcx), %rax
cmpq %rax, 0x8(%rbx)
jae 0x2be7a
movq %rax, %rcx
shrq %rcx
xorl %r14d, %r14d
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rdx, %rax
cmovbeq %rcx, %r14
addq %rax, %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4840
testq %rax, %rax
je 0x2beaa
movq %rax, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq (%rbx), %rcx
jmp 0x2be7e
movq 0x10(%rbx), %rax
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbx)
movb $0xa, (%rax,%rcx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
xorl %eax, %eax
orl %ebp, %eax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x2b5c5
movl (%rbx), %eax
jmp 0x2b5c5
movl $0x1, %eax
jmp 0x2be96