// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/pileup.c
// Function: print_pileup_seq
static int print_pileup_seq(const bam_pileup1_t *p, int n) {
    kstring_t ks = { 0, 0, NULL };
    int i;

    for (i = 0; i < n; i++, p++) {
        uint8_t *seq = bam_get_seq(p->b);
        int del_len, is_rev = bam_is_rev(p->b);

        if (p->is_head)
            putchar('^'), putchar('!'+MIN(p->b->core.qual,93));

        if (p->is_del)
            putchar(p->is_refskip ? (is_rev ? '<' : '>') : '*');
        else {
            unsigned char c = seq_nt16_str[bam_seqi(seq, p->qpos)];
            putchar(is_rev ? tolower(c) : toupper(c));
        }

        del_len = -p->indel;
        if (p->indel > 0) {
            int j, len = bam_plp_insertion(p, &ks, &del_len);
            if (len < 0) {
                perror("bam_plp_insertion");
                goto fail;
            }
            printf("%+d(", len);
            for (j = 0; j < len; j++)
                putchar(is_rev ?
                        tolower((uint8_t) ks.s[j]) :
                        toupper((uint8_t) ks.s[j]));
            putchar(')');
        }
        if (del_len > 0) {
            printf("-%d()", del_len);
        }
        if (p->is_tail)
            putchar('$');
    }
    free(ks.s);
    return 0;

 fail:
    free(ks.s);
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x4260
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x62bf
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl 0x14(%rcx), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movzwl 0x12(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzwl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
shrl %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6110
movl $0x5e, %edi
callq 0x46a0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0xe(%rax), %eax
cmpl $0x5d, %eax
jge 0x60fb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0xe(%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x6105
movl $0x5d, %eax
movl %eax, -0x58(%rbp)
jmp 0x6105
movl -0x58(%rbp), %edi
addl $0x21, %edi
callq 0x46a0
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x615d
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
shrl $0x3, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x6149
movl -0x48(%rbp), %edx
movl $0x3e, %eax
movl $0x3c, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x5c(%rbp)
jmp 0x6153
movl $0x2a, %eax
movl %eax, -0x5c(%rbp)
jmp 0x6153
movl -0x5c(%rbp), %edi
callq 0x46a0
jmp 0x61be
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
sarl %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
xorl $-0x1, %ecx
andl $0x1, %ecx
shll $0x2, %ecx
sarl %cl, %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0xe0310(%rip), %rax     # 0xe64a0
movb (%rax,%rcx), %al
movb %al, -0x49(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x61aa
movzbl -0x49(%rbp), %edi
callq 0x4720
movl %eax, -0x60(%rbp)
jmp 0x61b6
movzbl -0x49(%rbp), %edi
callq 0x4950
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %edi
callq 0x46a0
movq -0x10(%rbp), %rcx
xorl %eax, %eax
subl 0xc(%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jle 0x6270
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x44(%rbp), %rdx
callq 0x2f360
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jge 0x6203
leaq 0xdfee6(%rip), %rdi     # 0xe60df
callq 0x43d0
jmp 0x62d1
movl -0x54(%rbp), %esi
leaq 0xdfee4(%rip), %rdi     # 0xe60f1
movb $0x0, %al
callq 0x4060
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x6266
cmpl $0x0, -0x48(%rbp)
je 0x623f
movq -0x20(%rbp), %rax
movslq -0x50(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x4720
movl %eax, -0x64(%rbp)
jmp 0x6253
movq -0x20(%rbp), %rax
movslq -0x50(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x4950
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %edi
callq 0x46a0
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x621b
movl $0x29, %edi
callq 0x46a0
cmpl $0x0, -0x44(%rbp)
jle 0x6287
movl -0x44(%rbp), %esi
leaq 0xdfe76(%rip), %rdi     # 0xe60f6
movb $0x0, %al
callq 0x4060
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
shrl $0x2, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x62a3
movl $0x24, %edi
callq 0x46a0
jmp 0x62a5
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x10(%rbp)
jmp 0x6066
movq -0x20(%rbp), %rdi
callq 0x45b0
movl $0x0, -0x4(%rbp)
jmp 0x62e1
movq -0x20(%rbp), %rdi
callq 0x45b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)