// File: syzcch[P]FEC_C_version/./fec_rdp.h
// Function: rdp::decoding()
void decoding()
    {

        int errNum = 0;
        int oneData = 0,one = 0;
        int twoData = 0,two = 0;
        bool rError = false;
        int errCount = 0;

        for(int i = 0; i < allDisks; i++)
        {
            if(1 == inthis[i])
            {
                errCount++;
                if(1 == errCount)
                {
                    oneData = i + 2;
                    one = i;
                    if(one < disks)
                    {
                        errNum++;
                    }
                }
                else if(2 == errNum)
                {
                    twoData = i + 2;
                    two = i;
                    if(two < disks)
                    {
                        errNum++;
                    }
                }
            }
        }

        if(disks == two)
        {
            rError = true;
        }

        // rdp
        if(0 == errNum)
        {
            printf("No Error data need be recovery! \n");
            return;
        }
        if(errCount > 2)
        {
            printf("Error NUM is too larger! It should be [1,2] \n");
            return;
        }
        if(errNum == 2 && (one < 0 || one >= disks || two < 0 || two >= disks))
        {
            printf("Error NUM is 2, but detailed error col numbers are wrong! Thay are should be [0,disks) \n");
            return;
        }

        memcpy(data[0], odata[0], stripe_unit_size* sizeof(char));
        memcpy(data[1], odata[1], stripe_unit_size* sizeof(char));

        for(int i = 0; i < disks; i++)
        {
            memcpy(data[i+2], idata[i], stripe_unit_size* sizeof(char));

        }

        for(int i = 0; i < stripe_unit_size; i++)
        {
            data[oneData][i] = 0;
        }

        if(errNum == 1)
        {
            if(rError)
            {
                for(int i = 0; i < stripe_unit_size; i++)
                {
                    data[0][i] = 0;
                }

                rdp_decoding_d(data, disks, stripe_unit_size, w, oneData);
                memcpy(idata[one], data[oneData], stripe_unit_size* sizeof(char));

            }
            else
            {
                rdp_decoding_r(data, disks, stripe_unit_size, w, oneData);
                memcpy(idata[one], data[oneData], stripe_unit_size* sizeof(char));
            }
        }
        else
        {
            for(int i = 0; i < stripe_unit_size; i++)
            {

                data[oneData][i] = 0;
                data[twoData][i] = 0;
            }
            rdp_decoding_rd(data, disks, stripe_unit_size, w, oneData, twoData);
            memcpy(idata[one], data[oneData], stripe_unit_size* sizeof(char));
            memcpy(idata[two], data[twoData], stripe_unit_size* sizeof(char));
        }

    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x28cc
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rcx
movslq -0x28(%rbp), %rdx
movl $0x1, %eax
cmpl (%rcx,%rdx,4), %eax
jne 0x28bc
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl $0x1, %eax
cmpl -0x24(%rbp), %eax
jne 0x2888
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x10(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x2886
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x28ba
movl $0x2, %eax
cmpl -0xc(%rbp), %eax
jne 0x28b8
movq -0x40(%rbp), %rcx
movl -0x28(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x18(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x28b6
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x28b8
jmp 0x28ba
jmp 0x28bc
jmp 0x28be
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2829
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x28dc
movb $0x1, -0x1d(%rbp)
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
jne 0x28f6
leaq 0x1773(%rip), %rdi      # 0x405d
movb $0x0, %al
callq 0x2040
jmp 0x2b9b
cmpl $0x2, -0x24(%rbp)
jle 0x290f
leaq 0x177c(%rip), %rdi      # 0x407f
movb $0x0, %al
callq 0x2040
jmp 0x2b9b
cmpl $0x2, -0xc(%rbp)
jne 0x294c
cmpl $0x0, -0x14(%rbp)
jl 0x2939
movq -0x40(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x2939
cmpl $0x0, -0x1c(%rbp)
jl 0x2939
movq -0x40(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0x8(%rcx), %eax
jl 0x294c
leaq 0x176d(%rip), %rdi      # 0x40ad
movb $0x0, %al
callq 0x2040
jmp 0x2b9b
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rcx
movq (%rcx), %rdi
movq 0x28(%rax), %rcx
movq (%rcx), %rsi
movslq 0xc(%rax), %rdx
shlq $0x0, %rdx
callq 0x20d0
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rcx
movq 0x8(%rcx), %rdi
movq 0x28(%rax), %rcx
movq 0x8(%rcx), %rsi
movslq 0xc(%rax), %rdx
shlq $0x0, %rdx
callq 0x20d0
movl $0x0, -0x2c(%rbp)
movq -0x40(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x29d8
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rcx
movl -0x2c(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rdi
movq 0x20(%rax), %rcx
movslq -0x2c(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movslq 0xc(%rax), %rdx
shlq $0x0, %rdx
callq 0x20d0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2993
movl $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rcx
movl -0x30(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x2a0e
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x29df
cmpl $0x1, -0xc(%rbp)
jne 0x2ade
testb $0x1, -0x1d(%rbp)
je 0x2a95
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movl -0x34(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x2a4f
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2a25
movq -0x40(%rbp), %rdi
movq 0x30(%rdi), %rsi
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x14(%rdi), %r8d
movl -0x10(%rbp), %r9d
callq 0x3300
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x14(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movq 0x30(%rax), %rcx
movslq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movslq 0xc(%rax), %rdx
shlq $0x0, %rdx
callq 0x20d0
jmp 0x2ad9
movq -0x40(%rbp), %rdi
movq 0x30(%rdi), %rsi
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x14(%rdi), %r8d
movl -0x10(%rbp), %r9d
callq 0x38b0
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x14(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movq 0x30(%rax), %rcx
movslq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movslq 0xc(%rax), %rdx
shlq $0x0, %rdx
callq 0x20d0
jmp 0x2b9b
movl $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movl -0x38(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x2b28
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rcx
movslq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x38(%rbp), %rdx
movb $0x0, (%rcx,%rdx)
movq 0x30(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x2ae5
movq -0x40(%rbp), %rdi
movq 0x30(%rdi), %rsi
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x14(%rdi), %r8d
movl -0x10(%rbp), %r9d
movl -0x18(%rbp), %eax
movl %eax, (%rsp)
callq 0x39c0
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x14(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movq 0x30(%rax), %rcx
movslq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movslq 0xc(%rax), %rdx
shlq $0x0, %rdx
callq 0x20d0
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movq 0x30(%rax), %rcx
movslq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rsi
movslq 0xc(%rax), %rdx
shlq $0x0, %rdx
callq 0x20d0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)