// File: syzcch[P]FEC_C_version/./fec_star.h
// Function: star::STAR_encoding_diag2()
void STAR_encoding_diag2()
    {
        int i,j,stripe,k;
        int *tmp;
        tmp = (int*)malloc(sizeof(int) * (p * block_size));
        memset(tmp, 0, p*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 * block_size + j] ^= check_data[i][ k * block_size + j];
                }
            }
        }
        for( i = 0; i< block_nbr; i++)
        {
            for( j = 0; j< block_size; j++)
            {
                tmp[ i * block_size + j] ^= tmp[block_nbr * block_size + j];
            }
        }

        memmove( check_data[data_disk_nbr + 2], tmp, check_data_size * sizeof(int));

        free(tmp);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movl 0x10(%rcx), %eax
imull 0xc(%rcx), %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x2180
movq -0x28(%rbp), %rcx
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl 0x10(%rcx), %eax
imull 0xc(%rcx), %eax
movslq %eax, %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0x2090
movl $0x0, -0x14(%rbp)
movq -0x28(%rbp), %rcx
movl -0x14(%rbp), %eax
movl 0x14(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x4c1e
movl $0x0, -0xc(%rbp)
movq -0x28(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x28(%rcx), %eax
jge 0x4c0e
movl $0x0, -0x10(%rbp)
movq -0x28(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x4bfe
movq -0x28(%rbp), %rcx
movl -0x14(%rbp), %eax
addl -0xc(%rbp), %eax
addl 0x10(%rcx), %eax
cltd
idivl 0x10(%rcx)
movl %edx, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x14(%rcx), %eax
jge 0x4bf1
movq -0x28(%rbp), %rsi
movq 0x18(%rsi), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x18(%rbp), %ecx
imull 0xc(%rsi), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
imull 0xc(%rsi), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
jmp 0x4bf3
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4b92
jmp 0x4c00
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4b7b
jmp 0x4c10
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4b5f
movl $0x0, -0xc(%rbp)
movq -0x28(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x14(%rcx), %eax
jge 0x4c8b
movl $0x0, -0x10(%rbp)
movq -0x28(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0x4c7e
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movl 0x14(%rsi), %ecx
imull 0xc(%rsi), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movl -0xc(%rbp), %ecx
imull 0xc(%rsi), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4c38
jmp 0x4c80
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4c25
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
movl 0x28(%rax), %edx
addl $0x2, %edx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rdi
movq -0x20(%rbp), %rsi
movslq 0x8(%rax), %rdx
shlq $0x2, %rdx
callq 0x21b0
movq -0x20(%rbp), %rdi
callq 0x2150
addq $0x30, %rsp
popq %rbp
retq