// File: /workspace/github_cpp_makefile_star2_O3/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)
movq $0x0, 0x10(%rsp)
testb $0x1, %bl
jne 0x1a673
xorl %eax, %eax
jmp 0x1a698
leaq 0x37135(%rip), %rsi     # 0x517af
leaq 0x36532(%rip), %rdx     # 0x50bb3
leaq 0x370d5(%rip), %rcx     # 0x5175d
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
testb $0x2, %bl
je 0x1a6d0
testq %rax, %rax
leaq 0x3650c(%rip), %rax     # 0x50bb3
leaq 0x37106(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x370f6(%rip), %rsi     # 0x517af
leaq 0x370a4(%rip), %rcx     # 0x51764
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
testb $0x4, %bl
je 0x1a708
testq %rax, %rax
leaq 0x364d4(%rip), %rax     # 0x50bb3
leaq 0x370ce(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x370be(%rip), %rsi     # 0x517af
leaq 0x37079(%rip), %rcx     # 0x51771
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
testb $0x8, %bl
je 0x1a740
testq %rax, %rax
leaq 0x3649c(%rip), %rax     # 0x50bb3
leaq 0x37096(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x37086(%rip), %rsi     # 0x517af
leaq 0x37040(%rip), %rcx     # 0x51770
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
testb $0x10, %bl
je 0x1a778
testq %rax, %rax
leaq 0x36464(%rip), %rax     # 0x50bb3
leaq 0x3705e(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x3704e(%rip), %rsi     # 0x517af
leaq 0x37010(%rip), %rcx     # 0x51778
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
testb $0x20, %bl
je 0x1a7b0
testq %rax, %rax
leaq 0x3642c(%rip), %rax     # 0x50bb3
leaq 0x37026(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x37016(%rip), %rsi     # 0x517af
leaq 0x36fd7(%rip), %rcx     # 0x51777
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
testb $0x40, %bl
je 0x1a7e8
testq %rax, %rax
leaq 0x363f4(%rip), %rax     # 0x50bb3
leaq 0x36fee(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x36fde(%rip), %rsi     # 0x517af
leaq 0x36fa8(%rip), %rcx     # 0x51780
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
testb %bl, %bl
jns 0x1a81f
testq %rax, %rax
leaq 0x363bd(%rip), %rax     # 0x50bb3
leaq 0x36fb7(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x36fa7(%rip), %rsi     # 0x517af
leaq 0x36f77(%rip), %rcx     # 0x51786
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
btl $0x8, %ebx
jae 0x1a858
testq %rax, %rax
leaq 0x36384(%rip), %rax     # 0x50bb3
leaq 0x36f7e(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x36f6e(%rip), %rsi     # 0x517af
leaq 0x36f44(%rip), %rcx     # 0x5178c
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
btl $0x9, %ebx
jae 0x1a891
testq %rax, %rax
leaq 0x3634b(%rip), %rax     # 0x50bb3
leaq 0x36f45(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x36f35(%rip), %rsi     # 0x517af
leaq 0x36f15(%rip), %rcx     # 0x51796
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
btl $0xa, %ebx
jae 0x1a8ca
testq %rax, %rax
leaq 0x36312(%rip), %rax     # 0x50bb3
leaq 0x36f0c(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x36efc(%rip), %rsi     # 0x517af
leaq 0x36ee3(%rip), %rcx     # 0x5179d
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%r14), %rax
btl $0xb, %ebx
jae 0x1a903
testq %rax, %rax
leaq 0x362d9(%rip), %rax     # 0x50bb3
leaq 0x36ed3(%rip), %rdx     # 0x517b4
cmoveq %rax, %rdx
leaq 0x36ec3(%rip), %rsi     # 0x517af
leaq 0x36eae(%rip), %rcx     # 0x517a1
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41f38
movq (%rbx), %rax
testq %rax, %rax
jne 0x1a938
movq 0x10(%rsp), %rax
cmpq $0x1, 0x8(%rsp)
ja 0x1a932
movl $0x2, %esi
movq %rax, %rdi
callq 0x48d0
testq %rax, %rax
je 0x1a938
movq %rax, 0x10(%rsp)
movq (%rsp), %rcx
jmp 0x1a934
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq