// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib_impl::is_symmetric_rec_diag_stat(alglib_impl::x_matrix*, long, long, bool*, double*, double*, alglib_impl::ae_state*)
static void is_symmetric_rec_diag_stat(x_matrix *a, ae_int_t offset, ae_int_t len, ae_bool *nonfinite, double *mx, double *err, ae_state *_state)
{
    double *p, *prow, *pcol;
    double v;
    ae_int_t i, j;
    
    /* try to split problem into two smaller ones */
    if( len>x_nb )
    {
        ae_int_t n1, n2;
        x_split_length(len, x_nb, &n1, &n2);
        is_symmetric_rec_diag_stat(a, offset, n1, nonfinite, mx, err, _state);
        is_symmetric_rec_diag_stat(a, offset+n1, n2, nonfinite, mx, err, _state);
        is_symmetric_rec_off_stat(a, offset+n1, offset, n2, n1, nonfinite, mx, err, _state);
        return;
    }
    
    /* base case */
    p = (double*)(a->ptr)+offset*a->stride+offset;
    for(i=0; i<len; i++)
    {
        pcol = p+i;
        prow = p+i*a->stride;
        for(j=0; j<i; j++,pcol+=a->stride,prow++)
        {
            if( !ae_isfinite(*pcol,_state) || !ae_isfinite(*prow,_state) )
            {
                *nonfinite = ae_true;
            }
            else
            {
                v = fabs(*pcol);
                *mx =  *mx>v ? *mx : v;
                v = fabs(*prow);
                *mx =  *mx>v ? *mx : v;
                v = fabs(*pcol-*prow);
                *err = *err>v ? *err : v;
            }
        }
        v = fabs(p[i+i*a->stride]);
        *mx =  *mx>v ? *mx : v;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rcx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq 0x80(%rsp), %rbp
cmpq $0x10, %rdx
jle 0x246f4
leaq 0x40(%rsp), %rsi
leaq 0x38(%rsp), %rax
movq %rdx, %rdi
movq %rax, %rdx
callq 0x2e5da
leaq 0x40(%rsp), %rax
movq (%rax), %rdx
movq %rbp, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r12, 0x20(%rsp)
movq %rdx, %r12
movq %rdx, 0x30(%rsp)
movq %rbx, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x2461c
movq 0x20(%rsp), %rax
addq %rax, %r12
leaq 0x38(%rsp), %rax
movq (%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rbp, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x2461c
movq %rbp, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq %r14, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq %rbx, %r9
callq 0x2e635
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r13), %rax
movq %rax, %rcx
imulq %r12, %rcx
shlq $0x3, %rcx
addq 0x30(%r13), %rcx
leaq (%rcx,%r12,8), %rcx
leaq 0x1(%rax), %rsi
movq %rsi, 0x20(%rsp)
xorl %edi, %edi
testq %rdx, %rdx
cmovleq %rdi, %rdx
shlq $0x3, %rax
movapd 0xeae7(%rip), %xmm0     # 0x33210
movdqa 0xeadf(%rip), %xmm1     # 0x33210
movq %rcx, %r8
movq %rcx, %r9
cmpq %rdx, %rdi
je 0x246e5
movq %r8, %r10
xorl %r11d, %r11d
cmpq %r11, %rdi
je 0x247e5
movq (%r10), %xmm2
movq (%rbp), %r12
movq %xmm2, %rsi
movq %rsi, %r13
shrq $0x20, %r13
cmpq $0x1, %r12
cmovnel %esi, %r13d
notl %r13d
testl $0x7ff00000, %r13d      # imm = 0x7FF00000
je 0x24793
movq (%r9,%r11,8), %rsi
movq %rsi, %r13
shrq $0x20, %r13
cmpq $0x1, %r12
cmovnel %esi, %r13d
notl %r13d
testl $0x7ff00000, %r13d      # imm = 0x7FF00000
jne 0x24798
movb $0x1, (%rbx)
jmp 0x247da
pand %xmm1, %xmm2
movsd (%r14), %xmm3
maxsd %xmm2, %xmm3
movsd %xmm3, (%r14)
movq (%r9,%r11,8), %xmm2
pand %xmm1, %xmm2
maxsd %xmm2, %xmm3
movsd %xmm3, (%r14)
movsd (%r10), %xmm2
subsd (%r9,%r11,8), %xmm2
andpd %xmm1, %xmm2
movsd (%r15), %xmm3
maxsd %xmm2, %xmm3
movsd %xmm3, (%r15)
incq %r11
addq %rax, %r10
jmp 0x24742
movq %rdi, %rsi
imulq 0x20(%rsp), %rsi
movsd (%rcx,%rsi,8), %xmm2
andpd %xmm0, %xmm2
movsd (%r14), %xmm3
maxsd %xmm2, %xmm3
movsd %xmm3, (%r14)
incq %rdi
addq %rax, %r9
addq $0x8, %r8
jmp 0x24737