// File: /workspace/github_cpp_makefile_star2_O3/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
movslq 0x18(%rdi), %rax
testq %rax, %rax
jle 0x157e
movq %rdi, %rbx
movq 0x38(%rdi), %rcx
movslq 0x8(%rdi), %r13
xorl %edx, %edx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %edi, %edi
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpl $0x1, (%rcx,%rdx,4)
jne 0x1563
testl %esi, %esi
je 0x154c
incl %esi
cmpl $0x2, %r15d
jne 0x1563
xorl %r15d, %r15d
cmpq %r13, %rdx
setl %r15b
orl $0x2, %r15d
leal 0x2(%rdx), %r9d
movl %edx, %r8d
jmp 0x1563
xorl %esi, %esi
cmpq %r13, %rdx
setl %sil
addl %esi, %r15d
leal 0x2(%rdx), %r14d
movl $0x1, %esi
movl %edx, %edi
incq %rdx
cmpq %rdx, %rax
jne 0x1523
testl %r15d, %r15d
je 0x157e
cmpl $0x3, %esi
jl 0x1598
leaq 0x1b52(%rip), %rdi      # 0x30ce
jmp 0x1585
leaq 0x1b76(%rip), %rdi      # 0x30fb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10d0
cmpl $0x2, %r15d
jne 0x15c2
testl %edi, %edi
js 0x169b
cmpl %r13d, %edi
setl %al
testl %r8d, %r8d
setns %cl
cmpl %r13d, %r8d
setl %dl
andb %al, %dl
testb %cl, %dl
je 0x169b
movl %r9d, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movl %edi, -0x2c(%rbp)
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rcx), %rdi
movq (%rax), %rsi
movslq 0xc(%rbx), %rdx
callq 0x1070
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
movq 0x8(%rcx), %rdi
movq 0x8(%rax), %rsi
movslq 0xc(%rbx), %rdx
callq 0x1070
cmpl $0x0, 0x8(%rbx)
jle 0x162c
xorl %r12d, %r12d
movq 0x20(%rbx), %rax
movq 0x30(%rbx), %rcx
movq 0x10(%rcx,%r12,8), %rdi
movq (%rax,%r12,8), %rsi
movslq 0xc(%rbx), %rdx
callq 0x1070
incq %r12
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jl 0x1606
movl 0xc(%rbx), %ecx
movslq %r14d, %r14
testl %ecx, %ecx
movl -0x34(%rbp), %r12d
jle 0x1654
xorl %eax, %eax
movq 0x30(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
movslq 0xc(%rbx), %rcx
cmpq %rcx, %rax
jl 0x163c
cmpl $0x1, %r15d
jne 0x16a7
cmpl %r12d, %r13d
jne 0x1721
testl %ecx, %ecx
jle 0x1680
xorl %eax, %eax
movq 0x30(%rbx), %rcx
movq (%rcx), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
movslq 0xc(%rbx), %rcx
cmpq %rcx, %rax
jl 0x1669
movq 0x30(%rbx), %rsi
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1aba
jmp 0x1737
leaq 0x19d4(%rip), %rdi      # 0x3076
jmp 0x1585
movslq -0x30(%rbp), %r15
testl %ecx, %ecx
jle 0x16d5
xorl %eax, %eax
xorl %edx, %edx
movq 0x30(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movb %al, (%rcx,%rdx)
movq 0x30(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movb %al, (%rcx,%rdx)
incq %rdx
movslq 0xc(%rbx), %rcx
cmpq %rcx, %rdx
jl 0x16b3
movq 0x30(%rbx), %rsi
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movl %r15d, (%rsp)
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1ea4
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 0x1070
movslq %r12d, %rax
movq 0x20(%rbx), %rcx
movq 0x30(%rbx), %rdx
movq (%rcx,%rax,8), %rdi
movq (%rdx,%r15,8), %rsi
jmp 0x174b
movq 0x30(%rbx), %rsi
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1dfe
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 0x1070