// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testb $0x1, %bl
jne 0x2f3e9
xorl %eax, %eax
jmp 0x2f40e
leaq 0x66b20(%rip), %rsi     # 0x95f10
leaq 0x66976(%rip), %rdx     # 0x95d6d
leaq 0x68a7b(%rip), %rcx     # 0x97e79
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
testb $0x2, %bl
je 0x2f446
testq %rax, %rax
leaq 0x66950(%rip), %rax     # 0x95d6d
leaq 0x68aa7(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x66ae1(%rip), %rsi     # 0x95f10
leaq 0x68a4a(%rip), %rcx     # 0x97e80
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
testb $0x4, %bl
je 0x2f47e
testq %rax, %rax
leaq 0x66918(%rip), %rax     # 0x95d6d
leaq 0x68a6f(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x66aa9(%rip), %rsi     # 0x95f10
leaq 0x68a1f(%rip), %rcx     # 0x97e8d
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
testb $0x8, %bl
je 0x2f4b6
testq %rax, %rax
leaq 0x668e0(%rip), %rax     # 0x95d6d
leaq 0x68a37(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x66a71(%rip), %rsi     # 0x95f10
leaq 0x689e6(%rip), %rcx     # 0x97e8c
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
testb $0x10, %bl
je 0x2f4ee
testq %rax, %rax
leaq 0x668a8(%rip), %rax     # 0x95d6d
leaq 0x689ff(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x66a39(%rip), %rsi     # 0x95f10
leaq 0x689b6(%rip), %rcx     # 0x97e94
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
testb $0x20, %bl
je 0x2f526
testq %rax, %rax
leaq 0x66870(%rip), %rax     # 0x95d6d
leaq 0x689c7(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x66a01(%rip), %rsi     # 0x95f10
leaq 0x6897d(%rip), %rcx     # 0x97e93
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
testb $0x40, %bl
je 0x2f55e
testq %rax, %rax
leaq 0x66838(%rip), %rax     # 0x95d6d
leaq 0x6898f(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x669c9(%rip), %rsi     # 0x95f10
leaq 0x6894e(%rip), %rcx     # 0x97e9c
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
testb %bl, %bl
jns 0x2f595
testq %rax, %rax
leaq 0x66801(%rip), %rax     # 0x95d6d
leaq 0x68958(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x66992(%rip), %rsi     # 0x95f10
leaq 0x6891d(%rip), %rcx     # 0x97ea2
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
btl $0x8, %ebx
jae 0x2f5ce
testq %rax, %rax
leaq 0x667c8(%rip), %rax     # 0x95d6d
leaq 0x6891f(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x66959(%rip), %rsi     # 0x95f10
leaq 0x688ea(%rip), %rcx     # 0x97ea8
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
btl $0x9, %ebx
jae 0x2f607
testq %rax, %rax
leaq 0x6678f(%rip), %rax     # 0x95d6d
leaq 0x688e6(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x66920(%rip), %rsi     # 0x95f10
leaq 0x688bb(%rip), %rcx     # 0x97eb2
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
btl $0xa, %ebx
jae 0x2f640
testq %rax, %rax
leaq 0x66756(%rip), %rax     # 0x95d6d
leaq 0x688ad(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x668e7(%rip), %rsi     # 0x95f10
leaq 0x68889(%rip), %rcx     # 0x97eb9
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%r14), %rax
btl $0xb, %ebx
jae 0x2f679
testq %rax, %rax
leaq 0x6671d(%rip), %rax     # 0x95d6d
leaq 0x68874(%rip), %rdx     # 0x97ecb
cmoveq %rax, %rdx
leaq 0x668ae(%rip), %rsi     # 0x95f10
leaq 0x68854(%rip), %rcx     # 0x97ebd
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9ab7
movq (%rbx), %rax
testq %rax, %rax
jne 0x2f6ae
movq 0x10(%rsp), %rax
cmpq $0x1, 0x8(%rsp)
ja 0x2f6a8
movl $0x3, %esi
movq %rax, %rdi
callq 0x4840
testq %rax, %rax
je 0x2f6ae
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
jmp 0x2f6aa
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq