text: // Copyright (c) Microsoft Corporation.
  // Licensed under the MIT license.
  
  #line 2 "au_autodiff_generate_template.cpp"
  #include <math.h>
  
  #include "au_mex.h"
  
  // Autogenerated by au_ccode
  // FROM: f
  // au_autodiff_template.cpp - outline code for au_autodiff*
  // awf@microsoft.com, Dec 13
  
  void mlx_function(mlx_inputs& ins, mlx_outputs& outs)
  {
      mlx_array<mlx_double> in(ins[0]);
      mlx_array<mlx_double> data(ins[1]);
      mlx_array<mlx_logical> jacobian(ins[2]);
      bool do_jacobian = jacobian[0];
  
      mlx_assert(in.cols == data.cols);
      mlx_assert(in.rows == 150);
      mlx_assert(data.rows == 5);
  
      mwSize out_rows = 1 + (do_jacobian ? 150 : 0);
      mwSize out_cols = 1 * in.cols;
      mlx_make_array<mlx_double> out(out_rows, out_cols);
  
      double const* in_ptr = in.data;
      double const* data_ptr = data.data;
      double* out_ptr = out.data;
  
      if (do_jacobian) {
          // const mwSize out_rows = 150 + 1;
          const mwSize out_step = (150 + 1) * 1;
          for(mwSize c_in = 0; c_in < in.cols; ++c_in,
                  in_ptr += in.rows,
                  data_ptr += data.rows,
                  out_ptr += out_step) {
                /* inner loop do_jac=1 */
      double x1 = in_ptr[0];
      double x2 = in_ptr[1];
      double x3 = in_ptr[2];
      double x4 = in_ptr[3];
      double x5 = in_ptr[4];
      double x6 = in_ptr[5];
      double x7 = in_ptr[6];
      double x8 = in_ptr[7];
      double x9 = in_ptr[8];
      double x10 = in_ptr[9];
      double x11 = in_ptr[10];
      double x12 = in_ptr[11];
      double x13 = in_ptr[12];
      double x14 = in_ptr[13];
      double x15 = in_ptr[14];
      double x16 = in_ptr[15];
      double x17 = in_ptr[16];
      double x18 = in_ptr[17];
      double x19 = in_ptr[18];
      double x20 = in_ptr[19];
      double x21 = in_ptr[20];
      double x22 = in_ptr[21];
      double x23 = in_ptr[22];
      double x24 = in_ptr[23];
      double x25 = in_ptr[24];
      double x26 = in_ptr[25];
      double x27 = in_ptr[26];
      double x28 = in_ptr[27];
      double x29 = in_ptr[28];
      double x30 = in_ptr[29];
      double x31 = in_ptr[30];
      double x32 = in_ptr[31];
      double x33 = in_ptr[32];
      double x34 = in_ptr[33];
      double x35 = in_ptr[34];
      double x36 = in_ptr[35];
      double x37 = in_ptr[36];
      double x38 = in_ptr[37];
      double x39 = in_ptr[38];
      double x40 = in_ptr[39];
      double x41 = in_ptr[40];
      double x42 = in_ptr[41];
      double x43 = in_ptr[42];
      double x44 = in_ptr[43];
      double x45 = in_ptr[44];
      double x46 = in_ptr[45];
      double x47 = in_ptr[46];
      double x48 = in_ptr[47];
      double x49 = in_ptr[48];
      double x50 = in_ptr[49];
      double x51 = in_ptr[50];
      double x52 = in_ptr[51];
      double x53 = in_ptr[52];
      double x54 = in_ptr[53];
      double x55 = in_ptr[54];
      double x56 = in_ptr[55];
      double x57 = in_ptr[56];
      double x58 = in_ptr[57];
      double x59 = in_ptr[58];
      double x60 = in_ptr[59];
      double x61 = in_ptr[60];
      double x62 = in_ptr[61];
      double x63 = in_ptr[62];
      double x64 = in_ptr[63];
      double x65 = in_ptr[64];
      double x66 = in_ptr[65];
      double x67 = in_ptr[66];
      double x68 = in_ptr[67];
      double x69 = in_ptr[68];
      double x70 = in_ptr[69];
      double x71 = in_ptr[70];
      double x72 = in_ptr[71];
      double x73 = in_ptr[72];
      double x74 = in_ptr[73];
      double x75 = in_ptr[74];
      double x76 = in_ptr[75];
      double x77 = in_ptr[76];
      double x78 = in_ptr[77];
      double x79 = in_ptr[78];
      double x80 = in_ptr[79];
      double x81 = in_ptr[80];
      double x82 = in_ptr[81];
      double x83 = in_ptr[82];
      double x84 = in_ptr[83];
      double x85 = in_ptr[84];
      double x86 = in_ptr[85];
      double x87 = in_ptr[86];
      double x88 = in_ptr[87];
      double x89 = in_ptr[88];
      double x90 = in_ptr[89];
      double x91 = in_ptr[90];
      double x92 = in_ptr[91];
      double x93 = in_ptr[92];
      double x94 = in_ptr[93];
      double x95 = in_ptr[94];
      double x96 = in_ptr[95];
      double x97 = in_ptr[96];
      double x98 = in_ptr[97];
      double x99 = in_ptr[98];
      double x100 = in_ptr[99];
      double x101 = in_ptr[100];
      double x102 = in_ptr[101];
      double x103 = in_ptr[102];
      double x104 = in_ptr[103];
      double x105 = in_ptr[104];
      double x106 = in_ptr[105];
      double x107 = in_ptr[106];
      double x108 = in_ptr[107];
      double x109 = in_ptr[108];
      double x110 = in_ptr[109];
      double x111 = in_ptr[110];
      double x112 = in_ptr[111];
      double x113 = in_ptr[112];
      double x114 = in_ptr[113];
      double x115 = in_ptr[114];
      double x116 = in_ptr[115];
      double x117 = in_ptr[116];
      double x118 = in_ptr[117];
      double x119 = in_ptr[118];
      double x120 = in_ptr[119];
      double x121 = in_ptr[120];
      double x122 = in_ptr[121];
      double x123 = in_ptr[122];
      double x124 = in_ptr[123];
      double x125 = in_ptr[124];
      double x126 = in_ptr[125];
      double x127 = in_ptr[126];
      double x128 = in_ptr[127];
      double x129 = in_ptr[128];
      double x130 = in_ptr[129];
      double x131 = in_ptr[130];
      double x132 = in_ptr[131];
      double x133 = in_ptr[132];
      double x134 = in_ptr[133];
      double x135 = in_ptr[134];
      double x136 = in_ptr[135];
      double x137 = in_ptr[136];
      double x138 = in_ptr[137];
      double x139 = in_ptr[138];
      double x140 = in_ptr[139];
      double x141 = in_ptr[140];
      double x142 = in_ptr[141];
      double x143 = in_ptr[142];
      double x144 = in_ptr[143];
      double x145 = in_ptr[144];
      double x146 = in_ptr[145];
      double x147 = in_ptr[146];
      double x148 = in_ptr[147];
      double x149 = in_ptr[148];
      double x150 = in_ptr[149];
      double data1 = data_ptr[0];
      double data2 = data_ptr[1];
      double data3 = data_ptr[2];
      double data4 = data_ptr[3];
      double data5 = data_ptr[4];
      double t3 = data1-x26;
      double t102 = exp(x77);
      double t127 = t3*x78;
      double t128 = data2-x27;
      double t129 = t102*t128;
      double t2 = t127+t129;
      double t5 = data1-x28;
      double t103 = exp(x80);
      double t136 = t5*x81;
      double t137 = data2-x29;
      double t138 = t103*t137;
      double t4 = t136+t138;
      double t7 = data1-x30;
      double t104 = exp(x83);
      double t143 = t7*x84;
      double t144 = data2-x31;
      double t145 = t104*t144;
      double t6 = t143+t145;
      double t9 = data1-x32;
      double t105 = exp(x86);
      double t150 = t9*x87;
      double t151 = data2-x33;
      double t152 = t105*t151;
      double t8 = t150+t152;
      double t11 = data1-x34;
      double t106 = exp(x89);
      double t157 = t11*x90;
      double t158 = data2-x35;
      double t159 = t106*t158;
      double t10 = t157+t159;
      double t13 = data1-x36;
      double t107 = exp(x92);
      double t164 = t13*x93;
      double t165 = data2-x37;
      double t166 = t107*t165;
      double t12 = t164+t166;
      double t15 = data1-x38;
      double t108 = exp(x95);
      double t171 = t15*x96;
      double t172 = data2-x39;
      double t173 = t108*t172;
      double t14 = t171+t173;
      double t17 = data1-x40;
      double t109 = exp(x98);
      double t178 = t17*x99;
      double t179 = data2-x41;
      double t180 = t109*t179;
      double t16 = t178+t180;
      double t19 = data1-x42;
      double t110 = exp(x101);
      double t185 = t19*x102;
      double t186 = data2-x43;
      double t187 = t110*t186;
      double t18 = t185+t187;
      double t21 = data1-x44;
      double t111 = exp(x104);
      double t192 = t21*x105;
      double t193 = data2-x45;
      double t194 = t111*t193;
      double t20 = t192+t194;
      double t23 = data1-x46;
      double t112 = exp(x107);
      double t199 = t23*x108;
      double t200 = data2-x47;
      double t201 = t112*t200;
      double t22 = t199+t201;
      double t25 = data1-x48;
      double t113 = exp(x110);
      double t206 = t25*x111;
      double t207 = data2-x49;
      double t208 = t113*t207;
      double t24 = t206+t208;
      double t27 = data1-x50;
      double t114 = exp(x113);
      double t213 = t27*x114;
      double t214 = data2-x51;
      double t215 = t114*t214;
      double t26 = t213+t215;
      double t29 = data1-x52;
      double t115 = exp(x116);
      double t220 = t29*x117;
      double t221 = data2-x53;
      double t222 = t115*t221;
      double t28 = t220+t222;
      double t31 = data1-x54;
      double t116 = exp(x119);
      double t227 = t31*x120;
      double t228 = data2-x55;
      double t229 = t116*t228;
      double t30 = t227+t229;
      double t33 = data1-x56;
      double t117 = exp(x122);
      double t234 = t33*x123;
      double t235 = data2-x57;
      double t236 = t117*t235;
      double t32 = t234+t236;
      double t35 = data1-x58;
      double t118 = exp(x125);
      double t241 = t35*x126;
      double t242 = data2-x59;
      double t243 = t118*t242;
      double t34 = t241+t243;
      double t37 = data1-x60;
      double t119 = exp(x128);
      double t248 = t37*x129;
      double t249 = data2-x61;
      double t250 = t119*t249;
      double t36 = t248+t250;
      double t39 = data1-x62;
      double t120 = exp(x131);
      double t255 = t39*x132;
      double t256 = data2-x63;
      double t257 = t120*t256;
      double t38 = t255+t257;
      double t41 = data1-x64;
      double t121 = exp(x134);
      double t262 = t41*x135;
      double t263 = data2-x65;
      double t264 = t121*t263;
      double t40 = t262+t264;
      double t43 = data1-x66;
      double t122 = exp(x137);
      double t269 = t43*x138;
      double t270 = data2-x67;
      double t271 = t122*t270;
      double t42 = t269+t271;
      double t45 = data1-x68;
      double t123 = exp(x140);
      double t276 = t45*x141;
      double t277 = data2-x69;
      double t278 = t123*t277;
      double t44 = t276+t278;
      double t47 = data1-x70;
      double t124 = exp(x143);
      double t283 = t47*x144;
      double t284 = data2-x71;
      double t285 = t124*t284;
      double t46 = t283+t285;
      double t49 = data1-x72;
      double t125 = exp(x146);
      double t290 = t49*x147;
      double t291 = data2-x73;
      double t292 = t125*t291;
      double t48 = t290+t292;
      double t51 = data1-x74;
      double t126 = exp(x149);
      double t297 = t51*x150;
      double t298 = data2-x75;
      double t299 = t126*t298;
      double t50 = t297+t299;
      double t52 = x76*2.0;
      double t53 = exp(t52);
      double t54 = x79*2.0;
      double t55 = exp(t54);
      double t56 = x82*2.0;
      double t57 = exp(t56);
      double t58 = x85*2.0;
      double t59 = exp(t58);
      double t60 = x88*2.0;
      double t61 = exp(t60);
      double t62 = x91*2.0;
      double t63 = exp(t62);
      double t64 = x94*2.0;
      double t65 = exp(t64);
      double t66 = x97*2.0;
      double t67 = exp(t66);
      double t68 = x100*2.0;
      double t69 = exp(t68);
      double t70 = x103*2.0;
      double t71 = exp(t70);
      double t72 = x106*2.0;
      double t73 = exp(t72);
      double t74 = x109*2.0;
      double t75 = exp(t74);
      double t76 = x112*2.0;
      double t77 = exp(t76);
      double t78 = x115*2.0;
      double t79 = exp(t78);
      double t80 = x118*2.0;
      double t81 = exp(t80);
      double t82 = x121*2.0;
      double t83 = exp(t82);
      double t84 = x124*2.0;
      double t85 = exp(t84);
      double t86 = x127*2.0;
      double t87 = exp(t86);
      double t88 = x130*2.0;
      double t89 = exp(t88);
      double t90 = x133*2.0;
      double t91 = exp(t90);
      double t92 = x136*2.0;
      double t93 = exp(t92);
      double t94 = x139*2.0;
      double t95 = exp(t94);
      double t96 = x142*2.0;
      double t97 = exp(t96);
      double t98 = x145*2.0;
      double t99 = exp(t98);
      double t100 = x148*2.0;
      double t101 = exp(t100);
      double t130 = t2*t2;
      double t131 = t3*t3;
      double t134 = t130*(1.0/2.0);
      double t135 = t53*t131*(1.0/2.0);
      double t132 = -data3-t134-t135+x1+x76+x77;
      double t133 = exp(t132);
      double t139 = t4*t4;
      double t140 = t5*t5;
      double t331 = t139*(1.0/2.0);
      double t332 = t55*t140*(1.0/2.0);
      double t141 = -data3-t331-t332+x2+x79+x80;
      double t142 = exp(t141);
      double t146 = t6*t6;
      double t147 = t7*t7;
      double t333 = t146*(1.0/2.0);
      double t334 = t57*t147*(1.0/2.0);
      double t148 = -data3-t333-t334+x3+x82+x83;
      double t149 = exp(t148);
      double t153 = t8*t8;
      double t154 = t9*t9;
      double t335 = t153*(1.0/2.0);
      double t336 = t59*t154*(1.0/2.0);
      double t155 = -data3-t335-t336+x4+x85+x86;
      double t156 = exp(t155);
      double t160 = t10*t10;
      double t161 = t11*t11;
      double t337 = t160*(1.0/2.0);
      double t338 = t61*t161*(1.0/2.0);
      double t162 = -data3-t337-t338+x5+x88+x89;
      double t163 = exp(t162);
      double t167 = t12*t12;
      double t168 = t13*t13;
      double t339 = t167*(1.0/2.0);
      double t340 = t63*t168*(1.0/2.0);
      double t169 = -data3-t339-t340+x6+x91+x92;
      double t170 = exp(t169);
      double t174 = t14*t14;
      double t175 = t15*t15;
      double t341 = t174*(1.0/2.0);
      double t342 = t65*t175*(1.0/2.0);
      double t176 = -data3-t341-t342+x7+x94+x95;
      double t177 = exp(t176);
      double t181 = t16*t16;
      double t182 = t17*t17;
      double t343 = t181*(1.0/2.0);
      double t344 = t67*t182*(1.0/2.0);
      double t183 = -data3-t343-t344+x8+x97+x98;
      double t184 = exp(t183);
      double t188 = t18*t18;
      double t189 = t19*t19;
      double t345 = t188*(1.0/2.0);
      double t346 = t69*t189*(1.0/2.0);
      double t190 = -data3-t345-t346+x9+x100+x101;
      double t191 = exp(t190);
      double t195 = t20*t20;
      double t196 = t21*t21;
      double t347 = t195*(1.0/2.0);
      double t348 = t71*t196*(1.0/2.0);
      double t197 = -data3-t347-t348+x10+x103+x104;
      double t198 = exp(t197);
      double t202 = t22*t22;
      double t203 = t23*t23;
      double t349 = t202*(1.0/2.0);
      double t350 = t73*t203*(1.0/2.0);
      double t204 = -data3-t349-t350+x11+x106+x107;
      double t205 = exp(t204);
      double t209 = t24*t24;
      double t210 = t25*t25;
      double t351 = t209*(1.0/2.0);
      double t352 = t75*t210*(1.0/2.0);
      double t211 = -data3-t351-t352+x12+x109+x110;
      double t212 = exp(t211);
      double t216 = t26*t26;
      double t217 = t27*t27;
      double t353 = t216*(1.0/2.0);
      double t354 = t77*t217*(1.0/2.0);
      double t218 = -data3-t353-t354+x13+x112+x113;
      double t219 = exp(t218);
      double t223 = t28*t28;
      double t224 = t29*t29;
      double t355 = t223*(1.0/2.0);
      double t356 = t79*t224*(1.0/2.0);
      double t225 = -data3-t355-t356+x14+x115+x116;
      double t226 = exp(t225);
      double t230 = t30*t30;
      double t231 = t31*t31;
      double t357 = t230*(1.0/2.0);
      double t358 = t81*t231*(1.0/2.0);
      double t232 = -data3-t357-t358+x15+x118+x119;
      double t233 = exp(t232);
      double t237 = t32*t32;
      double t238 = t33*t33;
      double t359 = t237*(1.0/2.0);
      double t360 = t83*t238*(1.0/2.0);
      double t239 = -data3-t359-t360+x16+x121+x122;
      double t240 = exp(t239);
      double t244 = t34*t34;
      double t245 = t35*t35;
      double t361 = t244*(1.0/2.0);
      double t362 = t85*t245*(1.0/2.0);
      double t246 = -data3-t361-t362+x17+x124+x125;
      double t247 = exp(t246);
      double t251 = t36*t36;
      double t252 = t37*t37;
      double t363 = t251*(1.0/2.0);
      double t364 = t87*t252*(1.0/2.0);
      double t253 = -data3-t363-t364+x18+x127+x128;
      double t254 = exp(t253);
      double t258 = t38*t38;
      double t259 = t39*t39;
      double t365 = t258*(1.0/2.0);
      double t366 = t89*t259*(1.0/2.0);
      double t260 = -data3-t365-t366+x19+x130+x131;
      double t261 = exp(t260);
      double t265 = t40*t40;
      double t266 = t41*t41;
      double t367 = t265*(1.0/2.0);
      double t368 = t91*t266*(1.0/2.0);
      double t267 = -data3-t367-t368+x20+x133+x134;
      double t268 = exp(t267);
      double t272 = t42*t42;
      double t273 = t43*t43;
      double t369 = t272*(1.0/2.0);
      double t370 = t93*t273*(1.0/2.0);
      double t274 = -data3-t369-t370+x21+x136+x137;
      double t275 = exp(t274);
      double t279 = t44*t44;
      double t280 = t45*t45;
      double t371 = t279*(1.0/2.0);
      double t372 = t95*t280*(1.0/2.0);
      double t281 = -data3-t371-t372+x22+x139+x140;
      double t282 = exp(t281);
      double t286 = t46*t46;
      double t287 = t47*t47;
      double t373 = t286*(1.0/2.0);
      double t374 = t97*t287*(1.0/2.0);
      double t288 = -data3-t373-t374+x23+x142+x143;
      double t289 = exp(t288);
      double t293 = t48*t48;
      double t294 = t49*t49;
      double t375 = t293*(1.0/2.0);
      double t376 = t99*t294*(1.0/2.0);
      double t295 = -data3-t375-t376+x24+x145+x146;
      double t296 = exp(t295);
      double t300 = t50*t50;
      double t301 = t51*t51;
      double t377 = t300*(1.0/2.0);
      double t378 = t101*t301*(1.0/2.0);
      double t302 = -data3-t377-t378+x25+x148+x149;
      double t303 = exp(t302);
      double t304 = t133+t142+t149+t156+t163+t170+t177+t184+t191+t198+t205+t212+t219+t226+t233+t240+t247+t254+t261+t268+t275+t282+t289+t296+t303;
      double t305 = exp(x1);
      double t306 = exp(x2);
      double t307 = exp(x3);
      double t308 = exp(x4);
      double t309 = exp(x5);
      double t310 = exp(x6);
      double t311 = exp(x7);
      double t312 = exp(x8);
      double t313 = exp(x9);
      double t314 = exp(x10);
      double t315 = exp(x11);
      double t316 = exp(x12);
      double t317 = exp(x13);
      double t318 = exp(x14);
      double t319 = exp(x15);
      double t320 = exp(x16);
      double t321 = exp(x17);
      double t322 = exp(x18);
      double t323 = exp(x19);
      double t324 = exp(x20);
      double t325 = exp(x21);
      double t326 = exp(x22);
      double t327 = exp(x23);
      double t328 = exp(x24);
      double t329 = exp(x25);
      double t330 = t305+t306+t307+t308+t309+t310+t311+t312+t313+t314+t315+t316+t317+t318+t319+t320+t321+t322+t323+t324+t325+t326+t327+t328+t329;
      double t379 = 1.0/t304;
      double t380 = 1.0/t330;
      double t381 = data1*2.0;
      double t382 = exp(x76);
      double t383 = x77*2.0;
      double t384 = exp(t383);
      double t385 = exp(x79);
      double t386 = x80*2.0;
      double t387 = exp(t386);
      double t388 = exp(x82);
      double t389 = x83*2.0;
      double t390 = exp(t389);
      double t391 = exp(x85);
      double t392 = x86*2.0;
      double t393 = exp(t392);
      double t394 = exp(x88);
      double t395 = x89*2.0;
      double t396 = exp(t395);
      double t397 = exp(x91);
      double t398 = x92*2.0;
      double t399 = exp(t398);
      double t400 = exp(x94);
      double t401 = x95*2.0;
      double t402 = exp(t401);
      double t403 = exp(x97);
      double t404 = x98*2.0;
      double t405 = exp(t404);
      double t406 = exp(x100);
      double t407 = x101*2.0;
      double t408 = exp(t407);
      double t409 = exp(x103);
      double t410 = x104*2.0;
      double t411 = exp(t410);
      double t412 = exp(x106);
      double t413 = x107*2.0;
      double t414 = exp(t413);
      double t415 = exp(x109);
      double t416 = x110*2.0;
      double t417 = exp(t416);
      double t418 = exp(x112);
      double t419 = x113*2.0;
      double t420 = exp(t419);
      double t421 = exp(x115);
      double t422 = x116*2.0;
      double t423 = exp(t422);
      double t424 = exp(x118);
      double t425 = x119*2.0;
      double t426 = exp(t425);
      double t427 = exp(x121);
      double t428 = x122*2.0;
      double t429 = exp(t428);
      double t430 = exp(x124);
      double t431 = x125*2.0;
      double t432 = exp(t431);
      double t433 = exp(x127);
      double t434 = x128*2.0;
      double t435 = exp(t434);
      double t436 = exp(x130);
      double t437 = x131*2.0;
      double t438 = exp(t437);
      double t439 = exp(x133);
      double t440 = x134*2.0;
      double t441 = exp(t440);
      double t442 = exp(x136);
      double t443 = x137*2.0;
      double t444 = exp(t443);
      double t445 = exp(x139);
      double t446 = x140*2.0;
      double t447 = exp(t446);
      double t448 = exp(x142);
      double t449 = x143*2.0;
      double t450 = exp(t449);
      double t451 = exp(x145);
      double t452 = x146*2.0;
      double t453 = exp(t452);
      double t454 = exp(x148);
      double t455 = x149*2.0;
      double t456 = exp(t455);
    out_ptr[0] = data3+log(t304)-log(t330)-data5*(t102+t382)-data5*(t103+t385)-data5*(t104+t388)-data5*(t105+t391)-data5*(t106+t394)-data5*(t107+t397)-data5*(t108+t400)-data5*(t109+t403)-data5*(t110+t406)-data5*(t111+t409)-data5*(t112+t412)-data5*(t113+t415)-data5*(t114+t418)-data5*(t115+t421)-data5*(t116+t424)-data5*(t117+t427)-data5*(t118+t430)-data5*(t119+t433)-data5*(t120+t436)-data5*(t121+t439)-data5*(t122+t442)-data5*(t123+t445)-data5*(t124+t448)-data5*(t125+t451)-data5*(t126+t454)+data4*(t53+t384+x78*x78)+data4*(t55+t387+x81*x81)+data4*(t57+t390+x84*x84)+data4*(t59+t393+x87*x87)+data4*(t61+t396+x90*x90)+data4*(t63+t399+x93*x93)+data4*(t65+t402+x96*x96)+data4*(t67+t405+x99*x99)+data4*(t69+t408+x102*x102)+data4*(t71+t411+x105*x105)+data4*(t73+t414+x108*x108)+data4*(t75+t417+x111*x111)+data4*(t77+t420+x114*x114)+data4*(t79+t423+x117*x117)+data4*(t81+t426+x120*x120)+data4*(t83+t429+x123*x123)+data4*(t85+t432+x126*x126)+data4*(t87+t435+x129*x129)+data4*(t89+t438+x132*x132)+data4*(t91+t441+x135*x135)+data4*(t93+t444+x138*x138)+data4*(t95+t447+x141*x141)+data4*(t97+t450+x144*x144)+data4*(t99+t453+x147*x147)+data4*(t101+t456+x150*x150);
    out_ptr[1] = t133*t379-t305*t380;
    out_ptr[2] = t142*t379-t306*t380;
    out_ptr[3] = t149*t379-t307*t380;
    out_ptr[4] = t156*t379-t308*t380;
    out_ptr[5] = t163*t379-t309*t380;
    out_ptr[6] = t170*t379-t310*t380;
    out_ptr[7] = t177*t379-t311*t380;
    out_ptr[8] = t184*t379-t312*t380;
    out_ptr[9] = t191*t379-t313*t380;
    out_ptr[10] = t198*t379-t314*t380;
    out_ptr[11] = t205*t379-t315*t380;
    out_ptr[12] = t212*t379-t316*t380;
    out_ptr[13] = t219*t379-t317*t380;
    out_ptr[14] = t226*t379-t318*t380;
    out_ptr[15] = t233*t379-t319*t380;
    out_ptr[16] = t240*t379-t320*t380;
    out_ptr[17] = t247*t379-t321*t380;
    out_ptr[18] = t254*t379-t322*t380;
    out_ptr[19] = t261*t379-t323*t380;
    out_ptr[20] = t268*t379-t324*t380;
    out_ptr[21] = t275*t379-t325*t380;
    out_ptr[22] = t282*t379-t326*t380;
    out_ptr[23] = t289*t379-t327*t380;
    out_ptr[24] = t296*t379-t328*t380;
    out_ptr[25] = t303*t379-t329*t380;
    out_ptr[26] = t133*t379*(t2*x78+t53*(t381-x26*2.0)*(1.0/2.0));
    out_ptr[27] = t2*t102*t133*t379;
    out_ptr[28] = t142*t379*(t4*x81+t55*(t381-x28*2.0)*(1.0/2.0));
    out_ptr[29] = t4*t103*t142*t379;
    out_ptr[30] = t149*t379*(t6*x84+t57*(t381-x30*2.0)*(1.0/2.0));
    out_ptr[31] = t6*t104*t149*t379;
    out_ptr[32] = t156*t379*(t8*x87+t59*(t381-x32*2.0)*(1.0/2.0));
    out_ptr[33] = t8*t105*t156*t379;
    out_ptr[34] = t163*t379*(t10*x90+t61*(t381-x34*2.0)*(1.0/2.0));
    out_ptr[35] = t10*t106*t163*t379;
    out_ptr[36] = t170*t379*(t12*x93+t63*(t381-x36*2.0)*(1.0/2.0));
    out_ptr[37] = t12*t107*t170*t379;
    out_ptr[38] = t177*t379*(t14*x96+t65*(t381-x38*2.0)*(1.0/2.0));
    out_ptr[39] = t14*t108*t177*t379;
    out_ptr[40] = t184*t379*(t16*x99+t67*(t381-x40*2.0)*(1.0/2.0));
    out_ptr[41] = t16*t109*t184*t379;
    out_ptr[42] = t191*t379*(t18*x102+t69*(t381-x42*2.0)*(1.0/2.0));
    out_ptr[43] = t18*t110*t191*t379;
    out_ptr[44] = t198*t379*(t20*x105+t71*(t381-x44*2.0)*(1.0/2.0));
    out_ptr[45] = t20*t111*t198*t379;
    out_ptr[46] = t205*t379*(t22*x108+t73*(t381-x46*2.0)*(1.0/2.0));
    out_ptr[47] = t22*t112*t205*t379;
    out_ptr[48] = t212*t379*(t24*x111+t75*(t381-x48*2.0)*(1.0/2.0));
    out_ptr[49] = t24*t113*t212*t379;
    out_ptr[50] = t219*t379*(t26*x114+t77*(t381-x50*2.0)*(1.0/2.0));
    out_ptr[51] = t26*t114*t219*t379;
    out_ptr[52] = t226*t379*(t28*x117+t79*(t381-x52*2.0)*(1.0/2.0));
    out_ptr[53] = t28*t115*t226*t379;
    out_ptr[54] = t233*t379*(t30*x120+t81*(t381-x54*2.0)*(1.0/2.0));
    out_ptr[55] = t30*t116*t233*t379;
    out_ptr[56] = t240*t379*(t32*x123+t83*(t381-x56*2.0)*(1.0/2.0));
    out_ptr[57] = t32*t117*t240*t379;
    out_ptr[58] = t247*t379*(t34*x126+t85*(t381-x58*2.0)*(1.0/2.0));
    out_ptr[59] = t34*t118*t247*t379;
    out_ptr[60] = t254*t379*(t36*x129+t87*(t381-x60*2.0)*(1.0/2.0));
    out_ptr[61] = t36*t119*t254*t379;
    out_ptr[62] = t261*t379*(t38*x132+t89*(t381-x62*2.0)*(1.0/2.0));
    out_ptr[63] = t38*t120*t261*t379;
    out_ptr[64] = t268*t379*(t40*x135+t91*(t381-x64*2.0)*(1.0/2.0));
    out_ptr[65] = t40*t121*t268*t379;
    out_ptr[66] = t275*t379*(t42*x138+t93*(t381-x66*2.0)*(1.0/2.0));
    out_ptr[67] = t42*t122*t275*t379;
    out_ptr[68] = t282*t379*(t44*x141+t95*(t381-x68*2.0)*(1.0/2.0));
    out_ptr[69] = t44*t123*t282*t379;
    out_ptr[70] = t289*t379*(t46*x144+t97*(t381-x70*2.0)*(1.0/2.0));
    out_ptr[71] = t46*t124*t289*t379;
    out_ptr[72] = t296*t379*(t48*x147+t99*(t381-x72*2.0)*(1.0/2.0));
    out_ptr[73] = t48*t125*t296*t379;
    out_ptr[74] = t303*t379*(t50*x150+t101*(t381-x74*2.0)*(1.0/2.0));
    out_ptr[75] = t50*t126*t303*t379;
    out_ptr[76] = data4*t53*2.0-data5*t382-t133*t379*(t53*t131-1.0);
    out_ptr[77] = -data5*t102+data4*t384*2.0-t133*t379*(t2*t102*t128-1.0);
    out_ptr[78] = data4*x78*2.0-t2*t3*t133*t379;
    out_ptr[79] = data4*t55*2.0-data5*t385-t142*t379*(t55*t140-1.0);
    out_ptr[80] = -data5*t103+data4*t387*2.0-t142*t379*(t4*t103*t137-1.0);
    out_ptr[81] = data4*x81*2.0-t4*t5*t142*t379;
    out_ptr[82] = data4*t57*2.0-data5*t388-t149*t379*(t57*t147-1.0);
    out_ptr[83] = -data5*t104+data4*t390*2.0-t149*t379*(t6*t104*t144-1.0);
    out_ptr[84] = data4*x84*2.0-t6*t7*t149*t379;
    out_ptr[85] = data4*t59*2.0-data5*t391-t156*t379*(t59*t154-1.0);
    out_ptr[86] = -data5*t105+data4*t393*2.0-t156*t379*(t8*t105*t151-1.0);
    out_ptr[87] = data4*x87*2.0-t8*t9*t156*t379;
    out_ptr[88] = data4*t61*2.0-data5*t394-t163*t379*(t61*t161-1.0);
    out_ptr[89] = -data5*t106+data4*t396*2.0-t163*t379*(t10*t106*t158-1.0);
    out_ptr[90] = data4*x90*2.0-t10*t11*t163*t379;
    out_ptr[91] = data4*t63*2.0-data5*t397-t170*t379*(t63*t168-1.0);
    out_ptr[92] = -data5*t107+data4*t399*2.0-t170*t379*(t12*t107*t165-1.0);
    out_ptr[93] = data4*x93*2.0-t12*t13*t170*t379;
    out_ptr[94] = data4*t65*2.0-data5*t400-t177*t379*(t65*t175-1.0);
    out_ptr[95] = -data5*t108+data4*t402*2.0-t177*t379*(t14*t108*t172-1.0);
    out_ptr[96] = data4*x96*2.0-t14*t15*t177*t379;
    out_ptr[97] = data4*t67*2.0-data5*t403-t184*t379*(t67*t182-1.0);
    out_ptr[98] = -data5*t109+data4*t405*2.0-t184*t379*(t16*t109*t179-1.0);
    out_ptr[99] = data4*x99*2.0-t16*t17*t184*t379;
    out_ptr[100] = data4*t69*2.0-data5*t406-t191*t379*(t69*t189-1.0);
    out_ptr[101] = -data5*t110+data4*t408*2.0-t191*t379*(t18*t110*t186-1.0);
    out_ptr[102] = data4*x102*2.0-t18*t19*t191*t379;
    out_ptr[103] = data4*t71*2.0-data5*t409-t198*t379*(t71*t196-1.0);
    out_ptr[104] = -data5*t111+data4*t411*2.0-t198*t379*(t20*t111*t193-1.0);
    out_ptr[105] = data4*x105*2.0-t20*t21*t198*t379;
    out_ptr[106] = data4*t73*2.0-data5*t412-t205*t379*(t73*t203-1.0);
    out_ptr[107] = -data5*t112+data4*t414*2.0-t205*t379*(t22*t112*t200-1.0);
    out_ptr[108] = data4*x108*2.0-t22*t23*t205*t379;
    out_ptr[109] = data4*t75*2.0-data5*t415-t212*t379*(t75*t210-1.0);
    out_ptr[110] = -data5*t113+data4*t417*2.0-t212*t379*(t24*t113*t207-1.0);
    out_ptr[111] = data4*x111*2.0-t24*t25*t212*t379;
    out_ptr[112] = data4*t77*2.0-data5*t418-t219*t379*(t77*t217-1.0);
    out_ptr[113] = -data5*t114+data4*t420*2.0-t219*t379*(t26*t114*t214-1.0);
    out_ptr[114] = data4*x114*2.0-t26*t27*t219*t379;
    out_ptr[115] = data4*t79*2.0-data5*t421-t226*t379*(t79*t224-1.0);
    out_ptr[116] = -data5*t115+data4*t423*2.0-t226*t379*(t28*t115*t221-1.0);
    out_ptr[117] = data4*x117*2.0-t28*t29*t226*t379;
    out_ptr[118] = data4*t81*2.0-data5*t424-t233*t379*(t81*t231-1.0);
    out_ptr[119] = -data5*t116+data4*t426*2.0-t233*t379*(t30*t116*t228-1.0);
    out_ptr[120] = data4*x120*2.0-t30*t31*t233*t379;
    out_ptr[121] = data4*t83*2.0-data5*t427-t240*t379*(t83*t238-1.0);
    out_ptr[122] = -data5*t117+data4*t429*2.0-t240*t379*(t32*t117*t235-1.0);
    out_ptr[123] = data4*x123*2.0-t32*t33*t240*t379;
    out_ptr[124] = data4*t85*2.0-data5*t430-t247*t379*(t85*t245-1.0);
    out_ptr[125] = -data5*t118+data4*t432*2.0-t247*t379*(t34*t118*t242-1.0);
    out_ptr[126] = data4*x126*2.0-t34*t35*t247*t379;
    out_ptr[127] = data4*t87*2.0-data5*t433-t254*t379*(t87*t252-1.0);
    out_ptr[128] = -data5*t119+data4*t435*2.0-t254*t379*(t36*t119*t249-1.0);
    out_ptr[129] = data4*x129*2.0-t36*t37*t254*t379;
    out_ptr[130] = data4*t89*2.0-data5*t436-t261*t379*(t89*t259-1.0);
    out_ptr[131] = -data5*t120+data4*t438*2.0-t261*t379*(t38*t120*t256-1.0);
    out_ptr[132] = data4*x132*2.0-t38*t39*t261*t379;
    out_ptr[133] = data4*t91*2.0-data5*t439-t268*t379*(t91*t266-1.0);
    out_ptr[134] = -data5*t121+data4*t441*2.0-t268*t379*(t40*t121*t263-1.0);
    out_ptr[135] = data4*x135*2.0-t40*t41*t268*t379;
    out_ptr[136] = data4*t93*2.0-data5*t442-t275*t379*(t93*t273-1.0);
    out_ptr[137] = -data5*t122+data4*t444*2.0-t275*t379*(t42*t122*t270-1.0);
    out_ptr[138] = data4*x138*2.0-t42*t43*t275*t379;
    out_ptr[139] = data4*t95*2.0-data5*t445-t282*t379*(t95*t280-1.0);
    out_ptr[140] = -data5*t123+data4*t447*2.0-t282*t379*(t44*t123*t277-1.0);
    out_ptr[141] = data4*x141*2.0-t44*t45*t282*t379;
    out_ptr[142] = data4*t97*2.0-data5*t448-t289*t379*(t97*t287-1.0);
    out_ptr[143] = -data5*t124+data4*t450*2.0-t289*t379*(t46*t124*t284-1.0);
    out_ptr[144] = data4*x144*2.0-t46*t47*t289*t379;
    out_ptr[145] = data4*t99*2.0-data5*t451-t296*t379*(t99*t294-1.0);
    out_ptr[146] = -data5*t125+data4*t453*2.0-t296*t379*(t48*t125*t291-1.0);
    out_ptr[147] = data4*x147*2.0-t48*t49*t296*t379;
    out_ptr[148] = data4*t101*2.0-data5*t454-t303*t379*(t101*t301-1.0);
    out_ptr[149] = -data5*t126+data4*t456*2.0-t303*t379*(t50*t126*t298-1.0);
    out_ptr[150] = data4*x150*2.0-t50*t51*t303*t379;
  
  #line 39 "au_autodiff_generate_template.cpp"
          }
      } else {
          const mwSize out_step = 1;
          for(mwSize c_in = 0; c_in < in.cols; ++c_in,
                  in_ptr += in.rows,
                  data_ptr += data.rows,
                  out_ptr += out_step) {
                /* inner loop do_jac=0 */
      double x1 = in_ptr[0];
      double x2 = in_ptr[1];
      double x3 = in_ptr[2];
      double x4 = in_ptr[3];
      double x5 = in_ptr[4];
      double x6 = in_ptr[5];
      double x7 = in_ptr[6];
      double x8 = in_ptr[7];
      double x9 = in_ptr[8];
      double x10 = in_ptr[9];
      double x11 = in_ptr[10];
      double x12 = in_ptr[11];
      double x13 = in_ptr[12];
      double x14 = in_ptr[13];
      double x15 = in_ptr[14];
      double x16 = in_ptr[15];
      double x17 = in_ptr[16];
      double x18 = in_ptr[17];
      double x19 = in_ptr[18];
      double x20 = in_ptr[19];
      double x21 = in_ptr[20];
      double x22 = in_ptr[21];
      double x23 = in_ptr[22];
      double x24 = in_ptr[23];
      double x25 = in_ptr[24];
      double x26 = in_ptr[25];
      double x27 = in_ptr[26];
      double x28 = in_ptr[27];
      double x29 = in_ptr[28];
      double x30 = in_ptr[29];
      double x31 = in_ptr[30];
      double x32 = in_ptr[31];
      double x33 = in_ptr[32];
      double x34 = in_ptr[33];
      double x35 = in_ptr[34];
      double x36 = in_ptr[35];
      double x37 = in_ptr[36];
      double x38 = in_ptr[37];
      double x39 = in_ptr[38];
      double x40 = in_ptr[39];
      double x41 = in_ptr[40];
      double x42 = in_ptr[41];
      double x43 = in_ptr[42];
      double x44 = in_ptr[43];
      double x45 = in_ptr[44];
      double x46 = in_ptr[45];
      double x47 = in_ptr[46];
      double x48 = in_ptr[47];
      double x49 = in_ptr[48];
      double x50 = in_ptr[49];
      double x51 = in_ptr[50];
      double x52 = in_ptr[51];
      double x53 = in_ptr[52];
      double x54 = in_ptr[53];
      double x55 = in_ptr[54];
      double x56 = in_ptr[55];
      double x57 = in_ptr[56];
      double x58 = in_ptr[57];
      double x59 = in_ptr[58];
      double x60 = in_ptr[59];
      double x61 = in_ptr[60];
      double x62 = in_ptr[61];
      double x63 = in_ptr[62];
      double x64 = in_ptr[63];
      double x65 = in_ptr[64];
      double x66 = in_ptr[65];
      double x67 = in_ptr[66];
      double x68 = in_ptr[67];
      double x69 = in_ptr[68];
      double x70 = in_ptr[69];
      double x71 = in_ptr[70];
      double x72 = in_ptr[71];
      double x73 = in_ptr[72];
      double x74 = in_ptr[73];
      double x75 = in_ptr[74];
      double x76 = in_ptr[75];
      double x77 = in_ptr[76];
      double x78 = in_ptr[77];
      double x79 = in_ptr[78];
      double x80 = in_ptr[79];
      double x81 = in_ptr[80];
      double x82 = in_ptr[81];
      double x83 = in_ptr[82];
      double x84 = in_ptr[83];
      double x85 = in_ptr[84];
      double x86 = in_ptr[85];
      double x87 = in_ptr[86];
      double x88 = in_ptr[87];
      double x89 = in_ptr[88];
      double x90 = in_ptr[89];
      double x91 = in_ptr[90];
      double x92 = in_ptr[91];
      double x93 = in_ptr[92];
      double x94 = in_ptr[93];
      double x95 = in_ptr[94];
      double x96 = in_ptr[95];
      double x97 = in_ptr[96];
      double x98 = in_ptr[97];
      double x99 = in_ptr[98];
      double x100 = in_ptr[99];
      double x101 = in_ptr[100];
      double x102 = in_ptr[101];
      double x103 = in_ptr[102];
      double x104 = in_ptr[103];
      double x105 = in_ptr[104];
      double x106 = in_ptr[105];
      double x107 = in_ptr[106];
      double x108 = in_ptr[107];
      double x109 = in_ptr[108];
      double x110 = in_ptr[109];
      double x111 = in_ptr[110];
      double x112 = in_ptr[111];
      double x113 = in_ptr[112];
      double x114 = in_ptr[113];
      double x115 = in_ptr[114];
      double x116 = in_ptr[115];
      double x117 = in_ptr[116];
      double x118 = in_ptr[117];
      double x119 = in_ptr[118];
      double x120 = in_ptr[119];
      double x121 = in_ptr[120];
      double x122 = in_ptr[121];
      double x123 = in_ptr[122];
      double x124 = in_ptr[123];
      double x125 = in_ptr[124];
      double x126 = in_ptr[125];
      double x127 = in_ptr[126];
      double x128 = in_ptr[127];
      double x129 = in_ptr[128];
      double x130 = in_ptr[129];
      double x131 = in_ptr[130];
      double x132 = in_ptr[131];
      double x133 = in_ptr[132];
      double x134 = in_ptr[133];
      double x135 = in_ptr[134];
      double x136 = in_ptr[135];
      double x137 = in_ptr[136];
      double x138 = in_ptr[137];
      double x139 = in_ptr[138];
      double x140 = in_ptr[139];
      double x141 = in_ptr[140];
      double x142 = in_ptr[141];
      double x143 = in_ptr[142];
      double x144 = in_ptr[143];
      double x145 = in_ptr[144];
      double x146 = in_ptr[145];
      double x147 = in_ptr[146];
      double x148 = in_ptr[147];
      double x149 = in_ptr[148];
      double x150 = in_ptr[149];
      double data1 = data_ptr[0];
      double data2 = data_ptr[1];
      double data3 = data_ptr[2];
      double data4 = data_ptr[3];
      double data5 = data_ptr[4];
      double t3 = data1-x26;
      double t102 = exp(x77);
      double t2 = t3*x78+t102*(data2-x27);
      double t5 = data1-x28;
      double t103 = exp(x80);
      double t4 = t5*x81+t103*(data2-x29);
      double t7 = data1-x30;
      double t104 = exp(x83);
      double t6 = t7*x84+t104*(data2-x31);
      double t9 = data1-x32;
      double t105 = exp(x86);
      double t8 = t9*x87+t105*(data2-x33);
      double t11 = data1-x34;
      double t106 = exp(x89);
      double t10 = t11*x90+t106*(data2-x35);
      double t13 = data1-x36;
      double t107 = exp(x92);
      double t12 = t13*x93+t107*(data2-x37);
      double t15 = data1-x38;
      double t108 = exp(x95);
      double t14 = t15*x96+t108*(data2-x39);
      double t17 = data1-x40;
      double t109 = exp(x98);
      double t16 = t17*x99+t109*(data2-x41);
      double t19 = data1-x42;
      double t110 = exp(x101);
      double t18 = t19*x102+t110*(data2-x43);
      double t21 = data1-x44;
      double t111 = exp(x104);
      double t20 = t21*x105+t111*(data2-x45);
      double t23 = data1-x46;
      double t112 = exp(x107);
      double t22 = t23*x108+t112*(data2-x47);
      double t25 = data1-x48;
      double t113 = exp(x110);
      double t24 = t25*x111+t113*(data2-x49);
      double t27 = data1-x50;
      double t114 = exp(x113);
      double t26 = t27*x114+t114*(data2-x51);
      double t29 = data1-x52;
      double t115 = exp(x116);
      double t28 = t29*x117+t115*(data2-x53);
      double t31 = data1-x54;
      double t116 = exp(x119);
      double t30 = t31*x120+t116*(data2-x55);
      double t33 = data1-x56;
      double t117 = exp(x122);
      double t32 = t33*x123+t117*(data2-x57);
      double t35 = data1-x58;
      double t118 = exp(x125);
      double t34 = t35*x126+t118*(data2-x59);
      double t37 = data1-x60;
      double t119 = exp(x128);
      double t36 = t37*x129+t119*(data2-x61);
      double t39 = data1-x62;
      double t120 = exp(x131);
      double t38 = t39*x132+t120*(data2-x63);
      double t41 = data1-x64;
      double t121 = exp(x134);
      double t40 = t41*x135+t121*(data2-x65);
      double t43 = data1-x66;
      double t122 = exp(x137);
      double t42 = t43*x138+t122*(data2-x67);
      double t45 = data1-x68;
      double t123 = exp(x140);
      double t44 = t45*x141+t123*(data2-x69);
      double t47 = data1-x70;
      double t124 = exp(x143);
      double t46 = t47*x144+t124*(data2-x71);
      double t49 = data1-x72;
      double t125 = exp(x146);
      double t48 = t49*x147+t125*(data2-x73);
      double t51 = data1-x74;
      double t126 = exp(x149);
      double t50 = t51*x150+t126*(data2-x75);
      double t52 = x76*2.0;
      double t53 = exp(t52);
      double t54 = x79*2.0;
      double t55 = exp(t54);
      double t56 = x82*2.0;
      double t57 = exp(t56);
      double t58 = x85*2.0;
      double t59 = exp(t58);
      double t60 = x88*2.0;
      double t61 = exp(t60);
      double t62 = x91*2.0;
      double t63 = exp(t62);
      double t64 = x94*2.0;
      double t65 = exp(t64);
      double t66 = x97*2.0;
      double t67 = exp(t66);
      double t68 = x100*2.0;
      double t69 = exp(t68);
      double t70 = x103*2.0;
      double t71 = exp(t70);
      double t72 = x106*2.0;
      double t73 = exp(t72);
      double t74 = x109*2.0;
      double t75 = exp(t74);
      double t76 = x112*2.0;
      double t77 = exp(t76);
      double t78 = x115*2.0;
      double t79 = exp(t78);
      double t80 = x118*2.0;
      double t81 = exp(t80);
      double t82 = x121*2.0;
      double t83 = exp(t82);
      double t84 = x124*2.0;
      double t85 = exp(t84);
      double t86 = x127*2.0;
      double t87 = exp(t86);
      double t88 = x130*2.0;
      double t89 = exp(t88);
      double t90 = x133*2.0;
      double t91 = exp(t90);
      double t92 = x136*2.0;
      double t93 = exp(t92);
      double t94 = x139*2.0;
      double t95 = exp(t94);
      double t96 = x142*2.0;
      double t97 = exp(t96);
      double t98 = x145*2.0;
      double t99 = exp(t98);
      double t100 = x148*2.0;
      double t101 = exp(t100);
      out_ptr[0] = data3-log(exp(x1)+exp(x2)+exp(x3)+exp(x4)+exp(x5)+exp(x6)+exp(x7)+exp(x8)+exp(x9)+exp(x10)+exp(x11)+exp(x12)+exp(x13)+exp(x14)+exp(x15)+exp(x16)+exp(x17)+exp(x18)+exp(x19)+exp(x20)+exp(x21)+exp(x22)+exp(x23)+exp(x24)+exp(x25))+log(exp(-data3+x1+x76+x77-(t3*t3)*t53*(1.0/2.0)-(t2*t2)*(1.0/2.0))+exp(-data3+x2+x79+x80-(t5*t5)*t55*(1.0/2.0)-(t4*t4)*(1.0/2.0))+exp(-data3+x3+x82+x83-(t7*t7)*t57*(1.0/2.0)-(t6*t6)*(1.0/2.0))+exp(-data3+x4+x85+x86-(t9*t9)*t59*(1.0/2.0)-(t8*t8)*(1.0/2.0))+exp(-data3+x5+x88+x89-(t11*t11)*t61*(1.0/2.0)-(t10*t10)*(1.0/2.0))+exp(-data3+x6+x91+x92-(t13*t13)*t63*(1.0/2.0)-(t12*t12)*(1.0/2.0))+exp(-data3+x7+x94+x95-(t15*t15)*t65*(1.0/2.0)-(t14*t14)*(1.0/2.0))+exp(-data3+x8+x97+x98-(t17*t17)*t67*(1.0/2.0)-(t16*t16)*(1.0/2.0))+exp(-data3+x9+x100+x101-(t19*t19)*t69*(1.0/2.0)-(t18*t18)*(1.0/2.0))+exp(-data3+x10+x103+x104-(t21*t21)*t71*(1.0/2.0)-(t20*t20)*(1.0/2.0))+exp(-data3+x11+x106+x107-(t23*t23)*t73*(1.0/2.0)-(t22*t22)*(1.0/2.0))+exp(-data3+x12+x109+x110-(t25*t25)*t75*(1.0/2.0)-(t24*t24)*(1.0/2.0))+exp(-data3+x13+x112+x113-(t27*t27)*t77*(1.0/2.0)-(t26*t26)*(1.0/2.0))+exp(-data3+x14+x115+x116-(t29*t29)*t79*(1.0/2.0)-(t28*t28)*(1.0/2.0))+exp(-data3+x15+x118+x119-(t31*t31)*t81*(1.0/2.0)-(t30*t30)*(1.0/2.0))+exp(-data3+x16+x121+x122-(t33*t33)*t83*(1.0/2.0)-(t32*t32)*(1.0/2.0))+exp(-data3+x17+x124+x125-(t35*t35)*t85*(1.0/2.0)-(t34*t34)*(1.0/2.0))+exp(-data3+x18+x127+x128-(t37*t37)*t87*(1.0/2.0)-(t36*t36)*(1.0/2.0))+exp(-data3+x19+x130+x131-(t39*t39)*t89*(1.0/2.0)-(t38*t38)*(1.0/2.0))+exp(-data3+x20+x133+x134-(t41*t41)*t91*(1.0/2.0)-(t40*t40)*(1.0/2.0))+exp(-data3+x21+x136+x137-(t43*t43)*t93*(1.0/2.0)-(t42*t42)*(1.0/2.0))+exp(-data3+x22+x139+x140-(t45*t45)*t95*(1.0/2.0)-(t44*t44)*(1.0/2.0))+exp(-data3+x23+x142+x143-(t47*t47)*t97*(1.0/2.0)-(t46*t46)*(1.0/2.0))+exp(-data3+x24+x145+x146-(t49*t49)*t99*(1.0/2.0)-(t48*t48)*(1.0/2.0))+exp(-data3+x25+x148+x149-(t51*t51)*t101*(1.0/2.0)-(t50*t50)*(1.0/2.0)))-data5*(t102+exp(x76))-data5*(t103+exp(x79))-data5*(t104+exp(x82))-data5*(t105+exp(x85))-data5*(t106+exp(x88))-data5*(t107+exp(x91))-data5*(t108+exp(x94))-data5*(t109+exp(x97))-data5*(t110+exp(x100))-data5*(t111+exp(x103))-data5*(t112+exp(x106))-data5*(t113+exp(x109))-data5*(t114+exp(x112))-data5*(t115+exp(x115))-data5*(t116+exp(x118))-data5*(t117+exp(x121))-data5*(t118+exp(x124))-data5*(t119+exp(x127))-data5*(t120+exp(x130))-data5*(t121+exp(x133))-data5*(t122+exp(x136))-data5*(t123+exp(x139))-data5*(t124+exp(x142))-data5*(t125+exp(x145))-data5*(t126+exp(x148))+data4*(t53+exp(x77*2.0)+x78*x78)+data4*(t55+exp(x80*2.0)+x81*x81)+data4*(t57+exp(x83*2.0)+x84*x84)+data4*(t59+exp(x86*2.0)+x87*x87)+data4*(t61+exp(x89*2.0)+x90*x90)+data4*(t63+exp(x92*2.0)+x93*x93)+data4*(t65+exp(x95*2.0)+x96*x96)+data4*(t67+exp(x98*2.0)+x99*x99)+data4*(t69+exp(x101*2.0)+x102*x102)+data4*(t71+exp(x104*2.0)+x105*x105)+data4*(t73+exp(x107*2.0)+x108*x108)+data4*(t75+exp(x110*2.0)+x111*x111)+data4*(t77+exp(x113*2.0)+x114*x114)+data4*(t79+exp(x116*2.0)+x117*x117)+data4*(t81+exp(x119*2.0)+x120*x120)+data4*(t83+exp(x122*2.0)+x123*x123)+data4*(t85+exp(x125*2.0)+x126*x126)+data4*(t87+exp(x128*2.0)+x129*x129)+data4*(t89+exp(x131*2.0)+x132*x132)+data4*(t91+exp(x134*2.0)+x135*x135)+data4*(t93+exp(x137*2.0)+x138*x138)+data4*(t95+exp(x140*2.0)+x141*x141)+data4*(t97+exp(x143*2.0)+x144*x144)+data4*(t99+exp(x146*2.0)+x147*x147)+data4*(t101+exp(x149*2.0)+x150*x150);
  
  #line 48 "au_autodiff_generate_template.cpp"
          }
      }
      
      outs[0] = out;
  }
  