// File: zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_define_zcopiers(_IO_FILE*, char const*, char const*)
void mex_define_zcopiers(FILE* fp, const char* name, const char* ztype)
{
    /* Define complex copiers */
    fprintf(fp,
            "mxWrapGetScalarZDef(mxWrapGetScalar_%s, %s,\n"
            "                    %s, setz_%s)\n",
            name, name, ztype, name);
    fprintf(fp,
            "mxWrapGetArrayZDef (mxWrapGetArray_%s, %s,\n"
            "                    %s, setz_%s)\n",
            name, name, ztype, name);
    fprintf(fp,
            "mxWrapCopyZDef     (mxWrapCopy_%s, %s,\n"
            "                    real_%s, imag_%s)\n",
            name, name, name, name);
    fprintf(fp,
            "mxWrapReturnZDef   (mxWrapReturn_%s, %s,\n"
            "                    real_%s, imag_%s)\n",
            name, name, name, name);

    /* Single precision */
    fprintf(fp,
            "mxWrapGetScalarZDef_single(mxWrapGetScalar_single_%s, %s,\n"
            "                    %s, setz_%s)\n",
            name, name, ztype, name);
    fprintf(fp,
            "mxWrapGetArrayZDef_single (mxWrapGetArray_single_%s, %s,\n"
            "                    %s, setz_%s)\n",
            name, name, ztype, name);
    fprintf(fp,
            "mxWrapCopyZDef_single     (mxWrapCopy_single_%s, %s,\n"
            "                    real_%s, imag_%s)\n",
            name, name, name, name);
    fprintf(fp,
            "mxWrapReturnZDef_single   (mxWrapReturn_single_%s, %s,\n"
            "                    real_%s, imag_%s)\n",
            name, name, name, name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xdcf7(%rip), %rsi      # 0x1aeb6
movb $0x0, %al
callq 0x33a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xdd23(%rip), %rsi      # 0x1af04
movb $0x0, %al
callq 0x33a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xdd4e(%rip), %rsi      # 0x1af51
movb $0x0, %al
callq 0x33a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xdd7a(%rip), %rsi      # 0x1af9f
movb $0x0, %al
callq 0x33a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xdda8(%rip), %rsi      # 0x1afef
movb $0x0, %al
callq 0x33a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xdde2(%rip), %rsi      # 0x1b04b
movb $0x0, %al
callq 0x33a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xde1b(%rip), %rsi      # 0x1b0a6
movb $0x0, %al
callq 0x33a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xde55(%rip), %rsi      # 0x1b102
movb $0x0, %al
callq 0x33a0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)