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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rcx, %rcx
je 0x2c98a
cmpq $0x1, %rcx
jne 0x2c8ab
xorl %eax, %eax
testq %rsi, %rsi
movl $0x0, %r10d
cmovgq %rsi, %r10
testq %rdi, %rdi
movl $0x0, %r11d
cmovgq %rdi, %r11
movq %r9, %rbx
shlq $0x4, %rbx
cmpq %r11, %rax
je 0x2c8ab
movq %r10, %r14
movq %rdx, %r15
movq %r8, %r12
subq $0x1, %r14
jb 0x2c89f
movsd (%r15), %xmm0
movsd %xmm0, (%r12)
movsd 0x8(%r15), %xmm0
movsd %xmm0, 0x8(%r12)
addq $0x10, %r12
addq $0x180, %r15            # imm = 0x180
jmp 0x2c874
incq %rax
addq $0x10, %rdx
addq %rbx, %r8
jmp 0x2c866
cmpq $0x2, %rcx
jne 0x2c922
xorl %eax, %eax
testq %rsi, %rsi
movl $0x0, %r10d
cmovgq %rsi, %r10
testq %rdi, %rdi
movl $0x0, %r11d
cmovgq %rdi, %r11
movq %r9, %rbx
shlq $0x4, %rbx
movaps 0x38d5(%rip), %xmm0     # 0x301b0
cmpq %r11, %rax
je 0x2c922
movq %r10, %r14
movq %rdx, %r15
movq %r8, %r12
subq $0x1, %r14
jb 0x2c916
movsd (%r15), %xmm1
movsd %xmm1, (%r12)
movsd 0x8(%r15), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%r12)
addq $0x10, %r12
addq $0x180, %r15            # imm = 0x180
jmp 0x2c8e9
incq %rax
addq $0x10, %rdx
addq %rbx, %r8
jmp 0x2c8db
cmpq $0x3, %rcx
jne 0x2c982
xorl %eax, %eax
testq %rsi, %rsi
cmovleq %rax, %rsi
testq %rdi, %rdi
cmovleq %rax, %rdi
shlq $0x4, %r9
movaps 0x386d(%rip), %xmm0     # 0x301b0
cmpq %rdi, %rax
je 0x2c982
xorl %ecx, %ecx
movq %rsi, %r10
subq $0x1, %r10
jb 0x2c973
movsd (%rdx,%rcx), %xmm1
movsd %xmm1, (%r8,%rcx)
movsd 0x8(%rdx,%rcx), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%r8,%rcx)
addq $0x10, %rcx
jmp 0x2c94d
incq %rax
addq $0x180, %rdx            # imm = 0x180
addq %r9, %r8
jmp 0x2c943
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 %r9, %rbx
shlq $0x4, %rbx
cmpq %r11, %rax
je 0x2c83d
xorl %r14d, %r14d
movq %r10, %r15
subq $0x1, %r15
jb 0x2c9e2
movsd (%rdx,%r14), %xmm0
movsd %xmm0, (%r8,%r14)
movsd 0x8(%rdx,%r14), %xmm0
movsd %xmm0, 0x8(%r8,%r14)
addq $0x10, %r14
jmp 0x2c9bc
incq %rax
addq $0x180, %rdx            # imm = 0x180
addq %rbx, %r8
jmp 0x2c9ad