// File: 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
movq %rsp, %rbp
subq $0xb0, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpq $0x10, -0x20(%rbp)
jg 0x52711
cmpq $0x10, -0x28(%rbp)
jle 0x52839
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x527ac
movq -0x20(%rbp), %rdi
movl $0x10, %esi
leaq -0x38(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x52220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x526d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x526d0
jmp 0x52834
movq -0x28(%rbp), %rdi
movl $0x10, %esi
leaq -0x38(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x52220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x526d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %r11
movq 0x18(%rbp), %r10
movq 0x20(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x526d0
jmp 0x52aab
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x10(%rdx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x10(%rdx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x52aa9
movq -0x50(%rbp), %rax
movq -0x70(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
movq -0x70(%rbp), %rcx
movq -0x8(%rbp), %rdx
imulq 0x10(%rdx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x52a96
movq -0x60(%rbp), %rax
movsd (%rax), %xmm0
movq 0x20(%rbp), %rdi
callq 0x3c730
testb $0x1, %al
jne 0x52901
jmp 0x52946
movq -0x60(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq 0x20(%rbp), %rdi
callq 0x3c730
testb $0x1, %al
jne 0x52919
jmp 0x52946
movq -0x58(%rbp), %rax
movsd (%rax), %xmm0
movq 0x20(%rbp), %rdi
callq 0x3c730
testb $0x1, %al
jne 0x52930
jmp 0x52946
movq -0x58(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq 0x20(%rbp), %rdi
callq 0x3c730
testb $0x1, %al
jne 0x52952
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x52a65
movq -0x60(%rbp), %rax
movsd (%rax), %xmm0
movq -0x60(%rbp), %rax
movsd 0x8(%rax), %xmm1
callq 0x52ac0
movsd %xmm0, -0x68(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
ucomisd -0x68(%rbp), %xmm0
jbe 0x5298b
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0x52995
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movq 0x10(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x58(%rbp), %rax
movsd (%rax), %xmm0
movq -0x58(%rbp), %rax
movsd 0x8(%rax), %xmm1
callq 0x52ac0
movsd %xmm0, -0x68(%rbp)
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
ucomisd -0x68(%rbp), %xmm0
jbe 0x529de
movq 0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x88(%rbp)
jmp 0x529eb
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x88(%rbp), %xmm0
movq 0x10(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x60(%rbp), %rax
movsd (%rax), %xmm0
movq -0x58(%rbp), %rax
subsd (%rax), %xmm0
movq -0x60(%rbp), %rax
movsd 0x8(%rax), %xmm1
movq -0x58(%rbp), %rax
addsd 0x8(%rax), %xmm1
callq 0x52ac0
movsd %xmm0, -0x68(%rbp)
movq 0x18(%rbp), %rax
movsd (%rax), %xmm0
ucomisd -0x68(%rbp), %xmm0
jbe 0x52a48
movq 0x18(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x90(%rbp)
jmp 0x52a55
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
movq 0x18(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
shlq $0x4, %rax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x58(%rbp)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x528dc
jmp 0x52a98
movq -0x70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x52897
jmp 0x52aab
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)