// File: /workspace/github_cpp_makefile_star2_O3/zgimbutas[P]mwrap/src/mwrap-cgen.cc
// Function: mex_unpack_inputs(_IO_FILE*, Var*)
void mex_unpack_inputs(FILE* fp, Var* v)
{
    if (!v)
        return;
    if (v->iospec == 'o') {
        mex_unpack_inputs(fp, v->next);
        return;
    }

    if (is_obj(v->tinfo))
        mex_cast_get_p(fp, v->basetype, v->input_label);
    else if (is_array(v->tinfo))
        mex_unpack_input_array(fp, v);
    else if (v->tinfo == VT_scalar ||
             v->tinfo == VT_r_scalar ||
             v->tinfo == VT_p_scalar)
      {
	if ( strcmp(v->basetype,"float") == 0 )
        fprintf(fp,
                "    if( mxGetClassID(prhs[%d]) != mxSINGLE_CLASS )\n"
		"        mw_err_txt_ = \"Invalid scalar argument, mxSINGLE_CLASS expected\";\n"
		"    if (mw_err_txt_) goto mw_err_label;\n"
                "    in%d_ = (%s) mxWrapGetScalar_single(prhs[%d], &mw_err_txt_);\n"
                "    if (mw_err_txt_)\n"
                "        goto mw_err_label;\n\n",
                v->input_label, v->input_label, v->basetype, v->input_label);
	else if ( strcmp(v->basetype,"char") == 0 )
        fprintf(fp,
                "    if( mxGetClassID(prhs[%d]) != mxCHAR_CLASS )\n"
		"        mw_err_txt_ = \"Invalid scalar argument, mxCHAR_CLASS expected\";\n"
		"    if (mw_err_txt_) goto mw_err_label;\n"
                "    in%d_ = (%s) mxWrapGetScalar_char(prhs[%d], &mw_err_txt_);\n"
                "    if (mw_err_txt_)\n"
                "        goto mw_err_label;\n",
                v->input_label, v->input_label, v->basetype, v->input_label);
	else
        fprintf(fp,
                "    if( mxGetClassID(prhs[%d]) != mxDOUBLE_CLASS )\n"
		"        mw_err_txt_ = \"Invalid scalar argument, mxDOUBLE_CLASS expected\";\n"
		"    if (mw_err_txt_) goto mw_err_label;\n"
                "    in%d_ = (%s) mxWrapGetScalar(prhs[%d], &mw_err_txt_);\n"
                "    if (mw_err_txt_)\n"
                "        goto mw_err_label;\n\n",
                v->input_label, v->input_label, v->basetype, v->input_label);
      }
    else if (v->tinfo == VT_cscalar   || v->tinfo == VT_zscalar   ||
             v->tinfo == VT_r_cscalar || v->tinfo == VT_r_zscalar ||
             v->tinfo == VT_p_cscalar || v->tinfo == VT_p_zscalar)
      {
	if ( strcmp(v->basetype,"fcomplex") == 0 )
	  {
	    fprintf(fp,
		    "    if( mxGetClassID(prhs[%d]) != mxSINGLE_CLASS )\n"
		    "        mw_err_txt_ = \"Invalid scalar argument, mxSINGLE_CLASS expected\";\n"
		    "    if (mw_err_txt_) goto mw_err_label;\n",
		    v->input_label);
	    fprintf(fp,
		    "    mxWrapGetScalar_single_%s(&in%d_, prhs[%d]);\n\n",
		    v->basetype, v->input_label, v->input_label);
	  }
	else
	  {
	    fprintf(fp,
		    "    if( mxGetClassID(prhs[%d]) != mxDOUBLE_CLASS )\n"
		    "        mw_err_txt_ = \"Invalid scalar argument, mxDOUBLE_CLASS expected\";\n"
		    "    if (mw_err_txt_) goto mw_err_label;\n",
		    v->input_label);
	    fprintf(fp,
		    "    mxWrapGetScalar_%s(&in%d_, prhs[%d]);\n\n",
		    v->basetype, v->input_label, v->input_label);
	  }
      }
    else if (v->tinfo == VT_string)
        mex_unpack_input_string(fp, v);
    else if (v->tinfo == VT_mx)
        fprintf(fp, "    in%d_ = prhs[%d];\n\n",
                v->input_label, v->input_label);

    mex_unpack_inputs(fp, v->next);
}

// Assembly:
testq %rsi, %rsi
je 0x99eb
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x46fe(%rip), %r15      # 0xdfa4
leaq 0x3b89(%rip), %r12      # 0xd436
cmpb $0x6f, 0x8(%rbx)
je 0x99d0
movl 0x20(%rbx), %eax
decl %eax
cmpl $0x11, %eax
ja 0x99d0
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x3260
movl (%rbx), %edx
movq %r14, %rdi
testl %eax, %eax
je 0x995e
leaq 0xbce4(%rip), %rsi      # 0x155ce
xorl %eax, %eax
callq 0x3270
movq 0x10(%rbx), %rdx
movl (%rbx), %ecx
movq %r14, %rdi
leaq 0xbd73(%rip), %rsi      # 0x15674
jmp 0x997c
movq 0x10(%rbx), %rsi
movl (%rbx), %edx
movq %r14, %rdi
callq 0x8ea0
jmp 0x99d0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9638
jmp 0x99d0
movq 0x10(%rbx), %r13
movq %r13, %rdi
leaq 0x417b(%rip), %rsi      # 0xdaaf
callq 0x3260
testl %eax, %eax
je 0x9988
movq %r13, %rdi
leaq 0x4181(%rip), %rsi      # 0xdac8
callq 0x3260
movl (%rbx), %ecx
movq %r14, %rdi
testl %eax, %eax
je 0x99ba
leaq 0xba88(%rip), %rsi      # 0x153e4
jmp 0x99c1
leaq 0xbb90(%rip), %rsi      # 0x154f5
xorl %eax, %eax
callq 0x3270
movq 0x10(%rbx), %rdx
movl (%rbx), %ecx
movq %r14, %rdi
leaq 0xbc1f(%rip), %rsi      # 0x1559b
movl %ecx, %r8d
xorl %eax, %eax
callq 0x3270
jmp 0x99d0
movl (%rbx), %ecx
movq %r14, %rdi
leaq 0xb827(%rip), %rsi      # 0x151bb
jmp 0x99c1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x97bc
jmp 0x99d0
movl (%rbx), %ecx
movq %r14, %rdi
leaq 0xbcf1(%rip), %rsi      # 0x156a0
movl %ecx, %edx
xorl %eax, %eax
callq 0x3270
jmp 0x99d0
leaq 0xb912(%rip), %rsi      # 0x152d3
movl %ecx, %edx
movq %r13, %r8
movl %ecx, %r9d
xorl %eax, %eax
callq 0x3270
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x98ad
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq