// File: /workspace/github_cpp_makefile_star2_O1/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 0x1fe4
movq %rax, -0x38(%rbp)
cmpl %r14d, %ebx
movl %r14d, %eax
movl %ebx, -0x30(%rbp)
cmovll %ebx, %eax
testl %eax, %eax
jle 0x1e4c
movl %r14d, %edi
movl -0x30(%rbp), %ecx
movslq %ecx, %rdx
movl %eax, %eax
movq %rax, -0x80(%rbp)
movl %ecx, %r14d
movl %edi, %eax
movq %rax, -0xa0(%rbp)
leaq (,%rdx,4), %rcx
movq %rdx, -0x88(%rbp)
leaq 0x4(,%rdx,4), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rdx
movq %rax, %r15
movq %rax, %rsi
xorl %r13d, %r13d
movq %rcx, -0x48(%rbp)
movl %edi, -0x2c(%rbp)
movq %r12, -0x60(%rbp)
movq %r14, -0xb0(%rbp)
movq %rdx, -0x40(%rbp)
movq %rsi, %rax
movl %r13d, %ebx
movq %rsi, -0x90(%rbp)
cmpl $0x0, (%rax)
jne 0x1c8f
incl %ebx
addq %rcx, %rax
cmpl %ebx, %edi
jne 0x1c7c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %ebx
jne 0x1ca2
leaq 0x13b3(%rip), %rdi      # 0x304e
xorl %eax, %eax
callq 0x1040
movl %ebx, %eax
cmpq %rax, %r13
je 0x1cd0
imull -0x30(%rbp), %ebx
movslq %ebx, %rax
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, %r14
jne 0x1cba
movl %r13d, %eax
imull -0x30(%rbp), %eax
movslq %eax, %rbx
movq -0x38(%rbp), %rax
movq %r13, -0x68(%rbp)
leaq (%rax,%r13,4), %r14
cmpl $0x0, (%r14,%rbx,4)
jne 0x1cf9
leaq 0x1571(%rip), %rdi      # 0x3265
callq 0x1100
movq %r15, -0x98(%rbp)
movq %rbx, -0x58(%rbp)
movq %r14, -0x50(%rbp)
movslq (%r14,%rbx,4), %rbx
cmpq $0x1, %rbx
je 0x1d69
movq %r12, %rdi
callq 0x20fa
testl %ebx, %ebx
je 0x1d40
movslq 0x33af(%rip), %rax      # 0x50d4
leaq 0x33a4(%rip), %rcx      # 0x50d0
movslq (%rcx,%rbx,4), %rcx
subq %rcx, %rax
movq 0x338e(%rip), %rcx      # 0x50c8
movl (%rcx,%rax,4), %r13d
jmp 0x1d46
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl -0x2c(%rbp), %ebx
movq -0x40(%rbp), %r14
movq -0x48(%rbp), %r15
movl (%r14), %edx
movq %r12, %rdi
movl %r13d, %esi
callq 0x20b4
movl %eax, (%r14)
addq %r15, %r14
decl %ebx
jne 0x1d51
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
cmpl $0x1, (%rcx,%rax,4)
je 0x1d83
leaq 0x150f(%rip), %rdi      # 0x328d
callq 0x1100
movq -0x68(%rbp), %r13
movq %r13, %rax
imulq -0x88(%rbp), %rax
movq -0x38(%rbp), %r15
leaq (%r15,%rax,4), %rax
movq %rax, -0xa8(%rbp)
xorl %eax, %eax
movq -0x48(%rbp), %rcx
movq %rax, -0x70(%rbp)
cmpq %r13, %rax
movq -0x60(%rbp), %r13
movq -0x40(%rbp), %rbx
je 0x1e00
movq -0xa8(%rbp), %rax
movq -0x70(%rbp), %rdx
movl (%rax,%rdx,4), %esi
testl %esi, %esi
je 0x1e00
movq -0xa0(%rbp), %r12
xorl %r14d, %r14d
movl %esi, -0x50(%rbp)
movl (%r15,%r14), %eax
movl %eax, -0x58(%rbp)
movl (%rbx,%r14), %edx
movq %r13, %rdi
callq 0x20b4
movq -0x48(%rbp), %rcx
xorl -0x58(%rbp), %eax
movl %eax, (%r15,%r14)
movl -0x50(%rbp), %esi
addq %rcx, %r14
decq %r12
jne 0x1dd7
movq -0x70(%rbp), %rax
incq %rax
addq $0x4, %r15
movq -0xb0(%rbp), %r14
cmpq %r14, %rax
movq -0x68(%rbp), %r13
jne 0x1da7
incq %r13
movq -0x90(%rbp), %rsi
addq -0x78(%rbp), %rsi
movq -0x98(%rbp), %r15
addq %rcx, %r15
movq -0x40(%rbp), %rdx
addq $0x4, %rdx
cmpq -0x80(%rbp), %r13
movl -0x2c(%rbp), %edi
movq -0x60(%rbp), %r12
jne 0x1c6b
movq -0x38(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq