// File: /workspace/github_c_makefile_star2_O0/kkanellis[P]matvec-sparse/mmio.c
// Function: mm_typecode_to_str
char  *mm_typecode_to_str(MM_typecode matcode)
{
    char buffer[MM_MAX_LINE_LENGTH];
    char *types[4];
	char *mm_strdup(const char *);

    /* check for MTX type */
    if (mm_is_matrix(matcode)) 
        types[0] = MM_MTX_STR;
    else
        return NULL;

    /* check for CRD or ARR matrix */
    if (mm_is_sparse(matcode))
        types[1] = MM_SPARSE_STR;
    else
    if (mm_is_dense(matcode))
        types[1] = MM_DENSE_STR;
    else
        return NULL;

    /* check for element data type */
    if (mm_is_real(matcode))
        types[2] = MM_REAL_STR;
    else
    if (mm_is_complex(matcode))
        types[2] = MM_COMPLEX_STR;
    else
    if (mm_is_pattern(matcode))
        types[2] = MM_PATTERN_STR;
    else
    if (mm_is_integer(matcode))
        types[2] = MM_INT_STR;
    else
        return NULL;


    /* check for symmetry type */
    if (mm_is_general(matcode))
        types[3] = MM_GENERAL_STR;
    else
    if (mm_is_symmetric(matcode))
        types[3] = MM_SYMM_STR;
    else 
    if (mm_is_hermitian(matcode))
        types[3] = MM_HERM_STR;
    else 
    if (mm_is_skew(matcode))
        types[3] = MM_SKEW_STR;
    else
        return NULL;

    sprintf(buffer,"%s %s %s %s", types[0], types[1], types[2], types[3]);
    return mm_strdup(buffer);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4d, %eax
jne 0x18ab
leaq 0x2853(%rip), %rax      # 0x40f5
movq %rax, -0x440(%rbp)
jmp 0x18b8
movq $0x0, -0x8(%rbp)
jmp 0x1a4d
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x43, %eax
jne 0x18d5
leaq 0x2830(%rip), %rax      # 0x40fc
movq %rax, -0x438(%rbp)
jmp 0x1901
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x41, %eax
jne 0x18f2
leaq 0x281e(%rip), %rax      # 0x4107
movq %rax, -0x438(%rbp)
jmp 0x18ff
movq $0x0, -0x8(%rbp)
jmp 0x1a4d
jmp 0x1901
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x52, %eax
jne 0x191e
leaq 0x27f8(%rip), %rax      # 0x410d
movq %rax, -0x430(%rbp)
jmp 0x1988
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x43, %eax
jne 0x193b
leaq 0x27e0(%rip), %rax      # 0x4112
movq %rax, -0x430(%rbp)
jmp 0x1986
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x50, %eax
jne 0x1958
leaq 0x27cb(%rip), %rax      # 0x411a
movq %rax, -0x430(%rbp)
jmp 0x1984
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x49, %eax
jne 0x1975
leaq 0x27b6(%rip), %rax      # 0x4122
movq %rax, -0x430(%rbp)
jmp 0x1982
movq $0x0, -0x8(%rbp)
jmp 0x1a4d
jmp 0x1984
jmp 0x1986
jmp 0x1988
movq -0x10(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x47, %eax
jne 0x19a5
leaq 0x278e(%rip), %rax      # 0x412a
movq %rax, -0x428(%rbp)
jmp 0x1a0c
movq -0x10(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x53, %eax
jne 0x19c2
leaq 0x2788(%rip), %rax      # 0x4141
movq %rax, -0x428(%rbp)
jmp 0x1a0a
movq -0x10(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x48, %eax
jne 0x19df
leaq 0x275c(%rip), %rax      # 0x4132
movq %rax, -0x428(%rbp)
jmp 0x1a08
movq -0x10(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x4b, %eax
jne 0x19fc
leaq 0x2749(%rip), %rax      # 0x413c
movq %rax, -0x428(%rbp)
jmp 0x1a06
movq $0x0, -0x8(%rbp)
jmp 0x1a4d
jmp 0x1a08
jmp 0x1a0a
jmp 0x1a0c
leaq -0x420(%rbp), %rdi
movq -0x440(%rbp), %rdx
movq -0x438(%rbp), %rcx
movq -0x430(%rbp), %r8
movq -0x428(%rbp), %r9
leaq 0x26a4(%rip), %rsi      # 0x40da
movb $0x0, %al
callq 0x1140
leaq -0x420(%rbp), %rdi
callq 0x25c0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopw (%rax,%rax)