// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/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)
andq $0x0, 0x10(%rsp)
testb $0x1, %bl
jne 0x1446d
xorl %eax, %eax
jmp 0x14492
leaq 0x302af(%rip), %rsi     # 0x44723
leaq 0x2f771(%rip), %rdx     # 0x43bec
leaq 0x3024f(%rip), %rcx     # 0x446d1
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
testb $0x2, %bl
je 0x144ca
testq %rax, %rax
leaq 0x2f74b(%rip), %rax     # 0x43bec
leaq 0x30280(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x30270(%rip), %rsi     # 0x44723
leaq 0x3021e(%rip), %rcx     # 0x446d8
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
testb $0x4, %bl
je 0x14502
testq %rax, %rax
leaq 0x2f713(%rip), %rax     # 0x43bec
leaq 0x30248(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x30238(%rip), %rsi     # 0x44723
leaq 0x301f3(%rip), %rcx     # 0x446e5
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
testb $0x8, %bl
je 0x1453a
testq %rax, %rax
leaq 0x2f6db(%rip), %rax     # 0x43bec
leaq 0x30210(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x30200(%rip), %rsi     # 0x44723
leaq 0x301ba(%rip), %rcx     # 0x446e4
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
testb $0x10, %bl
je 0x14572
testq %rax, %rax
leaq 0x2f6a3(%rip), %rax     # 0x43bec
leaq 0x301d8(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x301c8(%rip), %rsi     # 0x44723
leaq 0x3018a(%rip), %rcx     # 0x446ec
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
testb $0x20, %bl
je 0x145aa
testq %rax, %rax
leaq 0x2f66b(%rip), %rax     # 0x43bec
leaq 0x301a0(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x30190(%rip), %rsi     # 0x44723
leaq 0x30151(%rip), %rcx     # 0x446eb
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
testb $0x40, %bl
je 0x145e2
testq %rax, %rax
leaq 0x2f633(%rip), %rax     # 0x43bec
leaq 0x30168(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x30158(%rip), %rsi     # 0x44723
leaq 0x30122(%rip), %rcx     # 0x446f4
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
testb %bl, %bl
jns 0x14619
testq %rax, %rax
leaq 0x2f5fc(%rip), %rax     # 0x43bec
leaq 0x30131(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x30121(%rip), %rsi     # 0x44723
leaq 0x300f1(%rip), %rcx     # 0x446fa
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
btl $0x8, %ebx
jae 0x14652
testq %rax, %rax
leaq 0x2f5c3(%rip), %rax     # 0x43bec
leaq 0x300f8(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x300e8(%rip), %rsi     # 0x44723
leaq 0x300be(%rip), %rcx     # 0x44700
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
btl $0x9, %ebx
jae 0x1468b
testq %rax, %rax
leaq 0x2f58a(%rip), %rax     # 0x43bec
leaq 0x300bf(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x300af(%rip), %rsi     # 0x44723
leaq 0x3008f(%rip), %rcx     # 0x4470a
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
btl $0xa, %ebx
jae 0x146c4
testq %rax, %rax
leaq 0x2f551(%rip), %rax     # 0x43bec
leaq 0x30086(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x30076(%rip), %rsi     # 0x44723
leaq 0x3005d(%rip), %rcx     # 0x44711
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x35818
movq (%r14), %rax
btl $0xb, %ebx
jae 0x146fd
testq %rax, %rax
leaq 0x2f518(%rip), %rax     # 0x43bec
leaq 0x3004d(%rip), %rdx     # 0x44728
cmoveq %rax, %rdx
leaq 0x3003d(%rip), %rsi     # 0x44723
leaq 0x30028(%rip), %rcx     # 0x44715
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x35818
movq (%rbx), %rax
testq %rax, %rax
jne 0x14713
leaq 0x2f4e3(%rip), %rdi     # 0x43bec
movq %rsp, %rdx
xorl %esi, %esi
callq 0x12090
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq