/*
  This file was generated automatically with scripts/maple2c.py.
  Do not edit this file directly as it can be overwritten!!

  This Source Code Form is subject to the terms of the Mozilla Public
  License, v. 2.0. If a copy of the MPL was not distributed with this
  file, You can obtain one at http://mozilla.org/MPL/2.0/.

  Maple version     : Maple 2022 (X86 64 LINUX)
  Maple source      : ./maple/mgga_exc/mgga_k_gea4.mpl
  Type of functional: mgga_exc
*/

#define maple2c_order 4
#define MAPLE2C_FLAGS (XC_FLAGS_I_HAVE_EXC | XC_FLAGS_I_HAVE_VXC | XC_FLAGS_I_HAVE_FXC | XC_FLAGS_I_HAVE_KXC | XC_FLAGS_I_HAVE_LXC)


#ifndef XC_DONT_COMPILE_EXC
GPU_DEVICE_FUNCTION static inline void
func_exc_unpol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t3, t4, t5, t6, t8, t9, t10, t12;
  double t13, t15, t16, t18, t19, t21, t22, t23;
  double t24, t25, t26, t27, t28, t30, t31, t32;
  double t33, t34, t36, t40, t42, t46, t48, t49;
  double t50, t51, t52, t54, t58, t59, t61, t63;
  double t66, t67, t68, t70, t74, t78, tzk0;


  t3 = rho[0] / 0.2e1 <= p->dens_threshold;
  t4 = M_CBRT3;
  t5 = t4 * t4;
  t6 = M_CBRTPI;
  t8 = t5 * t6 * M_PI;
  t9 = 0.1e1 <= p->zeta_threshold;
  t10 = p->zeta_threshold - 0.1e1;
  t12 = my_piecewise5(t9, t10, t9, -t10, 0);
  t13 = 0.1e1 + t12;
  t15 = POW_1_3(p->zeta_threshold);
  t16 = t15 * t15;
  t18 = POW_1_3(t13);
  t19 = t18 * t18;
  t21 = my_piecewise3(t13 <= p->zeta_threshold, t16 * p->zeta_threshold, t19 * t13);
  t22 = POW_1_3(rho[0]);
  t23 = t22 * t22;
  t24 = t21 * t23;
  t25 = M_CBRT6;
  t26 = M_PI * M_PI;
  t27 = POW_1_3(t26);
  t28 = t27 * t27;
  t30 = t25 / t28;
  t31 = M_CBRT2;
  t32 = t31 * t31;
  t33 = sigma[0] * t32;
  t34 = rho[0] * rho[0];
  t36 = 0.1e1 / t23 / t34;
  t40 = lapl[0] * t32;
  t42 = 0.1e1 / t23 / rho[0];
  t46 = t25 * t25;
  t48 = 0.1e1 / t27 / t26;
  t49 = t46 * t48;
  t50 = lapl[0] * lapl[0];
  t51 = t50 * t31;
  t52 = t34 * rho[0];
  t54 = 0.1e1 / t22 / t52;
  t58 = t49 * sigma[0];
  t59 = t34 * t34;
  t61 = 0.1e1 / t22 / t59;
  t63 = t31 * t61 * lapl[0];
  t66 = sigma[0] * sigma[0];
  t67 = t66 * t31;
  t68 = t59 * rho[0];
  t70 = 0.1e1 / t22 / t68;
  t74 = 0.1e1 + 0.5e1 / 0.648e3 * t30 * t33 * t36 + 0.5e1 / 0.54e2 * t30 * t40 * t42 + t49 * t51 * t54 / 0.2916e4 - t58 * t63 / 0.2592e4 + t49 * t67 * t70 / 0.8748e4;
  t78 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t74);
  tzk0 = 0.2e1 * t78;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

}

#endif


#ifndef XC_DONT_COMPILE_VXC
GPU_DEVICE_FUNCTION static inline void
func_vxc_unpol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t3, t4, t5, t6, t8, t9, t10, t12;
  double t13, t15, t16, t18, t19, t21, t22, t23;
  double t24, t25, t26, t27, t28, t30, t31, t32;
  double t33, t34, t36, t40, t42, t46, t48, t49;
  double t50, t51, t52, t54, t58, t59, t61, t63;
  double t66, t67, t68, t70, t74, t78, tzk0;

  double t80, t85, t96, t99, t101, t105, t110, tvrho0;
  double t114, t116, t118, t120, t122, t126, tvsigma0, t138;
  double t142, tvlapl0, tvtau0;


  t3 = rho[0] / 0.2e1 <= p->dens_threshold;
  t4 = M_CBRT3;
  t5 = t4 * t4;
  t6 = M_CBRTPI;
  t8 = t5 * t6 * M_PI;
  t9 = 0.1e1 <= p->zeta_threshold;
  t10 = p->zeta_threshold - 0.1e1;
  t12 = my_piecewise5(t9, t10, t9, -t10, 0);
  t13 = 0.1e1 + t12;
  t15 = POW_1_3(p->zeta_threshold);
  t16 = t15 * t15;
  t18 = POW_1_3(t13);
  t19 = t18 * t18;
  t21 = my_piecewise3(t13 <= p->zeta_threshold, t16 * p->zeta_threshold, t19 * t13);
  t22 = POW_1_3(rho[0]);
  t23 = t22 * t22;
  t24 = t21 * t23;
  t25 = M_CBRT6;
  t26 = M_PI * M_PI;
  t27 = POW_1_3(t26);
  t28 = t27 * t27;
  t30 = t25 / t28;
  t31 = M_CBRT2;
  t32 = t31 * t31;
  t33 = sigma[0] * t32;
  t34 = rho[0] * rho[0];
  t36 = 0.1e1 / t23 / t34;
  t40 = lapl[0] * t32;
  t42 = 0.1e1 / t23 / rho[0];
  t46 = t25 * t25;
  t48 = 0.1e1 / t27 / t26;
  t49 = t46 * t48;
  t50 = lapl[0] * lapl[0];
  t51 = t50 * t31;
  t52 = t34 * rho[0];
  t54 = 0.1e1 / t22 / t52;
  t58 = t49 * sigma[0];
  t59 = t34 * t34;
  t61 = 0.1e1 / t22 / t59;
  t63 = t31 * t61 * lapl[0];
  t66 = sigma[0] * sigma[0];
  t67 = t66 * t31;
  t68 = t59 * rho[0];
  t70 = 0.1e1 / t22 / t68;
  t74 = 0.1e1 + 0.5e1 / 0.648e3 * t30 * t33 * t36 + 0.5e1 / 0.54e2 * t30 * t40 * t42 + t49 * t51 * t54 / 0.2916e4 - t58 * t63 / 0.2592e4 + t49 * t67 * t70 / 0.8748e4;
  t78 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t74);
  tzk0 = 0.2e1 * t78;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

  t80 = t21 / t22;
  t85 = 0.1e1 / t23 / t52;
  t96 = t31 * t70 * lapl[0];
  t99 = t59 * t34;
  t101 = 0.1e1 / t22 / t99;
  t105 = -0.5e1 / 0.243e3 * t30 * t33 * t85 - 0.25e2 / 0.162e3 * t30 * t40 * t36 - 0.5e1 / 0.4374e4 * t49 * t51 * t61 + 0.13e2 / 0.7776e4 * t58 * t96 - 0.4e1 / 0.6561e4 * t49 * t67 * t101;
  t110 = my_piecewise3(t3, 0, t8 * t80 * t74 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t105);
  tvrho0 = 0.2e1 * rho[0] * t110 + 0.2e1 * t78;

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 0] += tvrho0;

  t114 = t30 * t32 * t36;
  t116 = t49 * t63;
  t118 = sigma[0] * t31;
  t120 = t49 * t118 * t70;
  t122 = 0.5e1 / 0.648e3 * t114 - t116 / 0.2592e4 + t120 / 0.4374e4;
  t126 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t122);
  tvsigma0 = 0.2e1 * rho[0] * t126;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 0] += tvsigma0;

  t138 = 0.5e1 / 0.54e2 * t30 * t32 * t42 + t49 * lapl[0] * t31 * t54 / 0.1458e4 - t49 * t118 * t61 / 0.2592e4;
  t142 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t138);
  tvlapl0 = 0.2e1 * rho[0] * t142;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 0] += tvlapl0;

  tvtau0 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 0] += tvtau0;

}

#endif


#ifndef XC_DONT_COMPILE_FXC
GPU_DEVICE_FUNCTION static inline void
func_fxc_unpol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t3, t4, t5, t6, t8, t9, t10, t12;
  double t13, t15, t16, t18, t19, t21, t22, t23;
  double t24, t25, t26, t27, t28, t30, t31, t32;
  double t33, t34, t36, t40, t42, t46, t48, t49;
  double t50, t51, t52, t54, t58, t59, t61, t63;
  double t66, t67, t68, t70, t74, t78, tzk0;

  double t80, t85, t96, t99, t101, t105, t110, tvrho0;
  double t114, t116, t118, t120, t122, t126, tvsigma0, t138;
  double t142, tvlapl0, tvtau0;

  double t147, t155, t166, t171, t175, t180, tv2rho20, t187;
  double t189, t192, t194, t199, tv2rhosigma0, t208, t213, tv2rholapl0;
  double tv2rhotau0, t216, t218, t220, t222, tv2sigma20, t226, t228;
  double tv2sigmalapl0, tv2sigmatau0, t234, tv2lapl20, tv2lapltau0, tv2tau20;


  t3 = rho[0] / 0.2e1 <= p->dens_threshold;
  t4 = M_CBRT3;
  t5 = t4 * t4;
  t6 = M_CBRTPI;
  t8 = t5 * t6 * M_PI;
  t9 = 0.1e1 <= p->zeta_threshold;
  t10 = p->zeta_threshold - 0.1e1;
  t12 = my_piecewise5(t9, t10, t9, -t10, 0);
  t13 = 0.1e1 + t12;
  t15 = POW_1_3(p->zeta_threshold);
  t16 = t15 * t15;
  t18 = POW_1_3(t13);
  t19 = t18 * t18;
  t21 = my_piecewise3(t13 <= p->zeta_threshold, t16 * p->zeta_threshold, t19 * t13);
  t22 = POW_1_3(rho[0]);
  t23 = t22 * t22;
  t24 = t21 * t23;
  t25 = M_CBRT6;
  t26 = M_PI * M_PI;
  t27 = POW_1_3(t26);
  t28 = t27 * t27;
  t30 = t25 / t28;
  t31 = M_CBRT2;
  t32 = t31 * t31;
  t33 = sigma[0] * t32;
  t34 = rho[0] * rho[0];
  t36 = 0.1e1 / t23 / t34;
  t40 = lapl[0] * t32;
  t42 = 0.1e1 / t23 / rho[0];
  t46 = t25 * t25;
  t48 = 0.1e1 / t27 / t26;
  t49 = t46 * t48;
  t50 = lapl[0] * lapl[0];
  t51 = t50 * t31;
  t52 = t34 * rho[0];
  t54 = 0.1e1 / t22 / t52;
  t58 = t49 * sigma[0];
  t59 = t34 * t34;
  t61 = 0.1e1 / t22 / t59;
  t63 = t31 * t61 * lapl[0];
  t66 = sigma[0] * sigma[0];
  t67 = t66 * t31;
  t68 = t59 * rho[0];
  t70 = 0.1e1 / t22 / t68;
  t74 = 0.1e1 + 0.5e1 / 0.648e3 * t30 * t33 * t36 + 0.5e1 / 0.54e2 * t30 * t40 * t42 + t49 * t51 * t54 / 0.2916e4 - t58 * t63 / 0.2592e4 + t49 * t67 * t70 / 0.8748e4;
  t78 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t74);
  tzk0 = 0.2e1 * t78;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

  t80 = t21 / t22;
  t85 = 0.1e1 / t23 / t52;
  t96 = t31 * t70 * lapl[0];
  t99 = t59 * t34;
  t101 = 0.1e1 / t22 / t99;
  t105 = -0.5e1 / 0.243e3 * t30 * t33 * t85 - 0.25e2 / 0.162e3 * t30 * t40 * t36 - 0.5e1 / 0.4374e4 * t49 * t51 * t61 + 0.13e2 / 0.7776e4 * t58 * t96 - 0.4e1 / 0.6561e4 * t49 * t67 * t101;
  t110 = my_piecewise3(t3, 0, t8 * t80 * t74 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t105);
  tvrho0 = 0.2e1 * rho[0] * t110 + 0.2e1 * t78;

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 0] += tvrho0;

  t114 = t30 * t32 * t36;
  t116 = t49 * t63;
  t118 = sigma[0] * t31;
  t120 = t49 * t118 * t70;
  t122 = 0.5e1 / 0.648e3 * t114 - t116 / 0.2592e4 + t120 / 0.4374e4;
  t126 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t122);
  tvsigma0 = 0.2e1 * rho[0] * t126;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 0] += tvsigma0;

  t138 = 0.5e1 / 0.54e2 * t30 * t32 * t42 + t49 * lapl[0] * t31 * t54 / 0.1458e4 - t49 * t118 * t61 / 0.2592e4;
  t142 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t138);
  tvlapl0 = 0.2e1 * rho[0] * t142;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 0] += tvlapl0;

  tvtau0 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 0] += tvtau0;

  t147 = t21 / t22 / rho[0];
  t155 = 0.1e1 / t23 / t59;
  t166 = t31 * t101 * lapl[0];
  t171 = 0.1e1 / t22 / t59 / t52;
  t175 = 0.55e2 / 0.729e3 * t30 * t33 * t155 + 0.1e3 / 0.243e3 * t30 * t40 * t85 + 0.65e2 / 0.13122e5 * t49 * t51 * t70 - 0.13e2 / 0.1458e4 * t58 * t166 + 0.76e2 / 0.19683e5 * t49 * t67 * t171;
  t180 = my_piecewise3(t3, 0, -t8 * t147 * t74 / 0.3e2 + t8 * t80 * t105 / 0.5e1 + 0.3e1 / 0.2e2 * t8 * t24 * t175);
  tv2rho20 = 0.2e1 * rho[0] * t180 + 0.4e1 * t110;

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 0] += tv2rho20;

  t187 = t30 * t32 * t85;
  t189 = t49 * t96;
  t192 = t49 * t118 * t101;
  t194 = -0.5e1 / 0.243e3 * t187 + 0.13e2 / 0.7776e4 * t189 - 0.8e1 / 0.6561e4 * t192;
  t199 = my_piecewise3(t3, 0, t8 * t80 * t122 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t194);
  tv2rhosigma0 = 0.2e1 * rho[0] * t199 + 0.2e1 * t126;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 0] += tv2rhosigma0;

  t208 = -0.25e2 / 0.162e3 * t114 - 0.5e1 / 0.2187e4 * t116 + 0.13e2 / 0.7776e4 * t120;
  t213 = my_piecewise3(t3, 0, t8 * t80 * t138 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t208);
  tv2rholapl0 = 0.2e1 * rho[0] * t213 + 0.2e1 * t142;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 0] += tv2rholapl0;

  tv2rhotau0 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 0] += tv2rhotau0;

  t216 = t8 * t21;
  t218 = t48 * t31;
  t220 = t216 * t155 * t46 * t218;
  t222 = my_piecewise3(t3, 0, t220 / 0.2916e5);
  tv2sigma20 = 0.2e1 * rho[0] * t222;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 0] += tv2sigma20;

  t226 = t216 * t85 * t46 * t218;
  t228 = my_piecewise3(t3, 0, -t226 / 0.1728e5);
  tv2sigmalapl0 = 0.2e1 * rho[0] * t228;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 0] += tv2sigmalapl0;

  tv2sigmatau0 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 0] += tv2sigmatau0;

  t234 = my_piecewise3(t3, 0, t216 * t36 * t46 * t218 / 0.972e4);
  tv2lapl20 = 0.2e1 * rho[0] * t234;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 0] += tv2lapl20;

  tv2lapltau0 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 0] += tv2lapltau0;

  tv2tau20 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 0] += tv2tau20;

}

#endif


#ifndef XC_DONT_COMPILE_KXC
GPU_DEVICE_FUNCTION static inline void
func_kxc_unpol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t3, t4, t5, t6, t8, t9, t10, t12;
  double t13, t15, t16, t18, t19, t21, t22, t23;
  double t24, t25, t26, t27, t28, t30, t31, t32;
  double t33, t34, t36, t40, t42, t46, t48, t49;
  double t50, t51, t52, t54, t58, t59, t61, t63;
  double t66, t67, t68, t70, t74, t78, tzk0;

  double t80, t85, t96, t99, t101, t105, t110, tvrho0;
  double t114, t116, t118, t120, t122, t126, tvsigma0, t138;
  double t142, tvlapl0, tvtau0;

  double t147, t155, t166, t171, t175, t180, tv2rho20, t187;
  double t189, t192, t194, t199, tv2rhosigma0, t208, t213, tv2rholapl0;
  double tv2rhotau0, t216, t218, t220, t222, tv2sigma20, t226, t228;
  double tv2sigmalapl0, tv2sigmatau0, t234, tv2lapl20, tv2lapltau0, tv2tau20;

  double t239, t250, t261, t264, t266, t270, t275, tv3rho30;
  double t286, t288, t291, t293, t298, tv3rho2sigma0, t311, t316;
  double tv3rho2lapl0, tv3rho2tau0, t321, t323, tv3rhosigma20, t327, tv3rhosigmalapl0, tv3rhosigmatau0;
  double t331, tv3rholapl20, tv3rholapltau0, tv3rhotau20, tv3sigma30, tv3sigma2lapl0, tv3sigma2tau0, tv3sigmalapl20;
  double tv3sigmalapltau0, tv3sigmatau20, tv3lapl30, tv3lapl2tau0, tv3lapltau20, tv3tau30;


  t3 = rho[0] / 0.2e1 <= p->dens_threshold;
  t4 = M_CBRT3;
  t5 = t4 * t4;
  t6 = M_CBRTPI;
  t8 = t5 * t6 * M_PI;
  t9 = 0.1e1 <= p->zeta_threshold;
  t10 = p->zeta_threshold - 0.1e1;
  t12 = my_piecewise5(t9, t10, t9, -t10, 0);
  t13 = 0.1e1 + t12;
  t15 = POW_1_3(p->zeta_threshold);
  t16 = t15 * t15;
  t18 = POW_1_3(t13);
  t19 = t18 * t18;
  t21 = my_piecewise3(t13 <= p->zeta_threshold, t16 * p->zeta_threshold, t19 * t13);
  t22 = POW_1_3(rho[0]);
  t23 = t22 * t22;
  t24 = t21 * t23;
  t25 = M_CBRT6;
  t26 = M_PI * M_PI;
  t27 = POW_1_3(t26);
  t28 = t27 * t27;
  t30 = t25 / t28;
  t31 = M_CBRT2;
  t32 = t31 * t31;
  t33 = sigma[0] * t32;
  t34 = rho[0] * rho[0];
  t36 = 0.1e1 / t23 / t34;
  t40 = lapl[0] * t32;
  t42 = 0.1e1 / t23 / rho[0];
  t46 = t25 * t25;
  t48 = 0.1e1 / t27 / t26;
  t49 = t46 * t48;
  t50 = lapl[0] * lapl[0];
  t51 = t50 * t31;
  t52 = t34 * rho[0];
  t54 = 0.1e1 / t22 / t52;
  t58 = t49 * sigma[0];
  t59 = t34 * t34;
  t61 = 0.1e1 / t22 / t59;
  t63 = t31 * t61 * lapl[0];
  t66 = sigma[0] * sigma[0];
  t67 = t66 * t31;
  t68 = t59 * rho[0];
  t70 = 0.1e1 / t22 / t68;
  t74 = 0.1e1 + 0.5e1 / 0.648e3 * t30 * t33 * t36 + 0.5e1 / 0.54e2 * t30 * t40 * t42 + t49 * t51 * t54 / 0.2916e4 - t58 * t63 / 0.2592e4 + t49 * t67 * t70 / 0.8748e4;
  t78 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t74);
  tzk0 = 0.2e1 * t78;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

  t80 = t21 / t22;
  t85 = 0.1e1 / t23 / t52;
  t96 = t31 * t70 * lapl[0];
  t99 = t59 * t34;
  t101 = 0.1e1 / t22 / t99;
  t105 = -0.5e1 / 0.243e3 * t30 * t33 * t85 - 0.25e2 / 0.162e3 * t30 * t40 * t36 - 0.5e1 / 0.4374e4 * t49 * t51 * t61 + 0.13e2 / 0.7776e4 * t58 * t96 - 0.4e1 / 0.6561e4 * t49 * t67 * t101;
  t110 = my_piecewise3(t3, 0, t8 * t80 * t74 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t105);
  tvrho0 = 0.2e1 * rho[0] * t110 + 0.2e1 * t78;

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 0] += tvrho0;

  t114 = t30 * t32 * t36;
  t116 = t49 * t63;
  t118 = sigma[0] * t31;
  t120 = t49 * t118 * t70;
  t122 = 0.5e1 / 0.648e3 * t114 - t116 / 0.2592e4 + t120 / 0.4374e4;
  t126 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t122);
  tvsigma0 = 0.2e1 * rho[0] * t126;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 0] += tvsigma0;

  t138 = 0.5e1 / 0.54e2 * t30 * t32 * t42 + t49 * lapl[0] * t31 * t54 / 0.1458e4 - t49 * t118 * t61 / 0.2592e4;
  t142 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t138);
  tvlapl0 = 0.2e1 * rho[0] * t142;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 0] += tvlapl0;

  tvtau0 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 0] += tvtau0;

  t147 = t21 / t22 / rho[0];
  t155 = 0.1e1 / t23 / t59;
  t166 = t31 * t101 * lapl[0];
  t171 = 0.1e1 / t22 / t59 / t52;
  t175 = 0.55e2 / 0.729e3 * t30 * t33 * t155 + 0.1e3 / 0.243e3 * t30 * t40 * t85 + 0.65e2 / 0.13122e5 * t49 * t51 * t70 - 0.13e2 / 0.1458e4 * t58 * t166 + 0.76e2 / 0.19683e5 * t49 * t67 * t171;
  t180 = my_piecewise3(t3, 0, -t8 * t147 * t74 / 0.3e2 + t8 * t80 * t105 / 0.5e1 + 0.3e1 / 0.2e2 * t8 * t24 * t175);
  tv2rho20 = 0.2e1 * rho[0] * t180 + 0.4e1 * t110;

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 0] += tv2rho20;

  t187 = t30 * t32 * t85;
  t189 = t49 * t96;
  t192 = t49 * t118 * t101;
  t194 = -0.5e1 / 0.243e3 * t187 + 0.13e2 / 0.7776e4 * t189 - 0.8e1 / 0.6561e4 * t192;
  t199 = my_piecewise3(t3, 0, t8 * t80 * t122 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t194);
  tv2rhosigma0 = 0.2e1 * rho[0] * t199 + 0.2e1 * t126;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 0] += tv2rhosigma0;

  t208 = -0.25e2 / 0.162e3 * t114 - 0.5e1 / 0.2187e4 * t116 + 0.13e2 / 0.7776e4 * t120;
  t213 = my_piecewise3(t3, 0, t8 * t80 * t138 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t208);
  tv2rholapl0 = 0.2e1 * rho[0] * t213 + 0.2e1 * t142;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 0] += tv2rholapl0;

  tv2rhotau0 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 0] += tv2rhotau0;

  t216 = t8 * t21;
  t218 = t48 * t31;
  t220 = t216 * t155 * t46 * t218;
  t222 = my_piecewise3(t3, 0, t220 / 0.2916e5);
  tv2sigma20 = 0.2e1 * rho[0] * t222;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 0] += tv2sigma20;

  t226 = t216 * t85 * t46 * t218;
  t228 = my_piecewise3(t3, 0, -t226 / 0.1728e5);
  tv2sigmalapl0 = 0.2e1 * rho[0] * t228;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 0] += tv2sigmalapl0;

  tv2sigmatau0 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 0] += tv2sigmatau0;

  t234 = my_piecewise3(t3, 0, t216 * t36 * t46 * t218 / 0.972e4);
  tv2lapl20 = 0.2e1 * rho[0] * t234;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 0] += tv2lapl20;

  tv2lapltau0 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 0] += tv2lapltau0;

  tv2tau20 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 0] += tv2tau20;

  t239 = t21 / t22 / t34;
  t250 = 0.1e1 / t23 / t68;
  t261 = t31 * t171 * lapl[0];
  t264 = t59 * t59;
  t266 = 0.1e1 / t22 / t264;
  t270 = -0.77e3 / 0.2187e4 * t30 * t33 * t250 - 0.11e4 / 0.729e3 * t30 * t40 * t155 - 0.52e3 / 0.19683e5 * t49 * t51 * t101 + 0.247e3 / 0.4374e4 * t58 * t261 - 0.1672e4 / 0.59049e5 * t49 * t67 * t266;
  t275 = my_piecewise3(t3, 0, 0.2e1 / 0.45e2 * t8 * t239 * t74 - t8 * t147 * t105 / 0.1e2 + 0.3e1 / 0.1e2 * t8 * t80 * t175 + 0.3e1 / 0.2e2 * t8 * t24 * t270);
  tv3rho30 = 0.2e1 * rho[0] * t275 + 0.6e1 * t180;

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 0] += tv3rho30;

  t286 = t30 * t32 * t155;
  t288 = t49 * t166;
  t291 = t49 * t118 * t171;
  t293 = 0.55e2 / 0.729e3 * t286 - 0.13e2 / 0.1458e4 * t288 + 0.152e3 / 0.19683e5 * t291;
  t298 = my_piecewise3(t3, 0, -t8 * t147 * t122 / 0.3e2 + t8 * t80 * t194 / 0.5e1 + 0.3e1 / 0.2e2 * t8 * t24 * t293);
  tv3rho2sigma0 = 0.2e1 * rho[0] * t298 + 0.4e1 * t199;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 0] += tv3rho2sigma0;

  t311 = 0.1e3 / 0.243e3 * t187 + 0.65e2 / 0.6561e4 * t189 - 0.13e2 / 0.1458e4 * t192;
  t316 = my_piecewise3(t3, 0, -t8 * t147 * t138 / 0.3e2 + t8 * t80 * t208 / 0.5e1 + 0.3e1 / 0.2e2 * t8 * t24 * t311);
  tv3rho2lapl0 = 0.2e1 * rho[0] * t316 + 0.4e1 * t213;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 0] += tv3rho2lapl0;

  tv3rho2tau0 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 0] += tv3rho2tau0;

  t321 = t216 * t250 * t46 * t218;
  t323 = my_piecewise3(t3, 0, -0.7e1 / 0.4374e5 * t321);
  tv3rhosigma20 = 0.2e1 * rho[0] * t323 + 0.2e1 * t222;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 0] += tv3rhosigma20;

  t327 = my_piecewise3(t3, 0, 0.11e2 / 0.5184e5 * t220);
  tv3rhosigmalapl0 = 0.2e1 * rho[0] * t327 + 0.2e1 * t228;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 0] += tv3rhosigmalapl0;

  tv3rhosigmatau0 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 0] += tv3rhosigmatau0;

  t331 = my_piecewise3(t3, 0, -t226 / 0.3645e4);
  tv3rholapl20 = 0.2e1 * rho[0] * t331 + 0.2e1 * t234;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 0] += tv3rholapl20;

  tv3rholapltau0 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 0] += tv3rholapltau0;

  tv3rhotau20 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 0] += tv3rhotau20;

  tv3sigma30 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 0] += tv3sigma30;

  tv3sigma2lapl0 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 0] += tv3sigma2lapl0;

  tv3sigma2tau0 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 0] += tv3sigma2tau0;

  tv3sigmalapl20 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 0] += tv3sigmalapl20;

  tv3sigmalapltau0 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 0] += tv3sigmalapltau0;

  tv3sigmatau20 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 0] += tv3sigmatau20;

  tv3lapl30 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 0] += tv3lapl30;

  tv3lapl2tau0 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 0] += tv3lapl2tau0;

  tv3lapltau20 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 0] += tv3lapltau20;

  tv3tau30 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 0] += tv3tau30;

}

#endif


#ifndef XC_DONT_COMPILE_LXC
GPU_DEVICE_FUNCTION static inline void
func_lxc_unpol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t3, t4, t5, t6, t8, t9, t10, t12;
  double t13, t15, t16, t18, t19, t21, t22, t23;
  double t24, t25, t26, t27, t28, t30, t31, t32;
  double t33, t34, t36, t40, t42, t46, t48, t49;
  double t50, t51, t52, t54, t58, t59, t61, t63;
  double t66, t67, t68, t70, t74, t78, tzk0;

  double t80, t85, t96, t99, t101, t105, t110, tvrho0;
  double t114, t116, t118, t120, t122, t126, tvsigma0, t138;
  double t142, tvlapl0, tvtau0;

  double t147, t155, t166, t171, t175, t180, tv2rho20, t187;
  double t189, t192, t194, t199, tv2rhosigma0, t208, t213, tv2rholapl0;
  double tv2rhotau0, t216, t218, t220, t222, tv2sigma20, t226, t228;
  double tv2sigmalapl0, tv2sigmatau0, t234, tv2lapl20, tv2lapltau0, tv2tau20;

  double t239, t250, t261, t264, t266, t270, t275, tv3rho30;
  double t286, t288, t291, t293, t298, tv3rho2sigma0, t311, t316;
  double tv3rho2lapl0, tv3rho2tau0, t321, t323, tv3rhosigma20, t327, tv3rhosigmalapl0, tv3rhosigmatau0;
  double t331, tv3rholapl20, tv3rholapltau0, tv3rhotau20, tv3sigma30, tv3sigma2lapl0, tv3sigma2tau0, tv3sigmalapl20;
  double tv3sigmalapltau0, tv3sigmatau20, tv3lapl30, tv3lapl2tau0, tv3lapltau20, tv3tau30;

  double t349, t374, tv4rho40, t400, tv4rho3sigma0, t421, tv4rho3lapl0, tv4rho3tau0;
  double t429, tv4rho2sigma20, t434, tv4rho2sigmalapl0, tv4rho2sigmatau0, t439, tv4rho2lapl20, tv4rho2lapltau0;
  double tv4rho2tau20, tv4rhosigma30, tv4rhosigma2lapl0, tv4rhosigma2tau0, tv4rhosigmalapl20, tv4rhosigmalapltau0, tv4rhosigmatau20, tv4rholapl30;
  double tv4rholapl2tau0, tv4rholapltau20, tv4rhotau30, tv4sigma40, tv4sigma3lapl0, tv4sigma3tau0, tv4sigma2lapl20, tv4sigma2lapltau0;
  double tv4sigma2tau20, tv4sigmalapl30, tv4sigmalapl2tau0, tv4sigmalapltau20, tv4sigmatau30, tv4lapl40, tv4lapl3tau0, tv4lapl2tau20;
  double tv4lapltau30, tv4tau40;


  t3 = rho[0] / 0.2e1 <= p->dens_threshold;
  t4 = M_CBRT3;
  t5 = t4 * t4;
  t6 = M_CBRTPI;
  t8 = t5 * t6 * M_PI;
  t9 = 0.1e1 <= p->zeta_threshold;
  t10 = p->zeta_threshold - 0.1e1;
  t12 = my_piecewise5(t9, t10, t9, -t10, 0);
  t13 = 0.1e1 + t12;
  t15 = POW_1_3(p->zeta_threshold);
  t16 = t15 * t15;
  t18 = POW_1_3(t13);
  t19 = t18 * t18;
  t21 = my_piecewise3(t13 <= p->zeta_threshold, t16 * p->zeta_threshold, t19 * t13);
  t22 = POW_1_3(rho[0]);
  t23 = t22 * t22;
  t24 = t21 * t23;
  t25 = M_CBRT6;
  t26 = M_PI * M_PI;
  t27 = POW_1_3(t26);
  t28 = t27 * t27;
  t30 = t25 / t28;
  t31 = M_CBRT2;
  t32 = t31 * t31;
  t33 = sigma[0] * t32;
  t34 = rho[0] * rho[0];
  t36 = 0.1e1 / t23 / t34;
  t40 = lapl[0] * t32;
  t42 = 0.1e1 / t23 / rho[0];
  t46 = t25 * t25;
  t48 = 0.1e1 / t27 / t26;
  t49 = t46 * t48;
  t50 = lapl[0] * lapl[0];
  t51 = t50 * t31;
  t52 = t34 * rho[0];
  t54 = 0.1e1 / t22 / t52;
  t58 = t49 * sigma[0];
  t59 = t34 * t34;
  t61 = 0.1e1 / t22 / t59;
  t63 = t31 * t61 * lapl[0];
  t66 = sigma[0] * sigma[0];
  t67 = t66 * t31;
  t68 = t59 * rho[0];
  t70 = 0.1e1 / t22 / t68;
  t74 = 0.1e1 + 0.5e1 / 0.648e3 * t30 * t33 * t36 + 0.5e1 / 0.54e2 * t30 * t40 * t42 + t49 * t51 * t54 / 0.2916e4 - t58 * t63 / 0.2592e4 + t49 * t67 * t70 / 0.8748e4;
  t78 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t74);
  tzk0 = 0.2e1 * t78;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

  t80 = t21 / t22;
  t85 = 0.1e1 / t23 / t52;
  t96 = t31 * t70 * lapl[0];
  t99 = t59 * t34;
  t101 = 0.1e1 / t22 / t99;
  t105 = -0.5e1 / 0.243e3 * t30 * t33 * t85 - 0.25e2 / 0.162e3 * t30 * t40 * t36 - 0.5e1 / 0.4374e4 * t49 * t51 * t61 + 0.13e2 / 0.7776e4 * t58 * t96 - 0.4e1 / 0.6561e4 * t49 * t67 * t101;
  t110 = my_piecewise3(t3, 0, t8 * t80 * t74 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t105);
  tvrho0 = 0.2e1 * rho[0] * t110 + 0.2e1 * t78;

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 0] += tvrho0;

  t114 = t30 * t32 * t36;
  t116 = t49 * t63;
  t118 = sigma[0] * t31;
  t120 = t49 * t118 * t70;
  t122 = 0.5e1 / 0.648e3 * t114 - t116 / 0.2592e4 + t120 / 0.4374e4;
  t126 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t122);
  tvsigma0 = 0.2e1 * rho[0] * t126;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 0] += tvsigma0;

  t138 = 0.5e1 / 0.54e2 * t30 * t32 * t42 + t49 * lapl[0] * t31 * t54 / 0.1458e4 - t49 * t118 * t61 / 0.2592e4;
  t142 = my_piecewise3(t3, 0, 0.3e1 / 0.2e2 * t8 * t24 * t138);
  tvlapl0 = 0.2e1 * rho[0] * t142;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 0] += tvlapl0;

  tvtau0 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 0] += tvtau0;

  t147 = t21 / t22 / rho[0];
  t155 = 0.1e1 / t23 / t59;
  t166 = t31 * t101 * lapl[0];
  t171 = 0.1e1 / t22 / t59 / t52;
  t175 = 0.55e2 / 0.729e3 * t30 * t33 * t155 + 0.1e3 / 0.243e3 * t30 * t40 * t85 + 0.65e2 / 0.13122e5 * t49 * t51 * t70 - 0.13e2 / 0.1458e4 * t58 * t166 + 0.76e2 / 0.19683e5 * t49 * t67 * t171;
  t180 = my_piecewise3(t3, 0, -t8 * t147 * t74 / 0.3e2 + t8 * t80 * t105 / 0.5e1 + 0.3e1 / 0.2e2 * t8 * t24 * t175);
  tv2rho20 = 0.2e1 * rho[0] * t180 + 0.4e1 * t110;

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 0] += tv2rho20;

  t187 = t30 * t32 * t85;
  t189 = t49 * t96;
  t192 = t49 * t118 * t101;
  t194 = -0.5e1 / 0.243e3 * t187 + 0.13e2 / 0.7776e4 * t189 - 0.8e1 / 0.6561e4 * t192;
  t199 = my_piecewise3(t3, 0, t8 * t80 * t122 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t194);
  tv2rhosigma0 = 0.2e1 * rho[0] * t199 + 0.2e1 * t126;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 0] += tv2rhosigma0;

  t208 = -0.25e2 / 0.162e3 * t114 - 0.5e1 / 0.2187e4 * t116 + 0.13e2 / 0.7776e4 * t120;
  t213 = my_piecewise3(t3, 0, t8 * t80 * t138 / 0.1e2 + 0.3e1 / 0.2e2 * t8 * t24 * t208);
  tv2rholapl0 = 0.2e1 * rho[0] * t213 + 0.2e1 * t142;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 0] += tv2rholapl0;

  tv2rhotau0 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 0] += tv2rhotau0;

  t216 = t8 * t21;
  t218 = t48 * t31;
  t220 = t216 * t155 * t46 * t218;
  t222 = my_piecewise3(t3, 0, t220 / 0.2916e5);
  tv2sigma20 = 0.2e1 * rho[0] * t222;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 0] += tv2sigma20;

  t226 = t216 * t85 * t46 * t218;
  t228 = my_piecewise3(t3, 0, -t226 / 0.1728e5);
  tv2sigmalapl0 = 0.2e1 * rho[0] * t228;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 0] += tv2sigmalapl0;

  tv2sigmatau0 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 0] += tv2sigmatau0;

  t234 = my_piecewise3(t3, 0, t216 * t36 * t46 * t218 / 0.972e4);
  tv2lapl20 = 0.2e1 * rho[0] * t234;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 0] += tv2lapl20;

  tv2lapltau0 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 0] += tv2lapltau0;

  tv2tau20 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 0] += tv2tau20;

  t239 = t21 / t22 / t34;
  t250 = 0.1e1 / t23 / t68;
  t261 = t31 * t171 * lapl[0];
  t264 = t59 * t59;
  t266 = 0.1e1 / t22 / t264;
  t270 = -0.77e3 / 0.2187e4 * t30 * t33 * t250 - 0.11e4 / 0.729e3 * t30 * t40 * t155 - 0.52e3 / 0.19683e5 * t49 * t51 * t101 + 0.247e3 / 0.4374e4 * t58 * t261 - 0.1672e4 / 0.59049e5 * t49 * t67 * t266;
  t275 = my_piecewise3(t3, 0, 0.2e1 / 0.45e2 * t8 * t239 * t74 - t8 * t147 * t105 / 0.1e2 + 0.3e1 / 0.1e2 * t8 * t80 * t175 + 0.3e1 / 0.2e2 * t8 * t24 * t270);
  tv3rho30 = 0.2e1 * rho[0] * t275 + 0.6e1 * t180;

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 0] += tv3rho30;

  t286 = t30 * t32 * t155;
  t288 = t49 * t166;
  t291 = t49 * t118 * t171;
  t293 = 0.55e2 / 0.729e3 * t286 - 0.13e2 / 0.1458e4 * t288 + 0.152e3 / 0.19683e5 * t291;
  t298 = my_piecewise3(t3, 0, -t8 * t147 * t122 / 0.3e2 + t8 * t80 * t194 / 0.5e1 + 0.3e1 / 0.2e2 * t8 * t24 * t293);
  tv3rho2sigma0 = 0.2e1 * rho[0] * t298 + 0.4e1 * t199;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 0] += tv3rho2sigma0;

  t311 = 0.1e3 / 0.243e3 * t187 + 0.65e2 / 0.6561e4 * t189 - 0.13e2 / 0.1458e4 * t192;
  t316 = my_piecewise3(t3, 0, -t8 * t147 * t138 / 0.3e2 + t8 * t80 * t208 / 0.5e1 + 0.3e1 / 0.2e2 * t8 * t24 * t311);
  tv3rho2lapl0 = 0.2e1 * rho[0] * t316 + 0.4e1 * t213;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 0] += tv3rho2lapl0;

  tv3rho2tau0 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 0] += tv3rho2tau0;

  t321 = t216 * t250 * t46 * t218;
  t323 = my_piecewise3(t3, 0, -0.7e1 / 0.4374e5 * t321);
  tv3rhosigma20 = 0.2e1 * rho[0] * t323 + 0.2e1 * t222;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 0] += tv3rhosigma20;

  t327 = my_piecewise3(t3, 0, 0.11e2 / 0.5184e5 * t220);
  tv3rhosigmalapl0 = 0.2e1 * rho[0] * t327 + 0.2e1 * t228;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 0] += tv3rhosigmalapl0;

  tv3rhosigmatau0 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 0] += tv3rhosigmatau0;

  t331 = my_piecewise3(t3, 0, -t226 / 0.3645e4);
  tv3rholapl20 = 0.2e1 * rho[0] * t331 + 0.2e1 * t234;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 0] += tv3rholapl20;

  tv3rholapltau0 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 0] += tv3rholapltau0;

  tv3rhotau20 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 0] += tv3rhotau20;

  tv3sigma30 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 0] += tv3sigma30;

  tv3sigma2lapl0 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 0] += tv3sigma2lapl0;

  tv3sigma2tau0 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 0] += tv3sigma2tau0;

  tv3sigmalapl20 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 0] += tv3sigmalapl20;

  tv3sigmalapltau0 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 0] += tv3sigmalapltau0;

  tv3sigmatau20 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 0] += tv3sigmatau20;

  tv3lapl30 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 0] += tv3lapl30;

  tv3lapl2tau0 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 0] += tv3lapl2tau0;

  tv3lapltau20 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 0] += tv3lapltau20;

  tv3tau30 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 0] += tv3tau30;

  t349 = 0.1e1 / t23 / t99;
  t374 = my_piecewise3(t3, 0, -0.14e2 / 0.135e3 * t8 * t21 * t54 * t74 + 0.8e1 / 0.45e2 * t8 * t239 * t105 - t8 * t147 * t175 / 0.5e1 + 0.2e1 / 0.5e1 * t8 * t80 * t270 + 0.3e1 / 0.2e2 * t8 * t24 * (0.1309e5 / 0.6561e4 * t30 * t33 * t349 + 0.154e5 / 0.2187e4 * t30 * t40 * t250 + 0.988e4 / 0.59049e5 * t49 * t51 * t171 - 0.2717e4 / 0.6561e4 * t58 * t31 * t266 * lapl[0] + 0.418e5 / 0.177147e6 * t49 * t67 / t22 / t264 / rho[0]));
  tv4rho40 = 0.2e1 * rho[0] * t374 + 0.8e1 * t275;

  if(out->v4rho4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho4[ip*p->dim.v4rho4 + 0] += tv4rho40;

  t400 = my_piecewise3(t3, 0, 0.2e1 / 0.45e2 * t8 * t239 * t122 - t8 * t147 * t194 / 0.1e2 + 0.3e1 / 0.1e2 * t8 * t80 * t293 + 0.3e1 / 0.2e2 * t8 * t24 * (-0.77e3 / 0.2187e4 * t30 * t32 * t250 + 0.247e3 / 0.4374e4 * t49 * t261 - 0.3344e4 / 0.59049e5 * t49 * t118 * t266));
  tv4rho3sigma0 = 0.2e1 * rho[0] * t400 + 0.6e1 * t298;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 0] += tv4rho3sigma0;

  t421 = my_piecewise3(t3, 0, 0.2e1 / 0.45e2 * t8 * t239 * t138 - t8 * t147 * t208 / 0.1e2 + 0.3e1 / 0.1e2 * t8 * t80 * t311 + 0.3e1 / 0.2e2 * t8 * t24 * (-0.11e4 / 0.729e3 * t286 - 0.104e4 / 0.19683e5 * t288 + 0.247e3 / 0.4374e4 * t291));
  tv4rho3lapl0 = 0.2e1 * rho[0] * t421 + 0.6e1 * t316;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 0] += tv4rho3lapl0;

  tv4rho3tau0 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 0] += tv4rho3tau0;

  t429 = my_piecewise3(t3, 0, 0.119e3 / 0.13122e6 * t216 * t349 * t46 * t218);
  tv4rho2sigma20 = 0.2e1 * rho[0] * t429 + 0.4e1 * t323;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 0] += tv4rho2sigma20;

  t434 = my_piecewise3(t3, 0, -0.77e2 / 0.7776e5 * t321);
  tv4rho2sigmalapl0 = 0.2e1 * rho[0] * t434 + 0.4e1 * t327;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 0] += tv4rho2sigmalapl0;

  tv4rho2sigmatau0 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 0] += tv4rho2sigmatau0;

  t439 = my_piecewise3(t3, 0, 0.11e2 / 0.10935e5 * t220);
  tv4rho2lapl20 = 0.2e1 * rho[0] * t439 + 0.4e1 * t331;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 0] += tv4rho2lapl20;

  tv4rho2lapltau0 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 0] += tv4rho2lapltau0;

  tv4rho2tau20 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 0] += tv4rho2tau20;

  tv4rhosigma30 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 0] += tv4rhosigma30;

  tv4rhosigma2lapl0 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 0] += tv4rhosigma2lapl0;

  tv4rhosigma2tau0 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 0] += tv4rhosigma2tau0;

  tv4rhosigmalapl20 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 0] += tv4rhosigmalapl20;

  tv4rhosigmalapltau0 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 0] += tv4rhosigmalapltau0;

  tv4rhosigmatau20 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 0] += tv4rhosigmatau20;

  tv4rholapl30 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 0] += tv4rholapl30;

  tv4rholapl2tau0 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 0] += tv4rholapl2tau0;

  tv4rholapltau20 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 0] += tv4rholapltau20;

  tv4rhotau30 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 0] += tv4rhotau30;

  tv4sigma40 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 0] += tv4sigma40;

  tv4sigma3lapl0 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 0] += tv4sigma3lapl0;

  tv4sigma3tau0 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 0] += tv4sigma3tau0;

  tv4sigma2lapl20 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 0] += tv4sigma2lapl20;

  tv4sigma2lapltau0 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 0] += tv4sigma2lapltau0;

  tv4sigma2tau20 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 0] += tv4sigma2tau20;

  tv4sigmalapl30 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 0] += tv4sigmalapl30;

  tv4sigmalapl2tau0 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 0] += tv4sigmalapl2tau0;

  tv4sigmalapltau20 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 0] += tv4sigmalapltau20;

  tv4sigmatau30 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 0] += tv4sigmatau30;

  tv4lapl40 = 0.e0;

  if(out->v4lapl4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl4[ip*p->dim.v4lapl4 + 0] += tv4lapl40;

  tv4lapl3tau0 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 0] += tv4lapl3tau0;

  tv4lapl2tau20 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 0] += tv4lapl2tau20;

  tv4lapltau30 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 0] += tv4lapltau30;

  tv4tau40 = 0.e0;

  if(out->v4tau4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4tau4[ip*p->dim.v4tau4 + 0] += tv4tau40;

}

#endif


#ifndef XC_DONT_COMPILE_EXC
GPU_DEVICE_FUNCTION static inline void
func_exc_pol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t2, t3, t4, t5, t7, t8, t9, t12;
  double t13, t16, t17, t18, t20, t21, t22, t23;
  double t24, t25, t26, t27, t29, t30, t31, t32;
  double t33, t34, t35, t36, t38, t39, t40, t41;
  double t43, t48, t52, t54, t55, t56, t57, t59;
  double t63, t65, t66, t70, t71, t73, t77, t81;
  double t82, t83, t85, t86, t87, t88, t89, t91;
  double t92, t93, t94, t95, t97, t102, t106, t107;
  double t109, t113, t115, t116, t120, t121, t123, t127;
  double t131, tzk0;


  t2 = rho[0] <= p->dens_threshold;
  t3 = M_CBRT3;
  t4 = t3 * t3;
  t5 = M_CBRTPI;
  t7 = t4 * t5 * M_PI;
  t8 = rho[0] + rho[1];
  t9 = 0.1e1 / t8;
  t12 = 0.2e1 * rho[0] * t9 <= p->zeta_threshold;
  t13 = p->zeta_threshold - 0.1e1;
  t16 = 0.2e1 * rho[1] * t9 <= p->zeta_threshold;
  t17 = -t13;
  t18 = rho[0] - rho[1];
  t20 = my_piecewise5(t12, t13, t16, t17, t18 * t9);
  t21 = 0.1e1 + t20;
  t22 = t21 <= p->zeta_threshold;
  t23 = POW_1_3(p->zeta_threshold);
  t24 = t23 * t23;
  t25 = t24 * p->zeta_threshold;
  t26 = POW_1_3(t21);
  t27 = t26 * t26;
  t29 = my_piecewise3(t22, t25, t27 * t21);
  t30 = POW_1_3(t8);
  t31 = t30 * t30;
  t32 = t29 * t31;
  t33 = M_CBRT6;
  t34 = M_PI * M_PI;
  t35 = POW_1_3(t34);
  t36 = t35 * t35;
  t38 = t33 / t36;
  t39 = rho[0] * rho[0];
  t40 = POW_1_3(rho[0]);
  t41 = t40 * t40;
  t43 = 0.1e1 / t41 / t39;
  t48 = 0.1e1 / t41 / rho[0];
  t52 = t33 * t33;
  t54 = 0.1e1 / t35 / t34;
  t55 = t52 * t54;
  t56 = lapl[0] * lapl[0];
  t57 = t39 * rho[0];
  t59 = 0.1e1 / t40 / t57;
  t63 = t39 * t39;
  t65 = 0.1e1 / t40 / t63;
  t66 = sigma[0] * t65;
  t70 = sigma[0] * sigma[0];
  t71 = t63 * rho[0];
  t73 = 0.1e1 / t40 / t71;
  t77 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[0] * t43 + 0.5e1 / 0.54e2 * t38 * lapl[0] * t48 + t55 * t56 * t59 / 0.5832e4 - t55 * t66 * lapl[0] / 0.5184e4 + t55 * t70 * t73 / 0.17496e5;
  t81 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t77);
  t82 = rho[1] <= p->dens_threshold;
  t83 = -t18;
  t85 = my_piecewise5(t16, t13, t12, t17, t83 * t9);
  t86 = 0.1e1 + t85;
  t87 = t86 <= p->zeta_threshold;
  t88 = POW_1_3(t86);
  t89 = t88 * t88;
  t91 = my_piecewise3(t87, t25, t89 * t86);
  t92 = t91 * t31;
  t93 = rho[1] * rho[1];
  t94 = POW_1_3(rho[1]);
  t95 = t94 * t94;
  t97 = 0.1e1 / t95 / t93;
  t102 = 0.1e1 / t95 / rho[1];
  t106 = lapl[1] * lapl[1];
  t107 = t93 * rho[1];
  t109 = 0.1e1 / t94 / t107;
  t113 = t93 * t93;
  t115 = 0.1e1 / t94 / t113;
  t116 = sigma[2] * t115;
  t120 = sigma[2] * sigma[2];
  t121 = t113 * rho[1];
  t123 = 0.1e1 / t94 / t121;
  t127 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[2] * t97 + 0.5e1 / 0.54e2 * t38 * lapl[1] * t102 + t55 * t106 * t109 / 0.5832e4 - t55 * t116 * lapl[1] / 0.5184e4 + t55 * t120 * t123 / 0.17496e5;
  t131 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t127);
  tzk0 = t81 + t131;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

}

#endif


#ifndef XC_DONT_COMPILE_VXC
GPU_DEVICE_FUNCTION static inline void
func_vxc_pol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t2, t3, t4, t5, t7, t8, t9, t12;
  double t13, t16, t17, t18, t20, t21, t22, t23;
  double t24, t25, t26, t27, t29, t30, t31, t32;
  double t33, t34, t35, t36, t38, t39, t40, t41;
  double t43, t48, t52, t54, t55, t56, t57, t59;
  double t63, t65, t66, t70, t71, t73, t77, t81;
  double t82, t83, t85, t86, t87, t88, t89, t91;
  double t92, t93, t94, t95, t97, t102, t106, t107;
  double t109, t113, t115, t116, t120, t121, t123, t127;
  double t131, tzk0;

  double t132, t133, t134, t136, t139, t140, t144, t145;
  double t148, t150, t160, t164, t166, t170, t175, t176;
  double t178, t181, t182, t186, t189, t191, tvrho0, t195;
  double t198, t199, t204, t206, t209, t210, t215, t225;
  double t229, t231, t235, t240, tvrho1, t243, t246, t248;
  double t250, t254, tvsigma0, tvsigma1, t255, t258, t260, t262;
  double t266, tvsigma2, t274, t278, tvlapl0, t286, t290, tvlapl1;
  double tvtau0, tvtau1;


  t2 = rho[0] <= p->dens_threshold;
  t3 = M_CBRT3;
  t4 = t3 * t3;
  t5 = M_CBRTPI;
  t7 = t4 * t5 * M_PI;
  t8 = rho[0] + rho[1];
  t9 = 0.1e1 / t8;
  t12 = 0.2e1 * rho[0] * t9 <= p->zeta_threshold;
  t13 = p->zeta_threshold - 0.1e1;
  t16 = 0.2e1 * rho[1] * t9 <= p->zeta_threshold;
  t17 = -t13;
  t18 = rho[0] - rho[1];
  t20 = my_piecewise5(t12, t13, t16, t17, t18 * t9);
  t21 = 0.1e1 + t20;
  t22 = t21 <= p->zeta_threshold;
  t23 = POW_1_3(p->zeta_threshold);
  t24 = t23 * t23;
  t25 = t24 * p->zeta_threshold;
  t26 = POW_1_3(t21);
  t27 = t26 * t26;
  t29 = my_piecewise3(t22, t25, t27 * t21);
  t30 = POW_1_3(t8);
  t31 = t30 * t30;
  t32 = t29 * t31;
  t33 = M_CBRT6;
  t34 = M_PI * M_PI;
  t35 = POW_1_3(t34);
  t36 = t35 * t35;
  t38 = t33 / t36;
  t39 = rho[0] * rho[0];
  t40 = POW_1_3(rho[0]);
  t41 = t40 * t40;
  t43 = 0.1e1 / t41 / t39;
  t48 = 0.1e1 / t41 / rho[0];
  t52 = t33 * t33;
  t54 = 0.1e1 / t35 / t34;
  t55 = t52 * t54;
  t56 = lapl[0] * lapl[0];
  t57 = t39 * rho[0];
  t59 = 0.1e1 / t40 / t57;
  t63 = t39 * t39;
  t65 = 0.1e1 / t40 / t63;
  t66 = sigma[0] * t65;
  t70 = sigma[0] * sigma[0];
  t71 = t63 * rho[0];
  t73 = 0.1e1 / t40 / t71;
  t77 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[0] * t43 + 0.5e1 / 0.54e2 * t38 * lapl[0] * t48 + t55 * t56 * t59 / 0.5832e4 - t55 * t66 * lapl[0] / 0.5184e4 + t55 * t70 * t73 / 0.17496e5;
  t81 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t77);
  t82 = rho[1] <= p->dens_threshold;
  t83 = -t18;
  t85 = my_piecewise5(t16, t13, t12, t17, t83 * t9);
  t86 = 0.1e1 + t85;
  t87 = t86 <= p->zeta_threshold;
  t88 = POW_1_3(t86);
  t89 = t88 * t88;
  t91 = my_piecewise3(t87, t25, t89 * t86);
  t92 = t91 * t31;
  t93 = rho[1] * rho[1];
  t94 = POW_1_3(rho[1]);
  t95 = t94 * t94;
  t97 = 0.1e1 / t95 / t93;
  t102 = 0.1e1 / t95 / rho[1];
  t106 = lapl[1] * lapl[1];
  t107 = t93 * rho[1];
  t109 = 0.1e1 / t94 / t107;
  t113 = t93 * t93;
  t115 = 0.1e1 / t94 / t113;
  t116 = sigma[2] * t115;
  t120 = sigma[2] * sigma[2];
  t121 = t113 * rho[1];
  t123 = 0.1e1 / t94 / t121;
  t127 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[2] * t97 + 0.5e1 / 0.54e2 * t38 * lapl[1] * t102 + t55 * t106 * t109 / 0.5832e4 - t55 * t116 * lapl[1] / 0.5184e4 + t55 * t120 * t123 / 0.17496e5;
  t131 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t127);
  tzk0 = t81 + t131;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

  t132 = t8 * t8;
  t133 = 0.1e1 / t132;
  t134 = t18 * t133;
  t136 = my_piecewise5(t12, 0, t16, 0, t9 - t134);
  t139 = my_piecewise3(t22, 0, 0.5e1 / 0.3e1 * t27 * t136);
  t140 = t139 * t31;
  t144 = 0.1e1 / t30;
  t145 = t29 * t144;
  t148 = t7 * t145 * t77 / 0.1e2;
  t150 = 0.1e1 / t41 / t57;
  t160 = sigma[0] * t73;
  t164 = t63 * t39;
  t166 = 0.1e1 / t40 / t164;
  t170 = -0.5e1 / 0.243e3 * t38 * sigma[0] * t150 - 0.25e2 / 0.162e3 * t38 * lapl[0] * t43 - 0.5e1 / 0.8748e4 * t55 * t56 * t65 + 0.13e2 / 0.15552e5 * t55 * t160 * lapl[0] - 0.2e1 / 0.6561e4 * t55 * t70 * t166;
  t175 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t77 + t148 + 0.3e1 / 0.2e2 * t7 * t32 * t170);
  t176 = t83 * t133;
  t178 = my_piecewise5(t16, 0, t12, 0, -t9 - t176);
  t181 = my_piecewise3(t87, 0, 0.5e1 / 0.3e1 * t89 * t178);
  t182 = t181 * t31;
  t186 = t91 * t144;
  t189 = t7 * t186 * t127 / 0.1e2;
  t191 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t127 + t189);
  tvrho0 = t81 + t131 + t8 * (t175 + t191);

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 0] += tvrho0;

  t195 = my_piecewise5(t12, 0, t16, 0, -t9 - t134);
  t198 = my_piecewise3(t22, 0, 0.5e1 / 0.3e1 * t27 * t195);
  t199 = t198 * t31;
  t204 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t77 + t148);
  t206 = my_piecewise5(t16, 0, t12, 0, t9 - t176);
  t209 = my_piecewise3(t87, 0, 0.5e1 / 0.3e1 * t89 * t206);
  t210 = t209 * t31;
  t215 = 0.1e1 / t95 / t107;
  t225 = sigma[2] * t123;
  t229 = t113 * t93;
  t231 = 0.1e1 / t94 / t229;
  t235 = -0.5e1 / 0.243e3 * t38 * sigma[2] * t215 - 0.25e2 / 0.162e3 * t38 * lapl[1] * t97 - 0.5e1 / 0.8748e4 * t55 * t106 * t115 + 0.13e2 / 0.15552e5 * t55 * t225 * lapl[1] - 0.2e1 / 0.6561e4 * t55 * t120 * t231;
  t240 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t127 + t189 + 0.3e1 / 0.2e2 * t7 * t92 * t235);
  tvrho1 = t81 + t131 + t8 * (t204 + t240);

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 1] += tvrho1;

  t243 = t38 * t43;
  t246 = t55 * t65 * lapl[0];
  t248 = t55 * t160;
  t250 = 0.5e1 / 0.648e3 * t243 - t246 / 0.5184e4 + t248 / 0.8748e4;
  t254 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t250);
  tvsigma0 = t8 * t254;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 0] += tvsigma0;

  tvsigma1 = 0.e0;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 1] += tvsigma1;

  t255 = t38 * t97;
  t258 = t55 * t115 * lapl[1];
  t260 = t55 * t225;
  t262 = 0.5e1 / 0.648e3 * t255 - t258 / 0.5184e4 + t260 / 0.8748e4;
  t266 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t262);
  tvsigma2 = t8 * t266;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 2] += tvsigma2;

  t274 = 0.5e1 / 0.54e2 * t38 * t48 + t55 * lapl[0] * t59 / 0.2916e4 - t55 * t66 / 0.5184e4;
  t278 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t274);
  tvlapl0 = t8 * t278;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 0] += tvlapl0;

  t286 = 0.5e1 / 0.54e2 * t38 * t102 + t55 * lapl[1] * t109 / 0.2916e4 - t55 * t116 / 0.5184e4;
  t290 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t286);
  tvlapl1 = t8 * t290;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 1] += tvlapl1;

  tvtau0 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 0] += tvtau0;

  tvtau1 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 1] += tvtau1;

}

#endif


#ifndef XC_DONT_COMPILE_FXC
GPU_DEVICE_FUNCTION static inline void
func_fxc_pol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t2, t3, t4, t5, t7, t8, t9, t12;
  double t13, t16, t17, t18, t20, t21, t22, t23;
  double t24, t25, t26, t27, t29, t30, t31, t32;
  double t33, t34, t35, t36, t38, t39, t40, t41;
  double t43, t48, t52, t54, t55, t56, t57, t59;
  double t63, t65, t66, t70, t71, t73, t77, t81;
  double t82, t83, t85, t86, t87, t88, t89, t91;
  double t92, t93, t94, t95, t97, t102, t106, t107;
  double t109, t113, t115, t116, t120, t121, t123, t127;
  double t131, tzk0;

  double t132, t133, t134, t136, t139, t140, t144, t145;
  double t148, t150, t160, t164, t166, t170, t175, t176;
  double t178, t181, t182, t186, t189, t191, tvrho0, t195;
  double t198, t199, t204, t206, t209, t210, t215, t225;
  double t229, t231, t235, t240, tvrho1, t243, t246, t248;
  double t250, t254, tvsigma0, tvsigma1, t255, t258, t260, t262;
  double t266, tvsigma2, t274, t278, tvlapl0, t286, t290, tvlapl1;
  double tvtau0, tvtau1;

  double t293, t294, t297, t298, t299, t302, t306, t307;
  double t311, t313, t319, t320, t323, t325, t328, t338;
  double t344, t348, t353, t354, t355, t358, t361, t365;
  double t366, t370, t372, t374, t377, t379, tv2rho20, t382;
  double t386, t390, t391, t395, t397, t405, t406, t410;
  double t414, t415, t419, t421, t428, t431, tv2rho21, t436;
  double t441, t445, t446, t452, t453, t458, t462, t463;
  double t473, t483, t489, t493, t498, tv2rho22, t506, t507;
  double t510, t512, t514, t519, tv2rhosigma0, tv2rhosigma1, t526, t528;
  double tv2rhosigma2, t534, tv2rhosigma3, tv2rhosigma4, t539, t542, t544, t546;
  double t551, tv2rhosigma5, t558, t562, t567, tv2rholapl0, t574, t576;
  double tv2rholapl1, t582, tv2rholapl2, t590, t595, tv2rholapl3, tv2rhotau0, tv2rhotau1;
  double tv2rhotau2, tv2rhotau3, t597, t598, t599, t600, t601, t603;
  double tv2sigma20, tv2sigma21, tv2sigma22, tv2sigma23, tv2sigma24, t604, t605, t606;
  double t607, t609, tv2sigma25, t610, t611, t612, t614, tv2sigmalapl0;
  double tv2sigmalapl1, tv2sigmalapl2, tv2sigmalapl3, tv2sigmalapl4, t615, t616, t617, t619;
  double tv2sigmalapl5, tv2sigmatau0, tv2sigmatau1, tv2sigmatau2, tv2sigmatau3, tv2sigmatau4, tv2sigmatau5, t620;
  double t621, t624, tv2lapl20, tv2lapl21, t625, t626, t629, tv2lapl22;
  double tv2lapltau0, tv2lapltau1, tv2lapltau2, tv2lapltau3, tv2tau20, tv2tau21, tv2tau22;


  t2 = rho[0] <= p->dens_threshold;
  t3 = M_CBRT3;
  t4 = t3 * t3;
  t5 = M_CBRTPI;
  t7 = t4 * t5 * M_PI;
  t8 = rho[0] + rho[1];
  t9 = 0.1e1 / t8;
  t12 = 0.2e1 * rho[0] * t9 <= p->zeta_threshold;
  t13 = p->zeta_threshold - 0.1e1;
  t16 = 0.2e1 * rho[1] * t9 <= p->zeta_threshold;
  t17 = -t13;
  t18 = rho[0] - rho[1];
  t20 = my_piecewise5(t12, t13, t16, t17, t18 * t9);
  t21 = 0.1e1 + t20;
  t22 = t21 <= p->zeta_threshold;
  t23 = POW_1_3(p->zeta_threshold);
  t24 = t23 * t23;
  t25 = t24 * p->zeta_threshold;
  t26 = POW_1_3(t21);
  t27 = t26 * t26;
  t29 = my_piecewise3(t22, t25, t27 * t21);
  t30 = POW_1_3(t8);
  t31 = t30 * t30;
  t32 = t29 * t31;
  t33 = M_CBRT6;
  t34 = M_PI * M_PI;
  t35 = POW_1_3(t34);
  t36 = t35 * t35;
  t38 = t33 / t36;
  t39 = rho[0] * rho[0];
  t40 = POW_1_3(rho[0]);
  t41 = t40 * t40;
  t43 = 0.1e1 / t41 / t39;
  t48 = 0.1e1 / t41 / rho[0];
  t52 = t33 * t33;
  t54 = 0.1e1 / t35 / t34;
  t55 = t52 * t54;
  t56 = lapl[0] * lapl[0];
  t57 = t39 * rho[0];
  t59 = 0.1e1 / t40 / t57;
  t63 = t39 * t39;
  t65 = 0.1e1 / t40 / t63;
  t66 = sigma[0] * t65;
  t70 = sigma[0] * sigma[0];
  t71 = t63 * rho[0];
  t73 = 0.1e1 / t40 / t71;
  t77 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[0] * t43 + 0.5e1 / 0.54e2 * t38 * lapl[0] * t48 + t55 * t56 * t59 / 0.5832e4 - t55 * t66 * lapl[0] / 0.5184e4 + t55 * t70 * t73 / 0.17496e5;
  t81 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t77);
  t82 = rho[1] <= p->dens_threshold;
  t83 = -t18;
  t85 = my_piecewise5(t16, t13, t12, t17, t83 * t9);
  t86 = 0.1e1 + t85;
  t87 = t86 <= p->zeta_threshold;
  t88 = POW_1_3(t86);
  t89 = t88 * t88;
  t91 = my_piecewise3(t87, t25, t89 * t86);
  t92 = t91 * t31;
  t93 = rho[1] * rho[1];
  t94 = POW_1_3(rho[1]);
  t95 = t94 * t94;
  t97 = 0.1e1 / t95 / t93;
  t102 = 0.1e1 / t95 / rho[1];
  t106 = lapl[1] * lapl[1];
  t107 = t93 * rho[1];
  t109 = 0.1e1 / t94 / t107;
  t113 = t93 * t93;
  t115 = 0.1e1 / t94 / t113;
  t116 = sigma[2] * t115;
  t120 = sigma[2] * sigma[2];
  t121 = t113 * rho[1];
  t123 = 0.1e1 / t94 / t121;
  t127 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[2] * t97 + 0.5e1 / 0.54e2 * t38 * lapl[1] * t102 + t55 * t106 * t109 / 0.5832e4 - t55 * t116 * lapl[1] / 0.5184e4 + t55 * t120 * t123 / 0.17496e5;
  t131 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t127);
  tzk0 = t81 + t131;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

  t132 = t8 * t8;
  t133 = 0.1e1 / t132;
  t134 = t18 * t133;
  t136 = my_piecewise5(t12, 0, t16, 0, t9 - t134);
  t139 = my_piecewise3(t22, 0, 0.5e1 / 0.3e1 * t27 * t136);
  t140 = t139 * t31;
  t144 = 0.1e1 / t30;
  t145 = t29 * t144;
  t148 = t7 * t145 * t77 / 0.1e2;
  t150 = 0.1e1 / t41 / t57;
  t160 = sigma[0] * t73;
  t164 = t63 * t39;
  t166 = 0.1e1 / t40 / t164;
  t170 = -0.5e1 / 0.243e3 * t38 * sigma[0] * t150 - 0.25e2 / 0.162e3 * t38 * lapl[0] * t43 - 0.5e1 / 0.8748e4 * t55 * t56 * t65 + 0.13e2 / 0.15552e5 * t55 * t160 * lapl[0] - 0.2e1 / 0.6561e4 * t55 * t70 * t166;
  t175 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t77 + t148 + 0.3e1 / 0.2e2 * t7 * t32 * t170);
  t176 = t83 * t133;
  t178 = my_piecewise5(t16, 0, t12, 0, -t9 - t176);
  t181 = my_piecewise3(t87, 0, 0.5e1 / 0.3e1 * t89 * t178);
  t182 = t181 * t31;
  t186 = t91 * t144;
  t189 = t7 * t186 * t127 / 0.1e2;
  t191 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t127 + t189);
  tvrho0 = t81 + t131 + t8 * (t175 + t191);

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 0] += tvrho0;

  t195 = my_piecewise5(t12, 0, t16, 0, -t9 - t134);
  t198 = my_piecewise3(t22, 0, 0.5e1 / 0.3e1 * t27 * t195);
  t199 = t198 * t31;
  t204 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t77 + t148);
  t206 = my_piecewise5(t16, 0, t12, 0, t9 - t176);
  t209 = my_piecewise3(t87, 0, 0.5e1 / 0.3e1 * t89 * t206);
  t210 = t209 * t31;
  t215 = 0.1e1 / t95 / t107;
  t225 = sigma[2] * t123;
  t229 = t113 * t93;
  t231 = 0.1e1 / t94 / t229;
  t235 = -0.5e1 / 0.243e3 * t38 * sigma[2] * t215 - 0.25e2 / 0.162e3 * t38 * lapl[1] * t97 - 0.5e1 / 0.8748e4 * t55 * t106 * t115 + 0.13e2 / 0.15552e5 * t55 * t225 * lapl[1] - 0.2e1 / 0.6561e4 * t55 * t120 * t231;
  t240 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t127 + t189 + 0.3e1 / 0.2e2 * t7 * t92 * t235);
  tvrho1 = t81 + t131 + t8 * (t204 + t240);

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 1] += tvrho1;

  t243 = t38 * t43;
  t246 = t55 * t65 * lapl[0];
  t248 = t55 * t160;
  t250 = 0.5e1 / 0.648e3 * t243 - t246 / 0.5184e4 + t248 / 0.8748e4;
  t254 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t250);
  tvsigma0 = t8 * t254;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 0] += tvsigma0;

  tvsigma1 = 0.e0;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 1] += tvsigma1;

  t255 = t38 * t97;
  t258 = t55 * t115 * lapl[1];
  t260 = t55 * t225;
  t262 = 0.5e1 / 0.648e3 * t255 - t258 / 0.5184e4 + t260 / 0.8748e4;
  t266 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t262);
  tvsigma2 = t8 * t266;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 2] += tvsigma2;

  t274 = 0.5e1 / 0.54e2 * t38 * t48 + t55 * lapl[0] * t59 / 0.2916e4 - t55 * t66 / 0.5184e4;
  t278 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t274);
  tvlapl0 = t8 * t278;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 0] += tvlapl0;

  t286 = 0.5e1 / 0.54e2 * t38 * t102 + t55 * lapl[1] * t109 / 0.2916e4 - t55 * t116 / 0.5184e4;
  t290 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t286);
  tvlapl1 = t8 * t290;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 1] += tvlapl1;

  tvtau0 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 0] += tvtau0;

  tvtau1 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 1] += tvtau1;

  t293 = 0.1e1 / t26;
  t294 = t136 * t136;
  t297 = t132 * t8;
  t298 = 0.1e1 / t297;
  t299 = t18 * t298;
  t302 = my_piecewise5(t12, 0, t16, 0, -0.2e1 * t133 + 0.2e1 * t299);
  t306 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t293 * t294 + 0.5e1 / 0.3e1 * t27 * t302);
  t307 = t306 * t31;
  t311 = t139 * t144;
  t313 = t7 * t311 * t77;
  t319 = 0.1e1 / t30 / t8;
  t320 = t29 * t319;
  t323 = t7 * t320 * t77 / 0.3e2;
  t325 = t7 * t145 * t170;
  t328 = 0.1e1 / t41 / t63;
  t338 = sigma[0] * t166;
  t344 = 0.1e1 / t40 / t63 / t57;
  t348 = 0.55e2 / 0.729e3 * t38 * sigma[0] * t328 + 0.1e3 / 0.243e3 * t38 * lapl[0] * t150 + 0.65e2 / 0.26244e5 * t55 * t56 * t73 - 0.13e2 / 0.2916e4 * t55 * t338 * lapl[0] + 0.38e2 / 0.19683e5 * t55 * t70 * t344;
  t353 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t307 * t77 + t313 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t140 * t170 - t323 + t325 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t32 * t348);
  t354 = 0.1e1 / t88;
  t355 = t178 * t178;
  t358 = t83 * t298;
  t361 = my_piecewise5(t16, 0, t12, 0, 0.2e1 * t133 + 0.2e1 * t358);
  t365 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t354 * t355 + 0.5e1 / 0.3e1 * t89 * t361);
  t366 = t365 * t31;
  t370 = t181 * t144;
  t372 = t7 * t370 * t127;
  t374 = t91 * t319;
  t377 = t7 * t374 * t127 / 0.3e2;
  t379 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t366 * t127 + t372 / 0.5e1 - t377);
  tv2rho20 = 0.2e1 * t175 + 0.2e1 * t191 + t8 * (t353 + t379);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 0] += tv2rho20;

  t382 = t293 * t195;
  t386 = my_piecewise5(t12, 0, t16, 0, 0.2e1 * t299);
  t390 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t382 * t136 + 0.5e1 / 0.3e1 * t27 * t386);
  t391 = t390 * t31;
  t395 = t198 * t144;
  t397 = t7 * t395 * t77;
  t405 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t391 * t77 + t397 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t199 * t170 + t313 / 0.1e2 - t323 + t325 / 0.1e2);
  t406 = t354 * t206;
  t410 = my_piecewise5(t16, 0, t12, 0, 0.2e1 * t358);
  t414 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t406 * t178 + 0.5e1 / 0.3e1 * t89 * t410);
  t415 = t414 * t31;
  t419 = t209 * t144;
  t421 = t7 * t419 * t127;
  t428 = t7 * t186 * t235;
  t431 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t415 * t127 + t421 / 0.1e2 + t372 / 0.1e2 - t377 + 0.3e1 / 0.2e2 * t7 * t182 * t235 + t428 / 0.1e2);
  tv2rho21 = t175 + t191 + t204 + t240 + t8 * (t405 + t431);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 1] += tv2rho21;

  t436 = t195 * t195;
  t441 = my_piecewise5(t12, 0, t16, 0, 0.2e1 * t133 + 0.2e1 * t299);
  t445 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t293 * t436 + 0.5e1 / 0.3e1 * t27 * t441);
  t446 = t445 * t31;
  t452 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t446 * t77 + t397 / 0.5e1 - t323);
  t453 = t206 * t206;
  t458 = my_piecewise5(t16, 0, t12, 0, -0.2e1 * t133 + 0.2e1 * t358);
  t462 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t354 * t453 + 0.5e1 / 0.3e1 * t89 * t458);
  t463 = t462 * t31;
  t473 = 0.1e1 / t95 / t113;
  t483 = sigma[2] * t231;
  t489 = 0.1e1 / t94 / t113 / t107;
  t493 = 0.55e2 / 0.729e3 * t38 * sigma[2] * t473 + 0.1e3 / 0.243e3 * t38 * lapl[1] * t215 + 0.65e2 / 0.26244e5 * t55 * t106 * t123 - 0.13e2 / 0.2916e4 * t55 * t483 * lapl[1] + 0.38e2 / 0.19683e5 * t55 * t120 * t489;
  t498 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t463 * t127 + t421 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t210 * t235 - t377 + t428 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t92 * t493);
  tv2rho22 = 0.2e1 * t204 + 0.2e1 * t240 + t8 * (t452 + t498);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 2] += tv2rho22;

  t506 = t7 * t145 * t250 / 0.1e2;
  t507 = t38 * t150;
  t510 = t55 * t73 * lapl[0];
  t512 = t55 * t338;
  t514 = -0.5e1 / 0.243e3 * t507 + 0.13e2 / 0.15552e5 * t510 - 0.4e1 / 0.6561e4 * t512;
  t519 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t250 + t506 + 0.3e1 / 0.2e2 * t7 * t32 * t514);
  tv2rhosigma0 = t8 * t519 + t254;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 0] += tv2rhosigma0;

  tv2rhosigma1 = 0.e0;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 1] += tv2rhosigma1;

  t526 = t7 * t186 * t262 / 0.1e2;
  t528 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t262 + t526);
  tv2rhosigma2 = t8 * t528 + t266;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 2] += tv2rhosigma2;

  t534 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t250 + t506);
  tv2rhosigma3 = t8 * t534 + t254;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 3] += tv2rhosigma3;

  tv2rhosigma4 = 0.e0;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 4] += tv2rhosigma4;

  t539 = t38 * t215;
  t542 = t55 * t123 * lapl[1];
  t544 = t55 * t483;
  t546 = -0.5e1 / 0.243e3 * t539 + 0.13e2 / 0.15552e5 * t542 - 0.4e1 / 0.6561e4 * t544;
  t551 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t262 + t526 + 0.3e1 / 0.2e2 * t7 * t92 * t546);
  tv2rhosigma5 = t8 * t551 + t266;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 5] += tv2rhosigma5;

  t558 = t7 * t145 * t274 / 0.1e2;
  t562 = -0.25e2 / 0.162e3 * t243 - 0.5e1 / 0.4374e4 * t246 + 0.13e2 / 0.15552e5 * t248;
  t567 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t274 + t558 + 0.3e1 / 0.2e2 * t7 * t32 * t562);
  tv2rholapl0 = t8 * t567 + t278;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 0] += tv2rholapl0;

  t574 = t7 * t186 * t286 / 0.1e2;
  t576 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t286 + t574);
  tv2rholapl1 = t8 * t576 + t290;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 1] += tv2rholapl1;

  t582 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t274 + t558);
  tv2rholapl2 = t8 * t582 + t278;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 2] += tv2rholapl2;

  t590 = -0.25e2 / 0.162e3 * t255 - 0.5e1 / 0.4374e4 * t258 + 0.13e2 / 0.15552e5 * t260;
  t595 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t286 + t574 + 0.3e1 / 0.2e2 * t7 * t92 * t590);
  tv2rholapl3 = t8 * t595 + t290;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 3] += tv2rholapl3;

  tv2rhotau0 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 0] += tv2rhotau0;

  tv2rhotau1 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 1] += tv2rhotau1;

  tv2rhotau2 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 2] += tv2rhotau2;

  tv2rhotau3 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 3] += tv2rhotau3;

  t597 = t7 * t29;
  t598 = t31 * t52;
  t599 = t54 * t73;
  t600 = t598 * t599;
  t601 = t597 * t600;
  t603 = my_piecewise3(t2, 0, t601 / 0.5832e5);
  tv2sigma20 = t8 * t603;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 0] += tv2sigma20;

  tv2sigma21 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 1] += tv2sigma21;

  tv2sigma22 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 2] += tv2sigma22;

  tv2sigma23 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 3] += tv2sigma23;

  tv2sigma24 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 4] += tv2sigma24;

  t604 = t7 * t91;
  t605 = t54 * t123;
  t606 = t598 * t605;
  t607 = t604 * t606;
  t609 = my_piecewise3(t82, 0, t607 / 0.5832e5);
  tv2sigma25 = t8 * t609;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 5] += tv2sigma25;

  t610 = t54 * t65;
  t611 = t598 * t610;
  t612 = t597 * t611;
  t614 = my_piecewise3(t2, 0, -t612 / 0.3456e5);
  tv2sigmalapl0 = t8 * t614;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 0] += tv2sigmalapl0;

  tv2sigmalapl1 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 1] += tv2sigmalapl1;

  tv2sigmalapl2 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 2] += tv2sigmalapl2;

  tv2sigmalapl3 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 3] += tv2sigmalapl3;

  tv2sigmalapl4 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 4] += tv2sigmalapl4;

  t615 = t54 * t115;
  t616 = t598 * t615;
  t617 = t604 * t616;
  t619 = my_piecewise3(t82, 0, -t617 / 0.3456e5);
  tv2sigmalapl5 = t8 * t619;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 5] += tv2sigmalapl5;

  tv2sigmatau0 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 0] += tv2sigmatau0;

  tv2sigmatau1 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 1] += tv2sigmatau1;

  tv2sigmatau2 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 2] += tv2sigmatau2;

  tv2sigmatau3 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 3] += tv2sigmatau3;

  tv2sigmatau4 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 4] += tv2sigmatau4;

  tv2sigmatau5 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 5] += tv2sigmatau5;

  t620 = t54 * t59;
  t621 = t598 * t620;
  t624 = my_piecewise3(t2, 0, t597 * t621 / 0.1944e5);
  tv2lapl20 = t8 * t624;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 0] += tv2lapl20;

  tv2lapl21 = 0.e0;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 1] += tv2lapl21;

  t625 = t54 * t109;
  t626 = t598 * t625;
  t629 = my_piecewise3(t82, 0, t604 * t626 / 0.1944e5);
  tv2lapl22 = t8 * t629;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 2] += tv2lapl22;

  tv2lapltau0 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 0] += tv2lapltau0;

  tv2lapltau1 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 1] += tv2lapltau1;

  tv2lapltau2 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 2] += tv2lapltau2;

  tv2lapltau3 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 3] += tv2lapltau3;

  tv2tau20 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 0] += tv2tau20;

  tv2tau21 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 1] += tv2tau21;

  tv2tau22 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 2] += tv2tau22;

}

#endif


#ifndef XC_DONT_COMPILE_KXC
GPU_DEVICE_FUNCTION static inline void
func_kxc_pol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t2, t3, t4, t5, t7, t8, t9, t12;
  double t13, t16, t17, t18, t20, t21, t22, t23;
  double t24, t25, t26, t27, t29, t30, t31, t32;
  double t33, t34, t35, t36, t38, t39, t40, t41;
  double t43, t48, t52, t54, t55, t56, t57, t59;
  double t63, t65, t66, t70, t71, t73, t77, t81;
  double t82, t83, t85, t86, t87, t88, t89, t91;
  double t92, t93, t94, t95, t97, t102, t106, t107;
  double t109, t113, t115, t116, t120, t121, t123, t127;
  double t131, tzk0;

  double t132, t133, t134, t136, t139, t140, t144, t145;
  double t148, t150, t160, t164, t166, t170, t175, t176;
  double t178, t181, t182, t186, t189, t191, tvrho0, t195;
  double t198, t199, t204, t206, t209, t210, t215, t225;
  double t229, t231, t235, t240, tvrho1, t243, t246, t248;
  double t250, t254, tvsigma0, tvsigma1, t255, t258, t260, t262;
  double t266, tvsigma2, t274, t278, tvlapl0, t286, t290, tvlapl1;
  double tvtau0, tvtau1;

  double t293, t294, t297, t298, t299, t302, t306, t307;
  double t311, t313, t319, t320, t323, t325, t328, t338;
  double t344, t348, t353, t354, t355, t358, t361, t365;
  double t366, t370, t372, t374, t377, t379, tv2rho20, t382;
  double t386, t390, t391, t395, t397, t405, t406, t410;
  double t414, t415, t419, t421, t428, t431, tv2rho21, t436;
  double t441, t445, t446, t452, t453, t458, t462, t463;
  double t473, t483, t489, t493, t498, tv2rho22, t506, t507;
  double t510, t512, t514, t519, tv2rhosigma0, tv2rhosigma1, t526, t528;
  double tv2rhosigma2, t534, tv2rhosigma3, tv2rhosigma4, t539, t542, t544, t546;
  double t551, tv2rhosigma5, t558, t562, t567, tv2rholapl0, t574, t576;
  double tv2rholapl1, t582, tv2rholapl2, t590, t595, tv2rholapl3, tv2rhotau0, tv2rhotau1;
  double tv2rhotau2, tv2rhotau3, t597, t598, t599, t600, t601, t603;
  double tv2sigma20, tv2sigma21, tv2sigma22, tv2sigma23, tv2sigma24, t604, t605, t606;
  double t607, t609, tv2sigma25, t610, t611, t612, t614, tv2sigmalapl0;
  double tv2sigmalapl1, tv2sigmalapl2, tv2sigmalapl3, tv2sigmalapl4, t615, t616, t617, t619;
  double tv2sigmalapl5, tv2sigmatau0, tv2sigmatau1, tv2sigmatau2, tv2sigmatau3, tv2sigmatau4, tv2sigmatau5, t620;
  double t621, t624, tv2lapl20, tv2lapl21, t625, t626, t629, tv2lapl22;
  double tv2lapltau0, tv2lapltau1, tv2lapltau2, tv2lapltau3, tv2tau20, tv2tau21, tv2tau22;

  double t633, t634, t637, t640, t641, t642, t645, t649;
  double t650, t654, t656, t661, t663, t666, t672, t673;
  double t676, t678, t681, t684, t694, t698, t700, t704;
  double t709, t711, t712, t715, t718, t721, t725, t726;
  double t730, t732, t734, t736, t738, t741, t743, tv3rho30;
  double t746, t747, t748, t751, t756, t757, t759, t763;
  double t764, t768, t771, t775, t777, t781, t790, t791;
  double t792, t795, t800, t802, t806, t807, t811, t814;
  double t815, t817, t826, t828, t831, tv3rho31, t834, t839;
  double t843, t847, t848, t852, t854, t863, t864, t869;
  double t873, t877, t878, t882, t884, t891, t899, t901;
  double t902, tv3rho32, t907, t914, t918, t919, t926, t927;
  double t934, t938, t939, t955, t965, t969, t971, t975;
  double t980, tv3rho33, t988, t995, t997, t999, t1002, t1004;
  double t1006, t1011, tv3rho2sigma0, tv3rho2sigma1, t1018, t1022, t1024, tv3rho2sigma2;
  double t1030, t1038, tv3rho2sigma3, tv3rho2sigma4, t1044, t1051, t1054, tv3rho2sigma5;
  double t1062, tv3rho2sigma6, tv3rho2sigma7, t1073, t1076, t1078, t1080, t1085;
  double tv3rho2sigma8, t1092, t1099, t1101, t1106, t1111, tv3rho2lapl0, t1118;
  double t1122, t1124, tv3rho2lapl1, t1130, t1138, tv3rho2lapl2, t1144, t1151;
  double t1154, tv3rho2lapl3, t1162, tv3rho2lapl4, t1176, t1181, tv3rho2lapl5, tv3rho2tau0;
  double tv3rho2tau1, tv3rho2tau2, tv3rho2tau3, tv3rho2tau4, tv3rho2tau5, t1183, t1184, t1186;
  double t1187, t1188, t1189, t1190, t1191, t1192, t1195, tv3rhosigma20;
  double tv3rhosigma21, tv3rhosigma22, tv3rhosigma23, tv3rhosigma24, t1197, t1198, t1200, t1201;
  double t1202, t1204, tv3rhosigma25, t1206, t1207, t1210, tv3rhosigma26, tv3rhosigma27;
  double tv3rhosigma28, tv3rhosigma29, tv3rhosigma210, t1212, t1213, t1215, t1216, t1217;
  double t1220, tv3rhosigma211, t1222, t1224, t1225, t1226, t1229, tv3rhosigmalapl0;
  double tv3rhosigmalapl1, tv3rhosigmalapl2, tv3rhosigmalapl3, tv3rhosigmalapl4, t1231, t1233, t1234, t1235;
  double t1237, tv3rhosigmalapl5, t1239, t1242, tv3rhosigmalapl6, tv3rhosigmalapl7, tv3rhosigmalapl8, tv3rhosigmalapl9;
  double tv3rhosigmalapl10, t1244, t1248, tv3rhosigmalapl11, tv3rhosigmatau0, tv3rhosigmatau1, tv3rhosigmatau2, tv3rhosigmatau3;
  double tv3rhosigmatau4, tv3rhosigmatau5, tv3rhosigmatau6, tv3rhosigmatau7, tv3rhosigmatau8, tv3rhosigmatau9, tv3rhosigmatau10, tv3rhosigmatau11;
  double t1252, t1254, t1257, tv3rholapl20, tv3rholapl21, t1261, t1263, t1265;
  double tv3rholapl22, t1270, tv3rholapl23, tv3rholapl24, t1276, tv3rholapl25, tv3rholapltau0, tv3rholapltau1;
  double tv3rholapltau2, tv3rholapltau3, tv3rholapltau4, tv3rholapltau5, tv3rholapltau6, tv3rholapltau7, tv3rhotau20, tv3rhotau21;
  double tv3rhotau22, tv3rhotau23, tv3rhotau24, tv3rhotau25, tv3sigma30, tv3sigma31, tv3sigma32, tv3sigma33;
  double tv3sigma34, tv3sigma35, tv3sigma36, tv3sigma37, tv3sigma38, tv3sigma39, tv3sigma2lapl0, tv3sigma2lapl1;
  double tv3sigma2lapl2, tv3sigma2lapl3, tv3sigma2lapl4, tv3sigma2lapl5, tv3sigma2lapl6, tv3sigma2lapl7, tv3sigma2lapl8, tv3sigma2lapl9;
  double tv3sigma2lapl10, tv3sigma2lapl11, tv3sigma2tau0, tv3sigma2tau1, tv3sigma2tau2, tv3sigma2tau3, tv3sigma2tau4, tv3sigma2tau5;
  double tv3sigma2tau6, tv3sigma2tau7, tv3sigma2tau8, tv3sigma2tau9, tv3sigma2tau10, tv3sigma2tau11, tv3sigmalapl20, tv3sigmalapl21;
  double tv3sigmalapl22, tv3sigmalapl23, tv3sigmalapl24, tv3sigmalapl25, tv3sigmalapl26, tv3sigmalapl27, tv3sigmalapl28, tv3sigmalapltau0;
  double tv3sigmalapltau1, tv3sigmalapltau2, tv3sigmalapltau3, tv3sigmalapltau4, tv3sigmalapltau5, tv3sigmalapltau6, tv3sigmalapltau7, tv3sigmalapltau8;
  double tv3sigmalapltau9, tv3sigmalapltau10, tv3sigmalapltau11, tv3sigmatau20, tv3sigmatau21, tv3sigmatau22, tv3sigmatau23, tv3sigmatau24;
  double tv3sigmatau25, tv3sigmatau26, tv3sigmatau27, tv3sigmatau28, tv3lapl30, tv3lapl31, tv3lapl32, tv3lapl33;
  double tv3lapl2tau0, tv3lapl2tau1, tv3lapl2tau2, tv3lapl2tau3, tv3lapl2tau4, tv3lapl2tau5, tv3lapltau20, tv3lapltau21;
  double tv3lapltau22, tv3lapltau23, tv3lapltau24, tv3lapltau25, tv3tau30, tv3tau31, tv3tau32, tv3tau33;


  t2 = rho[0] <= p->dens_threshold;
  t3 = M_CBRT3;
  t4 = t3 * t3;
  t5 = M_CBRTPI;
  t7 = t4 * t5 * M_PI;
  t8 = rho[0] + rho[1];
  t9 = 0.1e1 / t8;
  t12 = 0.2e1 * rho[0] * t9 <= p->zeta_threshold;
  t13 = p->zeta_threshold - 0.1e1;
  t16 = 0.2e1 * rho[1] * t9 <= p->zeta_threshold;
  t17 = -t13;
  t18 = rho[0] - rho[1];
  t20 = my_piecewise5(t12, t13, t16, t17, t18 * t9);
  t21 = 0.1e1 + t20;
  t22 = t21 <= p->zeta_threshold;
  t23 = POW_1_3(p->zeta_threshold);
  t24 = t23 * t23;
  t25 = t24 * p->zeta_threshold;
  t26 = POW_1_3(t21);
  t27 = t26 * t26;
  t29 = my_piecewise3(t22, t25, t27 * t21);
  t30 = POW_1_3(t8);
  t31 = t30 * t30;
  t32 = t29 * t31;
  t33 = M_CBRT6;
  t34 = M_PI * M_PI;
  t35 = POW_1_3(t34);
  t36 = t35 * t35;
  t38 = t33 / t36;
  t39 = rho[0] * rho[0];
  t40 = POW_1_3(rho[0]);
  t41 = t40 * t40;
  t43 = 0.1e1 / t41 / t39;
  t48 = 0.1e1 / t41 / rho[0];
  t52 = t33 * t33;
  t54 = 0.1e1 / t35 / t34;
  t55 = t52 * t54;
  t56 = lapl[0] * lapl[0];
  t57 = t39 * rho[0];
  t59 = 0.1e1 / t40 / t57;
  t63 = t39 * t39;
  t65 = 0.1e1 / t40 / t63;
  t66 = sigma[0] * t65;
  t70 = sigma[0] * sigma[0];
  t71 = t63 * rho[0];
  t73 = 0.1e1 / t40 / t71;
  t77 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[0] * t43 + 0.5e1 / 0.54e2 * t38 * lapl[0] * t48 + t55 * t56 * t59 / 0.5832e4 - t55 * t66 * lapl[0] / 0.5184e4 + t55 * t70 * t73 / 0.17496e5;
  t81 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t77);
  t82 = rho[1] <= p->dens_threshold;
  t83 = -t18;
  t85 = my_piecewise5(t16, t13, t12, t17, t83 * t9);
  t86 = 0.1e1 + t85;
  t87 = t86 <= p->zeta_threshold;
  t88 = POW_1_3(t86);
  t89 = t88 * t88;
  t91 = my_piecewise3(t87, t25, t89 * t86);
  t92 = t91 * t31;
  t93 = rho[1] * rho[1];
  t94 = POW_1_3(rho[1]);
  t95 = t94 * t94;
  t97 = 0.1e1 / t95 / t93;
  t102 = 0.1e1 / t95 / rho[1];
  t106 = lapl[1] * lapl[1];
  t107 = t93 * rho[1];
  t109 = 0.1e1 / t94 / t107;
  t113 = t93 * t93;
  t115 = 0.1e1 / t94 / t113;
  t116 = sigma[2] * t115;
  t120 = sigma[2] * sigma[2];
  t121 = t113 * rho[1];
  t123 = 0.1e1 / t94 / t121;
  t127 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[2] * t97 + 0.5e1 / 0.54e2 * t38 * lapl[1] * t102 + t55 * t106 * t109 / 0.5832e4 - t55 * t116 * lapl[1] / 0.5184e4 + t55 * t120 * t123 / 0.17496e5;
  t131 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t127);
  tzk0 = t81 + t131;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

  t132 = t8 * t8;
  t133 = 0.1e1 / t132;
  t134 = t18 * t133;
  t136 = my_piecewise5(t12, 0, t16, 0, t9 - t134);
  t139 = my_piecewise3(t22, 0, 0.5e1 / 0.3e1 * t27 * t136);
  t140 = t139 * t31;
  t144 = 0.1e1 / t30;
  t145 = t29 * t144;
  t148 = t7 * t145 * t77 / 0.1e2;
  t150 = 0.1e1 / t41 / t57;
  t160 = sigma[0] * t73;
  t164 = t63 * t39;
  t166 = 0.1e1 / t40 / t164;
  t170 = -0.5e1 / 0.243e3 * t38 * sigma[0] * t150 - 0.25e2 / 0.162e3 * t38 * lapl[0] * t43 - 0.5e1 / 0.8748e4 * t55 * t56 * t65 + 0.13e2 / 0.15552e5 * t55 * t160 * lapl[0] - 0.2e1 / 0.6561e4 * t55 * t70 * t166;
  t175 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t77 + t148 + 0.3e1 / 0.2e2 * t7 * t32 * t170);
  t176 = t83 * t133;
  t178 = my_piecewise5(t16, 0, t12, 0, -t9 - t176);
  t181 = my_piecewise3(t87, 0, 0.5e1 / 0.3e1 * t89 * t178);
  t182 = t181 * t31;
  t186 = t91 * t144;
  t189 = t7 * t186 * t127 / 0.1e2;
  t191 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t127 + t189);
  tvrho0 = t81 + t131 + t8 * (t175 + t191);

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 0] += tvrho0;

  t195 = my_piecewise5(t12, 0, t16, 0, -t9 - t134);
  t198 = my_piecewise3(t22, 0, 0.5e1 / 0.3e1 * t27 * t195);
  t199 = t198 * t31;
  t204 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t77 + t148);
  t206 = my_piecewise5(t16, 0, t12, 0, t9 - t176);
  t209 = my_piecewise3(t87, 0, 0.5e1 / 0.3e1 * t89 * t206);
  t210 = t209 * t31;
  t215 = 0.1e1 / t95 / t107;
  t225 = sigma[2] * t123;
  t229 = t113 * t93;
  t231 = 0.1e1 / t94 / t229;
  t235 = -0.5e1 / 0.243e3 * t38 * sigma[2] * t215 - 0.25e2 / 0.162e3 * t38 * lapl[1] * t97 - 0.5e1 / 0.8748e4 * t55 * t106 * t115 + 0.13e2 / 0.15552e5 * t55 * t225 * lapl[1] - 0.2e1 / 0.6561e4 * t55 * t120 * t231;
  t240 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t127 + t189 + 0.3e1 / 0.2e2 * t7 * t92 * t235);
  tvrho1 = t81 + t131 + t8 * (t204 + t240);

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 1] += tvrho1;

  t243 = t38 * t43;
  t246 = t55 * t65 * lapl[0];
  t248 = t55 * t160;
  t250 = 0.5e1 / 0.648e3 * t243 - t246 / 0.5184e4 + t248 / 0.8748e4;
  t254 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t250);
  tvsigma0 = t8 * t254;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 0] += tvsigma0;

  tvsigma1 = 0.e0;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 1] += tvsigma1;

  t255 = t38 * t97;
  t258 = t55 * t115 * lapl[1];
  t260 = t55 * t225;
  t262 = 0.5e1 / 0.648e3 * t255 - t258 / 0.5184e4 + t260 / 0.8748e4;
  t266 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t262);
  tvsigma2 = t8 * t266;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 2] += tvsigma2;

  t274 = 0.5e1 / 0.54e2 * t38 * t48 + t55 * lapl[0] * t59 / 0.2916e4 - t55 * t66 / 0.5184e4;
  t278 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t274);
  tvlapl0 = t8 * t278;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 0] += tvlapl0;

  t286 = 0.5e1 / 0.54e2 * t38 * t102 + t55 * lapl[1] * t109 / 0.2916e4 - t55 * t116 / 0.5184e4;
  t290 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t286);
  tvlapl1 = t8 * t290;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 1] += tvlapl1;

  tvtau0 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 0] += tvtau0;

  tvtau1 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 1] += tvtau1;

  t293 = 0.1e1 / t26;
  t294 = t136 * t136;
  t297 = t132 * t8;
  t298 = 0.1e1 / t297;
  t299 = t18 * t298;
  t302 = my_piecewise5(t12, 0, t16, 0, -0.2e1 * t133 + 0.2e1 * t299);
  t306 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t293 * t294 + 0.5e1 / 0.3e1 * t27 * t302);
  t307 = t306 * t31;
  t311 = t139 * t144;
  t313 = t7 * t311 * t77;
  t319 = 0.1e1 / t30 / t8;
  t320 = t29 * t319;
  t323 = t7 * t320 * t77 / 0.3e2;
  t325 = t7 * t145 * t170;
  t328 = 0.1e1 / t41 / t63;
  t338 = sigma[0] * t166;
  t344 = 0.1e1 / t40 / t63 / t57;
  t348 = 0.55e2 / 0.729e3 * t38 * sigma[0] * t328 + 0.1e3 / 0.243e3 * t38 * lapl[0] * t150 + 0.65e2 / 0.26244e5 * t55 * t56 * t73 - 0.13e2 / 0.2916e4 * t55 * t338 * lapl[0] + 0.38e2 / 0.19683e5 * t55 * t70 * t344;
  t353 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t307 * t77 + t313 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t140 * t170 - t323 + t325 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t32 * t348);
  t354 = 0.1e1 / t88;
  t355 = t178 * t178;
  t358 = t83 * t298;
  t361 = my_piecewise5(t16, 0, t12, 0, 0.2e1 * t133 + 0.2e1 * t358);
  t365 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t354 * t355 + 0.5e1 / 0.3e1 * t89 * t361);
  t366 = t365 * t31;
  t370 = t181 * t144;
  t372 = t7 * t370 * t127;
  t374 = t91 * t319;
  t377 = t7 * t374 * t127 / 0.3e2;
  t379 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t366 * t127 + t372 / 0.5e1 - t377);
  tv2rho20 = 0.2e1 * t175 + 0.2e1 * t191 + t8 * (t353 + t379);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 0] += tv2rho20;

  t382 = t293 * t195;
  t386 = my_piecewise5(t12, 0, t16, 0, 0.2e1 * t299);
  t390 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t382 * t136 + 0.5e1 / 0.3e1 * t27 * t386);
  t391 = t390 * t31;
  t395 = t198 * t144;
  t397 = t7 * t395 * t77;
  t405 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t391 * t77 + t397 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t199 * t170 + t313 / 0.1e2 - t323 + t325 / 0.1e2);
  t406 = t354 * t206;
  t410 = my_piecewise5(t16, 0, t12, 0, 0.2e1 * t358);
  t414 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t406 * t178 + 0.5e1 / 0.3e1 * t89 * t410);
  t415 = t414 * t31;
  t419 = t209 * t144;
  t421 = t7 * t419 * t127;
  t428 = t7 * t186 * t235;
  t431 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t415 * t127 + t421 / 0.1e2 + t372 / 0.1e2 - t377 + 0.3e1 / 0.2e2 * t7 * t182 * t235 + t428 / 0.1e2);
  tv2rho21 = t175 + t191 + t204 + t240 + t8 * (t405 + t431);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 1] += tv2rho21;

  t436 = t195 * t195;
  t441 = my_piecewise5(t12, 0, t16, 0, 0.2e1 * t133 + 0.2e1 * t299);
  t445 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t293 * t436 + 0.5e1 / 0.3e1 * t27 * t441);
  t446 = t445 * t31;
  t452 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t446 * t77 + t397 / 0.5e1 - t323);
  t453 = t206 * t206;
  t458 = my_piecewise5(t16, 0, t12, 0, -0.2e1 * t133 + 0.2e1 * t358);
  t462 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t354 * t453 + 0.5e1 / 0.3e1 * t89 * t458);
  t463 = t462 * t31;
  t473 = 0.1e1 / t95 / t113;
  t483 = sigma[2] * t231;
  t489 = 0.1e1 / t94 / t113 / t107;
  t493 = 0.55e2 / 0.729e3 * t38 * sigma[2] * t473 + 0.1e3 / 0.243e3 * t38 * lapl[1] * t215 + 0.65e2 / 0.26244e5 * t55 * t106 * t123 - 0.13e2 / 0.2916e4 * t55 * t483 * lapl[1] + 0.38e2 / 0.19683e5 * t55 * t120 * t489;
  t498 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t463 * t127 + t421 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t210 * t235 - t377 + t428 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t92 * t493);
  tv2rho22 = 0.2e1 * t204 + 0.2e1 * t240 + t8 * (t452 + t498);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 2] += tv2rho22;

  t506 = t7 * t145 * t250 / 0.1e2;
  t507 = t38 * t150;
  t510 = t55 * t73 * lapl[0];
  t512 = t55 * t338;
  t514 = -0.5e1 / 0.243e3 * t507 + 0.13e2 / 0.15552e5 * t510 - 0.4e1 / 0.6561e4 * t512;
  t519 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t250 + t506 + 0.3e1 / 0.2e2 * t7 * t32 * t514);
  tv2rhosigma0 = t8 * t519 + t254;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 0] += tv2rhosigma0;

  tv2rhosigma1 = 0.e0;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 1] += tv2rhosigma1;

  t526 = t7 * t186 * t262 / 0.1e2;
  t528 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t262 + t526);
  tv2rhosigma2 = t8 * t528 + t266;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 2] += tv2rhosigma2;

  t534 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t250 + t506);
  tv2rhosigma3 = t8 * t534 + t254;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 3] += tv2rhosigma3;

  tv2rhosigma4 = 0.e0;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 4] += tv2rhosigma4;

  t539 = t38 * t215;
  t542 = t55 * t123 * lapl[1];
  t544 = t55 * t483;
  t546 = -0.5e1 / 0.243e3 * t539 + 0.13e2 / 0.15552e5 * t542 - 0.4e1 / 0.6561e4 * t544;
  t551 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t262 + t526 + 0.3e1 / 0.2e2 * t7 * t92 * t546);
  tv2rhosigma5 = t8 * t551 + t266;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 5] += tv2rhosigma5;

  t558 = t7 * t145 * t274 / 0.1e2;
  t562 = -0.25e2 / 0.162e3 * t243 - 0.5e1 / 0.4374e4 * t246 + 0.13e2 / 0.15552e5 * t248;
  t567 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t274 + t558 + 0.3e1 / 0.2e2 * t7 * t32 * t562);
  tv2rholapl0 = t8 * t567 + t278;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 0] += tv2rholapl0;

  t574 = t7 * t186 * t286 / 0.1e2;
  t576 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t286 + t574);
  tv2rholapl1 = t8 * t576 + t290;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 1] += tv2rholapl1;

  t582 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t274 + t558);
  tv2rholapl2 = t8 * t582 + t278;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 2] += tv2rholapl2;

  t590 = -0.25e2 / 0.162e3 * t255 - 0.5e1 / 0.4374e4 * t258 + 0.13e2 / 0.15552e5 * t260;
  t595 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t286 + t574 + 0.3e1 / 0.2e2 * t7 * t92 * t590);
  tv2rholapl3 = t8 * t595 + t290;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 3] += tv2rholapl3;

  tv2rhotau0 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 0] += tv2rhotau0;

  tv2rhotau1 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 1] += tv2rhotau1;

  tv2rhotau2 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 2] += tv2rhotau2;

  tv2rhotau3 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 3] += tv2rhotau3;

  t597 = t7 * t29;
  t598 = t31 * t52;
  t599 = t54 * t73;
  t600 = t598 * t599;
  t601 = t597 * t600;
  t603 = my_piecewise3(t2, 0, t601 / 0.5832e5);
  tv2sigma20 = t8 * t603;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 0] += tv2sigma20;

  tv2sigma21 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 1] += tv2sigma21;

  tv2sigma22 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 2] += tv2sigma22;

  tv2sigma23 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 3] += tv2sigma23;

  tv2sigma24 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 4] += tv2sigma24;

  t604 = t7 * t91;
  t605 = t54 * t123;
  t606 = t598 * t605;
  t607 = t604 * t606;
  t609 = my_piecewise3(t82, 0, t607 / 0.5832e5);
  tv2sigma25 = t8 * t609;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 5] += tv2sigma25;

  t610 = t54 * t65;
  t611 = t598 * t610;
  t612 = t597 * t611;
  t614 = my_piecewise3(t2, 0, -t612 / 0.3456e5);
  tv2sigmalapl0 = t8 * t614;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 0] += tv2sigmalapl0;

  tv2sigmalapl1 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 1] += tv2sigmalapl1;

  tv2sigmalapl2 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 2] += tv2sigmalapl2;

  tv2sigmalapl3 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 3] += tv2sigmalapl3;

  tv2sigmalapl4 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 4] += tv2sigmalapl4;

  t615 = t54 * t115;
  t616 = t598 * t615;
  t617 = t604 * t616;
  t619 = my_piecewise3(t82, 0, -t617 / 0.3456e5);
  tv2sigmalapl5 = t8 * t619;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 5] += tv2sigmalapl5;

  tv2sigmatau0 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 0] += tv2sigmatau0;

  tv2sigmatau1 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 1] += tv2sigmatau1;

  tv2sigmatau2 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 2] += tv2sigmatau2;

  tv2sigmatau3 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 3] += tv2sigmatau3;

  tv2sigmatau4 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 4] += tv2sigmatau4;

  tv2sigmatau5 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 5] += tv2sigmatau5;

  t620 = t54 * t59;
  t621 = t598 * t620;
  t624 = my_piecewise3(t2, 0, t597 * t621 / 0.1944e5);
  tv2lapl20 = t8 * t624;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 0] += tv2lapl20;

  tv2lapl21 = 0.e0;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 1] += tv2lapl21;

  t625 = t54 * t109;
  t626 = t598 * t625;
  t629 = my_piecewise3(t82, 0, t604 * t626 / 0.1944e5);
  tv2lapl22 = t8 * t629;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 2] += tv2lapl22;

  tv2lapltau0 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 0] += tv2lapltau0;

  tv2lapltau1 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 1] += tv2lapltau1;

  tv2lapltau2 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 2] += tv2lapltau2;

  tv2lapltau3 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 3] += tv2lapltau3;

  tv2tau20 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 0] += tv2tau20;

  tv2tau21 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 1] += tv2tau21;

  tv2tau22 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 2] += tv2tau22;

  t633 = 0.1e1 / t26 / t21;
  t634 = t294 * t136;
  t637 = t293 * t136;
  t640 = t132 * t132;
  t641 = 0.1e1 / t640;
  t642 = t18 * t641;
  t645 = my_piecewise5(t12, 0, t16, 0, 0.6e1 * t298 - 0.6e1 * t642);
  t649 = my_piecewise3(t22, 0, -0.1e2 / 0.27e2 * t633 * t634 + 0.1e2 / 0.3e1 * t637 * t302 + 0.5e1 / 0.3e1 * t27 * t645);
  t650 = t649 * t31;
  t654 = t306 * t144;
  t656 = t7 * t654 * t77;
  t661 = t139 * t319;
  t663 = t7 * t661 * t77;
  t666 = t7 * t311 * t170;
  t672 = 0.1e1 / t30 / t132;
  t673 = t29 * t672;
  t676 = 0.2e1 / 0.45e2 * t7 * t673 * t77;
  t678 = t7 * t320 * t170;
  t681 = t7 * t145 * t348;
  t684 = 0.1e1 / t41 / t71;
  t694 = sigma[0] * t344;
  t698 = t63 * t63;
  t700 = 0.1e1 / t40 / t698;
  t704 = -0.77e3 / 0.2187e4 * t38 * sigma[0] * t684 - 0.11e4 / 0.729e3 * t38 * lapl[0] * t328 - 0.26e3 / 0.19683e5 * t55 * t56 * t166 + 0.247e3 / 0.8748e4 * t55 * t694 * lapl[0] - 0.836e3 / 0.59049e5 * t55 * t70 * t700;
  t709 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t650 * t77 + 0.3e1 / 0.1e2 * t656 + 0.9e1 / 0.2e2 * t7 * t307 * t170 - t663 / 0.1e2 + 0.3e1 / 0.5e1 * t666 + 0.9e1 / 0.2e2 * t7 * t140 * t348 + t676 - t678 / 0.1e2 + 0.3e1 / 0.1e2 * t681 + 0.3e1 / 0.2e2 * t7 * t32 * t704);
  t711 = 0.1e1 / t88 / t86;
  t712 = t355 * t178;
  t715 = t354 * t178;
  t718 = t83 * t641;
  t721 = my_piecewise5(t16, 0, t12, 0, -0.6e1 * t298 - 0.6e1 * t718);
  t725 = my_piecewise3(t87, 0, -0.1e2 / 0.27e2 * t711 * t712 + 0.1e2 / 0.3e1 * t715 * t361 + 0.5e1 / 0.3e1 * t89 * t721);
  t726 = t725 * t31;
  t730 = t365 * t144;
  t732 = t7 * t730 * t127;
  t734 = t181 * t319;
  t736 = t7 * t734 * t127;
  t738 = t91 * t672;
  t741 = 0.2e1 / 0.45e2 * t7 * t738 * t127;
  t743 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t726 * t127 + 0.3e1 / 0.1e2 * t732 - t736 / 0.1e2 + t741);
  tv3rho30 = 0.3e1 * t353 + 0.3e1 * t379 + t8 * (t709 + t743);

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 0] += tv3rho30;

  t746 = 0.2e1 * t405;
  t747 = 0.2e1 * t431;
  t748 = t633 * t195;
  t751 = t293 * t386;
  t756 = 0.2e1 * t298;
  t757 = 0.6e1 * t642;
  t759 = my_piecewise5(t12, 0, t16, 0, t756 - t757);
  t763 = my_piecewise3(t22, 0, -0.1e2 / 0.27e2 * t748 * t294 + 0.2e2 / 0.9e1 * t751 * t136 + 0.1e2 / 0.9e1 * t382 * t302 + 0.5e1 / 0.3e1 * t27 * t759);
  t764 = t763 * t31;
  t768 = t390 * t144;
  t771 = t7 * t768 * t77 / 0.5e1;
  t775 = t198 * t319;
  t777 = t7 * t775 * t77;
  t781 = t7 * t395 * t170 / 0.5e1;
  t790 = 0.3e1 / 0.2e2 * t7 * t764 * t77 + t771 + 0.3e1 / 0.1e2 * t7 * t391 * t170 - t777 / 0.3e2 + t781 + 0.3e1 / 0.2e2 * t7 * t199 * t348 + t656 / 0.1e2 - t663 / 0.15e2 + t666 / 0.5e1 + t676 - t678 / 0.15e2 + t681 / 0.1e2;
  t791 = my_piecewise3(t2, 0, t790);
  t792 = t711 * t206;
  t795 = t354 * t410;
  t800 = 0.6e1 * t718;
  t802 = my_piecewise5(t16, 0, t12, 0, -t756 - t800);
  t806 = my_piecewise3(t87, 0, -0.1e2 / 0.27e2 * t792 * t355 + 0.2e2 / 0.9e1 * t795 * t178 + 0.1e2 / 0.9e1 * t406 * t361 + 0.5e1 / 0.3e1 * t89 * t802);
  t807 = t806 * t31;
  t811 = t414 * t144;
  t814 = t7 * t811 * t127 / 0.5e1;
  t815 = t209 * t319;
  t817 = t7 * t815 * t127;
  t826 = t7 * t370 * t235 / 0.5e1;
  t828 = t7 * t374 * t235;
  t831 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t807 * t127 + t814 - t817 / 0.3e2 + t732 / 0.1e2 - t736 / 0.15e2 + t741 + 0.3e1 / 0.2e2 * t7 * t366 * t235 + t826 - t828 / 0.3e2);
  tv3rho31 = t353 + t379 + t746 + t747 + t8 * (t791 + t831);

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 1] += tv3rho31;

  t834 = t633 * t436;
  t839 = t293 * t441;
  t843 = my_piecewise5(t12, 0, t16, 0, -t756 - t757);
  t847 = my_piecewise3(t22, 0, -0.1e2 / 0.27e2 * t834 * t136 + 0.2e2 / 0.9e1 * t382 * t386 + 0.1e2 / 0.9e1 * t839 * t136 + 0.5e1 / 0.3e1 * t27 * t843);
  t848 = t847 * t31;
  t852 = t445 * t144;
  t854 = t7 * t852 * t77;
  t863 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t848 * t77 + t854 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t446 * t170 + t771 - t777 / 0.15e2 + t781 - t663 / 0.3e2 + t676 - t678 / 0.3e2);
  t864 = t711 * t453;
  t869 = t354 * t458;
  t873 = my_piecewise5(t16, 0, t12, 0, t756 - t800);
  t877 = my_piecewise3(t87, 0, -0.1e2 / 0.27e2 * t864 * t178 + 0.2e2 / 0.9e1 * t406 * t410 + 0.1e2 / 0.9e1 * t869 * t178 + 0.5e1 / 0.3e1 * t89 * t873);
  t878 = t877 * t31;
  t882 = t462 * t144;
  t884 = t7 * t882 * t127;
  t891 = t7 * t419 * t235;
  t899 = t7 * t186 * t493;
  t901 = 0.3e1 / 0.2e2 * t7 * t878 * t127 + t884 / 0.1e2 + t814 - t817 / 0.15e2 + 0.3e1 / 0.1e2 * t7 * t415 * t235 + t891 / 0.5e1 - t736 / 0.3e2 + t741 + t826 - t828 / 0.15e2 + 0.3e1 / 0.2e2 * t7 * t182 * t493 + t899 / 0.1e2;
  t902 = my_piecewise3(t82, 0, t901);
  tv3rho32 = t746 + t747 + t452 + t498 + t8 * (t863 + t902);

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 2] += tv3rho32;

  t907 = t436 * t195;
  t914 = my_piecewise5(t12, 0, t16, 0, -0.6e1 * t298 - 0.6e1 * t642);
  t918 = my_piecewise3(t22, 0, -0.1e2 / 0.27e2 * t633 * t907 + 0.1e2 / 0.3e1 * t382 * t441 + 0.5e1 / 0.3e1 * t27 * t914);
  t919 = t918 * t31;
  t926 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t919 * t77 + 0.3e1 / 0.1e2 * t854 - t777 / 0.1e2 + t676);
  t927 = t453 * t206;
  t934 = my_piecewise5(t16, 0, t12, 0, 0.6e1 * t298 - 0.6e1 * t718);
  t938 = my_piecewise3(t87, 0, -0.1e2 / 0.27e2 * t711 * t927 + 0.1e2 / 0.3e1 * t406 * t458 + 0.5e1 / 0.3e1 * t89 * t934);
  t939 = t938 * t31;
  t955 = 0.1e1 / t95 / t121;
  t965 = sigma[2] * t489;
  t969 = t113 * t113;
  t971 = 0.1e1 / t94 / t969;
  t975 = -0.77e3 / 0.2187e4 * t38 * sigma[2] * t955 - 0.11e4 / 0.729e3 * t38 * lapl[1] * t473 - 0.26e3 / 0.19683e5 * t55 * t106 * t231 + 0.247e3 / 0.8748e4 * t55 * t965 * lapl[1] - 0.836e3 / 0.59049e5 * t55 * t120 * t971;
  t980 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t939 * t127 + 0.3e1 / 0.1e2 * t884 + 0.9e1 / 0.2e2 * t7 * t463 * t235 - t817 / 0.1e2 + 0.3e1 / 0.5e1 * t891 + 0.9e1 / 0.2e2 * t7 * t210 * t493 + t741 - t828 / 0.1e2 + 0.3e1 / 0.1e2 * t899 + 0.3e1 / 0.2e2 * t7 * t92 * t975);
  tv3rho33 = 0.3e1 * t452 + 0.3e1 * t498 + t8 * (t926 + t980);

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 3] += tv3rho33;

  t988 = t7 * t311 * t250;
  t995 = t7 * t320 * t250 / 0.3e2;
  t997 = t7 * t145 * t514;
  t999 = t38 * t328;
  t1002 = t55 * t166 * lapl[0];
  t1004 = t55 * t694;
  t1006 = 0.55e2 / 0.729e3 * t999 - 0.13e2 / 0.2916e4 * t1002 + 0.76e2 / 0.19683e5 * t1004;
  t1011 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t307 * t250 + t988 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t140 * t514 - t995 + t997 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t32 * t1006);
  tv3rho2sigma0 = t8 * t1011 + 0.2e1 * t519;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 0] += tv3rho2sigma0;

  tv3rho2sigma1 = 0.e0;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 1] += tv3rho2sigma1;

  t1018 = t7 * t370 * t262;
  t1022 = t7 * t374 * t262 / 0.3e2;
  t1024 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t366 * t262 + t1018 / 0.5e1 - t1022);
  tv3rho2sigma2 = t8 * t1024 + 0.2e1 * t528;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 2] += tv3rho2sigma2;

  t1030 = t7 * t395 * t250;
  t1038 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t391 * t250 + t1030 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t199 * t514 + t988 / 0.1e2 - t995 + t997 / 0.1e2);
  tv3rho2sigma3 = t8 * t1038 + t519 + t534;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 3] += tv3rho2sigma3;

  tv3rho2sigma4 = 0.e0;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 4] += tv3rho2sigma4;

  t1044 = t7 * t419 * t262;
  t1051 = t7 * t186 * t546;
  t1054 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t415 * t262 + t1044 / 0.1e2 + t1018 / 0.1e2 - t1022 + 0.3e1 / 0.2e2 * t7 * t182 * t546 + t1051 / 0.1e2);
  tv3rho2sigma5 = t8 * t1054 + t528 + t551;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 5] += tv3rho2sigma5;

  t1062 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t446 * t250 + t1030 / 0.5e1 - t995);
  tv3rho2sigma6 = t8 * t1062 + 0.2e1 * t534;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 6] += tv3rho2sigma6;

  tv3rho2sigma7 = 0.e0;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 7] += tv3rho2sigma7;

  t1073 = t38 * t473;
  t1076 = t55 * t231 * lapl[1];
  t1078 = t55 * t965;
  t1080 = 0.55e2 / 0.729e3 * t1073 - 0.13e2 / 0.2916e4 * t1076 + 0.76e2 / 0.19683e5 * t1078;
  t1085 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t463 * t262 + t1044 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t210 * t546 - t1022 + t1051 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t92 * t1080);
  tv3rho2sigma8 = t8 * t1085 + 0.2e1 * t551;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 8] += tv3rho2sigma8;

  t1092 = t7 * t311 * t274;
  t1099 = t7 * t320 * t274 / 0.3e2;
  t1101 = t7 * t145 * t562;
  t1106 = 0.1e3 / 0.243e3 * t507 + 0.65e2 / 0.13122e5 * t510 - 0.13e2 / 0.2916e4 * t512;
  t1111 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t307 * t274 + t1092 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t140 * t562 - t1099 + t1101 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t32 * t1106);
  tv3rho2lapl0 = t8 * t1111 + 0.2e1 * t567;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 0] += tv3rho2lapl0;

  t1118 = t7 * t370 * t286;
  t1122 = t7 * t374 * t286 / 0.3e2;
  t1124 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t366 * t286 + t1118 / 0.5e1 - t1122);
  tv3rho2lapl1 = t8 * t1124 + 0.2e1 * t576;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 1] += tv3rho2lapl1;

  t1130 = t7 * t395 * t274;
  t1138 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t391 * t274 + t1130 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t199 * t562 + t1092 / 0.1e2 - t1099 + t1101 / 0.1e2);
  tv3rho2lapl2 = t8 * t1138 + t567 + t582;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 2] += tv3rho2lapl2;

  t1144 = t7 * t419 * t286;
  t1151 = t7 * t186 * t590;
  t1154 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t415 * t286 + t1144 / 0.1e2 + t1118 / 0.1e2 - t1122 + 0.3e1 / 0.2e2 * t7 * t182 * t590 + t1151 / 0.1e2);
  tv3rho2lapl3 = t8 * t1154 + t576 + t595;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 3] += tv3rho2lapl3;

  t1162 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t446 * t274 + t1130 / 0.5e1 - t1099);
  tv3rho2lapl4 = t8 * t1162 + 0.2e1 * t582;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 4] += tv3rho2lapl4;

  t1176 = 0.1e3 / 0.243e3 * t539 + 0.65e2 / 0.13122e5 * t542 - 0.13e2 / 0.2916e4 * t544;
  t1181 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t463 * t286 + t1144 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t210 * t590 - t1122 + t1151 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t92 * t1176);
  tv3rho2lapl5 = t8 * t1181 + 0.2e1 * t595;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 5] += tv3rho2lapl5;

  tv3rho2tau0 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 0] += tv3rho2tau0;

  tv3rho2tau1 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 1] += tv3rho2tau1;

  tv3rho2tau2 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 2] += tv3rho2tau2;

  tv3rho2tau3 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 3] += tv3rho2tau3;

  tv3rho2tau4 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 4] += tv3rho2tau4;

  tv3rho2tau5 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 5] += tv3rho2tau5;

  t1183 = t7 * t139;
  t1184 = t1183 * t600;
  t1186 = t144 * t52;
  t1187 = t1186 * t599;
  t1188 = t597 * t1187;
  t1189 = t1188 / 0.8748e5;
  t1190 = t54 * t166;
  t1191 = t598 * t1190;
  t1192 = t597 * t1191;
  t1195 = my_piecewise3(t2, 0, t1184 / 0.5832e5 + t1189 - t1192 / 0.10935e5);
  tv3rhosigma20 = t8 * t1195 + t603;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 0] += tv3rhosigma20;

  tv3rhosigma21 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 1] += tv3rhosigma21;

  tv3rhosigma22 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 2] += tv3rhosigma22;

  tv3rhosigma23 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 3] += tv3rhosigma23;

  tv3rhosigma24 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 4] += tv3rhosigma24;

  t1197 = t7 * t181;
  t1198 = t1197 * t606;
  t1200 = t1186 * t605;
  t1201 = t604 * t1200;
  t1202 = t1201 / 0.8748e5;
  t1204 = my_piecewise3(t82, 0, t1198 / 0.5832e5 + t1202);
  tv3rhosigma25 = t8 * t1204 + t609;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 5] += tv3rhosigma25;

  t1206 = t7 * t198;
  t1207 = t1206 * t600;
  t1210 = my_piecewise3(t2, 0, t1207 / 0.5832e5 + t1189);
  tv3rhosigma26 = t8 * t1210 + t603;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 6] += tv3rhosigma26;

  tv3rhosigma27 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 7] += tv3rhosigma27;

  tv3rhosigma28 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 8] += tv3rhosigma28;

  tv3rhosigma29 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 9] += tv3rhosigma29;

  tv3rhosigma210 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 10] += tv3rhosigma210;

  t1212 = t7 * t209;
  t1213 = t1212 * t606;
  t1215 = t54 * t231;
  t1216 = t598 * t1215;
  t1217 = t604 * t1216;
  t1220 = my_piecewise3(t82, 0, t1213 / 0.5832e5 + t1202 - t1217 / 0.10935e5);
  tv3rhosigma211 = t8 * t1220 + t609;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 11] += tv3rhosigma211;

  t1222 = t1183 * t611;
  t1224 = t1186 * t610;
  t1225 = t597 * t1224;
  t1226 = t1225 / 0.5184e5;
  t1229 = my_piecewise3(t2, 0, -t1222 / 0.3456e5 - t1226 + 0.13e2 / 0.10368e6 * t601);
  tv3rhosigmalapl0 = t8 * t1229 + t614;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 0] += tv3rhosigmalapl0;

  tv3rhosigmalapl1 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 1] += tv3rhosigmalapl1;

  tv3rhosigmalapl2 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 2] += tv3rhosigmalapl2;

  tv3rhosigmalapl3 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 3] += tv3rhosigmalapl3;

  tv3rhosigmalapl4 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 4] += tv3rhosigmalapl4;

  t1231 = t1197 * t616;
  t1233 = t1186 * t615;
  t1234 = t604 * t1233;
  t1235 = t1234 / 0.5184e5;
  t1237 = my_piecewise3(t82, 0, -t1231 / 0.3456e5 - t1235);
  tv3rhosigmalapl5 = t8 * t1237 + t619;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 5] += tv3rhosigmalapl5;

  t1239 = t1206 * t611;
  t1242 = my_piecewise3(t2, 0, -t1239 / 0.3456e5 - t1226);
  tv3rhosigmalapl6 = t8 * t1242 + t614;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 6] += tv3rhosigmalapl6;

  tv3rhosigmalapl7 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 7] += tv3rhosigmalapl7;

  tv3rhosigmalapl8 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 8] += tv3rhosigmalapl8;

  tv3rhosigmalapl9 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 9] += tv3rhosigmalapl9;

  tv3rhosigmalapl10 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 10] += tv3rhosigmalapl10;

  t1244 = t1212 * t616;
  t1248 = my_piecewise3(t82, 0, -t1244 / 0.3456e5 - t1235 + 0.13e2 / 0.10368e6 * t607);
  tv3rhosigmalapl11 = t8 * t1248 + t619;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 11] += tv3rhosigmalapl11;

  tv3rhosigmatau0 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 0] += tv3rhosigmatau0;

  tv3rhosigmatau1 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 1] += tv3rhosigmatau1;

  tv3rhosigmatau2 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 2] += tv3rhosigmatau2;

  tv3rhosigmatau3 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 3] += tv3rhosigmatau3;

  tv3rhosigmatau4 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 4] += tv3rhosigmatau4;

  tv3rhosigmatau5 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 5] += tv3rhosigmatau5;

  tv3rhosigmatau6 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 6] += tv3rhosigmatau6;

  tv3rhosigmatau7 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 7] += tv3rhosigmatau7;

  tv3rhosigmatau8 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 8] += tv3rhosigmatau8;

  tv3rhosigmatau9 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 9] += tv3rhosigmatau9;

  tv3rhosigmatau10 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 10] += tv3rhosigmatau10;

  tv3rhosigmatau11 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 11] += tv3rhosigmatau11;

  t1252 = t1186 * t620;
  t1254 = t597 * t1252 / 0.2916e5;
  t1257 = my_piecewise3(t2, 0, t1183 * t621 / 0.1944e5 + t1254 - t612 / 0.5832e4);
  tv3rholapl20 = t8 * t1257 + t624;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 0] += tv3rholapl20;

  tv3rholapl21 = 0.e0;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 1] += tv3rholapl21;

  t1261 = t1186 * t625;
  t1263 = t604 * t1261 / 0.2916e5;
  t1265 = my_piecewise3(t82, 0, t1197 * t626 / 0.1944e5 + t1263);
  tv3rholapl22 = t8 * t1265 + t629;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 2] += tv3rholapl22;

  t1270 = my_piecewise3(t2, 0, t1206 * t621 / 0.1944e5 + t1254);
  tv3rholapl23 = t8 * t1270 + t624;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 3] += tv3rholapl23;

  tv3rholapl24 = 0.e0;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 4] += tv3rholapl24;

  t1276 = my_piecewise3(t82, 0, t1212 * t626 / 0.1944e5 + t1263 - t617 / 0.5832e4);
  tv3rholapl25 = t8 * t1276 + t629;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 5] += tv3rholapl25;

  tv3rholapltau0 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 0] += tv3rholapltau0;

  tv3rholapltau1 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 1] += tv3rholapltau1;

  tv3rholapltau2 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 2] += tv3rholapltau2;

  tv3rholapltau3 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 3] += tv3rholapltau3;

  tv3rholapltau4 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 4] += tv3rholapltau4;

  tv3rholapltau5 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 5] += tv3rholapltau5;

  tv3rholapltau6 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 6] += tv3rholapltau6;

  tv3rholapltau7 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 7] += tv3rholapltau7;

  tv3rhotau20 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 0] += tv3rhotau20;

  tv3rhotau21 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 1] += tv3rhotau21;

  tv3rhotau22 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 2] += tv3rhotau22;

  tv3rhotau23 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 3] += tv3rhotau23;

  tv3rhotau24 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 4] += tv3rhotau24;

  tv3rhotau25 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 5] += tv3rhotau25;

  tv3sigma30 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 0] += tv3sigma30;

  tv3sigma31 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 1] += tv3sigma31;

  tv3sigma32 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 2] += tv3sigma32;

  tv3sigma33 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 3] += tv3sigma33;

  tv3sigma34 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 4] += tv3sigma34;

  tv3sigma35 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 5] += tv3sigma35;

  tv3sigma36 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 6] += tv3sigma36;

  tv3sigma37 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 7] += tv3sigma37;

  tv3sigma38 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 8] += tv3sigma38;

  tv3sigma39 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 9] += tv3sigma39;

  tv3sigma2lapl0 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 0] += tv3sigma2lapl0;

  tv3sigma2lapl1 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 1] += tv3sigma2lapl1;

  tv3sigma2lapl2 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 2] += tv3sigma2lapl2;

  tv3sigma2lapl3 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 3] += tv3sigma2lapl3;

  tv3sigma2lapl4 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 4] += tv3sigma2lapl4;

  tv3sigma2lapl5 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 5] += tv3sigma2lapl5;

  tv3sigma2lapl6 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 6] += tv3sigma2lapl6;

  tv3sigma2lapl7 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 7] += tv3sigma2lapl7;

  tv3sigma2lapl8 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 8] += tv3sigma2lapl8;

  tv3sigma2lapl9 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 9] += tv3sigma2lapl9;

  tv3sigma2lapl10 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 10] += tv3sigma2lapl10;

  tv3sigma2lapl11 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 11] += tv3sigma2lapl11;

  tv3sigma2tau0 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 0] += tv3sigma2tau0;

  tv3sigma2tau1 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 1] += tv3sigma2tau1;

  tv3sigma2tau2 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 2] += tv3sigma2tau2;

  tv3sigma2tau3 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 3] += tv3sigma2tau3;

  tv3sigma2tau4 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 4] += tv3sigma2tau4;

  tv3sigma2tau5 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 5] += tv3sigma2tau5;

  tv3sigma2tau6 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 6] += tv3sigma2tau6;

  tv3sigma2tau7 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 7] += tv3sigma2tau7;

  tv3sigma2tau8 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 8] += tv3sigma2tau8;

  tv3sigma2tau9 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 9] += tv3sigma2tau9;

  tv3sigma2tau10 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 10] += tv3sigma2tau10;

  tv3sigma2tau11 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 11] += tv3sigma2tau11;

  tv3sigmalapl20 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 0] += tv3sigmalapl20;

  tv3sigmalapl21 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 1] += tv3sigmalapl21;

  tv3sigmalapl22 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 2] += tv3sigmalapl22;

  tv3sigmalapl23 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 3] += tv3sigmalapl23;

  tv3sigmalapl24 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 4] += tv3sigmalapl24;

  tv3sigmalapl25 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 5] += tv3sigmalapl25;

  tv3sigmalapl26 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 6] += tv3sigmalapl26;

  tv3sigmalapl27 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 7] += tv3sigmalapl27;

  tv3sigmalapl28 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 8] += tv3sigmalapl28;

  tv3sigmalapltau0 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 0] += tv3sigmalapltau0;

  tv3sigmalapltau1 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 1] += tv3sigmalapltau1;

  tv3sigmalapltau2 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 2] += tv3sigmalapltau2;

  tv3sigmalapltau3 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 3] += tv3sigmalapltau3;

  tv3sigmalapltau4 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 4] += tv3sigmalapltau4;

  tv3sigmalapltau5 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 5] += tv3sigmalapltau5;

  tv3sigmalapltau6 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 6] += tv3sigmalapltau6;

  tv3sigmalapltau7 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 7] += tv3sigmalapltau7;

  tv3sigmalapltau8 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 8] += tv3sigmalapltau8;

  tv3sigmalapltau9 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 9] += tv3sigmalapltau9;

  tv3sigmalapltau10 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 10] += tv3sigmalapltau10;

  tv3sigmalapltau11 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 11] += tv3sigmalapltau11;

  tv3sigmatau20 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 0] += tv3sigmatau20;

  tv3sigmatau21 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 1] += tv3sigmatau21;

  tv3sigmatau22 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 2] += tv3sigmatau22;

  tv3sigmatau23 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 3] += tv3sigmatau23;

  tv3sigmatau24 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 4] += tv3sigmatau24;

  tv3sigmatau25 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 5] += tv3sigmatau25;

  tv3sigmatau26 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 6] += tv3sigmatau26;

  tv3sigmatau27 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 7] += tv3sigmatau27;

  tv3sigmatau28 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 8] += tv3sigmatau28;

  tv3lapl30 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 0] += tv3lapl30;

  tv3lapl31 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 1] += tv3lapl31;

  tv3lapl32 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 2] += tv3lapl32;

  tv3lapl33 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 3] += tv3lapl33;

  tv3lapl2tau0 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 0] += tv3lapl2tau0;

  tv3lapl2tau1 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 1] += tv3lapl2tau1;

  tv3lapl2tau2 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 2] += tv3lapl2tau2;

  tv3lapl2tau3 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 3] += tv3lapl2tau3;

  tv3lapl2tau4 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 4] += tv3lapl2tau4;

  tv3lapl2tau5 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 5] += tv3lapl2tau5;

  tv3lapltau20 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 0] += tv3lapltau20;

  tv3lapltau21 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 1] += tv3lapltau21;

  tv3lapltau22 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 2] += tv3lapltau22;

  tv3lapltau23 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 3] += tv3lapltau23;

  tv3lapltau24 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 4] += tv3lapltau24;

  tv3lapltau25 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 5] += tv3lapltau25;

  tv3tau30 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 0] += tv3tau30;

  tv3tau31 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 1] += tv3tau31;

  tv3tau32 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 2] += tv3tau32;

  tv3tau33 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 3] += tv3tau33;

}

#endif


#ifndef XC_DONT_COMPILE_LXC
GPU_DEVICE_FUNCTION static inline void
func_lxc_pol(const xc_func_type *p, size_t ip, const double *rho, const double *sigma, const double *lapl, const double *tau, xc_mgga_out_params *out)
{
  double t2, t3, t4, t5, t7, t8, t9, t12;
  double t13, t16, t17, t18, t20, t21, t22, t23;
  double t24, t25, t26, t27, t29, t30, t31, t32;
  double t33, t34, t35, t36, t38, t39, t40, t41;
  double t43, t48, t52, t54, t55, t56, t57, t59;
  double t63, t65, t66, t70, t71, t73, t77, t81;
  double t82, t83, t85, t86, t87, t88, t89, t91;
  double t92, t93, t94, t95, t97, t102, t106, t107;
  double t109, t113, t115, t116, t120, t121, t123, t127;
  double t131, tzk0;

  double t132, t133, t134, t136, t139, t140, t144, t145;
  double t148, t150, t160, t164, t166, t170, t175, t176;
  double t178, t181, t182, t186, t189, t191, tvrho0, t195;
  double t198, t199, t204, t206, t209, t210, t215, t225;
  double t229, t231, t235, t240, tvrho1, t243, t246, t248;
  double t250, t254, tvsigma0, tvsigma1, t255, t258, t260, t262;
  double t266, tvsigma2, t274, t278, tvlapl0, t286, t290, tvlapl1;
  double tvtau0, tvtau1;

  double t293, t294, t297, t298, t299, t302, t306, t307;
  double t311, t313, t319, t320, t323, t325, t328, t338;
  double t344, t348, t353, t354, t355, t358, t361, t365;
  double t366, t370, t372, t374, t377, t379, tv2rho20, t382;
  double t386, t390, t391, t395, t397, t405, t406, t410;
  double t414, t415, t419, t421, t428, t431, tv2rho21, t436;
  double t441, t445, t446, t452, t453, t458, t462, t463;
  double t473, t483, t489, t493, t498, tv2rho22, t506, t507;
  double t510, t512, t514, t519, tv2rhosigma0, tv2rhosigma1, t526, t528;
  double tv2rhosigma2, t534, tv2rhosigma3, tv2rhosigma4, t539, t542, t544, t546;
  double t551, tv2rhosigma5, t558, t562, t567, tv2rholapl0, t574, t576;
  double tv2rholapl1, t582, tv2rholapl2, t590, t595, tv2rholapl3, tv2rhotau0, tv2rhotau1;
  double tv2rhotau2, tv2rhotau3, t597, t598, t599, t600, t601, t603;
  double tv2sigma20, tv2sigma21, tv2sigma22, tv2sigma23, tv2sigma24, t604, t605, t606;
  double t607, t609, tv2sigma25, t610, t611, t612, t614, tv2sigmalapl0;
  double tv2sigmalapl1, tv2sigmalapl2, tv2sigmalapl3, tv2sigmalapl4, t615, t616, t617, t619;
  double tv2sigmalapl5, tv2sigmatau0, tv2sigmatau1, tv2sigmatau2, tv2sigmatau3, tv2sigmatau4, tv2sigmatau5, t620;
  double t621, t624, tv2lapl20, tv2lapl21, t625, t626, t629, tv2lapl22;
  double tv2lapltau0, tv2lapltau1, tv2lapltau2, tv2lapltau3, tv2tau20, tv2tau21, tv2tau22;

  double t633, t634, t637, t640, t641, t642, t645, t649;
  double t650, t654, t656, t661, t663, t666, t672, t673;
  double t676, t678, t681, t684, t694, t698, t700, t704;
  double t709, t711, t712, t715, t718, t721, t725, t726;
  double t730, t732, t734, t736, t738, t741, t743, tv3rho30;
  double t746, t747, t748, t751, t756, t757, t759, t763;
  double t764, t768, t771, t775, t777, t781, t790, t791;
  double t792, t795, t800, t802, t806, t807, t811, t814;
  double t815, t817, t826, t828, t831, tv3rho31, t834, t839;
  double t843, t847, t848, t852, t854, t863, t864, t869;
  double t873, t877, t878, t882, t884, t891, t899, t901;
  double t902, tv3rho32, t907, t914, t918, t919, t926, t927;
  double t934, t938, t939, t955, t965, t969, t971, t975;
  double t980, tv3rho33, t988, t995, t997, t999, t1002, t1004;
  double t1006, t1011, tv3rho2sigma0, tv3rho2sigma1, t1018, t1022, t1024, tv3rho2sigma2;
  double t1030, t1038, tv3rho2sigma3, tv3rho2sigma4, t1044, t1051, t1054, tv3rho2sigma5;
  double t1062, tv3rho2sigma6, tv3rho2sigma7, t1073, t1076, t1078, t1080, t1085;
  double tv3rho2sigma8, t1092, t1099, t1101, t1106, t1111, tv3rho2lapl0, t1118;
  double t1122, t1124, tv3rho2lapl1, t1130, t1138, tv3rho2lapl2, t1144, t1151;
  double t1154, tv3rho2lapl3, t1162, tv3rho2lapl4, t1176, t1181, tv3rho2lapl5, tv3rho2tau0;
  double tv3rho2tau1, tv3rho2tau2, tv3rho2tau3, tv3rho2tau4, tv3rho2tau5, t1183, t1184, t1186;
  double t1187, t1188, t1189, t1190, t1191, t1192, t1195, tv3rhosigma20;
  double tv3rhosigma21, tv3rhosigma22, tv3rhosigma23, tv3rhosigma24, t1197, t1198, t1200, t1201;
  double t1202, t1204, tv3rhosigma25, t1206, t1207, t1210, tv3rhosigma26, tv3rhosigma27;
  double tv3rhosigma28, tv3rhosigma29, tv3rhosigma210, t1212, t1213, t1215, t1216, t1217;
  double t1220, tv3rhosigma211, t1222, t1224, t1225, t1226, t1229, tv3rhosigmalapl0;
  double tv3rhosigmalapl1, tv3rhosigmalapl2, tv3rhosigmalapl3, tv3rhosigmalapl4, t1231, t1233, t1234, t1235;
  double t1237, tv3rhosigmalapl5, t1239, t1242, tv3rhosigmalapl6, tv3rhosigmalapl7, tv3rhosigmalapl8, tv3rhosigmalapl9;
  double tv3rhosigmalapl10, t1244, t1248, tv3rhosigmalapl11, tv3rhosigmatau0, tv3rhosigmatau1, tv3rhosigmatau2, tv3rhosigmatau3;
  double tv3rhosigmatau4, tv3rhosigmatau5, tv3rhosigmatau6, tv3rhosigmatau7, tv3rhosigmatau8, tv3rhosigmatau9, tv3rhosigmatau10, tv3rhosigmatau11;
  double t1252, t1254, t1257, tv3rholapl20, tv3rholapl21, t1261, t1263, t1265;
  double tv3rholapl22, t1270, tv3rholapl23, tv3rholapl24, t1276, tv3rholapl25, tv3rholapltau0, tv3rholapltau1;
  double tv3rholapltau2, tv3rholapltau3, tv3rholapltau4, tv3rholapltau5, tv3rholapltau6, tv3rholapltau7, tv3rhotau20, tv3rhotau21;
  double tv3rhotau22, tv3rhotau23, tv3rhotau24, tv3rhotau25, tv3sigma30, tv3sigma31, tv3sigma32, tv3sigma33;
  double tv3sigma34, tv3sigma35, tv3sigma36, tv3sigma37, tv3sigma38, tv3sigma39, tv3sigma2lapl0, tv3sigma2lapl1;
  double tv3sigma2lapl2, tv3sigma2lapl3, tv3sigma2lapl4, tv3sigma2lapl5, tv3sigma2lapl6, tv3sigma2lapl7, tv3sigma2lapl8, tv3sigma2lapl9;
  double tv3sigma2lapl10, tv3sigma2lapl11, tv3sigma2tau0, tv3sigma2tau1, tv3sigma2tau2, tv3sigma2tau3, tv3sigma2tau4, tv3sigma2tau5;
  double tv3sigma2tau6, tv3sigma2tau7, tv3sigma2tau8, tv3sigma2tau9, tv3sigma2tau10, tv3sigma2tau11, tv3sigmalapl20, tv3sigmalapl21;
  double tv3sigmalapl22, tv3sigmalapl23, tv3sigmalapl24, tv3sigmalapl25, tv3sigmalapl26, tv3sigmalapl27, tv3sigmalapl28, tv3sigmalapltau0;
  double tv3sigmalapltau1, tv3sigmalapltau2, tv3sigmalapltau3, tv3sigmalapltau4, tv3sigmalapltau5, tv3sigmalapltau6, tv3sigmalapltau7, tv3sigmalapltau8;
  double tv3sigmalapltau9, tv3sigmalapltau10, tv3sigmalapltau11, tv3sigmatau20, tv3sigmatau21, tv3sigmatau22, tv3sigmatau23, tv3sigmatau24;
  double tv3sigmatau25, tv3sigmatau26, tv3sigmatau27, tv3sigmatau28, tv3lapl30, tv3lapl31, tv3lapl32, tv3lapl33;
  double tv3lapl2tau0, tv3lapl2tau1, tv3lapl2tau2, tv3lapl2tau3, tv3lapl2tau4, tv3lapl2tau5, tv3lapltau20, tv3lapltau21;
  double tv3lapltau22, tv3lapltau23, tv3lapltau24, tv3lapltau25, tv3tau30, tv3tau31, tv3tau32, tv3tau33;

  double t1281, t1284, t1287, t1300, t1314, t1316, t1317, t1323;
  double t1329, t1330, t1333, t1337, t1346, t1352, t1355, t1362;
  double t1366, t1370, t1373, t1377, t1378, t1379, t1380, t1382;
  double t1383, t1389, t1394, t1397, t1401, t1408, t1412, t1416;
  double t1421, t1423, tv4rho40, t1444, t1445, t1447, t1451, t1460;
  double t1466, t1467, t1469, t1482, t1486, t1487, t1490, t1495;
  double t1496, t1513, t1515, t1519, t1526, t1530, t1531, t1534;
  double t1543, t1546, t1547, t1549, t1551, t1552, tv4rho41, t1567;
  double t1580, t1584, t1593, t1606, t1610, t1617, t1618, t1627;
  double t1640, t1644, t1651, t1655, t1664, t1667, t1678, t1681;
  double t1683, t1684, tv4rho42, t1705, t1709, t1716, t1727, t1728;
  double t1745, t1749, t1756, t1764, t1773, t1783, t1785, t1786;
  double tv4rho43, t1791, t1796, t1803, t1807, t1816, t1828, t1842;
  double t1847, t1854, t1858, t1881, t1882, tv4rho44, t1890, t1896;
  double t1899, t1906, t1908, t1911, t1925, tv4rho3sigma0, tv4rho3sigma1, t1932;
  double t1935, t1939, t1941, tv4rho3sigma2, t1943, t1949, t1954, t1958;
  double t1967, t1968, tv4rho3sigma3, tv4rho3sigma4, t1970, t1976, t1978, t1987;
  double t1989, t1992, tv4rho3sigma5, t1998, t2007, tv4rho3sigma6, tv4rho3sigma7, t2013;
  double t2020, t2028, t2030, t2031, tv4rho3sigma8, t2040, tv4rho3sigma9, tv4rho3sigma10;
  double t2069, tv4rho3sigma11, t2076, t2082, t2085, t2092, t2094, t2097;
  double t2107, tv4rho3lapl0, t2114, t2117, t2121, t2123, tv4rho3lapl1, t2125;
  double t2131, t2136, t2140, t2149, t2150, tv4rho3lapl2, t2152, t2158;
  double t2160, t2169, t2171, t2174, tv4rho3lapl3, t2180, t2189, tv4rho3lapl4;
  double t2195, t2202, t2210, t2212, t2213, tv4rho3lapl5, t2222, tv4rho3lapl6;
  double t2247, tv4rho3lapl7, tv4rho3tau0, tv4rho3tau1, tv4rho3tau2, tv4rho3tau3, tv4rho3tau4, tv4rho3tau5;
  double tv4rho3tau6, tv4rho3tau7, t2250, t2253, t2257, t2260, t2262, t2269;
  double tv4rho2sigma20, tv4rho2sigma21, tv4rho2sigma22, tv4rho2sigma23, tv4rho2sigma24, t2272, t2275, t2279;
  double t2281, tv4rho2sigma25, t2283, t2286, t2293, tv4rho2sigma26, tv4rho2sigma27, tv4rho2sigma28;
  double tv4rho2sigma29, tv4rho2sigma210, t2295, t2298, t2304, t2307, tv4rho2sigma211, t2310;
  double t2315, tv4rho2sigma212, tv4rho2sigma213, tv4rho2sigma214, tv4rho2sigma215, tv4rho2sigma216, t2318, t2330;
  double tv4rho2sigma217, t2335, t2340, t2344, tv4rho2sigmalapl0, tv4rho2sigmalapl1, tv4rho2sigmalapl2, tv4rho2sigmalapl3;
  double tv4rho2sigmalapl4, t2349, t2353, t2355, tv4rho2sigmalapl5, t2359, t2365, tv4rho2sigmalapl6;
  double tv4rho2sigmalapl7, tv4rho2sigmalapl8, tv4rho2sigmalapl9, tv4rho2sigmalapl10, t2369, t2375, tv4rho2sigmalapl11, t2382;
  double tv4rho2sigmalapl12, tv4rho2sigmalapl13, tv4rho2sigmalapl14, tv4rho2sigmalapl15, tv4rho2sigmalapl16, t2392, tv4rho2sigmalapl17, tv4rho2sigmatau0;
  double tv4rho2sigmatau1, tv4rho2sigmatau2, tv4rho2sigmatau3, tv4rho2sigmatau4, tv4rho2sigmatau5, tv4rho2sigmatau6, tv4rho2sigmatau7, tv4rho2sigmatau8;
  double tv4rho2sigmatau9, tv4rho2sigmatau10, tv4rho2sigmatau11, tv4rho2sigmatau12, tv4rho2sigmatau13, tv4rho2sigmatau14, tv4rho2sigmatau15, tv4rho2sigmatau16;
  double tv4rho2sigmatau17, t2397, t2402, t2406, tv4rho2lapl20, tv4rho2lapl21, t2411, t2415;
  double t2417, tv4rho2lapl22, t2421, t2427, tv4rho2lapl23, tv4rho2lapl24, t2431, t2437;
  double tv4rho2lapl25, t2444, tv4rho2lapl26, tv4rho2lapl27, t2454, tv4rho2lapl28, tv4rho2lapltau0, tv4rho2lapltau1;
  double tv4rho2lapltau2, tv4rho2lapltau3, tv4rho2lapltau4, tv4rho2lapltau5, tv4rho2lapltau6, tv4rho2lapltau7, tv4rho2lapltau8, tv4rho2lapltau9;
  double tv4rho2lapltau10, tv4rho2lapltau11, tv4rho2tau20, tv4rho2tau21, tv4rho2tau22, tv4rho2tau23, tv4rho2tau24, tv4rho2tau25;
  double tv4rho2tau26, tv4rho2tau27, tv4rho2tau28, tv4rhosigma30, tv4rhosigma31, tv4rhosigma32, tv4rhosigma33, tv4rhosigma34;
  double tv4rhosigma35, tv4rhosigma36, tv4rhosigma37, tv4rhosigma38, tv4rhosigma39, tv4rhosigma310, tv4rhosigma311, tv4rhosigma312;
  double tv4rhosigma313, tv4rhosigma314, tv4rhosigma315, tv4rhosigma316, tv4rhosigma317, tv4rhosigma318, tv4rhosigma319, tv4rhosigma2lapl0;
  double tv4rhosigma2lapl1, tv4rhosigma2lapl2, tv4rhosigma2lapl3, tv4rhosigma2lapl4, tv4rhosigma2lapl5, tv4rhosigma2lapl6, tv4rhosigma2lapl7, tv4rhosigma2lapl8;
  double tv4rhosigma2lapl9, tv4rhosigma2lapl10, tv4rhosigma2lapl11, tv4rhosigma2lapl12, tv4rhosigma2lapl13, tv4rhosigma2lapl14, tv4rhosigma2lapl15, tv4rhosigma2lapl16;
  double tv4rhosigma2lapl17, tv4rhosigma2lapl18, tv4rhosigma2lapl19, tv4rhosigma2lapl20, tv4rhosigma2lapl21, tv4rhosigma2lapl22, tv4rhosigma2lapl23, tv4rhosigma2tau0;
  double tv4rhosigma2tau1, tv4rhosigma2tau2, tv4rhosigma2tau3, tv4rhosigma2tau4, tv4rhosigma2tau5, tv4rhosigma2tau6, tv4rhosigma2tau7, tv4rhosigma2tau8;
  double tv4rhosigma2tau9, tv4rhosigma2tau10, tv4rhosigma2tau11, tv4rhosigma2tau12, tv4rhosigma2tau13, tv4rhosigma2tau14, tv4rhosigma2tau15, tv4rhosigma2tau16;
  double tv4rhosigma2tau17, tv4rhosigma2tau18, tv4rhosigma2tau19, tv4rhosigma2tau20, tv4rhosigma2tau21, tv4rhosigma2tau22, tv4rhosigma2tau23, tv4rhosigmalapl20;
  double tv4rhosigmalapl21, tv4rhosigmalapl22, tv4rhosigmalapl23, tv4rhosigmalapl24, tv4rhosigmalapl25, tv4rhosigmalapl26, tv4rhosigmalapl27, tv4rhosigmalapl28;
  double tv4rhosigmalapl29, tv4rhosigmalapl210, tv4rhosigmalapl211, tv4rhosigmalapl212, tv4rhosigmalapl213, tv4rhosigmalapl214, tv4rhosigmalapl215, tv4rhosigmalapl216;
  double tv4rhosigmalapl217, tv4rhosigmalapltau0, tv4rhosigmalapltau1, tv4rhosigmalapltau2, tv4rhosigmalapltau3, tv4rhosigmalapltau4, tv4rhosigmalapltau5, tv4rhosigmalapltau6;
  double tv4rhosigmalapltau7, tv4rhosigmalapltau8, tv4rhosigmalapltau9, tv4rhosigmalapltau10, tv4rhosigmalapltau11, tv4rhosigmalapltau12, tv4rhosigmalapltau13, tv4rhosigmalapltau14;
  double tv4rhosigmalapltau15, tv4rhosigmalapltau16, tv4rhosigmalapltau17, tv4rhosigmalapltau18, tv4rhosigmalapltau19, tv4rhosigmalapltau20, tv4rhosigmalapltau21, tv4rhosigmalapltau22;
  double tv4rhosigmalapltau23, tv4rhosigmatau20, tv4rhosigmatau21, tv4rhosigmatau22, tv4rhosigmatau23, tv4rhosigmatau24, tv4rhosigmatau25, tv4rhosigmatau26;
  double tv4rhosigmatau27, tv4rhosigmatau28, tv4rhosigmatau29, tv4rhosigmatau210, tv4rhosigmatau211, tv4rhosigmatau212, tv4rhosigmatau213, tv4rhosigmatau214;
  double tv4rhosigmatau215, tv4rhosigmatau216, tv4rhosigmatau217, tv4rholapl30, tv4rholapl31, tv4rholapl32, tv4rholapl33, tv4rholapl34;
  double tv4rholapl35, tv4rholapl36, tv4rholapl37, tv4rholapl2tau0, tv4rholapl2tau1, tv4rholapl2tau2, tv4rholapl2tau3, tv4rholapl2tau4;
  double tv4rholapl2tau5, tv4rholapl2tau6, tv4rholapl2tau7, tv4rholapl2tau8, tv4rholapl2tau9, tv4rholapl2tau10, tv4rholapl2tau11, tv4rholapltau20;
  double tv4rholapltau21, tv4rholapltau22, tv4rholapltau23, tv4rholapltau24, tv4rholapltau25, tv4rholapltau26, tv4rholapltau27, tv4rholapltau28;
  double tv4rholapltau29, tv4rholapltau210, tv4rholapltau211, tv4rhotau30, tv4rhotau31, tv4rhotau32, tv4rhotau33, tv4rhotau34;
  double tv4rhotau35, tv4rhotau36, tv4rhotau37, tv4sigma40, tv4sigma41, tv4sigma42, tv4sigma43, tv4sigma44;
  double tv4sigma45, tv4sigma46, tv4sigma47, tv4sigma48, tv4sigma49, tv4sigma410, tv4sigma411, tv4sigma412;
  double tv4sigma413, tv4sigma414, tv4sigma3lapl0, tv4sigma3lapl1, tv4sigma3lapl2, tv4sigma3lapl3, tv4sigma3lapl4, tv4sigma3lapl5;
  double tv4sigma3lapl6, tv4sigma3lapl7, tv4sigma3lapl8, tv4sigma3lapl9, tv4sigma3lapl10, tv4sigma3lapl11, tv4sigma3lapl12, tv4sigma3lapl13;
  double tv4sigma3lapl14, tv4sigma3lapl15, tv4sigma3lapl16, tv4sigma3lapl17, tv4sigma3lapl18, tv4sigma3lapl19, tv4sigma3tau0, tv4sigma3tau1;
  double tv4sigma3tau2, tv4sigma3tau3, tv4sigma3tau4, tv4sigma3tau5, tv4sigma3tau6, tv4sigma3tau7, tv4sigma3tau8, tv4sigma3tau9;
  double tv4sigma3tau10, tv4sigma3tau11, tv4sigma3tau12, tv4sigma3tau13, tv4sigma3tau14, tv4sigma3tau15, tv4sigma3tau16, tv4sigma3tau17;
  double tv4sigma3tau18, tv4sigma3tau19, tv4sigma2lapl20, tv4sigma2lapl21, tv4sigma2lapl22, tv4sigma2lapl23, tv4sigma2lapl24, tv4sigma2lapl25;
  double tv4sigma2lapl26, tv4sigma2lapl27, tv4sigma2lapl28, tv4sigma2lapl29, tv4sigma2lapl210, tv4sigma2lapl211, tv4sigma2lapl212, tv4sigma2lapl213;
  double tv4sigma2lapl214, tv4sigma2lapl215, tv4sigma2lapl216, tv4sigma2lapl217, tv4sigma2lapltau0, tv4sigma2lapltau1, tv4sigma2lapltau2, tv4sigma2lapltau3;
  double tv4sigma2lapltau4, tv4sigma2lapltau5, tv4sigma2lapltau6, tv4sigma2lapltau7, tv4sigma2lapltau8, tv4sigma2lapltau9, tv4sigma2lapltau10, tv4sigma2lapltau11;
  double tv4sigma2lapltau12, tv4sigma2lapltau13, tv4sigma2lapltau14, tv4sigma2lapltau15, tv4sigma2lapltau16, tv4sigma2lapltau17, tv4sigma2lapltau18, tv4sigma2lapltau19;
  double tv4sigma2lapltau20, tv4sigma2lapltau21, tv4sigma2lapltau22, tv4sigma2lapltau23, tv4sigma2tau20, tv4sigma2tau21, tv4sigma2tau22, tv4sigma2tau23;
  double tv4sigma2tau24, tv4sigma2tau25, tv4sigma2tau26, tv4sigma2tau27, tv4sigma2tau28, tv4sigma2tau29, tv4sigma2tau210, tv4sigma2tau211;
  double tv4sigma2tau212, tv4sigma2tau213, tv4sigma2tau214, tv4sigma2tau215, tv4sigma2tau216, tv4sigma2tau217, tv4sigmalapl30, tv4sigmalapl31;
  double tv4sigmalapl32, tv4sigmalapl33, tv4sigmalapl34, tv4sigmalapl35, tv4sigmalapl36, tv4sigmalapl37, tv4sigmalapl38, tv4sigmalapl39;
  double tv4sigmalapl310, tv4sigmalapl311, tv4sigmalapl2tau0, tv4sigmalapl2tau1, tv4sigmalapl2tau2, tv4sigmalapl2tau3, tv4sigmalapl2tau4, tv4sigmalapl2tau5;
  double tv4sigmalapl2tau6, tv4sigmalapl2tau7, tv4sigmalapl2tau8, tv4sigmalapl2tau9, tv4sigmalapl2tau10, tv4sigmalapl2tau11, tv4sigmalapl2tau12, tv4sigmalapl2tau13;
  double tv4sigmalapl2tau14, tv4sigmalapl2tau15, tv4sigmalapl2tau16, tv4sigmalapl2tau17, tv4sigmalapltau20, tv4sigmalapltau21, tv4sigmalapltau22, tv4sigmalapltau23;
  double tv4sigmalapltau24, tv4sigmalapltau25, tv4sigmalapltau26, tv4sigmalapltau27, tv4sigmalapltau28, tv4sigmalapltau29, tv4sigmalapltau210, tv4sigmalapltau211;
  double tv4sigmalapltau212, tv4sigmalapltau213, tv4sigmalapltau214, tv4sigmalapltau215, tv4sigmalapltau216, tv4sigmalapltau217, tv4sigmatau30, tv4sigmatau31;
  double tv4sigmatau32, tv4sigmatau33, tv4sigmatau34, tv4sigmatau35, tv4sigmatau36, tv4sigmatau37, tv4sigmatau38, tv4sigmatau39;
  double tv4sigmatau310, tv4sigmatau311, tv4lapl40, tv4lapl41, tv4lapl42, tv4lapl43, tv4lapl44, tv4lapl3tau0;
  double tv4lapl3tau1, tv4lapl3tau2, tv4lapl3tau3, tv4lapl3tau4, tv4lapl3tau5, tv4lapl3tau6, tv4lapl3tau7, tv4lapl2tau20;
  double tv4lapl2tau21, tv4lapl2tau22, tv4lapl2tau23, tv4lapl2tau24, tv4lapl2tau25, tv4lapl2tau26, tv4lapl2tau27, tv4lapl2tau28;
  double tv4lapltau30, tv4lapltau31, tv4lapltau32, tv4lapltau33, tv4lapltau34, tv4lapltau35, tv4lapltau36, tv4lapltau37;
  double tv4tau40, tv4tau41, tv4tau42, tv4tau43, tv4tau44;


  t2 = rho[0] <= p->dens_threshold;
  t3 = M_CBRT3;
  t4 = t3 * t3;
  t5 = M_CBRTPI;
  t7 = t4 * t5 * M_PI;
  t8 = rho[0] + rho[1];
  t9 = 0.1e1 / t8;
  t12 = 0.2e1 * rho[0] * t9 <= p->zeta_threshold;
  t13 = p->zeta_threshold - 0.1e1;
  t16 = 0.2e1 * rho[1] * t9 <= p->zeta_threshold;
  t17 = -t13;
  t18 = rho[0] - rho[1];
  t20 = my_piecewise5(t12, t13, t16, t17, t18 * t9);
  t21 = 0.1e1 + t20;
  t22 = t21 <= p->zeta_threshold;
  t23 = POW_1_3(p->zeta_threshold);
  t24 = t23 * t23;
  t25 = t24 * p->zeta_threshold;
  t26 = POW_1_3(t21);
  t27 = t26 * t26;
  t29 = my_piecewise3(t22, t25, t27 * t21);
  t30 = POW_1_3(t8);
  t31 = t30 * t30;
  t32 = t29 * t31;
  t33 = M_CBRT6;
  t34 = M_PI * M_PI;
  t35 = POW_1_3(t34);
  t36 = t35 * t35;
  t38 = t33 / t36;
  t39 = rho[0] * rho[0];
  t40 = POW_1_3(rho[0]);
  t41 = t40 * t40;
  t43 = 0.1e1 / t41 / t39;
  t48 = 0.1e1 / t41 / rho[0];
  t52 = t33 * t33;
  t54 = 0.1e1 / t35 / t34;
  t55 = t52 * t54;
  t56 = lapl[0] * lapl[0];
  t57 = t39 * rho[0];
  t59 = 0.1e1 / t40 / t57;
  t63 = t39 * t39;
  t65 = 0.1e1 / t40 / t63;
  t66 = sigma[0] * t65;
  t70 = sigma[0] * sigma[0];
  t71 = t63 * rho[0];
  t73 = 0.1e1 / t40 / t71;
  t77 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[0] * t43 + 0.5e1 / 0.54e2 * t38 * lapl[0] * t48 + t55 * t56 * t59 / 0.5832e4 - t55 * t66 * lapl[0] / 0.5184e4 + t55 * t70 * t73 / 0.17496e5;
  t81 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t77);
  t82 = rho[1] <= p->dens_threshold;
  t83 = -t18;
  t85 = my_piecewise5(t16, t13, t12, t17, t83 * t9);
  t86 = 0.1e1 + t85;
  t87 = t86 <= p->zeta_threshold;
  t88 = POW_1_3(t86);
  t89 = t88 * t88;
  t91 = my_piecewise3(t87, t25, t89 * t86);
  t92 = t91 * t31;
  t93 = rho[1] * rho[1];
  t94 = POW_1_3(rho[1]);
  t95 = t94 * t94;
  t97 = 0.1e1 / t95 / t93;
  t102 = 0.1e1 / t95 / rho[1];
  t106 = lapl[1] * lapl[1];
  t107 = t93 * rho[1];
  t109 = 0.1e1 / t94 / t107;
  t113 = t93 * t93;
  t115 = 0.1e1 / t94 / t113;
  t116 = sigma[2] * t115;
  t120 = sigma[2] * sigma[2];
  t121 = t113 * rho[1];
  t123 = 0.1e1 / t94 / t121;
  t127 = 0.1e1 + 0.5e1 / 0.648e3 * t38 * sigma[2] * t97 + 0.5e1 / 0.54e2 * t38 * lapl[1] * t102 + t55 * t106 * t109 / 0.5832e4 - t55 * t116 * lapl[1] / 0.5184e4 + t55 * t120 * t123 / 0.17496e5;
  t131 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t127);
  tzk0 = t81 + t131;

  if(out->zk != NULL && (p->info->flags & XC_FLAGS_HAVE_EXC))
    out->zk[ip*p->dim.zk + 0] += tzk0;

  t132 = t8 * t8;
  t133 = 0.1e1 / t132;
  t134 = t18 * t133;
  t136 = my_piecewise5(t12, 0, t16, 0, t9 - t134);
  t139 = my_piecewise3(t22, 0, 0.5e1 / 0.3e1 * t27 * t136);
  t140 = t139 * t31;
  t144 = 0.1e1 / t30;
  t145 = t29 * t144;
  t148 = t7 * t145 * t77 / 0.1e2;
  t150 = 0.1e1 / t41 / t57;
  t160 = sigma[0] * t73;
  t164 = t63 * t39;
  t166 = 0.1e1 / t40 / t164;
  t170 = -0.5e1 / 0.243e3 * t38 * sigma[0] * t150 - 0.25e2 / 0.162e3 * t38 * lapl[0] * t43 - 0.5e1 / 0.8748e4 * t55 * t56 * t65 + 0.13e2 / 0.15552e5 * t55 * t160 * lapl[0] - 0.2e1 / 0.6561e4 * t55 * t70 * t166;
  t175 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t77 + t148 + 0.3e1 / 0.2e2 * t7 * t32 * t170);
  t176 = t83 * t133;
  t178 = my_piecewise5(t16, 0, t12, 0, -t9 - t176);
  t181 = my_piecewise3(t87, 0, 0.5e1 / 0.3e1 * t89 * t178);
  t182 = t181 * t31;
  t186 = t91 * t144;
  t189 = t7 * t186 * t127 / 0.1e2;
  t191 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t127 + t189);
  tvrho0 = t81 + t131 + t8 * (t175 + t191);

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 0] += tvrho0;

  t195 = my_piecewise5(t12, 0, t16, 0, -t9 - t134);
  t198 = my_piecewise3(t22, 0, 0.5e1 / 0.3e1 * t27 * t195);
  t199 = t198 * t31;
  t204 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t77 + t148);
  t206 = my_piecewise5(t16, 0, t12, 0, t9 - t176);
  t209 = my_piecewise3(t87, 0, 0.5e1 / 0.3e1 * t89 * t206);
  t210 = t209 * t31;
  t215 = 0.1e1 / t95 / t107;
  t225 = sigma[2] * t123;
  t229 = t113 * t93;
  t231 = 0.1e1 / t94 / t229;
  t235 = -0.5e1 / 0.243e3 * t38 * sigma[2] * t215 - 0.25e2 / 0.162e3 * t38 * lapl[1] * t97 - 0.5e1 / 0.8748e4 * t55 * t106 * t115 + 0.13e2 / 0.15552e5 * t55 * t225 * lapl[1] - 0.2e1 / 0.6561e4 * t55 * t120 * t231;
  t240 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t127 + t189 + 0.3e1 / 0.2e2 * t7 * t92 * t235);
  tvrho1 = t81 + t131 + t8 * (t204 + t240);

  if(out->vrho != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vrho[ip*p->dim.vrho + 1] += tvrho1;

  t243 = t38 * t43;
  t246 = t55 * t65 * lapl[0];
  t248 = t55 * t160;
  t250 = 0.5e1 / 0.648e3 * t243 - t246 / 0.5184e4 + t248 / 0.8748e4;
  t254 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t250);
  tvsigma0 = t8 * t254;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 0] += tvsigma0;

  tvsigma1 = 0.e0;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 1] += tvsigma1;

  t255 = t38 * t97;
  t258 = t55 * t115 * lapl[1];
  t260 = t55 * t225;
  t262 = 0.5e1 / 0.648e3 * t255 - t258 / 0.5184e4 + t260 / 0.8748e4;
  t266 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t262);
  tvsigma2 = t8 * t266;

  if(out->vsigma != NULL && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vsigma[ip*p->dim.vsigma + 2] += tvsigma2;

  t274 = 0.5e1 / 0.54e2 * t38 * t48 + t55 * lapl[0] * t59 / 0.2916e4 - t55 * t66 / 0.5184e4;
  t278 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t32 * t274);
  tvlapl0 = t8 * t278;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 0] += tvlapl0;

  t286 = 0.5e1 / 0.54e2 * t38 * t102 + t55 * lapl[1] * t109 / 0.2916e4 - t55 * t116 / 0.5184e4;
  t290 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t92 * t286);
  tvlapl1 = t8 * t290;

  if(out->vlapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vlapl[ip*p->dim.vlapl + 1] += tvlapl1;

  tvtau0 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 0] += tvtau0;

  tvtau1 = 0.e0;

  if(out->vtau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_VXC))
    out->vtau[ip*p->dim.vtau + 1] += tvtau1;

  t293 = 0.1e1 / t26;
  t294 = t136 * t136;
  t297 = t132 * t8;
  t298 = 0.1e1 / t297;
  t299 = t18 * t298;
  t302 = my_piecewise5(t12, 0, t16, 0, -0.2e1 * t133 + 0.2e1 * t299);
  t306 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t293 * t294 + 0.5e1 / 0.3e1 * t27 * t302);
  t307 = t306 * t31;
  t311 = t139 * t144;
  t313 = t7 * t311 * t77;
  t319 = 0.1e1 / t30 / t8;
  t320 = t29 * t319;
  t323 = t7 * t320 * t77 / 0.3e2;
  t325 = t7 * t145 * t170;
  t328 = 0.1e1 / t41 / t63;
  t338 = sigma[0] * t166;
  t344 = 0.1e1 / t40 / t63 / t57;
  t348 = 0.55e2 / 0.729e3 * t38 * sigma[0] * t328 + 0.1e3 / 0.243e3 * t38 * lapl[0] * t150 + 0.65e2 / 0.26244e5 * t55 * t56 * t73 - 0.13e2 / 0.2916e4 * t55 * t338 * lapl[0] + 0.38e2 / 0.19683e5 * t55 * t70 * t344;
  t353 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t307 * t77 + t313 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t140 * t170 - t323 + t325 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t32 * t348);
  t354 = 0.1e1 / t88;
  t355 = t178 * t178;
  t358 = t83 * t298;
  t361 = my_piecewise5(t16, 0, t12, 0, 0.2e1 * t133 + 0.2e1 * t358);
  t365 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t354 * t355 + 0.5e1 / 0.3e1 * t89 * t361);
  t366 = t365 * t31;
  t370 = t181 * t144;
  t372 = t7 * t370 * t127;
  t374 = t91 * t319;
  t377 = t7 * t374 * t127 / 0.3e2;
  t379 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t366 * t127 + t372 / 0.5e1 - t377);
  tv2rho20 = 0.2e1 * t175 + 0.2e1 * t191 + t8 * (t353 + t379);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 0] += tv2rho20;

  t382 = t293 * t195;
  t386 = my_piecewise5(t12, 0, t16, 0, 0.2e1 * t299);
  t390 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t382 * t136 + 0.5e1 / 0.3e1 * t27 * t386);
  t391 = t390 * t31;
  t395 = t198 * t144;
  t397 = t7 * t395 * t77;
  t405 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t391 * t77 + t397 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t199 * t170 + t313 / 0.1e2 - t323 + t325 / 0.1e2);
  t406 = t354 * t206;
  t410 = my_piecewise5(t16, 0, t12, 0, 0.2e1 * t358);
  t414 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t406 * t178 + 0.5e1 / 0.3e1 * t89 * t410);
  t415 = t414 * t31;
  t419 = t209 * t144;
  t421 = t7 * t419 * t127;
  t428 = t7 * t186 * t235;
  t431 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t415 * t127 + t421 / 0.1e2 + t372 / 0.1e2 - t377 + 0.3e1 / 0.2e2 * t7 * t182 * t235 + t428 / 0.1e2);
  tv2rho21 = t175 + t191 + t204 + t240 + t8 * (t405 + t431);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 1] += tv2rho21;

  t436 = t195 * t195;
  t441 = my_piecewise5(t12, 0, t16, 0, 0.2e1 * t133 + 0.2e1 * t299);
  t445 = my_piecewise3(t22, 0, 0.1e2 / 0.9e1 * t293 * t436 + 0.5e1 / 0.3e1 * t27 * t441);
  t446 = t445 * t31;
  t452 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t446 * t77 + t397 / 0.5e1 - t323);
  t453 = t206 * t206;
  t458 = my_piecewise5(t16, 0, t12, 0, -0.2e1 * t133 + 0.2e1 * t358);
  t462 = my_piecewise3(t87, 0, 0.1e2 / 0.9e1 * t354 * t453 + 0.5e1 / 0.3e1 * t89 * t458);
  t463 = t462 * t31;
  t473 = 0.1e1 / t95 / t113;
  t483 = sigma[2] * t231;
  t489 = 0.1e1 / t94 / t113 / t107;
  t493 = 0.55e2 / 0.729e3 * t38 * sigma[2] * t473 + 0.1e3 / 0.243e3 * t38 * lapl[1] * t215 + 0.65e2 / 0.26244e5 * t55 * t106 * t123 - 0.13e2 / 0.2916e4 * t55 * t483 * lapl[1] + 0.38e2 / 0.19683e5 * t55 * t120 * t489;
  t498 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t463 * t127 + t421 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t210 * t235 - t377 + t428 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t92 * t493);
  tv2rho22 = 0.2e1 * t204 + 0.2e1 * t240 + t8 * (t452 + t498);

  if(out->v2rho2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rho2[ip*p->dim.v2rho2 + 2] += tv2rho22;

  t506 = t7 * t145 * t250 / 0.1e2;
  t507 = t38 * t150;
  t510 = t55 * t73 * lapl[0];
  t512 = t55 * t338;
  t514 = -0.5e1 / 0.243e3 * t507 + 0.13e2 / 0.15552e5 * t510 - 0.4e1 / 0.6561e4 * t512;
  t519 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t250 + t506 + 0.3e1 / 0.2e2 * t7 * t32 * t514);
  tv2rhosigma0 = t8 * t519 + t254;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 0] += tv2rhosigma0;

  tv2rhosigma1 = 0.e0;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 1] += tv2rhosigma1;

  t526 = t7 * t186 * t262 / 0.1e2;
  t528 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t262 + t526);
  tv2rhosigma2 = t8 * t528 + t266;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 2] += tv2rhosigma2;

  t534 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t250 + t506);
  tv2rhosigma3 = t8 * t534 + t254;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 3] += tv2rhosigma3;

  tv2rhosigma4 = 0.e0;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 4] += tv2rhosigma4;

  t539 = t38 * t215;
  t542 = t55 * t123 * lapl[1];
  t544 = t55 * t483;
  t546 = -0.5e1 / 0.243e3 * t539 + 0.13e2 / 0.15552e5 * t542 - 0.4e1 / 0.6561e4 * t544;
  t551 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t262 + t526 + 0.3e1 / 0.2e2 * t7 * t92 * t546);
  tv2rhosigma5 = t8 * t551 + t266;

  if(out->v2rhosigma != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhosigma[ip*p->dim.v2rhosigma + 5] += tv2rhosigma5;

  t558 = t7 * t145 * t274 / 0.1e2;
  t562 = -0.25e2 / 0.162e3 * t243 - 0.5e1 / 0.4374e4 * t246 + 0.13e2 / 0.15552e5 * t248;
  t567 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t140 * t274 + t558 + 0.3e1 / 0.2e2 * t7 * t32 * t562);
  tv2rholapl0 = t8 * t567 + t278;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 0] += tv2rholapl0;

  t574 = t7 * t186 * t286 / 0.1e2;
  t576 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t182 * t286 + t574);
  tv2rholapl1 = t8 * t576 + t290;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 1] += tv2rholapl1;

  t582 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t199 * t274 + t558);
  tv2rholapl2 = t8 * t582 + t278;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 2] += tv2rholapl2;

  t590 = -0.25e2 / 0.162e3 * t255 - 0.5e1 / 0.4374e4 * t258 + 0.13e2 / 0.15552e5 * t260;
  t595 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t210 * t286 + t574 + 0.3e1 / 0.2e2 * t7 * t92 * t590);
  tv2rholapl3 = t8 * t595 + t290;

  if(out->v2rholapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rholapl[ip*p->dim.v2rholapl + 3] += tv2rholapl3;

  tv2rhotau0 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 0] += tv2rhotau0;

  tv2rhotau1 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 1] += tv2rhotau1;

  tv2rhotau2 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 2] += tv2rhotau2;

  tv2rhotau3 = 0.e0;

  if(out->v2rhotau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2rhotau[ip*p->dim.v2rhotau + 3] += tv2rhotau3;

  t597 = t7 * t29;
  t598 = t31 * t52;
  t599 = t54 * t73;
  t600 = t598 * t599;
  t601 = t597 * t600;
  t603 = my_piecewise3(t2, 0, t601 / 0.5832e5);
  tv2sigma20 = t8 * t603;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 0] += tv2sigma20;

  tv2sigma21 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 1] += tv2sigma21;

  tv2sigma22 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 2] += tv2sigma22;

  tv2sigma23 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 3] += tv2sigma23;

  tv2sigma24 = 0.e0;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 4] += tv2sigma24;

  t604 = t7 * t91;
  t605 = t54 * t123;
  t606 = t598 * t605;
  t607 = t604 * t606;
  t609 = my_piecewise3(t82, 0, t607 / 0.5832e5);
  tv2sigma25 = t8 * t609;

  if(out->v2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigma2[ip*p->dim.v2sigma2 + 5] += tv2sigma25;

  t610 = t54 * t65;
  t611 = t598 * t610;
  t612 = t597 * t611;
  t614 = my_piecewise3(t2, 0, -t612 / 0.3456e5);
  tv2sigmalapl0 = t8 * t614;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 0] += tv2sigmalapl0;

  tv2sigmalapl1 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 1] += tv2sigmalapl1;

  tv2sigmalapl2 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 2] += tv2sigmalapl2;

  tv2sigmalapl3 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 3] += tv2sigmalapl3;

  tv2sigmalapl4 = 0.e0;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 4] += tv2sigmalapl4;

  t615 = t54 * t115;
  t616 = t598 * t615;
  t617 = t604 * t616;
  t619 = my_piecewise3(t82, 0, -t617 / 0.3456e5);
  tv2sigmalapl5 = t8 * t619;

  if(out->v2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmalapl[ip*p->dim.v2sigmalapl + 5] += tv2sigmalapl5;

  tv2sigmatau0 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 0] += tv2sigmatau0;

  tv2sigmatau1 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 1] += tv2sigmatau1;

  tv2sigmatau2 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 2] += tv2sigmatau2;

  tv2sigmatau3 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 3] += tv2sigmatau3;

  tv2sigmatau4 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 4] += tv2sigmatau4;

  tv2sigmatau5 = 0.e0;

  if(out->v2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2sigmatau[ip*p->dim.v2sigmatau + 5] += tv2sigmatau5;

  t620 = t54 * t59;
  t621 = t598 * t620;
  t624 = my_piecewise3(t2, 0, t597 * t621 / 0.1944e5);
  tv2lapl20 = t8 * t624;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 0] += tv2lapl20;

  tv2lapl21 = 0.e0;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 1] += tv2lapl21;

  t625 = t54 * t109;
  t626 = t598 * t625;
  t629 = my_piecewise3(t82, 0, t604 * t626 / 0.1944e5);
  tv2lapl22 = t8 * t629;

  if(out->v2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapl2[ip*p->dim.v2lapl2 + 2] += tv2lapl22;

  tv2lapltau0 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 0] += tv2lapltau0;

  tv2lapltau1 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 1] += tv2lapltau1;

  tv2lapltau2 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 2] += tv2lapltau2;

  tv2lapltau3 = 0.e0;

  if(out->v2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2lapltau[ip*p->dim.v2lapltau + 3] += tv2lapltau3;

  tv2tau20 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 0] += tv2tau20;

  tv2tau21 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 1] += tv2tau21;

  tv2tau22 = 0.e0;

  if(out->v2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_FXC))
    out->v2tau2[ip*p->dim.v2tau2 + 2] += tv2tau22;

  t633 = 0.1e1 / t26 / t21;
  t634 = t294 * t136;
  t637 = t293 * t136;
  t640 = t132 * t132;
  t641 = 0.1e1 / t640;
  t642 = t18 * t641;
  t645 = my_piecewise5(t12, 0, t16, 0, 0.6e1 * t298 - 0.6e1 * t642);
  t649 = my_piecewise3(t22, 0, -0.1e2 / 0.27e2 * t633 * t634 + 0.1e2 / 0.3e1 * t637 * t302 + 0.5e1 / 0.3e1 * t27 * t645);
  t650 = t649 * t31;
  t654 = t306 * t144;
  t656 = t7 * t654 * t77;
  t661 = t139 * t319;
  t663 = t7 * t661 * t77;
  t666 = t7 * t311 * t170;
  t672 = 0.1e1 / t30 / t132;
  t673 = t29 * t672;
  t676 = 0.2e1 / 0.45e2 * t7 * t673 * t77;
  t678 = t7 * t320 * t170;
  t681 = t7 * t145 * t348;
  t684 = 0.1e1 / t41 / t71;
  t694 = sigma[0] * t344;
  t698 = t63 * t63;
  t700 = 0.1e1 / t40 / t698;
  t704 = -0.77e3 / 0.2187e4 * t38 * sigma[0] * t684 - 0.11e4 / 0.729e3 * t38 * lapl[0] * t328 - 0.26e3 / 0.19683e5 * t55 * t56 * t166 + 0.247e3 / 0.8748e4 * t55 * t694 * lapl[0] - 0.836e3 / 0.59049e5 * t55 * t70 * t700;
  t709 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t650 * t77 + 0.3e1 / 0.1e2 * t656 + 0.9e1 / 0.2e2 * t7 * t307 * t170 - t663 / 0.1e2 + 0.3e1 / 0.5e1 * t666 + 0.9e1 / 0.2e2 * t7 * t140 * t348 + t676 - t678 / 0.1e2 + 0.3e1 / 0.1e2 * t681 + 0.3e1 / 0.2e2 * t7 * t32 * t704);
  t711 = 0.1e1 / t88 / t86;
  t712 = t355 * t178;
  t715 = t354 * t178;
  t718 = t83 * t641;
  t721 = my_piecewise5(t16, 0, t12, 0, -0.6e1 * t298 - 0.6e1 * t718);
  t725 = my_piecewise3(t87, 0, -0.1e2 / 0.27e2 * t711 * t712 + 0.1e2 / 0.3e1 * t715 * t361 + 0.5e1 / 0.3e1 * t89 * t721);
  t726 = t725 * t31;
  t730 = t365 * t144;
  t732 = t7 * t730 * t127;
  t734 = t181 * t319;
  t736 = t7 * t734 * t127;
  t738 = t91 * t672;
  t741 = 0.2e1 / 0.45e2 * t7 * t738 * t127;
  t743 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t726 * t127 + 0.3e1 / 0.1e2 * t732 - t736 / 0.1e2 + t741);
  tv3rho30 = 0.3e1 * t353 + 0.3e1 * t379 + t8 * (t709 + t743);

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 0] += tv3rho30;

  t746 = 0.2e1 * t405;
  t747 = 0.2e1 * t431;
  t748 = t633 * t195;
  t751 = t293 * t386;
  t756 = 0.2e1 * t298;
  t757 = 0.6e1 * t642;
  t759 = my_piecewise5(t12, 0, t16, 0, t756 - t757);
  t763 = my_piecewise3(t22, 0, -0.1e2 / 0.27e2 * t748 * t294 + 0.2e2 / 0.9e1 * t751 * t136 + 0.1e2 / 0.9e1 * t382 * t302 + 0.5e1 / 0.3e1 * t27 * t759);
  t764 = t763 * t31;
  t768 = t390 * t144;
  t771 = t7 * t768 * t77 / 0.5e1;
  t775 = t198 * t319;
  t777 = t7 * t775 * t77;
  t781 = t7 * t395 * t170 / 0.5e1;
  t790 = 0.3e1 / 0.2e2 * t7 * t764 * t77 + t771 + 0.3e1 / 0.1e2 * t7 * t391 * t170 - t777 / 0.3e2 + t781 + 0.3e1 / 0.2e2 * t7 * t199 * t348 + t656 / 0.1e2 - t663 / 0.15e2 + t666 / 0.5e1 + t676 - t678 / 0.15e2 + t681 / 0.1e2;
  t791 = my_piecewise3(t2, 0, t790);
  t792 = t711 * t206;
  t795 = t354 * t410;
  t800 = 0.6e1 * t718;
  t802 = my_piecewise5(t16, 0, t12, 0, -t756 - t800);
  t806 = my_piecewise3(t87, 0, -0.1e2 / 0.27e2 * t792 * t355 + 0.2e2 / 0.9e1 * t795 * t178 + 0.1e2 / 0.9e1 * t406 * t361 + 0.5e1 / 0.3e1 * t89 * t802);
  t807 = t806 * t31;
  t811 = t414 * t144;
  t814 = t7 * t811 * t127 / 0.5e1;
  t815 = t209 * t319;
  t817 = t7 * t815 * t127;
  t826 = t7 * t370 * t235 / 0.5e1;
  t828 = t7 * t374 * t235;
  t831 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t807 * t127 + t814 - t817 / 0.3e2 + t732 / 0.1e2 - t736 / 0.15e2 + t741 + 0.3e1 / 0.2e2 * t7 * t366 * t235 + t826 - t828 / 0.3e2);
  tv3rho31 = t353 + t379 + t746 + t747 + t8 * (t791 + t831);

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 1] += tv3rho31;

  t834 = t633 * t436;
  t839 = t293 * t441;
  t843 = my_piecewise5(t12, 0, t16, 0, -t756 - t757);
  t847 = my_piecewise3(t22, 0, -0.1e2 / 0.27e2 * t834 * t136 + 0.2e2 / 0.9e1 * t382 * t386 + 0.1e2 / 0.9e1 * t839 * t136 + 0.5e1 / 0.3e1 * t27 * t843);
  t848 = t847 * t31;
  t852 = t445 * t144;
  t854 = t7 * t852 * t77;
  t863 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t848 * t77 + t854 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t446 * t170 + t771 - t777 / 0.15e2 + t781 - t663 / 0.3e2 + t676 - t678 / 0.3e2);
  t864 = t711 * t453;
  t869 = t354 * t458;
  t873 = my_piecewise5(t16, 0, t12, 0, t756 - t800);
  t877 = my_piecewise3(t87, 0, -0.1e2 / 0.27e2 * t864 * t178 + 0.2e2 / 0.9e1 * t406 * t410 + 0.1e2 / 0.9e1 * t869 * t178 + 0.5e1 / 0.3e1 * t89 * t873);
  t878 = t877 * t31;
  t882 = t462 * t144;
  t884 = t7 * t882 * t127;
  t891 = t7 * t419 * t235;
  t899 = t7 * t186 * t493;
  t901 = 0.3e1 / 0.2e2 * t7 * t878 * t127 + t884 / 0.1e2 + t814 - t817 / 0.15e2 + 0.3e1 / 0.1e2 * t7 * t415 * t235 + t891 / 0.5e1 - t736 / 0.3e2 + t741 + t826 - t828 / 0.15e2 + 0.3e1 / 0.2e2 * t7 * t182 * t493 + t899 / 0.1e2;
  t902 = my_piecewise3(t82, 0, t901);
  tv3rho32 = t746 + t747 + t452 + t498 + t8 * (t863 + t902);

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 2] += tv3rho32;

  t907 = t436 * t195;
  t914 = my_piecewise5(t12, 0, t16, 0, -0.6e1 * t298 - 0.6e1 * t642);
  t918 = my_piecewise3(t22, 0, -0.1e2 / 0.27e2 * t633 * t907 + 0.1e2 / 0.3e1 * t382 * t441 + 0.5e1 / 0.3e1 * t27 * t914);
  t919 = t918 * t31;
  t926 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t919 * t77 + 0.3e1 / 0.1e2 * t854 - t777 / 0.1e2 + t676);
  t927 = t453 * t206;
  t934 = my_piecewise5(t16, 0, t12, 0, 0.6e1 * t298 - 0.6e1 * t718);
  t938 = my_piecewise3(t87, 0, -0.1e2 / 0.27e2 * t711 * t927 + 0.1e2 / 0.3e1 * t406 * t458 + 0.5e1 / 0.3e1 * t89 * t934);
  t939 = t938 * t31;
  t955 = 0.1e1 / t95 / t121;
  t965 = sigma[2] * t489;
  t969 = t113 * t113;
  t971 = 0.1e1 / t94 / t969;
  t975 = -0.77e3 / 0.2187e4 * t38 * sigma[2] * t955 - 0.11e4 / 0.729e3 * t38 * lapl[1] * t473 - 0.26e3 / 0.19683e5 * t55 * t106 * t231 + 0.247e3 / 0.8748e4 * t55 * t965 * lapl[1] - 0.836e3 / 0.59049e5 * t55 * t120 * t971;
  t980 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t939 * t127 + 0.3e1 / 0.1e2 * t884 + 0.9e1 / 0.2e2 * t7 * t463 * t235 - t817 / 0.1e2 + 0.3e1 / 0.5e1 * t891 + 0.9e1 / 0.2e2 * t7 * t210 * t493 + t741 - t828 / 0.1e2 + 0.3e1 / 0.1e2 * t899 + 0.3e1 / 0.2e2 * t7 * t92 * t975);
  tv3rho33 = 0.3e1 * t452 + 0.3e1 * t498 + t8 * (t926 + t980);

  if(out->v3rho3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho3[ip*p->dim.v3rho3 + 3] += tv3rho33;

  t988 = t7 * t311 * t250;
  t995 = t7 * t320 * t250 / 0.3e2;
  t997 = t7 * t145 * t514;
  t999 = t38 * t328;
  t1002 = t55 * t166 * lapl[0];
  t1004 = t55 * t694;
  t1006 = 0.55e2 / 0.729e3 * t999 - 0.13e2 / 0.2916e4 * t1002 + 0.76e2 / 0.19683e5 * t1004;
  t1011 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t307 * t250 + t988 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t140 * t514 - t995 + t997 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t32 * t1006);
  tv3rho2sigma0 = t8 * t1011 + 0.2e1 * t519;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 0] += tv3rho2sigma0;

  tv3rho2sigma1 = 0.e0;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 1] += tv3rho2sigma1;

  t1018 = t7 * t370 * t262;
  t1022 = t7 * t374 * t262 / 0.3e2;
  t1024 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t366 * t262 + t1018 / 0.5e1 - t1022);
  tv3rho2sigma2 = t8 * t1024 + 0.2e1 * t528;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 2] += tv3rho2sigma2;

  t1030 = t7 * t395 * t250;
  t1038 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t391 * t250 + t1030 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t199 * t514 + t988 / 0.1e2 - t995 + t997 / 0.1e2);
  tv3rho2sigma3 = t8 * t1038 + t519 + t534;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 3] += tv3rho2sigma3;

  tv3rho2sigma4 = 0.e0;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 4] += tv3rho2sigma4;

  t1044 = t7 * t419 * t262;
  t1051 = t7 * t186 * t546;
  t1054 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t415 * t262 + t1044 / 0.1e2 + t1018 / 0.1e2 - t1022 + 0.3e1 / 0.2e2 * t7 * t182 * t546 + t1051 / 0.1e2);
  tv3rho2sigma5 = t8 * t1054 + t528 + t551;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 5] += tv3rho2sigma5;

  t1062 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t446 * t250 + t1030 / 0.5e1 - t995);
  tv3rho2sigma6 = t8 * t1062 + 0.2e1 * t534;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 6] += tv3rho2sigma6;

  tv3rho2sigma7 = 0.e0;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 7] += tv3rho2sigma7;

  t1073 = t38 * t473;
  t1076 = t55 * t231 * lapl[1];
  t1078 = t55 * t965;
  t1080 = 0.55e2 / 0.729e3 * t1073 - 0.13e2 / 0.2916e4 * t1076 + 0.76e2 / 0.19683e5 * t1078;
  t1085 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t463 * t262 + t1044 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t210 * t546 - t1022 + t1051 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t92 * t1080);
  tv3rho2sigma8 = t8 * t1085 + 0.2e1 * t551;

  if(out->v3rho2sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2sigma[ip*p->dim.v3rho2sigma + 8] += tv3rho2sigma8;

  t1092 = t7 * t311 * t274;
  t1099 = t7 * t320 * t274 / 0.3e2;
  t1101 = t7 * t145 * t562;
  t1106 = 0.1e3 / 0.243e3 * t507 + 0.65e2 / 0.13122e5 * t510 - 0.13e2 / 0.2916e4 * t512;
  t1111 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t307 * t274 + t1092 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t140 * t562 - t1099 + t1101 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t32 * t1106);
  tv3rho2lapl0 = t8 * t1111 + 0.2e1 * t567;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 0] += tv3rho2lapl0;

  t1118 = t7 * t370 * t286;
  t1122 = t7 * t374 * t286 / 0.3e2;
  t1124 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t366 * t286 + t1118 / 0.5e1 - t1122);
  tv3rho2lapl1 = t8 * t1124 + 0.2e1 * t576;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 1] += tv3rho2lapl1;

  t1130 = t7 * t395 * t274;
  t1138 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t391 * t274 + t1130 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t199 * t562 + t1092 / 0.1e2 - t1099 + t1101 / 0.1e2);
  tv3rho2lapl2 = t8 * t1138 + t567 + t582;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 2] += tv3rho2lapl2;

  t1144 = t7 * t419 * t286;
  t1151 = t7 * t186 * t590;
  t1154 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t415 * t286 + t1144 / 0.1e2 + t1118 / 0.1e2 - t1122 + 0.3e1 / 0.2e2 * t7 * t182 * t590 + t1151 / 0.1e2);
  tv3rho2lapl3 = t8 * t1154 + t576 + t595;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 3] += tv3rho2lapl3;

  t1162 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t446 * t274 + t1130 / 0.5e1 - t1099);
  tv3rho2lapl4 = t8 * t1162 + 0.2e1 * t582;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 4] += tv3rho2lapl4;

  t1176 = 0.1e3 / 0.243e3 * t539 + 0.65e2 / 0.13122e5 * t542 - 0.13e2 / 0.2916e4 * t544;
  t1181 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t463 * t286 + t1144 / 0.5e1 + 0.3e1 / 0.1e2 * t7 * t210 * t590 - t1122 + t1151 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t92 * t1176);
  tv3rho2lapl5 = t8 * t1181 + 0.2e1 * t595;

  if(out->v3rho2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2lapl[ip*p->dim.v3rho2lapl + 5] += tv3rho2lapl5;

  tv3rho2tau0 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 0] += tv3rho2tau0;

  tv3rho2tau1 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 1] += tv3rho2tau1;

  tv3rho2tau2 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 2] += tv3rho2tau2;

  tv3rho2tau3 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 3] += tv3rho2tau3;

  tv3rho2tau4 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 4] += tv3rho2tau4;

  tv3rho2tau5 = 0.e0;

  if(out->v3rho2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rho2tau[ip*p->dim.v3rho2tau + 5] += tv3rho2tau5;

  t1183 = t7 * t139;
  t1184 = t1183 * t600;
  t1186 = t144 * t52;
  t1187 = t1186 * t599;
  t1188 = t597 * t1187;
  t1189 = t1188 / 0.8748e5;
  t1190 = t54 * t166;
  t1191 = t598 * t1190;
  t1192 = t597 * t1191;
  t1195 = my_piecewise3(t2, 0, t1184 / 0.5832e5 + t1189 - t1192 / 0.10935e5);
  tv3rhosigma20 = t8 * t1195 + t603;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 0] += tv3rhosigma20;

  tv3rhosigma21 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 1] += tv3rhosigma21;

  tv3rhosigma22 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 2] += tv3rhosigma22;

  tv3rhosigma23 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 3] += tv3rhosigma23;

  tv3rhosigma24 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 4] += tv3rhosigma24;

  t1197 = t7 * t181;
  t1198 = t1197 * t606;
  t1200 = t1186 * t605;
  t1201 = t604 * t1200;
  t1202 = t1201 / 0.8748e5;
  t1204 = my_piecewise3(t82, 0, t1198 / 0.5832e5 + t1202);
  tv3rhosigma25 = t8 * t1204 + t609;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 5] += tv3rhosigma25;

  t1206 = t7 * t198;
  t1207 = t1206 * t600;
  t1210 = my_piecewise3(t2, 0, t1207 / 0.5832e5 + t1189);
  tv3rhosigma26 = t8 * t1210 + t603;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 6] += tv3rhosigma26;

  tv3rhosigma27 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 7] += tv3rhosigma27;

  tv3rhosigma28 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 8] += tv3rhosigma28;

  tv3rhosigma29 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 9] += tv3rhosigma29;

  tv3rhosigma210 = 0.e0;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 10] += tv3rhosigma210;

  t1212 = t7 * t209;
  t1213 = t1212 * t606;
  t1215 = t54 * t231;
  t1216 = t598 * t1215;
  t1217 = t604 * t1216;
  t1220 = my_piecewise3(t82, 0, t1213 / 0.5832e5 + t1202 - t1217 / 0.10935e5);
  tv3rhosigma211 = t8 * t1220 + t609;

  if(out->v3rhosigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigma2[ip*p->dim.v3rhosigma2 + 11] += tv3rhosigma211;

  t1222 = t1183 * t611;
  t1224 = t1186 * t610;
  t1225 = t597 * t1224;
  t1226 = t1225 / 0.5184e5;
  t1229 = my_piecewise3(t2, 0, -t1222 / 0.3456e5 - t1226 + 0.13e2 / 0.10368e6 * t601);
  tv3rhosigmalapl0 = t8 * t1229 + t614;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 0] += tv3rhosigmalapl0;

  tv3rhosigmalapl1 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 1] += tv3rhosigmalapl1;

  tv3rhosigmalapl2 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 2] += tv3rhosigmalapl2;

  tv3rhosigmalapl3 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 3] += tv3rhosigmalapl3;

  tv3rhosigmalapl4 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 4] += tv3rhosigmalapl4;

  t1231 = t1197 * t616;
  t1233 = t1186 * t615;
  t1234 = t604 * t1233;
  t1235 = t1234 / 0.5184e5;
  t1237 = my_piecewise3(t82, 0, -t1231 / 0.3456e5 - t1235);
  tv3rhosigmalapl5 = t8 * t1237 + t619;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 5] += tv3rhosigmalapl5;

  t1239 = t1206 * t611;
  t1242 = my_piecewise3(t2, 0, -t1239 / 0.3456e5 - t1226);
  tv3rhosigmalapl6 = t8 * t1242 + t614;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 6] += tv3rhosigmalapl6;

  tv3rhosigmalapl7 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 7] += tv3rhosigmalapl7;

  tv3rhosigmalapl8 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 8] += tv3rhosigmalapl8;

  tv3rhosigmalapl9 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 9] += tv3rhosigmalapl9;

  tv3rhosigmalapl10 = 0.e0;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 10] += tv3rhosigmalapl10;

  t1244 = t1212 * t616;
  t1248 = my_piecewise3(t82, 0, -t1244 / 0.3456e5 - t1235 + 0.13e2 / 0.10368e6 * t607);
  tv3rhosigmalapl11 = t8 * t1248 + t619;

  if(out->v3rhosigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmalapl[ip*p->dim.v3rhosigmalapl + 11] += tv3rhosigmalapl11;

  tv3rhosigmatau0 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 0] += tv3rhosigmatau0;

  tv3rhosigmatau1 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 1] += tv3rhosigmatau1;

  tv3rhosigmatau2 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 2] += tv3rhosigmatau2;

  tv3rhosigmatau3 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 3] += tv3rhosigmatau3;

  tv3rhosigmatau4 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 4] += tv3rhosigmatau4;

  tv3rhosigmatau5 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 5] += tv3rhosigmatau5;

  tv3rhosigmatau6 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 6] += tv3rhosigmatau6;

  tv3rhosigmatau7 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 7] += tv3rhosigmatau7;

  tv3rhosigmatau8 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 8] += tv3rhosigmatau8;

  tv3rhosigmatau9 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 9] += tv3rhosigmatau9;

  tv3rhosigmatau10 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 10] += tv3rhosigmatau10;

  tv3rhosigmatau11 = 0.e0;

  if(out->v3rhosigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhosigmatau[ip*p->dim.v3rhosigmatau + 11] += tv3rhosigmatau11;

  t1252 = t1186 * t620;
  t1254 = t597 * t1252 / 0.2916e5;
  t1257 = my_piecewise3(t2, 0, t1183 * t621 / 0.1944e5 + t1254 - t612 / 0.5832e4);
  tv3rholapl20 = t8 * t1257 + t624;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 0] += tv3rholapl20;

  tv3rholapl21 = 0.e0;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 1] += tv3rholapl21;

  t1261 = t1186 * t625;
  t1263 = t604 * t1261 / 0.2916e5;
  t1265 = my_piecewise3(t82, 0, t1197 * t626 / 0.1944e5 + t1263);
  tv3rholapl22 = t8 * t1265 + t629;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 2] += tv3rholapl22;

  t1270 = my_piecewise3(t2, 0, t1206 * t621 / 0.1944e5 + t1254);
  tv3rholapl23 = t8 * t1270 + t624;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 3] += tv3rholapl23;

  tv3rholapl24 = 0.e0;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 4] += tv3rholapl24;

  t1276 = my_piecewise3(t82, 0, t1212 * t626 / 0.1944e5 + t1263 - t617 / 0.5832e4);
  tv3rholapl25 = t8 * t1276 + t629;

  if(out->v3rholapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapl2[ip*p->dim.v3rholapl2 + 5] += tv3rholapl25;

  tv3rholapltau0 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 0] += tv3rholapltau0;

  tv3rholapltau1 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 1] += tv3rholapltau1;

  tv3rholapltau2 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 2] += tv3rholapltau2;

  tv3rholapltau3 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 3] += tv3rholapltau3;

  tv3rholapltau4 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 4] += tv3rholapltau4;

  tv3rholapltau5 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 5] += tv3rholapltau5;

  tv3rholapltau6 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 6] += tv3rholapltau6;

  tv3rholapltau7 = 0.e0;

  if(out->v3rholapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rholapltau[ip*p->dim.v3rholapltau + 7] += tv3rholapltau7;

  tv3rhotau20 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 0] += tv3rhotau20;

  tv3rhotau21 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 1] += tv3rhotau21;

  tv3rhotau22 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 2] += tv3rhotau22;

  tv3rhotau23 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 3] += tv3rhotau23;

  tv3rhotau24 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 4] += tv3rhotau24;

  tv3rhotau25 = 0.e0;

  if(out->v3rhotau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3rhotau2[ip*p->dim.v3rhotau2 + 5] += tv3rhotau25;

  tv3sigma30 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 0] += tv3sigma30;

  tv3sigma31 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 1] += tv3sigma31;

  tv3sigma32 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 2] += tv3sigma32;

  tv3sigma33 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 3] += tv3sigma33;

  tv3sigma34 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 4] += tv3sigma34;

  tv3sigma35 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 5] += tv3sigma35;

  tv3sigma36 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 6] += tv3sigma36;

  tv3sigma37 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 7] += tv3sigma37;

  tv3sigma38 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 8] += tv3sigma38;

  tv3sigma39 = 0.e0;

  if(out->v3sigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma3[ip*p->dim.v3sigma3 + 9] += tv3sigma39;

  tv3sigma2lapl0 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 0] += tv3sigma2lapl0;

  tv3sigma2lapl1 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 1] += tv3sigma2lapl1;

  tv3sigma2lapl2 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 2] += tv3sigma2lapl2;

  tv3sigma2lapl3 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 3] += tv3sigma2lapl3;

  tv3sigma2lapl4 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 4] += tv3sigma2lapl4;

  tv3sigma2lapl5 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 5] += tv3sigma2lapl5;

  tv3sigma2lapl6 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 6] += tv3sigma2lapl6;

  tv3sigma2lapl7 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 7] += tv3sigma2lapl7;

  tv3sigma2lapl8 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 8] += tv3sigma2lapl8;

  tv3sigma2lapl9 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 9] += tv3sigma2lapl9;

  tv3sigma2lapl10 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 10] += tv3sigma2lapl10;

  tv3sigma2lapl11 = 0.e0;

  if(out->v3sigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2lapl[ip*p->dim.v3sigma2lapl + 11] += tv3sigma2lapl11;

  tv3sigma2tau0 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 0] += tv3sigma2tau0;

  tv3sigma2tau1 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 1] += tv3sigma2tau1;

  tv3sigma2tau2 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 2] += tv3sigma2tau2;

  tv3sigma2tau3 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 3] += tv3sigma2tau3;

  tv3sigma2tau4 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 4] += tv3sigma2tau4;

  tv3sigma2tau5 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 5] += tv3sigma2tau5;

  tv3sigma2tau6 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 6] += tv3sigma2tau6;

  tv3sigma2tau7 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 7] += tv3sigma2tau7;

  tv3sigma2tau8 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 8] += tv3sigma2tau8;

  tv3sigma2tau9 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 9] += tv3sigma2tau9;

  tv3sigma2tau10 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 10] += tv3sigma2tau10;

  tv3sigma2tau11 = 0.e0;

  if(out->v3sigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigma2tau[ip*p->dim.v3sigma2tau + 11] += tv3sigma2tau11;

  tv3sigmalapl20 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 0] += tv3sigmalapl20;

  tv3sigmalapl21 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 1] += tv3sigmalapl21;

  tv3sigmalapl22 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 2] += tv3sigmalapl22;

  tv3sigmalapl23 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 3] += tv3sigmalapl23;

  tv3sigmalapl24 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 4] += tv3sigmalapl24;

  tv3sigmalapl25 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 5] += tv3sigmalapl25;

  tv3sigmalapl26 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 6] += tv3sigmalapl26;

  tv3sigmalapl27 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 7] += tv3sigmalapl27;

  tv3sigmalapl28 = 0.e0;

  if(out->v3sigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapl2[ip*p->dim.v3sigmalapl2 + 8] += tv3sigmalapl28;

  tv3sigmalapltau0 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 0] += tv3sigmalapltau0;

  tv3sigmalapltau1 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 1] += tv3sigmalapltau1;

  tv3sigmalapltau2 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 2] += tv3sigmalapltau2;

  tv3sigmalapltau3 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 3] += tv3sigmalapltau3;

  tv3sigmalapltau4 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 4] += tv3sigmalapltau4;

  tv3sigmalapltau5 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 5] += tv3sigmalapltau5;

  tv3sigmalapltau6 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 6] += tv3sigmalapltau6;

  tv3sigmalapltau7 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 7] += tv3sigmalapltau7;

  tv3sigmalapltau8 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 8] += tv3sigmalapltau8;

  tv3sigmalapltau9 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 9] += tv3sigmalapltau9;

  tv3sigmalapltau10 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 10] += tv3sigmalapltau10;

  tv3sigmalapltau11 = 0.e0;

  if(out->v3sigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmalapltau[ip*p->dim.v3sigmalapltau + 11] += tv3sigmalapltau11;

  tv3sigmatau20 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 0] += tv3sigmatau20;

  tv3sigmatau21 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 1] += tv3sigmatau21;

  tv3sigmatau22 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 2] += tv3sigmatau22;

  tv3sigmatau23 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 3] += tv3sigmatau23;

  tv3sigmatau24 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 4] += tv3sigmatau24;

  tv3sigmatau25 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 5] += tv3sigmatau25;

  tv3sigmatau26 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 6] += tv3sigmatau26;

  tv3sigmatau27 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 7] += tv3sigmatau27;

  tv3sigmatau28 = 0.e0;

  if(out->v3sigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3sigmatau2[ip*p->dim.v3sigmatau2 + 8] += tv3sigmatau28;

  tv3lapl30 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 0] += tv3lapl30;

  tv3lapl31 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 1] += tv3lapl31;

  tv3lapl32 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 2] += tv3lapl32;

  tv3lapl33 = 0.e0;

  if(out->v3lapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl3[ip*p->dim.v3lapl3 + 3] += tv3lapl33;

  tv3lapl2tau0 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 0] += tv3lapl2tau0;

  tv3lapl2tau1 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 1] += tv3lapl2tau1;

  tv3lapl2tau2 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 2] += tv3lapl2tau2;

  tv3lapl2tau3 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 3] += tv3lapl2tau3;

  tv3lapl2tau4 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 4] += tv3lapl2tau4;

  tv3lapl2tau5 = 0.e0;

  if(out->v3lapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapl2tau[ip*p->dim.v3lapl2tau + 5] += tv3lapl2tau5;

  tv3lapltau20 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 0] += tv3lapltau20;

  tv3lapltau21 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 1] += tv3lapltau21;

  tv3lapltau22 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 2] += tv3lapltau22;

  tv3lapltau23 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 3] += tv3lapltau23;

  tv3lapltau24 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 4] += tv3lapltau24;

  tv3lapltau25 = 0.e0;

  if(out->v3lapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3lapltau2[ip*p->dim.v3lapltau2 + 5] += tv3lapltau25;

  tv3tau30 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 0] += tv3tau30;

  tv3tau31 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 1] += tv3tau31;

  tv3tau32 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 2] += tv3tau32;

  tv3tau33 = 0.e0;

  if(out->v3tau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_KXC))
    out->v3tau3[ip*p->dim.v3tau3 + 3] += tv3tau33;

  t1281 = t7 * t673 * t170;
  t1284 = t7 * t320 * t348;
  t1287 = t7 * t145 * t704;
  t1300 = sigma[0] * t700;
  t1314 = t21 * t21;
  t1316 = 0.1e1 / t26 / t1314;
  t1317 = t294 * t294;
  t1323 = t302 * t302;
  t1329 = 0.1e1 / t640 / t8;
  t1330 = t18 * t1329;
  t1333 = my_piecewise5(t12, 0, t16, 0, -0.24e2 * t641 + 0.24e2 * t1330);
  t1337 = my_piecewise3(t22, 0, 0.4e2 / 0.81e2 * t1316 * t1317 - 0.2e2 / 0.9e1 * t633 * t294 * t302 + 0.1e2 / 0.3e1 * t293 * t1323 + 0.4e2 / 0.9e1 * t637 * t645 + 0.5e1 / 0.3e1 * t27 * t1333);
  t1346 = t7 * t654 * t170;
  t1352 = t7 * t661 * t170;
  t1355 = t7 * t311 * t348;
  t1362 = t7 * t649 * t144 * t77;
  t1366 = t7 * t306 * t319 * t77;
  t1370 = t7 * t139 * t672 * t77;
  t1373 = 0.1e1 / t30 / t297;
  t1377 = 0.14e2 / 0.135e3 * t7 * t29 * t1373 * t77;
  t1378 = 0.8e1 / 0.45e2 * t1281 - t1284 / 0.5e1 + 0.2e1 / 0.5e1 * t1287 + 0.3e1 / 0.2e2 * t7 * t32 * (0.1309e5 / 0.6561e4 * t38 * sigma[0] / t41 / t164 + 0.154e5 / 0.2187e4 * t38 * lapl[0] * t684 + 0.494e4 / 0.59049e5 * t55 * t56 * t344 - 0.2717e4 / 0.13122e5 * t55 * t1300 * lapl[0] + 0.209e5 / 0.177147e6 * t55 * t70 / t40 / t698 / rho[0]) + 0.3e1 / 0.2e2 * t7 * t1337 * t31 * t77 + 0.3e1 / 0.5e1 * t7 * t650 * t170 + 0.6e1 / 0.5e1 * t1346 + 0.9e1 / 0.1e2 * t7 * t307 * t348 - 0.2e1 / 0.5e1 * t1352 + 0.6e1 / 0.5e1 * t1355 + 0.3e1 / 0.5e1 * t7 * t140 * t704 + 0.2e1 / 0.5e1 * t1362 - t1366 / 0.5e1 + 0.8e1 / 0.45e2 * t1370 - t1377;
  t1379 = my_piecewise3(t2, 0, t1378);
  t1380 = t86 * t86;
  t1382 = 0.1e1 / t88 / t1380;
  t1383 = t355 * t355;
  t1389 = t361 * t361;
  t1394 = t83 * t1329;
  t1397 = my_piecewise5(t16, 0, t12, 0, 0.24e2 * t641 + 0.24e2 * t1394);
  t1401 = my_piecewise3(t87, 0, 0.4e2 / 0.81e2 * t1382 * t1383 - 0.2e2 / 0.9e1 * t711 * t355 * t361 + 0.1e2 / 0.3e1 * t354 * t1389 + 0.4e2 / 0.9e1 * t715 * t721 + 0.5e1 / 0.3e1 * t89 * t1397);
  t1408 = t7 * t725 * t144 * t127;
  t1412 = t7 * t365 * t319 * t127;
  t1416 = t7 * t181 * t672 * t127;
  t1421 = 0.14e2 / 0.135e3 * t7 * t91 * t1373 * t127;
  t1423 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t1401 * t31 * t127 + 0.2e1 / 0.5e1 * t1408 - t1412 / 0.5e1 + 0.8e1 / 0.45e2 * t1416 - t1421);
  tv4rho40 = 0.4e1 * t709 + 0.4e1 * t743 + t8 * (t1379 + t1423);

  if(out->v4rho4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho4[ip*p->dim.v4rho4 + 0] += tv4rho40;

  t1444 = 0.12e2 * t641;
  t1445 = 0.24e2 * t1330;
  t1447 = my_piecewise5(t12, 0, t16, 0, -t1444 + t1445);
  t1451 = my_piecewise3(t22, 0, 0.4e2 / 0.81e2 * t1316 * t195 * t634 - 0.1e2 / 0.9e1 * t633 * t386 * t294 - 0.1e2 / 0.9e1 * t748 * t136 * t302 + 0.1e2 / 0.3e1 * t293 * t759 * t136 + 0.1e2 / 0.3e1 * t751 * t302 + 0.1e2 / 0.9e1 * t382 * t645 + 0.5e1 / 0.3e1 * t27 * t1447);
  t1460 = t7 * t768 * t170;
  t1466 = t7 * t775 * t170;
  t1467 = t1466 / 0.1e2;
  t1469 = t7 * t395 * t348;
  t1482 = t7 * t763 * t144 * t77;
  t1486 = t7 * t390 * t319 * t77;
  t1487 = t1486 / 0.1e2;
  t1490 = t7 * t198 * t672 * t77;
  t1495 = 0.3e1 / 0.2e2 * t7 * t1451 * t31 * t77 + 0.9e1 / 0.2e2 * t7 * t764 * t170 + 0.3e1 / 0.5e1 * t1460 + 0.9e1 / 0.2e2 * t7 * t391 * t348 - t1467 + 0.3e1 / 0.1e2 * t1469 + 0.3e1 / 0.2e2 * t7 * t199 * t704 + 0.2e1 / 0.15e2 * t1281 - t1284 / 0.1e2 + t1287 / 0.1e2 + 0.3e1 / 0.1e2 * t1346 - t1352 / 0.5e1 + 0.3e1 / 0.1e2 * t1355 + 0.3e1 / 0.1e2 * t1482 - t1487 + 0.2e1 / 0.45e2 * t1490 + t1362 / 0.1e2 - t1366 / 0.1e2 + 0.2e1 / 0.15e2 * t1370 - t1377;
  t1496 = my_piecewise3(t2, 0, t1495);
  t1513 = 0.24e2 * t1394;
  t1515 = my_piecewise5(t16, 0, t12, 0, t1444 + t1513);
  t1519 = my_piecewise3(t87, 0, 0.4e2 / 0.81e2 * t1382 * t206 * t712 - 0.1e2 / 0.9e1 * t711 * t410 * t355 - 0.1e2 / 0.9e1 * t792 * t178 * t361 + 0.1e2 / 0.3e1 * t354 * t802 * t178 + 0.1e2 / 0.3e1 * t795 * t361 + 0.1e2 / 0.9e1 * t406 * t721 + 0.5e1 / 0.3e1 * t89 * t1515);
  t1526 = t7 * t806 * t144 * t127;
  t1530 = t7 * t414 * t319 * t127;
  t1531 = t1530 / 0.1e2;
  t1534 = t7 * t209 * t672 * t127;
  t1543 = t7 * t730 * t235;
  t1546 = t7 * t734 * t235;
  t1547 = t1546 / 0.1e2;
  t1549 = t7 * t738 * t235;
  t1551 = 0.3e1 / 0.2e2 * t7 * t1519 * t31 * t127 + 0.3e1 / 0.1e2 * t1526 - t1531 + 0.2e1 / 0.45e2 * t1534 + t1408 / 0.1e2 - t1412 / 0.1e2 + 0.2e1 / 0.15e2 * t1416 - t1421 + 0.3e1 / 0.2e2 * t7 * t726 * t235 + 0.3e1 / 0.1e2 * t1543 - t1547 + 0.2e1 / 0.45e2 * t1549;
  t1552 = my_piecewise3(t82, 0, t1551);
  tv4rho41 = t709 + t743 + 0.3e1 * t791 + 0.3e1 * t831 + t8 * (t1496 + t1552);

  if(out->v4rho4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho4[ip*p->dim.v4rho4 + 1] += tv4rho41;

  t1567 = t386 * t386;
  t1580 = my_piecewise5(t12, 0, t16, 0, t1445);
  t1584 = my_piecewise3(t22, 0, 0.4e2 / 0.81e2 * t1316 * t436 * t294 - 0.4e2 / 0.27e2 * t748 * t136 * t386 - 0.1e2 / 0.27e2 * t834 * t302 + 0.2e2 / 0.9e1 * t293 * t1567 + 0.2e2 / 0.9e1 * t382 * t759 - 0.1e2 / 0.27e2 * t633 * t441 * t294 + 0.2e2 / 0.9e1 * t293 * t843 * t136 + 0.1e2 / 0.9e1 * t839 * t302 + 0.5e1 / 0.3e1 * t27 * t1580);
  t1593 = t7 * t852 * t170;
  t1606 = t7 * t847 * t144 * t77;
  t1610 = t7 * t445 * t319 * t77;
  t1617 = 0.3e1 / 0.2e2 * t7 * t1584 * t31 * t77 + 0.3e1 / 0.1e2 * t7 * t848 * t170 + t1593 / 0.5e1 + 0.3e1 / 0.2e2 * t7 * t446 * t348 + 0.2e1 / 0.5e1 * t1460 - 0.2e1 / 0.15e2 * t1466 + t1469 / 0.5e1 + 0.4e1 / 0.45e2 * t1281 - t1284 / 0.3e2 - t1352 / 0.15e2 + t1606 / 0.5e1 - t1610 / 0.3e2 + t1482 / 0.5e1 - 0.2e1 / 0.15e2 * t1486 + 0.4e1 / 0.45e2 * t1490 - t1366 / 0.3e2 + 0.4e1 / 0.45e2 * t1370 - t1377;
  t1618 = my_piecewise3(t2, 0, t1617);
  t1627 = t410 * t410;
  t1640 = my_piecewise5(t16, 0, t12, 0, t1513);
  t1644 = my_piecewise3(t87, 0, 0.4e2 / 0.81e2 * t1382 * t453 * t355 - 0.4e2 / 0.27e2 * t792 * t178 * t410 - 0.1e2 / 0.27e2 * t864 * t361 + 0.2e2 / 0.9e1 * t354 * t1627 + 0.2e2 / 0.9e1 * t406 * t802 - 0.1e2 / 0.27e2 * t711 * t458 * t355 + 0.2e2 / 0.9e1 * t354 * t873 * t178 + 0.1e2 / 0.9e1 * t869 * t361 + 0.5e1 / 0.3e1 * t89 * t1640);
  t1651 = t7 * t877 * t144 * t127;
  t1655 = t7 * t462 * t319 * t127;
  t1664 = t7 * t811 * t235;
  t1667 = t7 * t815 * t235;
  t1678 = t7 * t370 * t493;
  t1681 = t7 * t374 * t493;
  t1683 = 0.3e1 / 0.2e2 * t7 * t1644 * t31 * t127 + t1651 / 0.5e1 - t1655 / 0.3e2 + t1526 / 0.5e1 - 0.2e1 / 0.15e2 * t1530 + 0.4e1 / 0.45e2 * t1534 + 0.3e1 / 0.1e2 * t7 * t807 * t235 + 0.2e1 / 0.5e1 * t1664 - t1667 / 0.15e2 - t1412 / 0.3e2 + 0.4e1 / 0.45e2 * t1416 - t1421 + t1543 / 0.5e1 - 0.2e1 / 0.15e2 * t1546 + 0.4e1 / 0.45e2 * t1549 + 0.3e1 / 0.2e2 * t7 * t366 * t493 + t1678 / 0.5e1 - t1681 / 0.3e2;
  t1684 = my_piecewise3(t82, 0, t1683);
  tv4rho42 = 0.2e1 * t791 + 0.2e1 * t831 + 0.2e1 * t863 + 0.2e1 * t902 + t8 * (t1618 + t1684);

  if(out->v4rho4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho4[ip*p->dim.v4rho4 + 2] += tv4rho42;

  t1705 = my_piecewise5(t12, 0, t16, 0, t1444 + t1445);
  t1709 = my_piecewise3(t22, 0, 0.4e2 / 0.81e2 * t1316 * t907 * t136 - 0.1e2 / 0.9e1 * t834 * t386 - 0.1e2 / 0.9e1 * t748 * t441 * t136 + 0.1e2 / 0.3e1 * t751 * t441 + 0.1e2 / 0.3e1 * t382 * t843 + 0.1e2 / 0.9e1 * t293 * t914 * t136 + 0.5e1 / 0.3e1 * t27 * t1705);
  t1716 = t7 * t918 * t144 * t77;
  t1727 = 0.3e1 / 0.2e2 * t7 * t1709 * t31 * t77 + t1716 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t919 * t170 + 0.3e1 / 0.1e2 * t1606 - t1610 / 0.1e2 + 0.3e1 / 0.1e2 * t1593 - t1487 + 0.2e1 / 0.15e2 * t1490 - t1467 + 0.2e1 / 0.45e2 * t1370 - t1377 + 0.2e1 / 0.45e2 * t1281;
  t1728 = my_piecewise3(t2, 0, t1727);
  t1745 = my_piecewise5(t16, 0, t12, 0, -t1444 + t1513);
  t1749 = my_piecewise3(t87, 0, 0.4e2 / 0.81e2 * t1382 * t927 * t178 - 0.1e2 / 0.9e1 * t864 * t410 - 0.1e2 / 0.9e1 * t792 * t458 * t178 + 0.1e2 / 0.3e1 * t795 * t458 + 0.1e2 / 0.3e1 * t406 * t873 + 0.1e2 / 0.9e1 * t354 * t934 * t178 + 0.5e1 / 0.3e1 * t89 * t1745);
  t1756 = t7 * t938 * t144 * t127;
  t1764 = t7 * t882 * t235;
  t1773 = t7 * t419 * t493;
  t1783 = t7 * t186 * t975;
  t1785 = 0.3e1 / 0.2e2 * t7 * t1749 * t31 * t127 + t1756 / 0.1e2 + 0.3e1 / 0.1e2 * t1651 - t1655 / 0.1e2 + 0.9e1 / 0.2e2 * t7 * t878 * t235 + 0.3e1 / 0.1e2 * t1764 - t1531 + 0.2e1 / 0.15e2 * t1534 + 0.3e1 / 0.5e1 * t1664 - t1667 / 0.5e1 + 0.9e1 / 0.2e2 * t7 * t415 * t493 + 0.3e1 / 0.1e2 * t1773 + 0.2e1 / 0.45e2 * t1416 - t1421 - t1547 + 0.2e1 / 0.15e2 * t1549 + 0.3e1 / 0.1e2 * t1678 - t1681 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t182 * t975 + t1783 / 0.1e2;
  t1786 = my_piecewise3(t82, 0, t1785);
  tv4rho43 = 0.3e1 * t863 + 0.3e1 * t902 + t926 + t980 + t8 * (t1728 + t1786);

  if(out->v4rho4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho4[ip*p->dim.v4rho4 + 3] += tv4rho43;

  t1791 = t436 * t436;
  t1796 = t441 * t441;
  t1803 = my_piecewise5(t12, 0, t16, 0, 0.24e2 * t641 + 0.24e2 * t1330);
  t1807 = my_piecewise3(t22, 0, 0.4e2 / 0.81e2 * t1316 * t1791 - 0.2e2 / 0.9e1 * t834 * t441 + 0.1e2 / 0.3e1 * t293 * t1796 + 0.4e2 / 0.9e1 * t382 * t914 + 0.5e1 / 0.3e1 * t27 * t1803);
  t1816 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t1807 * t31 * t77 + 0.2e1 / 0.5e1 * t1716 - t1610 / 0.5e1 + 0.8e1 / 0.45e2 * t1490 - t1377);
  t1828 = sigma[2] * t971;
  t1842 = t453 * t453;
  t1847 = t458 * t458;
  t1854 = my_piecewise5(t16, 0, t12, 0, -0.24e2 * t641 + 0.24e2 * t1394);
  t1858 = my_piecewise3(t87, 0, 0.4e2 / 0.81e2 * t1382 * t1842 - 0.2e2 / 0.9e1 * t864 * t458 + 0.1e2 / 0.3e1 * t354 * t1847 + 0.4e2 / 0.9e1 * t406 * t934 + 0.5e1 / 0.3e1 * t89 * t1854);
  t1881 = 0.3e1 / 0.2e2 * t7 * t92 * (0.1309e5 / 0.6561e4 * t38 * sigma[2] / t95 / t229 + 0.154e5 / 0.2187e4 * t38 * lapl[1] * t955 + 0.494e4 / 0.59049e5 * t55 * t106 * t489 - 0.2717e4 / 0.13122e5 * t55 * t1828 * lapl[1] + 0.209e5 / 0.177147e6 * t55 * t120 / t94 / t969 / rho[1]) + 0.3e1 / 0.2e2 * t7 * t1858 * t31 * t127 + 0.3e1 / 0.5e1 * t7 * t939 * t235 + 0.9e1 / 0.1e2 * t7 * t463 * t493 + 0.3e1 / 0.5e1 * t7 * t210 * t975 + 0.2e1 / 0.5e1 * t1756 + 0.6e1 / 0.5e1 * t1764 + 0.6e1 / 0.5e1 * t1773 + 0.2e1 / 0.5e1 * t1783 - t1655 / 0.5e1 - 0.2e1 / 0.5e1 * t1667 - t1681 / 0.5e1 + 0.8e1 / 0.45e2 * t1534 + 0.8e1 / 0.45e2 * t1549 - t1421;
  t1882 = my_piecewise3(t82, 0, t1881);
  tv4rho44 = 0.4e1 * t926 + 0.4e1 * t980 + t8 * (t1816 + t1882);

  if(out->v4rho4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho4[ip*p->dim.v4rho4 + 4] += tv4rho44;

  t1890 = t7 * t654 * t250;
  t1896 = t7 * t661 * t250;
  t1899 = t7 * t311 * t514;
  t1906 = 0.2e1 / 0.45e2 * t7 * t673 * t250;
  t1908 = t7 * t320 * t514;
  t1911 = t7 * t145 * t1006;
  t1925 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t650 * t250 + 0.3e1 / 0.1e2 * t1890 + 0.9e1 / 0.2e2 * t7 * t307 * t514 - t1896 / 0.1e2 + 0.3e1 / 0.5e1 * t1899 + 0.9e1 / 0.2e2 * t7 * t140 * t1006 + t1906 - t1908 / 0.1e2 + 0.3e1 / 0.1e2 * t1911 + 0.3e1 / 0.2e2 * t7 * t32 * (-0.77e3 / 0.2187e4 * t38 * t684 + 0.247e3 / 0.8748e4 * t55 * t344 * lapl[0] - 0.1672e4 / 0.59049e5 * t55 * t1300));
  tv4rho3sigma0 = t8 * t1925 + 0.3e1 * t1011;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 0] += tv4rho3sigma0;

  tv4rho3sigma1 = 0.e0;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 1] += tv4rho3sigma1;

  t1932 = t7 * t730 * t262;
  t1935 = t7 * t734 * t262;
  t1939 = 0.2e1 / 0.45e2 * t7 * t738 * t262;
  t1941 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t726 * t262 + 0.3e1 / 0.1e2 * t1932 - t1935 / 0.1e2 + t1939);
  tv4rho3sigma2 = t8 * t1941 + 0.3e1 * t1024;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 2] += tv4rho3sigma2;

  t1943 = 0.2e1 * t1038;
  t1949 = t7 * t768 * t250 / 0.5e1;
  t1954 = t7 * t775 * t250;
  t1958 = t7 * t395 * t514 / 0.5e1;
  t1967 = 0.3e1 / 0.2e2 * t7 * t764 * t250 + t1949 + 0.3e1 / 0.1e2 * t7 * t391 * t514 - t1954 / 0.3e2 + t1958 + 0.3e1 / 0.2e2 * t7 * t199 * t1006 + t1890 / 0.1e2 - t1896 / 0.15e2 + t1899 / 0.5e1 + t1906 - t1908 / 0.15e2 + t1911 / 0.1e2;
  t1968 = my_piecewise3(t2, 0, t1967);
  tv4rho3sigma3 = t8 * t1968 + t1011 + t1943;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 3] += tv4rho3sigma3;

  tv4rho3sigma4 = 0.e0;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 4] += tv4rho3sigma4;

  t1970 = 0.2e1 * t1054;
  t1976 = t7 * t811 * t262 / 0.5e1;
  t1978 = t7 * t815 * t262;
  t1987 = t7 * t370 * t546 / 0.5e1;
  t1989 = t7 * t374 * t546;
  t1992 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t807 * t262 + t1976 - t1978 / 0.3e2 + t1932 / 0.1e2 - t1935 / 0.15e2 + t1939 + 0.3e1 / 0.2e2 * t7 * t366 * t546 + t1987 - t1989 / 0.3e2);
  tv4rho3sigma5 = t8 * t1992 + t1024 + t1970;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 5] += tv4rho3sigma5;

  t1998 = t7 * t852 * t250;
  t2007 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t848 * t250 + t1998 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t446 * t514 + t1949 - t1954 / 0.15e2 + t1958 - t1896 / 0.3e2 + t1906 - t1908 / 0.3e2);
  tv4rho3sigma6 = t8 * t2007 + t1062 + t1943;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 6] += tv4rho3sigma6;

  tv4rho3sigma7 = 0.e0;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 7] += tv4rho3sigma7;

  t2013 = t7 * t882 * t262;
  t2020 = t7 * t419 * t546;
  t2028 = t7 * t186 * t1080;
  t2030 = 0.3e1 / 0.2e2 * t7 * t878 * t262 + t2013 / 0.1e2 + t1976 - t1978 / 0.15e2 + 0.3e1 / 0.1e2 * t7 * t415 * t546 + t2020 / 0.5e1 - t1935 / 0.3e2 + t1939 + t1987 - t1989 / 0.15e2 + 0.3e1 / 0.2e2 * t7 * t182 * t1080 + t2028 / 0.1e2;
  t2031 = my_piecewise3(t82, 0, t2030);
  tv4rho3sigma8 = t8 * t2031 + t1085 + t1970;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 8] += tv4rho3sigma8;

  t2040 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t919 * t250 + 0.3e1 / 0.1e2 * t1998 - t1954 / 0.1e2 + t1906);
  tv4rho3sigma9 = t8 * t2040 + 0.3e1 * t1062;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 9] += tv4rho3sigma9;

  tv4rho3sigma10 = 0.e0;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 10] += tv4rho3sigma10;

  t2069 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t939 * t262 + 0.3e1 / 0.1e2 * t2013 + 0.9e1 / 0.2e2 * t7 * t463 * t546 - t1978 / 0.1e2 + 0.3e1 / 0.5e1 * t2020 + 0.9e1 / 0.2e2 * t7 * t210 * t1080 + t1939 - t1989 / 0.1e2 + 0.3e1 / 0.1e2 * t2028 + 0.3e1 / 0.2e2 * t7 * t92 * (-0.77e3 / 0.2187e4 * t38 * t955 + 0.247e3 / 0.8748e4 * t55 * t489 * lapl[1] - 0.1672e4 / 0.59049e5 * t55 * t1828));
  tv4rho3sigma11 = t8 * t2069 + 0.3e1 * t1085;

  if(out->v4rho3sigma != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3sigma[ip*p->dim.v4rho3sigma + 11] += tv4rho3sigma11;

  t2076 = t7 * t654 * t274;
  t2082 = t7 * t661 * t274;
  t2085 = t7 * t311 * t562;
  t2092 = 0.2e1 / 0.45e2 * t7 * t673 * t274;
  t2094 = t7 * t320 * t562;
  t2097 = t7 * t145 * t1106;
  t2107 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t650 * t274 + 0.3e1 / 0.1e2 * t2076 + 0.9e1 / 0.2e2 * t7 * t307 * t562 - t2082 / 0.1e2 + 0.3e1 / 0.5e1 * t2085 + 0.9e1 / 0.2e2 * t7 * t140 * t1106 + t2092 - t2094 / 0.1e2 + 0.3e1 / 0.1e2 * t2097 + 0.3e1 / 0.2e2 * t7 * t32 * (-0.11e4 / 0.729e3 * t999 - 0.52e3 / 0.19683e5 * t1002 + 0.247e3 / 0.8748e4 * t1004));
  tv4rho3lapl0 = t8 * t2107 + 0.3e1 * t1111;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 0] += tv4rho3lapl0;

  t2114 = t7 * t730 * t286;
  t2117 = t7 * t734 * t286;
  t2121 = 0.2e1 / 0.45e2 * t7 * t738 * t286;
  t2123 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t726 * t286 + 0.3e1 / 0.1e2 * t2114 - t2117 / 0.1e2 + t2121);
  tv4rho3lapl1 = t8 * t2123 + 0.3e1 * t1124;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 1] += tv4rho3lapl1;

  t2125 = 0.2e1 * t1138;
  t2131 = t7 * t768 * t274 / 0.5e1;
  t2136 = t7 * t775 * t274;
  t2140 = t7 * t395 * t562 / 0.5e1;
  t2149 = 0.3e1 / 0.2e2 * t7 * t764 * t274 + t2131 + 0.3e1 / 0.1e2 * t7 * t391 * t562 - t2136 / 0.3e2 + t2140 + 0.3e1 / 0.2e2 * t7 * t199 * t1106 + t2076 / 0.1e2 - t2082 / 0.15e2 + t2085 / 0.5e1 + t2092 - t2094 / 0.15e2 + t2097 / 0.1e2;
  t2150 = my_piecewise3(t2, 0, t2149);
  tv4rho3lapl2 = t8 * t2150 + t1111 + t2125;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 2] += tv4rho3lapl2;

  t2152 = 0.2e1 * t1154;
  t2158 = t7 * t811 * t286 / 0.5e1;
  t2160 = t7 * t815 * t286;
  t2169 = t7 * t370 * t590 / 0.5e1;
  t2171 = t7 * t374 * t590;
  t2174 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t807 * t286 + t2158 - t2160 / 0.3e2 + t2114 / 0.1e2 - t2117 / 0.15e2 + t2121 + 0.3e1 / 0.2e2 * t7 * t366 * t590 + t2169 - t2171 / 0.3e2);
  tv4rho3lapl3 = t8 * t2174 + t1124 + t2152;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 3] += tv4rho3lapl3;

  t2180 = t7 * t852 * t274;
  t2189 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t848 * t274 + t2180 / 0.1e2 + 0.3e1 / 0.2e2 * t7 * t446 * t562 + t2131 - t2136 / 0.15e2 + t2140 - t2082 / 0.3e2 + t2092 - t2094 / 0.3e2);
  tv4rho3lapl4 = t8 * t2189 + t1162 + t2125;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 4] += tv4rho3lapl4;

  t2195 = t7 * t882 * t286;
  t2202 = t7 * t419 * t590;
  t2210 = t7 * t186 * t1176;
  t2212 = 0.3e1 / 0.2e2 * t7 * t878 * t286 + t2195 / 0.1e2 + t2158 - t2160 / 0.15e2 + 0.3e1 / 0.1e2 * t7 * t415 * t590 + t2202 / 0.5e1 - t2117 / 0.3e2 + t2121 + t2169 - t2171 / 0.15e2 + 0.3e1 / 0.2e2 * t7 * t182 * t1176 + t2210 / 0.1e2;
  t2213 = my_piecewise3(t82, 0, t2212);
  tv4rho3lapl5 = t8 * t2213 + t1181 + t2152;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 5] += tv4rho3lapl5;

  t2222 = my_piecewise3(t2, 0, 0.3e1 / 0.2e2 * t7 * t919 * t274 + 0.3e1 / 0.1e2 * t2180 - t2136 / 0.1e2 + t2092);
  tv4rho3lapl6 = t8 * t2222 + 0.3e1 * t1162;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 6] += tv4rho3lapl6;

  t2247 = my_piecewise3(t82, 0, 0.3e1 / 0.2e2 * t7 * t939 * t286 + 0.3e1 / 0.1e2 * t2195 + 0.9e1 / 0.2e2 * t7 * t463 * t590 - t2160 / 0.1e2 + 0.3e1 / 0.5e1 * t2202 + 0.9e1 / 0.2e2 * t7 * t210 * t1176 + t2121 - t2171 / 0.1e2 + 0.3e1 / 0.1e2 * t2210 + 0.3e1 / 0.2e2 * t7 * t92 * (-0.11e4 / 0.729e3 * t1073 - 0.52e3 / 0.19683e5 * t1076 + 0.247e3 / 0.8748e4 * t1078));
  tv4rho3lapl7 = t8 * t2247 + 0.3e1 * t1181;

  if(out->v4rho3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3lapl[ip*p->dim.v4rho3lapl + 7] += tv4rho3lapl7;

  tv4rho3tau0 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 0] += tv4rho3tau0;

  tv4rho3tau1 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 1] += tv4rho3tau1;

  tv4rho3tau2 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 2] += tv4rho3tau2;

  tv4rho3tau3 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 3] += tv4rho3tau3;

  tv4rho3tau4 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 4] += tv4rho3tau4;

  tv4rho3tau5 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 5] += tv4rho3tau5;

  tv4rho3tau6 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 6] += tv4rho3tau6;

  tv4rho3tau7 = 0.e0;

  if(out->v4rho3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho3tau[ip*p->dim.v4rho3tau + 7] += tv4rho3tau7;

  t2250 = t7 * t306;
  t2253 = t1183 * t1187;
  t2257 = t319 * t52;
  t2260 = t597 * t2257 * t599 / 0.26244e6;
  t2262 = t597 * t1186 * t1190;
  t2269 = my_piecewise3(t2, 0, t2250 * t600 / 0.5832e5 + t2253 / 0.4374e5 - 0.2e1 / 0.10935e5 * t1183 * t1191 - t2260 - 0.4e1 / 0.32805e5 * t2262 + 0.19e2 / 0.32805e5 * t597 * t598 * t54 * t344);
  tv4rho2sigma20 = t8 * t2269 + 0.2e1 * t1195;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 0] += tv4rho2sigma20;

  tv4rho2sigma21 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 1] += tv4rho2sigma21;

  tv4rho2sigma22 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 2] += tv4rho2sigma22;

  tv4rho2sigma23 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 3] += tv4rho2sigma23;

  tv4rho2sigma24 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 4] += tv4rho2sigma24;

  t2272 = t7 * t365;
  t2275 = t1197 * t1200;
  t2279 = t604 * t2257 * t605 / 0.26244e6;
  t2281 = my_piecewise3(t82, 0, t2272 * t606 / 0.5832e5 + t2275 / 0.4374e5 - t2279);
  tv4rho2sigma25 = t8 * t2281 + 0.2e1 * t1204;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 5] += tv4rho2sigma25;

  t2283 = t7 * t390;
  t2286 = t1206 * t1187;
  t2293 = my_piecewise3(t2, 0, t2283 * t600 / 0.5832e5 + t2286 / 0.8748e5 - t1206 * t1191 / 0.10935e5 + t2253 / 0.8748e5 - t2260 - 0.2e1 / 0.32805e5 * t2262);
  tv4rho2sigma26 = t8 * t2293 + t1195 + t1210;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 6] += tv4rho2sigma26;

  tv4rho2sigma27 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 7] += tv4rho2sigma27;

  tv4rho2sigma28 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 8] += tv4rho2sigma28;

  tv4rho2sigma29 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 9] += tv4rho2sigma29;

  tv4rho2sigma210 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 10] += tv4rho2sigma210;

  t2295 = t7 * t414;
  t2298 = t1212 * t1200;
  t2304 = t604 * t1186 * t1215;
  t2307 = my_piecewise3(t82, 0, t2295 * t606 / 0.5832e5 + t2298 / 0.8748e5 + t2275 / 0.8748e5 - t2279 - t1197 * t1216 / 0.10935e5 - 0.2e1 / 0.32805e5 * t2304);
  tv4rho2sigma211 = t8 * t2307 + t1204 + t1220;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 11] += tv4rho2sigma211;

  t2310 = t7 * t445;
  t2315 = my_piecewise3(t2, 0, t2310 * t600 / 0.5832e5 + t2286 / 0.4374e5 - t2260);
  tv4rho2sigma212 = t8 * t2315 + 0.2e1 * t1210;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 12] += tv4rho2sigma212;

  tv4rho2sigma213 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 13] += tv4rho2sigma213;

  tv4rho2sigma214 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 14] += tv4rho2sigma214;

  tv4rho2sigma215 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 15] += tv4rho2sigma215;

  tv4rho2sigma216 = 0.e0;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 16] += tv4rho2sigma216;

  t2318 = t7 * t462;
  t2330 = my_piecewise3(t82, 0, t2318 * t606 / 0.5832e5 + t2298 / 0.4374e5 - 0.2e1 / 0.10935e5 * t1212 * t1216 - t2279 - 0.4e1 / 0.32805e5 * t2304 + 0.19e2 / 0.32805e5 * t604 * t598 * t54 * t489);
  tv4rho2sigma217 = t8 * t2330 + 0.2e1 * t1220;

  if(out->v4rho2sigma2 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigma2[ip*p->dim.v4rho2sigma2 + 17] += tv4rho2sigma217;

  t2335 = t1183 * t1224;
  t2340 = t597 * t2257 * t610 / 0.15552e6;
  t2344 = my_piecewise3(t2, 0, -t2250 * t611 / 0.3456e5 - t2335 / 0.2592e5 + 0.13e2 / 0.5184e5 * t1184 + t2340 + 0.13e2 / 0.7776e5 * t1188 - 0.13e2 / 0.1944e5 * t1192);
  tv4rho2sigmalapl0 = t8 * t2344 + 0.2e1 * t1229;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 0] += tv4rho2sigmalapl0;

  tv4rho2sigmalapl1 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 1] += tv4rho2sigmalapl1;

  tv4rho2sigmalapl2 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 2] += tv4rho2sigmalapl2;

  tv4rho2sigmalapl3 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 3] += tv4rho2sigmalapl3;

  tv4rho2sigmalapl4 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 4] += tv4rho2sigmalapl4;

  t2349 = t1197 * t1233;
  t2353 = t604 * t2257 * t615 / 0.15552e6;
  t2355 = my_piecewise3(t82, 0, -t2272 * t616 / 0.3456e5 - t2349 / 0.2592e5 + t2353);
  tv4rho2sigmalapl5 = t8 * t2355 + 0.2e1 * t1237;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 5] += tv4rho2sigmalapl5;

  t2359 = t1206 * t1224;
  t2365 = my_piecewise3(t2, 0, -t2283 * t611 / 0.3456e5 - t2359 / 0.5184e5 + 0.13e2 / 0.10368e6 * t1207 - t2335 / 0.5184e5 + t2340 + 0.13e2 / 0.15552e6 * t1188);
  tv4rho2sigmalapl6 = t8 * t2365 + t1229 + t1242;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 6] += tv4rho2sigmalapl6;

  tv4rho2sigmalapl7 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 7] += tv4rho2sigmalapl7;

  tv4rho2sigmalapl8 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 8] += tv4rho2sigmalapl8;

  tv4rho2sigmalapl9 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 9] += tv4rho2sigmalapl9;

  tv4rho2sigmalapl10 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 10] += tv4rho2sigmalapl10;

  t2369 = t1212 * t1233;
  t2375 = my_piecewise3(t82, 0, -t2295 * t616 / 0.3456e5 - t2369 / 0.5184e5 - t2349 / 0.5184e5 + t2353 + 0.13e2 / 0.10368e6 * t1198 + 0.13e2 / 0.15552e6 * t1201);
  tv4rho2sigmalapl11 = t8 * t2375 + t1237 + t1248;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 11] += tv4rho2sigmalapl11;

  t2382 = my_piecewise3(t2, 0, -t2310 * t611 / 0.3456e5 - t2359 / 0.2592e5 + t2340);
  tv4rho2sigmalapl12 = t8 * t2382 + 0.2e1 * t1242;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 12] += tv4rho2sigmalapl12;

  tv4rho2sigmalapl13 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 13] += tv4rho2sigmalapl13;

  tv4rho2sigmalapl14 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 14] += tv4rho2sigmalapl14;

  tv4rho2sigmalapl15 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 15] += tv4rho2sigmalapl15;

  tv4rho2sigmalapl16 = 0.e0;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 16] += tv4rho2sigmalapl16;

  t2392 = my_piecewise3(t82, 0, -t2318 * t616 / 0.3456e5 - t2369 / 0.2592e5 + 0.13e2 / 0.5184e5 * t1213 + t2353 + 0.13e2 / 0.7776e5 * t1201 - 0.13e2 / 0.1944e5 * t1217);
  tv4rho2sigmalapl17 = t8 * t2392 + 0.2e1 * t1248;

  if(out->v4rho2sigmalapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmalapl[ip*p->dim.v4rho2sigmalapl + 17] += tv4rho2sigmalapl17;

  tv4rho2sigmatau0 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 0] += tv4rho2sigmatau0;

  tv4rho2sigmatau1 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 1] += tv4rho2sigmatau1;

  tv4rho2sigmatau2 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 2] += tv4rho2sigmatau2;

  tv4rho2sigmatau3 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 3] += tv4rho2sigmatau3;

  tv4rho2sigmatau4 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 4] += tv4rho2sigmatau4;

  tv4rho2sigmatau5 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 5] += tv4rho2sigmatau5;

  tv4rho2sigmatau6 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 6] += tv4rho2sigmatau6;

  tv4rho2sigmatau7 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 7] += tv4rho2sigmatau7;

  tv4rho2sigmatau8 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 8] += tv4rho2sigmatau8;

  tv4rho2sigmatau9 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 9] += tv4rho2sigmatau9;

  tv4rho2sigmatau10 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 10] += tv4rho2sigmatau10;

  tv4rho2sigmatau11 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 11] += tv4rho2sigmatau11;

  tv4rho2sigmatau12 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 12] += tv4rho2sigmatau12;

  tv4rho2sigmatau13 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 13] += tv4rho2sigmatau13;

  tv4rho2sigmatau14 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 14] += tv4rho2sigmatau14;

  tv4rho2sigmatau15 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 15] += tv4rho2sigmatau15;

  tv4rho2sigmatau16 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 16] += tv4rho2sigmatau16;

  tv4rho2sigmatau17 = 0.e0;

  if(out->v4rho2sigmatau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2sigmatau[ip*p->dim.v4rho2sigmatau + 17] += tv4rho2sigmatau17;

  t2397 = t1183 * t1252;
  t2402 = t597 * t2257 * t620 / 0.8748e5;
  t2406 = my_piecewise3(t2, 0, t2250 * t621 / 0.1944e5 + t2397 / 0.1458e5 - t1222 / 0.2916e4 - t2402 - t1225 / 0.4374e4 + 0.13e2 / 0.17496e5 * t601);
  tv4rho2lapl20 = t8 * t2406 + 0.2e1 * t1257;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 0] += tv4rho2lapl20;

  tv4rho2lapl21 = 0.e0;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 1] += tv4rho2lapl21;

  t2411 = t1197 * t1261;
  t2415 = t604 * t2257 * t625 / 0.8748e5;
  t2417 = my_piecewise3(t82, 0, t2272 * t626 / 0.1944e5 + t2411 / 0.1458e5 - t2415);
  tv4rho2lapl22 = t8 * t2417 + 0.2e1 * t1265;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 2] += tv4rho2lapl22;

  t2421 = t1206 * t1252;
  t2427 = my_piecewise3(t2, 0, t2283 * t621 / 0.1944e5 + t2421 / 0.2916e5 - t1239 / 0.5832e4 + t2397 / 0.2916e5 - t2402 - t1225 / 0.8748e4);
  tv4rho2lapl23 = t8 * t2427 + t1257 + t1270;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 3] += tv4rho2lapl23;

  tv4rho2lapl24 = 0.e0;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 4] += tv4rho2lapl24;

  t2431 = t1212 * t1261;
  t2437 = my_piecewise3(t82, 0, t2295 * t626 / 0.1944e5 + t2431 / 0.2916e5 + t2411 / 0.2916e5 - t2415 - t1231 / 0.5832e4 - t1234 / 0.8748e4);
  tv4rho2lapl25 = t8 * t2437 + t1265 + t1276;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 5] += tv4rho2lapl25;

  t2444 = my_piecewise3(t2, 0, t2310 * t621 / 0.1944e5 + t2421 / 0.1458e5 - t2402);
  tv4rho2lapl26 = t8 * t2444 + 0.2e1 * t1270;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 6] += tv4rho2lapl26;

  tv4rho2lapl27 = 0.e0;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 7] += tv4rho2lapl27;

  t2454 = my_piecewise3(t82, 0, t2318 * t626 / 0.1944e5 + t2431 / 0.1458e5 - t1244 / 0.2916e4 - t2415 - t1234 / 0.4374e4 + 0.13e2 / 0.17496e5 * t607);
  tv4rho2lapl28 = t8 * t2454 + 0.2e1 * t1276;

  if(out->v4rho2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapl2[ip*p->dim.v4rho2lapl2 + 8] += tv4rho2lapl28;

  tv4rho2lapltau0 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 0] += tv4rho2lapltau0;

  tv4rho2lapltau1 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 1] += tv4rho2lapltau1;

  tv4rho2lapltau2 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 2] += tv4rho2lapltau2;

  tv4rho2lapltau3 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 3] += tv4rho2lapltau3;

  tv4rho2lapltau4 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 4] += tv4rho2lapltau4;

  tv4rho2lapltau5 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 5] += tv4rho2lapltau5;

  tv4rho2lapltau6 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 6] += tv4rho2lapltau6;

  tv4rho2lapltau7 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 7] += tv4rho2lapltau7;

  tv4rho2lapltau8 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 8] += tv4rho2lapltau8;

  tv4rho2lapltau9 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 9] += tv4rho2lapltau9;

  tv4rho2lapltau10 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 10] += tv4rho2lapltau10;

  tv4rho2lapltau11 = 0.e0;

  if(out->v4rho2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2lapltau[ip*p->dim.v4rho2lapltau + 11] += tv4rho2lapltau11;

  tv4rho2tau20 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 0] += tv4rho2tau20;

  tv4rho2tau21 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 1] += tv4rho2tau21;

  tv4rho2tau22 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 2] += tv4rho2tau22;

  tv4rho2tau23 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 3] += tv4rho2tau23;

  tv4rho2tau24 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 4] += tv4rho2tau24;

  tv4rho2tau25 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 5] += tv4rho2tau25;

  tv4rho2tau26 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 6] += tv4rho2tau26;

  tv4rho2tau27 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 7] += tv4rho2tau27;

  tv4rho2tau28 = 0.e0;

  if(out->v4rho2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rho2tau2[ip*p->dim.v4rho2tau2 + 8] += tv4rho2tau28;

  tv4rhosigma30 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 0] += tv4rhosigma30;

  tv4rhosigma31 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 1] += tv4rhosigma31;

  tv4rhosigma32 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 2] += tv4rhosigma32;

  tv4rhosigma33 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 3] += tv4rhosigma33;

  tv4rhosigma34 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 4] += tv4rhosigma34;

  tv4rhosigma35 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 5] += tv4rhosigma35;

  tv4rhosigma36 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 6] += tv4rhosigma36;

  tv4rhosigma37 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 7] += tv4rhosigma37;

  tv4rhosigma38 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 8] += tv4rhosigma38;

  tv4rhosigma39 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 9] += tv4rhosigma39;

  tv4rhosigma310 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 10] += tv4rhosigma310;

  tv4rhosigma311 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 11] += tv4rhosigma311;

  tv4rhosigma312 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 12] += tv4rhosigma312;

  tv4rhosigma313 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 13] += tv4rhosigma313;

  tv4rhosigma314 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 14] += tv4rhosigma314;

  tv4rhosigma315 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 15] += tv4rhosigma315;

  tv4rhosigma316 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 16] += tv4rhosigma316;

  tv4rhosigma317 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 17] += tv4rhosigma317;

  tv4rhosigma318 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 18] += tv4rhosigma318;

  tv4rhosigma319 = 0.e0;

  if(out->v4rhosigma3 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma3[ip*p->dim.v4rhosigma3 + 19] += tv4rhosigma319;

  tv4rhosigma2lapl0 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 0] += tv4rhosigma2lapl0;

  tv4rhosigma2lapl1 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 1] += tv4rhosigma2lapl1;

  tv4rhosigma2lapl2 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 2] += tv4rhosigma2lapl2;

  tv4rhosigma2lapl3 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 3] += tv4rhosigma2lapl3;

  tv4rhosigma2lapl4 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 4] += tv4rhosigma2lapl4;

  tv4rhosigma2lapl5 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 5] += tv4rhosigma2lapl5;

  tv4rhosigma2lapl6 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 6] += tv4rhosigma2lapl6;

  tv4rhosigma2lapl7 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 7] += tv4rhosigma2lapl7;

  tv4rhosigma2lapl8 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 8] += tv4rhosigma2lapl8;

  tv4rhosigma2lapl9 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 9] += tv4rhosigma2lapl9;

  tv4rhosigma2lapl10 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 10] += tv4rhosigma2lapl10;

  tv4rhosigma2lapl11 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 11] += tv4rhosigma2lapl11;

  tv4rhosigma2lapl12 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 12] += tv4rhosigma2lapl12;

  tv4rhosigma2lapl13 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 13] += tv4rhosigma2lapl13;

  tv4rhosigma2lapl14 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 14] += tv4rhosigma2lapl14;

  tv4rhosigma2lapl15 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 15] += tv4rhosigma2lapl15;

  tv4rhosigma2lapl16 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 16] += tv4rhosigma2lapl16;

  tv4rhosigma2lapl17 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 17] += tv4rhosigma2lapl17;

  tv4rhosigma2lapl18 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 18] += tv4rhosigma2lapl18;

  tv4rhosigma2lapl19 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 19] += tv4rhosigma2lapl19;

  tv4rhosigma2lapl20 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 20] += tv4rhosigma2lapl20;

  tv4rhosigma2lapl21 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 21] += tv4rhosigma2lapl21;

  tv4rhosigma2lapl22 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 22] += tv4rhosigma2lapl22;

  tv4rhosigma2lapl23 = 0.e0;

  if(out->v4rhosigma2lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2lapl[ip*p->dim.v4rhosigma2lapl + 23] += tv4rhosigma2lapl23;

  tv4rhosigma2tau0 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 0] += tv4rhosigma2tau0;

  tv4rhosigma2tau1 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 1] += tv4rhosigma2tau1;

  tv4rhosigma2tau2 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 2] += tv4rhosigma2tau2;

  tv4rhosigma2tau3 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 3] += tv4rhosigma2tau3;

  tv4rhosigma2tau4 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 4] += tv4rhosigma2tau4;

  tv4rhosigma2tau5 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 5] += tv4rhosigma2tau5;

  tv4rhosigma2tau6 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 6] += tv4rhosigma2tau6;

  tv4rhosigma2tau7 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 7] += tv4rhosigma2tau7;

  tv4rhosigma2tau8 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 8] += tv4rhosigma2tau8;

  tv4rhosigma2tau9 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 9] += tv4rhosigma2tau9;

  tv4rhosigma2tau10 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 10] += tv4rhosigma2tau10;

  tv4rhosigma2tau11 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 11] += tv4rhosigma2tau11;

  tv4rhosigma2tau12 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 12] += tv4rhosigma2tau12;

  tv4rhosigma2tau13 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 13] += tv4rhosigma2tau13;

  tv4rhosigma2tau14 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 14] += tv4rhosigma2tau14;

  tv4rhosigma2tau15 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 15] += tv4rhosigma2tau15;

  tv4rhosigma2tau16 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 16] += tv4rhosigma2tau16;

  tv4rhosigma2tau17 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 17] += tv4rhosigma2tau17;

  tv4rhosigma2tau18 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 18] += tv4rhosigma2tau18;

  tv4rhosigma2tau19 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 19] += tv4rhosigma2tau19;

  tv4rhosigma2tau20 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 20] += tv4rhosigma2tau20;

  tv4rhosigma2tau21 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 21] += tv4rhosigma2tau21;

  tv4rhosigma2tau22 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 22] += tv4rhosigma2tau22;

  tv4rhosigma2tau23 = 0.e0;

  if(out->v4rhosigma2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigma2tau[ip*p->dim.v4rhosigma2tau + 23] += tv4rhosigma2tau23;

  tv4rhosigmalapl20 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 0] += tv4rhosigmalapl20;

  tv4rhosigmalapl21 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 1] += tv4rhosigmalapl21;

  tv4rhosigmalapl22 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 2] += tv4rhosigmalapl22;

  tv4rhosigmalapl23 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 3] += tv4rhosigmalapl23;

  tv4rhosigmalapl24 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 4] += tv4rhosigmalapl24;

  tv4rhosigmalapl25 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 5] += tv4rhosigmalapl25;

  tv4rhosigmalapl26 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 6] += tv4rhosigmalapl26;

  tv4rhosigmalapl27 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 7] += tv4rhosigmalapl27;

  tv4rhosigmalapl28 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 8] += tv4rhosigmalapl28;

  tv4rhosigmalapl29 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 9] += tv4rhosigmalapl29;

  tv4rhosigmalapl210 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 10] += tv4rhosigmalapl210;

  tv4rhosigmalapl211 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 11] += tv4rhosigmalapl211;

  tv4rhosigmalapl212 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 12] += tv4rhosigmalapl212;

  tv4rhosigmalapl213 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 13] += tv4rhosigmalapl213;

  tv4rhosigmalapl214 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 14] += tv4rhosigmalapl214;

  tv4rhosigmalapl215 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 15] += tv4rhosigmalapl215;

  tv4rhosigmalapl216 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 16] += tv4rhosigmalapl216;

  tv4rhosigmalapl217 = 0.e0;

  if(out->v4rhosigmalapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapl2[ip*p->dim.v4rhosigmalapl2 + 17] += tv4rhosigmalapl217;

  tv4rhosigmalapltau0 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 0] += tv4rhosigmalapltau0;

  tv4rhosigmalapltau1 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 1] += tv4rhosigmalapltau1;

  tv4rhosigmalapltau2 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 2] += tv4rhosigmalapltau2;

  tv4rhosigmalapltau3 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 3] += tv4rhosigmalapltau3;

  tv4rhosigmalapltau4 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 4] += tv4rhosigmalapltau4;

  tv4rhosigmalapltau5 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 5] += tv4rhosigmalapltau5;

  tv4rhosigmalapltau6 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 6] += tv4rhosigmalapltau6;

  tv4rhosigmalapltau7 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 7] += tv4rhosigmalapltau7;

  tv4rhosigmalapltau8 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 8] += tv4rhosigmalapltau8;

  tv4rhosigmalapltau9 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 9] += tv4rhosigmalapltau9;

  tv4rhosigmalapltau10 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 10] += tv4rhosigmalapltau10;

  tv4rhosigmalapltau11 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 11] += tv4rhosigmalapltau11;

  tv4rhosigmalapltau12 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 12] += tv4rhosigmalapltau12;

  tv4rhosigmalapltau13 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 13] += tv4rhosigmalapltau13;

  tv4rhosigmalapltau14 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 14] += tv4rhosigmalapltau14;

  tv4rhosigmalapltau15 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 15] += tv4rhosigmalapltau15;

  tv4rhosigmalapltau16 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 16] += tv4rhosigmalapltau16;

  tv4rhosigmalapltau17 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 17] += tv4rhosigmalapltau17;

  tv4rhosigmalapltau18 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 18] += tv4rhosigmalapltau18;

  tv4rhosigmalapltau19 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 19] += tv4rhosigmalapltau19;

  tv4rhosigmalapltau20 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 20] += tv4rhosigmalapltau20;

  tv4rhosigmalapltau21 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 21] += tv4rhosigmalapltau21;

  tv4rhosigmalapltau22 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 22] += tv4rhosigmalapltau22;

  tv4rhosigmalapltau23 = 0.e0;

  if(out->v4rhosigmalapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmalapltau[ip*p->dim.v4rhosigmalapltau + 23] += tv4rhosigmalapltau23;

  tv4rhosigmatau20 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 0] += tv4rhosigmatau20;

  tv4rhosigmatau21 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 1] += tv4rhosigmatau21;

  tv4rhosigmatau22 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 2] += tv4rhosigmatau22;

  tv4rhosigmatau23 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 3] += tv4rhosigmatau23;

  tv4rhosigmatau24 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 4] += tv4rhosigmatau24;

  tv4rhosigmatau25 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 5] += tv4rhosigmatau25;

  tv4rhosigmatau26 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 6] += tv4rhosigmatau26;

  tv4rhosigmatau27 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 7] += tv4rhosigmatau27;

  tv4rhosigmatau28 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 8] += tv4rhosigmatau28;

  tv4rhosigmatau29 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 9] += tv4rhosigmatau29;

  tv4rhosigmatau210 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 10] += tv4rhosigmatau210;

  tv4rhosigmatau211 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 11] += tv4rhosigmatau211;

  tv4rhosigmatau212 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 12] += tv4rhosigmatau212;

  tv4rhosigmatau213 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 13] += tv4rhosigmatau213;

  tv4rhosigmatau214 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 14] += tv4rhosigmatau214;

  tv4rhosigmatau215 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 15] += tv4rhosigmatau215;

  tv4rhosigmatau216 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 16] += tv4rhosigmatau216;

  tv4rhosigmatau217 = 0.e0;

  if(out->v4rhosigmatau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhosigmatau2[ip*p->dim.v4rhosigmatau2 + 17] += tv4rhosigmatau217;

  tv4rholapl30 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 0] += tv4rholapl30;

  tv4rholapl31 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 1] += tv4rholapl31;

  tv4rholapl32 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 2] += tv4rholapl32;

  tv4rholapl33 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 3] += tv4rholapl33;

  tv4rholapl34 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 4] += tv4rholapl34;

  tv4rholapl35 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 5] += tv4rholapl35;

  tv4rholapl36 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 6] += tv4rholapl36;

  tv4rholapl37 = 0.e0;

  if(out->v4rholapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl3[ip*p->dim.v4rholapl3 + 7] += tv4rholapl37;

  tv4rholapl2tau0 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 0] += tv4rholapl2tau0;

  tv4rholapl2tau1 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 1] += tv4rholapl2tau1;

  tv4rholapl2tau2 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 2] += tv4rholapl2tau2;

  tv4rholapl2tau3 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 3] += tv4rholapl2tau3;

  tv4rholapl2tau4 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 4] += tv4rholapl2tau4;

  tv4rholapl2tau5 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 5] += tv4rholapl2tau5;

  tv4rholapl2tau6 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 6] += tv4rholapl2tau6;

  tv4rholapl2tau7 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 7] += tv4rholapl2tau7;

  tv4rholapl2tau8 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 8] += tv4rholapl2tau8;

  tv4rholapl2tau9 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 9] += tv4rholapl2tau9;

  tv4rholapl2tau10 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 10] += tv4rholapl2tau10;

  tv4rholapl2tau11 = 0.e0;

  if(out->v4rholapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapl2tau[ip*p->dim.v4rholapl2tau + 11] += tv4rholapl2tau11;

  tv4rholapltau20 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 0] += tv4rholapltau20;

  tv4rholapltau21 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 1] += tv4rholapltau21;

  tv4rholapltau22 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 2] += tv4rholapltau22;

  tv4rholapltau23 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 3] += tv4rholapltau23;

  tv4rholapltau24 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 4] += tv4rholapltau24;

  tv4rholapltau25 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 5] += tv4rholapltau25;

  tv4rholapltau26 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 6] += tv4rholapltau26;

  tv4rholapltau27 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 7] += tv4rholapltau27;

  tv4rholapltau28 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 8] += tv4rholapltau28;

  tv4rholapltau29 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 9] += tv4rholapltau29;

  tv4rholapltau210 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 10] += tv4rholapltau210;

  tv4rholapltau211 = 0.e0;

  if(out->v4rholapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rholapltau2[ip*p->dim.v4rholapltau2 + 11] += tv4rholapltau211;

  tv4rhotau30 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 0] += tv4rhotau30;

  tv4rhotau31 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 1] += tv4rhotau31;

  tv4rhotau32 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 2] += tv4rhotau32;

  tv4rhotau33 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 3] += tv4rhotau33;

  tv4rhotau34 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 4] += tv4rhotau34;

  tv4rhotau35 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 5] += tv4rhotau35;

  tv4rhotau36 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 6] += tv4rhotau36;

  tv4rhotau37 = 0.e0;

  if(out->v4rhotau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4rhotau3[ip*p->dim.v4rhotau3 + 7] += tv4rhotau37;

  tv4sigma40 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 0] += tv4sigma40;

  tv4sigma41 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 1] += tv4sigma41;

  tv4sigma42 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 2] += tv4sigma42;

  tv4sigma43 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 3] += tv4sigma43;

  tv4sigma44 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 4] += tv4sigma44;

  tv4sigma45 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 5] += tv4sigma45;

  tv4sigma46 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 6] += tv4sigma46;

  tv4sigma47 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 7] += tv4sigma47;

  tv4sigma48 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 8] += tv4sigma48;

  tv4sigma49 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 9] += tv4sigma49;

  tv4sigma410 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 10] += tv4sigma410;

  tv4sigma411 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 11] += tv4sigma411;

  tv4sigma412 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 12] += tv4sigma412;

  tv4sigma413 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 13] += tv4sigma413;

  tv4sigma414 = 0.e0;

  if(out->v4sigma4 != NULL && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma4[ip*p->dim.v4sigma4 + 14] += tv4sigma414;

  tv4sigma3lapl0 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 0] += tv4sigma3lapl0;

  tv4sigma3lapl1 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 1] += tv4sigma3lapl1;

  tv4sigma3lapl2 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 2] += tv4sigma3lapl2;

  tv4sigma3lapl3 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 3] += tv4sigma3lapl3;

  tv4sigma3lapl4 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 4] += tv4sigma3lapl4;

  tv4sigma3lapl5 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 5] += tv4sigma3lapl5;

  tv4sigma3lapl6 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 6] += tv4sigma3lapl6;

  tv4sigma3lapl7 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 7] += tv4sigma3lapl7;

  tv4sigma3lapl8 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 8] += tv4sigma3lapl8;

  tv4sigma3lapl9 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 9] += tv4sigma3lapl9;

  tv4sigma3lapl10 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 10] += tv4sigma3lapl10;

  tv4sigma3lapl11 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 11] += tv4sigma3lapl11;

  tv4sigma3lapl12 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 12] += tv4sigma3lapl12;

  tv4sigma3lapl13 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 13] += tv4sigma3lapl13;

  tv4sigma3lapl14 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 14] += tv4sigma3lapl14;

  tv4sigma3lapl15 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 15] += tv4sigma3lapl15;

  tv4sigma3lapl16 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 16] += tv4sigma3lapl16;

  tv4sigma3lapl17 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 17] += tv4sigma3lapl17;

  tv4sigma3lapl18 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 18] += tv4sigma3lapl18;

  tv4sigma3lapl19 = 0.e0;

  if(out->v4sigma3lapl != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3lapl[ip*p->dim.v4sigma3lapl + 19] += tv4sigma3lapl19;

  tv4sigma3tau0 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 0] += tv4sigma3tau0;

  tv4sigma3tau1 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 1] += tv4sigma3tau1;

  tv4sigma3tau2 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 2] += tv4sigma3tau2;

  tv4sigma3tau3 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 3] += tv4sigma3tau3;

  tv4sigma3tau4 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 4] += tv4sigma3tau4;

  tv4sigma3tau5 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 5] += tv4sigma3tau5;

  tv4sigma3tau6 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 6] += tv4sigma3tau6;

  tv4sigma3tau7 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 7] += tv4sigma3tau7;

  tv4sigma3tau8 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 8] += tv4sigma3tau8;

  tv4sigma3tau9 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 9] += tv4sigma3tau9;

  tv4sigma3tau10 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 10] += tv4sigma3tau10;

  tv4sigma3tau11 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 11] += tv4sigma3tau11;

  tv4sigma3tau12 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 12] += tv4sigma3tau12;

  tv4sigma3tau13 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 13] += tv4sigma3tau13;

  tv4sigma3tau14 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 14] += tv4sigma3tau14;

  tv4sigma3tau15 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 15] += tv4sigma3tau15;

  tv4sigma3tau16 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 16] += tv4sigma3tau16;

  tv4sigma3tau17 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 17] += tv4sigma3tau17;

  tv4sigma3tau18 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 18] += tv4sigma3tau18;

  tv4sigma3tau19 = 0.e0;

  if(out->v4sigma3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma3tau[ip*p->dim.v4sigma3tau + 19] += tv4sigma3tau19;

  tv4sigma2lapl20 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 0] += tv4sigma2lapl20;

  tv4sigma2lapl21 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 1] += tv4sigma2lapl21;

  tv4sigma2lapl22 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 2] += tv4sigma2lapl22;

  tv4sigma2lapl23 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 3] += tv4sigma2lapl23;

  tv4sigma2lapl24 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 4] += tv4sigma2lapl24;

  tv4sigma2lapl25 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 5] += tv4sigma2lapl25;

  tv4sigma2lapl26 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 6] += tv4sigma2lapl26;

  tv4sigma2lapl27 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 7] += tv4sigma2lapl27;

  tv4sigma2lapl28 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 8] += tv4sigma2lapl28;

  tv4sigma2lapl29 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 9] += tv4sigma2lapl29;

  tv4sigma2lapl210 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 10] += tv4sigma2lapl210;

  tv4sigma2lapl211 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 11] += tv4sigma2lapl211;

  tv4sigma2lapl212 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 12] += tv4sigma2lapl212;

  tv4sigma2lapl213 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 13] += tv4sigma2lapl213;

  tv4sigma2lapl214 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 14] += tv4sigma2lapl214;

  tv4sigma2lapl215 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 15] += tv4sigma2lapl215;

  tv4sigma2lapl216 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 16] += tv4sigma2lapl216;

  tv4sigma2lapl217 = 0.e0;

  if(out->v4sigma2lapl2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapl2[ip*p->dim.v4sigma2lapl2 + 17] += tv4sigma2lapl217;

  tv4sigma2lapltau0 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 0] += tv4sigma2lapltau0;

  tv4sigma2lapltau1 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 1] += tv4sigma2lapltau1;

  tv4sigma2lapltau2 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 2] += tv4sigma2lapltau2;

  tv4sigma2lapltau3 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 3] += tv4sigma2lapltau3;

  tv4sigma2lapltau4 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 4] += tv4sigma2lapltau4;

  tv4sigma2lapltau5 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 5] += tv4sigma2lapltau5;

  tv4sigma2lapltau6 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 6] += tv4sigma2lapltau6;

  tv4sigma2lapltau7 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 7] += tv4sigma2lapltau7;

  tv4sigma2lapltau8 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 8] += tv4sigma2lapltau8;

  tv4sigma2lapltau9 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 9] += tv4sigma2lapltau9;

  tv4sigma2lapltau10 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 10] += tv4sigma2lapltau10;

  tv4sigma2lapltau11 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 11] += tv4sigma2lapltau11;

  tv4sigma2lapltau12 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 12] += tv4sigma2lapltau12;

  tv4sigma2lapltau13 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 13] += tv4sigma2lapltau13;

  tv4sigma2lapltau14 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 14] += tv4sigma2lapltau14;

  tv4sigma2lapltau15 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 15] += tv4sigma2lapltau15;

  tv4sigma2lapltau16 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 16] += tv4sigma2lapltau16;

  tv4sigma2lapltau17 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 17] += tv4sigma2lapltau17;

  tv4sigma2lapltau18 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 18] += tv4sigma2lapltau18;

  tv4sigma2lapltau19 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 19] += tv4sigma2lapltau19;

  tv4sigma2lapltau20 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 20] += tv4sigma2lapltau20;

  tv4sigma2lapltau21 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 21] += tv4sigma2lapltau21;

  tv4sigma2lapltau22 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 22] += tv4sigma2lapltau22;

  tv4sigma2lapltau23 = 0.e0;

  if(out->v4sigma2lapltau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2lapltau[ip*p->dim.v4sigma2lapltau + 23] += tv4sigma2lapltau23;

  tv4sigma2tau20 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 0] += tv4sigma2tau20;

  tv4sigma2tau21 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 1] += tv4sigma2tau21;

  tv4sigma2tau22 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 2] += tv4sigma2tau22;

  tv4sigma2tau23 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 3] += tv4sigma2tau23;

  tv4sigma2tau24 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 4] += tv4sigma2tau24;

  tv4sigma2tau25 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 5] += tv4sigma2tau25;

  tv4sigma2tau26 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 6] += tv4sigma2tau26;

  tv4sigma2tau27 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 7] += tv4sigma2tau27;

  tv4sigma2tau28 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 8] += tv4sigma2tau28;

  tv4sigma2tau29 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 9] += tv4sigma2tau29;

  tv4sigma2tau210 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 10] += tv4sigma2tau210;

  tv4sigma2tau211 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 11] += tv4sigma2tau211;

  tv4sigma2tau212 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 12] += tv4sigma2tau212;

  tv4sigma2tau213 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 13] += tv4sigma2tau213;

  tv4sigma2tau214 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 14] += tv4sigma2tau214;

  tv4sigma2tau215 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 15] += tv4sigma2tau215;

  tv4sigma2tau216 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 16] += tv4sigma2tau216;

  tv4sigma2tau217 = 0.e0;

  if(out->v4sigma2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigma2tau2[ip*p->dim.v4sigma2tau2 + 17] += tv4sigma2tau217;

  tv4sigmalapl30 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 0] += tv4sigmalapl30;

  tv4sigmalapl31 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 1] += tv4sigmalapl31;

  tv4sigmalapl32 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 2] += tv4sigmalapl32;

  tv4sigmalapl33 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 3] += tv4sigmalapl33;

  tv4sigmalapl34 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 4] += tv4sigmalapl34;

  tv4sigmalapl35 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 5] += tv4sigmalapl35;

  tv4sigmalapl36 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 6] += tv4sigmalapl36;

  tv4sigmalapl37 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 7] += tv4sigmalapl37;

  tv4sigmalapl38 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 8] += tv4sigmalapl38;

  tv4sigmalapl39 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 9] += tv4sigmalapl39;

  tv4sigmalapl310 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 10] += tv4sigmalapl310;

  tv4sigmalapl311 = 0.e0;

  if(out->v4sigmalapl3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl3[ip*p->dim.v4sigmalapl3 + 11] += tv4sigmalapl311;

  tv4sigmalapl2tau0 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 0] += tv4sigmalapl2tau0;

  tv4sigmalapl2tau1 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 1] += tv4sigmalapl2tau1;

  tv4sigmalapl2tau2 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 2] += tv4sigmalapl2tau2;

  tv4sigmalapl2tau3 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 3] += tv4sigmalapl2tau3;

  tv4sigmalapl2tau4 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 4] += tv4sigmalapl2tau4;

  tv4sigmalapl2tau5 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 5] += tv4sigmalapl2tau5;

  tv4sigmalapl2tau6 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 6] += tv4sigmalapl2tau6;

  tv4sigmalapl2tau7 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 7] += tv4sigmalapl2tau7;

  tv4sigmalapl2tau8 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 8] += tv4sigmalapl2tau8;

  tv4sigmalapl2tau9 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 9] += tv4sigmalapl2tau9;

  tv4sigmalapl2tau10 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 10] += tv4sigmalapl2tau10;

  tv4sigmalapl2tau11 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 11] += tv4sigmalapl2tau11;

  tv4sigmalapl2tau12 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 12] += tv4sigmalapl2tau12;

  tv4sigmalapl2tau13 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 13] += tv4sigmalapl2tau13;

  tv4sigmalapl2tau14 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 14] += tv4sigmalapl2tau14;

  tv4sigmalapl2tau15 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 15] += tv4sigmalapl2tau15;

  tv4sigmalapl2tau16 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 16] += tv4sigmalapl2tau16;

  tv4sigmalapl2tau17 = 0.e0;

  if(out->v4sigmalapl2tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapl2tau[ip*p->dim.v4sigmalapl2tau + 17] += tv4sigmalapl2tau17;

  tv4sigmalapltau20 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 0] += tv4sigmalapltau20;

  tv4sigmalapltau21 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 1] += tv4sigmalapltau21;

  tv4sigmalapltau22 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 2] += tv4sigmalapltau22;

  tv4sigmalapltau23 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 3] += tv4sigmalapltau23;

  tv4sigmalapltau24 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 4] += tv4sigmalapltau24;

  tv4sigmalapltau25 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 5] += tv4sigmalapltau25;

  tv4sigmalapltau26 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 6] += tv4sigmalapltau26;

  tv4sigmalapltau27 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 7] += tv4sigmalapltau27;

  tv4sigmalapltau28 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 8] += tv4sigmalapltau28;

  tv4sigmalapltau29 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 9] += tv4sigmalapltau29;

  tv4sigmalapltau210 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 10] += tv4sigmalapltau210;

  tv4sigmalapltau211 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 11] += tv4sigmalapltau211;

  tv4sigmalapltau212 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 12] += tv4sigmalapltau212;

  tv4sigmalapltau213 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 13] += tv4sigmalapltau213;

  tv4sigmalapltau214 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 14] += tv4sigmalapltau214;

  tv4sigmalapltau215 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 15] += tv4sigmalapltau215;

  tv4sigmalapltau216 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 16] += tv4sigmalapltau216;

  tv4sigmalapltau217 = 0.e0;

  if(out->v4sigmalapltau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmalapltau2[ip*p->dim.v4sigmalapltau2 + 17] += tv4sigmalapltau217;

  tv4sigmatau30 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 0] += tv4sigmatau30;

  tv4sigmatau31 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 1] += tv4sigmatau31;

  tv4sigmatau32 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 2] += tv4sigmatau32;

  tv4sigmatau33 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 3] += tv4sigmatau33;

  tv4sigmatau34 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 4] += tv4sigmatau34;

  tv4sigmatau35 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 5] += tv4sigmatau35;

  tv4sigmatau36 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 6] += tv4sigmatau36;

  tv4sigmatau37 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 7] += tv4sigmatau37;

  tv4sigmatau38 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 8] += tv4sigmatau38;

  tv4sigmatau39 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 9] += tv4sigmatau39;

  tv4sigmatau310 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 10] += tv4sigmatau310;

  tv4sigmatau311 = 0.e0;

  if(out->v4sigmatau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4sigmatau3[ip*p->dim.v4sigmatau3 + 11] += tv4sigmatau311;

  tv4lapl40 = 0.e0;

  if(out->v4lapl4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl4[ip*p->dim.v4lapl4 + 0] += tv4lapl40;

  tv4lapl41 = 0.e0;

  if(out->v4lapl4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl4[ip*p->dim.v4lapl4 + 1] += tv4lapl41;

  tv4lapl42 = 0.e0;

  if(out->v4lapl4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl4[ip*p->dim.v4lapl4 + 2] += tv4lapl42;

  tv4lapl43 = 0.e0;

  if(out->v4lapl4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl4[ip*p->dim.v4lapl4 + 3] += tv4lapl43;

  tv4lapl44 = 0.e0;

  if(out->v4lapl4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl4[ip*p->dim.v4lapl4 + 4] += tv4lapl44;

  tv4lapl3tau0 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 0] += tv4lapl3tau0;

  tv4lapl3tau1 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 1] += tv4lapl3tau1;

  tv4lapl3tau2 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 2] += tv4lapl3tau2;

  tv4lapl3tau3 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 3] += tv4lapl3tau3;

  tv4lapl3tau4 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 4] += tv4lapl3tau4;

  tv4lapl3tau5 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 5] += tv4lapl3tau5;

  tv4lapl3tau6 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 6] += tv4lapl3tau6;

  tv4lapl3tau7 = 0.e0;

  if(out->v4lapl3tau != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl3tau[ip*p->dim.v4lapl3tau + 7] += tv4lapl3tau7;

  tv4lapl2tau20 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 0] += tv4lapl2tau20;

  tv4lapl2tau21 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 1] += tv4lapl2tau21;

  tv4lapl2tau22 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 2] += tv4lapl2tau22;

  tv4lapl2tau23 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 3] += tv4lapl2tau23;

  tv4lapl2tau24 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 4] += tv4lapl2tau24;

  tv4lapl2tau25 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 5] += tv4lapl2tau25;

  tv4lapl2tau26 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 6] += tv4lapl2tau26;

  tv4lapl2tau27 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 7] += tv4lapl2tau27;

  tv4lapl2tau28 = 0.e0;

  if(out->v4lapl2tau2 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapl2tau2[ip*p->dim.v4lapl2tau2 + 8] += tv4lapl2tau28;

  tv4lapltau30 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 0] += tv4lapltau30;

  tv4lapltau31 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 1] += tv4lapltau31;

  tv4lapltau32 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 2] += tv4lapltau32;

  tv4lapltau33 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 3] += tv4lapltau33;

  tv4lapltau34 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 4] += tv4lapltau34;

  tv4lapltau35 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 5] += tv4lapltau35;

  tv4lapltau36 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 6] += tv4lapltau36;

  tv4lapltau37 = 0.e0;

  if(out->v4lapltau3 != NULL && (p->info->flags & XC_FLAGS_NEEDS_LAPLACIAN) && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4lapltau3[ip*p->dim.v4lapltau3 + 7] += tv4lapltau37;

  tv4tau40 = 0.e0;

  if(out->v4tau4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4tau4[ip*p->dim.v4tau4 + 0] += tv4tau40;

  tv4tau41 = 0.e0;

  if(out->v4tau4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4tau4[ip*p->dim.v4tau4 + 1] += tv4tau41;

  tv4tau42 = 0.e0;

  if(out->v4tau4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4tau4[ip*p->dim.v4tau4 + 2] += tv4tau42;

  tv4tau43 = 0.e0;

  if(out->v4tau4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4tau4[ip*p->dim.v4tau4 + 3] += tv4tau43;

  tv4tau44 = 0.e0;

  if(out->v4tau4 != NULL && (p->info->flags & XC_FLAGS_NEEDS_TAU) && (p->info->flags & XC_FLAGS_HAVE_LXC))
    out->v4tau4[ip*p->dim.v4tau4 + 4] += tv4tau44;

}

#endif

