LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_define_underscore0_fname(_IO_FILE*, Func*)
void mex_define_underscore0_fname(FILE* fp, Func* f)
{
    fprintf(fp, "#define MWF77_%s ", f->funcv);
    for (char* s = f->funcv; *s; ++s)
        fputc(tolower(*s), fp);
    fprintf(fp, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rsi), %rdx
leaq 0xbb62(%rip), %rsi      # 0x14278
xorl %eax, %eax
callq 0x3270
movq 0x40(%r14), %r14
movb (%r14), %al
testb %al, %al
je 0x8747
incq %r14
movsbl %al, %edi
callq 0x3280
movl %eax, %edi
movq %rbx, %rsi
callq 0x3230
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x872b
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3230
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_define_underscore0_fnames(_IO_FILE*, Func*)
void mex_define_underscore0_fnames(FILE* fp, Func* f)
{
    set<string> fnames;
    for (; f; f = f->next) {
        if (f->fort && fnames.find(f->funcv) == fnames.end()) {
            mex_define_underscore0_fname(fp, f);
            fnames.insert(f->funcv);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x58(%rbp)
leaq -0x80(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
testq %rsi, %rsi
je 0x8835
movq %rsi, %rbx
leaq -0x50(%rbp), %r15
leaq -0x29(%rbp), %r12
leaq -0x88(%rbp), %r13
cmpb $0x1, 0x24(%rbx)
jne 0x8828
movq 0x40(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x6a76
movq %r13, %rdi
movq %r15, %rsi
callq 0x716a
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x87e0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
leaq -0x80(%rbp), %rax
cmpq %rax, %r14
jne 0x8828
movq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x86fe
movq 0x40(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x6a76
movq %r13, %rdi
movq %r15, %rsi
callq 0x6fba
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8828
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
movq 0x58(%rbx), %rbx
testq %rbx, %rbx
jne 0x87a4
leaq -0x88(%rbp), %rdi
callq 0x6b4e
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8854
jmp 0x8872
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8875
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
jmp 0x8875
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x6b4e
movq %rbx, %rdi
callq 0x32f0
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_define_f2c_fname(_IO_FILE*, Func*)
void mex_define_f2c_fname(FILE* fp, Func* f)
{
    fprintf(fp, "#define MWF77_%s ", f->funcv);
    bool has_underscore = false;
    for (char* s = f->funcv; *s; ++s) {
        has_underscore = (has_underscore || (*s == '_'));
        fputc(tolower(*s), fp);
    }
    if (has_underscore)
        fprintf(fp, "__\n");
    else
        fprintf(fp, "_\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rsi), %rdx
leaq 0xb9d4(%rip), %rsi      # 0x14278
xorl %eax, %eax
callq 0x3270
movq 0x40(%r14), %r14
movb (%r14), %al
testb %al, %al
je 0x88f4
incq %r14
xorl %r15d, %r15d
cmpb $0x5f, %al
sete %cl
orb %cl, %r15b
movsbl %al, %edi
callq 0x3280
movl %eax, %edi
movq %rbx, %rsi
callq 0x3230
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x88bc
testb $0x1, %r15b
je 0x88f4
leaq 0xb99d(%rip), %rdi      # 0x1428a
movl $0x3, %esi
jmp 0x8900
leaq 0xb990(%rip), %rdi      # 0x1428b
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_define_f2c_fnames(_IO_FILE*, Func*)
void mex_define_f2c_fnames(FILE* fp, Func* f)
{
    set<string> fnames;
    for (; f; f = f->next) {
        if (f->fort && fnames.find(f->funcv) == fnames.end()) {
            mex_define_f2c_fname(fp, f);
            fnames.insert(f->funcv);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, -0x58(%rbp)
leaq -0x80(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
testq %rsi, %rsi
je 0x89f4
movq %rsi, %rbx
leaq -0x50(%rbp), %r15
leaq -0x29(%rbp), %r12
leaq -0x88(%rbp), %r13
cmpb $0x1, 0x24(%rbx)
jne 0x89e7
movq 0x40(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x6a76
movq %r13, %rdi
movq %r15, %rsi
callq 0x716a
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x899f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
leaq -0x80(%rbp), %rax
cmpq %rax, %r14
jne 0x89e7
movq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x8889
movq 0x40(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x6a76
movq %r13, %rdi
movq %r15, %rsi
callq 0x6fba
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x89e7
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
movq 0x58(%rbx), %rbx
testq %rbx, %rbx
jne 0x8963
leaq -0x88(%rbp), %rdi
callq 0x6b4e
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8a13
jmp 0x8a31
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8a34
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
jmp 0x8a34
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x6b4e
movq %rbx, %rdi
callq 0x32f0
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_define_fnames(_IO_FILE*, Func*)
void mex_define_fnames(FILE* fp, Func* f)
{
    fprintf(fp, "#if defined(MWF77_CAPS)\n");
    mex_define_caps_fnames(fp, f);
    fprintf(fp, "#elif defined(MWF77_UNDERSCORE1)\n");
    mex_define_underscore1_fnames(fp, f);
    fprintf(fp, "#elif defined(MWF77_UNDERSCORE0)\n");
    mex_define_underscore0_fnames(fp, f);
    fprintf(fp, "#else /* f2c convention */\n");
    mex_define_f2c_fnames(fp, f);
    fprintf(fp, "#endif\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb832(%rip), %rdi      # 0x1428e
movl $0x18, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8436
leaq 0xb827(%rip), %rdi      # 0x142a7
movl $0x21, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movq %rbx, %rdi
movq %r14, %rsi
callq 0x85cd
leaq 0xb825(%rip), %rdi      # 0x142c9
movl $0x21, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8758
leaq 0xb823(%rip), %rdi      # 0x142eb
movl $0x1b, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8917
leaq 0xb8ea(%rip), %rdi      # 0x143d6
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %rbp
jmp 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_fortran_arg(_IO_FILE*, Var*)
void mex_fortran_arg(FILE* fp, Var* v)
{
    if (!v)
        return;
    if (v->tinfo == VT_mx)
        fprintf(fp, "const mxArray*");
    else
        fprintf(fp, "%s*", v->basetype);
    if (v->next) {
        fprintf(fp, ", ");
        mex_fortran_arg(fp, v->next);
    }
}

// Assembly:
testq %rsi, %rsi
je 0x8b95
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb7e1(%rip), %r15      # 0x14307
leaq 0xd087(%rip), %r12      # 0x15bb4
leaq 0xbc28(%rip), %r13      # 0x1475c
cmpl $0xa, 0x20(%rbx)
jne 0x8b51
movl $0xe, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rcx
callq 0x3370
jmp 0x8b62
movq 0x10(%rbx), %rdx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3270
cmpq $0x0, 0x30(%rbx)
je 0x8b87
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x3370
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x8b34
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_fortran_decl(_IO_FILE*, Func*)
void mex_fortran_decl(FILE* fp, Func* f)
{
    if (f->ret)
        fprintf(fp, "%s ", f->ret->basetype);
    else
        fprintf(fp, "MWF77_RETURN ");
    fprintf(fp, "MWF77_%s(", f->funcv);
    mex_fortran_arg(fp, f->args);
    fprintf(fp, ");\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rsi), %rax
testq %rax, %rax
je 0x8bc3
movq 0x10(%rax), %rdx
leaq 0xb6cf(%rip), %rsi      # 0x14286
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
jmp 0x8bdc
leaq 0xb74c(%rip), %rdi      # 0x14316
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movq 0x40(%r14), %rdx
leaq 0xb73d(%rip), %rsi      # 0x14324
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
movq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x8b02
leaq 0xdcf7(%rip), %rdi      # 0x168fb
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %rbp
jmp 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_fortran_decls(_IO_FILE*, Func*)
void mex_fortran_decls(FILE* fp, Func* f)
{
    fprintf(fp,
            "#ifdef __cplusplus\n"
            "extern \"C\" { /* Prevent C++ name mangling */\n"
            "#endif\n\n"
            "#ifndef MWF77_RETURN\n"
            "#define MWF77_RETURN int\n"
            "#endif\n\n");

    set<string> fnames;
    for (; f; f = f->next) {
        if (f->fort && fnames.find(f->funcv) == fnames.end()) {
            mex_fortran_decl(fp, f);
            fnames.insert(f->funcv);
        }
    }

    fprintf(fp,
            "\n#ifdef __cplusplus\n"
            "} /* end extern C */\n"
            "#endif\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rcx
leaq 0xb6f6(%rip), %rdi      # 0x1432e
movl $0x7e, %esi
movl $0x1, %edx
movq %rcx, -0x58(%rbp)
callq 0x3370
leaq -0x80(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
testq %r14, %r14
je 0x8d11
leaq -0x50(%rbp), %r15
leaq -0x29(%rbp), %r12
leaq -0x88(%rbp), %r13
cmpb $0x1, 0x24(%r14)
jne 0x8d04
movq 0x40(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x6a76
movq %r13, %rdi
movq %r15, %rsi
callq 0x716a
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8cbc
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
leaq -0x80(%rbp), %rax
cmpq %rax, %rbx
jne 0x8d04
movq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0x8b96
movq 0x40(%r14), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x6a76
movq %r13, %rdi
movq %r15, %rsi
callq 0x6fba
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8d04
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
movq 0x58(%r14), %r14
testq %r14, %r14
jne 0x8c7f
leaq 0xb695(%rip), %rdi      # 0x143ad
movl $0x31, %esi
movl $0x1, %edx
movq -0x58(%rbp), %rcx
callq 0x3370
leaq -0x88(%rbp), %rdi
callq 0x6b4e
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8d4a
jmp 0x8d68
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x8d6b
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
jmp 0x8d6b
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x6b4e
movq %rbx, %rdi
callq 0x32f0
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_casting_getter(_IO_FILE*, char const*, InheritsDecl*)
void mex_casting_getter(FILE* fp, const char* cname,
                        InheritsDecl* inherits)
{
    fprintf(fp, "\n%s* mxWrapGetP_%s(const mxArray* a, const char** e)\n",
            cname, cname);
    fprintf(fp,
            "{\n"
            "    char pbuf[128];\n"
            "    if (mxGetClassID(a) == mxDOUBLE_CLASS &&\n"
            "        mxGetM(a)*mxGetN(a) == 1 &&\n"
            "#if MX_HAS_INTERLEAVED_COMPLEX\n"
	    "        ((mxIsComplex(a) ? *mxGetComplexDoubles(a) == 0 : *mxGetDoubles(a) == 0)\n"
	    "#else\n"
	    "        *mxGetPr(a) == 0\n"
	    "#endif\n"
            "        )\n"
            "        return NULL;\n"
            "    if (!mxIsChar(a)) {\n"
            "#ifdef R2008OO\n"
            "        mxArray* ap = mxGetProperty(a, 0, \"mwptr\");\n"
            "        if (ap)\n"
            "            return mxWrapGetP_%s(ap, e);\n"
            "#endif\n"
            "        *e = \"Invalid pointer\";\n"
            "        return NULL;\n"
            "    }\n"
            "    mxGetString(a, pbuf, sizeof(pbuf));\n\n", cname);

    mex_casting_getter_type(fp, cname);
    for (InheritsDecl* i = inherits; i; i = i->next)
        mex_casting_getter_type(fp, i->name);

    fprintf(fp,
            "    *e = \"Invalid pointer to %s\";\n"
            "    return NULL;\n"
            "}\n\n", cname);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb67c(%rip), %rsi      # 0x1443c
movq %rbx, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3270
leaq 0xb69e(%rip), %rsi      # 0x14472
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3270
leaq 0xb5f7(%rip), %rsi      # 0x143df
movq %r14, %rdi
movq %rbx, %rdx
movq %rbx, %rcx
movq %rbx, %r8
movq %rbx, %r9
xorl %eax, %eax
pushq %rbx
pushq %rbx
callq 0x3270
addq $0x10, %rsp
testq %r15, %r15
je 0x8e38
leaq 0xb5cf(%rip), %r12      # 0x143df
movq (%r15), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %rcx, %rdx
movq %rcx, %r8
movq %rcx, %r9
xorl %eax, %eax
pushq %rcx
pushq %rcx
callq 0x3270
addq $0x10, %rsp
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0x8e10
leaq 0xb84f(%rip), %rsi      # 0x1468e
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3270
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_cast_get_p(_IO_FILE*, char const*, int)
void mex_cast_get_p(FILE* fp, const char* basetype, int input_label)
{
    fprintf(fp, "    in%d_ = ", input_label);
    if (is_mxarray_type(basetype))
        fprintf(fp, "mxWrapGet_%s(prhs[%d], &mw_err_txt_);\n",
                basetype, input_label);
    else if (class_decls.find(basetype) == class_decls.end())
        fprintf(fp, "(%s*) mxWrapGetP(prhs[%d], \"%s:%%p\", &mw_err_txt_);\n",
                basetype, input_label, basetype);
    else
        fprintf(fp, "mxWrapGetP_%s(prhs[%d], &mw_err_txt_);\n",
                basetype, input_label);
    fprintf(fp,
            "    if (mw_err_txt_)\n"
            "        goto mw_err_label;\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xb804(%rip), %rsi      # 0x146c5
xorl %eax, %eax
callq 0x3270
movq %r15, %rdi
callq 0x5f6f
testb %al, %al
je 0x8edd
leaq 0xb7f7(%rip), %rsi      # 0x146d2
jmp 0x8f2e
leaq -0x50(%rbp), %r13
leaq -0x29(%rbp), %rdx
movq %r13, %rdi
movq %r15, %rsi
callq 0x6a76
leaq 0x13551(%rip), %r12     # 0x1c448
movq %r12, %rdi
movq %r13, %rsi
callq 0xafc0
movq %rax, %r13
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8f1e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
addq $0x8, %r12
cmpq %r12, %r13
je 0x8f66
leaq 0xb800(%rip), %rsi      # 0x1472e
movq %rbx, %rdi
movq %r15, %rdx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x3270
leaq 0xc35c(%rip), %rdi      # 0x152a1
movl $0x31, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb78c(%rip), %rsi      # 0x146f9
movq %rbx, %rdi
movq %r15, %rdx
movl %r14d, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x3270
jmp 0x8f3e
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8f9e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3180
movq %rbx, %rdi
callq 0x32f0
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_declare_type(char*, Var*)
void mex_declare_type(char* typebuf, Var* v)
{
    if (is_obj(v->tinfo) || is_array(v->tinfo)){
        if(v->devicespec == 'g'){
            sprintf(typebuf, "%s*", basetype_to_cucomplex(v->basetype));
        }
        else{
            sprintf(typebuf, "%s*", v->basetype);
        }
    }
    else if (v->tinfo == VT_rarray){
        if(v->devicespec == 'g'){
            sprintf(typebuf, "const %s*", basetype_to_cucomplex(v->basetype));
        }
        else{
            sprintf(typebuf, "const %s*", v->basetype);
        }
    }
    else if (v->tinfo == VT_scalar ||
             v->tinfo == VT_cscalar ||
             v->tinfo == VT_zscalar ||
             v->tinfo == VT_r_scalar ||
             v->tinfo == VT_r_cscalar ||
             v->tinfo == VT_r_zscalar ||
             v->tinfo == VT_p_scalar ||
             v->tinfo == VT_p_cscalar ||
             v->tinfo == VT_p_zscalar)
        sprintf(typebuf, "%s", v->basetype);
    else if (v->tinfo == VT_string)
        sprintf(typebuf, "char*");
    else if (v->tinfo == VT_mx && v->iospec == 'i')
        sprintf(typebuf, "const mxArray*");
    else if (v->tinfo == VT_mx && v->iospec == 'o')
        sprintf(typebuf, "mxArray*");
    else {
        fprintf(stderr, "v->tinfo == %d; v->name = %s\n", v->tinfo, v->name);
        assert(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl 0x20(%rsi), %eax
leal -0x1(%rax), %ecx
cmpl $0x11, %ecx
ja 0x908d
movq %rdi, %rbx
leaq 0x4f97(%rip), %rdx      # 0xdf5c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x10(%rsi), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3150
cmpb $0x67, 0x9(%rsi)
movq 0x10(%rsi), %rdx
jne 0x9001
movq %rdx, %rdi
callq 0x7dc0
leaq 0xb763(%rip), %rsi      # 0x1475c
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x900b
leaq 0xb754(%rip), %rsi      # 0x1475c
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3080
cmpb $0x67, 0x9(%rsi)
movq 0x10(%rsi), %rdx
jne 0x906c
movq %rdx, %rdi
callq 0x7dc0
leaq 0xb725(%rip), %rsi      # 0x14756
jmp 0x8ff9
movzbl 0x8(%rsi), %ecx
cmpl $0x6f, %ecx
je 0x9075
cmpl $0x69, %ecx
jne 0x908d
movabsq $0x2a796172724178, %rax # imm = 0x2A796172724178
movq %rax, 0x7(%rbx)
movabsq $0x786d2074736e6f63, %rax # imm = 0x786D2074736E6F63
movq %rax, (%rbx)
jmp 0x9086
movw $0x2a, 0x4(%rbx)
movl $0x72616863, (%rbx)     # imm = 0x72616863
jmp 0x9086
leaq 0xb6e3(%rip), %rsi      # 0x14756
jmp 0x9008
movabsq $0x2a7961727241786d, %rax # imm = 0x2A7961727241786D
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rsi, %rdi
movl %eax, %esi
callq 0x37b0
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_declare_in_args(_IO_FILE*, Var*)
void mex_declare_in_args(FILE* fp, Var* v)
{
    if (!v)
        return;
    if ((v->iospec == 'i' || v->iospec == 'b') && v->tinfo != VT_const) {
        char typebuf[128];
        mex_declare_type(typebuf, v);
        if (is_array(v->tinfo) || is_obj(v->tinfo) || v->tinfo == VT_string) {
            fprintf(fp, "    %-10s  in%d_ =0; /* %-10s */\n",
                    typebuf, v->input_label, v->name);
            if(v->devicespec == 'g'){
                fprintf(fp, "    %-10s *mxGPUArray_in%d_ =0; /* %-10s */\n",
                       "mxGPUArray const", v->input_label, v->name);
            }
        } else {
            fprintf(fp, "    %-10s  in%d_;    /* %-10s */\n",
                    typebuf, v->input_label, v->name);
        }
    }
    mex_declare_in_args(fp, v->next);
}

// Assembly:
testq %rsi, %rsi
je 0x9162
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x8(%rsi), %eax
cmpl $0x69, %eax
je 0x90c6
cmpl $0x62, %eax
jne 0x914b
cmpl $0x13, 0x20(%r14)
je 0x914b
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x8fa6
movl 0x20(%r14), %eax
cmpl $0xf, %eax
ja 0x912c
movl $0x8a1e, %ecx           # imm = 0x8A1E
btl %eax, %ecx
jae 0x912c
movl (%r14), %ecx
movq 0x28(%r14), %r8
leaq 0xb6ba(%rip), %rsi      # 0x147b7
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
cmpb $0x67, 0x9(%r14)
jne 0x914b
movl (%r14), %ecx
movq 0x28(%r14), %r8
leaq 0xb6b6(%rip), %rsi      # 0x147d9
leaq 0xb6dc(%rip), %rdx      # 0x14806
jmp 0x9141
movl (%r14), %ecx
movq 0x28(%r14), %r8
leaq 0xb6dd(%rip), %rsi      # 0x14817
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x9097
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_declare_out_args(_IO_FILE*, Var*)
void mex_declare_out_args(FILE* fp, Var* v)
{
    if (!v)
        return;
    if (v->iospec == 'o' && v->tinfo != VT_mx) {
        char typebuf[128];
        mex_declare_type(typebuf, v);
        if (is_array(v->tinfo) || is_obj(v->tinfo) || v->tinfo == VT_string) {
            fprintf(fp, "    %-10s  out%d_=0; /* %-10s */\n",
                    typebuf, v->output_label, v->name);
            if(v->devicespec == 'g'){
                fprintf(fp, "    %-10s *mxGPUArray_out%d_ =0; /* %-10s */\n",
                       "mxGPUArray", v->output_label, v->name);
                fprintf(fp, "    %-10s gpu_outdims%d_[2] = {0,0}; /* %-10s dims*/\n",
                       "mwSize", v->output_label, v->name);
            }
        } else {
            fprintf(fp, "    %-10s  out%d_;   /* %-10s */\n",
                    typebuf, v->output_label, v->name);
        }
    }
    mex_declare_out_args(fp, v->next);
}

// Assembly:
testq %rsi, %rsi
je 0x924d
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x6f, 0x8(%rsi)
jne 0x9236
cmpl $0xa, 0x20(%r14)
je 0x9236
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x8fa6
movl 0x20(%r14), %eax
cmpl $0xf, %eax
ja 0x9216
movl $0x8a1e, %ecx           # imm = 0x8A1E
btl %eax, %ecx
jae 0x9216
movl 0x4(%r14), %ecx
movq 0x28(%r14), %r8
leaq 0xb673(%rip), %rsi      # 0x14839
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
cmpb $0x67, 0x9(%r14)
jne 0x9236
movl 0x4(%r14), %ecx
movq 0x28(%r14), %r8
leaq 0xb66e(%rip), %rsi      # 0x1485b
leaq 0xb695(%rip), %rdx      # 0x14889
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
movl 0x4(%r14), %ecx
movq 0x28(%r14), %r8
leaq 0xb687(%rip), %rsi      # 0x14894
leaq 0xb6b6(%rip), %rdx      # 0x148ca
jmp 0x922c
movl 0x4(%r14), %ecx
movq 0x28(%r14), %r8
leaq 0xb6ac(%rip), %rsi      # 0x148d1
leaq -0x90(%rbp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x9163
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_declare_dim_args(_IO_FILE*, Expr*)
void mex_declare_dim_args(FILE* fp, Expr* e)
{
    if (!e)
        return;
    fprintf(fp, "    %-10s  dim%d_;   /* %-10s */\n",
            "mwSize", e->input_label, e->value);
    mex_declare_dim_args(fp, e->next);
}

// Assembly:
testq %rsi, %rsi
je 0x9299
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb688(%rip), %r15      # 0x148f3
leaq 0xb658(%rip), %r12      # 0x148ca
movl (%rbx), %ecx
movq 0x8(%rbx), %r8
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3270
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x9272
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_declare_dim_args(_IO_FILE*, Var*)
void mex_declare_dim_args(FILE* fp, Var* v)
{
    if (!v)
        return;
    if (v->qual)
        mex_declare_dim_args(fp, v->qual->args);
    mex_declare_dim_args(fp, v->next);
}

// Assembly:
testq %rsi, %rsi
je 0x92ce
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x92c1
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x924e
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x92ac
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_declare_args(_IO_FILE*, Func*)
void mex_declare_args(FILE* fp, Func* f)
{
    if (f->thisv) {
        char typebuf[128];
        strcpy(typebuf, f->classv);
        strcat(typebuf, "*");
        fprintf(fp, "    %-10s  in%d_ =0; /* %-10s */\n",
                typebuf, 0, f->thisv);
    }
    mex_declare_in_args(fp, f->args);
    if (!nullable_return(f))
        mex_declare_return(fp, f->ret);
    mex_declare_out_args(fp, f->args);
    mex_declare_dim_args(fp, f->ret);
    mex_declare_dim_args(fp, f->args);
    if (f->ret || f->args || f->thisv)
        fprintf(fp, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rsi), %r15
testq %r15, %r15
je 0x9338
movq 0x38(%r14), %rsi
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
callq 0x3150
movq %r12, %rdi
callq 0x30d0
movw $0x2a, -0xa0(%rbp,%rax)
leaq 0xb491(%rip), %rsi      # 0x147b7
movq %rbx, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x3270
movq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x9097
movq 0x50(%r14), %rsi
testq %rsi, %rsi
je 0x9367
movl 0x20(%rsi), %eax
cmpl $0x9, %eax
ja 0x935f
movl $0x21c, %ecx            # imm = 0x21C
btl %eax, %ecx
jb 0x936f
addl $-0xc, %eax
cmpl $0x3, %eax
jb 0x936f
movq %rbx, %rdi
callq 0x9163
movq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x9163
movq 0x50(%r14), %r15
testq %r15, %r15
je 0x939f
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x9399
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x924e
movq 0x30(%r15), %r15
jmp 0x937f
movq 0x48(%r14), %r15
testq %r15, %r15
je 0x93c3
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x93bd
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x924e
movq 0x30(%r15), %r15
jmp 0x93a3
cmpq $0x0, 0x50(%r14)
jne 0x93d8
cmpq $0x0, 0x48(%r14)
jne 0x93d8
cmpq $0x0, 0x30(%r14)
je 0x93e5
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3230
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_unpack_dims(_IO_FILE*, Expr*)
int mex_unpack_dims(FILE* fp, Expr* e)
{
    if (!e)
        return 0;
    fprintf(fp,
            "    dim%d_ = (mwSize) mxWrapGetScalar(prhs[%d], &mw_err_txt_);\n",
            e->input_label, e->input_label);
    return mex_unpack_dims(fp, e->next)+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x9434
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb503(%rip), %r12      # 0x14915
xorl %r15d, %r15d
movl (%rbx), %ecx
movq %r14, %rdi
movq %r12, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3270
movq 0x10(%rbx), %rbx
incl %r15d
testq %rbx, %rbx
jne 0x9415
jmp 0x9437
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_unpack_dims(_IO_FILE*, Var*)
int mex_unpack_dims(FILE* fp, Var* v)
{
    if (!v)
        return 0;
    if (v->qual)
        return
            mex_unpack_dims(fp, v->qual->args) +
            mex_unpack_dims(fp, v->next);
    return mex_unpack_dims(fp, v->next);
}

// Assembly:
testq %rsi, %rsi
je 0x94be
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb4b2(%rip), %r12      # 0x14915
xorl %eax, %eax
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
jne 0x9479
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x9465
jmp 0x94af
movl %eax, -0x2c(%rbp)
movq 0x8(%rcx), %r15
xorl %r13d, %r13d
testq %r15, %r15
je 0x94a3
movl (%r15), %ecx
movq %r14, %rdi
movq %r12, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3270
movq 0x10(%r15), %r15
incl %r13d
jmp 0x9483
movq 0x30(%rbx), %rbx
movl -0x2c(%rbp), %eax
addl %r13d, %eax
jmp 0x9472
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_check_dims(_IO_FILE*, Var*)
void mex_check_dims(FILE* fp, Var* v)
{
    if (!v)
        return;
    if (v->iospec != 'o' && is_array(v->tinfo) && v->qual && v->qual->args && v->devicespec != 'g') {
        Expr* a = v->qual->args;
        if (a->next) {
            fprintf(fp,
                    "    if (mxGetM(prhs[%d]) != dim%d_ ||\n"
                    "        mxGetN(prhs[%d]) != dim%d_) {\n"
                    "        mw_err_txt_ = \"Bad argument size: %s\";\n"
                    "        goto mw_err_label;\n"
                    "    }\n\n",
                    v->input_label, a->input_label,
                    v->input_label, a->next->input_label,
                    v->name);
        } else {
            fprintf(fp,
                    "    if (mxGetM(prhs[%d])*mxGetN(prhs[%d]) != dim%d_) {\n"
                    "        mw_err_txt_ = \"Bad argument size: %s\";"
                    "        goto mw_err_label;\n"
                    "    }\n\n",
                    v->input_label, v->input_label, a->input_label,
                    v->name);
        }
    }
    mex_check_dims(fp, v->next);
}

// Assembly:
testq %rsi, %rsi
je 0x95ac
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb4cd(%rip), %r15      # 0x149f3
leaq 0xb428(%rip), %r12      # 0x14955
cmpb $0x6f, 0x8(%rbx)
je 0x9597
movl 0x20(%rbx), %eax
addl $-0x2, %eax
cmpl $0x2, %eax
ja 0x9597
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x9597
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x9597
cmpb $0x67, 0x9(%rbx)
je 0x9597
movq 0x10(%rax), %rcx
movl (%rbx), %edx
movl (%rax), %r8d
testq %rcx, %rcx
je 0x9584
movl (%rcx), %r9d
movq 0x28(%rbx), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
movl %r8d, %ecx
movl %edx, %r8d
xorl %eax, %eax
callq 0x3270
jmp 0x9597
movq 0x28(%rbx), %r9
movq %r14, %rdi
movq %r15, %rsi
movl %edx, %ecx
xorl %eax, %eax
callq 0x3270
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x952d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_alloc_size1(_IO_FILE*, Expr*)
void mex_alloc_size1(FILE* fp, Expr* e)
{
    if (!e)
        return;
    fprintf(fp, "dim%d_", e->input_label);
    if (e->next) {
        fprintf(fp, "*");
        mex_alloc_size1(fp, e->next);
    }
}

// Assembly:
testq %rsi, %rsi
je 0x9614
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc7ad(%rip), %r15      # 0x15d8b
movl (%rbx), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3270
cmpq $0x0, 0x10(%rbx)
je 0x960a
movl $0x2a, %edi
movq %r14, %rsi
callq 0x3230
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x95de
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_unpack_input_string(_IO_FILE*, Var*)
void mex_unpack_input_string(FILE* fp, Var* v)
{
    if (!(v->qual && v->qual->args))
        fprintf(fp,
                "    in%d_ = mxWrapGetString(prhs[%d], &mw_err_txt_);\n"
                "    if (mw_err_txt_)\n"
                "        goto mw_err_label;\n",
                v->input_label, v->input_label);
    else {
        fprintf(fp, "    in%d_ = (char*) mxMalloc(",
                v->input_label);
        mex_alloc_size(fp, v->qual->args);
        fprintf(fp, "*sizeof(char));\n");
        fprintf(fp, "    if (mxGetString(prhs[%d], in%d_, ",
                v->input_label, v->input_label);
        mex_alloc_size(fp, v->qual->args);
        fprintf(fp, ") != 0) {\n"
                "        mw_err_txt_ = \"Invalid string argument\";\n"
                "        goto mw_err_label;\n"
                "    }\n");
    }
    fprintf(fp, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x985b
cmpq $0x0, 0x8(%rax)
je 0x985b
movl (%r14), %edx
leaq 0xb922(%rip), %rsi      # 0x15109
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x9615
leaq 0xb91f(%rip), %rdi      # 0x15127
movl $0x10, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movl (%r14), %ecx
leaq 0xb914(%rip), %rsi      # 0x15138
movq %rbx, %rdi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3270
movq 0x18(%r14), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x9615
leaq 0xb917(%rip), %rdi      # 0x1515e
movl $0x5c, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
jmp 0x9871
movl (%r14), %ecx
leaq 0xb83e(%rip), %rsi      # 0x150a3
movq %rbx, %rdi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3270
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3230
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_check_inputs(_IO_FILE*, Var*)
void mex_check_inputs(FILE* fp, Var* v)
{
    if (!v)
        return;
    if (v->iospec != 'o' && (v->tinfo == VT_obj || v->tinfo == VT_r_obj))
        fprintf(fp,
                "    if (!in%d_) {\n"
                "        mw_err_txt_ = \"Argument %s cannot be null\";\n"
                "        goto mw_err_label;\n"
                "    }\n",
                v->input_label, v->name);
    mex_check_inputs(fp, v->next);
}

// Assembly:
testq %rsi, %rsi
je 0x9a73
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xbc7e(%rip), %r15      # 0x156b8
cmpb $0x6f, 0x8(%rbx)
je 0x9a60
movl 0x20(%rbx), %eax
cmpl $0xf, %eax
je 0x9a4d
cmpl $0x1, %eax
jne 0x9a60
movl (%rbx), %edx
movq 0x28(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3270
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x9a3a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_make_call(_IO_FILE*, Var*, int)
void mex_make_call(FILE* fp, Var* v, int first)
{
    if (!v)
        return;
    if (!first)
        fprintf(fp, ", ");

    char namebuf[128];
    if (v->tinfo == VT_obj || v->tinfo == VT_r_obj)
        fprintf(fp, "*%s", vname(v, namebuf));
    else if (v->tinfo == VT_mx && v->iospec == 'o')
        fprintf(fp, "plhs+%d", v->output_label);
    else if (v->tinfo == VT_p_scalar ||
             v->tinfo == VT_p_cscalar ||
             v->tinfo == VT_p_zscalar)
        fprintf(fp, "&%s", vname(v, namebuf));
    else if (v->tinfo == VT_const)
        fprintf(fp, "%s", v->name);
    else
        fprintf(fp, "%s", vname(v, namebuf));
    mex_make_call(fp, v->next, 0);
}

// Assembly:
testq %rsi, %rsi
je 0x9e37
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
jne 0x9d77
leaq 0xbe4f(%rip), %rdi      # 0x15bb4
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movl 0x20(%r14), %ecx
leal -0xa(%rcx), %eax
cmpl $0x9, %eax
ja 0x9dae
leaq 0x4262(%rip), %rcx      # 0xdfec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0xa0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x7f5c
leaq 0xbb45(%rip), %rsi      # 0x158f1
jmp 0x9dcc
cmpl $0x1, %ecx
jne 0x9dff
leaq -0xa0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x7f5c
leaq 0xbb19(%rip), %rsi      # 0x158e5
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3270
jmp 0x9e1c
movq 0x28(%r14), %rdi
jmp 0x9e14
cmpb $0x6f, 0x8(%r14)
jne 0x9dff
movl 0x4(%r14), %edx
leaq 0xbaf6(%rip), %rsi      # 0x158e9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
jmp 0x9e1c
leaq -0xa0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x7f5c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x31d0
movq 0x30(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x9d3b
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_make_call(_IO_FILE*, Func*)
void mex_make_call(FILE* fp, Func* f)
{
    if (f->thisv)
        fprintf(fp, "in0_->");
    if (strcmp(f->funcv, "new") == 0)
        fprintf(fp, "new %s(", f->classv);
    else {
        if (f->fort)
            fprintf(fp, "MWF77_");
        fprintf(fp, "%s(", f->funcv);
    }
    mex_make_call(fp, f->args, 1);
    fprintf(fp, ")");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x30(%rsi)
je 0x9e68
leaq 0xba9f(%rip), %rdi      # 0x158f5
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movq 0x40(%r14), %r15
leaq 0x35f0(%rip), %rsi      # 0xd463
movq %r15, %rdi
callq 0x3260
testl %eax, %eax
je 0x9eb2
cmpb $0x1, 0x24(%r14)
jne 0x9ea3
leaq 0xba6f(%rip), %rdi      # 0x158fc
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movq 0x40(%r14), %r15
leaq 0xbafa(%rip), %rsi      # 0x159a4
movq %rbx, %rdi
movq %r15, %rdx
jmp 0x9ec0
movq 0x38(%r14), %rdx
leaq 0xbae3(%rip), %rsi      # 0x159a0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
movq 0x48(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x9d3b
movl $0x29, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3230
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_marshal_results(_IO_FILE*, Var*, bool)
void mex_marshal_results(FILE* fp, Var* v, bool return_flag)
{
    if (!v)
        return;
    if (v->iospec != 'i')
        mex_marshal_result(fp, v, return_flag);
    mex_marshal_results(fp, v->next, return_flag);
}

// Assembly:
testq %rsi, %rsi
je 0xa86b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzbl %dl, %r15d
cmpb $0x69, 0x8(%rbx)
je 0xa858
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0xa63e
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0xa844
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: print_c_comment(_IO_FILE*, Func*)
void print_c_comment(FILE* fp, Func* f)
{
    fprintf(fp, "/* ---- %s: %d ----\n * ", f->fname.c_str(), f->line);
    print(fp, f);
    for (Func* fsame = f->same_next; fsame; fsame = fsame->next)
        fprintf(fp, " * Also at %s: %d\n", fsame->fname.c_str(), fsame->line);
    fprintf(fp, " */\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdx
movl 0x20(%rsi), %ecx
leaq 0xb6c1(%rip), %rsi      # 0x161a0
xorl %eax, %eax
callq 0x3270
movq %rbx, %rdi
movq %r14, %rsi
callq 0x61ae
movq 0x60(%r14), %r15
testq %r15, %r15
je 0xab1e
leaq 0xb6b7(%rip), %r14      # 0x161b8
movq (%r15), %rdx
movl 0x20(%r15), %ecx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x3270
movq 0x58(%r15), %r15
testq %r15, %r15
jne 0xab01
leaq 0x97dd(%rip), %rdi      # 0x14302
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: print_mex_stub(_IO_FILE*, Func*)
void print_mex_stub(FILE* fp, Func* f)
{
    print_c_comment(fp, f);
    fprintf(fp,
            "static const char* stubids%d_ = \"%s\";\n\n"
            "void mexStub%d(int nlhs, mxArray* plhs[],\n"
            "              int nrhs, const mxArray* prhs[])\n"
            "{\n"
            "    const char* mw_err_txt_ = 0;\n",
            f->id, id_string(f).c_str(), f->id);

    mex_declare_args(fp, f);
    mex_unpack_dims(fp, f);
    mex_check_dims(fp, f);
    mex_unpack_inputs(fp, f);
    mex_check_inputs(fp, f);
    mex_alloc_output(fp, f);
    mex_record_call(fp, f);
    mex_make_stmt(fp, f);
    mex_marshal_results(fp, f);
    fprintf(fp, "\nmw_err_label:\n");
    mex_dealloc(fp, f);
    fprintf(fp,
            "    if (mw_err_txt_)\n"
            "        mexErrMsgTxt(mw_err_txt_);\n"
            "}\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0xaac2
movl 0x28(%r14), %r15d
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x66c7
movq (%r12), %rcx
movl 0x28(%r14), %r8d
leaq 0xb64e(%rip), %rsi      # 0x161cb
movq %rbx, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x3270
movq (%r12), %rdi
leaq -0x30(%rbp), %rax
cmpq %rax, %rdi
je 0xaba3
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x3180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x92d9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x94c1
testq %rbx, %rbx
je 0xabca
movq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x9501
movq %rbx, %rdi
movq %r14, %rsi
callq 0x99ec
movq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x9a1e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9cd6
movl 0x28(%r14), %edx
leaq 0xacb7(%rip), %rsi      # 0x158ae
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3270
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9eef
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa86c
leaq 0xb651(%rip), %rdi      # 0x1626f
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
movq %rbx, %rdi
movq %r14, %rsi
callq 0xaa73
leaq 0xb63d(%rip), %rdi      # 0x1627f
movl $0x3b, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: make_profile_output(_IO_FILE*, Func*, char const*)
void make_profile_output(FILE* fp, Func* f, const char* printfunc)
{
    fprintf(fp,
            "        if (!mexprofrecord_)\n"
            "            %s\"Profiler inactive\\n\");\n",
            printfunc);
    for (; f; f = f->next) {
        fprintf(fp, "        %s\"%%d calls to %s:%d",
                printfunc, f->fname.c_str(), f->line);
        for (Func* fsame = f->same_next; fsame; fsame = fsame->next)
            fprintf(fp, " (%s:%d)", fsame->fname.c_str(), fsame->line);
        fprintf(fp, "\\n\", mexprofrecord_[%d]);\n", f->id);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xb63c(%rip), %rsi      # 0x162bb
xorl %eax, %eax
callq 0x3270
testq %r14, %r14
je 0xacef
leaq 0xb68b(%rip), %r12      # 0x1631d
movq (%r14), %rcx
movl 0x20(%r14), %r8d
movq %r15, %rdi
leaq 0xb65c(%rip), %rsi      # 0x162ff
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3270
movq 0x60(%r14), %r13
testq %r13, %r13
je 0xacd1
movq (%r13), %rdx
movl 0x20(%r13), %ecx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3270
movq 0x58(%r13), %r13
jmp 0xacb1
movl 0x28(%r14), %edx
movq %r15, %rdi
leaq 0xb647(%rip), %rsi      # 0x16326
xorl %eax, %eax
callq 0x3270
movq 0x58(%r14), %r14
testq %r14, %r14
jne 0xac92
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: print_mex_else_cases(_IO_FILE*, Func*)
void print_mex_else_cases(FILE* fp, Func* f)
{
    for (Func* fcall = f; fcall; fcall = fcall->next)
        fprintf(fp,
                "    else if (strcmp(id, stubids%d_) == 0)\n"
                "        mexStub%d(nlhs,plhs, nrhs-1,prhs+1);\n",
                fcall->id, fcall->id);

    int maxid = max_routine_id(f);

    fprintf(fp,
            "    else if (strcmp(id, \"*profile on*\") == 0) {\n"
            "        if (!mexprofrecord_) {\n"
            "            mexprofrecord_ = (int*) malloc(%d * sizeof(int));\n"
            "            mexLock();\n"
            "        }\n"
            "        memset(mexprofrecord_, 0, %d * sizeof(int));\n"
            "    } else if (strcmp(id, \"*profile off*\") == 0) {\n"
            "        if (mexprofrecord_) {\n"
            "            free(mexprofrecord_);\n"
            "            mexUnlock();\n"
            "        }\n"
            "        mexprofrecord_ = NULL;\n"
            "    } else if (strcmp(id, \"*profile report*\") == 0) {\n",
            maxid+1, maxid+1);

    make_profile_output(fp, f, "mexPrintf(");

    fprintf(fp,
            "    } else if (strcmp(id, \"*profile log*\") == 0) {\n"
            "        FILE* logfp;\n"
            "        if (nrhs != 2 || mxGetString(prhs[1], id, sizeof(id)) != 0)\n"
            "            mexErrMsgTxt(\"Must have two string arguments\");\n"
            "        logfp = fopen(id, \"w+\");\n"
            "        if (!logfp)\n"
            "            mexErrMsgTxt(\"Cannot open log for output\");\n");

    make_profile_output(fp, f, "fprintf(logfp, ");

    fprintf(fp, "        fclose(logfp);\n");

    fprintf(fp,
            "    } else\n"
            "        mexErrMsgTxt(\"Unknown identifier\");\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0xad81
leaq 0xb5fb(%rip), %r15      # 0x16341
movq %r14, %r12
movl 0x28(%r12), %ecx
movq %rbx, %rdi
movq %r15, %rsi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3270
movq 0x58(%r12), %r12
testq %r12, %r12
jne 0xad49
xorl %ecx, %ecx
movq %r14, %rax
movl 0x28(%rax), %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movq 0x58(%rax), %rax
testq %rax, %rax
jne 0xad6c
incl %ecx
jmp 0xad86
movl $0x1, %ecx
leaq 0xb60c(%rip), %rsi      # 0x16399
movq %rbx, %rdi
movl %ecx, %edx
xorl %eax, %eax
callq 0x3270
leaq 0xb7c8(%rip), %rdx      # 0x16568
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac61
leaq 0xb7c1(%rip), %rdi      # 0x16573
movl $0x135, %esi            # imm = 0x135
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
leaq 0xb8de(%rip), %rdx      # 0x166a9
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac61
leaq 0xb8dc(%rip), %rdi      # 0x166b9
movl $0x17, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
leaq 0xb8db(%rip), %rdi      # 0x166d1
movl $0x37, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: print_mex_init(_IO_FILE*)
void print_mex_init(FILE* fp)
{

    fprintf(fp, "%s", mwrap_banner);
    fprintf(fp, "%s", mex_header);

    fprintf(fp, "\n");
    if (mw_use_gpu)
        mex_use_gpu(fp);
    if (mw_use_c99_complex)
        mex_c99_complex(fp);
    else if (mw_use_cpp_complex)
      {
        mex_cpp_complex(fp);
	if (mw_use_gpu)
	  mex_gpucpp_complex(fp);
      }

    //    fprintf(fp, "\n");
    //    fprintf(fp, "%s", mwrap_compat_type_support);
    //    fprintf(fp, "\n");
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x113cf(%rip), %rdi     # 0x1c1f0
movq %rbx, %rsi
callq 0x31d0
movq 0x113b8(%rip), %rdi     # 0x1c1e8
movq %rbx, %rsi
callq 0x31d0
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3230
leaq 0x113e4(%rip), %r14     # 0x1c230
cmpb $0x1, (%r14)
jne 0xae6b
leaq 0x8d48(%rip), %rdi      # 0x13ba1
movl $0x1d, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
leaq 0x113c1(%rip), %rax     # 0x1c233
cmpb $0x1, (%rax)
jne 0xae94
leaq 0x8eb8(%rip), %rdi      # 0x13d36
movl $0x14d, %esi            # imm = 0x14D
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %rbp
jmp 0x3370
leaq 0x11397(%rip), %rax     # 0x1c232
cmpb $0x1, (%rax)
jne 0xaecd
leaq 0x8d18(%rip), %rdi      # 0x13bbf
movl $0x15d, %esi            # imm = 0x15D
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3370
cmpb $0x1, (%r14)
jne 0xaecd
leaq 0x8e57(%rip), %rdi      # 0x13d1d
movl $0x18, %esi
jmp 0xae83
popq %rbx
popq %r14
popq %rbp
retq