// File: /workspace/github_cpp_makefile_star2_O3/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 $0x88, %rsp
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r12
callq 0x2028
movq %rax, -0x38(%rbp)
cmpl %r14d, %ebx
movl %r14d, %eax
movl %ebx, -0x30(%rbp)
cmovll %ebx, %eax
testl %eax, %eax
jle 0x1e89
movl %r14d, %esi
movl -0x30(%rbp), %ecx
movslq %ecx, %rdx
movl %eax, %eax
movq %rax, -0x90(%rbp)
movl %ecx, %ebx
movl %r14d, %eax
movq %rax, -0xa8(%rbp)
leaq (,%rdx,4), %r14
movq %rdx, -0x68(%rbp)
leaq 0x4(,%rdx,4), %rax
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
movq %rax, %r15
xorl %r13d, %r13d
movq %rbx, -0x70(%rbp)
movl %esi, -0x2c(%rbp)
movq %r12, -0x78(%rbp)
movq %r14, -0x50(%rbp)
movq %rcx, -0x58(%rbp)
movq %rax, -0x98(%rbp)
movq %rax, %rcx
movl %r13d, %eax
cmpl $0x0, (%rcx)
jne 0x1cc4
incl %eax
addq %r14, %rcx
cmpl %eax, %esi
jne 0x1ca3
leaq 0x1396(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1040
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, %ecx
cmpq %rcx, %r13
jne 0x1cd9
movq %r13, %rax
imulq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x1d0b
imull -0x30(%rbp), %eax
movq %r13, %rcx
imulq -0x68(%rbp), %rcx
movq %rcx, -0x48(%rbp)
cltq
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax,4), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl (%r15,%rcx,4), %esi
movl %esi, (%rax,%rcx,4)
movl %edx, (%r15,%rcx,4)
incq %rcx
cmpq %rcx, %rbx
jne 0x1cf5
movl %r13d, %eax
imull -0x30(%rbp), %eax
movslq %eax, %r14
movq -0x38(%rbp), %rax
movq %r13, -0x80(%rbp)
leaq (%rax,%r13,4), %r13
movl (%r13,%r14,4), %ebx
testl %ebx, %ebx
jne 0x1d3b
leaq 0x1534(%rip), %rdi      # 0x3265
callq 0x1110
movl (%r13,%r14,4), %ebx
movq %r13, -0x40(%rbp)
movq %r14, -0x60(%rbp)
movq %r15, -0xa0(%rbp)
cmpl $0x1, %ebx
je 0x1da9
movq %r12, %rdi
callq 0x213e
testl %ebx, %ebx
je 0x1d80
movslq 0x3382(%rip), %rax      # 0x50e4
movslq %ebx, %rcx
leaq 0x3374(%rip), %rdx      # 0x50e0
movslq (%rdx,%rcx,4), %rcx
subq %rcx, %rax
movq 0x335e(%rip), %rcx      # 0x50d8
movl (%rcx,%rax,4), %r13d
jmp 0x1d86
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl -0x2c(%rbp), %ebx
movq -0x58(%rbp), %r14
movq -0x50(%rbp), %r15
movl (%r14), %edx
movq %r12, %rdi
movl %r13d, %esi
callq 0x20f8
movl %eax, (%r14)
addq %r15, %r14
decl %ebx
jne 0x1d91
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
cmpl $0x1, (%rcx,%rax,4)
je 0x1dc3
leaq 0x14cf(%rip), %rdi      # 0x328d
callq 0x1110
movq -0x38(%rbp), %r15
movq -0x48(%rbp), %rax
leaq (%r15,%rax,4), %rax
movq %rax, -0xb0(%rbp)
xorl %eax, %eax
movq -0x58(%rbp), %rcx
movq -0x80(%rbp), %r13
movq %rax, -0x40(%rbp)
cmpq %r13, %rax
movq -0x78(%rbp), %r13
movq -0x50(%rbp), %rbx
je 0x1e39
movq -0xb0(%rbp), %rax
movq -0x40(%rbp), %rdx
movl (%rax,%rdx,4), %esi
testl %esi, %esi
je 0x1e39
movq -0xa8(%rbp), %r12
xorl %r14d, %r14d
movl %esi, -0x60(%rbp)
movl (%r15,%r14), %eax
movl %eax, -0x48(%rbp)
movl (%rcx,%r14), %edx
movq %r13, %rdi
callq 0x20f8
movq -0x58(%rbp), %rcx
xorl -0x48(%rbp), %eax
movl %eax, (%r15,%r14)
movl -0x60(%rbp), %esi
addq %rbx, %r14
decq %r12
jne 0x1e10
movq -0x40(%rbp), %rax
incq %rax
addq $0x4, %r15
cmpq -0x70(%rbp), %rax
movq -0x80(%rbp), %r13
jne 0x1de0
incq %r13
movq -0x98(%rbp), %rax
addq -0x88(%rbp), %rax
movq -0x50(%rbp), %r14
movq -0xa0(%rbp), %r15
addq %r14, %r15
addq $0x4, %rcx
cmpq -0x90(%rbp), %r13
movl -0x2c(%rbp), %esi
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %rbx
jne 0x1c92
movq -0x38(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop