// File: /workspace/github_cpp_makefile_star2_O2/syzcch[P]FEC_C_version/./fec_rs.h
// Function: rscode::gf_make_dispersal_matrix(int, int)
int *gf_make_dispersal_matrix(int rows, int cols)
    {
        int *vdm, i, j, k, l, inv, tmp, colindex;

        vdm = gf_make_vandermonde(rows, cols);


        for (i = 0; i < cols && i < rows; i++)
        {
            j = find_swap_row(vdm, rows, cols, i);
            if (-1 == j)
            {
                printf("Error: make_dispersal_matrix.  Can't find swap row %d\n");
            }

            if (j != i)
            {
                for (k = 0; k < cols; k++)
                {
                    tmp = vdm[j*cols+k];
                    vdm[j*cols+k] = vdm[i*cols+k];
                    vdm[i*cols+k] = tmp;
                }
            }
            if (vdm[i*cols+i] == 0)
            {
                printf("Internal error -- this shouldn't happen\n");
            }

            if (vdm[i*cols+i] != 1)
            {
                inv = gf_single_divide(1, vdm[i*cols+i]);
                k = i;
                for (j = 0; j < rows; j++)
                {
                    vdm[k] = gf_single_multiply(inv, vdm[k]);
                    k += cols;
                }

            }
            if (vdm[i*cols+i] != 1)
            {
                printf("Internal error -- this shouldn't happen #2)\n");
            }

            for (j = 0; j < cols; j++)
            {
                colindex = vdm[i*cols+j];
                if (j != i && colindex != 0)
                {
                    k = j;
                    for (l = 0; l < rows; l++)
                    {
                        vdm[k] = vdm[k] ^ gf_single_multiply(colindex, vdm[l*cols+i]);
                        k += cols;
                    }
                }
            }
        }

        return vdm;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, -0x50(%rbp)
callq 0x1f4a
cmpl %r14d, %ebx
movl %r14d, %edx
cmovll %ebx, %edx
xorl %ecx, %ecx
testl %ebx, %ebx
movl $0x0, %esi
cmovgl %ebx, %esi
movq %rsi, -0x80(%rbp)
testl %r14d, %r14d
movl $0x0, %esi
movl %r14d, -0x5c(%rbp)
cmovgl %r14d, %esi
movq %rsi, -0x78(%rbp)
movl %ebx, -0x2c(%rbp)
movslq %ebx, %rsi
movq %rax, %rbx
testl %edx, %edx
cmovlel %ecx, %edx
movq %rdx, -0x90(%rbp)
movq %rsi, -0x68(%rbp)
leaq (,%rsi,4), %rax
movq %rax, -0x58(%rbp)
movq %rbx, -0x48(%rbp)
movq %rbx, -0x38(%rbp)
xorl %r12d, %r12d
movq %rbx, -0x70(%rbp)
cmpq -0x90(%rbp), %r12
je 0x1dae
movq %rbx, %rdi
movl -0x5c(%rbp), %esi
movl -0x2c(%rbp), %edx
movl %r12d, %ecx
callq 0x2018
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x1c58
leaq 0x13fd(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1040
movl %r14d, %eax
cmpq %rax, %r12
jne 0x1ccb
movq %r12, %rax
imulq -0x68(%rbp), %rax
leaq (%rbx,%rax,4), %rax
movq %rax, -0x40(%rbp)
movl (%rax,%r12,4), %edx
testl %edx, %edx
jne 0x1c8c
leaq 0x15e6(%rip), %rdi      # 0x3265
callq 0x1120
movq -0x40(%rbp), %rax
movl (%rax,%r12,4), %edx
cmpl $0x1, %edx
je 0x1d19
movq -0x50(%rbp), %rdi
pushq $0x1
popq %rsi
callq 0x1dc0
movl %eax, %r14d
movq -0x78(%rbp), %rax
movl %eax, %ebx
movq -0x48(%rbp), %r15
subl $0x1, %ebx
jb 0x1cfe
movl (%r15), %edx
movq -0x50(%rbp), %rdi
movl %r14d, %esi
callq 0x2054
movl %eax, (%r15)
addq -0x58(%rbp), %r15
jmp 0x1cae
imull -0x2c(%rbp), %r14d
movq %r12, %rax
imulq -0x68(%rbp), %rax
movslq %r14d, %rcx
leaq (%rbx,%rcx,4), %rcx
xorl %edx, %edx
cmpq %rdx, -0x80(%rbp)
je 0x1c68
movl (%rcx,%rdx,4), %esi
movq -0x38(%rbp), %r8
movl (%r8,%rdx,4), %edi
movl %edi, (%rcx,%rdx,4)
movl %esi, (%r8,%rdx,4)
incq %rdx
jmp 0x1ce1
movq -0x40(%rbp), %rax
cmpl $0x1, (%rax,%r12,4)
movq -0x70(%rbp), %rbx
je 0x1d19
leaq 0x1579(%rip), %rdi      # 0x328d
callq 0x1120
xorl %eax, %eax
movq %r12, -0x98(%rbp)
cmpq -0x80(%rbp), %rax
je 0x1d91
movq %rax, -0x88(%rbp)
cmpq %r12, %rax
je 0x1d7a
movq -0x40(%rbp), %rax
movq -0x88(%rbp), %rcx
movl (%rax,%rcx,4), %r14d
testl %r14d, %r14d
je 0x1d7a
movq -0x78(%rbp), %r15
xorl %r12d, %r12d
subq $0x1, %r15
jb 0x1d7a
movl (%rbx,%r12), %r13d
movq -0x48(%rbp), %rax
movl (%rax,%r12), %edx
movq -0x50(%rbp), %rdi
movl %r14d, %esi
callq 0x2054
xorl %r13d, %eax
movl %eax, (%rbx,%r12)
addq -0x58(%rbp), %r12
jmp 0x1d4f
movq -0x88(%rbp), %rax
incq %rax
addq $0x4, %rbx
movq -0x98(%rbp), %r12
jmp 0x1d22
incq %r12
movq -0x38(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x4, -0x48(%rbp)
movq -0x70(%rbp), %rbx
jmp 0x1c24
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq