// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x4250
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x42af9
movq -0x20(%rbp), %rcx
leaq 0xad4a4(%rip), %rdx     # 0xeff75
leaq 0xaf911(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad65d(%rip), %rsi     # 0xf0148
leaq 0xaf8a5(%rip), %rcx     # 0xf2397
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x42b37
movq -0x20(%rbp), %rcx
leaq 0xad466(%rip), %rdx     # 0xeff75
leaq 0xaf8d3(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad61f(%rip), %rsi     # 0xf0148
leaq 0xaf86e(%rip), %rcx     # 0xf239e
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x42b75
movq -0x20(%rbp), %rcx
leaq 0xad428(%rip), %rdx     # 0xeff75
leaq 0xaf895(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad5e1(%rip), %rsi     # 0xf0148
leaq 0xaf83d(%rip), %rcx     # 0xf23ab
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x42bb3
movq -0x20(%rbp), %rcx
leaq 0xad3ea(%rip), %rdx     # 0xeff75
leaq 0xaf857(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad5a3(%rip), %rsi     # 0xf0148
leaq 0xaf7fe(%rip), %rcx     # 0xf23aa
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x42bf1
movq -0x20(%rbp), %rcx
leaq 0xad3ac(%rip), %rdx     # 0xeff75
leaq 0xaf819(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad565(%rip), %rsi     # 0xf0148
leaq 0xaf7c8(%rip), %rcx     # 0xf23b2
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x42c2f
movq -0x20(%rbp), %rcx
leaq 0xad36e(%rip), %rdx     # 0xeff75
leaq 0xaf7db(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad527(%rip), %rsi     # 0xf0148
leaq 0xaf789(%rip), %rcx     # 0xf23b1
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x42c6d
movq -0x20(%rbp), %rcx
leaq 0xad330(%rip), %rdx     # 0xeff75
leaq 0xaf79d(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad4e9(%rip), %rsi     # 0xf0148
leaq 0xaf754(%rip), %rcx     # 0xf23ba
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x42cad
movq -0x20(%rbp), %rcx
leaq 0xad2f0(%rip), %rdx     # 0xeff75
leaq 0xaf75d(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad4a9(%rip), %rsi     # 0xf0148
leaq 0xaf71a(%rip), %rcx     # 0xf23c0
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x42ced
movq -0x20(%rbp), %rcx
leaq 0xad2b0(%rip), %rdx     # 0xeff75
leaq 0xaf71d(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad469(%rip), %rsi     # 0xf0148
leaq 0xaf6e0(%rip), %rcx     # 0xf23c6
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x42d2d
movq -0x20(%rbp), %rcx
leaq 0xad270(%rip), %rdx     # 0xeff75
leaq 0xaf6dd(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad429(%rip), %rsi     # 0xf0148
leaq 0xaf6aa(%rip), %rcx     # 0xf23d0
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x42d6d
movq -0x20(%rbp), %rcx
leaq 0xad230(%rip), %rdx     # 0xeff75
leaq 0xaf69d(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad3e9(%rip), %rsi     # 0xf0148
leaq 0xaf671(%rip), %rcx     # 0xf23d7
movb $0x0, %al
callq 0xb040
movl -0x4(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x42dad
movq -0x20(%rbp), %rcx
leaq 0xad1f0(%rip), %rdx     # 0xeff75
leaq 0xaf65d(%rip), %rax     # 0xf23e9
cmpq $0x0, %rcx
cmovneq %rax, %rdx
leaq -0x20(%rbp), %rdi
leaq 0xad3a9(%rip), %rsi     # 0xf0148
leaq 0xaf635(%rip), %rcx     # 0xf23db
movb $0x0, %al
callq 0xb040
cmpq $0x0, -0x20(%rbp)
jne 0x42dc8
leaq 0xad1ba(%rip), %rdi     # 0xeff75
xorl %eax, %eax
movl %eax, %esi
leaq -0x20(%rbp), %rdx
callq 0x38ef0
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)