// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
movq %rcx, %r15
movq %rdx, %r8
movq %rsi, %r13
movq 0x90(%rsp), %r12
cmpq $0x11, %rcx
setl %al
cmpq $0x11, %r14
setl %cl
testb %cl, %al
jne 0x2e92a
movq %rdi, %rbp
movq %r8, 0x10(%rsp)
cmpq %r14, %r15
movq %rdi, 0x8(%rsp)
leaq 0x40(%rsp), %rsi
leaq 0x18(%rsp), %rdx
jle 0x2eae2
movq %r15, %rdi
movq %rsi, %r15
callq 0x2e5da
movq (%r15), %r15
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movq 0x18(%rsp), %rbp
movq %rbp, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
pushq %r12
movq 0x98(%rsp), %r12
pushq %r12
movq 0x98(%rsp), %rax
pushq %rax
callq 0x2e866
addq $0x20, %rsp
addq %r13, %r15
leaq 0x18(%rsp), %rax
movq (%rax), %rcx
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r14, %r8
jmp 0x2eb46
movq 0x10(%rdi), %rax
movq 0x30(%rdi), %rcx
xorl %edi, %edi
testq %r14, %r14
cmovleq %rdi, %r14
testq %r15, %r15
cmovleq %rdi, %r15
movq %rax, %rdx
imulq %r13, %rdx
shlq $0x4, %rdx
movq %r8, %rsi
shlq $0x4, %rsi
addq %rdx, %rsi
leaq (%rcx,%rsi), %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rsp)
movq %rax, %rbp
shlq $0x4, %rbp
imulq %r8, %rax
shlq $0x4, %rax
shlq $0x4, %r13
addq %rax, %r13
addq %rcx, %r13
addq $0x8, %r13
movq %r14, 0x28(%rsp)
movq %r15, 0x20(%rsp)
cmpq %r15, %rdi
je 0x2eb62
movq %rdi, 0x38(%rsp)
movq %r13, 0x30(%rsp)
movq 0x8(%rsp), %r15
subq $0x1, %r14
jb 0x2eabd
movq -0x8(%r13), %xmm0
movq (%r12), %rax
movq %xmm0, %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %ecx, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x2ea2e
movq (%r13), %xmm1
movq %xmm1, %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %ecx, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x2ea2e
movq -0x8(%r15), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %ecx, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
je 0x2ea2e
movq (%r15), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
cmpq $0x1, %rax
cmovnel %ecx, %edx
notl %edx
testl $0x7ff00000, %edx       # imm = 0x7FF00000
jne 0x2ea3d
movb $0x1, (%rbx)
addq $0x10, %r15
addq %rbp, %r13
jmp 0x2e9a3
callq 0x2eb71
movq 0x80(%rsp), %r12
movsd (%r12), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd %xmm1, (%r12)
movsd -0x8(%r15), %xmm0
movsd (%r15), %xmm1
callq 0x2eb71
movsd 0x10(%rsp), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%r12)
movq 0x90(%rsp), %r12
movsd -0x8(%r13), %xmm0
movsd (%r13), %xmm1
subsd -0x8(%r15), %xmm0
addsd (%r15), %xmm1
callq 0x2eb71
movq 0x88(%rsp), %rax
movsd (%rax), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%rax)
jmp 0x2ea31
movq 0x38(%rsp), %rdi
incq %rdi
addq %rbp, 0x8(%rsp)
movq 0x30(%rsp), %r13
addq $0x10, %r13
movq 0x28(%rsp), %r14
movq 0x20(%rsp), %r15
jmp 0x2e98b
movq %r14, %rdi
movq %rsi, %r14
callq 0x2e5da
movq (%r14), %r14
subq $0x8, %rsp
movq %rbp, %rdi
movq %r13, %rsi
movq 0x18(%rsp), %rbp
movq %rbp, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
pushq %r12
movq 0x98(%rsp), %r12
pushq %r12
movq 0x98(%rsp), %rax
pushq %rax
callq 0x2e866
addq $0x20, %rsp
addq %rbp, %r14
leaq 0x18(%rsp), %rax
movq (%rax), %r8
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r9
pushq 0x98(%rsp)
pushq %r12
pushq 0x98(%rsp)
callq 0x2e866
addq $0x20, %rsp
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq