// File: /workspace/github_cpp_makefile_star2_O1/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
movslq 0x18(%rdi), %rax
testq %rax, %rax
jle 0x155f
movq 0x38(%rbx), %rcx
movslq 0x8(%rbx), %rdx
xorl %esi, %esi
xorl %edi, %edi
xorl %r9d, %r9d
xorl %r15d, %r15d
xorl %r8d, %r8d
xorl %r14d, %r14d
xorl %r13d, %r13d
cmpl $0x1, (%rcx,%rsi,4)
jne 0x154f
testl %edi, %edi
je 0x1537
incl %edi
cmpl $0x2, %r13d
jne 0x154f
xorl %r13d, %r13d
cmpq %rdx, %rsi
setl %r13b
orl $0x2, %r13d
leal 0x2(%rsi), %r15d
movl %esi, %r9d
jmp 0x154f
xorl %edi, %edi
cmpq %rdx, %rsi
setl %dil
addl %edi, %r13d
leal 0x2(%rsi), %r14d
movl $0x1, %edi
movl %esi, %r8d
incq %rsi
cmpq %rsi, %rax
jne 0x150e
cmpl $0x3, %edi
setge %al
jmp 0x1570
xorl %r13d, %r13d
xorl %r14d, %r14d
xorl %r8d, %r8d
xorl %r15d, %r15d
xorl %r9d, %r9d
xorl %eax, %eax
testl %r13d, %r13d
je 0x1585
testb %al, %al
je 0x1591
leaq 0x1b4e(%rip), %rdi      # 0x30ce
jmp 0x16a3
leaq 0x1b6f(%rip), %rdi      # 0x30fb
jmp 0x16a3
movl 0x8(%rbx), %esi
cmpl $0x2, %r13d
jne 0x15bf
testl %r8d, %r8d
js 0x169c
cmpl %esi, %r8d
setl %al
testl %r9d, %r9d
setns %cl
cmpl %esi, %r9d
setl %dl
andb %al, %dl
testb %cl, %dl
je 0x169c
movl %esi, -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 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 0x1629
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 0x1603
movl 0xc(%rbx), %ecx
movslq %r14d, %r14
testl %ecx, %ecx
movl -0x34(%rbp), %r12d
jle 0x1651
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 0x1639
cmpl $0x1, %r13d
jne 0x16b6
cmpl %r12d, -0x30(%rbp)
jne 0x1732
movl 0xc(%rbx), %ecx
testl %ecx, %ecx
jle 0x1681
xorl %eax, %eax
movq 0x30(%rbx), %rcx
movq (%rcx), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
movslq 0xc(%rbx), %rcx
cmpq %rcx, %rax
jl 0x166a
movq 0x30(%rbx), %rsi
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1ac0
jmp 0x1748
leaq 0x19d3(%rip), %rdi      # 0x3076
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10d0
movl 0xc(%rbx), %ecx
movslq %r15d, %r15
testl %ecx, %ecx
jle 0x16e6
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 0x16c4
movq 0x30(%rbx), %rsi
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movl %r15d, (%rsp)
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1eb2
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 0x175c
movq 0x30(%rbx), %rsi
movl 0x8(%rbx), %edx
movl 0x14(%rbx), %r8d
movq %rbx, %rdi
movl %r14d, %r9d
callq 0x1e08
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
nop