// File: syzcch[P]FEC_C_version/./fec_rdp.h
// Function: rdp::rdp_decoding_d(char**, int, int, int, int)
void rdp_decoding_d(char *g_data[],  int disks, int stripe_unit_size, int w, int x)
    {
        int xcount, ccount, count, dcount;
        int packet_size = stripe_unit_size / w;
        int gr,g,gx;
        int row_disk, diag_disk;
        char *row_data, *diag_data, *rdata, *xdata;
        int coffset;
        int i,j,k,c;
        int diag_count;
        int row_count;


        dcount=stripe_unit_size;
        xcount=stripe_unit_size;
        gr = pnumRdp - 2;
        gx = (x >= 3 ? x - 3 : pnumRdp - 1);
        row_disk = pnumRdp + 1;
        diag_disk = x;
        rdata=g_data[0];
        xdata=g_data[x];
        row_data=rdata;
        diag_data=xdata;
        g = gr;
        diag_count = xcount;
        row_count = dcount;


        while(1)
        {
            if(g == pnumRdp - 1)
            {
                if(gr == (row_disk >= 3 ? row_disk - 3 : row_disk + pnumRdp -3))
                {
                    row_disk = x;
                    diag_disk = pnumRdp + 1;
                    row_data = xdata;
                    diag_data =rdata;
                    g = gx;
                    row_count = diag_count;
                    diag_count = dcount;

                    continue;
                }
                else
                    break;
            }
            else
            {
                int row_index;
                char* cdata;
                row_index = (g - diag_disk + pnumRdp + 2) % pnumRdp;
                coffset = (row_index + diag_disk - 2 + pnumRdp) % pnumRdp * packet_size;
                cdata=g_data[1];
                for(i = row_index * packet_size, j = coffset, k = 0; i < diag_count && k < packet_size; i++, j++, k++)
                {
                    diag_data[i] = cdata[j];

                }
                for(c = 2; c <(disks+2); c++)
                {
                    if((int)c == diag_disk)
                        continue;

                    ccount=stripe_unit_size;
                    cdata = g_data[c];
                    coffset = (row_index + diag_disk - c + pnumRdp)
                              % pnumRdp * packet_size;

                    for(i = row_index * packet_size, j = coffset, k = 0; i < diag_count && j < ccount && k < packet_size; i++, j++, k++)
                    {
                        diag_data[i] ^=  cdata[j];

                    }

                }
                if(pnumRdp + 1 != diag_disk)
                {
                    ccount=stripe_unit_size;
                    cdata = g_data[0];
                    coffset = (row_index + diag_disk - 1 + pnumRdp)
                              % pnumRdp * packet_size;

                    for(i = row_index * packet_size, j = coffset, k = 0; i < diag_count && j < ccount && k < packet_size; i++, j++, k++)
                    {
                        diag_data[i] ^=  cdata[j];

                    }
                }
                //row_parity calculate
                for(c = 2; c <(disks+2); c++)
                {
                    if((int)c == row_disk)
                        continue;

                    ccount=stripe_unit_size;
                    cdata = g_data[c];
                    coffset = row_index * packet_size;

                    for(i = coffset, k = 0; i < ccount && k < packet_size; i++, k++)
                    {
                        row_data[i] ^= cdata[i];

                    }


                }
                if(row_disk != pnumRdp + 1)
                {

                    //diag_disk must be DISK---VDEV_RAIDZ_R
                    count = row_count;
                    cdata = diag_data;
                    coffset = row_index * packet_size;

                    for(i = coffset, k = 0; i < count && k < packet_size; i++, k++)
                        row_data[i] ^= cdata[i];

                }
                //calculate the next g
                g = (row_index + row_disk - 2) % pnumRdp;

            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x18(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, -0x34(%rbp)
movl -0x18(%rbp), %ecx
movl %ecx, -0x30(%rbp)
movl -0x18(%rbp), %ecx
movl %ecx, -0x24(%rbp)
movl 0x10(%rax), %eax
subl $0x2, %eax
movl %eax, -0x38(%rbp)
cmpl $0x3, -0x20(%rbp)
jl 0x3365
movl -0x20(%rbp), %eax
subl $0x3, %eax
movl %eax, -0x9c(%rbp)
jmp 0x3378
movq -0x98(%rbp), %rax
movl 0x10(%rax), %eax
subl $0x1, %eax
movl %eax, -0x9c(%rbp)
movq -0x98(%rbp), %rax
movl -0x9c(%rbp), %ecx
movl %ecx, -0x40(%rbp)
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x98(%rbp), %rcx
movl -0x3c(%rbp), %eax
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3477
movl -0x38(%rbp), %eax
movl %eax, -0xa0(%rbp)
cmpl $0x3, -0x44(%rbp)
jl 0x340c
movl -0x44(%rbp), %eax
subl $0x3, %eax
movl %eax, -0xa4(%rbp)
jmp 0x3422
movq -0x98(%rbp), %rcx
movl -0x44(%rbp), %eax
addl 0x10(%rcx), %eax
subl $0x3, %eax
movl %eax, -0xa4(%rbp)
movl -0xa0(%rbp), %eax
movl -0xa4(%rbp), %ecx
cmpl %ecx, %eax
jne 0x3472
movq -0x98(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, -0x44(%rbp)
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x80(%rbp)
jmp 0x33d7
jmp 0x38a5
movq -0x98(%rbp), %rcx
movl -0x3c(%rbp), %eax
subl -0x48(%rbp), %eax
addl 0x10(%rcx), %eax
addl $0x2, %eax
cltd
idivl 0x10(%rcx)
movl %edx, -0x88(%rbp)
movl -0x88(%rbp), %eax
addl -0x48(%rbp), %eax
subl $0x2, %eax
addl 0x10(%rcx), %eax
cltd
idivl 0x10(%rcx)
imull -0x34(%rbp), %edx
movl %edx, -0x6c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
movl -0x88(%rbp), %eax
imull -0x34(%rbp), %eax
movl %eax, -0x70(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x74(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x70(%rbp), %ecx
xorl %eax, %eax
cmpl -0x80(%rbp), %ecx
movb %al, -0xa5(%rbp)
jge 0x34f6
movl -0x78(%rbp), %eax
cmpl -0x34(%rbp), %eax
setl %al
movb %al, -0xa5(%rbp)
movb -0xa5(%rbp), %al
testb $0x1, %al
jne 0x3502
jmp 0x3538
movq -0x90(%rbp), %rax
movslq -0x74(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x58(%rbp), %rax
movslq -0x70(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x34d7
movl $0x2, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x3639
movl -0x7c(%rbp), %eax
cmpl -0x48(%rbp), %eax
jne 0x355d
jmp 0x362b
movq -0x98(%rbp), %rcx
movl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x7c(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq %rax, -0x90(%rbp)
movl -0x88(%rbp), %eax
addl -0x48(%rbp), %eax
subl -0x7c(%rbp), %eax
addl 0x10(%rcx), %eax
cltd
idivl 0x10(%rcx)
imull -0x34(%rbp), %edx
movl %edx, -0x6c(%rbp)
movl -0x88(%rbp), %eax
imull -0x34(%rbp), %eax
movl %eax, -0x70(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x74(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x70(%rbp), %ecx
xorl %eax, %eax
cmpl -0x80(%rbp), %ecx
movb %al, -0xa6(%rbp)
jge 0x35e0
movl -0x74(%rbp), %ecx
xorl %eax, %eax
cmpl -0x28(%rbp), %ecx
movb %al, -0xa6(%rbp)
jge 0x35e0
movl -0x78(%rbp), %eax
cmpl -0x34(%rbp), %eax
setl %al
movb %al, -0xa6(%rbp)
movb -0xa6(%rbp), %al
testb $0x1, %al
jne 0x35ec
jmp 0x3629
movq -0x90(%rbp), %rax
movslq -0x74(%rbp), %rcx
movsbl (%rax,%rcx), %esi
movq -0x58(%rbp), %rax
movslq -0x70(%rbp), %rcx
movsbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x35b1
jmp 0x362b
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x353f
movq -0x98(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
cmpl -0x48(%rbp), %eax
je 0x3718
movq -0x98(%rbp), %rcx
movl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movl -0x88(%rbp), %eax
addl -0x48(%rbp), %eax
subl $0x1, %eax
addl 0x10(%rcx), %eax
cltd
idivl 0x10(%rcx)
imull -0x34(%rbp), %edx
movl %edx, -0x6c(%rbp)
movl -0x88(%rbp), %eax
imull -0x34(%rbp), %eax
movl %eax, -0x70(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x74(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x70(%rbp), %ecx
xorl %eax, %eax
cmpl -0x80(%rbp), %ecx
movb %al, -0xa7(%rbp)
jge 0x36cd
movl -0x74(%rbp), %ecx
xorl %eax, %eax
cmpl -0x28(%rbp), %ecx
movb %al, -0xa7(%rbp)
jge 0x36cd
movl -0x78(%rbp), %eax
cmpl -0x34(%rbp), %eax
setl %al
movb %al, -0xa7(%rbp)
movb -0xa7(%rbp), %al
testb $0x1, %al
jne 0x36d9
jmp 0x3716
movq -0x90(%rbp), %rax
movslq -0x74(%rbp), %rcx
movsbl (%rax,%rcx), %esi
movq -0x58(%rbp), %rax
movslq -0x70(%rbp), %rcx
movsbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x369e
jmp 0x3718
movl $0x2, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x37df
movl -0x7c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jne 0x373d
jmp 0x37d1
movl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x7c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x90(%rbp)
movl -0x88(%rbp), %eax
imull -0x34(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x70(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x70(%rbp), %ecx
xorl %eax, %eax
cmpl -0x28(%rbp), %ecx
movb %al, -0xa8(%rbp)
jge 0x378f
movl -0x78(%rbp), %eax
cmpl -0x34(%rbp), %eax
setl %al
movb %al, -0xa8(%rbp)
movb -0xa8(%rbp), %al
testb $0x1, %al
jne 0x379b
jmp 0x37cf
movq -0x90(%rbp), %rax
movslq -0x70(%rbp), %rcx
movsbl (%rax,%rcx), %esi
movq -0x50(%rbp), %rax
movslq -0x70(%rbp), %rcx
movsbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x3770
jmp 0x37d1
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x371f
movq -0x98(%rbp), %rcx
movl -0x44(%rbp), %eax
movl 0x10(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x3886
movl -0x84(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x88(%rbp), %eax
imull -0x34(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x70(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x70(%rbp), %ecx
xorl %eax, %eax
cmpl -0x2c(%rbp), %ecx
movb %al, -0xa9(%rbp)
jge 0x3844
movl -0x78(%rbp), %eax
cmpl -0x34(%rbp), %eax
setl %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x3850
jmp 0x3884
movq -0x90(%rbp), %rax
movslq -0x70(%rbp), %rcx
movsbl (%rax,%rcx), %esi
movq -0x50(%rbp), %rax
movslq -0x70(%rbp), %rcx
movsbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x3825
jmp 0x3886
movq -0x98(%rbp), %rcx
movl -0x88(%rbp), %eax
addl -0x44(%rbp), %eax
subl $0x2, %eax
cltd
idivl 0x10(%rcx)
movl %edx, -0x3c(%rbp)
jmp 0x33d7
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)