text: /*
   * Sponsored License - for use in support of a program or activity
   * sponsored by MathWorks.  Not for government, commercial or other
   * non-sponsored organizational use.
   * File: _coder_ACC_PI_test_api.c
   *
   * MATLAB Coder version            : 4.1
   * C/C++ source code generated on  : 15-Oct-2019 17:29:12
   */
  
  /* Include Files */
  #include "tmwtypes.h"
  #include "_coder_ACC_PI_test_api.h"
  #include "_coder_ACC_PI_test_mex.h"
  
  /* Variable Definitions */
  emlrtCTX emlrtRootTLSGlobal = NULL;
  emlrtContext emlrtContextGlobal = { true,/* bFirstTime */
    false,                               /* bInitialized */
    131467U,                             /* fVersionInfo */
    NULL,                                /* fErrorFunction */
    "ACC_PI_test",                       /* fFunctionName */
    NULL,                                /* fRTCallStack */
    false,                               /* bDebugMode */
    { 2045744189U, 2170104910U, 2743257031U, 4284093946U },/* fSigWrd */
    NULL                                 /* fSigMem */
  };
  
  /* Function Declarations */
  static real32_T b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
    emlrtMsgIdentifier *parentId);
  static real_T c_emlrt_marshallIn(const emlrtStack *sp, const mxArray *vel_egox,
    const char_T *identifier);
  static real_T d_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
    emlrtMsgIdentifier *parentId);
  static real32_T e_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src,
    const emlrtMsgIdentifier *msgId);
  static real32_T emlrt_marshallIn(const emlrtStack *sp, const mxArray *rel_velx,
    const char_T *identifier);
  static const mxArray *emlrt_marshallOut(const real_T u);
  static real_T f_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const
    emlrtMsgIdentifier *msgId);
  
  /* Function Definitions */
  
  /*
   * Arguments    : const emlrtStack *sp
   *                const mxArray *u
   *                const emlrtMsgIdentifier *parentId
   * Return Type  : real32_T
   */
  static real32_T b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
    emlrtMsgIdentifier *parentId)
  {
    real32_T y;
    y = e_emlrt_marshallIn(sp, emlrtAlias(u), parentId);
    emlrtDestroyArray(&u);
    return y;
  }
  
  /*
   * Arguments    : const emlrtStack *sp
   *                const mxArray *vel_egox
   *                const char_T *identifier
   * Return Type  : real_T
   */
  static real_T c_emlrt_marshallIn(const emlrtStack *sp, const mxArray *vel_egox,
    const char_T *identifier)
  {
    real_T y;
    emlrtMsgIdentifier thisId;
    thisId.fIdentifier = (const char *)identifier;
    thisId.fParent = NULL;
    thisId.bParentIsCell = false;
    y = d_emlrt_marshallIn(sp, emlrtAlias(vel_egox), &thisId);
    emlrtDestroyArray(&vel_egox);
    return y;
  }
  
  /*
   * Arguments    : const emlrtStack *sp
   *                const mxArray *u
   *                const emlrtMsgIdentifier *parentId
   * Return Type  : real_T
   */
  static real_T d_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const
    emlrtMsgIdentifier *parentId)
  {
    real_T y;
    y = f_emlrt_marshallIn(sp, emlrtAlias(u), parentId);
    emlrtDestroyArray(&u);
    return y;
  }
  
  /*
   * Arguments    : const emlrtStack *sp
   *                const mxArray *src
   *                const emlrtMsgIdentifier *msgId
   * Return Type  : real32_T
   */
  static real32_T e_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src,
    const emlrtMsgIdentifier *msgId)
  {
    real32_T ret;
    static const int32_T dims = 0;
    emlrtCheckBuiltInR2012b(sp, (const emlrtMsgIdentifier *)msgId, src, "single",
      false, 0U, (int32_T *)&dims);
    ret = *(real32_T *)emlrtMxGetData(src);
    emlrtDestroyArray(&src);
    return ret;
  }
  
  /*
   * Arguments    : const emlrtStack *sp
   *                const mxArray *rel_velx
   *                const char_T *identifier
   * Return Type  : real32_T
   */
  static real32_T emlrt_marshallIn(const emlrtStack *sp, const mxArray *rel_velx,
    const char_T *identifier)
  {
    real32_T y;
    emlrtMsgIdentifier thisId;
    thisId.fIdentifier = (const char *)identifier;
    thisId.fParent = NULL;
    thisId.bParentIsCell = false;
    y = b_emlrt_marshallIn(sp, emlrtAlias(rel_velx), &thisId);
    emlrtDestroyArray(&rel_velx);
    return y;
  }
  
  /*
   * Arguments    : const real_T u
   * Return Type  : const mxArray *
   */
  static const mxArray *emlrt_marshallOut(const real_T u)
  {
    const mxArray *y;
    const mxArray *m0;
    y = NULL;
    m0 = emlrtCreateDoubleScalar(u);
    emlrtAssign(&y, m0);
    return y;
  }
  
  /*
   * Arguments    : const emlrtStack *sp
   *                const mxArray *src
   *                const emlrtMsgIdentifier *msgId
   * Return Type  : real_T
   */
  static real_T f_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const
    emlrtMsgIdentifier *msgId)
  {
    real_T ret;
    static const int32_T dims = 0;
    emlrtCheckBuiltInR2012b(sp, (const emlrtMsgIdentifier *)msgId, src, "double",
      false, 0U, (int32_T *)&dims);
    ret = *(real_T *)emlrtMxGetData(src);
    emlrtDestroyArray(&src);
    return ret;
  }
  
  /*
   * Arguments    : const mxArray * const prhs[6]
   *                int32_T nlhs
   *                const mxArray *plhs[1]
   * Return Type  : void
   */
  void ACC_PI_test_api(const mxArray * const prhs[6], int32_T nlhs, const mxArray *
                       plhs[1])
  {
    real32_T rel_velx;
    real32_T rel_vely;
    real32_T rel_posx;
    real32_T rel_posy;
    real_T vel_egox;
    real_T vel_egoy;
    emlrtStack st = { NULL,              /* site */
      NULL,                              /* tls */
      NULL                               /* prev */
    };
  
    (void)nlhs;
    st.tls = emlrtRootTLSGlobal;
  
    /* Marshall function inputs */
    rel_velx = emlrt_marshallIn(&st, emlrtAliasP(prhs[0]), "rel_velx");
    rel_vely = emlrt_marshallIn(&st, emlrtAliasP(prhs[1]), "rel_vely");
    rel_posx = emlrt_marshallIn(&st, emlrtAliasP(prhs[2]), "rel_posx");
    rel_posy = emlrt_marshallIn(&st, emlrtAliasP(prhs[3]), "rel_posy");
    vel_egox = c_emlrt_marshallIn(&st, emlrtAliasP(prhs[4]), "vel_egox");
    vel_egoy = c_emlrt_marshallIn(&st, emlrtAliasP(prhs[5]), "vel_egoy");
  
    /* Invoke the target function */
    vel_egox = ACC_PI_test(rel_velx, rel_vely, rel_posx, rel_posy, vel_egox,
      vel_egoy);
  
    /* Marshall function outputs */
    plhs[0] = emlrt_marshallOut(vel_egox);
  }
  
  /*
   * Arguments    : void
   * Return Type  : void
   */
  void ACC_PI_test_atexit(void)
  {
    emlrtStack st = { NULL,              /* site */
      NULL,                              /* tls */
      NULL                               /* prev */
    };
  
    mexFunctionCreateRootTLS();
    st.tls = emlrtRootTLSGlobal;
    emlrtEnterRtStackR2012b(&st);
    emlrtLeaveRtStackR2012b(&st);
    emlrtDestroyRootTLS(&emlrtRootTLSGlobal);
    ACC_PI_test_xil_terminate();
  }
  
  /*
   * Arguments    : void
   * Return Type  : void
   */
  void ACC_PI_test_initialize(void)
  {
    emlrtStack st = { NULL,              /* site */
      NULL,                              /* tls */
      NULL                               /* prev */
    };
  
    mexFunctionCreateRootTLS();
    st.tls = emlrtRootTLSGlobal;
    emlrtClearAllocCountR2012b(&st, false, 0U, 0);
    emlrtEnterRtStackR2012b(&st);
    emlrtFirstTimeR2012b(emlrtRootTLSGlobal);
  }
  
  /*
   * Arguments    : void
   * Return Type  : void
   */
  void ACC_PI_test_terminate(void)
  {
    emlrtStack st = { NULL,              /* site */
      NULL,                              /* tls */
      NULL                               /* prev */
    };
  
    st.tls = emlrtRootTLSGlobal;
    emlrtLeaveRtStackR2012b(&st);
    emlrtDestroyRootTLS(&emlrtRootTLSGlobal);
  }
  
  /*
   * File trailer for _coder_ACC_PI_test_api.c
   *
   * [EOF]
   */
  