// File: /workspace/github_cpp_makefile_star2_O1/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 0x30201
movq %r9, %rax
shlq $0x4, %rax
xorl %r10d, %r10d
testq %rsi, %rsi
jle 0x301ef
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 0x301ce
incq %r10
addq $0x180, %rdx            # imm = 0x180
addq %rax, %r8
cmpq %rdi, %r10
jne 0x301c4
cmpq $0x1, %rcx
setne %al
testq %rdi, %rdi
setle %r10b
orb %al, %r10b
jne 0x3025e
xorl %eax, %eax
movq %r9, %r10
shlq $0x4, %r10
testq %rsi, %rsi
jle 0x3024f
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 0x3022b
incq %rax
addq $0x10, %rdx
addq %r10, %r8
cmpq %rdi, %rax
jne 0x3021d
cmpq $0x2, %rcx
setne %al
testq %rdi, %rdi
setle %r10b
orb %al, %r10b
jne 0x302c4
xorl %eax, %eax
movaps 0x3f66(%rip), %xmm0     # 0x341e0
movq %r9, %r10
shlq $0x4, %r10
testq %rsi, %rsi
jle 0x302b5
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 0x3028f
incq %rax
addq $0x10, %rdx
addq %r10, %r8
cmpq %rdi, %rax
jne 0x30281
cmpq $0x3, %rcx
setne %al
testq %rdi, %rdi
setle %cl
orb %al, %cl
jne 0x30324
shlq $0x4, %r9
xorl %eax, %eax
movaps 0x3efe(%rip), %xmm0     # 0x341e0
testq %rsi, %rsi
jle 0x30312
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 0x302ed
incq %rax
addq $0x180, %rdx            # imm = 0x180
addq %r9, %r8
cmpq %rdi, %rax
jne 0x302e2
popq %rbx
popq %r14
retq