// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movq %r9, %r12
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r14
cmpq $0x11, %rdx
jl 0x260c0
movq %r14, %rax
andq $0xf, %rax
je 0x261e6
movq %rax, 0x18(%rsp)
movabsq $0x7ffffffffffffff0, %rax # imm = 0x7FFFFFFFFFFFFFF0
andq %rax, %r14
jmp 0x26219
testq %r14, %r14
jle 0x2628f
movq 0x10(%rdi), %rax
movq %rax, %rcx
imulq %rsi, %rcx
shlq $0x3, %rcx
addq 0x30(%rdi), %rcx
leaq (%rcx,%rsi,8), %rcx
leaq 0x1(%rax), %rdx
shlq $0x3, %rax
xorl %esi, %esi
movapd 0x1012e(%rip), %xmm0    # 0x36220
movdqa 0x10126(%rip), %xmm1    # 0x36220
movq %rcx, %rdi
movq %rcx, %r8
testq %rsi, %rsi
je 0x261af
movq 0x60(%rsp), %r9
movq (%r9), %r9
movq %r8, %r10
xorl %r11d, %r11d
movq (%r10), %xmm2
movq %xmm2, %r13
movq %r13, %rbp
shrq $0x20, %rbp
cmpq $0x1, %r9
cmovnel %r13d, %ebp
notl %ebp
testl $0x7ff00000, %ebp       # imm = 0x7FF00000
je 0x26157
movq (%rdi,%r11,8), %r13
movq %r13, %rbp
shrq $0x20, %rbp
cmpq $0x1, %r9
cmovnel %r13d, %ebp
notl %ebp
testl $0x7ff00000, %ebp       # imm = 0x7FF00000
jne 0x2615c
movb $0x1, (%rbx)
jmp 0x261a0
pand %xmm1, %xmm2
movsd (%r15), %xmm3
maxsd %xmm2, %xmm3
movsd %xmm3, (%r15)
movq (%rdi,%r11,8), %xmm2
pand %xmm1, %xmm2
maxsd %xmm2, %xmm3
movsd %xmm3, (%r15)
movsd (%r10), %xmm2
subsd (%rdi,%r11,8), %xmm2
andpd %xmm1, %xmm2
movsd (%r12), %xmm3
maxsd %xmm2, %xmm3
movsd %xmm3, (%r12)
incq %r11
addq %rax, %r10
cmpq %r11, %rsi
jne 0x26117
movq %rsi, %r9
imulq %rdx, %r9
movsd (%rcx,%r9,8), %xmm2
andpd %xmm0, %xmm2
movsd (%r15), %xmm3
maxsd %xmm2, %xmm3
movsd %xmm3, (%r15)
incq %rsi
addq $0x8, %r8
addq %rax, %rdi
cmpq %r14, %rsi
jne 0x26100
jmp 0x2628f
movq %r14, %rdx
shrq %rdx
subq %rdx, %r14
leaq 0xf(%r14), %rcx
testq %r14, %r14
cmovnsq %r14, %rcx
andq $-0x10, %rcx
movq %r14, %rax
subq %rcx, %rax
je 0x26214
movl $0x10, %ecx
subq %rax, %rcx
addq %rcx, %r14
subq %rcx, %rdx
movq %rdx, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %rdi, %r13
movq %rsi, %rbp
movq %r14, %rdx
movq %rbx, %rcx
movq %r15, %r8
movq %r12, %r9
callq 0x2607c
leaq (%r14,%rbp), %rsi
movq %rsi, 0x20(%rsp)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
movq 0x18(%rsp), %rdx
movq %rbx, %rcx
movq %r15, %r8
movq %r12, %r9
callq 0x2607c
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, 0x8(%rsp)
movq %r15, (%rsp)
movq %r13, %rdi
movq 0x20(%rsp), %rsi
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x31deb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq