// File: mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib_impl::force_symmetric_rec_off_stat(alglib_impl::x_matrix*, long, long, long, long)
static void force_symmetric_rec_off_stat(x_matrix *a, ae_int_t offset0, ae_int_t offset1, ae_int_t len0, ae_int_t len1)
{
    /* try to split problem into two smaller ones */
    if( len0>x_nb || len1>x_nb )
    {
        ae_int_t n1, n2;
        if( len0>len1 )
        {
            x_split_length(len0, x_nb, &n1, &n2);
            force_symmetric_rec_off_stat(a, offset0,    offset1, n1, len1);
            force_symmetric_rec_off_stat(a, offset0+n1, offset1, n2, len1);
        }
        else
        {
            x_split_length(len1, x_nb, &n1, &n2);
            force_symmetric_rec_off_stat(a, offset0, offset1,    len0, n1);
            force_symmetric_rec_off_stat(a, offset0, offset1+n1, len0, n2);
        }
        return;
    }
    else
    {
        /* base case */
        double *p1, *p2, *prow, *pcol;
        ae_int_t i, j;

        p1 = (double*)(a->ptr)+offset0*a->stride+offset1;
        p2 = (double*)(a->ptr)+offset1*a->stride+offset0;
        for(i=0; i<len0; i++)
        {
            pcol = p2+i;
            prow = p1+i*a->stride;
            for(j=0; j<len1; j++)
            {
                *pcol = *prow;
                pcol += a->stride;
                prow++;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpq $0x10, -0x20(%rbp)
jg 0x52bfe
cmpq $0x10, -0x28(%rbp)
jle 0x52ca7
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x52c56
movq -0x20(%rbp), %rdi
movl $0x10, %esi
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x52220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x52bd0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x52bd0
jmp 0x52ca2
movq -0x28(%rbp), %rdi
movl $0x10, %esi
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x52220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x52bd0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0x52bd0
jmp 0x52da7
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x10(%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x10(%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x52da5
movq -0x48(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq -0x60(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x10(%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x52d92
movq -0x50(%rbp), %rax
movsd (%rax), %xmm0
movq -0x58(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
shlq $0x3, %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x52d4a
jmp 0x52d94
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x52d05
jmp 0x52da7
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)