// File: /workspace/github_cpp_makefile_star2_O1/syzcch[P]FEC_C_version/./fec_star.h
// Function: star::STAR_encoding_diag1()
void STAR_encoding_diag1()
    {
        int i,j,stripe,k;
        int **tmp;

        tmp =  (int**)malloc((block_nbr+1) * sizeof(int*));
        for( i = 0; i < block_nbr + 1; i++)
        {
            tmp[i] = (int*)malloc(sizeof(int) * block_size);
            memset(tmp[i], 0,block_size*sizeof(int));
        }
        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][j] ^= check_data[i][(stripe - i + p)%p * block_size + j];

                    }
                }

            }

        }
        /*after store diagonal line checksum in tmp[block_nbr]*/
        /*we need using diagonal line checksum and s to do xor compute */
        for( i = 0; i<block_nbr; i++)
        {
            for( j = 0; j<block_size; j++)
            {
                tmp[i][j] = tmp[i][j] ^ tmp[block_nbr][j];

            }
        }

        for( i = 0; i < block_nbr; i++)
        {
            memmove(check_data[data_disk_nbr + 1] + (i * block_size), tmp[i], block_size * sizeof(int));
        }

        for(int i = 0; i < block_nbr+1; i++)
        {
            free(tmp[i]);

        }
        free(tmp);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x14(%rdi), %r15
leaq 0x8(,%r15,8), %rdi
callq 0x10d0
movq %rax, %r14
testq %r15, %r15
js 0x2854
movl %r15d, %r12d
movslq 0xc(%rbx), %r15
shlq $0x2, %r15
incq %r12
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x10d0
movq %rax, (%r14,%r13,8)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x1050
incq %r13
cmpq %r13, %r12
jne 0x2833
cmpl $0x0, 0x14(%rbx)
js 0x28ca
xorl %ecx, %ecx
cmpl $0x0, 0x28(%rbx)
jle 0x28ba
xorl %esi, %esi
movl 0xc(%rbx), %r9d
testl %r9d, %r9d
jle 0x28ae
movl %ecx, %edi
subl %esi, %edi
movq 0x18(%rbx), %r8
xorl %r10d, %r10d
movl 0x10(%rbx), %r11d
leal (%r11,%rdi), %eax
cltd
idivl %r11d
cmpl 0x14(%rbx), %edx
jge 0x28a2
movq (%r8,%rsi,8), %rax
imull %r9d, %edx
addl %r10d, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %eax
movq (%r14,%rcx,8), %rdx
xorl %eax, (%rdx,%r10,4)
incq %r10
movslq 0xc(%rbx), %r9
cmpq %r9, %r10
jl 0x2878
incq %rsi
movslq 0x28(%rbx), %rax
cmpq %rax, %rsi
jl 0x2864
leaq 0x1(%rcx), %rax
movslq 0x14(%rbx), %rdx
cmpq %rdx, %rcx
movq %rax, %rcx
jl 0x285c
cmpl $0x0, 0x14(%rbx)
jle 0x2904
xorl %eax, %eax
cmpl $0x0, 0xc(%rbx)
jle 0x28f8
movq (%r14,%rax,8), %rcx
xorl %edx, %edx
movslq 0x14(%rbx), %rsi
movq (%r14,%rsi,8), %rsi
movl (%rsi,%rdx,4), %esi
xorl %esi, (%rcx,%rdx,4)
incq %rdx
movslq 0xc(%rbx), %rsi
cmpq %rsi, %rdx
jl 0x28de
incq %rax
movslq 0x14(%rbx), %rcx
cmpq %rcx, %rax
jl 0x28d2
cmpl $0x0, 0x14(%rbx)
jle 0x2942
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movslq 0x28(%rbx), %rcx
movslq 0xc(%rbx), %rdx
movslq %r15d, %rdi
imulq %rdx, %rdi
shlq $0x2, %rdi
addq 0x8(%rax,%rcx,8), %rdi
movq (%r14,%r15,8), %rsi
shlq $0x2, %rdx
callq 0x1110
incq %r15
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jl 0x290d
cmpl $0x0, 0x14(%rbx)
js 0x2965
movq $-0x1, %r15
movq 0x8(%r14,%r15,8), %rdi
callq 0x10b0
movslq 0x14(%rbx), %rax
incq %r15
cmpq %rax, %r15
jl 0x294f
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
nop