// File: /workspace/github_cpp_makefile_star2_O1/mouda[P]LTE_random_access-simulate/ap.cpp
// Function: alglib_impl::_ialglib_mcopyblock_complex(long, long, alglib_impl::ae_complex const*, long, long, double*)
void _ialglib_mcopyblock_complex(ae_int_t m, ae_int_t n, const ae_complex *a, ae_int_t op, ae_int_t stride, double *b)
{
    ae_int_t i, j;
    const ae_complex *psrc;
    double *pdst;
    if( op==0 )
    {
        for(i=0,psrc=a; i<m; i++,a+=stride,b+=alglib_twice_c_block,psrc=a)
            for(j=0,pdst=b; j<n; j++,pdst+=2,psrc++)
            {
                pdst[0] = psrc->x;
                pdst[1] = psrc->y;
            }
    }
    if( op==1 )
    {
        for(i=0,psrc=a; i<m; i++,a+=stride,b+=2,psrc=a)
            for(j=0,pdst=b; j<n; j++,pdst+=alglib_twice_c_block,psrc++)
            {
                pdst[0] = psrc->x;
                pdst[1] = psrc->y;
            }
    }
    if( op==2 )
    {
        for(i=0,psrc=a; i<m; i++,a+=stride,b+=2,psrc=a)
            for(j=0,pdst=b; j<n; j++,pdst+=alglib_twice_c_block,psrc++)
            {
                pdst[0] = psrc->x;
                pdst[1] = -psrc->y;
            }
    }
    if( op==3 )
    {
        for(i=0,psrc=a; i<m; i++,a+=stride,b+=alglib_twice_c_block,psrc=a)
            for(j=0,pdst=b; j<n; j++,pdst+=2,psrc++)
            {
                pdst[0] = psrc->x;
                pdst[1] = -psrc->y;
            }
    }
}

// Assembly:
pushq %r14
pushq %rbx
testq %rcx, %rcx
setne %al
testq %rdi, %rdi
setle %r10b
orb %al, %r10b
jne 0x3007e
movq %r8, %rax
shlq $0x4, %rax
xorl %r10d, %r10d
testq %rsi, %rsi
jle 0x3006c
movq %rsi, %r11
xorl %ebx, %ebx
movsd (%rdx,%rbx), %xmm0
movsd %xmm0, (%r9,%rbx)
movsd 0x8(%rdx,%rbx), %xmm0
movsd %xmm0, 0x8(%r9,%rbx)
addq $0x10, %rbx
decq %r11
jne 0x3004b
incq %r10
addq %rax, %rdx
addq $0x180, %r9             # imm = 0x180
cmpq %rdi, %r10
jne 0x30041
cmpq $0x1, %rcx
setne %al
testq %rdi, %rdi
setle %r10b
orb %al, %r10b
jne 0x300db
xorl %eax, %eax
movq %r8, %r10
shlq $0x4, %r10
testq %rsi, %rsi
jle 0x300cc
movq %rsi, %r11
movq %r9, %rbx
movq %rdx, %r14
movsd (%r14), %xmm0
movsd %xmm0, (%rbx)
movsd 0x8(%r14), %xmm0
movsd %xmm0, 0x8(%rbx)
addq $0x180, %rbx            # imm = 0x180
addq $0x10, %r14
decq %r11
jne 0x300a8
incq %rax
addq %r10, %rdx
addq $0x10, %r9
cmpq %rdi, %rax
jne 0x3009a
cmpq $0x2, %rcx
setne %al
testq %rdi, %rdi
setle %r10b
orb %al, %r10b
jne 0x30141
xorl %eax, %eax
movaps 0x40e9(%rip), %xmm0     # 0x341e0
movq %r8, %r10
shlq $0x4, %r10
testq %rsi, %rsi
jle 0x30132
movq %rsi, %r11
movq %r9, %rbx
movq %rdx, %r14
movsd (%r14), %xmm1
movsd %xmm1, (%rbx)
movsd 0x8(%r14), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%rbx)
addq $0x180, %rbx            # imm = 0x180
addq $0x10, %r14
decq %r11
jne 0x3010c
incq %rax
addq %r10, %rdx
addq $0x10, %r9
cmpq %rdi, %rax
jne 0x300fe
cmpq $0x3, %rcx
setne %al
testq %rdi, %rdi
setle %cl
orb %al, %cl
jne 0x301a1
shlq $0x4, %r8
xorl %eax, %eax
movaps 0x4081(%rip), %xmm0     # 0x341e0
testq %rsi, %rsi
jle 0x3018f
movq %rsi, %rcx
xorl %r10d, %r10d
movsd (%rdx,%r10), %xmm1
movsd %xmm1, (%r9,%r10)
movsd 0x8(%rdx,%r10), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%r9,%r10)
addq $0x10, %r10
decq %rcx
jne 0x3016a
incq %rax
addq $0x180, %r9             # imm = 0x180
addq %r8, %rdx
cmpq %rdi, %rax
jne 0x3015f
popq %rbx
popq %r14
retq