// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib_impl::is_hermitian_rec_diag_stat(alglib_impl::x_matrix*, long, long, bool*, double*, double*, alglib_impl::ae_state*)
static void is_hermitian_rec_diag_stat(x_matrix *a, ae_int_t offset, ae_int_t len, ae_bool *nonfinite, double *mx, double *err, ae_state *_state)
{
    ae_complex *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_hermitian_rec_diag_stat(a, offset, n1, nonfinite, mx, err, _state);
        is_hermitian_rec_diag_stat(a, offset+n1, n2, nonfinite, mx, err, _state);
        is_hermitian_rec_off_stat(a, offset+n1, offset, n2, n1, nonfinite, mx, err, _state);
        return;
    }
    
    /* base case */
    p = (ae_complex*)(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->x, _state) || !ae_isfinite(pcol->y, _state) || !ae_isfinite(prow->x, _state) || !ae_isfinite(prow->y, _state) )
            {
                *nonfinite = ae_true;
            }
            else
            {
                v = x_safepythag2(pcol->x, pcol->y);
                *mx =  *mx>v ? *mx : v;
                v = x_safepythag2(prow->x, prow->y);
                *mx =  *mx>v ? *mx : v;
                v = x_safepythag2(pcol->x-prow->x, pcol->y+prow->y);
                *err = *err>v ? *err : v;
            }
        }
        if( !ae_isfinite(p[i+i*a->stride].x, _state) || !ae_isfinite(p[i+i*a->stride].y, _state) )
        {
            *nonfinite = ae_true;
        }
        else
        {
            v = fabs(p[i+i*a->stride].x);
            *mx =  *mx>v ? *mx : v;
            v = fabs(p[i+i*a->stride].y);
            *err =  *err>v ? *err : v;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rcx, %rbx
movq %rdi, %r12
movq 0xb0(%rsp), %rdi
cmpq $0x10, %rdx
jle 0x249aa
leaq 0x70(%rsp), %rcx
leaq 0x68(%rsp), %rax
movq %rdi, %r13
movq %rdx, %rdi
movq %rsi, %rbp
movq %rcx, %rsi
movq %rax, %rdx
callq 0x2e5da
leaq 0x70(%rsp), %rax
movq (%rax), %rdx
movq %r13, (%rsp)
movq %r12, %rdi
movq %rbp, %rsi
movq %rbp, %r13
movq %rbp, 0x20(%rsp)
movq %rdx, %rbp
movq %rdx, 0x28(%rsp)
movq %rbx, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x248c2
addq %rbp, %r13
leaq 0x68(%rsp), %rax
movq (%rax), %rbp
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x248c2
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movq %r14, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq 0x20(%rsp), %rdx
movq %rbp, %rcx
movq 0x28(%rsp), %r8
movq %rbx, %r9
callq 0x2e866
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, 0x38(%rsp)
movq 0x10(%r12), %rbp
movq 0x30(%r12), %rax
movq %rbp, %rcx
imulq %rsi, %rcx
shlq $0x4, %rcx
movq %rsi, %r8
shlq $0x4, %r8
addq %rax, %r8
addq %rcx, %r8
xorl %r12d, %r12d
testq %rdx, %rdx
cmovleq %r12, %rdx
leaq 0x1(%rbp), %rcx
movq %rcx, 0x40(%rsp)
shlq $0x4, %rbp
leaq 0x10(%rbp), %rcx
imulq %rsi, %rcx
leaq (%rcx,%rax), %r14
addq $0x8, %r14
movq %r14, %r9
xorl %r10d, %r10d
movq %r15, 0x58(%rsp)
movq %rdx, 0x30(%rsp)
movq %r8, 0x48(%rsp)
movq %rbx, 0x50(%rsp)
cmpq %rdx, %r10
je 0x2499b
movq %r10, 0x60(%rsp)
movq %r14, 0x20(%rsp)
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x24b44
movq -0x8(%r14), %xmm0
movq (%rdi), %rax
movq %xmm0, %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %ecx, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x24aae
movq (%r14), %xmm1
movq %xmm1, %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %ecx, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x24aae
movq -0x8(%r9,%r13), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %ecx, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x24aae
movq (%r9,%r13), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %ecx, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
jne 0x24abd
movb $0x1, (%rbx)
addq $0x10, %r13
addq %rbp, %r14
jmp 0x24a24
movq %r9, %rbx
callq 0x2eb71
movq 0x38(%rsp), %r15
movsd (%r15), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movsd %xmm1, (%r15)
movsd -0x8(%rbx,%r13), %xmm0
movsd (%rbx,%r13), %xmm1
callq 0x2eb71
movsd 0x28(%rsp), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%r15)
movq 0x58(%rsp), %r15
movsd -0x8(%r14), %xmm0
movsd (%r14), %xmm1
subsd -0x8(%rbx,%r13), %xmm0
addsd (%rbx,%r13), %xmm1
callq 0x2eb71
movq %rbx, %r9
movq 0x50(%rsp), %rbx
movq 0xb0(%rsp), %rdi
movsd (%r15), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%r15)
jmp 0x24ab1
movq 0x60(%rsp), %r10
movq %r10, %rax
imulq 0x40(%rsp), %rax
shlq $0x4, %rax
movq 0x48(%rsp), %r8
movq (%r8,%rax), %xmm0
movq (%rdi), %rcx
movq %xmm0, %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
cmpq $0x1, %rcx
cmovnel %edx, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
je 0x24b9e
movq 0x8(%r8,%rax), %rdx
movq %rdx, %rsi
shrq $0x20, %rsi
cmpq $0x1, %rcx
cmovnel %edx, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
jne 0x24ba3
movb $0x1, (%rbx)
jmp 0x24bdd
addq %r8, %rax
addq $0x8, %rax
movdqa 0xe65e(%rip), %xmm2     # 0x33210
pand %xmm2, %xmm0
movq 0x38(%rsp), %rcx
movsd (%rcx), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%rcx)
movq (%rax), %xmm0
pand %xmm2, %xmm0
movsd (%r15), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%r15)
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %r14
incq %r10
addq %rbp, %r9
addq $0x10, %r14
addq $0x10, %r12
jmp 0x24a12