// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
movq %rcx, %rbx
movq %rdi, %r13
movq 0x90(%rsp), %r10
cmpq $0x11, %rdx
jl 0x26b21
movq %rdx, %rax
andq $0xf, %rax
je 0x26ebd
movq %rax, 0x18(%rsp)
movabsq $0x7ffffffffffffff0, %rax # imm = 0x7FFFFFFFFFFFFFF0
andq %rax, %rdx
jmp 0x26ef0
testq %rdx, %rdx
jle 0x26f71
movq 0x10(%r13), %rax
movq 0x30(%r13), %rcx
movq %rax, %rdi
imulq %rsi, %rdi
shlq $0x4, %rdi
movq %rsi, %r11
shlq $0x4, %r11
addq %rcx, %r11
addq %rdi, %r11
shlq $0x4, %rax
addq $0x10, %rax
imulq %rsi, %rax
addq %rcx, %rax
addq $0x8, %rax
movq %rax, 0x50(%rsp)
xorl %r12d, %r12d
movdqa 0x10533(%rip), %xmm2    # 0x370a0
xorpd %xmm3, %xmm3
movsd 0xd627(%rip), %xmm4     # 0x341a0
xorl %r14d, %r14d
movq %rdx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %r9, 0x38(%rsp)
movq %r11, 0x30(%rsp)
movq %r14, 0x18(%rsp)
testq %r14, %r14
je 0x26e1d
movq 0x18(%rsp), %r14
shlq $0x4, %r14
addq %r11, %r14
movq 0x10(%r13), %rbp
imulq %r12, %rbp
addq 0x50(%rsp), %rbp
xorl %r15d, %r15d
movq (%r14), %xmm0
movq (%r10), %rax
movq %xmm0, %rcx
movq %rcx, %rsi
shrq $0x20, %rsi
cmpq $0x1, %rax
cmovnel %ecx, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
je 0x26c3c
movq 0x8(%r14), %xmm1
movq %xmm1, %rcx
movq %rcx, %rsi
shrq $0x20, %rsi
cmpq $0x1, %rax
cmovnel %ecx, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
je 0x26c3c
movq -0x8(%rbp,%r15), %rcx
movq %rcx, %rsi
shrq $0x20, %rsi
cmpq $0x1, %rax
cmovnel %ecx, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
je 0x26c3c
movq (%rbp,%r15), %rcx
movq %rcx, %rsi
shrq $0x20, %rsi
cmpq $0x1, %rax
cmovnel %ecx, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
jne 0x26c5c
movb $0x1, (%rbx)
movq 0x10(%r13), %rax
shlq $0x4, %rax
addq %rax, %r14
addq $0x10, %r15
cmpq %r15, %r12
jne 0x26bba
jmp 0x26e1d
pand %xmm2, %xmm0
pand %xmm2, %xmm1
movdqa %xmm0, %xmm5
maxsd %xmm1, %xmm5
minsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jne 0x26c78
jnp 0x26cd5
divsd %xmm5, %xmm0
mulsd %xmm0, %xmm0
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jb 0x26c90
sqrtsd %xmm0, %xmm0
jmp 0x26cd1
movapd %xmm5, 0x40(%rsp)
callq 0x31e0
movapd 0x40(%rsp), %xmm5
movsd 0xd4f7(%rip), %xmm4     # 0x341a0
xorpd %xmm3, %xmm3
movdqa 0x103eb(%rip), %xmm2    # 0x370a0
movq 0x30(%rsp), %r11
movq 0x90(%rsp), %r10
movq 0x38(%rsp), %r9
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %rdx
mulsd %xmm0, %xmm5
movsd (%r8), %xmm0
maxsd %xmm5, %xmm0
movsd %xmm0, (%r8)
movq -0x8(%rbp,%r15), %xmm0
movq (%rbp,%r15), %xmm1
pand %xmm2, %xmm0
pand %xmm2, %xmm1
movdqa %xmm0, %xmm5
maxsd %xmm1, %xmm5
minsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jne 0x26d0d
jnp 0x26d6a
divsd %xmm5, %xmm0
mulsd %xmm0, %xmm0
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jb 0x26d25
sqrtsd %xmm0, %xmm0
jmp 0x26d66
movapd %xmm5, 0x40(%rsp)
callq 0x31e0
movapd 0x40(%rsp), %xmm5
movsd 0xd462(%rip), %xmm4     # 0x341a0
xorpd %xmm3, %xmm3
movdqa 0x10356(%rip), %xmm2    # 0x370a0
movq 0x30(%rsp), %r11
movq 0x90(%rsp), %r10
movq 0x38(%rsp), %r9
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %rdx
mulsd %xmm0, %xmm5
movsd (%r8), %xmm0
maxsd %xmm5, %xmm0
movsd %xmm0, (%r8)
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
subsd -0x8(%rbp,%r15), %xmm0
addsd (%rbp,%r15), %xmm1
andpd %xmm2, %xmm0
andpd %xmm2, %xmm1
movapd %xmm0, %xmm5
maxsd %xmm1, %xmm5
minsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jne 0x26dad
jnp 0x26e0a
divsd %xmm5, %xmm0
mulsd %xmm0, %xmm0
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jb 0x26dc5
sqrtsd %xmm0, %xmm0
jmp 0x26e06
movapd %xmm5, 0x40(%rsp)
callq 0x31e0
movapd 0x40(%rsp), %xmm5
movsd 0xd3c2(%rip), %xmm4     # 0x341a0
xorpd %xmm3, %xmm3
movapd 0x102b6(%rip), %xmm2    # 0x370a0
movq 0x30(%rsp), %r11
movq 0x90(%rsp), %r10
movq 0x38(%rsp), %r9
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %rdx
mulsd %xmm0, %xmm5
movsd (%r9), %xmm0
maxsd %xmm5, %xmm0
movsd %xmm0, (%r9)
jmp 0x26c3f
movq 0x10(%r13), %rax
incq %rax
movq 0x18(%rsp), %r14
imulq %r14, %rax
shlq $0x4, %rax
movq (%r11,%rax), %xmm0
movq (%r10), %rcx
movq %xmm0, %rdi
movq %rdi, %rsi
shrq $0x20, %rsi
cmpq $0x1, %rcx
cmovnel %edi, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
je 0x26e74
movq 0x8(%r11,%rax), %rdi
movq %rdi, %rsi
shrq $0x20, %rsi
cmpq $0x1, %rcx
cmovnel %edi, %esi
notl %esi
testl $0x7ff00000, %esi       # imm = 0x7FF00000
jne 0x26e79
movb $0x1, (%rbx)
jmp 0x26ea8
addq %r11, %rax
addq $0x8, %rax
pand %xmm2, %xmm0
movsd (%r8), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%r8)
movq (%rax), %xmm0
pand %xmm2, %xmm0
movsd (%r9), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%r9)
incq %r14
addq $0x10, %r12
cmpq %rdx, %r14
jne 0x26b90
jmp 0x26f71
movq %rdx, %rdi
shrq %rdi
subq %rdi, %rdx
leaq 0xf(%rdx), %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
andq $-0x10, %rcx
movq %rdx, %rax
subq %rcx, %rax
je 0x26eeb
movl $0x10, %ecx
subq %rax, %rcx
addq %rcx, %rdx
subq %rcx, %rdi
movq %rdi, 0x18(%rsp)
movq %r10, (%rsp)
movq %r13, %rdi
movq %rbx, %rcx
movq %rsi, %r15
movq %rsi, 0x20(%rsp)
movq %rdx, %rbp
movq %rdx, 0x28(%rsp)
movq %r8, %r14
movq %r9, %r12
callq 0x26adb
addq %rbp, %r15
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq 0x18(%rsp), %rbp
movq %rbp, %rdx
movq %rbx, %rcx
movq %r14, %r8
movq %r12, %r9
callq 0x26adb
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, 0x8(%rsp)
movq %r14, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
movq %rbp, %rcx
movq 0x28(%rsp), %r8
movq %rbx, %r9
callq 0x32d3f
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq