text: /*
   * Automatically Generated from Mathematica.
   * Fri 5 Nov 2021 16:29:40 GMT-04:00
   */
  
  #ifdef MATLAB_MEX_FILE
  #include <stdexcept>
  #include <cmath>
  #include<math.h>
  /**
   * Copied from Wolfram Mathematica C Definitions file mdefs.hpp
   * Changed marcos to inline functions (Eric Cousineau)
   */
  inline double Power(double x, double y) { return pow(x, y); }
  inline double Sqrt(double x) { return sqrt(x); }
  
  inline double Abs(double x) { return fabs(x); }
  
  inline double Exp(double x) { return exp(x); }
  inline double Log(double x) { return log(x); }
  
  inline double Sin(double x) { return sin(x); }
  inline double Cos(double x) { return cos(x); }
  inline double Tan(double x) { return tan(x); }
  
  inline double ArcSin(double x) { return asin(x); }
  inline double ArcCos(double x) { return acos(x); }
  inline double ArcTan(double x) { return atan(x); }
  
  /* update ArcTan function to use atan2 instead. */
  inline double ArcTan(double x, double y) { return atan2(y,x); }
  
  inline double Sinh(double x) { return sinh(x); }
  inline double Cosh(double x) { return cosh(x); }
  inline double Tanh(double x) { return tanh(x); }
  
  const double E	= 2.71828182845904523536029;
  const double Pi = 3.14159265358979323846264;
  const double Degree = 0.01745329251994329576924;
  
  inline double Sec(double x) { return 1/cos(x); }
  inline double Csc(double x) { return 1/sin(x); }
  
  #endif
  
  /*
   * Sub functions
   */
  static void output1(double *p_output1,const double *var1,const double *var2)
  {
    double t1605;
    double t745;
    double t746;
    double t986;
    double t1251;
    double t1775;
    double t1820;
    double t1842;
    double t2166;
    double t1511;
    double t1870;
    double t1928;
    double t559;
    double t2213;
    double t2254;
    double t2332;
    double t2678;
    double t2035;
    double t2333;
    double t2338;
    double t536;
    double t2679;
    double t2689;
    double t2706;
    double t2859;
    double t2677;
    double t2737;
    double t2829;
    double t532;
    double t2877;
    double t2884;
    double t2912;
    double t2960;
    double t2842;
    double t2913;
    double t2930;
    double t524;
    double t2964;
    double t2970;
    double t2973;
    double t3038;
    double t2951;
    double t3001;
    double t3010;
    double t493;
    double t3053;
    double t3055;
    double t3057;
    double t3137;
    double t3011;
    double t3077;
    double t3092;
    double t456;
    double t3153;
    double t3180;
    double t3181;
    double t3122;
    double t3195;
    double t3221;
    double t3249;
    double t3278;
    double t3311;
    double t3332;
    double t3355;
    t1605 = Cos(var1[30]);
    t745 = Cos(var1[31]);
    t746 = 0.5*t745;
    t986 = 0. + t746;
    t1251 = Sin(var1[30]);
    t1775 = Sin(var1[31]);
    t1820 = -0.5*t1775;
    t1842 = 0. + t1820;
    t2166 = Cos(var1[26]);
    t1511 = -1.*t986*t1251;
    t1870 = t1605*t1842;
    t1928 = 0. + t1511 + t1870;
    t559 = Sin(var1[26]);
    t2213 = t1605*t986;
    t2254 = t1251*t1842;
    t2332 = 0. + t2213 + t2254;
    t2678 = Cos(var1[25]);
    t2035 = t559*t1928;
    t2333 = t2166*t2332;
    t2338 = 0. + t2035 + t2333;
    t536 = Sin(var1[25]);
    t2679 = t2166*t1928;
    t2689 = -1.*t559*t2332;
    t2706 = 0. + t2679 + t2689;
    t2859 = Cos(var1[24]);
    t2677 = -1.*t536*t2338;
    t2737 = t2678*t2706;
    t2829 = 0. + t2677 + t2737;
    t532 = Sin(var1[24]);
    t2877 = t2678*t2338;
    t2884 = t536*t2706;
    t2912 = 0. + t2877 + t2884;
    t2960 = Cos(var1[23]);
    t2842 = t532*t2829;
    t2913 = t2859*t2912;
    t2930 = 0. + t2842 + t2913;
    t524 = Sin(var1[23]);
    t2964 = t2859*t2829;
    t2970 = -1.*t532*t2912;
    t2973 = 0. + t2964 + t2970;
    t3038 = Cos(var1[22]);
    t2951 = t524*t2930;
    t3001 = t2960*t2973;
    t3010 = 0. + t2951 + t3001;
    t493 = Sin(var1[22]);
    t3053 = t2960*t2930;
    t3055 = -1.*t524*t2973;
    t3057 = 0. + t3053 + t3055;
    t3137 = Cos(var1[21]);
    t3011 = t493*t3010;
    t3077 = t3038*t3057;
    t3092 = 0. + t3011 + t3077;
    t456 = Sin(var1[21]);
    t3153 = t3038*t3010;
    t3180 = -1.*t493*t3057;
    t3181 = 0. + t3153 + t3180;
    t3122 = -1.*t456*t3092;
    t3195 = t3137*t3181;
    t3221 = 0. + t3122 + t3195;
    t3249 = Cos(var1[5]);
    t3278 = t3137*t3092;
    t3311 = t456*t3181;
    t3332 = 0. + t3278 + t3311;
    t3355 = Sin(var1[5]);
    p_output1[0]=(0. + t3249*t3332 - 0.866025*t3355)*var2[4] + t3221*var2[5] + 0.866025*var2[21] + 0.866025*var2[22] - 0.866025*var2[23] + 0.866025*var2[24] + 0.866025*var2[25] + 0.866025*var2[26] + 0.866025*var2[30] + 0.866025*var2[31] + var2[3]*(0. + (0. + 0.866025*t3249 + t3332*t3355)*Cos(var1[4]) - 1.*t3221*Sin(var1[4]));
  }
  
  
  
  #ifdef MATLAB_MEX_FILE
  
  #include "mex.h"
  /*
   * Main function
   */
  void mexFunction( int nlhs, mxArray *plhs[],
                    int nrhs, const mxArray *prhs[] )
  {
    size_t mrows, ncols;
  
    double *var1,*var2;
    double *p_output1;
  
    /*  Check for proper number of arguments.  */ 
    if( nrhs != 2)
      {
        mexErrMsgIdAndTxt("MATLAB:MShaped:invalidNumInputs", "Two input(s) required (var1,var2).");
      }
    else if( nlhs > 1)
      {
        mexErrMsgIdAndTxt("MATLAB:MShaped:maxlhs", "Too many output arguments.");
      }
  
    /*  The input must be a noncomplex double vector or scaler.  */
    mrows = mxGetM(prhs[0]);
    ncols = mxGetN(prhs[0]);
    if( !mxIsDouble(prhs[0]) || mxIsComplex(prhs[0]) ||
      ( !(mrows == 36 && ncols == 1) && 
        !(mrows == 1 && ncols == 36))) 
      {
        mexErrMsgIdAndTxt( "MATLAB:MShaped:inputNotRealVector", "var1 is wrong.");
      }
    mrows = mxGetM(prhs[1]);
    ncols = mxGetN(prhs[1]);
    if( !mxIsDouble(prhs[1]) || mxIsComplex(prhs[1]) ||
      ( !(mrows == 36 && ncols == 1) && 
        !(mrows == 1 && ncols == 36))) 
      {
        mexErrMsgIdAndTxt( "MATLAB:MShaped:inputNotRealVector", "var2 is wrong.");
      }
  
    /*  Assign pointers to each input.  */
    var1 = mxGetPr(prhs[0]);
    var2 = mxGetPr(prhs[1]);
     
  
  
     
    /*  Create matrices for return arguments.  */
    plhs[0] = mxCreateDoubleMatrix((mwSize) 1, (mwSize) 1, mxREAL);
    p_output1 = mxGetPr(plhs[0]);
  
  
    /* Call the calculation subroutine. */
    output1(p_output1,var1,var2);
  
  
  }
  
  #else // MATLAB_MEX_FILE
  
  #include "swing_toe_angular_velocity_x_LeftStance.hh"
  
  namespace LeftStance
  {
  
  void swing_toe_angular_velocity_x_LeftStance_raw(double *p_output1, const double *var1,const double *var2)
  {
    // Call Subroutines
    output1(p_output1, var1, var2);
  
  }
  
  }
  
  #endif // MATLAB_MEX_FILE
  