// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
testq %rcx, %rcx
setne %al
testq %rdi, %rdi
setle %r10b
orb %al, %r10b
jne 0x2f555
movq %r9, %rax
shlq $0x4, %rax
xorl %r10d, %r10d
testq %rsi, %rsi
jle 0x2f543
movq %rsi, %r11
xorl %ebx, %ebx
movsd (%rdx,%rbx), %xmm0
movsd %xmm0, (%r8,%rbx)
movsd 0x8(%rdx,%rbx), %xmm0
movsd %xmm0, 0x8(%r8,%rbx)
addq $0x10, %rbx
decq %r11
jne 0x2f522
incq %r10
addq $0x180, %rdx            # imm = 0x180
addq %rax, %r8
cmpq %rdi, %r10
jne 0x2f518
testq %rdi, %rdi
setle %al
cmpq $0x1, %rcx
setne %r10b
orb %al, %r10b
jne 0x2f5b2
xorl %eax, %eax
movq %r9, %r10
shlq $0x4, %r10
testq %rsi, %rsi
jle 0x2f5a3
movq %rsi, %r11
movq %r8, %rbx
movq %rdx, %r14
movsd (%r14), %xmm0
movsd %xmm0, (%rbx)
movsd 0x8(%r14), %xmm0
movsd %xmm0, 0x8(%rbx)
addq $0x10, %rbx
addq $0x180, %r14            # imm = 0x180
decq %r11
jne 0x2f57f
incq %rax
addq $0x10, %rdx
addq %r10, %r8
cmpq %rdi, %rax
jne 0x2f571
testq %rdi, %rdi
setle %al
cmpq $0x2, %rcx
setne %r10b
orb %al, %r10b
jne 0x2f618
xorl %eax, %eax
movaps 0x3be2(%rip), %xmm0     # 0x331b0
movq %r9, %r10
shlq $0x4, %r10
testq %rsi, %rsi
jle 0x2f609
movq %rsi, %r11
movq %r8, %rbx
movq %rdx, %r14
movsd (%r14), %xmm1
movsd %xmm1, (%rbx)
movsd 0x8(%r14), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%rbx)
addq $0x10, %rbx
addq $0x180, %r14            # imm = 0x180
decq %r11
jne 0x2f5e3
incq %rax
addq $0x10, %rdx
addq %r10, %r8
cmpq %rdi, %rax
jne 0x2f5d5
testq %rdi, %rdi
setle %al
cmpq $0x3, %rcx
setne %cl
orb %al, %cl
jne 0x2f678
shlq $0x4, %r9
xorl %eax, %eax
movaps 0x3b7a(%rip), %xmm0     # 0x331b0
testq %rsi, %rsi
jle 0x2f666
movq %rsi, %rcx
xorl %r10d, %r10d
movsd (%rdx,%r10), %xmm1
movsd %xmm1, (%r8,%r10)
movsd 0x8(%rdx,%r10), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x8(%r8,%r10)
addq $0x10, %r10
decq %rcx
jne 0x2f641
incq %rax
addq $0x180, %rdx            # imm = 0x180
addq %r9, %r8
cmpq %rdi, %rax
jne 0x2f636
popq %rbx
popq %r14
retq