// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rcx, %rcx
je 0x2c7c6
cmpq $0x1, %rcx
jne 0x2c6e7
xorl %eax, %eax
testq %rsi, %rsi
movl $0x0, %r10d
cmovgq %rsi, %r10
testq %rdi, %rdi
movl $0x0, %r11d
cmovgq %rdi, %r11
movq %r8, %rbx
shlq $0x4, %rbx
cmpq %r11, %rax
je 0x2c6e7
movq %r10, %r14
movq %rdx, %r15
movq %r9, %r12
subq $0x1, %r14
jb 0x2c6db
movsd (%r15), %xmm0
movsd %xmm0, (%r12)
movsd 0x8(%r15), %xmm0
movsd %xmm0, 0x8(%r12)
addq $0x180, %r12            # imm = 0x180
addq $0x10, %r15
jmp 0x2c6b0
incq %rax
addq %rbx, %rdx
addq $0x10, %r9
jmp 0x2c6a2
cmpq $0x2, %rcx
jne 0x2c75e
xorl %eax, %eax
testq %rsi, %rsi
movl $0x0, %r10d
cmovgq %rsi, %r10
testq %rdi, %rdi
movl $0x0, %r11d
cmovgq %rdi, %r11
movq %r8, %rbx
shlq $0x4, %rbx
movaps 0x3a99(%rip), %xmm0     # 0x301b0
cmpq %r11, %rax
je 0x2c75e
movq %r10, %r14
movq %rdx, %r15
movq %r9, %r12
subq $0x1, %r14
jb 0x2c752
movsd (%r15), %xmm1
movsd %xmm1, (%r12)
movsd 0x8(%r15), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%r12)
addq $0x180, %r12            # imm = 0x180
addq $0x10, %r15
jmp 0x2c725
incq %rax
addq %rbx, %rdx
addq $0x10, %r9
jmp 0x2c717
cmpq $0x3, %rcx
jne 0x2c7be
xorl %eax, %eax
testq %rsi, %rsi
cmovleq %rax, %rsi
testq %rdi, %rdi
cmovleq %rax, %rdi
shlq $0x4, %r8
movaps 0x3a31(%rip), %xmm0     # 0x301b0
cmpq %rdi, %rax
je 0x2c7be
xorl %ecx, %ecx
movq %rsi, %r10
subq $0x1, %r10
jb 0x2c7af
movsd (%rdx,%rcx), %xmm1
movsd %xmm1, (%r9,%rcx)
movsd 0x8(%rdx,%rcx), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%r9,%rcx)
addq $0x10, %rcx
jmp 0x2c789
incq %rax
addq $0x180, %r9             # imm = 0x180
addq %r8, %rdx
jmp 0x2c77f
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
testq %rsi, %rsi
movl $0x0, %r10d
cmovgq %rsi, %r10
testq %rdi, %rdi
movl $0x0, %r11d
cmovgq %rdi, %r11
movq %r8, %rbx
shlq $0x4, %rbx
cmpq %r11, %rax
je 0x2c679
xorl %r14d, %r14d
movq %r10, %r15
subq $0x1, %r15
jb 0x2c81e
movsd (%rdx,%r14), %xmm0
movsd %xmm0, (%r9,%r14)
movsd 0x8(%rdx,%r14), %xmm0
movsd %xmm0, 0x8(%r9,%r14)
addq $0x10, %r14
jmp 0x2c7f8
incq %rax
addq %rbx, %rdx
addq $0x180, %r9             # imm = 0x180
jmp 0x2c7e9