// File: /workspace/github_cpp_makefile_star2_O1/mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib_impl::is_hermitian_rec_off_stat(alglib_impl::x_matrix*, long, long, long, long, bool*, double*, double*, alglib_impl::ae_state*)
static void is_hermitian_rec_off_stat(x_matrix *a, ae_int_t offset0, ae_int_t offset1, ae_int_t len0, ae_int_t len1, ae_bool *nonfinite, double *mx, double *err, ae_state *_state)
{
    /* 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);
            is_hermitian_rec_off_stat(a, offset0,    offset1, n1, len1, nonfinite, mx, err, _state);
            is_hermitian_rec_off_stat(a, offset0+n1, offset1, n2, len1, nonfinite, mx, err, _state);
        }
        else
        {
            x_split_length(len1, x_nb, &n1, &n2);
            is_hermitian_rec_off_stat(a, offset0, offset1,    len0, n1, nonfinite, mx, err, _state);
            is_hermitian_rec_off_stat(a, offset0, offset1+n1, len0, n2, nonfinite, mx, err, _state);
        }
        return;
    }
    else
    {
        /* base case */
        ae_complex *p1, *p2, *prow, *pcol;
        double v;
        ae_int_t i, j;

        p1 = (ae_complex*)(a->ptr)+offset0*a->stride+offset1;
        p2 = (ae_complex*)(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++)
            {
                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;
                }
                pcol += a->stride;
                prow++;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %rbx
movq %r8, %r15
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r13
movq %rcx, 0x8(%rsp)
cmpq $0x10, %rcx
jg 0x32d71
cmpq $0x11, %r15
jl 0x32eae
cmpq %r15, %rcx
jg 0x32e0c
cmpq $0x11, %r15
jge 0x32d85
xorl %r12d, %r12d
jmp 0x32dcb
movq %r15, %r12
andq $0xf, %r12
je 0x32d9d
movabsq $0x7ffffffffffffff0, %rax # imm = 0x7FFFFFFFFFFFFFF0
andq %rax, %r15
jmp 0x32dcb
movq %r15, %r12
shrq %r12
subq %r12, %r15
leaq 0xf(%r15), %rdx
testq %r15, %r15
cmovnsq %r15, %rdx
andq $-0x10, %rdx
movq %r15, %rax
subq %rdx, %rax
je 0x32dcb
movl $0x10, %edx
subq %rax, %rdx
addq %rdx, %r15
subq %rdx, %r12
subq $0x8, %rsp
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r15, %r8
movq %rbx, %r9
pushq 0x98(%rsp)
pushq 0x98(%rsp)
pushq 0x98(%rsp)
callq 0x32d3f
movq 0x28(%rsp), %rcx
addq $0x20, %rsp
addq %r15, %rbp
movq %r12, %r15
jmp 0x32d61
cmpq $0x11, %rcx
jge 0x32e1d
movq $0x0, 0x8(%rsp)
jmp 0x32e6d
movq %rcx, %rdx
andq $0xf, %rdx
je 0x32e3a
movabsq $0x7ffffffffffffff0, %rax # imm = 0x7FFFFFFFFFFFFFF0
andq %rax, %rcx
movq %rdx, 0x8(%rsp)
jmp 0x32e6d
movq %rcx, %rsi
shrq %rsi
subq %rsi, %rcx
leaq 0xf(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
andq $-0x10, %rdx
movq %rcx, %rax
subq %rdx, %rax
je 0x32e68
movl $0x10, %edx
subq %rax, %rdx
addq %rdx, %rcx
subq %rdx, %rsi
movq %rsi, 0x8(%rsp)
subq $0x8, %rsp
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %rcx, %r12
movq %r15, %r8
movq %rbx, %r9
pushq 0x98(%rsp)
pushq 0x98(%rsp)
pushq 0x98(%rsp)
callq 0x32d3f
addq $0x20, %rsp
addq %r12, %r14
movq 0x8(%rsp), %rcx
jmp 0x32d5c
testq %rcx, %rcx
movq 0x90(%rsp), %rdi
jle 0x331b5
movq 0x10(%r13), %rax
movq 0x30(%r13), %rsi
movq %rax, %rdx
imulq %rbp, %rdx
shlq $0x4, %rdx
imulq %r14, %rax
shlq $0x4, %r14
addq %rsi, %r14
addq %rdx, %r14
movq %r14, 0x40(%rsp)
shlq $0x4, %rax
addq %rsi, %rax
shlq $0x4, %rbp
addq %rbp, %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
xorl %r8d, %r8d
movdqa 0x4199(%rip), %xmm2     # 0x370a0
xorpd %xmm3, %xmm3
movsd 0x128d(%rip), %xmm4     # 0x341a0
xorl %r9d, %r9d
testq %r15, %r15
jle 0x331a5
movq %r9, %r12
shlq $0x4, %r12
addq 0x40(%rsp), %r12
movq 0x10(%r13), %rbp
imulq %r8, %rbp
addq 0x38(%rsp), %rbp
movq %r15, %r14
movq %r8, 0x18(%rsp)
movq %r9, 0x10(%rsp)
movq (%r12), %xmm0
movq (%rdi), %rax
movq %xmm0, %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %esi, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x32fc7
movq 0x8(%r12), %xmm1
movq %xmm1, %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %esi, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x32fc7
movq -0x8(%rbp), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %esi, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x32fc7
movq (%rbp), %rsi
movq %rsi, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %esi, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
jne 0x32fe7
movb $0x1, (%rbx)
movq 0x10(%r13), %rax
shlq $0x4, %rax
addq %rax, %r12
addq $0x10, %rbp
decq %r14
jne 0x32f45
jmp 0x331a5
pand %xmm2, %xmm0
pand %xmm2, %xmm1
movdqa %xmm0, %xmm5
maxsd %xmm1, %xmm5
minsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jne 0x33003
jnp 0x3305b
divsd %xmm5, %xmm0
mulsd %xmm0, %xmm0
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jb 0x3301b
sqrtsd %xmm0, %xmm0
jmp 0x33057
movapd %xmm5, 0x20(%rsp)
callq 0x31e0
movapd 0x20(%rsp), %xmm5
movq 0x10(%rsp), %r9
movsd 0x1167(%rip), %xmm4     # 0x341a0
xorpd %xmm3, %xmm3
movdqa 0x405b(%rip), %xmm2     # 0x370a0
movq 0x18(%rsp), %r8
movq 0x90(%rsp), %rdi
movq 0x8(%rsp), %rcx
mulsd %xmm0, %xmm5
movq 0x80(%rsp), %rax
movsd (%rax), %xmm0
maxsd %xmm5, %xmm0
movsd %xmm0, (%rax)
movq -0x8(%rbp), %xmm0
movq (%rbp), %xmm1
pand %xmm2, %xmm0
pand %xmm2, %xmm1
movdqa %xmm0, %xmm5
maxsd %xmm1, %xmm5
minsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jne 0x33095
jnp 0x330ed
divsd %xmm5, %xmm0
mulsd %xmm0, %xmm0
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jb 0x330ad
sqrtsd %xmm0, %xmm0
jmp 0x330e9
movapd %xmm5, 0x20(%rsp)
callq 0x31e0
movapd 0x20(%rsp), %xmm5
movq 0x10(%rsp), %r9
movsd 0x10d5(%rip), %xmm4     # 0x341a0
xorpd %xmm3, %xmm3
movdqa 0x3fc9(%rip), %xmm2     # 0x370a0
movq 0x18(%rsp), %r8
movq 0x90(%rsp), %rdi
movq 0x8(%rsp), %rcx
mulsd %xmm0, %xmm5
movq 0x80(%rsp), %rax
movsd (%rax), %xmm0
maxsd %xmm5, %xmm0
movsd %xmm0, (%rax)
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
subsd -0x8(%rbp), %xmm0
addsd (%rbp), %xmm1
andpd %xmm2, %xmm0
andpd %xmm2, %xmm1
movapd %xmm0, %xmm5
maxsd %xmm1, %xmm5
minsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jne 0x33134
jnp 0x3318c
divsd %xmm5, %xmm0
mulsd %xmm0, %xmm0
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jb 0x3314c
sqrtsd %xmm0, %xmm0
jmp 0x33188
movapd %xmm5, 0x20(%rsp)
callq 0x31e0
movapd 0x20(%rsp), %xmm5
movq 0x10(%rsp), %r9
movsd 0x1036(%rip), %xmm4     # 0x341a0
xorpd %xmm3, %xmm3
movapd 0x3f2a(%rip), %xmm2     # 0x370a0
movq 0x18(%rsp), %r8
movq 0x90(%rsp), %rdi
movq 0x8(%rsp), %rcx
mulsd %xmm0, %xmm5
movq 0x88(%rsp), %rax
movsd (%rax), %xmm0
maxsd %xmm5, %xmm0
movsd %xmm0, (%rax)
jmp 0x32fca
incq %r9
addq $0x10, %r8
cmpq %rcx, %r9
jne 0x32f16
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq