// File: /workspace/github_cpp_makefile_star2_O3/syzcch[P]FEC_C_version/./fec_star.h
// Function: star::Evenodd_decoding_1(int, int)
void Evenodd_decoding_1(int rs_disk1, int rs_disk2)
    {

        /*2 situations:1,one data error + row data error
                          2,two data error*/
        int i,j,stripe,k;
        int *tmp;
        tmp = (int*)malloc(sizeof(int) * (p * block_size));
        memset(tmp, 0, p*block_size*sizeof(int));

        int *tmp_for_s;
        tmp_for_s = (int *)malloc(sizeof(int) * block_size);
        memset(tmp_for_s, 0, block_size *sizeof(int));

        /*one data error + row data error*/
        if(rs_disk1 < data_disk_nbr && rs_disk2 == data_disk_nbr)
        {
            for(stripe = 0; stripe < block_nbr+1; stripe++)
            {
                for(i = 0; i < data_disk_nbr; i++)
                {
                    for(j = 0; j<block_size; j++)
                    {
                        k = (stripe + i + p) % p;
                        if( k < block_nbr)
                            tmp[stripe * block_size + j] ^= check_data[i][ k * block_size + j];
                    }
                }
            }

            /*find out s*/
            stripe = ( p - rs_disk1 - 1) % p;

            for( i = 0; i < block_size; i++)
            {
                if(stripe ==  p - 1)
                    tmp_for_s[i] = tmp[stripe * block_size + i];
                else
                    tmp_for_s[i] = tmp[stripe * block_size + i] ^ check_data[data_disk_nbr + 2][stripe * block_size + i];
            }

            for( i = 0; i < block_nbr; i++)
            {
                for( j = 0; j < block_size; j++)
                {
                    tmp[i * block_size + j] ^= (tmp_for_s[j] ^ check_data[data_disk_nbr + 2][ i * block_size + j]);
                }
            }
            for( i = 0; i < block_size; i++)
                tmp[block_nbr * block_size + i]^=tmp_for_s[i];
            /*now all restored data is store in tmp.*/

            for( i = 0; i < p; i++)
            {
                j = (i + p + rs_disk1) % p;
                if( j < p - 1)
                {
                    memmove( check_data[rs_disk1] + j * block_size, tmp + i * block_size, block_size * sizeof(int));/*********************/
                    /*********************/
                }
            }
            STAR_encoding_row();
        }

        if(rs_disk1 < data_disk_nbr && rs_disk2 < data_disk_nbr)
        {
            for( i = 0; i < block_nbr; i++)
            {
                for( j = 0; j < block_size; j++)
                {
                    tmp_for_s[j] ^= check_data[data_disk_nbr][i * block_size + j];
                    tmp_for_s[j] ^= check_data[data_disk_nbr + 2][i * block_size + j];
                }
            }

            /*  for( i = 0; i < block_nbr; i++)
                {
                    for( j = 0; j < block_size; j++)
                    {
                        check_data[p + 1][i * block_size + j] ^= tmp_for_s[j];
                    }
                }
            */

            for(stripe = 0; stripe < block_nbr+1; stripe++)
            {
                for(i = 0; i < data_disk_nbr; i++)
                {
                    for(j = 0; j < block_size; j++)
                    {
                        k = (stripe + i + p) % p;
                        if( k < block_nbr)
                            tmp[stripe * block_size + j] ^= check_data[i][ k * block_size + j];
                    }
                }
            }
            for( i = 0; i< block_nbr ; i++)
            {
                for( j = 0; j< block_size; j++)
                {
                    if( i < block_nbr)
                        tmp[ i * block_size + j] ^= (check_data[data_disk_nbr + 2][i * block_size + j] ^ tmp_for_s[j]);
                    //else tmp[ i * block_size + j] ^= tmp_for_s[j];
                }
            }
            for( j = 0; j< block_size; j++)
                tmp[ block_nbr * block_size + j] ^= tmp_for_s[j];
            /*s store in tmp*/

            stripe = ( p - rs_disk1 - 1) % p;
            /*apply tmp_for_s to store temporary data*/
            memmove( tmp_for_s, tmp + stripe * block_size, block_size* sizeof(int));

            while(1)
            {
                k = (stripe + rs_disk2 + p) % p;/*rs_disk2*/
                if( k == block_nbr)
                    break;
                memmove( check_data[rs_disk2] + k * block_size, tmp_for_s, block_size * sizeof(int));

                for( i = 0; i < block_size; i++)
                {
                    for( j = 0 ; j <= data_disk_nbr ; j++)
                        if( j != rs_disk1)
                            check_data[rs_disk1][k * block_size + i] ^= check_data[j][k * block_size + i];
                }

                stripe = (k - rs_disk1 + p) % p;
                for( i = 0; i < block_size; i++)
                {
                    tmp_for_s[i] = check_data[rs_disk1][k * block_size + i] ^ tmp[stripe * block_size + i];
                }
            }
        }
        free(tmp);
        free(tmp_for_s);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movl %esi, %r13d
movq %rdi, %r15
movl 0x10(%rdi), %r14d
movslq 0xc(%rdi), %r12
movl %r12d, %eax
imull %r14d, %eax
movslq %eax, %rsi
shlq $0x2, %rsi
movl $0x1, %edi
callq 0x1060
movq %rax, -0x30(%rbp)
leaq (,%r12,4), %rsi
movl $0x1, %edi
movq %rsi, -0x50(%rbp)
callq 0x1060
movq %rax, -0x40(%rbp)
movl 0x28(%r15), %edx
cmpl %r13d, %edx
setle %al
movq %rbx, -0x38(%rbp)
cmpl %ebx, %edx
setne %cl
orb %al, %cl
movq %r13, -0x48(%rbp)
jne 0x34cc
movq %r12, -0x58(%rbp)
movl %r12d, %ecx
movl 0x14(%r15), %esi
testl %esi, %esi
js 0x337e
movq 0x18(%r15), %rdi
leaq 0x1(%rsi), %rax
movq %rax, -0x60(%rbp)
movl -0x38(%rbp), %r9d
xorl %r10d, %r10d
movq -0x30(%rbp), %r11
cmpl $0x0, -0x38(%rbp)
jle 0x3371
leal (%r14,%r10), %r13d
xorl %ebx, %ebx
testl %ecx, %ecx
jle 0x3369
leal (%rbx,%r13), %eax
cltd
idivl %r14d
movl %edx, %eax
imull %ecx, %eax
cltq
shlq $0x2, %rax
xorl %r12d, %r12d
cmpl %esi, %edx
jge 0x3361
movq (%rdi,%rbx,8), %r8
addq %rax, %r8
movl (%r8,%r12,4), %r8d
xorl %r8d, (%r11,%r12,4)
incq %r12
cmpq %r12, %rcx
jne 0x334e
incq %rbx
cmpq %r9, %rbx
jne 0x3334
incq %r10
addq -0x50(%rbp), %r11
cmpq -0x60(%rbp), %r10
jne 0x3328
testl %ecx, %ecx
movq -0x48(%rbp), %r13
movq -0x40(%rbp), %r12
jle 0x33e2
movl %r13d, %eax
notl %eax
addl %r14d, %eax
cltd
idivl %r14d
leal -0x1(%r14), %eax
movl %edx, %r9d
imull -0x58(%rbp), %r9d
movq 0x18(%r15), %rdi
movslq -0x38(%rbp), %r8
movslq %r9d, %r9
movq -0x30(%rbp), %r10
leaq (%r10,%r9,4), %r10
shlq $0x2, %r9
xorl %r11d, %r11d
cmpl %eax, %edx
jne 0x33c6
movl (%r10,%r11,4), %ebx
jmp 0x33d6
movq 0x10(%rdi,%r8,8), %rbx
addq %r9, %rbx
movl (%rbx,%r11,4), %ebx
xorl (%r10,%r11,4), %ebx
movl %ebx, (%r12,%r11,4)
incq %r11
cmpq %r11, %rcx
jne 0x33bc
testl %esi, %esi
jle 0x3435
movq 0x18(%r15), %rax
movslq -0x38(%rbp), %rdx
leaq (,%rcx,4), %rdi
xorl %r8d, %r8d
movq -0x30(%rbp), %r9
xorl %r10d, %r10d
movq -0x40(%rbp), %r13
testl %ecx, %ecx
jle 0x3427
movq 0x10(%rax,%rdx,8), %r11
addq %r8, %r11
xorl %ebx, %ebx
movl (%r11,%rbx,4), %r12d
xorl (%r13,%rbx,4), %r12d
xorl %r12d, (%r9,%rbx,4)
incq %rbx
cmpq %rbx, %rcx
jne 0x3412
incq %r10
addq %rdi, %r9
addq %rdi, %r8
cmpq %rsi, %r10
jne 0x3404
testl %ecx, %ecx
movq -0x40(%rbp), %rdi
movq -0x58(%rbp), %r8
jle 0x345f
imull %esi, %ecx
movslq %ecx, %rax
movq -0x30(%rbp), %rcx
leaq (%rcx,%rax,4), %rax
xorl %ecx, %ecx
movl (%rdi,%rcx,4), %edx
xorl %edx, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r8
jne 0x3451
testl %r14d, %r14d
movq -0x48(%rbp), %r13
jle 0x34c0
movslq %r13d, %rbx
xorl %r12d, %r12d
leal (%r14,%r13), %eax
addl %r12d, %eax
cltd
idivl %r14d
leal -0x1(%r14), %eax
cmpl %eax, %edx
jge 0x34b8
movq 0x18(%r15), %rcx
movslq 0xc(%r15), %rax
imull %eax, %edx
movslq %edx, %rdi
shlq $0x2, %rdi
addq (%rcx,%rbx,8), %rdi
movl %eax, %ecx
imull %r12d, %ecx
movslq %ecx, %rcx
movq -0x30(%rbp), %rdx
leaq (%rdx,%rcx,4), %rsi
shlq $0x2, %rax
movq %rax, %rdx
callq 0x1080
movl 0x10(%r15), %r14d
incl %r12d
cmpl %r14d, %r12d
jl 0x346e
movq %r15, %rdi
callq 0x280c
movl 0x28(%r15), %edx
cmpl %r13d, %edx
setle %al
cmpl -0x38(%rbp), %edx
setle %cl
orb %al, %cl
jne 0x37b7
movl 0xc(%r15), %r14d
movl 0x14(%r15), %ebx
movl %edx, -0x50(%rbp)
movslq %edx, %r12
testl %ebx, %ebx
movq -0x40(%rbp), %r11
jle 0x353f
movq 0x18(%r15), %rax
leaq (,%r14,4), %rcx
xorl %edx, %edx
xorl %esi, %esi
testl %r14d, %r14d
jle 0x3534
movq 0x10(%rax,%r12,8), %r8
addq %rdx, %r8
movq (%rax,%r12,8), %r9
addq %rdx, %r9
xorl %edi, %edi
movl (%r11,%rdi,4), %r10d
xorl (%r9,%rdi,4), %r10d
xorl (%r8,%rdi,4), %r10d
movl %r10d, (%r11,%rdi,4)
incq %rdi
cmpq %rdi, %r14
jne 0x351c
incq %rsi
addq %rcx, %rdx
cmpq %rbx, %rsi
jne 0x3506
movslq %r14d, %rax
movq %rax, -0x58(%rbp)
testl %ebx, %ebx
js 0x3623
movq %r12, -0x68(%rbp)
movl 0x10(%r15), %r8d
movq 0x18(%r15), %r9
leaq 0x1(%rbx), %rax
movq %rax, -0x60(%rbp)
movl -0x50(%rbp), %edx
movl %edx, %r11d
movq -0x58(%rbp), %rax
leaq (,%rax,4), %r12
xorl %r13d, %r13d
movq -0x30(%rbp), %rcx
testl %edx, %edx
jle 0x35c2
xorl %esi, %esi
testl %r14d, %r14d
jle 0x35ba
leal (%rsi,%r13), %eax
addl %r8d, %eax
cltd
idivl %r8d
movl %edx, %eax
imull %r14d, %eax
cltq
shlq $0x2, %rax
xorl %edi, %edi
cmpl %ebx, %edx
jge 0x35b2
movq (%r9,%rsi,8), %r10
addq %rax, %r10
movl (%r10,%rdi,4), %r10d
xorl %r10d, (%rcx,%rdi,4)
incq %rdi
cmpq %rdi, %r14
jne 0x359f
incq %rsi
cmpq %r11, %rsi
jne 0x3581
incq %r13
addq %r12, %rcx
cmpq -0x60(%rbp), %r13
movl -0x50(%rbp), %edx
jne 0x357b
testl %ebx, %ebx
movq -0x40(%rbp), %r11
movq -0x68(%rbp), %r12
jle 0x3623
movq 0x18(%r15), %rax
leaq (,%r14,4), %rcx
xorl %edx, %edx
movq -0x30(%rbp), %rsi
xorl %edi, %edi
testl %r14d, %r14d
jle 0x3615
movq 0x10(%rax,%r12,8), %r8
addq %rdx, %r8
xorl %r9d, %r9d
movl (%r11,%r9,4), %r10d
xorl (%r8,%r9,4), %r10d
xorl %r10d, (%rsi,%r9,4)
incq %r9
cmpq %r9, %r14
jne 0x3601
incq %rdi
addq %rcx, %rsi
addq %rcx, %rdx
cmpq %rbx, %rdi
jne 0x35f1
testl %r14d, %r14d
jle 0x3649
movl %ebx, %eax
imull %r14d, %eax
cltq
movq -0x30(%rbp), %rcx
leaq (%rcx,%rax,4), %rax
xorl %ecx, %ecx
movl (%r11,%rcx,4), %edx
xorl %edx, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r14
jne 0x363a
movl 0x10(%r15), %r13d
movq -0x48(%rbp), %rax
notl %eax
addl %r13d, %eax
cltd
idivl %r13d
movq %r11, %rdi
movl %edx, %r12d
movl %edx, %eax
imull %r14d, %eax
cltq
movq -0x30(%rbp), %rcx
leaq (%rcx,%rax,4), %rsi
movq -0x58(%rbp), %rdx
shlq $0x2, %rdx
callq 0x1080
movq -0x38(%rbp), %rax
addl %r13d, %eax
addl %r12d, %eax
cltd
idivl %r13d
cmpl %ebx, %edx
je 0x37b7
movl %edx, %r12d
movslq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movslq %eax, %rbx
movl %eax, %r13d
negq %r13
movq 0x18(%r15), %rax
movslq %r14d, %rdx
imull %r12d, %r14d
movslq %r14d, %rdi
shlq $0x2, %rdi
movq -0x50(%rbp), %rcx
addq (%rax,%rcx,8), %rdi
shlq $0x2, %rdx
movq -0x40(%rbp), %rsi
callq 0x1080
movl 0xc(%r15), %r14d
testl %r14d, %r14d
jle 0x378f
movl 0x28(%r15), %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x372e
movq 0x18(%r15), %rdx
movq $-0x1, %rsi
leaq (%rsi,%r13), %rdi
cmpq $-0x1, %rdi
je 0x371f
movq 0x8(%rdx,%rsi,8), %rcx
movl 0xc(%r15), %edi
imull %r12d, %edi
addl %eax, %edi
movslq %edi, %rdi
movl (%rcx,%rdi,4), %ecx
movq (%rdx,%rbx,8), %r8
xorl %ecx, (%r8,%rdi,4)
movl 0x28(%r15), %ecx
movslq %ecx, %rdi
incq %rsi
cmpq %rdi, %rsi
jl 0x36f4
movl 0xc(%r15), %r14d
incl %eax
cmpl %r14d, %eax
jl 0x36e5
movl %r12d, %eax
subl -0x48(%rbp), %eax
movl 0x10(%r15), %ecx
addl %ecx, %eax
cltd
idivl %ecx
movl %edx, %eax
testl %r14d, %r14d
jle 0x37a2
movq 0x18(%r15), %rdi
imull %r14d, %r12d
movl %eax, %esi
imull %r14d, %esi
movslq %r12d, %rdx
movslq %esi, %r8
movl %r14d, %esi
shlq $0x2, %rdx
addq (%rdi,%rbx,8), %rdx
movq -0x30(%rbp), %rdi
leaq (%rdi,%r8,4), %rdi
xorl %r8d, %r8d
movq -0x40(%rbp), %r10
movl (%rdi,%r8,4), %r9d
xorl (%rdx,%r8,4), %r9d
movl %r9d, (%r10,%r8,4)
incq %r8
cmpq %r8, %rsi
jne 0x3779
jmp 0x37a2
subl -0x48(%rbp), %r12d
movl 0x10(%r15), %ecx
addl %ecx, %r12d
movl %r12d, %eax
cltd
idivl %ecx
movl %edx, %eax
addl -0x38(%rbp), %eax
addl %ecx, %eax
cltd
idivl %ecx
movl %edx, %r12d
cmpl 0x14(%r15), %edx
jne 0x36ab
movq -0x30(%rbp), %rdi
callq 0x10c0
movq -0x40(%rbp), %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0