// File: /workspace/github_c_makefile_star2_O0/kkanellis[P]matvec-sparse/mmio.c
// Function: mm_read_mtx_crd_data
int mm_read_mtx_crd_data(FILE *f, int M, int N, int nz, int I[], int J[],
        double val[], MM_typecode matcode)
{
    int i;
    if (mm_is_complex(matcode))
    {
        for (i=0; i<nz; i++)
            if (fscanf(f, "%d %d %lg %lg", &I[i], &J[i], &val[2*i], &val[2*i+1])
                != 4) return MM_PREMATURE_EOF;
    }
    else if (mm_is_real(matcode))
    {
        for (i=0; i<nz; i++)
        {
            if (fscanf(f, "%d %d %lg\n", &I[i], &J[i], &val[i])
                != 3) return MM_PREMATURE_EOF;

        }
    }

    else if (mm_is_pattern(matcode))
    {
        for (i=0; i<nz; i++)
            if (fscanf(f, "%d %d", &I[i], &J[i])
                != 2) return MM_PREMATURE_EOF;
    }
    else
        return MM_UNSUPPORTED_TYPE;

    return 0;
        
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq 0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x43, %eax
jne 0x1e3f
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1e3a
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
movq -0x30(%rbp), %rcx
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
movq 0x10(%rbp), %r8
movl -0x34(%rbp), %eax
shll %eax
cltq
shlq $0x3, %rax
addq %rax, %r8
movq 0x10(%rbp), %r9
movl -0x34(%rbp), %eax
shll %eax
addl $0x1, %eax
cltq
shlq $0x3, %rax
addq %rax, %r9
leaq 0x2349(%rip), %rsi      # 0x415e
movb $0x0, %al
callq 0x1060
cmpl $0x4, %eax
je 0x1e2d
movl $0xc, -0x4(%rbp)
jmp 0x1f37
jmp 0x1e2f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1dbd
jmp 0x1f30
movq 0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x52, %eax
jne 0x1eba
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1eb8
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
movq -0x30(%rbp), %rcx
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
movq 0x10(%rbp), %r8
movslq -0x34(%rbp), %rax
shlq $0x3, %rax
addq %rax, %r8
leaq 0x2239(%rip), %rsi      # 0x40cc
movb $0x0, %al
callq 0x1060
cmpl $0x3, %eax
je 0x1eab
movl $0xc, -0x4(%rbp)
jmp 0x1f37
jmp 0x1ead
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1e53
jmp 0x1f2e
movq 0x18(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x50, %eax
jne 0x1f23
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1f21
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
movq -0x30(%rbp), %rcx
movslq -0x34(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
leaq 0x2259(%rip), %rsi      # 0x4158
movb $0x0, %al
callq 0x1060
cmpl $0x2, %eax
je 0x1f14
movl $0xc, -0x4(%rbp)
jmp 0x1f37
jmp 0x1f16
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1ece
jmp 0x1f2c
movl $0xf, -0x4(%rbp)
jmp 0x1f37
jmp 0x1f2e
jmp 0x1f30
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq