// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/sam.c
// Function: bam_flag2str
char *bam_flag2str(int flag)
{
    kstring_t str = {0,0,0};
    if ( flag&BAM_FPAIRED ) ksprintf(&str,"%s%s", str.l?",":"","PAIRED");
    if ( flag&BAM_FPROPER_PAIR ) ksprintf(&str,"%s%s", str.l?",":"","PROPER_PAIR");
    if ( flag&BAM_FUNMAP ) ksprintf(&str,"%s%s", str.l?",":"","UNMAP");
    if ( flag&BAM_FMUNMAP ) ksprintf(&str,"%s%s", str.l?",":"","MUNMAP");
    if ( flag&BAM_FREVERSE ) ksprintf(&str,"%s%s", str.l?",":"","REVERSE");
    if ( flag&BAM_FMREVERSE ) ksprintf(&str,"%s%s", str.l?",":"","MREVERSE");
    if ( flag&BAM_FREAD1 ) ksprintf(&str,"%s%s", str.l?",":"","READ1");
    if ( flag&BAM_FREAD2 ) ksprintf(&str,"%s%s", str.l?",":"","READ2");
    if ( flag&BAM_FSECONDARY ) ksprintf(&str,"%s%s", str.l?",":"","SECONDARY");
    if ( flag&BAM_FQCFAIL ) ksprintf(&str,"%s%s", str.l?",":"","QCFAIL");
    if ( flag&BAM_FDUP ) ksprintf(&str,"%s%s", str.l?",":"","DUP");
    if ( flag&BAM_FSUPPLEMENTARY ) ksprintf(&str,"%s%s", str.l?",":"","SUPPLEMENTARY");
    if ( str.l == 0 ) kputsn("", 0, &str);
    return str.s;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testb $0x1, %bl
je 0x30176
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68b77(%rip), %rax     # 0x98ccd
leaq 0x6ad5b(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68d08(%rip), %rsi     # 0x98e70
leaq 0x6acf7(%rip), %rcx     # 0x9ae66
xorl %eax, %eax
callq 0x9aab
testb $0x2, %bl
je 0x301a9
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68b44(%rip), %rax     # 0x98ccd
leaq 0x6ad28(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68cd5(%rip), %rsi     # 0x98e70
leaq 0x6accb(%rip), %rcx     # 0x9ae6d
xorl %eax, %eax
callq 0x9aab
testb $0x4, %bl
je 0x301dc
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68b11(%rip), %rax     # 0x98ccd
leaq 0x6acf5(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68ca2(%rip), %rsi     # 0x98e70
leaq 0x6aca5(%rip), %rcx     # 0x9ae7a
xorl %eax, %eax
callq 0x9aab
testb $0x8, %bl
je 0x3020f
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68ade(%rip), %rax     # 0x98ccd
leaq 0x6acc2(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68c6f(%rip), %rsi     # 0x98e70
leaq 0x6ac71(%rip), %rcx     # 0x9ae79
xorl %eax, %eax
callq 0x9aab
testb $0x10, %bl
je 0x30242
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68aab(%rip), %rax     # 0x98ccd
leaq 0x6ac8f(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68c3c(%rip), %rsi     # 0x98e70
leaq 0x6ac46(%rip), %rcx     # 0x9ae81
xorl %eax, %eax
callq 0x9aab
testb $0x20, %bl
je 0x30275
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68a78(%rip), %rax     # 0x98ccd
leaq 0x6ac5c(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68c09(%rip), %rsi     # 0x98e70
leaq 0x6ac12(%rip), %rcx     # 0x9ae80
xorl %eax, %eax
callq 0x9aab
testb $0x40, %bl
je 0x302a8
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68a45(%rip), %rax     # 0x98ccd
leaq 0x6ac29(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68bd6(%rip), %rsi     # 0x98e70
leaq 0x6abe8(%rip), %rcx     # 0x9ae89
xorl %eax, %eax
callq 0x9aab
testb %bl, %bl
jns 0x302da
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68a13(%rip), %rax     # 0x98ccd
leaq 0x6abf7(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68ba4(%rip), %rsi     # 0x98e70
leaq 0x6abbc(%rip), %rcx     # 0x9ae8f
xorl %eax, %eax
callq 0x9aab
btl $0x8, %ebx
jae 0x3030e
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x689df(%rip), %rax     # 0x98ccd
leaq 0x6abc3(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68b70(%rip), %rsi     # 0x98e70
leaq 0x6ab8e(%rip), %rcx     # 0x9ae95
xorl %eax, %eax
callq 0x9aab
btl $0x9, %ebx
jae 0x30342
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x689ab(%rip), %rax     # 0x98ccd
leaq 0x6ab8f(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68b3c(%rip), %rsi     # 0x98e70
leaq 0x6ab64(%rip), %rcx     # 0x9ae9f
xorl %eax, %eax
callq 0x9aab
btl $0xa, %ebx
jae 0x30376
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68977(%rip), %rax     # 0x98ccd
leaq 0x6ab5b(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68b08(%rip), %rsi     # 0x98e70
leaq 0x6ab37(%rip), %rcx     # 0x9aea6
xorl %eax, %eax
callq 0x9aab
btl $0xb, %ebx
jae 0x303aa
movq %rsp, %rdi
cmpq $0x0, (%rdi)
leaq 0x68943(%rip), %rax     # 0x98ccd
leaq 0x6ab27(%rip), %rdx     # 0x9aeb8
cmoveq %rax, %rdx
leaq 0x68ad4(%rip), %rsi     # 0x98e70
leaq 0x6ab07(%rip), %rcx     # 0x9aeaa
xorl %eax, %eax
callq 0x9aab
cmpq $0x0, (%rsp)
jne 0x303e8
cmpq $0x1, 0x8(%rsp)
ja 0x303db
movq 0x10(%rsp), %rdi
movl $0x3, %esi
callq 0x4840
testq %rax, %rax
je 0x303e8
movq %rax, 0x10(%rsp)
movq $0x3, 0x8(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq 0x10(%rsp), %rax
addq $0x20, %rsp
popq %rbx
retq