// File: /workspace/github_cpp_makefile_star2_O3/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 $0x18, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, 0x10(%rsp)
movq 0x58(%rsp), %r12
cmpq $0x11, %rcx
setge 0x7(%rsp)
setl %al
cmpq $0x11, %r8
setl %cl
testb %cl, %al
jne 0x32277
movq %r13, 0x8(%rsp)
movq %rbp, %r12
movq 0x60(%rsp), %r13
movq %r12, %rbp
movq %r15, %r8
cmpq %r14, %r15
jg 0x321c4
cmpq $0x11, %r14
jge 0x3212d
movq %r14, %r12
xorl %r14d, %r14d
jmp 0x32179
movq %r14, %rax
andq $0xf, %rax
je 0x32145
movabsq $0x7ffffffffffffff0, %rcx # imm = 0x7FFFFFFFFFFFFFF0
andq %rcx, %r14
jmp 0x32173
movq %r14, %rax
shrq %rax
subq %rax, %r14
leaq 0xf(%r14), %rdx
testq %r14, %r14
cmovnsq %r14, %rdx
andq $-0x10, %rdx
movq %r14, %rcx
subq %rdx, %rcx
je 0x32173
movl $0x10, %edx
subq %rcx, %rdx
addq %rdx, %r14
subq %rdx, %rax
movq %r14, %r12
movq %rax, %r14
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
movq %r8, %r15
movq %r8, %rcx
movq %r12, %r8
movq %rbx, %r9
pushq %r13
pushq 0x68(%rsp)
pushq 0x68(%rsp)
callq 0x320c1
addq $0x20, %rsp
addq %rbp, %r12
cmpq $0x11, %r14
setge %al
orb 0x7(%rsp), %al
testb $0x1, %al
jne 0x32110
jmp 0x3226a
movq %r8, %r13
cmpq $0x11, %r8
movq 0x58(%rsp), %r12
jge 0x321d7
xorl %r15d, %r15d
jmp 0x3221d
movq %r13, %r15
andq $0xf, %r15
je 0x321ef
movabsq $0x7ffffffffffffff0, %rcx # imm = 0x7FFFFFFFFFFFFFF0
andq %rcx, %r13
jmp 0x3221d
movq %r13, %r15
shrq %r15
subq %r15, %r13
leaq 0xf(%r13), %rdx
testq %r13, %r13
cmovnsq %r13, %rdx
andq $-0x10, %rdx
movq %r13, %rcx
subq %rdx, %rcx
je 0x3221d
movl $0x10, %edx
subq %rcx, %rdx
addq %rdx, %r13
subq %rdx, %r15
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq %r14, %r8
movq %rbx, %r9
pushq 0x68(%rsp)
pushq %r12
pushq 0x68(%rsp)
callq 0x320c1
addq $0x20, %rsp
addq 0x8(%rsp), %r13
cmpq $0x11, %r15
setge 0x7(%rsp)
jge 0x32103
cmpq $0x10, %r14
jg 0x32103
jmp 0x32277
movq 0x8(%rsp), %r13
movq %r12, %rbp
movq 0x58(%rsp), %r12
testq %r15, %r15
jle 0x32491
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rax
movq 0x30(%rcx), %rcx
movq %rax, %rdx
imulq %r13, %rdx
shlq $0x4, %rdx
movq %rax, %rsi
imulq %rbp, %rsi
shlq $0x4, %rbp
addq %rcx, %rbp
addq %rdx, %rbp
shlq $0x4, %rsi
shlq $0x4, %r13
addq %rcx, %r13
addq %rsi, %r13
movq %rax, %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movdqa 0x3f58(%rip), %xmm0     # 0x36220
xorpd %xmm1, %xmm1
movdqa 0x3f4c(%rip), %xmm2     # 0x36220
movsd 0xf04(%rip), %xmm3      # 0x331e0
testq %r14, %r14
jle 0x32481
movq %rdx, %rsi
imulq %rax, %rsi
shlq $0x4, %rsi
addq %rbp, %rsi
movq 0x60(%rsp), %rdi
movq (%rdi), %rdi
movq %r13, %r8
movq %r14, %r9
movq (%r8), %xmm4
movq %xmm4, %r10
movq %r10, %r11
shrq $0x20, %r11
cmpq $0x1, %rdi
cmovnel %r10d, %r11d
notl %r11d
testl $0x7ff00000, %r11d      # imm = 0x7FF00000
je 0x32389
movq 0x8(%r8), %xmm5
movq %xmm5, %r10
movq %r10, %r11
shrq $0x20, %r11
cmpq $0x1, %rdi
cmovnel %r10d, %r11d
notl %r11d
testl $0x7ff00000, %r11d      # imm = 0x7FF00000
je 0x32389
movq (%rsi), %r10
movq %r10, %r11
shrq $0x20, %r11
cmpq $0x1, %rdi
cmovnel %r10d, %r11d
notl %r11d
testl $0x7ff00000, %r11d      # imm = 0x7FF00000
je 0x32389
movq 0x8(%rsi), %r10
movq %r10, %r11
shrq $0x20, %r11
cmpq $0x1, %rdi
cmovnel %r10d, %r11d
notl %r11d
testl $0x7ff00000, %r11d      # imm = 0x7FF00000
jne 0x323a1
movb $0x1, (%rbx)
addq $0x10, %rsi
addq %rcx, %r8
decq %r9
jne 0x32301
jmp 0x32481
pand %xmm0, %xmm4
pand %xmm0, %xmm5
movdqa %xmm4, %xmm6
maxsd %xmm5, %xmm6
minsd %xmm5, %xmm4
ucomisd %xmm1, %xmm4
jne 0x323bd
jnp 0x323d1
divsd %xmm6, %xmm4
mulsd %xmm4, %xmm4
addsd %xmm3, %xmm4
sqrtsd %xmm4, %xmm4
mulsd %xmm4, %xmm6
movq 0x50(%rsp), %r10
movsd (%r10), %xmm4
maxsd %xmm6, %xmm4
movsd %xmm4, (%r10)
movdqu (%rsi), %xmm6
pand %xmm2, %xmm6
pshufd $0xee, %xmm6, %xmm7     # xmm7 = xmm6[2,3,2,3]
movdqa %xmm6, %xmm5
maxsd %xmm7, %xmm5
minsd %xmm7, %xmm6
ucomisd %xmm1, %xmm6
jne 0x32405
jnp 0x32419
divsd %xmm5, %xmm6
mulsd %xmm6, %xmm6
addsd %xmm3, %xmm6
sqrtsd %xmm6, %xmm6
mulsd %xmm6, %xmm5
maxsd %xmm5, %xmm4
movsd %xmm4, (%r10)
movupd (%r8), %xmm4
movupd (%rsi), %xmm5
movapd %xmm4, %xmm6
subpd %xmm5, %xmm6
addpd %xmm5, %xmm4
movsd %xmm6, %xmm4            # xmm4 = xmm6[0],xmm4[1]
andpd %xmm2, %xmm4
pshufd $0xee, %xmm4, %xmm6     # xmm6 = xmm4[2,3,2,3]
movapd %xmm4, %xmm5
maxsd %xmm6, %xmm5
minsd %xmm6, %xmm4
ucomisd %xmm1, %xmm4
jne 0x32458
jnp 0x3246c
divsd %xmm5, %xmm4
mulsd %xmm4, %xmm4
addsd %xmm3, %xmm4
sqrtsd %xmm4, %xmm4
mulsd %xmm4, %xmm5
movsd (%r12), %xmm4
maxsd %xmm5, %xmm4
movsd %xmm4, (%r12)
jmp 0x3238c
incq %rdx
addq $0x10, %r13
cmpq %r15, %rdx
jne 0x322dc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq