// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/test-bcf-sr.c
// Function: write_summary_format
void write_summary_format(bcf_srs_t *sr, FILE *out)
{
    int n, i, j;
    while ((n = bcf_sr_next_line(sr)) > 0) {
        for (i=0; i<sr->nreaders; i++)
        {
            if ( !bcf_sr_has_line(sr,i) ) continue;
            bcf1_t *rec = bcf_sr_get_line(sr, i);
            if (!rec) error("bcf_sr_get_line() unexpectedly returned NULL\n");
            fprintf(out, "%s:%"PRIhts_pos,
                    bcf_seqname_safe(bcf_sr_get_header(sr,i),rec),rec->pos+1);
            break;
        }

        for (i=0; i<sr->nreaders; i++)
        {
            fprintf(out, "\t");

            if ( !bcf_sr_has_line(sr,i) )
            {
                fprintf(out, "%s","-");
                continue;
            }

            bcf1_t *rec = bcf_sr_get_line(sr, i);
            if (!rec) error("bcf_sr_get_line() unexpectedly returned NULL\n");
            fprintf(out, "%s", rec->n_allele > 1 ? rec->d.allele[1] : ".");
            for (j=2; j<rec->n_allele; j++)
            {
                fprintf(out, ",%s", rec->d.allele[j]);
            }
        }
        fprintf(out, "\n");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x39a40
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x5f51
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x5dd2
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x5d23
jmp 0x5dc4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x5d55
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x5d5d
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x5d5d
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x5d7a
leaq 0x108524(%rip), %rdi    # 0x10e297
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x5f60
movq -0x40(%rbp), %rdi
movq %rax, %rdx
movq -0x28(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x10ea8c(%rip), %rsi    # 0x114847
movb $0x0, %al
callq 0x46f0
jmp 0x5dd2
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5cfc
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0x5f3a
movq -0x10(%rbp), %rdi
leaq 0x10b9f4(%rip), %rsi    # 0x1117e8
movb $0x0, %al
callq 0x46f0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x5e2b
movq -0x10(%rbp), %rdi
leaq 0x10d3a8(%rip), %rsi    # 0x1131c0
leaq 0x10b109(%rip), %rdx    # 0x110f28
movb $0x0, %al
callq 0x46f0
jmp 0x5f2c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x5e5d
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x5e65
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x5e65
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x5e82
leaq 0x10841c(%rip), %rdi    # 0x10e297
movb $0x0, %al
callq 0x5ae0
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpl $0x1, %eax
jle 0x5eb6
movq -0x30(%rbp), %rax
movq 0x88(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x5ec3
leaq 0x10dc28(%rip), %rax    # 0x113ae5
movq %rax, -0x58(%rbp)
jmp 0x5ec3
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0x10d2ee(%rip), %rsi    # 0x1131c0
movb $0x0, %al
callq 0x46f0
movl $0x2, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
cmpl %ecx, %eax
jge 0x5f2a
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x88(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x1083ad(%rip), %rsi    # 0x10e2c5
movb $0x0, %al
callq 0x46f0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5ee0
jmp 0x5f2c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5dd9
movq -0x10(%rbp), %rdi
leaq 0x1085d3(%rip), %rsi    # 0x10e518
movb $0x0, %al
callq 0x46f0
jmp 0x5ce0
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)