// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x18(%rdi), %eax
movq 0x38(%rdi), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
movslq 0x8(%rdi), %r13
pushq $0x1
popq %rsi
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r8d, %r8d
xorl %r10d, %r10d
xorl %r9d, %r9d
xorl %edi, %edi
cmpq %rdx, %rax
je 0x1552
cmpl $0x1, (%rcx,%rdx,4)
jne 0x154d
testl %edi, %edi
je 0x1538
incl %edi
cmpl $0x2, %r15d
jne 0x154d
xorl %r15d, %r15d
cmpq %r13, %rdx
setl %r15b
orl $0x2, %r15d
leal 0x2(%rdx), %r10d
movl %edx, %r9d
jmp 0x154d
xorl %edi, %edi
cmpq %r13, %rdx
setl %dil
addl %edi, %r15d
leal 0x2(%rdx), %r14d
movl %edx, %r8d
movl %esi, %edi
incq %rdx
jmp 0x150a
testl %r15d, %r15d
je 0x1568
cmpl $0x3, %edi
jl 0x1574
leaq 0x1b6b(%rip), %rdi      # 0x30ce
jmp 0x1660
leaq 0x1b8c(%rip), %rdi      # 0x30fb
jmp 0x1660
cmpl $0x2, %r15d
jne 0x159f
testl %r8d, %r8d
js 0x1659
cmpl %r13d, %r8d
setl %al
testl %r9d, %r9d
setns %cl
cmpl %r13d, %r9d
setl %dl
andb %al, %dl
testb %cl, %dl
je 0x1659
movl %r10d, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movl %r8d, -0x2c(%rbp)
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rcx), %rdi
movq (%rax), %rsi
movslq 0xc(%rbx), %rdx
callq 0x1080
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq 0x8(%rcx), %rdi
movq 0x8(%rax), %rsi
movslq 0xc(%rbx), %rdx
callq 0x1080
xorl %r12d, %r12d
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jge 0x1606
movq 0x20(%rbx), %rax
movq 0x30(%rbx), %rcx
movq 0x10(%rcx,%r12,8), %rdi
movq (%rax,%r12,8), %rsi
movslq 0xc(%rbx), %rdx
callq 0x1080
incq %r12
jmp 0x15de
movslq %r14d, %r14
xorl %eax, %eax
movl -0x34(%rbp), %r12d
movslq 0xc(%rbx), %rcx
cmpq %rcx, %rax
jge 0x1629
movq 0x30(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
jmp 0x160f
cmpl $0x1, %r15d
jne 0x1673
cmpl %r12d, %r13d
jne 0x16e9
xorl %eax, %eax
movslq %ecx, %rdx
movq 0x30(%rbx), %rsi
cmpq %rdx, %rax
jge 0x1701
movq (%rsi), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
movl 0xc(%rbx), %ecx
jmp 0x163a
leaq 0x1a16(%rip), %rdi      # 0x3076
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10e0
movslq -0x30(%rbp), %r15
xorl %eax, %eax
xorl %edx, %edx
movslq %ecx, %rdi
movq 0x30(%rbx), %rsi
cmpq %rdi, %rdx
jge 0x16a1
movq (%rsi,%r14,8), %rcx
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movb %al, (%rcx,%rdx)
incq %rdx
movl 0xc(%rbx), %ecx
jmp 0x167b
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movl %r15d, (%rsp)
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1dc8
movslq -0x2c(%rbp), %rax
movq 0x20(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq (%rcx,%rax,8), %rdi
movq (%rdx,%r14,8), %rsi
movslq 0xc(%rbx), %rdx
callq 0x1080
movslq %r12d, %rax
movq 0x20(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq (%rcx,%rax,8), %rdi
movq (%rdx,%r15,8), %rsi
jmp 0x1727
movq 0x30(%rbx), %rsi
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1d20
jmp 0x1713
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1ac4
movslq -0x2c(%rbp), %rax
movq 0x20(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq (%rcx,%rax,8), %rdi
movq (%rdx,%r14,8), %rsi
movslq 0xc(%rbx), %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1080