// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x14(%rdi), %r12d
movslq %r12d, %rax
movq %rax, -0x38(%rbp)
leaq 0x8(,%rax,8), %rdi
callq 0x10f0
movq %rax, %r14
movslq 0xc(%rbx), %r13
movq %r13, %rax
shlq $0x2, %rax
movq %rax, -0x30(%rbp)
xorl %r15d, %r15d
cmpq -0x38(%rbp), %r15
jg 0x2674
pushq $0x1
popq %rdi
movq -0x30(%rbp), %rsi
callq 0x1070
movq %rax, (%r14,%r15,8)
incq %r15
jmp 0x2659
xorl %ecx, %ecx
movslq %r12d, %rax
cmpq %rax, %rcx
jg 0x26dd
xorl %esi, %esi
movslq 0x28(%rbx), %rax
cmpq %rax, %rsi
jge 0x26d4
movl %ecx, %edi
subl %esi, %edi
movq 0x18(%rbx), %r8
xorl %r9d, %r9d
movslq %r13d, %rax
cmpq %rax, %r9
jge 0x26cf
movl 0x10(%rbx), %r10d
leal (%r10,%rdi), %eax
cltd
idivl %r10d
cmpl 0x14(%rbx), %edx
jge 0x26ca
movq (%r8,%rsi,8), %rax
imull %r13d, %edx
addl %r9d, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %eax
movq (%r14,%rcx,8), %rdx
xorl %eax, (%rdx,%r9,4)
movl 0xc(%rbx), %r13d
incq %r9
jmp 0x2694
incq %rsi
jmp 0x2680
incq %rcx
movl 0x14(%rbx), %r12d
jmp 0x2676
xorl %eax, %eax
movslq %r12d, %rcx
cmpq %rcx, %rax
jge 0x2715
xorl %ecx, %ecx
movslq %r13d, %rdx
cmpq %rdx, %rcx
jge 0x270c
movq (%r14,%rax,8), %rdx
movslq 0x14(%rbx), %rsi
movq (%r14,%rsi,8), %rsi
movl (%rsi,%rcx,4), %esi
xorl %esi, (%rdx,%rcx,4)
incq %rcx
movl 0xc(%rbx), %r13d
jmp 0x26e9
incq %rax
movl 0x14(%rbx), %r12d
jmp 0x26df
xorl %r15d, %r15d
movslq %r12d, %rax
cmpq %rax, %r15
jge 0x2752
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 0x1130
incq %r15
movl 0x14(%rbx), %r12d
jmp 0x2718
xorl %r15d, %r15d
movslq %r12d, %rax
cmpq %rax, %r15
jg 0x276f
movq (%r14,%r15,8), %rdi
callq 0x10d0
incq %r15
movl 0x14(%rbx), %r12d
jmp 0x2755
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10d0
nop