Skip to content

Instantly share code, notes, and snippets.

@jgillis
Last active April 25, 2024 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgillis/dc2b07b6ff48614a8035676761cfac6a to your computer and use it in GitHub Desktop.
Save jgillis/dc2b07b6ff48614a8035676761cfac6a to your computer and use it in GitHub Desktop.
/* This file was automatically generated by CasADi 3.6.5+.
* It consists of:
* 1) content generated by CasADi runtime: not copyrighted
* 2) template code copied from CasADi source: permissively licensed (MIT-0)
* 3) user code: owned by the user
*
*/
#ifdef __cplusplus
extern "C" {
#endif
/* How to prefix internal symbols */
#ifdef CASADI_CODEGEN_PREFIX
#define CASADI_NAMESPACE_CONCAT(NS, ID) _CASADI_NAMESPACE_CONCAT(NS, ID)
#define _CASADI_NAMESPACE_CONCAT(NS, ID) NS ## ID
#define CASADI_PREFIX(ID) CASADI_NAMESPACE_CONCAT(CODEGEN_PREFIX, ID)
#else
#define CASADI_PREFIX(ID) F_ ## ID
#endif
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <coin-or/IpStdCInterface.h>
#ifndef casadi_real
#define casadi_real double
#endif
#ifndef casadi_int
#define casadi_int long long int
#endif
#ifndef CASADI_MAX_NUM_THREADS
#define CASADI_MAX_NUM_THREADS 1
#endif
/* Add prefix to internal symbols */
#define casadi_clear CASADI_PREFIX(clear)
#define casadi_copy CASADI_PREFIX(copy)
#define casadi_densify CASADI_PREFIX(densify)
#define casadi_dot CASADI_PREFIX(dot)
#define casadi_f0 CASADI_PREFIX(f0)
#define casadi_f1 CASADI_PREFIX(f1)
#define casadi_f10 CASADI_PREFIX(f10)
#define casadi_f11 CASADI_PREFIX(f11)
#define casadi_f12 CASADI_PREFIX(f12)
#define casadi_f13 CASADI_PREFIX(f13)
#define casadi_f14 CASADI_PREFIX(f14)
#define casadi_f15 CASADI_PREFIX(f15)
#define casadi_f16 CASADI_PREFIX(f16)
#define casadi_f17 CASADI_PREFIX(f17)
#define casadi_f18 CASADI_PREFIX(f18)
#define casadi_f19 CASADI_PREFIX(f19)
#define casadi_f1_alloc_mem CASADI_PREFIX(f1_alloc_mem)
#define casadi_f1_init_mem CASADI_PREFIX(f1_init_mem)
#define casadi_f1_mem CASADI_PREFIX(f1_mem)
#define casadi_f1_mem_counter CASADI_PREFIX(f1_mem_counter)
#define casadi_f1_unused_stack CASADI_PREFIX(f1_unused_stack)
#define casadi_f1_unused_stack_counter CASADI_PREFIX(f1_unused_stack_counter)
#define casadi_f2 CASADI_PREFIX(f2)
#define casadi_f20 CASADI_PREFIX(f20)
#define casadi_f21 CASADI_PREFIX(f21)
#define casadi_f3 CASADI_PREFIX(f3)
#define casadi_f4 CASADI_PREFIX(f4)
#define casadi_f5 CASADI_PREFIX(f5)
#define casadi_f6 CASADI_PREFIX(f6)
#define casadi_f7 CASADI_PREFIX(f7)
#define casadi_f8 CASADI_PREFIX(f8)
#define casadi_f9 CASADI_PREFIX(f9)
#define casadi_fabs CASADI_PREFIX(fabs)
#define casadi_fill CASADI_PREFIX(fill)
#define casadi_fmax CASADI_PREFIX(fmax)
#define casadi_ipopt_data CASADI_PREFIX(ipopt_data)
#define casadi_ipopt_free_mem CASADI_PREFIX(ipopt_free_mem)
#define casadi_ipopt_hess_l_empty CASADI_PREFIX(ipopt_hess_l_empty)
#define casadi_ipopt_init CASADI_PREFIX(ipopt_init)
#define casadi_ipopt_init_mem CASADI_PREFIX(ipopt_init_mem)
#define casadi_ipopt_presolve CASADI_PREFIX(ipopt_presolve)
#define casadi_ipopt_setup CASADI_PREFIX(ipopt_setup)
#define casadi_ipopt_solve CASADI_PREFIX(ipopt_solve)
#define casadi_ipopt_sparsity CASADI_PREFIX(ipopt_sparsity)
#define casadi_ipopt_work CASADI_PREFIX(ipopt_work)
#define casadi_nlp_f0 CASADI_PREFIX(nlp_f0)
#define casadi_nlp_g0 CASADI_PREFIX(nlp_g0)
#define casadi_nlp_grad_f0 CASADI_PREFIX(nlp_grad_f0)
#define casadi_nlp_hess_l0 CASADI_PREFIX(nlp_hess_l0)
#define casadi_nlp_jac_g0 CASADI_PREFIX(nlp_jac_g0)
#define casadi_nlpsol_data CASADI_PREFIX(nlpsol_data)
#define casadi_nlpsol_detect_bounds_after CASADI_PREFIX(nlpsol_detect_bounds_after)
#define casadi_nlpsol_detect_bounds_before CASADI_PREFIX(nlpsol_detect_bounds_before)
#define casadi_nlpsol_detect_bounds_data CASADI_PREFIX(nlpsol_detect_bounds_data)
#define casadi_nlpsol_detect_bounds_prob CASADI_PREFIX(nlpsol_detect_bounds_prob)
#define casadi_nlpsol_init CASADI_PREFIX(nlpsol_init)
#define casadi_nlpsol_prob CASADI_PREFIX(nlpsol_prob)
#define casadi_nlpsol_work CASADI_PREFIX(nlpsol_work)
#define casadi_oracle_data CASADI_PREFIX(oracle_data)
#define casadi_oracle_init CASADI_PREFIX(oracle_init)
#define casadi_s0 CASADI_PREFIX(s0)
#define casadi_s1 CASADI_PREFIX(s1)
#define casadi_s10 CASADI_PREFIX(s10)
#define casadi_s11 CASADI_PREFIX(s11)
#define casadi_s12 CASADI_PREFIX(s12)
#define casadi_s13 CASADI_PREFIX(s13)
#define casadi_s14 CASADI_PREFIX(s14)
#define casadi_s2 CASADI_PREFIX(s2)
#define casadi_s3 CASADI_PREFIX(s3)
#define casadi_s4 CASADI_PREFIX(s4)
#define casadi_s5 CASADI_PREFIX(s5)
#define casadi_s6 CASADI_PREFIX(s6)
#define casadi_s7 CASADI_PREFIX(s7)
#define casadi_s8 CASADI_PREFIX(s8)
#define casadi_s9 CASADI_PREFIX(s9)
#define casadi_scal CASADI_PREFIX(scal)
#define casadi_sq CASADI_PREFIX(sq)
#define casadi_trans CASADI_PREFIX(trans)
/* Symbol visibility in DLLs */
#ifndef CASADI_SYMBOL_EXPORT
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#if defined(STATIC_LINKED)
#define CASADI_SYMBOL_EXPORT
#else
#define CASADI_SYMBOL_EXPORT __declspec(dllexport)
#endif
#elif defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#define CASADI_SYMBOL_EXPORT __attribute__ ((visibility ("default")))
#else
#define CASADI_SYMBOL_EXPORT
#endif
#endif
void casadi_fill(casadi_real* x, casadi_int n, casadi_real alpha) {
casadi_int i;
if (x) {
for (i=0; i<n; ++i) *x++ = alpha;
}
}
casadi_real casadi_fabs(casadi_real x) {
/* Pre-c99 compatibility */
#if __STDC_VERSION__ < 199901L
return x>0 ? x : -x;
#else
return fabs(x);
#endif
}
void casadi_copy(const casadi_real* x, casadi_int n, casadi_real* y) {
casadi_int i;
if (y) {
if (x) {
for (i=0; i<n; ++i) *y++ = *x++;
} else {
for (i=0; i<n; ++i) *y++ = 0.;
}
}
}
casadi_real casadi_sq(casadi_real x) { return x*x;}
casadi_real casadi_dot(casadi_int n, const casadi_real* x, const casadi_real* y) {
casadi_int i;
casadi_real r = 0;
for (i=0; i<n; ++i) r += *x++ * *y++;
return r;
}
void casadi_clear(casadi_real* x, casadi_int n) {
casadi_int i;
if (x) {
for (i=0; i<n; ++i) *x++ = 0;
}
}
struct casadi_oracle_data {
const casadi_real** arg;
casadi_real** res;
casadi_int* iw;
casadi_real* w;
void* m;
};
void casadi_oracle_init(struct casadi_oracle_data* d, const casadi_real*** arg, casadi_real*** res,
casadi_int** iw, casadi_real** w) {
d->arg = *arg;
d->res = *res;
d->iw = *iw;
d->w = *w;
}
struct casadi_nlpsol_detect_bounds_prob {
casadi_int sz_arg;
casadi_int sz_res;
casadi_int sz_iw;
casadi_int sz_w;
casadi_int ng;
casadi_int nb;
const casadi_int *target_x;
const casadi_int *target_g;
const char *is_simple;
int (*callback)(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, void* callback_data);
void* callback_data;
};
struct casadi_nlpsol_prob {
casadi_int nx, ng, np;
struct casadi_nlpsol_detect_bounds_prob detect_bounds;
};
struct casadi_nlpsol_detect_bounds_data {
const casadi_real** arg;
casadi_real** res;
casadi_int* iw;
casadi_real* w;
casadi_real* a;
casadi_real* b;
casadi_int* target_l;
casadi_int* target_u;
casadi_real* lam_xl;
casadi_real* lam_xu;
};
struct casadi_nlpsol_data {
const struct casadi_nlpsol_prob* prob;
struct casadi_oracle_data* oracle;
casadi_real *lbz, *ubz;
casadi_real *z;
casadi_real *lam;
casadi_real objective;
const casadi_real *p, *lbx, *ubx, *lbg, *ubg, *x0, *lam_x0, *lam_g0;
casadi_real *f, *x, *g, *lam_x, *lam_g, *lam_p;
struct casadi_nlpsol_detect_bounds_data detect_bounds;
};
void casadi_nlpsol_work(const struct casadi_nlpsol_prob* p, casadi_int* sz_arg, casadi_int* sz_res,
casadi_int* sz_iw, casadi_int* sz_w) {
*sz_arg = *sz_res = 0;
*sz_w = *sz_iw = 0;
*sz_w += p->nx + p->ng;
*sz_w += p->nx + p->ng;
*sz_w += p->nx + p->ng;
*sz_w += p->nx + p->ng;
if (p->detect_bounds.ng) {
*sz_arg += p->detect_bounds.sz_arg;
*sz_res += p->detect_bounds.sz_res;
*sz_iw += p->detect_bounds.sz_iw;
*sz_w += p->detect_bounds.sz_w;
*sz_w += p->detect_bounds.nb;
*sz_w += p->detect_bounds.nb;
*sz_iw += p->nx;
*sz_iw += p->nx;
*sz_w += p->nx;
*sz_w += p->nx;
}
}
void casadi_nlpsol_init(struct casadi_nlpsol_data* d, const casadi_real*** arg, casadi_real*** res,
casadi_int** iw, casadi_real** w) {
casadi_int nx, ng;
const struct casadi_nlpsol_prob* p = d->prob;
nx = p->nx;
ng = p->ng;
d->z = *w; *w += nx + ng;
d->lbz = *w; *w += nx + ng;
d->ubz = *w; *w += nx + ng;
d->lam = *w; *w += nx + ng;
if (p->detect_bounds.ng) {
d->detect_bounds.arg = *arg; *arg += p->detect_bounds.sz_arg;
d->detect_bounds.res = *res; *res += p->detect_bounds.sz_res;
d->detect_bounds.iw = *iw; *iw += p->detect_bounds.sz_iw;
d->detect_bounds.w = *w; *w += p->detect_bounds.sz_w;
d->detect_bounds.a = *w; *w += p->detect_bounds.nb;
d->detect_bounds.b = *w; *w += p->detect_bounds.nb;
d->detect_bounds.target_l = *iw; *iw += p->nx;
d->detect_bounds.target_u = *iw; *iw += p->nx;
d->detect_bounds.lam_xl = *w; *w += nx;
d->detect_bounds.lam_xu = *w; *w += nx;
}
}
int casadi_detect_bounds_before(struct casadi_nlpsol_data* d_nlp) {
const struct casadi_nlpsol_prob* p_nlp = d_nlp->prob;
struct casadi_nlpsol_detect_bounds_data* d_bounds = &d_nlp->detect_bounds;
const struct casadi_nlpsol_detect_bounds_prob* p_bounds = &p_nlp->detect_bounds;
casadi_int nx = p_nlp->nx;
d_bounds->arg[0] = d_nlp->p;
d_bounds->res[0] = d_bounds->a;
d_bounds->res[1] = d_bounds->b;
p_bounds->callback(d_bounds->arg, d_bounds->res,
d_bounds->iw, d_bounds->w, p_bounds->callback_data);
for (casadi_int i=0;i<p_bounds->nb;++i) {
if (d_bounds->a[i]==0) {
casadi_int k = p_bounds->target_g[i];
if (d_nlp->lbg[k]>d_bounds->b[i]) return 1;
if (d_nlp->ubg[k]<d_bounds->b[i]) return 1;
}
}
casadi_real* lbz = d_nlp->lbz+nx;
casadi_real* ubz = d_nlp->ubz+nx;
casadi_real* lam = d_nlp->lam+nx;
for (casadi_int i=0;i<nx;++i) {
d_bounds->lam_xl[i] = d_nlp->lam_x0 ? (d_nlp->lam_x0[i]<0)*d_nlp->lam_x0[i] : 0.;
d_bounds->lam_xu[i] = d_nlp->lam_x0 ? (d_nlp->lam_x0[i]>0)*d_nlp->lam_x0[i] : 0.;
}
for (casadi_int i=0;i<nx;++i) {
d_bounds->target_l[i] = i;
d_bounds->target_u[i] = i;
}
casadi_int k=0;
for (casadi_int i=0;i<p_bounds->ng;++i) {
if (p_bounds->is_simple[i]) {
casadi_real lb = (d_nlp->lbg[i]-d_bounds->b[k])/casadi_fabs(d_bounds->a[k]);
casadi_real ub = (d_nlp->ubg[i]-d_bounds->b[k])/casadi_fabs(d_bounds->a[k]);
casadi_int j = p_bounds->target_x[k];
if (lb==d_nlp->lbz[j]) {
if (d_nlp->lam_g0) d_bounds->lam_xl[j] += (d_nlp->lam_g0[i]<0)*d_nlp->lam_g0[i];
} else if (lb>d_nlp->lbz[j]) {
d_nlp->lbz[j] = lb;
d_bounds->target_l[j] = nx+i;
if (d_nlp->lam_g0) d_bounds->lam_xl[j] = (d_nlp->lam_g0[i]<0)*d_nlp->lam_g0[i];
}
if (ub==d_nlp->ubz[j]) {
if (d_nlp->lam_g0) d_bounds->lam_xu[j] += (d_nlp->lam_g0[i]>0)*d_nlp->lam_g0[i];
} else if (ub<d_nlp->ubz[j]) {
d_nlp->ubz[j] = ub;
d_bounds->target_u[j] = nx+i;
if (d_nlp->lam_g0) d_bounds->lam_xu[j] = (d_nlp->lam_g0[i]>0)*d_nlp->lam_g0[i];
}
k++;
} else {
*lbz++ = d_nlp->lbg[i];
*ubz++ = d_nlp->ubg[i];
if (d_nlp->lam_g0) *lam++ = d_nlp->lam_g0[i];
}
}
for (casadi_int i=0;i<nx;++i) {
d_nlp->lam[i] = d_bounds->lam_xl[i]+d_bounds->lam_xu[i];
}
return 0;
}
int casadi_detect_bounds_after(struct casadi_nlpsol_data* d_nlp) {
const struct casadi_nlpsol_prob* p_nlp = d_nlp->prob;
struct casadi_nlpsol_detect_bounds_data* d_bounds = &d_nlp->detect_bounds;
const struct casadi_nlpsol_detect_bounds_prob* p_bounds = &p_nlp->detect_bounds;
casadi_int nx = p_nlp->nx;
casadi_fill(d_nlp->lam_x, nx, 0.);
casadi_fill(d_nlp->lam_g, p_bounds->ng, 0.);
casadi_int k = 0;
casadi_int k_normal = 0;
for (casadi_int i=0;i<p_bounds->ng;++i) {
if (p_bounds->is_simple[i]) {
casadi_int j = p_bounds->target_x[k];
if (d_nlp->g) d_nlp->g[i] = d_bounds->a[k]*d_nlp->z[j]+d_bounds->b[k];
k++;
} else {
if (d_nlp->g) d_nlp->g[i] = d_nlp->z[nx+k_normal];
if (d_nlp->lam_g) d_nlp->lam_g[i] = d_nlp->lam[nx+k_normal];
k_normal++;
}
}
for (casadi_int i=0;i<nx;++i) {
if (d_bounds->target_l[i]<nx) {
if (d_nlp->lam_x) d_nlp->lam_x[i] += (d_nlp->lam[i]<0)*d_nlp->lam[i];
} else {
if (d_nlp->lam_g)
d_nlp->lam_g[d_bounds->target_l[i]-nx] += (d_nlp->lam[i]<0)*d_nlp->lam[i];
}
if (d_bounds->target_u[i]<nx) {
if (d_nlp->lam_x) d_nlp->lam_x[i] += (d_nlp->lam[i]>0)*d_nlp->lam[i];
} else {
if (d_nlp->lam_g)
d_nlp->lam_g[d_bounds->target_u[i]-nx] += (d_nlp->lam[i]>0)*d_nlp->lam[i];
}
}
return 0;
}
casadi_real casadi_fmax(casadi_real x, casadi_real y) {
/* Pre-c99 compatibility */
#if __STDC_VERSION__ < 199901L
return x>y ? x : y;
#else
return fmax(x, y);
#endif
}
#define CASADI_CAST(x,y) ((x) y)
void casadi_densify(const casadi_real* x, const casadi_int* sp_x, casadi_real* y, casadi_int tr) {
casadi_int nrow_x, ncol_x, i, el;
const casadi_int *colind_x, *row_x;
if (!y) return;
nrow_x = sp_x[0]; ncol_x = sp_x[1];
colind_x = sp_x+2; row_x = sp_x+ncol_x+3;
casadi_clear(y, nrow_x*ncol_x);
if (!x) return;
if (tr) {
for (i=0; i<ncol_x; ++i) {
for (el=colind_x[i]; el!=colind_x[i+1]; ++el) {
y[i + row_x[el]*ncol_x] = CASADI_CAST(casadi_real, *x++);
}
}
} else {
for (i=0; i<ncol_x; ++i) {
for (el=colind_x[i]; el!=colind_x[i+1]; ++el) {
y[row_x[el]] = CASADI_CAST(casadi_real, *x++);
}
y += nrow_x;
}
}
}
void casadi_trans(const casadi_real* x, const casadi_int* sp_x, casadi_real* y,
const casadi_int* sp_y, casadi_int* tmp) {
casadi_int ncol_x, nnz_x, ncol_y, k;
const casadi_int* row_x, *colind_y;
ncol_x = sp_x[1];
nnz_x = sp_x[2 + ncol_x];
row_x = sp_x + 2 + ncol_x+1;
ncol_y = sp_y[1];
colind_y = sp_y+2;
for (k=0; k<ncol_y; ++k) tmp[k] = colind_y[k];
for (k=0; k<nnz_x; ++k) {
y[tmp[row_x[k]]++] = x[k];
}
}
struct casadi_ipopt_prob {
const struct casadi_nlpsol_prob* nlp;
const casadi_int *sp_h, *sp_a;
casadi_int nnz_h, nnz_a;
Eval_F_CB eval_f;
Eval_G_CB eval_g;
Eval_Grad_F_CB eval_grad_f;
Eval_Jac_G_CB eval_jac_g;
Eval_H_CB eval_h;
};
void casadi_ipopt_setup(struct casadi_ipopt_prob* p) {
if (p->sp_h) {
p->nnz_h = p->sp_h[2+p->sp_h[1]];
} else {
p->nnz_h = 0;
}
p->nnz_a = p->sp_a[2+p->sp_a[1]];
}
struct casadi_ipopt_data {
const struct casadi_ipopt_prob* prob;
struct casadi_nlpsol_data* nlp;
IpoptProblem ipopt;
const casadi_real** arg;
casadi_real** res;
casadi_int* iw;
casadi_real* w;
casadi_real *z_L, *z_U;
enum ApplicationReturnStatus status;
int unified_return_status;
int success;
};
int ipopt_init_mem(struct casadi_ipopt_data* d) {
return 0;
}
void ipopt_free_mem(struct casadi_ipopt_data* d) {
}
void casadi_ipopt_work(const struct casadi_ipopt_prob* p, casadi_int* sz_arg, casadi_int* sz_res, casadi_int* sz_iw, casadi_int* sz_w) {
casadi_nlpsol_work(p->nlp, sz_arg, sz_res, sz_iw, sz_w);
*sz_w += p->nlp->nx;
*sz_w += p->nlp->nx;
}
void casadi_ipopt_init(struct casadi_ipopt_data* d, const casadi_real*** arg, casadi_real*** res, casadi_int** iw, casadi_real** w) {
const struct casadi_ipopt_prob* p = d->prob;
const struct casadi_nlpsol_prob* p_nlp = p->nlp;
d->z_L = *w; *w += p_nlp->nx;
d->z_U = *w; *w += p_nlp->nx;
d->arg = *arg;
d->res = *res;
d->iw = *iw;
d->w = *w;
}
void casadi_ipopt_presolve(struct casadi_ipopt_data* d) {
const struct casadi_ipopt_prob* p = d->prob;
const struct casadi_nlpsol_prob* p_nlp = p->nlp;
const struct casadi_nlpsol_data* d_nlp = d->nlp;
d->ipopt = CreateIpoptProblem(
p_nlp->nx, (double *) d_nlp->lbz, (double *) d_nlp->ubz,
p_nlp->ng, (double *) d_nlp->lbz+p_nlp->nx,
(double *) d_nlp->ubz+p_nlp->nx,
p->nnz_a, p->nnz_h, 0,
p->eval_f, p->eval_g, p->eval_grad_f,
p->eval_jac_g, p->eval_h);
}
void casadi_ipopt_solve(struct casadi_ipopt_data* d) {
const struct casadi_ipopt_prob* p = d->prob;
const struct casadi_nlpsol_prob* p_nlp = p->nlp;
struct casadi_nlpsol_data* d_nlp = d->nlp;
d->unified_return_status = 1;
for (casadi_int i=0; i<p_nlp->nx; ++i) {
d->z_L[i] = casadi_fmax(0., -d_nlp->lam[i]);
d->z_U[i] = casadi_fmax(0., d_nlp->lam[i]);
}
d->status = IpoptSolve(d->ipopt, d_nlp->z, d_nlp->z + p_nlp->nx, &d_nlp->objective, d_nlp->lam+p_nlp->nx, d->z_L, d->z_U, d);
for (casadi_int i=0; i<p_nlp->nx; ++i) {
d_nlp->lam[i] = d->z_U[i]-d->z_L[i];
}
FreeIpoptProblem(d->ipopt);
if (d->status==Solve_Succeeded ||
d->status==Solved_To_Acceptable_Level ||
d->status==Feasible_Point_Found) {
d->unified_return_status = 0;
} else if (d->status==Maximum_Iterations_Exceeded) {
d->unified_return_status = 2;
}
#if (IPOPT_VERSION_MAJOR > 3) || (IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR >= 14)
if (d->status==Maximum_WallTime_Exceeded) d->unified_return_status = 2;
#endif
d->success = (d->unified_return_status == 0);
}
void casadi_ipopt_sparsity(const casadi_int* sp, ipindex *iRow, ipindex *jCol) {
casadi_int ncol = sp[1];
const casadi_int* colind = sp+2;
const casadi_int* row = colind+ncol+1;
for (casadi_int cc=0; cc<ncol; ++cc) {
for (casadi_int el=colind[cc]; el<colind[cc+1]; ++el) {
*iRow++ = row[el];
*jCol++ = cc;
}
}
}
bool casadi_ipopt_hess_l_empty(ipindex n, ipnumber *x, bool new_x, ipnumber obj_factor, ipindex m, ipnumber *lambda, bool new_lambda, ipindex nele_hess, ipindex *iRow, ipindex *jCol, ipnumber *values, UserDataPtr user_data) {
return false;
}
void casadi_scal(casadi_int n, casadi_real alpha, casadi_real* x) {
casadi_int i;
if (!x) return;
for (i=0; i<n; ++i) *x++ *= alpha;
}
static int casadi_f1_mem_counter = 0;
static int casadi_f1_unused_stack_counter = -1;
static int casadi_f1_unused_stack[CASADI_MAX_NUM_THREADS];
static struct casadi_ipopt_data casadi_f1_mem[CASADI_MAX_NUM_THREADS];
#ifndef casadi_inf
#define casadi_inf INFINITY
#endif
#ifndef CASADI_PRINTF
#define CASADI_PRINTF printf
#ifndef CASADI_SNPRINTF
#define CASADI_SNPRINTF snprintf
#endif
#endif
static const casadi_int casadi_s0[35] = {32, 1, 0, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
static const casadi_int casadi_s1[8] = {2, 3, 0, 1, 2, 2, 0, 1};
static const casadi_int casadi_s2[7] = {1, 3, 0, 0, 0, 1, 0};
static const casadi_int casadi_s3[8] = {2, 3, 0, 0, 1, 2, 0, 1};
static const casadi_int casadi_s4[7] = {1, 3, 0, 1, 1, 1, 0};
static const casadi_int casadi_s5[30] = {0, 4, 8, 13, 17, 20, 23, 27, 30, 33, 37, 40, 43, 47, 50, 53, 57, 60, 63, 67, 70, 73, 77, 80, 83, 87, 90, 93, 97, 100};
static const casadi_int casadi_s6[22] = {1, 5, 9, 14, 21, 25, 29, 34, 41, 45, 49, 54, 61, 65, 69, 74, 81, 85, 89, 94, 98, 101};
static const casadi_int casadi_s7[15] = {2, 6, 10, 18, 22, 26, 38, 42, 46, 58, 62, 66, 78, 82, 86};
static const casadi_int casadi_s8[20] = {3, 11, 15, 19, 24, 31, 35, 39, 44, 51, 55, 59, 64, 71, 75, 79, 84, 91, 95, 99};
static const casadi_int casadi_s9[15] = {7, 12, 16, 28, 32, 36, 48, 52, 56, 68, 72, 76, 88, 92, 96};
static const casadi_int casadi_s10[137] = {42, 32, 0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59, 63, 66, 69, 73, 76, 79, 83, 86, 89, 93, 96, 99, 101, 102, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 5, 6, 7, 1, 5, 6, 5, 6, 8, 5, 9, 10, 11, 6, 9, 10, 9, 10, 12, 9, 13, 14, 15, 10, 13, 14, 13, 14, 16, 13, 17, 18, 19, 14, 17, 18, 17, 18, 20, 17, 21, 22, 23, 18, 21, 22, 21, 22, 24, 21, 25, 26, 27, 22, 25, 26, 25, 26, 28, 25, 29, 30, 31, 26, 29, 30, 29, 30, 32, 29, 33, 34, 35, 30, 33, 34, 33, 34, 36, 33, 37, 38, 39, 34, 37, 38, 37, 38, 40, 37, 41, 38};
static const casadi_int casadi_s11[147] = {32, 42, 0, 4, 8, 9, 10, 11, 15, 19, 20, 21, 25, 29, 30, 31, 35, 39, 40, 41, 45, 49, 50, 51, 55, 59, 60, 61, 65, 69, 70, 71, 75, 79, 80, 81, 85, 89, 90, 91, 95, 99, 100, 101, 102, 0, 1, 2, 3, 0, 1, 2, 4, 0, 1, 2, 3, 4, 5, 6, 3, 4, 5, 7, 3, 5, 6, 7, 8, 9, 6, 7, 8, 10, 6, 8, 9, 10, 11, 12, 9, 10, 11, 13, 9, 11, 12, 13, 14, 15, 12, 13, 14, 16, 12, 14, 15, 16, 17, 18, 15, 16, 17, 19, 15, 17, 18, 19, 20, 21, 18, 19, 20, 22, 18, 20, 21, 22, 23, 24, 21, 22, 23, 25, 21, 23, 24, 25, 26, 27, 24, 25, 26, 28, 24, 26, 27, 28, 29, 30, 27, 28, 29, 31, 27, 29, 30};
static const casadi_int casadi_s12[66] = {32, 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
static const casadi_int casadi_s13[5] = {1, 1, 0, 1, 0};
static const casadi_int casadi_s14[25] = {1, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/* ode:(x[2],u,z[0],p,t[1x1,0nz])->(ode[2],alg[0],quad[0]) */
static int casadi_f5(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real w0, w1, w2;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: @1 = input[0][1] */
w1 = arg[0] ? arg[0][1] : 0;
/* #2: @1 = (@0-@1) */
w1 = (w0-w1);
/* #3: @2 = input[1][0] */
w2 = arg[1] ? arg[1][0] : 0;
/* #4: @1 = (@1+@2) */
w1 += w2;
/* #5: @2 = input[3][0] */
w2 = arg[3] ? arg[3][0] : 0;
/* #6: @1 = (@1+@2) */
w1 += w2;
/* #7: output[0][0] = @1 */
if (res[0]) res[0][0] = w1;
/* #8: output[0][1] = @0 */
if (res[0]) res[0][1] = w0;
return 0;
}
/* F:(x0[2],u,t0,DT,DT_control,p,z0[0])->(xf[2],poly_coeff[2x5],qf[0],poly_coeff_q[0x4],zf[0],poly_coeff_z[]) */
static int casadi_f4(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+6, *rr;
const casadi_real **arg1=arg+7, *cr, *cs;
casadi_real *w0=w+3, w1, w2, w3, w5, *w7=w+9, w8, *w9=w+12, *w10=w+14, *w11=w+16, *w12=w+18, *w13=w+20;
/* #0: @0 = input[0][0] */
casadi_copy(arg[0], 2, w0);
/* #1: @1 = input[3][0] */
w1 = arg[3] ? arg[3][0] : 0;
/* #2: @2 = 6 */
w2 = 6.;
/* #3: @2 = (@1/@2) */
w2 = (w1/w2);
/* #4: @3 = input[1][0] */
w3 = arg[1] ? arg[1][0] : 0;
/* #5: @4 = 0x1 */
/* #6: @5 = input[5][0] */
w5 = arg[5] ? arg[5][0] : 0;
/* #7: @6 = 00 */
/* #8: {@7, NULL, NULL} = ode(@0, @3, @4, @5, @6) */
arg1[0]=w0;
arg1[1]=(&w3);
arg1[2]=0;
arg1[3]=(&w5);
arg1[4]=0;
res1[0]=w7;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #9: @8 = 2 */
w8 = 2.;
/* #10: @8 = (@1/@8) */
w8 = (w1/w8);
/* #11: @9 = (@8*@7) */
for (i=0, rr=w9, cs=w7; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #12: @9 = (@0+@9) */
for (i=0, rr=w9, cr=w0, cs=w9; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #13: @4 = 0x1 */
/* #14: @6 = 00 */
/* #15: {@10, NULL, NULL} = ode(@9, @3, @4, @5, @6) */
arg1[0]=w9;
arg1[1]=(&w3);
arg1[2]=0;
arg1[3]=(&w5);
arg1[4]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #16: @9 = (2.*@10) */
for (i=0, rr=w9, cs=w10; i<2; ++i) *rr++ = (2.* *cs++ );
/* #17: @9 = (@7+@9) */
for (i=0, rr=w9, cr=w7, cs=w9; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #18: @8 = 2 */
w8 = 2.;
/* #19: @8 = (@1/@8) */
w8 = (w1/w8);
/* #20: @11 = (@8*@10) */
for (i=0, rr=w11, cs=w10; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #21: @11 = (@0+@11) */
for (i=0, rr=w11, cr=w0, cs=w11; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #22: @4 = 0x1 */
/* #23: @6 = 00 */
/* #24: {@12, NULL, NULL} = ode(@11, @3, @4, @5, @6) */
arg1[0]=w11;
arg1[1]=(&w3);
arg1[2]=0;
arg1[3]=(&w5);
arg1[4]=0;
res1[0]=w12;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #25: @11 = (2.*@12) */
for (i=0, rr=w11, cs=w12; i<2; ++i) *rr++ = (2.* *cs++ );
/* #26: @9 = (@9+@11) */
for (i=0, rr=w9, cs=w11; i<2; ++i) (*rr++) += (*cs++);
/* #27: @11 = (@1*@12) */
for (i=0, rr=w11, cs=w12; i<2; ++i) (*rr++) = (w1*(*cs++));
/* #28: @11 = (@0+@11) */
for (i=0, rr=w11, cr=w0, cs=w11; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #29: @4 = 0x1 */
/* #30: @6 = 00 */
/* #31: {@13, NULL, NULL} = ode(@11, @3, @4, @5, @6) */
arg1[0]=w11;
arg1[1]=(&w3);
arg1[2]=0;
arg1[3]=(&w5);
arg1[4]=0;
res1[0]=w13;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #32: @9 = (@9+@13) */
for (i=0, rr=w9, cs=w13; i<2; ++i) (*rr++) += (*cs++);
/* #33: @9 = (@2*@9) */
for (i=0, rr=w9, cs=w9; i<2; ++i) (*rr++) = (w2*(*cs++));
/* #34: @9 = (@0+@9) */
for (i=0, rr=w9, cr=w0, cs=w9; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #35: output[0][0] = @9 */
casadi_copy(w9, 2, res[0]);
/* #36: output[1][0] = @0 */
casadi_copy(w0, 2, res[1]);
/* #37: output[1][1] = @7 */
if (res[1]) casadi_copy(w7, 2, res[1]+2);
/* #38: @2 = 2 */
w2 = 2.;
/* #39: @2 = (@2/@1) */
w2 /= w1;
/* #40: @0 = (@10-@7) */
for (i=0, rr=w0, cr=w10, cs=w7; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #41: @0 = (@2*@0) */
for (i=0, rr=w0, cs=w0; i<2; ++i) (*rr++) = (w2*(*cs++));
/* #42: @2 = 2 */
w2 = 2.;
/* #43: @0 = (@0/@2) */
for (i=0, rr=w0; i<2; ++i) (*rr++) /= w2;
/* #44: output[1][2] = @0 */
if (res[1]) casadi_copy(w0, 2, res[1]+4);
/* #45: @2 = 4 */
w2 = 4.;
/* #46: @3 = sq(@1) */
w3 = casadi_sq( w1 );
/* #47: @2 = (@2/@3) */
w2 /= w3;
/* #48: @10 = (@12-@10) */
for (i=0, rr=w10, cr=w12, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #49: @10 = (@2*@10) */
for (i=0, rr=w10, cs=w10; i<2; ++i) (*rr++) = (w2*(*cs++));
/* #50: @2 = 6 */
w2 = 6.;
/* #51: @10 = (@10/@2) */
for (i=0, rr=w10; i<2; ++i) (*rr++) /= w2;
/* #52: output[1][3] = @10 */
if (res[1]) casadi_copy(w10, 2, res[1]+6);
/* #53: @2 = 4 */
w2 = 4.;
/* #54: @12 = (2.*@12) */
for (i=0, rr=w12, cs=w12; i<2; ++i) *rr++ = (2.* *cs++ );
/* #55: @13 = (@13-@12) */
for (i=0, rr=w13, cs=w12; i<2; ++i) (*rr++) -= (*cs++);
/* #56: @13 = (@13+@7) */
for (i=0, rr=w13, cs=w7; i<2; ++i) (*rr++) += (*cs++);
/* #57: @13 = (@2*@13) */
for (i=0, rr=w13, cs=w13; i<2; ++i) (*rr++) = (w2*(*cs++));
/* #58: @2 = 3 */
w2 = 3.;
/* #59: @1 = pow(@1,@2) */
w1 = pow(w1,w2);
/* #60: @13 = (@13/@1) */
for (i=0, rr=w13; i<2; ++i) (*rr++) /= w1;
/* #61: @1 = 24 */
w1 = 24.;
/* #62: @13 = (@13/@1) */
for (i=0, rr=w13; i<2; ++i) (*rr++) /= w1;
/* #63: output[1][4] = @13 */
if (res[1]) casadi_copy(w13, 2, res[1]+8);
return 0;
}
/* F:(x0[2],u,T,t0,p,z0[0])->(xf[2],Xi[2x2],poly_coeff[2x5],qf[0],Qi[0],poly_coeff_q[0x4],zf[0],Zi[0],poly_coeff_z[]) */
static int casadi_f3(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real **res1=res+9;
const casadi_real **arg1=arg+6;
casadi_real *w0=w+22, w1, w2, w3, w4, *w6=w+28, *w7=w+30;
/* #0: @0 = input[0][0] */
casadi_copy(arg[0], 2, w0);
/* #1: @1 = input[1][0] */
w1 = arg[1] ? arg[1][0] : 0;
/* #2: @2 = input[3][0] */
w2 = arg[3] ? arg[3][0] : 0;
/* #3: @3 = input[2][0] */
w3 = arg[2] ? arg[2][0] : 0;
/* #4: @4 = input[4][0] */
w4 = arg[4] ? arg[4][0] : 0;
/* #5: @5 = 0x1 */
/* #6: {@6, @7, NULL, NULL, NULL, NULL} = F(@0, @1, @2, @3, @3, @4, @5) */
arg1[0]=w0;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w3);
arg1[4]=(&w3);
arg1[5]=(&w4);
arg1[6]=0;
res1[0]=w6;
res1[1]=w7;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f4(arg1, res1, iw, w, 0)) return 1;
/* #7: output[0][0] = @6 */
casadi_copy(w6, 2, res[0]);
/* #8: output[1][0] = @0 */
casadi_copy(w0, 2, res[1]);
/* #9: output[1][1] = @6 */
if (res[1]) casadi_copy(w6, 2, res[1]+2);
/* #10: output[2][0] = @7 */
casadi_copy(w7, 10, res[2]);
return 0;
}
/* adj1_ode:(x[2],u,z[0],p,t[1x1,0nz],out_ode[2x1,0nz],out_alg[0],out_quad[0],adj_ode[2],adj_alg[0],adj_quad[0])->(adj_x[2],adj_u,adj_z[0],adj_p,adj_t[1x1,0nz]) */
static int casadi_f8(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *w0=w+0, w1, w2;
/* #0: @0 = input[8][0] */
casadi_copy(arg[8], 2, w0);
/* #1: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #2: @2 = (@2+@1) */
w2 += w1;
/* #3: output[0][0] = @2 */
if (res[0]) res[0][0] = w2;
/* #4: @2 = (-@1) */
w2 = (- w1 );
/* #5: output[0][1] = @2 */
if (res[0]) res[0][1] = w2;
/* #6: output[1][0] = @1 */
if (res[1]) res[1][0] = w1;
/* #7: output[3][0] = @1 */
if (res[3]) res[3][0] = w1;
return 0;
}
/* adj1_F:(x0[2],u,t0,DT,DT_control,p,z0[0],out_xf[2x1,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_poly_coeff_q[0x4],out_zf[0],out_poly_coeff_z[],adj_xf[2],adj_poly_coeff[2x5],adj_qf[0],adj_poly_coeff_q[0x4],adj_zf[0],adj_poly_coeff_z[])->(adj_x0[2],adj_u,adj_t0[1x1,0nz],adj_DT,adj_DT_control[1x1,0nz],adj_p,adj_z0[0]) */
static int casadi_f7(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+7, *rr;
const casadi_real **arg1=arg+19, *cr, *cs;
casadi_real *w0=w+4, *w1=w+14, *w2=w+16, *w3=w+18, *w4=w+20, *w5=w+22, *w6=w+24, *w7=w+26, w8, w9, w10, w11, w13, *w15=w+33, *w16=w+35, *w19=w+37, *w20=w+39, *w23=w+41, *w24=w+43, w30, w31, w32, *w33=w+48, w34, *w35=w+51, *w36=w+53, *w39=w+55, w40, w41, w42, w43, *w44=w+61, *w45=w+63, w46, w47, w48, w49;
/* #0: @0 = input[14][0] */
casadi_copy(arg[14], 10, w0);
/* #1: {@1, @2, @3, @4, @5} = horzsplit(@0) */
casadi_copy(w0, 2, w1);
casadi_copy(w0+2, 2, w2);
casadi_copy(w0+4, 2, w3);
casadi_copy(w0+6, 2, w4);
casadi_copy(w0+8, 2, w5);
/* #2: @6 = input[13][0] */
casadi_copy(arg[13], 2, w6);
/* #3: @1 = (@1+@6) */
for (i=0, rr=w1, cs=w6; i<2; ++i) (*rr++) += (*cs++);
/* #4: @7 = input[0][0] */
casadi_copy(arg[0], 2, w7);
/* #5: @8 = input[3][0] */
w8 = arg[3] ? arg[3][0] : 0;
/* #6: @9 = 2 */
w9 = 2.;
/* #7: @9 = (@8/@9) */
w9 = (w8/w9);
/* #8: @10 = 2 */
w10 = 2.;
/* #9: @10 = (@8/@10) */
w10 = (w8/w10);
/* #10: @11 = input[1][0] */
w11 = arg[1] ? arg[1][0] : 0;
/* #11: @12 = 0x1 */
/* #12: @13 = input[5][0] */
w13 = arg[5] ? arg[5][0] : 0;
/* #13: @14 = 00 */
/* #14: {@15, NULL, NULL} = ode(@7, @11, @12, @13, @14) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w15;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #15: @16 = (@10*@15) */
for (i=0, rr=w16, cs=w15; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #16: @16 = (@7+@16) */
for (i=0, rr=w16, cr=w7, cs=w16; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #17: @17 = 0x1 */
/* #18: @18 = 00 */
/* #19: {@19, NULL, NULL} = ode(@16, @11, @17, @13, @18) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w19;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #20: @20 = (@9*@19) */
for (i=0, rr=w20, cs=w19; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #21: @20 = (@7+@20) */
for (i=0, rr=w20, cr=w7, cs=w20; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #22: @21 = 0x1 */
/* #23: @22 = 00 */
/* #24: {@23, NULL, NULL} = ode(@20, @11, @21, @13, @22) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w23;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #25: @24 = (@8*@23) */
for (i=0, rr=w24, cs=w23; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #26: @24 = (@7+@24) */
for (i=0, rr=w24, cr=w7, cs=w24; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #27: @25 = 0x1 */
/* #28: @26 = 00 */
/* #29: @27 = zeros(2x1,0nz) */
/* #30: @28 = 0x1 */
/* #31: @29 = 0x1 */
/* #32: @30 = 4 */
w30 = 4.;
/* #33: @31 = 0.0416667 */
w31 = 4.1666666666666664e-02;
/* #34: @5 = (@31*@5) */
for (i=0, rr=w5, cs=w5; i<2; ++i) (*rr++) = (w31*(*cs++));
/* #35: @31 = 3 */
w31 = 3.;
/* #36: @32 = pow(@8,@31) */
w32 = pow(w8,w31);
/* #37: @33 = (@5/@32) */
for (i=0, rr=w33, cr=w5; i<2; ++i) (*rr++) = ((*cr++)/w32);
/* #38: @33 = (@30*@33) */
for (i=0, rr=w33, cs=w33; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #39: @34 = 6 */
w34 = 6.;
/* #40: @34 = (@8/@34) */
w34 = (w8/w34);
/* #41: @35 = (@34*@6) */
for (i=0, rr=w35, cs=w6; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #42: @36 = (@33+@35) */
for (i=0, rr=w36, cr=w33, cs=w35; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #43: @37 = 0x1 */
/* #44: @38 = 0x1 */
/* #45: {@39, @34, NULL, @40, NULL} = adj1_ode(@24, @11, @25, @13, @26, @27, @28, @29, @36, @37, @38) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w36;
arg1[9]=0;
arg1[10]=0;
res1[0]=w39;
res1[1]=(&w34);
res1[2]=0;
res1[3]=(&w40);
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #46: @1 = (@1+@39) */
for (i=0, rr=w1, cs=w39; i<2; ++i) (*rr++) += (*cs++);
/* #47: @27 = zeros(2x1,0nz) */
/* #48: @28 = 0x1 */
/* #49: @29 = 0x1 */
/* #50: @36 = (-@33) */
for (i=0, rr=w36, cs=w33; i<2; ++i) *rr++ = (- *cs++ );
/* #51: @36 = (2.*@36) */
for (i=0, rr=w36, cs=w36; i<2; ++i) *rr++ = (2.* *cs++ );
/* #52: @41 = 4 */
w41 = 4.;
/* #53: @42 = sq(@8) */
w42 = casadi_sq( w8 );
/* #54: @41 = (@41/@42) */
w41 /= w42;
/* #55: @43 = 0.166667 */
w43 = 1.6666666666666666e-01;
/* #56: @4 = (@43*@4) */
for (i=0, rr=w4, cs=w4; i<2; ++i) (*rr++) = (w43*(*cs++));
/* #57: @44 = (@41*@4) */
for (i=0, rr=w44, cs=w4; i<2; ++i) (*rr++) = (w41*(*cs++));
/* #58: @36 = (@36+@44) */
for (i=0, rr=w36, cs=w44; i<2; ++i) (*rr++) += (*cs++);
/* #59: @45 = (@8*@39) */
for (i=0, rr=w45, cs=w39; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #60: @36 = (@36+@45) */
for (i=0, rr=w36, cs=w45; i<2; ++i) (*rr++) += (*cs++);
/* #61: @45 = (2.*@35) */
for (i=0, rr=w45, cs=w35; i<2; ++i) *rr++ = (2.* *cs++ );
/* #62: @36 = (@36+@45) */
for (i=0, rr=w36, cs=w45; i<2; ++i) (*rr++) += (*cs++);
/* #63: @37 = 0x1 */
/* #64: @38 = 0x1 */
/* #65: {@45, @43, NULL, @46, NULL} = adj1_ode(@20, @11, @21, @13, @22, @27, @28, @29, @36, @37, @38) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w36;
arg1[9]=0;
arg1[10]=0;
res1[0]=w45;
res1[1]=(&w43);
res1[2]=0;
res1[3]=(&w46);
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #66: @1 = (@1+@45) */
for (i=0, rr=w1, cs=w45; i<2; ++i) (*rr++) += (*cs++);
/* #67: @21 = zeros(2x1,0nz) */
/* #68: @22 = 0x1 */
/* #69: @27 = 0x1 */
/* #70: @47 = 2 */
w47 = 2.;
/* #71: @47 = (@47/@8) */
w47 /= w8;
/* #72: @48 = 0.5 */
w48 = 5.0000000000000000e-01;
/* #73: @3 = (@48*@3) */
for (i=0, rr=w3, cs=w3; i<2; ++i) (*rr++) = (w48*(*cs++));
/* #74: @20 = (@47*@3) */
for (i=0, rr=w20, cs=w3; i<2; ++i) (*rr++) = (w47*(*cs++));
/* #75: @44 = (@20-@44) */
for (i=0, rr=w44, cr=w20, cs=w44; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #76: @36 = (@9*@45) */
for (i=0, rr=w36, cs=w45; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #77: @44 = (@44+@36) */
for (i=0, rr=w44, cs=w36; i<2; ++i) (*rr++) += (*cs++);
/* #78: @36 = (2.*@35) */
for (i=0, rr=w36, cs=w35; i<2; ++i) *rr++ = (2.* *cs++ );
/* #79: @44 = (@44+@36) */
for (i=0, rr=w44, cs=w36; i<2; ++i) (*rr++) += (*cs++);
/* #80: @28 = 0x1 */
/* #81: @29 = 0x1 */
/* #82: {@36, @9, NULL, @48, NULL} = adj1_ode(@16, @11, @17, @13, @18, @21, @22, @27, @44, @28, @29) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w44;
arg1[9]=0;
arg1[10]=0;
res1[0]=w36;
res1[1]=(&w9);
res1[2]=0;
res1[3]=(&w48);
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #83: @1 = (@1+@36) */
for (i=0, rr=w1, cs=w36; i<2; ++i) (*rr++) += (*cs++);
/* #84: @17 = zeros(2x1,0nz) */
/* #85: @18 = 0x1 */
/* #86: @21 = 0x1 */
/* #87: @33 = (@33-@20) */
for (i=0, rr=w33, cs=w20; i<2; ++i) (*rr++) -= (*cs++);
/* #88: @33 = (@33+@2) */
for (i=0, rr=w33, cs=w2; i<2; ++i) (*rr++) += (*cs++);
/* #89: @33 = (@33+@35) */
for (i=0, rr=w33, cs=w35; i<2; ++i) (*rr++) += (*cs++);
/* #90: @35 = (@10*@36) */
for (i=0, rr=w35, cs=w36; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #91: @33 = (@33+@35) */
for (i=0, rr=w33, cs=w35; i<2; ++i) (*rr++) += (*cs++);
/* #92: @22 = 0x1 */
/* #93: @27 = 0x1 */
/* #94: {@35, @10, NULL, @49, NULL} = adj1_ode(@7, @11, @12, @13, @14, @17, @18, @21, @33, @22, @27) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w33;
arg1[9]=0;
arg1[10]=0;
res1[0]=w35;
res1[1]=(&w10);
res1[2]=0;
res1[3]=(&w49);
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #95: @1 = (@1+@35) */
for (i=0, rr=w1, cs=w35; i<2; ++i) (*rr++) += (*cs++);
/* #96: output[0][0] = @1 */
casadi_copy(w1, 2, res[0]);
/* #97: @34 = (@34+@43) */
w34 += w43;
/* #98: @34 = (@34+@9) */
w34 += w9;
/* #99: @34 = (@34+@10) */
w34 += w10;
/* #100: output[1][0] = @34 */
if (res[1]) res[1][0] = w34;
/* #101: @34 = sq(@8) */
w34 = casadi_sq( w8 );
/* #102: @31 = (@31*@34) */
w31 *= w34;
/* #103: {@1, NULL, NULL} = ode(@24, @11, @25, @13, @26) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w1;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #104: @24 = (2.*@23) */
for (i=0, rr=w24, cs=w23; i<2; ++i) *rr++ = (2.* *cs++ );
/* #105: @24 = (@1-@24) */
for (i=0, rr=w24, cr=w1, cs=w24; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #106: @24 = (@24+@15) */
for (i=0, rr=w24, cs=w15; i<2; ++i) (*rr++) += (*cs++);
/* #107: @24 = (@30*@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #108: @24 = (@24/@32) */
for (i=0, rr=w24; i<2; ++i) (*rr++) /= w32;
/* #109: @24 = (@24/@32) */
for (i=0, rr=w24; i<2; ++i) (*rr++) /= w32;
/* #110: @24 = (-@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) *rr++ = (- *cs++ );
/* #111: @32 = dot(@24, @5) */
w32 = casadi_dot(2, w24, w5);
/* #112: @31 = (@31*@32) */
w31 *= w32;
/* #113: @32 = (2.*@8) */
w32 = (2.* w8 );
/* #114: @41 = (@41/@42) */
w41 /= w42;
/* #115: @24 = (@23-@19) */
for (i=0, rr=w24, cr=w23, cs=w19; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #116: @42 = dot(@24, @4) */
w42 = casadi_dot(2, w24, w4);
/* #117: @41 = (@41*@42) */
w41 *= w42;
/* #118: @32 = (@32*@41) */
w32 *= w41;
/* #119: @31 = (@31-@32) */
w31 -= w32;
/* #120: @47 = (@47/@8) */
w47 /= w8;
/* #121: @24 = (@19-@15) */
for (i=0, rr=w24, cr=w19, cs=w15; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #122: @8 = dot(@24, @3) */
w8 = casadi_dot(2, w24, w3);
/* #123: @47 = (@47*@8) */
w47 *= w8;
/* #124: @31 = (@31-@47) */
w31 -= w47;
/* #125: @47 = dot(@23, @39) */
w47 = casadi_dot(2, w23, w39);
/* #126: @31 = (@31+@47) */
w31 += w47;
/* #127: @47 = 0.5 */
w47 = 5.0000000000000000e-01;
/* #128: @8 = dot(@19, @45) */
w8 = casadi_dot(2, w19, w45);
/* #129: @47 = (@47*@8) */
w47 *= w8;
/* #130: @31 = (@31+@47) */
w31 += w47;
/* #131: @47 = 0.5 */
w47 = 5.0000000000000000e-01;
/* #132: @8 = dot(@15, @36) */
w8 = casadi_dot(2, w15, w36);
/* #133: @47 = (@47*@8) */
w47 *= w8;
/* #134: @31 = (@31+@47) */
w31 += w47;
/* #135: @47 = 0.166667 */
w47 = 1.6666666666666666e-01;
/* #136: @19 = (2.*@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) *rr++ = (2.* *cs++ );
/* #137: @15 = (@15+@19) */
for (i=0, rr=w15, cs=w19; i<2; ++i) (*rr++) += (*cs++);
/* #138: @23 = (2.*@23) */
for (i=0, rr=w23, cs=w23; i<2; ++i) *rr++ = (2.* *cs++ );
/* #139: @15 = (@15+@23) */
for (i=0, rr=w15, cs=w23; i<2; ++i) (*rr++) += (*cs++);
/* #140: @15 = (@15+@1) */
for (i=0, rr=w15, cs=w1; i<2; ++i) (*rr++) += (*cs++);
/* #141: @8 = dot(@15, @6) */
w8 = casadi_dot(2, w15, w6);
/* #142: @47 = (@47*@8) */
w47 *= w8;
/* #143: @31 = (@31+@47) */
w31 += w47;
/* #144: output[3][0] = @31 */
if (res[3]) res[3][0] = w31;
/* #145: @40 = (@40+@46) */
w40 += w46;
/* #146: @40 = (@40+@48) */
w40 += w48;
/* #147: @40 = (@40+@49) */
w40 += w49;
/* #148: output[5][0] = @40 */
if (res[5]) res[5][0] = w40;
return 0;
}
/* adj1_F:(x0[2],u,T,t0,p,z0[0],out_xf[2x1,0nz],out_Xi[2x2,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_Qi[0],out_poly_coeff_q[0x4],out_zf[0],out_Zi[0],out_poly_coeff_z[],adj_xf[2],adj_Xi[2x2],adj_poly_coeff[2x5],adj_qf[0],adj_Qi[0],adj_poly_coeff_q[0x4],adj_zf[0],adj_Zi[0],adj_poly_coeff_z[])->(adj_x0[2],adj_u,adj_T,adj_t0[1x1,0nz],adj_p,adj_z0[0]) */
static int casadi_f6(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+6, *rr;
const casadi_real **arg1=arg+24, *cs;
casadi_real *w0=w+69, *w1=w+73, *w2=w+75, *w3=w+77, w4, w5, w6, w7, *w15=w+83, *w16=w+85, w20, w21, w22;
/* #0: @0 = input[16][0] */
casadi_copy(arg[16], 4, w0);
/* #1: {@1, @2} = horzsplit(@0) */
casadi_copy(w0, 2, w1);
casadi_copy(w0+2, 2, w2);
/* #2: @3 = input[0][0] */
casadi_copy(arg[0], 2, w3);
/* #3: @4 = input[1][0] */
w4 = arg[1] ? arg[1][0] : 0;
/* #4: @5 = input[3][0] */
w5 = arg[3] ? arg[3][0] : 0;
/* #5: @6 = input[2][0] */
w6 = arg[2] ? arg[2][0] : 0;
/* #6: @7 = input[4][0] */
w7 = arg[4] ? arg[4][0] : 0;
/* #7: @8 = 0x1 */
/* #8: @9 = zeros(2x1,0nz) */
/* #9: @10 = zeros(2x5,0nz) */
/* #10: @11 = 0x1 */
/* #11: @12 = 0x4 */
/* #12: @13 = 0x1 */
/* #13: @14 = 0x0 */
/* #14: @15 = input[15][0] */
casadi_copy(arg[15], 2, w15);
/* #15: @2 = (@2+@15) */
for (i=0, rr=w2, cs=w15; i<2; ++i) (*rr++) += (*cs++);
/* #16: @16 = input[17][0] */
casadi_copy(arg[17], 10, w16);
/* #17: @17 = 0x1 */
/* #18: @18 = 0x4 */
/* #19: @19 = 0x1 */
/* #20: {@15, @20, NULL, @21, NULL, @22, NULL} = adj1_F(@3, @4, @5, @6, @6, @7, @8, @9, @10, @11, @12, @13, @14, @2, @16, @17, @18, @19, @14) */
arg1[0]=w3;
arg1[1]=(&w4);
arg1[2]=(&w5);
arg1[3]=(&w6);
arg1[4]=(&w6);
arg1[5]=(&w7);
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=w2;
arg1[14]=w16;
arg1[15]=0;
arg1[16]=0;
arg1[17]=0;
arg1[18]=0;
res1[0]=w15;
res1[1]=(&w20);
res1[2]=0;
res1[3]=(&w21);
res1[4]=0;
res1[5]=(&w22);
res1[6]=0;
if (casadi_f7(arg1, res1, iw, w, 0)) return 1;
/* #21: @1 = (@1+@15) */
for (i=0, rr=w1, cs=w15; i<2; ++i) (*rr++) += (*cs++);
/* #22: output[0][0] = @1 */
casadi_copy(w1, 2, res[0]);
/* #23: output[1][0] = @20 */
if (res[1]) res[1][0] = w20;
/* #24: output[2][0] = @21 */
if (res[2]) res[2][0] = w21;
/* #25: output[4][0] = @22 */
if (res[4]) res[4][0] = w22;
return 0;
}
/* nlp_grad:(x[32],p,lam_f,lam_g[42])->(f,g[42],grad_gamma_x[32],grad_gamma_p) */
static int casadi_f2(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+4, *rr;
const casadi_real **arg1=arg+4, *cr, *cs;
casadi_real w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, w17, w18, w19, w20, w21, w22, w23, w24, w25, w26, w27, w28, w29, w30, w31, w32, *w33=w+131, *w34=w+133, w35, *w37=w+136, w38, w39, *w41=w+140, w42, w43, *w45=w+144, w46, w47, *w49=w+148, w50, w51, *w53=w+152, w54, w55, *w57=w+156, w58, w59, *w61=w+160, w62, w63, *w65=w+164, w66, w67, *w69=w+168, w70, w71, *w73=w+172, *w74=w+174, w75, w76, w77, w78, w79, *w80=w+221, w81, w82, *w83=w+225, w84, w85, *w86=w+229, w87, w88, *w89=w+233, w90, w91, *w92=w+237, w93, w94, *w95=w+241, w96, w97, *w98=w+245, w99, w100, *w101=w+249, w102, w103, w104, *w114=w+254, *w115=w+256, *w116=w+260, *w122=w+270, w123, w124, w125;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: @1 = sq(@0) */
w1 = casadi_sq( w0 );
/* #2: @2 = input[0][1] */
w2 = arg[0] ? arg[0][1] : 0;
/* #3: @3 = sq(@2) */
w3 = casadi_sq( w2 );
/* #4: @1 = (@1+@3) */
w1 += w3;
/* #5: @3 = input[0][2] */
w3 = arg[0] ? arg[0][2] : 0;
/* #6: @4 = sq(@3) */
w4 = casadi_sq( w3 );
/* #7: @1 = (@1+@4) */
w1 += w4;
/* #8: @4 = input[0][3] */
w4 = arg[0] ? arg[0][3] : 0;
/* #9: @5 = sq(@4) */
w5 = casadi_sq( w4 );
/* #10: @6 = input[0][4] */
w6 = arg[0] ? arg[0][4] : 0;
/* #11: @7 = sq(@6) */
w7 = casadi_sq( w6 );
/* #12: @5 = (@5+@7) */
w5 += w7;
/* #13: @7 = input[0][5] */
w7 = arg[0] ? arg[0][5] : 0;
/* #14: @8 = sq(@7) */
w8 = casadi_sq( w7 );
/* #15: @5 = (@5+@8) */
w5 += w8;
/* #16: @1 = (@1+@5) */
w1 += w5;
/* #17: @5 = input[0][6] */
w5 = arg[0] ? arg[0][6] : 0;
/* #18: @8 = sq(@5) */
w8 = casadi_sq( w5 );
/* #19: @9 = input[0][7] */
w9 = arg[0] ? arg[0][7] : 0;
/* #20: @10 = sq(@9) */
w10 = casadi_sq( w9 );
/* #21: @8 = (@8+@10) */
w8 += w10;
/* #22: @10 = input[0][8] */
w10 = arg[0] ? arg[0][8] : 0;
/* #23: @11 = sq(@10) */
w11 = casadi_sq( w10 );
/* #24: @8 = (@8+@11) */
w8 += w11;
/* #25: @1 = (@1+@8) */
w1 += w8;
/* #26: @8 = input[0][9] */
w8 = arg[0] ? arg[0][9] : 0;
/* #27: @11 = sq(@8) */
w11 = casadi_sq( w8 );
/* #28: @12 = input[0][10] */
w12 = arg[0] ? arg[0][10] : 0;
/* #29: @13 = sq(@12) */
w13 = casadi_sq( w12 );
/* #30: @11 = (@11+@13) */
w11 += w13;
/* #31: @13 = input[0][11] */
w13 = arg[0] ? arg[0][11] : 0;
/* #32: @14 = sq(@13) */
w14 = casadi_sq( w13 );
/* #33: @11 = (@11+@14) */
w11 += w14;
/* #34: @1 = (@1+@11) */
w1 += w11;
/* #35: @11 = input[0][12] */
w11 = arg[0] ? arg[0][12] : 0;
/* #36: @14 = sq(@11) */
w14 = casadi_sq( w11 );
/* #37: @15 = input[0][13] */
w15 = arg[0] ? arg[0][13] : 0;
/* #38: @16 = sq(@15) */
w16 = casadi_sq( w15 );
/* #39: @14 = (@14+@16) */
w14 += w16;
/* #40: @16 = input[0][14] */
w16 = arg[0] ? arg[0][14] : 0;
/* #41: @17 = sq(@16) */
w17 = casadi_sq( w16 );
/* #42: @14 = (@14+@17) */
w14 += w17;
/* #43: @1 = (@1+@14) */
w1 += w14;
/* #44: @14 = input[0][15] */
w14 = arg[0] ? arg[0][15] : 0;
/* #45: @17 = sq(@14) */
w17 = casadi_sq( w14 );
/* #46: @18 = input[0][16] */
w18 = arg[0] ? arg[0][16] : 0;
/* #47: @19 = sq(@18) */
w19 = casadi_sq( w18 );
/* #48: @17 = (@17+@19) */
w17 += w19;
/* #49: @19 = input[0][17] */
w19 = arg[0] ? arg[0][17] : 0;
/* #50: @20 = sq(@19) */
w20 = casadi_sq( w19 );
/* #51: @17 = (@17+@20) */
w17 += w20;
/* #52: @1 = (@1+@17) */
w1 += w17;
/* #53: @17 = input[0][18] */
w17 = arg[0] ? arg[0][18] : 0;
/* #54: @20 = sq(@17) */
w20 = casadi_sq( w17 );
/* #55: @21 = input[0][19] */
w21 = arg[0] ? arg[0][19] : 0;
/* #56: @22 = sq(@21) */
w22 = casadi_sq( w21 );
/* #57: @20 = (@20+@22) */
w20 += w22;
/* #58: @22 = input[0][20] */
w22 = arg[0] ? arg[0][20] : 0;
/* #59: @23 = sq(@22) */
w23 = casadi_sq( w22 );
/* #60: @20 = (@20+@23) */
w20 += w23;
/* #61: @1 = (@1+@20) */
w1 += w20;
/* #62: @20 = input[0][21] */
w20 = arg[0] ? arg[0][21] : 0;
/* #63: @23 = sq(@20) */
w23 = casadi_sq( w20 );
/* #64: @24 = input[0][22] */
w24 = arg[0] ? arg[0][22] : 0;
/* #65: @25 = sq(@24) */
w25 = casadi_sq( w24 );
/* #66: @23 = (@23+@25) */
w23 += w25;
/* #67: @25 = input[0][23] */
w25 = arg[0] ? arg[0][23] : 0;
/* #68: @26 = sq(@25) */
w26 = casadi_sq( w25 );
/* #69: @23 = (@23+@26) */
w23 += w26;
/* #70: @1 = (@1+@23) */
w1 += w23;
/* #71: @23 = input[0][24] */
w23 = arg[0] ? arg[0][24] : 0;
/* #72: @26 = sq(@23) */
w26 = casadi_sq( w23 );
/* #73: @27 = input[0][25] */
w27 = arg[0] ? arg[0][25] : 0;
/* #74: @28 = sq(@27) */
w28 = casadi_sq( w27 );
/* #75: @26 = (@26+@28) */
w26 += w28;
/* #76: @28 = input[0][26] */
w28 = arg[0] ? arg[0][26] : 0;
/* #77: @29 = sq(@28) */
w29 = casadi_sq( w28 );
/* #78: @26 = (@26+@29) */
w26 += w29;
/* #79: @1 = (@1+@26) */
w1 += w26;
/* #80: @26 = input[0][27] */
w26 = arg[0] ? arg[0][27] : 0;
/* #81: @29 = sq(@26) */
w29 = casadi_sq( w26 );
/* #82: @30 = input[0][28] */
w30 = arg[0] ? arg[0][28] : 0;
/* #83: @31 = sq(@30) */
w31 = casadi_sq( w30 );
/* #84: @29 = (@29+@31) */
w29 += w31;
/* #85: @31 = input[0][29] */
w31 = arg[0] ? arg[0][29] : 0;
/* #86: @32 = sq(@31) */
w32 = casadi_sq( w31 );
/* #87: @29 = (@29+@32) */
w29 += w32;
/* #88: @1 = (@1+@29) */
w1 += w29;
/* #89: @29 = input[0][30] */
w29 = arg[0] ? arg[0][30] : 0;
/* #90: @32 = sq(@29) */
w32 = casadi_sq( w29 );
/* #91: @1 = (@1+@32) */
w1 += w32;
/* #92: output[0][0] = @1 */
if (res[0]) res[0][0] = w1;
/* #93: @33 = vertcat(@4, @6) */
rr=w33;
*rr++ = w4;
*rr++ = w6;
/* #94: @34 = vertcat(@0, @2) */
rr=w34;
*rr++ = w0;
*rr++ = w2;
/* #95: @1 = 1 */
w1 = 1.;
/* #96: @32 = 0 */
w32 = 0.;
/* #97: @35 = input[1][0] */
w35 = arg[1] ? arg[1][0] : 0;
/* #98: @36 = 0x1 */
/* #99: {@37, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@34, @3, @1, @32, @35, @36) */
arg1[0]=w34;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w32);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w37;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #100: @37 = (@33-@37) */
for (i=0, rr=w37, cr=w33, cs=w37; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #101: output[1][0] = @37 */
casadi_copy(w37, 2, res[1]);
/* #102: output[1][1] = @0 */
if (res[1]) res[1][2] = w0;
/* #103: output[1][2] = @2 */
if (res[1]) res[1][3] = w2;
/* #104: output[1][3] = @3 */
if (res[1]) res[1][4] = w3;
/* #105: @37 = vertcat(@5, @9) */
rr=w37;
*rr++ = w5;
*rr++ = w9;
/* #106: @38 = 1 */
w38 = 1.;
/* #107: @39 = 1 */
w39 = 1.;
/* #108: @40 = 0x1 */
/* #109: {@41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@33, @7, @38, @39, @35, @40) */
arg1[0]=w33;
arg1[1]=(&w7);
arg1[2]=(&w38);
arg1[3]=(&w39);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w41;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #110: @41 = (@37-@41) */
for (i=0, rr=w41, cr=w37, cs=w41; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #111: output[1][4] = @41 */
if (res[1]) casadi_copy(w41, 2, res[1]+5);
/* #112: output[1][5] = @4 */
if (res[1]) res[1][7] = w4;
/* #113: output[1][6] = @7 */
if (res[1]) res[1][8] = w7;
/* #114: @41 = vertcat(@8, @12) */
rr=w41;
*rr++ = w8;
*rr++ = w12;
/* #115: @42 = 1 */
w42 = 1.;
/* #116: @43 = 2 */
w43 = 2.;
/* #117: @44 = 0x1 */
/* #118: {@45, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@37, @10, @42, @43, @35, @44) */
arg1[0]=w37;
arg1[1]=(&w10);
arg1[2]=(&w42);
arg1[3]=(&w43);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w45;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #119: @45 = (@41-@45) */
for (i=0, rr=w45, cr=w41, cs=w45; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #120: output[1][7] = @45 */
if (res[1]) casadi_copy(w45, 2, res[1]+9);
/* #121: output[1][8] = @5 */
if (res[1]) res[1][11] = w5;
/* #122: output[1][9] = @10 */
if (res[1]) res[1][12] = w10;
/* #123: @45 = vertcat(@11, @15) */
rr=w45;
*rr++ = w11;
*rr++ = w15;
/* #124: @46 = 1 */
w46 = 1.;
/* #125: @47 = 3 */
w47 = 3.;
/* #126: @48 = 0x1 */
/* #127: {@49, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@41, @13, @46, @47, @35, @48) */
arg1[0]=w41;
arg1[1]=(&w13);
arg1[2]=(&w46);
arg1[3]=(&w47);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w49;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #128: @49 = (@45-@49) */
for (i=0, rr=w49, cr=w45, cs=w49; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #129: output[1][10] = @49 */
if (res[1]) casadi_copy(w49, 2, res[1]+13);
/* #130: output[1][11] = @8 */
if (res[1]) res[1][15] = w8;
/* #131: output[1][12] = @13 */
if (res[1]) res[1][16] = w13;
/* #132: @49 = vertcat(@14, @18) */
rr=w49;
*rr++ = w14;
*rr++ = w18;
/* #133: @50 = 1 */
w50 = 1.;
/* #134: @51 = 4 */
w51 = 4.;
/* #135: @52 = 0x1 */
/* #136: {@53, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@45, @16, @50, @51, @35, @52) */
arg1[0]=w45;
arg1[1]=(&w16);
arg1[2]=(&w50);
arg1[3]=(&w51);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w53;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #137: @53 = (@49-@53) */
for (i=0, rr=w53, cr=w49, cs=w53; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #138: output[1][13] = @53 */
if (res[1]) casadi_copy(w53, 2, res[1]+17);
/* #139: output[1][14] = @11 */
if (res[1]) res[1][19] = w11;
/* #140: output[1][15] = @16 */
if (res[1]) res[1][20] = w16;
/* #141: @53 = vertcat(@17, @21) */
rr=w53;
*rr++ = w17;
*rr++ = w21;
/* #142: @54 = 1 */
w54 = 1.;
/* #143: @55 = 5 */
w55 = 5.;
/* #144: @56 = 0x1 */
/* #145: {@57, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@49, @19, @54, @55, @35, @56) */
arg1[0]=w49;
arg1[1]=(&w19);
arg1[2]=(&w54);
arg1[3]=(&w55);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w57;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #146: @57 = (@53-@57) */
for (i=0, rr=w57, cr=w53, cs=w57; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #147: output[1][16] = @57 */
if (res[1]) casadi_copy(w57, 2, res[1]+21);
/* #148: output[1][17] = @14 */
if (res[1]) res[1][23] = w14;
/* #149: output[1][18] = @19 */
if (res[1]) res[1][24] = w19;
/* #150: @57 = vertcat(@20, @24) */
rr=w57;
*rr++ = w20;
*rr++ = w24;
/* #151: @58 = 1 */
w58 = 1.;
/* #152: @59 = 6 */
w59 = 6.;
/* #153: @60 = 0x1 */
/* #154: {@61, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@53, @22, @58, @59, @35, @60) */
arg1[0]=w53;
arg1[1]=(&w22);
arg1[2]=(&w58);
arg1[3]=(&w59);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w61;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #155: @61 = (@57-@61) */
for (i=0, rr=w61, cr=w57, cs=w61; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #156: output[1][19] = @61 */
if (res[1]) casadi_copy(w61, 2, res[1]+25);
/* #157: output[1][20] = @17 */
if (res[1]) res[1][27] = w17;
/* #158: output[1][21] = @22 */
if (res[1]) res[1][28] = w22;
/* #159: @61 = vertcat(@23, @27) */
rr=w61;
*rr++ = w23;
*rr++ = w27;
/* #160: @62 = 1 */
w62 = 1.;
/* #161: @63 = 7 */
w63 = 7.;
/* #162: @64 = 0x1 */
/* #163: {@65, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@57, @25, @62, @63, @35, @64) */
arg1[0]=w57;
arg1[1]=(&w25);
arg1[2]=(&w62);
arg1[3]=(&w63);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w65;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #164: @65 = (@61-@65) */
for (i=0, rr=w65, cr=w61, cs=w65; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #165: output[1][22] = @65 */
if (res[1]) casadi_copy(w65, 2, res[1]+29);
/* #166: output[1][23] = @20 */
if (res[1]) res[1][31] = w20;
/* #167: output[1][24] = @25 */
if (res[1]) res[1][32] = w25;
/* #168: @65 = vertcat(@26, @30) */
rr=w65;
*rr++ = w26;
*rr++ = w30;
/* #169: @66 = 1 */
w66 = 1.;
/* #170: @67 = 8 */
w67 = 8.;
/* #171: @68 = 0x1 */
/* #172: {@69, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@61, @28, @66, @67, @35, @68) */
arg1[0]=w61;
arg1[1]=(&w28);
arg1[2]=(&w66);
arg1[3]=(&w67);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w69;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #173: @69 = (@65-@69) */
for (i=0, rr=w69, cr=w65, cs=w69; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #174: output[1][25] = @69 */
if (res[1]) casadi_copy(w69, 2, res[1]+33);
/* #175: output[1][26] = @23 */
if (res[1]) res[1][35] = w23;
/* #176: output[1][27] = @28 */
if (res[1]) res[1][36] = w28;
/* #177: @70 = input[0][31] */
w70 = arg[0] ? arg[0][31] : 0;
/* #178: @69 = vertcat(@29, @70) */
rr=w69;
*rr++ = w29;
*rr++ = w70;
/* #179: @70 = 1 */
w70 = 1.;
/* #180: @71 = 9 */
w71 = 9.;
/* #181: @72 = 0x1 */
/* #182: {@73, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@65, @31, @70, @71, @35, @72) */
arg1[0]=w65;
arg1[1]=(&w31);
arg1[2]=(&w70);
arg1[3]=(&w71);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w73;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #183: @69 = (@69-@73) */
for (i=0, rr=w69, cs=w73; i<2; ++i) (*rr++) -= (*cs++);
/* #184: output[1][28] = @69 */
if (res[1]) casadi_copy(w69, 2, res[1]+37);
/* #185: output[1][29] = @26 */
if (res[1]) res[1][39] = w26;
/* #186: output[1][30] = @31 */
if (res[1]) res[1][40] = w31;
/* #187: output[1][31] = @29 */
if (res[1]) res[1][41] = w29;
/* #188: @74 = input[3][0] */
casadi_copy(arg[3], 42, w74);
/* #189: {@69, @75, @76, @77, @73, @78, @79, @80, @81, @82, @83, @84, @85, @86, @87, @88, @89, @90, @91, @92, @93, @94, @95, @96, @97, @98, @99, @100, @101, @102, @103, @104} = vertsplit(@74) */
casadi_copy(w74, 2, w69);
w75 = w74[2];
w76 = w74[3];
w77 = w74[4];
casadi_copy(w74+5, 2, w73);
w78 = w74[7];
w79 = w74[8];
casadi_copy(w74+9, 2, w80);
w81 = w74[11];
w82 = w74[12];
casadi_copy(w74+13, 2, w83);
w84 = w74[15];
w85 = w74[16];
casadi_copy(w74+17, 2, w86);
w87 = w74[19];
w88 = w74[20];
casadi_copy(w74+21, 2, w89);
w90 = w74[23];
w91 = w74[24];
casadi_copy(w74+25, 2, w92);
w93 = w74[27];
w94 = w74[28];
casadi_copy(w74+29, 2, w95);
w96 = w74[31];
w97 = w74[32];
casadi_copy(w74+33, 2, w98);
w99 = w74[35];
w100 = w74[36];
casadi_copy(w74+37, 2, w101);
w102 = w74[39];
w103 = w74[40];
w104 = w74[41];
/* #190: @105 = zeros(2x1,0nz) */
/* #191: @106 = zeros(2x2,0nz) */
/* #192: @107 = zeros(2x5,0nz) */
/* #193: @108 = 0x1 */
/* #194: @109 = 0x1 */
/* #195: @110 = 0x4 */
/* #196: @111 = 0x1 */
/* #197: @112 = 0x1 */
/* #198: @113 = 0x0 */
/* #199: @114 = (-@69) */
for (i=0, rr=w114, cs=w69; i<2; ++i) *rr++ = (- *cs++ );
/* #200: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #201: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #202: @117 = 0x1 */
/* #203: @118 = 0x1 */
/* #204: @119 = 0x4 */
/* #205: @120 = 0x1 */
/* #206: @121 = 0x1 */
/* #207: {@122, @123, NULL, NULL, NULL, NULL} = adj1_F(@34, @3, @1, @32, @35, @36, @105, @106, @107, @108, @109, @110, @111, @112, @113, @114, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w34;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w32);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w114;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w122;
res1[1]=(&w123);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #208: {@124, @125} = vertsplit(@122) */
w124 = w122[0];
w125 = w122[1];
/* #209: @75 = (@75+@124) */
w75 += w124;
/* #210: @0 = (2.*@0) */
w0 = (2.* w0 );
/* #211: @124 = input[2][0] */
w124 = arg[2] ? arg[2][0] : 0;
/* #212: @0 = (@0*@124) */
w0 *= w124;
/* #213: @75 = (@75+@0) */
w75 += w0;
/* #214: output[2][0] = @75 */
if (res[2]) res[2][0] = w75;
/* #215: @76 = (@76+@125) */
w76 += w125;
/* #216: @2 = (2.*@2) */
w2 = (2.* w2 );
/* #217: @2 = (@2*@124) */
w2 *= w124;
/* #218: @76 = (@76+@2) */
w76 += w2;
/* #219: output[2][1] = @76 */
if (res[2]) res[2][1] = w76;
/* #220: @77 = (@77+@123) */
w77 += w123;
/* #221: @123 = (2.*@3) */
w123 = (2.* w3 );
/* #222: @123 = (@123*@124) */
w123 *= w124;
/* #223: @77 = (@77+@123) */
w77 += w123;
/* #224: output[2][2] = @77 */
if (res[2]) res[2][2] = w77;
/* #225: @105 = zeros(2x1,0nz) */
/* #226: @106 = zeros(2x2,0nz) */
/* #227: @107 = zeros(2x5,0nz) */
/* #228: @108 = 0x1 */
/* #229: @109 = 0x1 */
/* #230: @110 = 0x4 */
/* #231: @111 = 0x1 */
/* #232: @112 = 0x1 */
/* #233: @122 = (-@73) */
for (i=0, rr=w122, cs=w73; i<2; ++i) *rr++ = (- *cs++ );
/* #234: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #235: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #236: @117 = 0x1 */
/* #237: @118 = 0x1 */
/* #238: @119 = 0x4 */
/* #239: @120 = 0x1 */
/* #240: @121 = 0x1 */
/* #241: {@114, @77, NULL, NULL, NULL, NULL} = adj1_F(@33, @7, @38, @39, @35, @40, @105, @106, @107, @108, @109, @110, @111, @112, @113, @122, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w33;
arg1[1]=(&w7);
arg1[2]=(&w38);
arg1[3]=(&w39);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w122;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w114;
res1[1]=(&w77);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #242: @114 = (@114+@69) */
for (i=0, rr=w114, cs=w69; i<2; ++i) (*rr++) += (*cs++);
/* #243: {@123, @76} = vertsplit(@114) */
w123 = w114[0];
w76 = w114[1];
/* #244: @78 = (@78+@123) */
w78 += w123;
/* #245: @4 = (2.*@4) */
w4 = (2.* w4 );
/* #246: @4 = (@4*@124) */
w4 *= w124;
/* #247: @78 = (@78+@4) */
w78 += w4;
/* #248: output[2][3] = @78 */
if (res[2]) res[2][3] = w78;
/* #249: @6 = (2.*@6) */
w6 = (2.* w6 );
/* #250: @6 = (@6*@124) */
w6 *= w124;
/* #251: @76 = (@76+@6) */
w76 += w6;
/* #252: output[2][4] = @76 */
if (res[2]) res[2][4] = w76;
/* #253: @79 = (@79+@77) */
w79 += w77;
/* #254: @77 = (2.*@7) */
w77 = (2.* w7 );
/* #255: @77 = (@77*@124) */
w77 *= w124;
/* #256: @79 = (@79+@77) */
w79 += w77;
/* #257: output[2][5] = @79 */
if (res[2]) res[2][5] = w79;
/* #258: @105 = zeros(2x1,0nz) */
/* #259: @106 = zeros(2x2,0nz) */
/* #260: @107 = zeros(2x5,0nz) */
/* #261: @108 = 0x1 */
/* #262: @109 = 0x1 */
/* #263: @110 = 0x4 */
/* #264: @111 = 0x1 */
/* #265: @112 = 0x1 */
/* #266: @114 = (-@80) */
for (i=0, rr=w114, cs=w80; i<2; ++i) *rr++ = (- *cs++ );
/* #267: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #268: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #269: @117 = 0x1 */
/* #270: @118 = 0x1 */
/* #271: @119 = 0x4 */
/* #272: @120 = 0x1 */
/* #273: @121 = 0x1 */
/* #274: {@69, @79, NULL, NULL, NULL, NULL} = adj1_F(@37, @10, @42, @43, @35, @44, @105, @106, @107, @108, @109, @110, @111, @112, @113, @114, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w37;
arg1[1]=(&w10);
arg1[2]=(&w42);
arg1[3]=(&w43);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w114;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w69;
res1[1]=(&w79);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #275: @69 = (@69+@73) */
for (i=0, rr=w69, cs=w73; i<2; ++i) (*rr++) += (*cs++);
/* #276: {@77, @76} = vertsplit(@69) */
w77 = w69[0];
w76 = w69[1];
/* #277: @81 = (@81+@77) */
w81 += w77;
/* #278: @5 = (2.*@5) */
w5 = (2.* w5 );
/* #279: @5 = (@5*@124) */
w5 *= w124;
/* #280: @81 = (@81+@5) */
w81 += w5;
/* #281: output[2][6] = @81 */
if (res[2]) res[2][6] = w81;
/* #282: @9 = (2.*@9) */
w9 = (2.* w9 );
/* #283: @9 = (@9*@124) */
w9 *= w124;
/* #284: @76 = (@76+@9) */
w76 += w9;
/* #285: output[2][7] = @76 */
if (res[2]) res[2][7] = w76;
/* #286: @82 = (@82+@79) */
w82 += w79;
/* #287: @79 = (2.*@10) */
w79 = (2.* w10 );
/* #288: @79 = (@79*@124) */
w79 *= w124;
/* #289: @82 = (@82+@79) */
w82 += w79;
/* #290: output[2][8] = @82 */
if (res[2]) res[2][8] = w82;
/* #291: @105 = zeros(2x1,0nz) */
/* #292: @106 = zeros(2x2,0nz) */
/* #293: @107 = zeros(2x5,0nz) */
/* #294: @108 = 0x1 */
/* #295: @109 = 0x1 */
/* #296: @110 = 0x4 */
/* #297: @111 = 0x1 */
/* #298: @112 = 0x1 */
/* #299: @69 = (-@83) */
for (i=0, rr=w69, cs=w83; i<2; ++i) *rr++ = (- *cs++ );
/* #300: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #301: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #302: @117 = 0x1 */
/* #303: @118 = 0x1 */
/* #304: @119 = 0x4 */
/* #305: @120 = 0x1 */
/* #306: @121 = 0x1 */
/* #307: {@73, @82, NULL, NULL, NULL, NULL} = adj1_F(@41, @13, @46, @47, @35, @48, @105, @106, @107, @108, @109, @110, @111, @112, @113, @69, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w41;
arg1[1]=(&w13);
arg1[2]=(&w46);
arg1[3]=(&w47);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w69;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w73;
res1[1]=(&w82);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #308: @73 = (@73+@80) */
for (i=0, rr=w73, cs=w80; i<2; ++i) (*rr++) += (*cs++);
/* #309: {@79, @76} = vertsplit(@73) */
w79 = w73[0];
w76 = w73[1];
/* #310: @84 = (@84+@79) */
w84 += w79;
/* #311: @8 = (2.*@8) */
w8 = (2.* w8 );
/* #312: @8 = (@8*@124) */
w8 *= w124;
/* #313: @84 = (@84+@8) */
w84 += w8;
/* #314: output[2][9] = @84 */
if (res[2]) res[2][9] = w84;
/* #315: @12 = (2.*@12) */
w12 = (2.* w12 );
/* #316: @12 = (@12*@124) */
w12 *= w124;
/* #317: @76 = (@76+@12) */
w76 += w12;
/* #318: output[2][10] = @76 */
if (res[2]) res[2][10] = w76;
/* #319: @85 = (@85+@82) */
w85 += w82;
/* #320: @82 = (2.*@13) */
w82 = (2.* w13 );
/* #321: @82 = (@82*@124) */
w82 *= w124;
/* #322: @85 = (@85+@82) */
w85 += w82;
/* #323: output[2][11] = @85 */
if (res[2]) res[2][11] = w85;
/* #324: @105 = zeros(2x1,0nz) */
/* #325: @106 = zeros(2x2,0nz) */
/* #326: @107 = zeros(2x5,0nz) */
/* #327: @108 = 0x1 */
/* #328: @109 = 0x1 */
/* #329: @110 = 0x4 */
/* #330: @111 = 0x1 */
/* #331: @112 = 0x1 */
/* #332: @73 = (-@86) */
for (i=0, rr=w73, cs=w86; i<2; ++i) *rr++ = (- *cs++ );
/* #333: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #334: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #335: @117 = 0x1 */
/* #336: @118 = 0x1 */
/* #337: @119 = 0x4 */
/* #338: @120 = 0x1 */
/* #339: @121 = 0x1 */
/* #340: {@80, @85, NULL, NULL, NULL, NULL} = adj1_F(@45, @16, @50, @51, @35, @52, @105, @106, @107, @108, @109, @110, @111, @112, @113, @73, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w45;
arg1[1]=(&w16);
arg1[2]=(&w50);
arg1[3]=(&w51);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w73;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w80;
res1[1]=(&w85);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #341: @80 = (@80+@83) */
for (i=0, rr=w80, cs=w83; i<2; ++i) (*rr++) += (*cs++);
/* #342: {@82, @76} = vertsplit(@80) */
w82 = w80[0];
w76 = w80[1];
/* #343: @87 = (@87+@82) */
w87 += w82;
/* #344: @11 = (2.*@11) */
w11 = (2.* w11 );
/* #345: @11 = (@11*@124) */
w11 *= w124;
/* #346: @87 = (@87+@11) */
w87 += w11;
/* #347: output[2][12] = @87 */
if (res[2]) res[2][12] = w87;
/* #348: @15 = (2.*@15) */
w15 = (2.* w15 );
/* #349: @15 = (@15*@124) */
w15 *= w124;
/* #350: @76 = (@76+@15) */
w76 += w15;
/* #351: output[2][13] = @76 */
if (res[2]) res[2][13] = w76;
/* #352: @88 = (@88+@85) */
w88 += w85;
/* #353: @85 = (2.*@16) */
w85 = (2.* w16 );
/* #354: @85 = (@85*@124) */
w85 *= w124;
/* #355: @88 = (@88+@85) */
w88 += w85;
/* #356: output[2][14] = @88 */
if (res[2]) res[2][14] = w88;
/* #357: @105 = zeros(2x1,0nz) */
/* #358: @106 = zeros(2x2,0nz) */
/* #359: @107 = zeros(2x5,0nz) */
/* #360: @108 = 0x1 */
/* #361: @109 = 0x1 */
/* #362: @110 = 0x4 */
/* #363: @111 = 0x1 */
/* #364: @112 = 0x1 */
/* #365: @80 = (-@89) */
for (i=0, rr=w80, cs=w89; i<2; ++i) *rr++ = (- *cs++ );
/* #366: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #367: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #368: @117 = 0x1 */
/* #369: @118 = 0x1 */
/* #370: @119 = 0x4 */
/* #371: @120 = 0x1 */
/* #372: @121 = 0x1 */
/* #373: {@83, @88, NULL, NULL, NULL, NULL} = adj1_F(@49, @19, @54, @55, @35, @56, @105, @106, @107, @108, @109, @110, @111, @112, @113, @80, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w49;
arg1[1]=(&w19);
arg1[2]=(&w54);
arg1[3]=(&w55);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w80;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w83;
res1[1]=(&w88);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #374: @83 = (@83+@86) */
for (i=0, rr=w83, cs=w86; i<2; ++i) (*rr++) += (*cs++);
/* #375: {@85, @76} = vertsplit(@83) */
w85 = w83[0];
w76 = w83[1];
/* #376: @90 = (@90+@85) */
w90 += w85;
/* #377: @14 = (2.*@14) */
w14 = (2.* w14 );
/* #378: @14 = (@14*@124) */
w14 *= w124;
/* #379: @90 = (@90+@14) */
w90 += w14;
/* #380: output[2][15] = @90 */
if (res[2]) res[2][15] = w90;
/* #381: @18 = (2.*@18) */
w18 = (2.* w18 );
/* #382: @18 = (@18*@124) */
w18 *= w124;
/* #383: @76 = (@76+@18) */
w76 += w18;
/* #384: output[2][16] = @76 */
if (res[2]) res[2][16] = w76;
/* #385: @91 = (@91+@88) */
w91 += w88;
/* #386: @88 = (2.*@19) */
w88 = (2.* w19 );
/* #387: @88 = (@88*@124) */
w88 *= w124;
/* #388: @91 = (@91+@88) */
w91 += w88;
/* #389: output[2][17] = @91 */
if (res[2]) res[2][17] = w91;
/* #390: @105 = zeros(2x1,0nz) */
/* #391: @106 = zeros(2x2,0nz) */
/* #392: @107 = zeros(2x5,0nz) */
/* #393: @108 = 0x1 */
/* #394: @109 = 0x1 */
/* #395: @110 = 0x4 */
/* #396: @111 = 0x1 */
/* #397: @112 = 0x1 */
/* #398: @83 = (-@92) */
for (i=0, rr=w83, cs=w92; i<2; ++i) *rr++ = (- *cs++ );
/* #399: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #400: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #401: @117 = 0x1 */
/* #402: @118 = 0x1 */
/* #403: @119 = 0x4 */
/* #404: @120 = 0x1 */
/* #405: @121 = 0x1 */
/* #406: {@86, @91, NULL, NULL, NULL, NULL} = adj1_F(@53, @22, @58, @59, @35, @60, @105, @106, @107, @108, @109, @110, @111, @112, @113, @83, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w53;
arg1[1]=(&w22);
arg1[2]=(&w58);
arg1[3]=(&w59);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w83;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w86;
res1[1]=(&w91);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #407: @86 = (@86+@89) */
for (i=0, rr=w86, cs=w89; i<2; ++i) (*rr++) += (*cs++);
/* #408: {@88, @76} = vertsplit(@86) */
w88 = w86[0];
w76 = w86[1];
/* #409: @93 = (@93+@88) */
w93 += w88;
/* #410: @17 = (2.*@17) */
w17 = (2.* w17 );
/* #411: @17 = (@17*@124) */
w17 *= w124;
/* #412: @93 = (@93+@17) */
w93 += w17;
/* #413: output[2][18] = @93 */
if (res[2]) res[2][18] = w93;
/* #414: @21 = (2.*@21) */
w21 = (2.* w21 );
/* #415: @21 = (@21*@124) */
w21 *= w124;
/* #416: @76 = (@76+@21) */
w76 += w21;
/* #417: output[2][19] = @76 */
if (res[2]) res[2][19] = w76;
/* #418: @94 = (@94+@91) */
w94 += w91;
/* #419: @91 = (2.*@22) */
w91 = (2.* w22 );
/* #420: @91 = (@91*@124) */
w91 *= w124;
/* #421: @94 = (@94+@91) */
w94 += w91;
/* #422: output[2][20] = @94 */
if (res[2]) res[2][20] = w94;
/* #423: @105 = zeros(2x1,0nz) */
/* #424: @106 = zeros(2x2,0nz) */
/* #425: @107 = zeros(2x5,0nz) */
/* #426: @108 = 0x1 */
/* #427: @109 = 0x1 */
/* #428: @110 = 0x4 */
/* #429: @111 = 0x1 */
/* #430: @112 = 0x1 */
/* #431: @86 = (-@95) */
for (i=0, rr=w86, cs=w95; i<2; ++i) *rr++ = (- *cs++ );
/* #432: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #433: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #434: @117 = 0x1 */
/* #435: @118 = 0x1 */
/* #436: @119 = 0x4 */
/* #437: @120 = 0x1 */
/* #438: @121 = 0x1 */
/* #439: {@89, @94, NULL, NULL, NULL, NULL} = adj1_F(@57, @25, @62, @63, @35, @64, @105, @106, @107, @108, @109, @110, @111, @112, @113, @86, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w57;
arg1[1]=(&w25);
arg1[2]=(&w62);
arg1[3]=(&w63);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w86;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w89;
res1[1]=(&w94);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #440: @89 = (@89+@92) */
for (i=0, rr=w89, cs=w92; i<2; ++i) (*rr++) += (*cs++);
/* #441: {@91, @76} = vertsplit(@89) */
w91 = w89[0];
w76 = w89[1];
/* #442: @96 = (@96+@91) */
w96 += w91;
/* #443: @20 = (2.*@20) */
w20 = (2.* w20 );
/* #444: @20 = (@20*@124) */
w20 *= w124;
/* #445: @96 = (@96+@20) */
w96 += w20;
/* #446: output[2][21] = @96 */
if (res[2]) res[2][21] = w96;
/* #447: @24 = (2.*@24) */
w24 = (2.* w24 );
/* #448: @24 = (@24*@124) */
w24 *= w124;
/* #449: @76 = (@76+@24) */
w76 += w24;
/* #450: output[2][22] = @76 */
if (res[2]) res[2][22] = w76;
/* #451: @97 = (@97+@94) */
w97 += w94;
/* #452: @94 = (2.*@25) */
w94 = (2.* w25 );
/* #453: @94 = (@94*@124) */
w94 *= w124;
/* #454: @97 = (@97+@94) */
w97 += w94;
/* #455: output[2][23] = @97 */
if (res[2]) res[2][23] = w97;
/* #456: @105 = zeros(2x1,0nz) */
/* #457: @106 = zeros(2x2,0nz) */
/* #458: @107 = zeros(2x5,0nz) */
/* #459: @108 = 0x1 */
/* #460: @109 = 0x1 */
/* #461: @110 = 0x4 */
/* #462: @111 = 0x1 */
/* #463: @112 = 0x1 */
/* #464: @89 = (-@98) */
for (i=0, rr=w89, cs=w98; i<2; ++i) *rr++ = (- *cs++ );
/* #465: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #466: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #467: @117 = 0x1 */
/* #468: @118 = 0x1 */
/* #469: @119 = 0x4 */
/* #470: @120 = 0x1 */
/* #471: @121 = 0x1 */
/* #472: {@92, @97, NULL, NULL, NULL, NULL} = adj1_F(@61, @28, @66, @67, @35, @68, @105, @106, @107, @108, @109, @110, @111, @112, @113, @89, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w61;
arg1[1]=(&w28);
arg1[2]=(&w66);
arg1[3]=(&w67);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w89;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w92;
res1[1]=(&w97);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #473: @92 = (@92+@95) */
for (i=0, rr=w92, cs=w95; i<2; ++i) (*rr++) += (*cs++);
/* #474: {@94, @76} = vertsplit(@92) */
w94 = w92[0];
w76 = w92[1];
/* #475: @99 = (@99+@94) */
w99 += w94;
/* #476: @23 = (2.*@23) */
w23 = (2.* w23 );
/* #477: @23 = (@23*@124) */
w23 *= w124;
/* #478: @99 = (@99+@23) */
w99 += w23;
/* #479: output[2][24] = @99 */
if (res[2]) res[2][24] = w99;
/* #480: @27 = (2.*@27) */
w27 = (2.* w27 );
/* #481: @27 = (@27*@124) */
w27 *= w124;
/* #482: @76 = (@76+@27) */
w76 += w27;
/* #483: output[2][25] = @76 */
if (res[2]) res[2][25] = w76;
/* #484: @100 = (@100+@97) */
w100 += w97;
/* #485: @97 = (2.*@28) */
w97 = (2.* w28 );
/* #486: @97 = (@97*@124) */
w97 *= w124;
/* #487: @100 = (@100+@97) */
w100 += w97;
/* #488: output[2][26] = @100 */
if (res[2]) res[2][26] = w100;
/* #489: @105 = zeros(2x1,0nz) */
/* #490: @106 = zeros(2x2,0nz) */
/* #491: @107 = zeros(2x5,0nz) */
/* #492: @108 = 0x1 */
/* #493: @109 = 0x1 */
/* #494: @110 = 0x4 */
/* #495: @111 = 0x1 */
/* #496: @112 = 0x1 */
/* #497: @92 = (-@101) */
for (i=0, rr=w92, cs=w101; i<2; ++i) *rr++ = (- *cs++ );
/* #498: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #499: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #500: @117 = 0x1 */
/* #501: @118 = 0x1 */
/* #502: @119 = 0x4 */
/* #503: @120 = 0x1 */
/* #504: @121 = 0x1 */
/* #505: {@95, @100, NULL, NULL, NULL, NULL} = adj1_F(@65, @31, @70, @71, @35, @72, @105, @106, @107, @108, @109, @110, @111, @112, @113, @92, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w65;
arg1[1]=(&w31);
arg1[2]=(&w70);
arg1[3]=(&w71);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w92;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w95;
res1[1]=(&w100);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #506: @95 = (@95+@98) */
for (i=0, rr=w95, cs=w98; i<2; ++i) (*rr++) += (*cs++);
/* #507: {@97, @76} = vertsplit(@95) */
w97 = w95[0];
w76 = w95[1];
/* #508: @102 = (@102+@97) */
w102 += w97;
/* #509: @26 = (2.*@26) */
w26 = (2.* w26 );
/* #510: @26 = (@26*@124) */
w26 *= w124;
/* #511: @102 = (@102+@26) */
w102 += w26;
/* #512: output[2][27] = @102 */
if (res[2]) res[2][27] = w102;
/* #513: @30 = (2.*@30) */
w30 = (2.* w30 );
/* #514: @30 = (@30*@124) */
w30 *= w124;
/* #515: @76 = (@76+@30) */
w76 += w30;
/* #516: output[2][28] = @76 */
if (res[2]) res[2][28] = w76;
/* #517: @103 = (@103+@100) */
w103 += w100;
/* #518: @100 = (2.*@31) */
w100 = (2.* w31 );
/* #519: @100 = (@100*@124) */
w100 *= w124;
/* #520: @103 = (@103+@100) */
w103 += w100;
/* #521: output[2][29] = @103 */
if (res[2]) res[2][29] = w103;
/* #522: {@103, @100} = vertsplit(@101) */
w103 = w101[0];
w100 = w101[1];
/* #523: @104 = (@104+@103) */
w104 += w103;
/* #524: @29 = (2.*@29) */
w29 = (2.* w29 );
/* #525: @29 = (@29*@124) */
w29 *= w124;
/* #526: @104 = (@104+@29) */
w104 += w29;
/* #527: output[2][30] = @104 */
if (res[2]) res[2][30] = w104;
/* #528: output[2][31] = @100 */
if (res[2]) res[2][31] = w100;
/* #529: @105 = zeros(2x1,0nz) */
/* #530: @106 = zeros(2x2,0nz) */
/* #531: @107 = zeros(2x5,0nz) */
/* #532: @108 = 0x1 */
/* #533: @109 = 0x1 */
/* #534: @110 = 0x4 */
/* #535: @111 = 0x1 */
/* #536: @112 = 0x1 */
/* #537: {@101, NULL, NULL, NULL, @95, NULL, NULL, @98, NULL, NULL, @92, NULL, NULL, @89, NULL, NULL, @86, NULL, NULL, @83, NULL, NULL, @80, NULL, NULL, @73, NULL, NULL, @69, NULL, NULL, NULL} = vertsplit(@74) */
casadi_copy(w74, 2, w101);
casadi_copy(w74+5, 2, w95);
casadi_copy(w74+9, 2, w98);
casadi_copy(w74+13, 2, w92);
casadi_copy(w74+17, 2, w89);
casadi_copy(w74+21, 2, w86);
casadi_copy(w74+25, 2, w83);
casadi_copy(w74+29, 2, w80);
casadi_copy(w74+33, 2, w73);
casadi_copy(w74+37, 2, w69);
/* #538: @69 = (-@69) */
for (i=0, rr=w69, cs=w69; i<2; ++i) *rr++ = (- *cs++ );
/* #539: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #540: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #541: @117 = 0x1 */
/* #542: @118 = 0x1 */
/* #543: @119 = 0x4 */
/* #544: @120 = 0x1 */
/* #545: @121 = 0x1 */
/* #546: {NULL, NULL, NULL, NULL, @100, NULL} = adj1_F(@65, @31, @70, @71, @35, @72, @105, @106, @107, @108, @109, @110, @111, @112, @113, @69, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w65;
arg1[1]=(&w31);
arg1[2]=(&w70);
arg1[3]=(&w71);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w69;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w100);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #547: @72 = zeros(2x1,0nz) */
/* #548: @105 = zeros(2x2,0nz) */
/* #549: @106 = zeros(2x5,0nz) */
/* #550: @107 = 0x1 */
/* #551: @108 = 0x1 */
/* #552: @109 = 0x4 */
/* #553: @110 = 0x1 */
/* #554: @111 = 0x1 */
/* #555: @73 = (-@73) */
for (i=0, rr=w73, cs=w73; i<2; ++i) *rr++ = (- *cs++ );
/* #556: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #557: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #558: @112 = 0x1 */
/* #559: @117 = 0x1 */
/* #560: @118 = 0x4 */
/* #561: @119 = 0x1 */
/* #562: @120 = 0x1 */
/* #563: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@61, @28, @66, @67, @35, @68, @72, @105, @106, @107, @108, @109, @110, @111, @113, @73, @115, @116, @112, @117, @118, @119, @120, @113) */
arg1[0]=w61;
arg1[1]=(&w28);
arg1[2]=(&w66);
arg1[3]=(&w67);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w73;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #564: @100 = (@100+@31) */
w100 += w31;
/* #565: @68 = zeros(2x1,0nz) */
/* #566: @72 = zeros(2x2,0nz) */
/* #567: @105 = zeros(2x5,0nz) */
/* #568: @106 = 0x1 */
/* #569: @107 = 0x1 */
/* #570: @108 = 0x4 */
/* #571: @109 = 0x1 */
/* #572: @110 = 0x1 */
/* #573: @80 = (-@80) */
for (i=0, rr=w80, cs=w80; i<2; ++i) *rr++ = (- *cs++ );
/* #574: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #575: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #576: @111 = 0x1 */
/* #577: @112 = 0x1 */
/* #578: @117 = 0x4 */
/* #579: @118 = 0x1 */
/* #580: @119 = 0x1 */
/* #581: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@57, @25, @62, @63, @35, @64, @68, @72, @105, @106, @107, @108, @109, @110, @113, @80, @115, @116, @111, @112, @117, @118, @119, @113) */
arg1[0]=w57;
arg1[1]=(&w25);
arg1[2]=(&w62);
arg1[3]=(&w63);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w80;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #582: @100 = (@100+@31) */
w100 += w31;
/* #583: @64 = zeros(2x1,0nz) */
/* #584: @68 = zeros(2x2,0nz) */
/* #585: @72 = zeros(2x5,0nz) */
/* #586: @105 = 0x1 */
/* #587: @106 = 0x1 */
/* #588: @107 = 0x4 */
/* #589: @108 = 0x1 */
/* #590: @109 = 0x1 */
/* #591: @83 = (-@83) */
for (i=0, rr=w83, cs=w83; i<2; ++i) *rr++ = (- *cs++ );
/* #592: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #593: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #594: @110 = 0x1 */
/* #595: @111 = 0x1 */
/* #596: @112 = 0x4 */
/* #597: @117 = 0x1 */
/* #598: @118 = 0x1 */
/* #599: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@53, @22, @58, @59, @35, @60, @64, @68, @72, @105, @106, @107, @108, @109, @113, @83, @115, @116, @110, @111, @112, @117, @118, @113) */
arg1[0]=w53;
arg1[1]=(&w22);
arg1[2]=(&w58);
arg1[3]=(&w59);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w83;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #600: @100 = (@100+@31) */
w100 += w31;
/* #601: @60 = zeros(2x1,0nz) */
/* #602: @64 = zeros(2x2,0nz) */
/* #603: @68 = zeros(2x5,0nz) */
/* #604: @72 = 0x1 */
/* #605: @105 = 0x1 */
/* #606: @106 = 0x4 */
/* #607: @107 = 0x1 */
/* #608: @108 = 0x1 */
/* #609: @86 = (-@86) */
for (i=0, rr=w86, cs=w86; i<2; ++i) *rr++ = (- *cs++ );
/* #610: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #611: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #612: @109 = 0x1 */
/* #613: @110 = 0x1 */
/* #614: @111 = 0x4 */
/* #615: @112 = 0x1 */
/* #616: @117 = 0x1 */
/* #617: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@49, @19, @54, @55, @35, @56, @60, @64, @68, @72, @105, @106, @107, @108, @113, @86, @115, @116, @109, @110, @111, @112, @117, @113) */
arg1[0]=w49;
arg1[1]=(&w19);
arg1[2]=(&w54);
arg1[3]=(&w55);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w86;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #618: @100 = (@100+@31) */
w100 += w31;
/* #619: @56 = zeros(2x1,0nz) */
/* #620: @60 = zeros(2x2,0nz) */
/* #621: @64 = zeros(2x5,0nz) */
/* #622: @68 = 0x1 */
/* #623: @72 = 0x1 */
/* #624: @105 = 0x4 */
/* #625: @106 = 0x1 */
/* #626: @107 = 0x1 */
/* #627: @89 = (-@89) */
for (i=0, rr=w89, cs=w89; i<2; ++i) *rr++ = (- *cs++ );
/* #628: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #629: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #630: @108 = 0x1 */
/* #631: @109 = 0x1 */
/* #632: @110 = 0x4 */
/* #633: @111 = 0x1 */
/* #634: @112 = 0x1 */
/* #635: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@45, @16, @50, @51, @35, @52, @56, @60, @64, @68, @72, @105, @106, @107, @113, @89, @115, @116, @108, @109, @110, @111, @112, @113) */
arg1[0]=w45;
arg1[1]=(&w16);
arg1[2]=(&w50);
arg1[3]=(&w51);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w89;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #636: @100 = (@100+@31) */
w100 += w31;
/* #637: @52 = zeros(2x1,0nz) */
/* #638: @56 = zeros(2x2,0nz) */
/* #639: @60 = zeros(2x5,0nz) */
/* #640: @64 = 0x1 */
/* #641: @68 = 0x1 */
/* #642: @72 = 0x4 */
/* #643: @105 = 0x1 */
/* #644: @106 = 0x1 */
/* #645: @92 = (-@92) */
for (i=0, rr=w92, cs=w92; i<2; ++i) *rr++ = (- *cs++ );
/* #646: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #647: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #648: @107 = 0x1 */
/* #649: @108 = 0x1 */
/* #650: @109 = 0x4 */
/* #651: @110 = 0x1 */
/* #652: @111 = 0x1 */
/* #653: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@41, @13, @46, @47, @35, @48, @52, @56, @60, @64, @68, @72, @105, @106, @113, @92, @115, @116, @107, @108, @109, @110, @111, @113) */
arg1[0]=w41;
arg1[1]=(&w13);
arg1[2]=(&w46);
arg1[3]=(&w47);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w92;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #654: @100 = (@100+@31) */
w100 += w31;
/* #655: @48 = zeros(2x1,0nz) */
/* #656: @52 = zeros(2x2,0nz) */
/* #657: @56 = zeros(2x5,0nz) */
/* #658: @60 = 0x1 */
/* #659: @64 = 0x1 */
/* #660: @68 = 0x4 */
/* #661: @72 = 0x1 */
/* #662: @105 = 0x1 */
/* #663: @98 = (-@98) */
for (i=0, rr=w98, cs=w98; i<2; ++i) *rr++ = (- *cs++ );
/* #664: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #665: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #666: @106 = 0x1 */
/* #667: @107 = 0x1 */
/* #668: @108 = 0x4 */
/* #669: @109 = 0x1 */
/* #670: @110 = 0x1 */
/* #671: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@37, @10, @42, @43, @35, @44, @48, @52, @56, @60, @64, @68, @72, @105, @113, @98, @115, @116, @106, @107, @108, @109, @110, @113) */
arg1[0]=w37;
arg1[1]=(&w10);
arg1[2]=(&w42);
arg1[3]=(&w43);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w98;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #672: @100 = (@100+@31) */
w100 += w31;
/* #673: @44 = zeros(2x1,0nz) */
/* #674: @48 = zeros(2x2,0nz) */
/* #675: @52 = zeros(2x5,0nz) */
/* #676: @56 = 0x1 */
/* #677: @60 = 0x1 */
/* #678: @64 = 0x4 */
/* #679: @68 = 0x1 */
/* #680: @72 = 0x1 */
/* #681: @95 = (-@95) */
for (i=0, rr=w95, cs=w95; i<2; ++i) *rr++ = (- *cs++ );
/* #682: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #683: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #684: @105 = 0x1 */
/* #685: @106 = 0x1 */
/* #686: @107 = 0x4 */
/* #687: @108 = 0x1 */
/* #688: @109 = 0x1 */
/* #689: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@33, @7, @38, @39, @35, @40, @44, @48, @52, @56, @60, @64, @68, @72, @113, @95, @115, @116, @105, @106, @107, @108, @109, @113) */
arg1[0]=w33;
arg1[1]=(&w7);
arg1[2]=(&w38);
arg1[3]=(&w39);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w95;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #690: @100 = (@100+@31) */
w100 += w31;
/* #691: @40 = zeros(2x1,0nz) */
/* #692: @44 = zeros(2x2,0nz) */
/* #693: @48 = zeros(2x5,0nz) */
/* #694: @52 = 0x1 */
/* #695: @56 = 0x1 */
/* #696: @60 = 0x4 */
/* #697: @64 = 0x1 */
/* #698: @68 = 0x1 */
/* #699: @101 = (-@101) */
for (i=0, rr=w101, cs=w101; i<2; ++i) *rr++ = (- *cs++ );
/* #700: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #701: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #702: @72 = 0x1 */
/* #703: @105 = 0x1 */
/* #704: @106 = 0x4 */
/* #705: @107 = 0x1 */
/* #706: @108 = 0x1 */
/* #707: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@34, @3, @1, @32, @35, @36, @40, @44, @48, @52, @56, @60, @64, @68, @113, @101, @115, @116, @72, @105, @106, @107, @108, @113) */
arg1[0]=w34;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w32);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w101;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #708: @100 = (@100+@31) */
w100 += w31;
/* #709: output[3][0] = @100 */
if (res[3]) res[3][0] = w100;
return 0;
}
/* nlp_f:(x[32],p)->(f) */
static int casadi_f9(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real w0, w1, w2;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: @0 = sq(@0) */
w0 = casadi_sq( w0 );
/* #2: @1 = input[0][1] */
w1 = arg[0] ? arg[0][1] : 0;
/* #3: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #4: @0 = (@0+@1) */
w0 += w1;
/* #5: @1 = input[0][2] */
w1 = arg[0] ? arg[0][2] : 0;
/* #6: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #7: @0 = (@0+@1) */
w0 += w1;
/* #8: @1 = input[0][3] */
w1 = arg[0] ? arg[0][3] : 0;
/* #9: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #10: @2 = input[0][4] */
w2 = arg[0] ? arg[0][4] : 0;
/* #11: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #12: @1 = (@1+@2) */
w1 += w2;
/* #13: @2 = input[0][5] */
w2 = arg[0] ? arg[0][5] : 0;
/* #14: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #15: @1 = (@1+@2) */
w1 += w2;
/* #16: @0 = (@0+@1) */
w0 += w1;
/* #17: @1 = input[0][6] */
w1 = arg[0] ? arg[0][6] : 0;
/* #18: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #19: @2 = input[0][7] */
w2 = arg[0] ? arg[0][7] : 0;
/* #20: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #21: @1 = (@1+@2) */
w1 += w2;
/* #22: @2 = input[0][8] */
w2 = arg[0] ? arg[0][8] : 0;
/* #23: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #24: @1 = (@1+@2) */
w1 += w2;
/* #25: @0 = (@0+@1) */
w0 += w1;
/* #26: @1 = input[0][9] */
w1 = arg[0] ? arg[0][9] : 0;
/* #27: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #28: @2 = input[0][10] */
w2 = arg[0] ? arg[0][10] : 0;
/* #29: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #30: @1 = (@1+@2) */
w1 += w2;
/* #31: @2 = input[0][11] */
w2 = arg[0] ? arg[0][11] : 0;
/* #32: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #33: @1 = (@1+@2) */
w1 += w2;
/* #34: @0 = (@0+@1) */
w0 += w1;
/* #35: @1 = input[0][12] */
w1 = arg[0] ? arg[0][12] : 0;
/* #36: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #37: @2 = input[0][13] */
w2 = arg[0] ? arg[0][13] : 0;
/* #38: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #39: @1 = (@1+@2) */
w1 += w2;
/* #40: @2 = input[0][14] */
w2 = arg[0] ? arg[0][14] : 0;
/* #41: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #42: @1 = (@1+@2) */
w1 += w2;
/* #43: @0 = (@0+@1) */
w0 += w1;
/* #44: @1 = input[0][15] */
w1 = arg[0] ? arg[0][15] : 0;
/* #45: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #46: @2 = input[0][16] */
w2 = arg[0] ? arg[0][16] : 0;
/* #47: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #48: @1 = (@1+@2) */
w1 += w2;
/* #49: @2 = input[0][17] */
w2 = arg[0] ? arg[0][17] : 0;
/* #50: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #51: @1 = (@1+@2) */
w1 += w2;
/* #52: @0 = (@0+@1) */
w0 += w1;
/* #53: @1 = input[0][18] */
w1 = arg[0] ? arg[0][18] : 0;
/* #54: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #55: @2 = input[0][19] */
w2 = arg[0] ? arg[0][19] : 0;
/* #56: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #57: @1 = (@1+@2) */
w1 += w2;
/* #58: @2 = input[0][20] */
w2 = arg[0] ? arg[0][20] : 0;
/* #59: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #60: @1 = (@1+@2) */
w1 += w2;
/* #61: @0 = (@0+@1) */
w0 += w1;
/* #62: @1 = input[0][21] */
w1 = arg[0] ? arg[0][21] : 0;
/* #63: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #64: @2 = input[0][22] */
w2 = arg[0] ? arg[0][22] : 0;
/* #65: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #66: @1 = (@1+@2) */
w1 += w2;
/* #67: @2 = input[0][23] */
w2 = arg[0] ? arg[0][23] : 0;
/* #68: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #69: @1 = (@1+@2) */
w1 += w2;
/* #70: @0 = (@0+@1) */
w0 += w1;
/* #71: @1 = input[0][24] */
w1 = arg[0] ? arg[0][24] : 0;
/* #72: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #73: @2 = input[0][25] */
w2 = arg[0] ? arg[0][25] : 0;
/* #74: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #75: @1 = (@1+@2) */
w1 += w2;
/* #76: @2 = input[0][26] */
w2 = arg[0] ? arg[0][26] : 0;
/* #77: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #78: @1 = (@1+@2) */
w1 += w2;
/* #79: @0 = (@0+@1) */
w0 += w1;
/* #80: @1 = input[0][27] */
w1 = arg[0] ? arg[0][27] : 0;
/* #81: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #82: @2 = input[0][28] */
w2 = arg[0] ? arg[0][28] : 0;
/* #83: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #84: @1 = (@1+@2) */
w1 += w2;
/* #85: @2 = input[0][29] */
w2 = arg[0] ? arg[0][29] : 0;
/* #86: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #87: @1 = (@1+@2) */
w1 += w2;
/* #88: @0 = (@0+@1) */
w0 += w1;
/* #89: @1 = input[0][30] */
w1 = arg[0] ? arg[0][30] : 0;
/* #90: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #91: @0 = (@0+@1) */
w0 += w1;
/* #92: output[0][0] = @0 */
if (res[0]) res[0][0] = w0;
return 0;
}
/* nlp_grad_f:(x[32],p)->(f,grad_f_x[32]) */
static int casadi_f10(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *rr;
casadi_real w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, w17, w18, w19, w20, w21, w22, w23, w24, w25, w26, w27, w28, w29, w30, w31, w32, *w34=w+33, *w35=w+64;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: @1 = sq(@0) */
w1 = casadi_sq( w0 );
/* #2: @2 = input[0][1] */
w2 = arg[0] ? arg[0][1] : 0;
/* #3: @3 = sq(@2) */
w3 = casadi_sq( w2 );
/* #4: @1 = (@1+@3) */
w1 += w3;
/* #5: @3 = input[0][2] */
w3 = arg[0] ? arg[0][2] : 0;
/* #6: @4 = sq(@3) */
w4 = casadi_sq( w3 );
/* #7: @1 = (@1+@4) */
w1 += w4;
/* #8: @4 = input[0][3] */
w4 = arg[0] ? arg[0][3] : 0;
/* #9: @5 = sq(@4) */
w5 = casadi_sq( w4 );
/* #10: @6 = input[0][4] */
w6 = arg[0] ? arg[0][4] : 0;
/* #11: @7 = sq(@6) */
w7 = casadi_sq( w6 );
/* #12: @5 = (@5+@7) */
w5 += w7;
/* #13: @7 = input[0][5] */
w7 = arg[0] ? arg[0][5] : 0;
/* #14: @8 = sq(@7) */
w8 = casadi_sq( w7 );
/* #15: @5 = (@5+@8) */
w5 += w8;
/* #16: @1 = (@1+@5) */
w1 += w5;
/* #17: @5 = input[0][6] */
w5 = arg[0] ? arg[0][6] : 0;
/* #18: @8 = sq(@5) */
w8 = casadi_sq( w5 );
/* #19: @9 = input[0][7] */
w9 = arg[0] ? arg[0][7] : 0;
/* #20: @10 = sq(@9) */
w10 = casadi_sq( w9 );
/* #21: @8 = (@8+@10) */
w8 += w10;
/* #22: @10 = input[0][8] */
w10 = arg[0] ? arg[0][8] : 0;
/* #23: @11 = sq(@10) */
w11 = casadi_sq( w10 );
/* #24: @8 = (@8+@11) */
w8 += w11;
/* #25: @1 = (@1+@8) */
w1 += w8;
/* #26: @8 = input[0][9] */
w8 = arg[0] ? arg[0][9] : 0;
/* #27: @11 = sq(@8) */
w11 = casadi_sq( w8 );
/* #28: @12 = input[0][10] */
w12 = arg[0] ? arg[0][10] : 0;
/* #29: @13 = sq(@12) */
w13 = casadi_sq( w12 );
/* #30: @11 = (@11+@13) */
w11 += w13;
/* #31: @13 = input[0][11] */
w13 = arg[0] ? arg[0][11] : 0;
/* #32: @14 = sq(@13) */
w14 = casadi_sq( w13 );
/* #33: @11 = (@11+@14) */
w11 += w14;
/* #34: @1 = (@1+@11) */
w1 += w11;
/* #35: @11 = input[0][12] */
w11 = arg[0] ? arg[0][12] : 0;
/* #36: @14 = sq(@11) */
w14 = casadi_sq( w11 );
/* #37: @15 = input[0][13] */
w15 = arg[0] ? arg[0][13] : 0;
/* #38: @16 = sq(@15) */
w16 = casadi_sq( w15 );
/* #39: @14 = (@14+@16) */
w14 += w16;
/* #40: @16 = input[0][14] */
w16 = arg[0] ? arg[0][14] : 0;
/* #41: @17 = sq(@16) */
w17 = casadi_sq( w16 );
/* #42: @14 = (@14+@17) */
w14 += w17;
/* #43: @1 = (@1+@14) */
w1 += w14;
/* #44: @14 = input[0][15] */
w14 = arg[0] ? arg[0][15] : 0;
/* #45: @17 = sq(@14) */
w17 = casadi_sq( w14 );
/* #46: @18 = input[0][16] */
w18 = arg[0] ? arg[0][16] : 0;
/* #47: @19 = sq(@18) */
w19 = casadi_sq( w18 );
/* #48: @17 = (@17+@19) */
w17 += w19;
/* #49: @19 = input[0][17] */
w19 = arg[0] ? arg[0][17] : 0;
/* #50: @20 = sq(@19) */
w20 = casadi_sq( w19 );
/* #51: @17 = (@17+@20) */
w17 += w20;
/* #52: @1 = (@1+@17) */
w1 += w17;
/* #53: @17 = input[0][18] */
w17 = arg[0] ? arg[0][18] : 0;
/* #54: @20 = sq(@17) */
w20 = casadi_sq( w17 );
/* #55: @21 = input[0][19] */
w21 = arg[0] ? arg[0][19] : 0;
/* #56: @22 = sq(@21) */
w22 = casadi_sq( w21 );
/* #57: @20 = (@20+@22) */
w20 += w22;
/* #58: @22 = input[0][20] */
w22 = arg[0] ? arg[0][20] : 0;
/* #59: @23 = sq(@22) */
w23 = casadi_sq( w22 );
/* #60: @20 = (@20+@23) */
w20 += w23;
/* #61: @1 = (@1+@20) */
w1 += w20;
/* #62: @20 = input[0][21] */
w20 = arg[0] ? arg[0][21] : 0;
/* #63: @23 = sq(@20) */
w23 = casadi_sq( w20 );
/* #64: @24 = input[0][22] */
w24 = arg[0] ? arg[0][22] : 0;
/* #65: @25 = sq(@24) */
w25 = casadi_sq( w24 );
/* #66: @23 = (@23+@25) */
w23 += w25;
/* #67: @25 = input[0][23] */
w25 = arg[0] ? arg[0][23] : 0;
/* #68: @26 = sq(@25) */
w26 = casadi_sq( w25 );
/* #69: @23 = (@23+@26) */
w23 += w26;
/* #70: @1 = (@1+@23) */
w1 += w23;
/* #71: @23 = input[0][24] */
w23 = arg[0] ? arg[0][24] : 0;
/* #72: @26 = sq(@23) */
w26 = casadi_sq( w23 );
/* #73: @27 = input[0][25] */
w27 = arg[0] ? arg[0][25] : 0;
/* #74: @28 = sq(@27) */
w28 = casadi_sq( w27 );
/* #75: @26 = (@26+@28) */
w26 += w28;
/* #76: @28 = input[0][26] */
w28 = arg[0] ? arg[0][26] : 0;
/* #77: @29 = sq(@28) */
w29 = casadi_sq( w28 );
/* #78: @26 = (@26+@29) */
w26 += w29;
/* #79: @1 = (@1+@26) */
w1 += w26;
/* #80: @26 = input[0][27] */
w26 = arg[0] ? arg[0][27] : 0;
/* #81: @29 = sq(@26) */
w29 = casadi_sq( w26 );
/* #82: @30 = input[0][28] */
w30 = arg[0] ? arg[0][28] : 0;
/* #83: @31 = sq(@30) */
w31 = casadi_sq( w30 );
/* #84: @29 = (@29+@31) */
w29 += w31;
/* #85: @31 = input[0][29] */
w31 = arg[0] ? arg[0][29] : 0;
/* #86: @32 = sq(@31) */
w32 = casadi_sq( w31 );
/* #87: @29 = (@29+@32) */
w29 += w32;
/* #88: @1 = (@1+@29) */
w1 += w29;
/* #89: @29 = input[0][30] */
w29 = arg[0] ? arg[0][30] : 0;
/* #90: @32 = sq(@29) */
w32 = casadi_sq( w29 );
/* #91: @1 = (@1+@32) */
w1 += w32;
/* #92: output[0][0] = @1 */
if (res[0]) res[0][0] = w1;
/* #93: @0 = (2.*@0) */
w0 = (2.* w0 );
/* #94: @2 = (2.*@2) */
w2 = (2.* w2 );
/* #95: @3 = (2.*@3) */
w3 = (2.* w3 );
/* #96: @4 = (2.*@4) */
w4 = (2.* w4 );
/* #97: @6 = (2.*@6) */
w6 = (2.* w6 );
/* #98: @7 = (2.*@7) */
w7 = (2.* w7 );
/* #99: @5 = (2.*@5) */
w5 = (2.* w5 );
/* #100: @9 = (2.*@9) */
w9 = (2.* w9 );
/* #101: @10 = (2.*@10) */
w10 = (2.* w10 );
/* #102: @8 = (2.*@8) */
w8 = (2.* w8 );
/* #103: @12 = (2.*@12) */
w12 = (2.* w12 );
/* #104: @13 = (2.*@13) */
w13 = (2.* w13 );
/* #105: @11 = (2.*@11) */
w11 = (2.* w11 );
/* #106: @15 = (2.*@15) */
w15 = (2.* w15 );
/* #107: @16 = (2.*@16) */
w16 = (2.* w16 );
/* #108: @14 = (2.*@14) */
w14 = (2.* w14 );
/* #109: @18 = (2.*@18) */
w18 = (2.* w18 );
/* #110: @19 = (2.*@19) */
w19 = (2.* w19 );
/* #111: @17 = (2.*@17) */
w17 = (2.* w17 );
/* #112: @21 = (2.*@21) */
w21 = (2.* w21 );
/* #113: @22 = (2.*@22) */
w22 = (2.* w22 );
/* #114: @20 = (2.*@20) */
w20 = (2.* w20 );
/* #115: @24 = (2.*@24) */
w24 = (2.* w24 );
/* #116: @25 = (2.*@25) */
w25 = (2.* w25 );
/* #117: @23 = (2.*@23) */
w23 = (2.* w23 );
/* #118: @27 = (2.*@27) */
w27 = (2.* w27 );
/* #119: @28 = (2.*@28) */
w28 = (2.* w28 );
/* #120: @26 = (2.*@26) */
w26 = (2.* w26 );
/* #121: @30 = (2.*@30) */
w30 = (2.* w30 );
/* #122: @31 = (2.*@31) */
w31 = (2.* w31 );
/* #123: @29 = (2.*@29) */
w29 = (2.* w29 );
/* #124: @33 = 00 */
/* #125: @34 = vertcat(@0, @2, @3, @4, @6, @7, @5, @9, @10, @8, @12, @13, @11, @15, @16, @14, @18, @19, @17, @21, @22, @20, @24, @25, @23, @27, @28, @26, @30, @31, @29, @33) */
rr=w34;
*rr++ = w0;
*rr++ = w2;
*rr++ = w3;
*rr++ = w4;
*rr++ = w6;
*rr++ = w7;
*rr++ = w5;
*rr++ = w9;
*rr++ = w10;
*rr++ = w8;
*rr++ = w12;
*rr++ = w13;
*rr++ = w11;
*rr++ = w15;
*rr++ = w16;
*rr++ = w14;
*rr++ = w18;
*rr++ = w19;
*rr++ = w17;
*rr++ = w21;
*rr++ = w22;
*rr++ = w20;
*rr++ = w24;
*rr++ = w25;
*rr++ = w23;
*rr++ = w27;
*rr++ = w28;
*rr++ = w26;
*rr++ = w30;
*rr++ = w31;
*rr++ = w29;
/* #126: @35 = dense(@34) */
casadi_densify(w34, casadi_s0, w35, 0);
/* #127: output[1][0] = @35 */
casadi_copy(w35, 32, res[1]);
return 0;
}
/* nlp_g:(x[32],p)->(g[42]) */
static int casadi_f11(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+1, *rr;
const casadi_real **arg1=arg+2, *cr, *cs;
casadi_real w0, w1, *w2=w+42, w3, *w4=w+45, w5, w6, w7, w8, *w10=w+51;
/* #0: @0 = input[0][3] */
w0 = arg[0] ? arg[0][3] : 0;
/* #1: @1 = input[0][4] */
w1 = arg[0] ? arg[0][4] : 0;
/* #2: @2 = vertcat(@0, @1) */
rr=w2;
*rr++ = w0;
*rr++ = w1;
/* #3: @1 = input[0][0] */
w1 = arg[0] ? arg[0][0] : 0;
/* #4: @3 = input[0][1] */
w3 = arg[0] ? arg[0][1] : 0;
/* #5: @4 = vertcat(@1, @3) */
rr=w4;
*rr++ = w1;
*rr++ = w3;
/* #6: @5 = input[0][2] */
w5 = arg[0] ? arg[0][2] : 0;
/* #7: @6 = 1 */
w6 = 1.;
/* #8: @7 = 0 */
w7 = 0.;
/* #9: @8 = input[1][0] */
w8 = arg[1] ? arg[1][0] : 0;
/* #10: @9 = 0x1 */
/* #11: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @6, @7, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w6);
arg1[3]=(&w7);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #12: @10 = (@2-@10) */
for (i=0, rr=w10, cr=w2, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #13: output[0][0] = @10 */
casadi_copy(w10, 2, res[0]);
/* #14: output[0][1] = @1 */
if (res[0]) res[0][2] = w1;
/* #15: output[0][2] = @3 */
if (res[0]) res[0][3] = w3;
/* #16: output[0][3] = @5 */
if (res[0]) res[0][4] = w5;
/* #17: @5 = input[0][6] */
w5 = arg[0] ? arg[0][6] : 0;
/* #18: @3 = input[0][7] */
w3 = arg[0] ? arg[0][7] : 0;
/* #19: @10 = vertcat(@5, @3) */
rr=w10;
*rr++ = w5;
*rr++ = w3;
/* #20: @3 = input[0][5] */
w3 = arg[0] ? arg[0][5] : 0;
/* #21: @1 = 1 */
w1 = 1.;
/* #22: @6 = 1 */
w6 = 1.;
/* #23: @9 = 0x1 */
/* #24: {@4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@2, @3, @1, @6, @8, @9) */
arg1[0]=w2;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w4;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #25: @4 = (@10-@4) */
for (i=0, rr=w4, cr=w10, cs=w4; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #26: output[0][4] = @4 */
if (res[0]) casadi_copy(w4, 2, res[0]+5);
/* #27: output[0][5] = @0 */
if (res[0]) res[0][7] = w0;
/* #28: output[0][6] = @3 */
if (res[0]) res[0][8] = w3;
/* #29: @3 = input[0][9] */
w3 = arg[0] ? arg[0][9] : 0;
/* #30: @0 = input[0][10] */
w0 = arg[0] ? arg[0][10] : 0;
/* #31: @4 = vertcat(@3, @0) */
rr=w4;
*rr++ = w3;
*rr++ = w0;
/* #32: @0 = input[0][8] */
w0 = arg[0] ? arg[0][8] : 0;
/* #33: @1 = 1 */
w1 = 1.;
/* #34: @6 = 2 */
w6 = 2.;
/* #35: @9 = 0x1 */
/* #36: {@2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@10, @0, @1, @6, @8, @9) */
arg1[0]=w10;
arg1[1]=(&w0);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w2;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #37: @2 = (@4-@2) */
for (i=0, rr=w2, cr=w4, cs=w2; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #38: output[0][7] = @2 */
if (res[0]) casadi_copy(w2, 2, res[0]+9);
/* #39: output[0][8] = @5 */
if (res[0]) res[0][11] = w5;
/* #40: output[0][9] = @0 */
if (res[0]) res[0][12] = w0;
/* #41: @0 = input[0][12] */
w0 = arg[0] ? arg[0][12] : 0;
/* #42: @5 = input[0][13] */
w5 = arg[0] ? arg[0][13] : 0;
/* #43: @2 = vertcat(@0, @5) */
rr=w2;
*rr++ = w0;
*rr++ = w5;
/* #44: @5 = input[0][11] */
w5 = arg[0] ? arg[0][11] : 0;
/* #45: @1 = 1 */
w1 = 1.;
/* #46: @6 = 3 */
w6 = 3.;
/* #47: @9 = 0x1 */
/* #48: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @1, @6, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #49: @10 = (@2-@10) */
for (i=0, rr=w10, cr=w2, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #50: output[0][10] = @10 */
if (res[0]) casadi_copy(w10, 2, res[0]+13);
/* #51: output[0][11] = @3 */
if (res[0]) res[0][15] = w3;
/* #52: output[0][12] = @5 */
if (res[0]) res[0][16] = w5;
/* #53: @5 = input[0][15] */
w5 = arg[0] ? arg[0][15] : 0;
/* #54: @3 = input[0][16] */
w3 = arg[0] ? arg[0][16] : 0;
/* #55: @10 = vertcat(@5, @3) */
rr=w10;
*rr++ = w5;
*rr++ = w3;
/* #56: @3 = input[0][14] */
w3 = arg[0] ? arg[0][14] : 0;
/* #57: @1 = 1 */
w1 = 1.;
/* #58: @6 = 4 */
w6 = 4.;
/* #59: @9 = 0x1 */
/* #60: {@4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@2, @3, @1, @6, @8, @9) */
arg1[0]=w2;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w4;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #61: @4 = (@10-@4) */
for (i=0, rr=w4, cr=w10, cs=w4; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #62: output[0][13] = @4 */
if (res[0]) casadi_copy(w4, 2, res[0]+17);
/* #63: output[0][14] = @0 */
if (res[0]) res[0][19] = w0;
/* #64: output[0][15] = @3 */
if (res[0]) res[0][20] = w3;
/* #65: @3 = input[0][18] */
w3 = arg[0] ? arg[0][18] : 0;
/* #66: @0 = input[0][19] */
w0 = arg[0] ? arg[0][19] : 0;
/* #67: @4 = vertcat(@3, @0) */
rr=w4;
*rr++ = w3;
*rr++ = w0;
/* #68: @0 = input[0][17] */
w0 = arg[0] ? arg[0][17] : 0;
/* #69: @1 = 1 */
w1 = 1.;
/* #70: @6 = 5 */
w6 = 5.;
/* #71: @9 = 0x1 */
/* #72: {@2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@10, @0, @1, @6, @8, @9) */
arg1[0]=w10;
arg1[1]=(&w0);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w2;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #73: @2 = (@4-@2) */
for (i=0, rr=w2, cr=w4, cs=w2; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #74: output[0][16] = @2 */
if (res[0]) casadi_copy(w2, 2, res[0]+21);
/* #75: output[0][17] = @5 */
if (res[0]) res[0][23] = w5;
/* #76: output[0][18] = @0 */
if (res[0]) res[0][24] = w0;
/* #77: @0 = input[0][21] */
w0 = arg[0] ? arg[0][21] : 0;
/* #78: @5 = input[0][22] */
w5 = arg[0] ? arg[0][22] : 0;
/* #79: @2 = vertcat(@0, @5) */
rr=w2;
*rr++ = w0;
*rr++ = w5;
/* #80: @5 = input[0][20] */
w5 = arg[0] ? arg[0][20] : 0;
/* #81: @1 = 1 */
w1 = 1.;
/* #82: @6 = 6 */
w6 = 6.;
/* #83: @9 = 0x1 */
/* #84: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @1, @6, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #85: @10 = (@2-@10) */
for (i=0, rr=w10, cr=w2, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #86: output[0][19] = @10 */
if (res[0]) casadi_copy(w10, 2, res[0]+25);
/* #87: output[0][20] = @3 */
if (res[0]) res[0][27] = w3;
/* #88: output[0][21] = @5 */
if (res[0]) res[0][28] = w5;
/* #89: @5 = input[0][24] */
w5 = arg[0] ? arg[0][24] : 0;
/* #90: @3 = input[0][25] */
w3 = arg[0] ? arg[0][25] : 0;
/* #91: @10 = vertcat(@5, @3) */
rr=w10;
*rr++ = w5;
*rr++ = w3;
/* #92: @3 = input[0][23] */
w3 = arg[0] ? arg[0][23] : 0;
/* #93: @1 = 1 */
w1 = 1.;
/* #94: @6 = 7 */
w6 = 7.;
/* #95: @9 = 0x1 */
/* #96: {@4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@2, @3, @1, @6, @8, @9) */
arg1[0]=w2;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w4;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #97: @4 = (@10-@4) */
for (i=0, rr=w4, cr=w10, cs=w4; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #98: output[0][22] = @4 */
if (res[0]) casadi_copy(w4, 2, res[0]+29);
/* #99: output[0][23] = @0 */
if (res[0]) res[0][31] = w0;
/* #100: output[0][24] = @3 */
if (res[0]) res[0][32] = w3;
/* #101: @3 = input[0][27] */
w3 = arg[0] ? arg[0][27] : 0;
/* #102: @0 = input[0][28] */
w0 = arg[0] ? arg[0][28] : 0;
/* #103: @4 = vertcat(@3, @0) */
rr=w4;
*rr++ = w3;
*rr++ = w0;
/* #104: @0 = input[0][26] */
w0 = arg[0] ? arg[0][26] : 0;
/* #105: @1 = 1 */
w1 = 1.;
/* #106: @6 = 8 */
w6 = 8.;
/* #107: @9 = 0x1 */
/* #108: {@2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@10, @0, @1, @6, @8, @9) */
arg1[0]=w10;
arg1[1]=(&w0);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w2;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #109: @2 = (@4-@2) */
for (i=0, rr=w2, cr=w4, cs=w2; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #110: output[0][25] = @2 */
if (res[0]) casadi_copy(w2, 2, res[0]+33);
/* #111: output[0][26] = @5 */
if (res[0]) res[0][35] = w5;
/* #112: output[0][27] = @0 */
if (res[0]) res[0][36] = w0;
/* #113: @0 = input[0][30] */
w0 = arg[0] ? arg[0][30] : 0;
/* #114: @5 = input[0][31] */
w5 = arg[0] ? arg[0][31] : 0;
/* #115: @2 = vertcat(@0, @5) */
rr=w2;
*rr++ = w0;
*rr++ = w5;
/* #116: @5 = input[0][29] */
w5 = arg[0] ? arg[0][29] : 0;
/* #117: @1 = 1 */
w1 = 1.;
/* #118: @6 = 9 */
w6 = 9.;
/* #119: @9 = 0x1 */
/* #120: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @1, @6, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #121: @2 = (@2-@10) */
for (i=0, rr=w2, cs=w10; i<2; ++i) (*rr++) -= (*cs++);
/* #122: output[0][28] = @2 */
if (res[0]) casadi_copy(w2, 2, res[0]+37);
/* #123: output[0][29] = @3 */
if (res[0]) res[0][39] = w3;
/* #124: output[0][30] = @5 */
if (res[0]) res[0][40] = w5;
/* #125: output[0][31] = @0 */
if (res[0]) res[0][41] = w0;
return 0;
}
/* fwd3_ode:(x[2],u,z[0],p,t[1x1,0nz],out_ode[2x1,0nz],out_alg[0],out_quad[0],fwd_x[2x3],fwd_u[1x3],fwd_z[0x3],fwd_p[1x3],fwd_t[1x3,0nz])->(fwd_ode[2x3],fwd_alg[0x3],fwd_quad[0x3]) */
static int casadi_f15(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *w0=w+0, w1, w2, w3;
/* #0: @0 = input[8][0] */
casadi_copy(arg[8], 2, w0);
/* #1: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #2: @2 = (@1-@2) */
w2 = (w1-w2);
/* #3: @3 = input[9][0] */
w3 = arg[9] ? arg[9][0] : 0;
/* #4: @2 = (@2+@3) */
w2 += w3;
/* #5: @3 = input[11][0] */
w3 = arg[11] ? arg[11][0] : 0;
/* #6: @2 = (@2+@3) */
w2 += w3;
/* #7: output[0][0] = @2 */
if (res[0]) res[0][0] = w2;
/* #8: output[0][1] = @1 */
if (res[0]) res[0][1] = w1;
/* #9: @0 = input[8][1] */
casadi_copy(arg[8] ? arg[8]+2 : 0, 2, w0);
/* #10: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #11: @2 = (@1-@2) */
w2 = (w1-w2);
/* #12: @3 = input[9][1] */
w3 = arg[9] ? arg[9][1] : 0;
/* #13: @2 = (@2+@3) */
w2 += w3;
/* #14: @3 = input[11][1] */
w3 = arg[11] ? arg[11][1] : 0;
/* #15: @2 = (@2+@3) */
w2 += w3;
/* #16: output[0][2] = @2 */
if (res[0]) res[0][2] = w2;
/* #17: output[0][3] = @1 */
if (res[0]) res[0][3] = w1;
/* #18: @0 = input[8][2] */
casadi_copy(arg[8] ? arg[8]+4 : 0, 2, w0);
/* #19: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #20: @2 = (@1-@2) */
w2 = (w1-w2);
/* #21: @3 = input[9][2] */
w3 = arg[9] ? arg[9][2] : 0;
/* #22: @2 = (@2+@3) */
w2 += w3;
/* #23: @3 = input[11][2] */
w3 = arg[11] ? arg[11][2] : 0;
/* #24: @2 = (@2+@3) */
w2 += w3;
/* #25: output[0][4] = @2 */
if (res[0]) res[0][4] = w2;
/* #26: output[0][5] = @1 */
if (res[0]) res[0][5] = w1;
return 0;
}
/* fwd3_F:(x0[2],u,t0,DT,DT_control,p,z0[0],out_xf[2x1,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_poly_coeff_q[0x4],out_zf[0],out_poly_coeff_z[],fwd_x0[2x3],fwd_u[1x3],fwd_t0[1x3],fwd_DT[1x3],fwd_DT_control[1x3],fwd_p[1x3],fwd_z0[0x3])->(fwd_xf[2x3],fwd_poly_coeff[2x15],fwd_qf[0x3],fwd_poly_coeff_q[0x12],fwd_zf[0x3],fwd_poly_coeff_z[]) */
static int casadi_f14(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+6, *rr;
const casadi_real **arg1=arg+20, *cr, *cs;
casadi_real *w0=w+5, *w1=w+7, w2, w4, *w6=w+11, w7, w8, *w9=w+15, *w12=w+17, *w13=w+19, w14, *w15=w+22, *w18=w+24, *w19=w+26, *w22=w+28, w23, w24, w25, *w26=w+33, *w30=w+35, *w31=w+37, *w32=w+39, w33, w34, w35, *w36=w+48, w38, w39, w40, *w41=w+54, *w43=w+57, *w44=w+63, *w45=w+65, w46, w47, *w48=w+69, *w49=w+71, w50, *w51=w+74, *w52=w+76, *w53=w+78, *w54=w+80, *w55=w+82, *w56=w+84, *w57=w+86;
/* #0: @0 = input[13][0] */
casadi_copy(arg[13], 2, w0);
/* #1: @1 = input[0][0] */
casadi_copy(arg[0], 2, w1);
/* #2: @2 = input[1][0] */
w2 = arg[1] ? arg[1][0] : 0;
/* #3: @3 = 0x1 */
/* #4: @4 = input[5][0] */
w4 = arg[5] ? arg[5][0] : 0;
/* #5: @5 = 00 */
/* #6: {@6, NULL, NULL} = ode(@1, @2, @3, @4, @5) */
arg1[0]=w1;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
res1[0]=w6;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #7: @7 = input[3][0] */
w7 = arg[3] ? arg[3][0] : 0;
/* #8: @8 = 2 */
w8 = 2.;
/* #9: @8 = (@7/@8) */
w8 = (w7/w8);
/* #10: @9 = (@8*@6) */
for (i=0, rr=w9, cs=w6; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #11: @9 = (@1+@9) */
for (i=0, rr=w9, cr=w1, cs=w9; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #12: @10 = 0x1 */
/* #13: @11 = 00 */
/* #14: {@12, NULL, NULL} = ode(@9, @2, @10, @4, @11) */
arg1[0]=w9;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
res1[0]=w12;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #15: @13 = (2.*@12) */
for (i=0, rr=w13, cs=w12; i<2; ++i) *rr++ = (2.* *cs++ );
/* #16: @13 = (@6+@13) */
for (i=0, rr=w13, cr=w6, cs=w13; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #17: @14 = 2 */
w14 = 2.;
/* #18: @14 = (@7/@14) */
w14 = (w7/w14);
/* #19: @15 = (@14*@12) */
for (i=0, rr=w15, cs=w12; i<2; ++i) (*rr++) = (w14*(*cs++));
/* #20: @15 = (@1+@15) */
for (i=0, rr=w15, cr=w1, cs=w15; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #21: @16 = 0x1 */
/* #22: @17 = 00 */
/* #23: {@18, NULL, NULL} = ode(@15, @2, @16, @4, @17) */
arg1[0]=w15;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
res1[0]=w18;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #24: @19 = (2.*@18) */
for (i=0, rr=w19, cs=w18; i<2; ++i) *rr++ = (2.* *cs++ );
/* #25: @13 = (@13+@19) */
for (i=0, rr=w13, cs=w19; i<2; ++i) (*rr++) += (*cs++);
/* #26: @19 = (@7*@18) */
for (i=0, rr=w19, cs=w18; i<2; ++i) (*rr++) = (w7*(*cs++));
/* #27: @19 = (@1+@19) */
for (i=0, rr=w19, cr=w1, cs=w19; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #28: @20 = 0x1 */
/* #29: @21 = 00 */
/* #30: {@22, NULL, NULL} = ode(@19, @2, @20, @4, @21) */
arg1[0]=w19;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
res1[0]=w22;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #31: @13 = (@13+@22) */
for (i=0, rr=w13, cs=w22; i<2; ++i) (*rr++) += (*cs++);
/* #32: @23 = 0.166667 */
w23 = 1.6666666666666666e-01;
/* #33: @24 = input[16][0] */
w24 = arg[16] ? arg[16][0] : 0;
/* #34: @25 = (@23*@24) */
w25 = (w23*w24);
/* #35: @26 = (@13*@25) */
for (i=0, rr=w26, cr=w13; i<2; ++i) (*rr++) = ((*cr++)*w25);
/* #36: @25 = 6 */
w25 = 6.;
/* #37: @25 = (@7/@25) */
w25 = (w7/w25);
/* #38: @27 = zeros(2x1,0nz) */
/* #39: @28 = 0x1 */
/* #40: @29 = 0x1 */
/* #41: @30 = input[13][1] */
casadi_copy(arg[13] ? arg[13]+2 : 0, 2, w30);
/* #42: @31 = input[13][2] */
casadi_copy(arg[13] ? arg[13]+4 : 0, 2, w31);
/* #43: @32 = horzcat(@0, @30, @31) */
rr=w32;
for (i=0, cs=w0; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w30; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w31; i<2; ++i) *rr++ = *cs++;
/* #44: @33 = input[14][0] */
w33 = arg[14] ? arg[14][0] : 0;
/* #45: @34 = input[14][1] */
w34 = arg[14] ? arg[14][1] : 0;
/* #46: @35 = input[14][2] */
w35 = arg[14] ? arg[14][2] : 0;
/* #47: @36 = horzcat(@33, @34, @35) */
rr=w36;
*rr++ = w33;
*rr++ = w34;
*rr++ = w35;
/* #48: @37 = 0x3 */
/* #49: @38 = input[18][0] */
w38 = arg[18] ? arg[18][0] : 0;
/* #50: @39 = input[18][1] */
w39 = arg[18] ? arg[18][1] : 0;
/* #51: @40 = input[18][2] */
w40 = arg[18] ? arg[18][2] : 0;
/* #52: @41 = horzcat(@38, @39, @40) */
rr=w41;
*rr++ = w38;
*rr++ = w39;
*rr++ = w40;
/* #53: @42 = zeros(1x3,0nz) */
/* #54: {@43, NULL, NULL} = fwd3_ode(@1, @2, @3, @4, @5, @27, @28, @29, @32, @36, @37, @41, @42) */
arg1[0]=w1;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w32;
arg1[9]=w36;
arg1[10]=0;
arg1[11]=w41;
arg1[12]=0;
res1[0]=w43;
res1[1]=0;
res1[2]=0;
if (casadi_f15(arg1, res1, iw, w, 0)) return 1;
/* #55: {@1, @44, @45} = horzsplit(@43) */
casadi_copy(w43, 2, w1);
casadi_copy(w43+2, 2, w44);
casadi_copy(w43+4, 2, w45);
/* #56: @3 = zeros(2x1,0nz) */
/* #57: @5 = 0x1 */
/* #58: @27 = 0x1 */
/* #59: @46 = 0.5 */
w46 = 5.0000000000000000e-01;
/* #60: @47 = (@46*@24) */
w47 = (w46*w24);
/* #61: @48 = (@6*@47) */
for (i=0, rr=w48, cr=w6; i<2; ++i) (*rr++) = ((*cr++)*w47);
/* #62: @49 = (@8*@1) */
for (i=0, rr=w49, cs=w1; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #63: @48 = (@48+@49) */
for (i=0, rr=w48, cs=w49; i<2; ++i) (*rr++) += (*cs++);
/* #64: @48 = (@0+@48) */
for (i=0, rr=w48, cr=w0, cs=w48; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #65: @47 = input[16][1] */
w47 = arg[16] ? arg[16][1] : 0;
/* #66: @50 = (@46*@47) */
w50 = (w46*w47);
/* #67: @49 = (@6*@50) */
for (i=0, rr=w49, cr=w6; i<2; ++i) (*rr++) = ((*cr++)*w50);
/* #68: @51 = (@8*@44) */
for (i=0, rr=w51, cs=w44; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #69: @49 = (@49+@51) */
for (i=0, rr=w49, cs=w51; i<2; ++i) (*rr++) += (*cs++);
/* #70: @49 = (@30+@49) */
for (i=0, rr=w49, cr=w30, cs=w49; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #71: @50 = input[16][2] */
w50 = arg[16] ? arg[16][2] : 0;
/* #72: @46 = (@46*@50) */
w46 *= w50;
/* #73: @51 = (@6*@46) */
for (i=0, rr=w51, cr=w6; i<2; ++i) (*rr++) = ((*cr++)*w46);
/* #74: @52 = (@8*@45) */
for (i=0, rr=w52, cs=w45; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #75: @51 = (@51+@52) */
for (i=0, rr=w51, cs=w52; i<2; ++i) (*rr++) += (*cs++);
/* #76: @51 = (@31+@51) */
for (i=0, rr=w51, cr=w31, cs=w51; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #77: @43 = horzcat(@48, @49, @51) */
rr=w43;
for (i=0, cs=w48; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w49; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w51; i<2; ++i) *rr++ = *cs++;
/* #78: @36 = horzcat(@33, @34, @35) */
rr=w36;
*rr++ = w33;
*rr++ = w34;
*rr++ = w35;
/* #79: @28 = 0x3 */
/* #80: @41 = horzcat(@38, @39, @40) */
rr=w41;
*rr++ = w38;
*rr++ = w39;
*rr++ = w40;
/* #81: @29 = zeros(1x3,0nz) */
/* #82: {@32, NULL, NULL} = fwd3_ode(@9, @2, @10, @4, @11, @3, @5, @27, @43, @36, @28, @41, @29) */
arg1[0]=w9;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w43;
arg1[9]=w36;
arg1[10]=0;
arg1[11]=w41;
arg1[12]=0;
res1[0]=w32;
res1[1]=0;
res1[2]=0;
if (casadi_f15(arg1, res1, iw, w, 0)) return 1;
/* #83: {@9, @48, @49} = horzsplit(@32) */
casadi_copy(w32, 2, w9);
casadi_copy(w32+2, 2, w48);
casadi_copy(w32+4, 2, w49);
/* #84: @51 = (2.*@9) */
for (i=0, rr=w51, cs=w9; i<2; ++i) *rr++ = (2.* *cs++ );
/* #85: @51 = (@1+@51) */
for (i=0, rr=w51, cr=w1, cs=w51; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #86: @10 = zeros(2x1,0nz) */
/* #87: @11 = 0x1 */
/* #88: @3 = 0x1 */
/* #89: @8 = 0.5 */
w8 = 5.0000000000000000e-01;
/* #90: @46 = (@8*@24) */
w46 = (w8*w24);
/* #91: @52 = (@12*@46) */
for (i=0, rr=w52, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w46);
/* #92: @53 = (@14*@9) */
for (i=0, rr=w53, cs=w9; i<2; ++i) (*rr++) = (w14*(*cs++));
/* #93: @52 = (@52+@53) */
for (i=0, rr=w52, cs=w53; i<2; ++i) (*rr++) += (*cs++);
/* #94: @52 = (@0+@52) */
for (i=0, rr=w52, cr=w0, cs=w52; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #95: @46 = (@8*@47) */
w46 = (w8*w47);
/* #96: @53 = (@12*@46) */
for (i=0, rr=w53, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w46);
/* #97: @54 = (@14*@48) */
for (i=0, rr=w54, cs=w48; i<2; ++i) (*rr++) = (w14*(*cs++));
/* #98: @53 = (@53+@54) */
for (i=0, rr=w53, cs=w54; i<2; ++i) (*rr++) += (*cs++);
/* #99: @53 = (@30+@53) */
for (i=0, rr=w53, cr=w30, cs=w53; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #100: @8 = (@8*@50) */
w8 *= w50;
/* #101: @54 = (@12*@8) */
for (i=0, rr=w54, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w8);
/* #102: @55 = (@14*@49) */
for (i=0, rr=w55, cs=w49; i<2; ++i) (*rr++) = (w14*(*cs++));
/* #103: @54 = (@54+@55) */
for (i=0, rr=w54, cs=w55; i<2; ++i) (*rr++) += (*cs++);
/* #104: @54 = (@31+@54) */
for (i=0, rr=w54, cr=w31, cs=w54; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #105: @32 = horzcat(@52, @53, @54) */
rr=w32;
for (i=0, cs=w52; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w53; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w54; i<2; ++i) *rr++ = *cs++;
/* #106: @36 = horzcat(@33, @34, @35) */
rr=w36;
*rr++ = w33;
*rr++ = w34;
*rr++ = w35;
/* #107: @5 = 0x3 */
/* #108: @41 = horzcat(@38, @39, @40) */
rr=w41;
*rr++ = w38;
*rr++ = w39;
*rr++ = w40;
/* #109: @27 = zeros(1x3,0nz) */
/* #110: {@43, NULL, NULL} = fwd3_ode(@15, @2, @16, @4, @17, @10, @11, @3, @32, @36, @5, @41, @27) */
arg1[0]=w15;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w32;
arg1[9]=w36;
arg1[10]=0;
arg1[11]=w41;
arg1[12]=0;
res1[0]=w43;
res1[1]=0;
res1[2]=0;
if (casadi_f15(arg1, res1, iw, w, 0)) return 1;
/* #111: {@15, @52, @53} = horzsplit(@43) */
casadi_copy(w43, 2, w15);
casadi_copy(w43+2, 2, w52);
casadi_copy(w43+4, 2, w53);
/* #112: @54 = (2.*@15) */
for (i=0, rr=w54, cs=w15; i<2; ++i) *rr++ = (2.* *cs++ );
/* #113: @51 = (@51+@54) */
for (i=0, rr=w51, cs=w54; i<2; ++i) (*rr++) += (*cs++);
/* #114: @16 = zeros(2x1,0nz) */
/* #115: @17 = 0x1 */
/* #116: @10 = 0x1 */
/* #117: @54 = (@18*@24) */
for (i=0, rr=w54, cr=w18; i<2; ++i) (*rr++) = ((*cr++)*w24);
/* #118: @55 = (@7*@15) */
for (i=0, rr=w55, cs=w15; i<2; ++i) (*rr++) = (w7*(*cs++));
/* #119: @54 = (@54+@55) */
for (i=0, rr=w54, cs=w55; i<2; ++i) (*rr++) += (*cs++);
/* #120: @54 = (@0+@54) */
for (i=0, rr=w54, cr=w0, cs=w54; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #121: @55 = (@18*@47) */
for (i=0, rr=w55, cr=w18; i<2; ++i) (*rr++) = ((*cr++)*w47);
/* #122: @56 = (@7*@52) */
for (i=0, rr=w56, cs=w52; i<2; ++i) (*rr++) = (w7*(*cs++));
/* #123: @55 = (@55+@56) */
for (i=0, rr=w55, cs=w56; i<2; ++i) (*rr++) += (*cs++);
/* #124: @55 = (@30+@55) */
for (i=0, rr=w55, cr=w30, cs=w55; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #125: @56 = (@18*@50) */
for (i=0, rr=w56, cr=w18; i<2; ++i) (*rr++) = ((*cr++)*w50);
/* #126: @57 = (@7*@53) */
for (i=0, rr=w57, cs=w53; i<2; ++i) (*rr++) = (w7*(*cs++));
/* #127: @56 = (@56+@57) */
for (i=0, rr=w56, cs=w57; i<2; ++i) (*rr++) += (*cs++);
/* #128: @56 = (@31+@56) */
for (i=0, rr=w56, cr=w31, cs=w56; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #129: @43 = horzcat(@54, @55, @56) */
rr=w43;
for (i=0, cs=w54; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w55; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w56; i<2; ++i) *rr++ = *cs++;
/* #130: @36 = horzcat(@33, @34, @35) */
rr=w36;
*rr++ = w33;
*rr++ = w34;
*rr++ = w35;
/* #131: @11 = 0x3 */
/* #132: @41 = horzcat(@38, @39, @40) */
rr=w41;
*rr++ = w38;
*rr++ = w39;
*rr++ = w40;
/* #133: @3 = zeros(1x3,0nz) */
/* #134: {@32, NULL, NULL} = fwd3_ode(@19, @2, @20, @4, @21, @16, @17, @10, @43, @36, @11, @41, @3) */
arg1[0]=w19;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w43;
arg1[9]=w36;
arg1[10]=0;
arg1[11]=w41;
arg1[12]=0;
res1[0]=w32;
res1[1]=0;
res1[2]=0;
if (casadi_f15(arg1, res1, iw, w, 0)) return 1;
/* #135: {@19, @54, @55} = horzsplit(@32) */
casadi_copy(w32, 2, w19);
casadi_copy(w32+2, 2, w54);
casadi_copy(w32+4, 2, w55);
/* #136: @51 = (@51+@19) */
for (i=0, rr=w51, cs=w19; i<2; ++i) (*rr++) += (*cs++);
/* #137: @51 = (@25*@51) */
for (i=0, rr=w51, cs=w51; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #138: @26 = (@26+@51) */
for (i=0, rr=w26, cs=w51; i<2; ++i) (*rr++) += (*cs++);
/* #139: @26 = (@0+@26) */
for (i=0, rr=w26, cr=w0, cs=w26; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #140: output[0][0] = @26 */
casadi_copy(w26, 2, res[0]);
/* #141: @2 = (@23*@47) */
w2 = (w23*w47);
/* #142: @26 = (@13*@2) */
for (i=0, rr=w26, cr=w13; i<2; ++i) (*rr++) = ((*cr++)*w2);
/* #143: @51 = (2.*@48) */
for (i=0, rr=w51, cs=w48; i<2; ++i) *rr++ = (2.* *cs++ );
/* #144: @51 = (@44+@51) */
for (i=0, rr=w51, cr=w44, cs=w51; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #145: @56 = (2.*@52) */
for (i=0, rr=w56, cs=w52; i<2; ++i) *rr++ = (2.* *cs++ );
/* #146: @51 = (@51+@56) */
for (i=0, rr=w51, cs=w56; i<2; ++i) (*rr++) += (*cs++);
/* #147: @51 = (@51+@54) */
for (i=0, rr=w51, cs=w54; i<2; ++i) (*rr++) += (*cs++);
/* #148: @51 = (@25*@51) */
for (i=0, rr=w51, cs=w51; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #149: @26 = (@26+@51) */
for (i=0, rr=w26, cs=w51; i<2; ++i) (*rr++) += (*cs++);
/* #150: @26 = (@30+@26) */
for (i=0, rr=w26, cr=w30, cs=w26; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #151: output[0][1] = @26 */
if (res[0]) casadi_copy(w26, 2, res[0]+2);
/* #152: @23 = (@23*@50) */
w23 *= w50;
/* #153: @13 = (@13*@23) */
for (i=0, rr=w13; i<2; ++i) (*rr++) *= w23;
/* #154: @26 = (2.*@49) */
for (i=0, rr=w26, cs=w49; i<2; ++i) *rr++ = (2.* *cs++ );
/* #155: @26 = (@45+@26) */
for (i=0, rr=w26, cr=w45, cs=w26; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #156: @51 = (2.*@53) */
for (i=0, rr=w51, cs=w53; i<2; ++i) *rr++ = (2.* *cs++ );
/* #157: @26 = (@26+@51) */
for (i=0, rr=w26, cs=w51; i<2; ++i) (*rr++) += (*cs++);
/* #158: @26 = (@26+@55) */
for (i=0, rr=w26, cs=w55; i<2; ++i) (*rr++) += (*cs++);
/* #159: @26 = (@25*@26) */
for (i=0, rr=w26, cs=w26; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #160: @13 = (@13+@26) */
for (i=0, rr=w13, cs=w26; i<2; ++i) (*rr++) += (*cs++);
/* #161: @13 = (@31+@13) */
for (i=0, rr=w13, cr=w31, cs=w13; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #162: output[0][2] = @13 */
if (res[0]) casadi_copy(w13, 2, res[0]+4);
/* #163: output[1][0] = @0 */
casadi_copy(w0, 2, res[1]);
/* #164: output[1][1] = @1 */
if (res[1]) casadi_copy(w1, 2, res[1]+2);
/* #165: @25 = 0.5 */
w25 = 5.0000000000000000e-01;
/* #166: @23 = 2 */
w23 = 2.;
/* #167: @23 = (@23/@7) */
w23 /= w7;
/* #168: @0 = (@9-@1) */
for (i=0, rr=w0, cr=w9, cs=w1; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #169: @0 = (@23*@0) */
for (i=0, rr=w0, cs=w0; i<2; ++i) (*rr++) = (w23*(*cs++));
/* #170: @13 = (@12-@6) */
for (i=0, rr=w13, cr=w12, cs=w6; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #171: @2 = (@23/@7) */
w2 = (w23/w7);
/* #172: @4 = (@2*@24) */
w4 = (w2*w24);
/* #173: @26 = (@13*@4) */
for (i=0, rr=w26, cr=w13; i<2; ++i) (*rr++) = ((*cr++)*w4);
/* #174: @0 = (@0-@26) */
for (i=0, rr=w0, cs=w26; i<2; ++i) (*rr++) -= (*cs++);
/* #175: @0 = (@25*@0) */
for (i=0, rr=w0, cs=w0; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #176: output[1][2] = @0 */
if (res[1]) casadi_copy(w0, 2, res[1]+4);
/* #177: @4 = 0.166667 */
w4 = 1.6666666666666666e-01;
/* #178: @38 = 4 */
w38 = 4.;
/* #179: @39 = sq(@7) */
w39 = casadi_sq( w7 );
/* #180: @38 = (@38/@39) */
w38 /= w39;
/* #181: @9 = (@15-@9) */
for (i=0, rr=w9, cr=w15, cs=w9; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #182: @9 = (@38*@9) */
for (i=0, rr=w9, cs=w9; i<2; ++i) (*rr++) = (w38*(*cs++));
/* #183: @12 = (@18-@12) */
for (i=0, rr=w12, cr=w18, cs=w12; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #184: @39 = (@38/@39) */
w39 = (w38/w39);
/* #185: @40 = (2.*@7) */
w40 = (2.* w7 );
/* #186: @33 = (@40*@24) */
w33 = (w40*w24);
/* #187: @33 = (@39*@33) */
w33 = (w39*w33);
/* #188: @0 = (@12*@33) */
for (i=0, rr=w0, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w33);
/* #189: @9 = (@9-@0) */
for (i=0, rr=w9, cs=w0; i<2; ++i) (*rr++) -= (*cs++);
/* #190: @9 = (@4*@9) */
for (i=0, rr=w9, cs=w9; i<2; ++i) (*rr++) = (w4*(*cs++));
/* #191: output[1][3] = @9 */
if (res[1]) casadi_copy(w9, 2, res[1]+6);
/* #192: @33 = 0.0416667 */
w33 = 4.1666666666666664e-02;
/* #193: @34 = 4 */
w34 = 4.;
/* #194: @15 = (2.*@15) */
for (i=0, rr=w15, cs=w15; i<2; ++i) *rr++ = (2.* *cs++ );
/* #195: @19 = (@19-@15) */
for (i=0, rr=w19, cs=w15; i<2; ++i) (*rr++) -= (*cs++);
/* #196: @19 = (@19+@1) */
for (i=0, rr=w19, cs=w1; i<2; ++i) (*rr++) += (*cs++);
/* #197: @19 = (@34*@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #198: @35 = 3 */
w35 = 3.;
/* #199: @14 = pow(@7,@35) */
w14 = pow(w7,w35);
/* #200: @19 = (@19/@14) */
for (i=0, rr=w19; i<2; ++i) (*rr++) /= w14;
/* #201: @18 = (2.*@18) */
for (i=0, rr=w18, cs=w18; i<2; ++i) *rr++ = (2.* *cs++ );
/* #202: @22 = (@22-@18) */
for (i=0, rr=w22, cs=w18; i<2; ++i) (*rr++) -= (*cs++);
/* #203: @22 = (@22+@6) */
for (i=0, rr=w22, cs=w6; i<2; ++i) (*rr++) += (*cs++);
/* #204: @22 = (@34*@22) */
for (i=0, rr=w22, cs=w22; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #205: @22 = (@22/@14) */
for (i=0, rr=w22; i<2; ++i) (*rr++) /= w14;
/* #206: @22 = (@22/@14) */
for (i=0, rr=w22; i<2; ++i) (*rr++) /= w14;
/* #207: @7 = sq(@7) */
w7 = casadi_sq( w7 );
/* #208: @35 = (@35*@7) */
w35 *= w7;
/* #209: @24 = (@35*@24) */
w24 = (w35*w24);
/* #210: @6 = (@22*@24) */
for (i=0, rr=w6, cr=w22; i<2; ++i) (*rr++) = ((*cr++)*w24);
/* #211: @19 = (@19-@6) */
for (i=0, rr=w19, cs=w6; i<2; ++i) (*rr++) -= (*cs++);
/* #212: @19 = (@33*@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) (*rr++) = (w33*(*cs++));
/* #213: output[1][4] = @19 */
if (res[1]) casadi_copy(w19, 2, res[1]+8);
/* #214: output[1][5] = @30 */
if (res[1]) casadi_copy(w30, 2, res[1]+10);
/* #215: output[1][6] = @44 */
if (res[1]) casadi_copy(w44, 2, res[1]+12);
/* #216: @30 = (@48-@44) */
for (i=0, rr=w30, cr=w48, cs=w44; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #217: @30 = (@23*@30) */
for (i=0, rr=w30, cs=w30; i<2; ++i) (*rr++) = (w23*(*cs++));
/* #218: @24 = (@2*@47) */
w24 = (w2*w47);
/* #219: @19 = (@13*@24) */
for (i=0, rr=w19, cr=w13; i<2; ++i) (*rr++) = ((*cr++)*w24);
/* #220: @30 = (@30-@19) */
for (i=0, rr=w30, cs=w19; i<2; ++i) (*rr++) -= (*cs++);
/* #221: @30 = (@25*@30) */
for (i=0, rr=w30, cs=w30; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #222: output[1][7] = @30 */
if (res[1]) casadi_copy(w30, 2, res[1]+14);
/* #223: @48 = (@52-@48) */
for (i=0, rr=w48, cr=w52, cs=w48; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #224: @48 = (@38*@48) */
for (i=0, rr=w48, cs=w48; i<2; ++i) (*rr++) = (w38*(*cs++));
/* #225: @24 = (@40*@47) */
w24 = (w40*w47);
/* #226: @24 = (@39*@24) */
w24 = (w39*w24);
/* #227: @30 = (@12*@24) */
for (i=0, rr=w30, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w24);
/* #228: @48 = (@48-@30) */
for (i=0, rr=w48, cs=w30; i<2; ++i) (*rr++) -= (*cs++);
/* #229: @48 = (@4*@48) */
for (i=0, rr=w48, cs=w48; i<2; ++i) (*rr++) = (w4*(*cs++));
/* #230: output[1][8] = @48 */
if (res[1]) casadi_copy(w48, 2, res[1]+16);
/* #231: @52 = (2.*@52) */
for (i=0, rr=w52, cs=w52; i<2; ++i) *rr++ = (2.* *cs++ );
/* #232: @54 = (@54-@52) */
for (i=0, rr=w54, cs=w52; i<2; ++i) (*rr++) -= (*cs++);
/* #233: @54 = (@54+@44) */
for (i=0, rr=w54, cs=w44; i<2; ++i) (*rr++) += (*cs++);
/* #234: @54 = (@34*@54) */
for (i=0, rr=w54, cs=w54; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #235: @54 = (@54/@14) */
for (i=0, rr=w54; i<2; ++i) (*rr++) /= w14;
/* #236: @47 = (@35*@47) */
w47 = (w35*w47);
/* #237: @44 = (@22*@47) */
for (i=0, rr=w44, cr=w22; i<2; ++i) (*rr++) = ((*cr++)*w47);
/* #238: @54 = (@54-@44) */
for (i=0, rr=w54, cs=w44; i<2; ++i) (*rr++) -= (*cs++);
/* #239: @54 = (@33*@54) */
for (i=0, rr=w54, cs=w54; i<2; ++i) (*rr++) = (w33*(*cs++));
/* #240: output[1][9] = @54 */
if (res[1]) casadi_copy(w54, 2, res[1]+18);
/* #241: output[1][10] = @31 */
if (res[1]) casadi_copy(w31, 2, res[1]+20);
/* #242: output[1][11] = @45 */
if (res[1]) casadi_copy(w45, 2, res[1]+22);
/* #243: @31 = (@49-@45) */
for (i=0, rr=w31, cr=w49, cs=w45; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #244: @31 = (@23*@31) */
for (i=0, rr=w31, cs=w31; i<2; ++i) (*rr++) = (w23*(*cs++));
/* #245: @2 = (@2*@50) */
w2 *= w50;
/* #246: @13 = (@13*@2) */
for (i=0, rr=w13; i<2; ++i) (*rr++) *= w2;
/* #247: @31 = (@31-@13) */
for (i=0, rr=w31, cs=w13; i<2; ++i) (*rr++) -= (*cs++);
/* #248: @31 = (@25*@31) */
for (i=0, rr=w31, cs=w31; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #249: output[1][12] = @31 */
if (res[1]) casadi_copy(w31, 2, res[1]+24);
/* #250: @49 = (@53-@49) */
for (i=0, rr=w49, cr=w53, cs=w49; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #251: @49 = (@38*@49) */
for (i=0, rr=w49, cs=w49; i<2; ++i) (*rr++) = (w38*(*cs++));
/* #252: @40 = (@40*@50) */
w40 *= w50;
/* #253: @39 = (@39*@40) */
w39 *= w40;
/* #254: @12 = (@12*@39) */
for (i=0, rr=w12; i<2; ++i) (*rr++) *= w39;
/* #255: @49 = (@49-@12) */
for (i=0, rr=w49, cs=w12; i<2; ++i) (*rr++) -= (*cs++);
/* #256: @49 = (@4*@49) */
for (i=0, rr=w49, cs=w49; i<2; ++i) (*rr++) = (w4*(*cs++));
/* #257: output[1][13] = @49 */
if (res[1]) casadi_copy(w49, 2, res[1]+26);
/* #258: @53 = (2.*@53) */
for (i=0, rr=w53, cs=w53; i<2; ++i) *rr++ = (2.* *cs++ );
/* #259: @55 = (@55-@53) */
for (i=0, rr=w55, cs=w53; i<2; ++i) (*rr++) -= (*cs++);
/* #260: @55 = (@55+@45) */
for (i=0, rr=w55, cs=w45; i<2; ++i) (*rr++) += (*cs++);
/* #261: @55 = (@34*@55) */
for (i=0, rr=w55, cs=w55; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #262: @55 = (@55/@14) */
for (i=0, rr=w55; i<2; ++i) (*rr++) /= w14;
/* #263: @35 = (@35*@50) */
w35 *= w50;
/* #264: @22 = (@22*@35) */
for (i=0, rr=w22; i<2; ++i) (*rr++) *= w35;
/* #265: @55 = (@55-@22) */
for (i=0, rr=w55, cs=w22; i<2; ++i) (*rr++) -= (*cs++);
/* #266: @55 = (@33*@55) */
for (i=0, rr=w55, cs=w55; i<2; ++i) (*rr++) = (w33*(*cs++));
/* #267: output[1][14] = @55 */
if (res[1]) casadi_copy(w55, 2, res[1]+28);
return 0;
}
/* fwd3_F:(x0[2],u,T,t0,p,z0[0],out_xf[2x1,0nz],out_Xi[2x2,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_Qi[0],out_poly_coeff_q[0x4],out_zf[0],out_Zi[0],out_poly_coeff_z[],fwd_x0[2x3],fwd_u[1x3],fwd_T[1x3],fwd_t0[1x3],fwd_p[1x3],fwd_z0[0x3])->(fwd_xf[2x3],fwd_Xi[2x6],fwd_poly_coeff[2x15],fwd_qf[0x3],fwd_Qi[0x3],fwd_poly_coeff_q[0x12],fwd_zf[0x3],fwd_Zi[0x3],fwd_poly_coeff_z[]) */
static int casadi_f13(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+9, *rr;
const casadi_real **arg1=arg+21, *cs;
casadi_real *w0=w+88, w1, w2, w3, w4, *w12=w+94, *w13=w+96, *w14=w+98, *w15=w+100, w16, w17, w18, *w19=w+109, *w20=w+112, *w21=w+115, *w22=w+118, *w23=w+121, *w25=w+124, *w26=w+130, *w27=w+160;
/* #0: @0 = input[0][0] */
casadi_copy(arg[0], 2, w0);
/* #1: @1 = input[1][0] */
w1 = arg[1] ? arg[1][0] : 0;
/* #2: @2 = input[3][0] */
w2 = arg[3] ? arg[3][0] : 0;
/* #3: @3 = input[2][0] */
w3 = arg[2] ? arg[2][0] : 0;
/* #4: @4 = input[4][0] */
w4 = arg[4] ? arg[4][0] : 0;
/* #5: @5 = 0x1 */
/* #6: @6 = zeros(2x1,0nz) */
/* #7: @7 = zeros(2x5,0nz) */
/* #8: @8 = 0x1 */
/* #9: @9 = 0x4 */
/* #10: @10 = 0x1 */
/* #11: @11 = 0x0 */
/* #12: @12 = input[15][0] */
casadi_copy(arg[15], 2, w12);
/* #13: @13 = input[15][1] */
casadi_copy(arg[15] ? arg[15]+2 : 0, 2, w13);
/* #14: @14 = input[15][2] */
casadi_copy(arg[15] ? arg[15]+4 : 0, 2, w14);
/* #15: @15 = horzcat(@12, @13, @14) */
rr=w15;
for (i=0, cs=w12; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w13; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w14; i<2; ++i) *rr++ = *cs++;
/* #16: @16 = input[16][0] */
w16 = arg[16] ? arg[16][0] : 0;
/* #17: @17 = input[16][1] */
w17 = arg[16] ? arg[16][1] : 0;
/* #18: @18 = input[16][2] */
w18 = arg[16] ? arg[16][2] : 0;
/* #19: @19 = horzcat(@16, @17, @18) */
rr=w19;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #20: @16 = input[18][0] */
w16 = arg[18] ? arg[18][0] : 0;
/* #21: @17 = input[18][1] */
w17 = arg[18] ? arg[18][1] : 0;
/* #22: @18 = input[18][2] */
w18 = arg[18] ? arg[18][2] : 0;
/* #23: @20 = horzcat(@16, @17, @18) */
rr=w20;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #24: @16 = input[17][0] */
w16 = arg[17] ? arg[17][0] : 0;
/* #25: @17 = input[17][1] */
w17 = arg[17] ? arg[17][1] : 0;
/* #26: @18 = input[17][2] */
w18 = arg[17] ? arg[17][2] : 0;
/* #27: @21 = horzcat(@16, @17, @18) */
rr=w21;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #28: @22 = horzcat(@16, @17, @18) */
rr=w22;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #29: @16 = input[19][0] */
w16 = arg[19] ? arg[19][0] : 0;
/* #30: @17 = input[19][1] */
w17 = arg[19] ? arg[19][1] : 0;
/* #31: @18 = input[19][2] */
w18 = arg[19] ? arg[19][2] : 0;
/* #32: @23 = horzcat(@16, @17, @18) */
rr=w23;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #33: @24 = 0x3 */
/* #34: {@25, @26, NULL, NULL, NULL, NULL} = fwd3_F(@0, @1, @2, @3, @3, @4, @5, @6, @7, @8, @9, @10, @11, @15, @19, @20, @21, @22, @23, @24) */
arg1[0]=w0;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w3);
arg1[4]=(&w3);
arg1[5]=(&w4);
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=w15;
arg1[14]=w19;
arg1[15]=w20;
arg1[16]=w21;
arg1[17]=w22;
arg1[18]=w23;
arg1[19]=0;
res1[0]=w25;
res1[1]=w26;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f14(arg1, res1, iw, w, 0)) return 1;
/* #35: output[0][0] = @25 */
casadi_copy(w25, 6, res[0]);
/* #36: output[1][0] = @12 */
casadi_copy(w12, 2, res[1]);
/* #37: {@12, @0, @27} = horzsplit(@25) */
casadi_copy(w25, 2, w12);
casadi_copy(w25+2, 2, w0);
casadi_copy(w25+4, 2, w27);
/* #38: output[1][1] = @12 */
if (res[1]) casadi_copy(w12, 2, res[1]+2);
/* #39: output[1][2] = @13 */
if (res[1]) casadi_copy(w13, 2, res[1]+4);
/* #40: output[1][3] = @0 */
if (res[1]) casadi_copy(w0, 2, res[1]+6);
/* #41: output[1][4] = @14 */
if (res[1]) casadi_copy(w14, 2, res[1]+8);
/* #42: output[1][5] = @27 */
if (res[1]) casadi_copy(w27, 2, res[1]+10);
/* #43: output[2][0] = @26 */
casadi_copy(w26, 30, res[2]);
return 0;
}
/* nlp_jac_g:(x[32],p)->(g[42],jac_g_x[42x32,102nz]) */
static int casadi_f12(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+2, *rr, *ss;
const casadi_int *cii;
const casadi_real **arg1=arg+2, *cr, *cs;
casadi_real w0, w1, *w2=w+164, w3, *w4=w+167, w5, w6, w7, w8, *w10=w+173, w11, w12, *w14=w+177, w15, w16, w17, *w19=w+182, w20, w21, w22, *w24=w+187, w25, w26, w27, *w29=w+192, w30, w31, w32, *w34=w+197, w35, w36, w37, *w39=w+202, w40, w41, w42, *w44=w+207, w45, w46, w47, *w49=w+212, w50, w51, w52, *w54=w+217, *w55=w+219, *w65=w+321, w66, w67, w68, w69, w70, w71, w72, w73, w75, *w77=w+340, w78, w79, w80, w81, w82, w83, w84, w85, *w87=w+355, *w89=w+361, w90, w91, w92, w93, *w94=w+370, *w95=w+373, *w96=w+376, *w97=w+379, *w99=w+382, w100, w101, w103, w104, w105, w106, w107, w108, *w109=w+396, *w112=w+398, *w115=w+400, *w118=w+402, *w121=w+404, *w124=w+406, *w127=w+408, *w130=w+410, *w133=w+412, *w136=w+414, *w139=w+416, *w142=w+418, *w145=w+420, *w148=w+422, *w151=w+424, *w154=w+426, *w157=w+428, *w160=w+430, *w161=w+432, *w162=w+462, *w163=w+492, *w164=w+514, *w165=w+536, *w166=w+551, *w167=w+566, *w168=w+586, *w169=w+606;
/* #0: @0 = input[0][3] */
w0 = arg[0] ? arg[0][3] : 0;
/* #1: @1 = input[0][4] */
w1 = arg[0] ? arg[0][4] : 0;
/* #2: @2 = vertcat(@0, @1) */
rr=w2;
*rr++ = w0;
*rr++ = w1;
/* #3: @1 = input[0][0] */
w1 = arg[0] ? arg[0][0] : 0;
/* #4: @3 = input[0][1] */
w3 = arg[0] ? arg[0][1] : 0;
/* #5: @4 = vertcat(@1, @3) */
rr=w4;
*rr++ = w1;
*rr++ = w3;
/* #6: @5 = input[0][2] */
w5 = arg[0] ? arg[0][2] : 0;
/* #7: @6 = 1 */
w6 = 1.;
/* #8: @7 = 0 */
w7 = 0.;
/* #9: @8 = input[1][0] */
w8 = arg[1] ? arg[1][0] : 0;
/* #10: @9 = 0x1 */
/* #11: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @6, @7, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w6);
arg1[3]=(&w7);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #12: @10 = (@2-@10) */
for (i=0, rr=w10, cr=w2, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #13: output[0][0] = @10 */
casadi_copy(w10, 2, res[0]);
/* #14: output[0][1] = @1 */
if (res[0]) res[0][2] = w1;
/* #15: output[0][2] = @3 */
if (res[0]) res[0][3] = w3;
/* #16: output[0][3] = @5 */
if (res[0]) res[0][4] = w5;
/* #17: @3 = input[0][6] */
w3 = arg[0] ? arg[0][6] : 0;
/* #18: @1 = input[0][7] */
w1 = arg[0] ? arg[0][7] : 0;
/* #19: @10 = vertcat(@3, @1) */
rr=w10;
*rr++ = w3;
*rr++ = w1;
/* #20: @1 = input[0][5] */
w1 = arg[0] ? arg[0][5] : 0;
/* #21: @11 = 1 */
w11 = 1.;
/* #22: @12 = 1 */
w12 = 1.;
/* #23: @13 = 0x1 */
/* #24: {@14, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@2, @1, @11, @12, @8, @13) */
arg1[0]=w2;
arg1[1]=(&w1);
arg1[2]=(&w11);
arg1[3]=(&w12);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w14;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #25: @14 = (@10-@14) */
for (i=0, rr=w14, cr=w10, cs=w14; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #26: output[0][4] = @14 */
if (res[0]) casadi_copy(w14, 2, res[0]+5);
/* #27: output[0][5] = @0 */
if (res[0]) res[0][7] = w0;
/* #28: output[0][6] = @1 */
if (res[0]) res[0][8] = w1;
/* #29: @0 = input[0][9] */
w0 = arg[0] ? arg[0][9] : 0;
/* #30: @15 = input[0][10] */
w15 = arg[0] ? arg[0][10] : 0;
/* #31: @14 = vertcat(@0, @15) */
rr=w14;
*rr++ = w0;
*rr++ = w15;
/* #32: @15 = input[0][8] */
w15 = arg[0] ? arg[0][8] : 0;
/* #33: @16 = 1 */
w16 = 1.;
/* #34: @17 = 2 */
w17 = 2.;
/* #35: @18 = 0x1 */
/* #36: {@19, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@10, @15, @16, @17, @8, @18) */
arg1[0]=w10;
arg1[1]=(&w15);
arg1[2]=(&w16);
arg1[3]=(&w17);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w19;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #37: @19 = (@14-@19) */
for (i=0, rr=w19, cr=w14, cs=w19; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #38: output[0][7] = @19 */
if (res[0]) casadi_copy(w19, 2, res[0]+9);
/* #39: output[0][8] = @3 */
if (res[0]) res[0][11] = w3;
/* #40: output[0][9] = @15 */
if (res[0]) res[0][12] = w15;
/* #41: @3 = input[0][12] */
w3 = arg[0] ? arg[0][12] : 0;
/* #42: @20 = input[0][13] */
w20 = arg[0] ? arg[0][13] : 0;
/* #43: @19 = vertcat(@3, @20) */
rr=w19;
*rr++ = w3;
*rr++ = w20;
/* #44: @20 = input[0][11] */
w20 = arg[0] ? arg[0][11] : 0;
/* #45: @21 = 1 */
w21 = 1.;
/* #46: @22 = 3 */
w22 = 3.;
/* #47: @23 = 0x1 */
/* #48: {@24, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@14, @20, @21, @22, @8, @23) */
arg1[0]=w14;
arg1[1]=(&w20);
arg1[2]=(&w21);
arg1[3]=(&w22);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w24;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #49: @24 = (@19-@24) */
for (i=0, rr=w24, cr=w19, cs=w24; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #50: output[0][10] = @24 */
if (res[0]) casadi_copy(w24, 2, res[0]+13);
/* #51: output[0][11] = @0 */
if (res[0]) res[0][15] = w0;
/* #52: output[0][12] = @20 */
if (res[0]) res[0][16] = w20;
/* #53: @0 = input[0][15] */
w0 = arg[0] ? arg[0][15] : 0;
/* #54: @25 = input[0][16] */
w25 = arg[0] ? arg[0][16] : 0;
/* #55: @24 = vertcat(@0, @25) */
rr=w24;
*rr++ = w0;
*rr++ = w25;
/* #56: @25 = input[0][14] */
w25 = arg[0] ? arg[0][14] : 0;
/* #57: @26 = 1 */
w26 = 1.;
/* #58: @27 = 4 */
w27 = 4.;
/* #59: @28 = 0x1 */
/* #60: {@29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@19, @25, @26, @27, @8, @28) */
arg1[0]=w19;
arg1[1]=(&w25);
arg1[2]=(&w26);
arg1[3]=(&w27);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w29;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #61: @29 = (@24-@29) */
for (i=0, rr=w29, cr=w24, cs=w29; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #62: output[0][13] = @29 */
if (res[0]) casadi_copy(w29, 2, res[0]+17);
/* #63: output[0][14] = @3 */
if (res[0]) res[0][19] = w3;
/* #64: output[0][15] = @25 */
if (res[0]) res[0][20] = w25;
/* #65: @3 = input[0][18] */
w3 = arg[0] ? arg[0][18] : 0;
/* #66: @30 = input[0][19] */
w30 = arg[0] ? arg[0][19] : 0;
/* #67: @29 = vertcat(@3, @30) */
rr=w29;
*rr++ = w3;
*rr++ = w30;
/* #68: @30 = input[0][17] */
w30 = arg[0] ? arg[0][17] : 0;
/* #69: @31 = 1 */
w31 = 1.;
/* #70: @32 = 5 */
w32 = 5.;
/* #71: @33 = 0x1 */
/* #72: {@34, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@24, @30, @31, @32, @8, @33) */
arg1[0]=w24;
arg1[1]=(&w30);
arg1[2]=(&w31);
arg1[3]=(&w32);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w34;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #73: @34 = (@29-@34) */
for (i=0, rr=w34, cr=w29, cs=w34; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #74: output[0][16] = @34 */
if (res[0]) casadi_copy(w34, 2, res[0]+21);
/* #75: output[0][17] = @0 */
if (res[0]) res[0][23] = w0;
/* #76: output[0][18] = @30 */
if (res[0]) res[0][24] = w30;
/* #77: @0 = input[0][21] */
w0 = arg[0] ? arg[0][21] : 0;
/* #78: @35 = input[0][22] */
w35 = arg[0] ? arg[0][22] : 0;
/* #79: @34 = vertcat(@0, @35) */
rr=w34;
*rr++ = w0;
*rr++ = w35;
/* #80: @35 = input[0][20] */
w35 = arg[0] ? arg[0][20] : 0;
/* #81: @36 = 1 */
w36 = 1.;
/* #82: @37 = 6 */
w37 = 6.;
/* #83: @38 = 0x1 */
/* #84: {@39, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@29, @35, @36, @37, @8, @38) */
arg1[0]=w29;
arg1[1]=(&w35);
arg1[2]=(&w36);
arg1[3]=(&w37);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w39;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #85: @39 = (@34-@39) */
for (i=0, rr=w39, cr=w34, cs=w39; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #86: output[0][19] = @39 */
if (res[0]) casadi_copy(w39, 2, res[0]+25);
/* #87: output[0][20] = @3 */
if (res[0]) res[0][27] = w3;
/* #88: output[0][21] = @35 */
if (res[0]) res[0][28] = w35;
/* #89: @3 = input[0][24] */
w3 = arg[0] ? arg[0][24] : 0;
/* #90: @40 = input[0][25] */
w40 = arg[0] ? arg[0][25] : 0;
/* #91: @39 = vertcat(@3, @40) */
rr=w39;
*rr++ = w3;
*rr++ = w40;
/* #92: @40 = input[0][23] */
w40 = arg[0] ? arg[0][23] : 0;
/* #93: @41 = 1 */
w41 = 1.;
/* #94: @42 = 7 */
w42 = 7.;
/* #95: @43 = 0x1 */
/* #96: {@44, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@34, @40, @41, @42, @8, @43) */
arg1[0]=w34;
arg1[1]=(&w40);
arg1[2]=(&w41);
arg1[3]=(&w42);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w44;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #97: @44 = (@39-@44) */
for (i=0, rr=w44, cr=w39, cs=w44; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #98: output[0][22] = @44 */
if (res[0]) casadi_copy(w44, 2, res[0]+29);
/* #99: output[0][23] = @0 */
if (res[0]) res[0][31] = w0;
/* #100: output[0][24] = @40 */
if (res[0]) res[0][32] = w40;
/* #101: @0 = input[0][27] */
w0 = arg[0] ? arg[0][27] : 0;
/* #102: @45 = input[0][28] */
w45 = arg[0] ? arg[0][28] : 0;
/* #103: @44 = vertcat(@0, @45) */
rr=w44;
*rr++ = w0;
*rr++ = w45;
/* #104: @45 = input[0][26] */
w45 = arg[0] ? arg[0][26] : 0;
/* #105: @46 = 1 */
w46 = 1.;
/* #106: @47 = 8 */
w47 = 8.;
/* #107: @48 = 0x1 */
/* #108: {@49, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@39, @45, @46, @47, @8, @48) */
arg1[0]=w39;
arg1[1]=(&w45);
arg1[2]=(&w46);
arg1[3]=(&w47);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w49;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #109: @49 = (@44-@49) */
for (i=0, rr=w49, cr=w44, cs=w49; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #110: output[0][25] = @49 */
if (res[0]) casadi_copy(w49, 2, res[0]+33);
/* #111: output[0][26] = @3 */
if (res[0]) res[0][35] = w3;
/* #112: output[0][27] = @45 */
if (res[0]) res[0][36] = w45;
/* #113: @3 = input[0][30] */
w3 = arg[0] ? arg[0][30] : 0;
/* #114: @50 = input[0][31] */
w50 = arg[0] ? arg[0][31] : 0;
/* #115: @49 = vertcat(@3, @50) */
rr=w49;
*rr++ = w3;
*rr++ = w50;
/* #116: @50 = input[0][29] */
w50 = arg[0] ? arg[0][29] : 0;
/* #117: @51 = 1 */
w51 = 1.;
/* #118: @52 = 9 */
w52 = 9.;
/* #119: @53 = 0x1 */
/* #120: {@54, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@44, @50, @51, @52, @8, @53) */
arg1[0]=w44;
arg1[1]=(&w50);
arg1[2]=(&w51);
arg1[3]=(&w52);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w54;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #121: @49 = (@49-@54) */
for (i=0, rr=w49, cs=w54; i<2; ++i) (*rr++) -= (*cs++);
/* #122: output[0][28] = @49 */
if (res[0]) casadi_copy(w49, 2, res[0]+37);
/* #123: output[0][29] = @0 */
if (res[0]) res[0][39] = w0;
/* #124: output[0][30] = @50 */
if (res[0]) res[0][40] = w50;
/* #125: output[0][31] = @3 */
if (res[0]) res[0][41] = w3;
/* #126: @55 = zeros(32x42,102nz) */
casadi_clear(w55, 102);
/* #127: @56 = zeros(2x1,0nz) */
/* #128: @57 = zeros(2x2,0nz) */
/* #129: @58 = zeros(2x5,0nz) */
/* #130: @59 = 0x1 */
/* #131: @60 = 0x1 */
/* #132: @61 = 0x4 */
/* #133: @62 = 0x1 */
/* #134: @63 = 0x1 */
/* #135: @64 = 0x0 */
/* #136: @65 = ones(32x1,10nz) */
casadi_fill(w65, 10, 1.);
/* #137: {@3, NULL, NULL, NULL, NULL, @0, NULL, NULL, @66, NULL, NULL, @67, NULL, NULL, @68, NULL, NULL, @69, NULL, NULL, @70, NULL, NULL, @71, NULL, NULL, @72, NULL, NULL, @73, NULL, NULL} = vertsplit(@65) */
w3 = w65[0];
w0 = w65[1];
w66 = w65[2];
w67 = w65[3];
w68 = w65[4];
w69 = w65[5];
w70 = w65[6];
w71 = w65[7];
w72 = w65[8];
w73 = w65[9];
/* #138: @74 = 00 */
/* #139: @75 = vertcat(@3, @74) */
rr=(&w75);
*rr++ = w3;
/* #140: @76 = 00 */
/* #141: @77 = ones(32x1,7nz) */
casadi_fill(w77, 7, 1.);
/* #142: {NULL, @78, NULL, NULL, NULL, NULL, @79, NULL, NULL, NULL, NULL, NULL, @80, NULL, NULL, NULL, NULL, NULL, @81, NULL, NULL, NULL, NULL, NULL, @82, NULL, NULL, NULL, NULL, NULL, @83, @84} = vertsplit(@77) */
w78 = w77[0];
w79 = w77[1];
w80 = w77[2];
w81 = w77[3];
w82 = w77[4];
w83 = w77[5];
w84 = w77[6];
/* #143: @85 = vertcat(@76, @78) */
rr=(&w85);
*rr++ = w78;
/* #144: @86 = zeros(2x1,0nz) */
/* #145: @49 = horzcat(@75, @85, @86) */
rr=w49;
*rr++ = w75;
*rr++ = w85;
/* #146: @87 = dense(@49) */
casadi_densify(w49, casadi_s1, w87, 0);
/* #147: @86 = 00 */
/* #148: @88 = 00 */
/* #149: @89 = ones(32x1,5nz) */
casadi_fill(w89, 5, 1.);
/* #150: {NULL, NULL, @75, NULL, NULL, NULL, NULL, @85, NULL, NULL, NULL, NULL, NULL, @90, NULL, NULL, NULL, NULL, NULL, @91, NULL, NULL, NULL, NULL, NULL, @92, NULL, NULL, NULL, NULL, NULL, NULL} = vertsplit(@89) */
w75 = w89[0];
w85 = w89[1];
w90 = w89[2];
w91 = w89[3];
w92 = w89[4];
/* #151: @93 = horzcat(@86, @88, @75) */
rr=(&w93);
*rr++ = w75;
/* #152: @94 = dense(@93) */
casadi_densify((&w93), casadi_s2, w94, 0);
/* #153: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #154: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #155: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #156: @98 = 0x3 */
/* #157: {@99, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@4, @5, @6, @7, @8, @9, @56, @57, @58, @59, @60, @61, @62, @63, @64, @87, @94, @95, @96, @97, @98) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w6);
arg1[3]=(&w7);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w87;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w99;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #158: {@4, @49, @54} = horzsplit(@99) */
casadi_copy(w99, 2, w4);
casadi_copy(w99+2, 2, w49);
casadi_copy(w99+4, 2, w54);
/* #159: @4 = (-@4) */
for (i=0, rr=w4, cs=w4; i<2; ++i) *rr++ = (- *cs++ );
/* #160: @9 = zeros(2x1,0nz) */
/* #161: @56 = zeros(2x2,0nz) */
/* #162: @57 = zeros(2x5,0nz) */
/* #163: @58 = 0x1 */
/* #164: @59 = 0x1 */
/* #165: @60 = 0x4 */
/* #166: @61 = 0x1 */
/* #167: @62 = 0x1 */
/* #168: @63 = zeros(2x1,0nz) */
/* #169: @89 = ones(32x1,5nz) */
casadi_fill(w89, 5, 1.);
/* #170: {NULL, NULL, NULL, @5, NULL, NULL, NULL, NULL, NULL, @6, NULL, NULL, NULL, NULL, NULL, @7, NULL, NULL, NULL, NULL, NULL, @93, NULL, NULL, NULL, NULL, NULL, @100, NULL, NULL, NULL, NULL} = vertsplit(@89) */
w5 = w89[0];
w6 = w89[1];
w7 = w89[2];
w93 = w89[3];
w100 = w89[4];
/* #171: @98 = 00 */
/* #172: @101 = vertcat(@5, @98) */
rr=(&w101);
*rr++ = w5;
/* #173: @102 = 00 */
/* #174: @89 = ones(32x1,5nz) */
casadi_fill(w89, 5, 1.);
/* #175: {NULL, NULL, NULL, NULL, @103, NULL, NULL, NULL, NULL, NULL, @104, NULL, NULL, NULL, NULL, NULL, @105, NULL, NULL, NULL, NULL, NULL, @106, NULL, NULL, NULL, NULL, NULL, @107, NULL, NULL, NULL} = vertsplit(@89) */
w103 = w89[0];
w104 = w89[1];
w105 = w89[2];
w106 = w89[3];
w107 = w89[4];
/* #176: @108 = vertcat(@102, @103) */
rr=(&w108);
*rr++ = w103;
/* #177: @109 = horzcat(@63, @101, @108) */
rr=w109;
*rr++ = w101;
*rr++ = w108;
/* #178: @99 = dense(@109) */
casadi_densify(w109, casadi_s3, w99, 0);
/* #179: @63 = 00 */
/* #180: @110 = 00 */
/* #181: @101 = horzcat(@0, @63, @110) */
rr=(&w101);
*rr++ = w0;
/* #182: @94 = dense(@101) */
casadi_densify((&w101), casadi_s4, w94, 0);
/* #183: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #184: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #185: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #186: @111 = 0x3 */
/* #187: {@87, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@2, @1, @11, @12, @8, @13, @9, @56, @57, @58, @59, @60, @61, @62, @64, @99, @94, @95, @96, @97, @111) */
arg1[0]=w2;
arg1[1]=(&w1);
arg1[2]=(&w11);
arg1[3]=(&w12);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w99;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w87;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #188: {@2, @109, @112} = horzsplit(@87) */
casadi_copy(w87, 2, w2);
casadi_copy(w87+2, 2, w109);
casadi_copy(w87+4, 2, w112);
/* #189: @2 = (-@2) */
for (i=0, rr=w2, cs=w2; i<2; ++i) *rr++ = (- *cs++ );
/* #190: @13 = 00 */
/* #191: @9 = zeros(2x1,0nz) */
/* #192: @56 = zeros(2x2,0nz) */
/* #193: @57 = zeros(2x5,0nz) */
/* #194: @58 = 0x1 */
/* #195: @59 = 0x1 */
/* #196: @60 = 0x4 */
/* #197: @61 = 0x1 */
/* #198: @62 = 0x1 */
/* #199: @111 = zeros(2x1,0nz) */
/* #200: @113 = 00 */
/* #201: @1 = vertcat(@79, @113) */
rr=(&w1);
*rr++ = w79;
/* #202: @114 = 00 */
/* #203: @11 = vertcat(@114, @85) */
rr=(&w11);
*rr++ = w85;
/* #204: @115 = horzcat(@111, @1, @11) */
rr=w115;
*rr++ = w1;
*rr++ = w11;
/* #205: @87 = dense(@115) */
casadi_densify(w115, casadi_s3, w87, 0);
/* #206: @111 = 00 */
/* #207: @116 = 00 */
/* #208: @1 = horzcat(@66, @111, @116) */
rr=(&w1);
*rr++ = w66;
/* #209: @94 = dense(@1) */
casadi_densify((&w1), casadi_s4, w94, 0);
/* #210: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #211: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #212: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #213: @117 = 0x3 */
/* #214: {@99, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@10, @15, @16, @17, @8, @18, @9, @56, @57, @58, @59, @60, @61, @62, @64, @87, @94, @95, @96, @97, @117) */
arg1[0]=w10;
arg1[1]=(&w15);
arg1[2]=(&w16);
arg1[3]=(&w17);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w87;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w99;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #215: {@10, @115, @118} = horzsplit(@99) */
casadi_copy(w99, 2, w10);
casadi_copy(w99+2, 2, w115);
casadi_copy(w99+4, 2, w118);
/* #216: @10 = (-@10) */
for (i=0, rr=w10, cs=w10; i<2; ++i) *rr++ = (- *cs++ );
/* #217: @18 = 00 */
/* #218: @9 = zeros(2x1,0nz) */
/* #219: @56 = zeros(2x2,0nz) */
/* #220: @57 = zeros(2x5,0nz) */
/* #221: @58 = 0x1 */
/* #222: @59 = 0x1 */
/* #223: @60 = 0x4 */
/* #224: @61 = 0x1 */
/* #225: @62 = 0x1 */
/* #226: @117 = zeros(2x1,0nz) */
/* #227: @119 = 00 */
/* #228: @15 = vertcat(@6, @119) */
rr=(&w15);
*rr++ = w6;
/* #229: @120 = 00 */
/* #230: @16 = vertcat(@120, @104) */
rr=(&w16);
*rr++ = w104;
/* #231: @121 = horzcat(@117, @15, @16) */
rr=w121;
*rr++ = w15;
*rr++ = w16;
/* #232: @99 = dense(@121) */
casadi_densify(w121, casadi_s3, w99, 0);
/* #233: @117 = 00 */
/* #234: @122 = 00 */
/* #235: @15 = horzcat(@67, @117, @122) */
rr=(&w15);
*rr++ = w67;
/* #236: @94 = dense(@15) */
casadi_densify((&w15), casadi_s4, w94, 0);
/* #237: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #238: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #239: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #240: @123 = 0x3 */
/* #241: {@87, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@14, @20, @21, @22, @8, @23, @9, @56, @57, @58, @59, @60, @61, @62, @64, @99, @94, @95, @96, @97, @123) */
arg1[0]=w14;
arg1[1]=(&w20);
arg1[2]=(&w21);
arg1[3]=(&w22);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w99;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w87;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #242: {@14, @121, @124} = horzsplit(@87) */
casadi_copy(w87, 2, w14);
casadi_copy(w87+2, 2, w121);
casadi_copy(w87+4, 2, w124);
/* #243: @14 = (-@14) */
for (i=0, rr=w14, cs=w14; i<2; ++i) *rr++ = (- *cs++ );
/* #244: @23 = 00 */
/* #245: @9 = zeros(2x1,0nz) */
/* #246: @56 = zeros(2x2,0nz) */
/* #247: @57 = zeros(2x5,0nz) */
/* #248: @58 = 0x1 */
/* #249: @59 = 0x1 */
/* #250: @60 = 0x4 */
/* #251: @61 = 0x1 */
/* #252: @62 = 0x1 */
/* #253: @123 = zeros(2x1,0nz) */
/* #254: @125 = 00 */
/* #255: @20 = vertcat(@80, @125) */
rr=(&w20);
*rr++ = w80;
/* #256: @126 = 00 */
/* #257: @21 = vertcat(@126, @90) */
rr=(&w21);
*rr++ = w90;
/* #258: @127 = horzcat(@123, @20, @21) */
rr=w127;
*rr++ = w20;
*rr++ = w21;
/* #259: @87 = dense(@127) */
casadi_densify(w127, casadi_s3, w87, 0);
/* #260: @123 = 00 */
/* #261: @128 = 00 */
/* #262: @20 = horzcat(@68, @123, @128) */
rr=(&w20);
*rr++ = w68;
/* #263: @94 = dense(@20) */
casadi_densify((&w20), casadi_s4, w94, 0);
/* #264: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #265: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #266: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #267: @129 = 0x3 */
/* #268: {@99, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@19, @25, @26, @27, @8, @28, @9, @56, @57, @58, @59, @60, @61, @62, @64, @87, @94, @95, @96, @97, @129) */
arg1[0]=w19;
arg1[1]=(&w25);
arg1[2]=(&w26);
arg1[3]=(&w27);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w87;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w99;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #269: {@19, @127, @130} = horzsplit(@99) */
casadi_copy(w99, 2, w19);
casadi_copy(w99+2, 2, w127);
casadi_copy(w99+4, 2, w130);
/* #270: @19 = (-@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) *rr++ = (- *cs++ );
/* #271: @28 = 00 */
/* #272: @9 = zeros(2x1,0nz) */
/* #273: @56 = zeros(2x2,0nz) */
/* #274: @57 = zeros(2x5,0nz) */
/* #275: @58 = 0x1 */
/* #276: @59 = 0x1 */
/* #277: @60 = 0x4 */
/* #278: @61 = 0x1 */
/* #279: @62 = 0x1 */
/* #280: @129 = zeros(2x1,0nz) */
/* #281: @131 = 00 */
/* #282: @25 = vertcat(@7, @131) */
rr=(&w25);
*rr++ = w7;
/* #283: @132 = 00 */
/* #284: @26 = vertcat(@132, @105) */
rr=(&w26);
*rr++ = w105;
/* #285: @133 = horzcat(@129, @25, @26) */
rr=w133;
*rr++ = w25;
*rr++ = w26;
/* #286: @99 = dense(@133) */
casadi_densify(w133, casadi_s3, w99, 0);
/* #287: @129 = 00 */
/* #288: @134 = 00 */
/* #289: @25 = horzcat(@69, @129, @134) */
rr=(&w25);
*rr++ = w69;
/* #290: @94 = dense(@25) */
casadi_densify((&w25), casadi_s4, w94, 0);
/* #291: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #292: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #293: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #294: @135 = 0x3 */
/* #295: {@87, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@24, @30, @31, @32, @8, @33, @9, @56, @57, @58, @59, @60, @61, @62, @64, @99, @94, @95, @96, @97, @135) */
arg1[0]=w24;
arg1[1]=(&w30);
arg1[2]=(&w31);
arg1[3]=(&w32);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w99;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w87;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #296: {@24, @133, @136} = horzsplit(@87) */
casadi_copy(w87, 2, w24);
casadi_copy(w87+2, 2, w133);
casadi_copy(w87+4, 2, w136);
/* #297: @24 = (-@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) *rr++ = (- *cs++ );
/* #298: @33 = 00 */
/* #299: @9 = zeros(2x1,0nz) */
/* #300: @56 = zeros(2x2,0nz) */
/* #301: @57 = zeros(2x5,0nz) */
/* #302: @58 = 0x1 */
/* #303: @59 = 0x1 */
/* #304: @60 = 0x4 */
/* #305: @61 = 0x1 */
/* #306: @62 = 0x1 */
/* #307: @135 = zeros(2x1,0nz) */
/* #308: @137 = 00 */
/* #309: @30 = vertcat(@81, @137) */
rr=(&w30);
*rr++ = w81;
/* #310: @138 = 00 */
/* #311: @31 = vertcat(@138, @91) */
rr=(&w31);
*rr++ = w91;
/* #312: @139 = horzcat(@135, @30, @31) */
rr=w139;
*rr++ = w30;
*rr++ = w31;
/* #313: @87 = dense(@139) */
casadi_densify(w139, casadi_s3, w87, 0);
/* #314: @135 = 00 */
/* #315: @140 = 00 */
/* #316: @30 = horzcat(@70, @135, @140) */
rr=(&w30);
*rr++ = w70;
/* #317: @94 = dense(@30) */
casadi_densify((&w30), casadi_s4, w94, 0);
/* #318: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #319: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #320: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #321: @141 = 0x3 */
/* #322: {@99, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@29, @35, @36, @37, @8, @38, @9, @56, @57, @58, @59, @60, @61, @62, @64, @87, @94, @95, @96, @97, @141) */
arg1[0]=w29;
arg1[1]=(&w35);
arg1[2]=(&w36);
arg1[3]=(&w37);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w87;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w99;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #323: {@29, @139, @142} = horzsplit(@99) */
casadi_copy(w99, 2, w29);
casadi_copy(w99+2, 2, w139);
casadi_copy(w99+4, 2, w142);
/* #324: @29 = (-@29) */
for (i=0, rr=w29, cs=w29; i<2; ++i) *rr++ = (- *cs++ );
/* #325: @38 = 00 */
/* #326: @9 = zeros(2x1,0nz) */
/* #327: @56 = zeros(2x2,0nz) */
/* #328: @57 = zeros(2x5,0nz) */
/* #329: @58 = 0x1 */
/* #330: @59 = 0x1 */
/* #331: @60 = 0x4 */
/* #332: @61 = 0x1 */
/* #333: @62 = 0x1 */
/* #334: @141 = zeros(2x1,0nz) */
/* #335: @143 = 00 */
/* #336: @35 = vertcat(@93, @143) */
rr=(&w35);
*rr++ = w93;
/* #337: @144 = 00 */
/* #338: @36 = vertcat(@144, @106) */
rr=(&w36);
*rr++ = w106;
/* #339: @145 = horzcat(@141, @35, @36) */
rr=w145;
*rr++ = w35;
*rr++ = w36;
/* #340: @99 = dense(@145) */
casadi_densify(w145, casadi_s3, w99, 0);
/* #341: @141 = 00 */
/* #342: @146 = 00 */
/* #343: @35 = horzcat(@71, @141, @146) */
rr=(&w35);
*rr++ = w71;
/* #344: @94 = dense(@35) */
casadi_densify((&w35), casadi_s4, w94, 0);
/* #345: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #346: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #347: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #348: @147 = 0x3 */
/* #349: {@87, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@34, @40, @41, @42, @8, @43, @9, @56, @57, @58, @59, @60, @61, @62, @64, @99, @94, @95, @96, @97, @147) */
arg1[0]=w34;
arg1[1]=(&w40);
arg1[2]=(&w41);
arg1[3]=(&w42);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w99;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w87;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #350: {@34, @145, @148} = horzsplit(@87) */
casadi_copy(w87, 2, w34);
casadi_copy(w87+2, 2, w145);
casadi_copy(w87+4, 2, w148);
/* #351: @34 = (-@34) */
for (i=0, rr=w34, cs=w34; i<2; ++i) *rr++ = (- *cs++ );
/* #352: @43 = 00 */
/* #353: @9 = zeros(2x1,0nz) */
/* #354: @56 = zeros(2x2,0nz) */
/* #355: @57 = zeros(2x5,0nz) */
/* #356: @58 = 0x1 */
/* #357: @59 = 0x1 */
/* #358: @60 = 0x4 */
/* #359: @61 = 0x1 */
/* #360: @62 = 0x1 */
/* #361: @147 = zeros(2x1,0nz) */
/* #362: @149 = 00 */
/* #363: @40 = vertcat(@82, @149) */
rr=(&w40);
*rr++ = w82;
/* #364: @150 = 00 */
/* #365: @41 = vertcat(@150, @92) */
rr=(&w41);
*rr++ = w92;
/* #366: @151 = horzcat(@147, @40, @41) */
rr=w151;
*rr++ = w40;
*rr++ = w41;
/* #367: @87 = dense(@151) */
casadi_densify(w151, casadi_s3, w87, 0);
/* #368: @147 = 00 */
/* #369: @152 = 00 */
/* #370: @40 = horzcat(@72, @147, @152) */
rr=(&w40);
*rr++ = w72;
/* #371: @94 = dense(@40) */
casadi_densify((&w40), casadi_s4, w94, 0);
/* #372: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #373: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #374: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #375: @153 = 0x3 */
/* #376: {@99, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@39, @45, @46, @47, @8, @48, @9, @56, @57, @58, @59, @60, @61, @62, @64, @87, @94, @95, @96, @97, @153) */
arg1[0]=w39;
arg1[1]=(&w45);
arg1[2]=(&w46);
arg1[3]=(&w47);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w87;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w99;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #377: {@39, @151, @154} = horzsplit(@99) */
casadi_copy(w99, 2, w39);
casadi_copy(w99+2, 2, w151);
casadi_copy(w99+4, 2, w154);
/* #378: @39 = (-@39) */
for (i=0, rr=w39, cs=w39; i<2; ++i) *rr++ = (- *cs++ );
/* #379: @48 = 00 */
/* #380: @9 = zeros(2x1,0nz) */
/* #381: @56 = zeros(2x2,0nz) */
/* #382: @57 = zeros(2x5,0nz) */
/* #383: @58 = 0x1 */
/* #384: @59 = 0x1 */
/* #385: @60 = 0x4 */
/* #386: @61 = 0x1 */
/* #387: @62 = 0x1 */
/* #388: @153 = zeros(2x1,0nz) */
/* #389: @155 = 00 */
/* #390: @45 = vertcat(@100, @155) */
rr=(&w45);
*rr++ = w100;
/* #391: @156 = 00 */
/* #392: @46 = vertcat(@156, @107) */
rr=(&w46);
*rr++ = w107;
/* #393: @157 = horzcat(@153, @45, @46) */
rr=w157;
*rr++ = w45;
*rr++ = w46;
/* #394: @99 = dense(@157) */
casadi_densify(w157, casadi_s3, w99, 0);
/* #395: @153 = 00 */
/* #396: @158 = 00 */
/* #397: @45 = horzcat(@73, @153, @158) */
rr=(&w45);
*rr++ = w73;
/* #398: @94 = dense(@45) */
casadi_densify((&w45), casadi_s4, w94, 0);
/* #399: @95 = zeros(1x3) */
casadi_clear(w95, 3);
/* #400: @96 = zeros(1x3) */
casadi_clear(w96, 3);
/* #401: @97 = zeros(1x3) */
casadi_clear(w97, 3);
/* #402: @159 = 0x3 */
/* #403: {@87, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@44, @50, @51, @52, @8, @53, @9, @56, @57, @58, @59, @60, @61, @62, @64, @99, @94, @95, @96, @97, @159) */
arg1[0]=w44;
arg1[1]=(&w50);
arg1[2]=(&w51);
arg1[3]=(&w52);
arg1[4]=(&w8);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w99;
arg1[16]=w94;
arg1[17]=w95;
arg1[18]=w96;
arg1[19]=w97;
arg1[20]=0;
res1[0]=w87;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #404: {@44, @157, @160} = horzsplit(@87) */
casadi_copy(w87, 2, w44);
casadi_copy(w87+2, 2, w157);
casadi_copy(w87+4, 2, w160);
/* #405: @44 = (-@44) */
for (i=0, rr=w44, cs=w44; i<2; ++i) *rr++ = (- *cs++ );
/* #406: @53 = 00 */
/* #407: @9 = 00 */
/* #408: @161 = vertcat(@4, @3, @74, @86, @2, @13, @0, @10, @18, @66, @14, @23, @67, @19, @28, @68, @24, @33, @69, @29, @38, @70, @34, @43, @71, @39, @48, @72, @44, @53, @73, @9) */
rr=w161;
for (i=0, cs=w4; i<2; ++i) *rr++ = *cs++;
*rr++ = w3;
for (i=0, cs=w2; i<2; ++i) *rr++ = *cs++;
*rr++ = w0;
for (i=0, cs=w10; i<2; ++i) *rr++ = *cs++;
*rr++ = w66;
for (i=0, cs=w14; i<2; ++i) *rr++ = *cs++;
*rr++ = w67;
for (i=0, cs=w19; i<2; ++i) *rr++ = *cs++;
*rr++ = w68;
for (i=0, cs=w24; i<2; ++i) *rr++ = *cs++;
*rr++ = w69;
for (i=0, cs=w29; i<2; ++i) *rr++ = *cs++;
*rr++ = w70;
for (i=0, cs=w34; i<2; ++i) *rr++ = *cs++;
*rr++ = w71;
for (i=0, cs=w39; i<2; ++i) *rr++ = *cs++;
*rr++ = w72;
for (i=0, cs=w44; i<2; ++i) *rr++ = *cs++;
*rr++ = w73;
/* #409: @162 = @161[:30] */
for (rr=w162, ss=w161+0; ss!=w161+30; ss+=1) *rr++ = *ss;
/* #410: (@55[0, 4, 8, 13, 17, 20, 23, 27, 30, 33, 37, 40, 43, 47, 50, 53, 57, 60, 63, 67, 70, 73, 77, 80, 83, 87, 90, 93, 97, 100] = @162) */
for (cii=casadi_s5, rr=w55, ss=w162; cii!=casadi_s5+30; ++cii, ++ss) rr[*cii] = *ss;
/* #411: @49 = (-@49) */
for (i=0, rr=w49, cs=w49; i<2; ++i) *rr++ = (- *cs++ );
/* #412: @74 = 00 */
/* #413: @86 = 00 */
/* #414: @115 = (-@115) */
for (i=0, rr=w115, cs=w115; i<2; ++i) *rr++ = (- *cs++ );
/* #415: @13 = 00 */
/* #416: @18 = 00 */
/* #417: @127 = (-@127) */
for (i=0, rr=w127, cs=w127; i<2; ++i) *rr++ = (- *cs++ );
/* #418: @23 = 00 */
/* #419: @28 = 00 */
/* #420: @139 = (-@139) */
for (i=0, rr=w139, cs=w139; i<2; ++i) *rr++ = (- *cs++ );
/* #421: @33 = 00 */
/* #422: @38 = 00 */
/* #423: @151 = (-@151) */
for (i=0, rr=w151, cs=w151; i<2; ++i) *rr++ = (- *cs++ );
/* #424: @43 = 00 */
/* #425: @48 = 00 */
/* #426: @163 = vertcat(@49, @76, @78, @88, @79, @113, @74, @86, @115, @79, @111, @80, @125, @13, @18, @127, @80, @123, @81, @137, @23, @28, @139, @81, @135, @82, @149, @33, @38, @151, @82, @147, @83, @84, @43, @48, @83) */
rr=w163;
for (i=0, cs=w49; i<2; ++i) *rr++ = *cs++;
*rr++ = w78;
*rr++ = w79;
for (i=0, cs=w115; i<2; ++i) *rr++ = *cs++;
*rr++ = w79;
*rr++ = w80;
for (i=0, cs=w127; i<2; ++i) *rr++ = *cs++;
*rr++ = w80;
*rr++ = w81;
for (i=0, cs=w139; i<2; ++i) *rr++ = *cs++;
*rr++ = w81;
*rr++ = w82;
for (i=0, cs=w151; i<2; ++i) *rr++ = *cs++;
*rr++ = w82;
*rr++ = w83;
*rr++ = w84;
*rr++ = w83;
/* #427: @164 = @163[:22] */
for (rr=w164, ss=w163+0; ss!=w163+22; ss+=1) *rr++ = *ss;
/* #428: (@55[1, 5, 9, 14, 21, 25, 29, 34, 41, 45, 49, 54, 61, 65, 69, 74, 81, 85, 89, 94, 98, 101] = @164) */
for (cii=casadi_s6, rr=w55, ss=w164; cii!=casadi_s6+22; ++cii, ++ss) rr[*cii] = *ss;
/* #429: @54 = (-@54) */
for (i=0, rr=w54, cs=w54; i<2; ++i) *rr++ = (- *cs++ );
/* #430: @76 = 00 */
/* #431: @88 = 00 */
/* #432: @113 = 00 */
/* #433: @74 = 00 */
/* #434: @118 = (-@118) */
for (i=0, rr=w118, cs=w118; i<2; ++i) *rr++ = (- *cs++ );
/* #435: @86 = 00 */
/* #436: @111 = 00 */
/* #437: @130 = (-@130) */
for (i=0, rr=w130, cs=w130; i<2; ++i) *rr++ = (- *cs++ );
/* #438: @125 = 00 */
/* #439: @13 = 00 */
/* #440: @142 = (-@142) */
for (i=0, rr=w142, cs=w142; i<2; ++i) *rr++ = (- *cs++ );
/* #441: @18 = 00 */
/* #442: @123 = 00 */
/* #443: @154 = (-@154) */
for (i=0, rr=w154, cs=w154; i<2; ++i) *rr++ = (- *cs++ );
/* #444: @137 = zeros(2x1,0nz) */
/* #445: @23 = 00 */
/* #446: @28 = 00 */
/* #447: @135 = 00 */
/* #448: @165 = vertcat(@54, @76, @88, @75, @114, @85, @113, @74, @118, @114, @116, @126, @90, @86, @111, @130, @126, @128, @138, @91, @125, @13, @142, @138, @140, @150, @92, @18, @123, @154, @150, @152, @137, @23, @28, @135) */
rr=w165;
for (i=0, cs=w54; i<2; ++i) *rr++ = *cs++;
*rr++ = w75;
*rr++ = w85;
for (i=0, cs=w118; i<2; ++i) *rr++ = *cs++;
*rr++ = w90;
for (i=0, cs=w130; i<2; ++i) *rr++ = *cs++;
*rr++ = w91;
for (i=0, cs=w142; i<2; ++i) *rr++ = *cs++;
*rr++ = w92;
for (i=0, cs=w154; i<2; ++i) *rr++ = *cs++;
/* #449: @166 = @165[:15] */
for (rr=w166, ss=w165+0; ss!=w165+15; ss+=1) *rr++ = *ss;
/* #450: (@55[2, 6, 10, 18, 22, 26, 38, 42, 46, 58, 62, 66, 78, 82, 86] = @166) */
for (cii=casadi_s7, rr=w55, ss=w166; cii!=casadi_s7+15; ++cii, ++ss) rr[*cii] = *ss;
/* #451: @76 = 00 */
/* #452: @88 = 00 */
/* #453: @114 = 00 */
/* #454: @109 = (-@109) */
for (i=0, rr=w109, cs=w109; i<2; ++i) *rr++ = (- *cs++ );
/* #455: @113 = 00 */
/* #456: @74 = 00 */
/* #457: @121 = (-@121) */
for (i=0, rr=w121, cs=w121; i<2; ++i) *rr++ = (- *cs++ );
/* #458: @116 = 00 */
/* #459: @126 = 00 */
/* #460: @133 = (-@133) */
for (i=0, rr=w133, cs=w133; i<2; ++i) *rr++ = (- *cs++ );
/* #461: @86 = 00 */
/* #462: @111 = 00 */
/* #463: @145 = (-@145) */
for (i=0, rr=w145, cs=w145; i<2; ++i) *rr++ = (- *cs++ );
/* #464: @128 = 00 */
/* #465: @138 = 00 */
/* #466: @157 = (-@157) */
for (i=0, rr=w157, cs=w157; i<2; ++i) *rr++ = (- *cs++ );
/* #467: @125 = 00 */
/* #468: @167 = vertcat(@5, @98, @76, @88, @114, @109, @5, @63, @6, @119, @113, @74, @121, @6, @117, @7, @131, @116, @126, @133, @7, @129, @93, @143, @86, @111, @145, @93, @141, @100, @155, @128, @138, @157, @100, @153, @125) */
rr=w167;
*rr++ = w5;
for (i=0, cs=w109; i<2; ++i) *rr++ = *cs++;
*rr++ = w5;
*rr++ = w6;
for (i=0, cs=w121; i<2; ++i) *rr++ = *cs++;
*rr++ = w6;
*rr++ = w7;
for (i=0, cs=w133; i<2; ++i) *rr++ = *cs++;
*rr++ = w7;
*rr++ = w93;
for (i=0, cs=w145; i<2; ++i) *rr++ = *cs++;
*rr++ = w93;
*rr++ = w100;
for (i=0, cs=w157; i<2; ++i) *rr++ = *cs++;
*rr++ = w100;
/* #469: @168 = @167[:20] */
for (rr=w168, ss=w167+0; ss!=w167+20; ss+=1) *rr++ = *ss;
/* #470: (@55[3, 11, 15, 19, 24, 31, 35, 39, 44, 51, 55, 59, 64, 71, 75, 79, 84, 91, 95, 99] = @168) */
for (cii=casadi_s8, rr=w55, ss=w168; cii!=casadi_s8+20; ++cii, ++ss) rr[*cii] = *ss;
/* #471: @98 = 00 */
/* #472: @76 = 00 */
/* #473: @88 = 00 */
/* #474: @112 = (-@112) */
for (i=0, rr=w112, cs=w112; i<2; ++i) *rr++ = (- *cs++ );
/* #475: @114 = 00 */
/* #476: @63 = 00 */
/* #477: @124 = (-@124) */
for (i=0, rr=w124, cs=w124; i<2; ++i) *rr++ = (- *cs++ );
/* #478: @119 = 00 */
/* #479: @113 = 00 */
/* #480: @136 = (-@136) */
for (i=0, rr=w136, cs=w136; i<2; ++i) *rr++ = (- *cs++ );
/* #481: @74 = 00 */
/* #482: @117 = 00 */
/* #483: @148 = (-@148) */
for (i=0, rr=w148, cs=w148; i<2; ++i) *rr++ = (- *cs++ );
/* #484: @131 = 00 */
/* #485: @116 = 00 */
/* #486: @160 = (-@160) */
for (i=0, rr=w160, cs=w160; i<2; ++i) *rr++ = (- *cs++ );
/* #487: @126 = 00 */
/* #488: @166 = vertcat(@102, @103, @98, @76, @88, @112, @102, @110, @120, @104, @114, @63, @124, @120, @122, @132, @105, @119, @113, @136, @132, @134, @144, @106, @74, @117, @148, @144, @146, @156, @107, @131, @116, @160, @156, @158, @126) */
rr=w166;
*rr++ = w103;
for (i=0, cs=w112; i<2; ++i) *rr++ = *cs++;
*rr++ = w104;
for (i=0, cs=w124; i<2; ++i) *rr++ = *cs++;
*rr++ = w105;
for (i=0, cs=w136; i<2; ++i) *rr++ = *cs++;
*rr++ = w106;
for (i=0, cs=w148; i<2; ++i) *rr++ = *cs++;
*rr++ = w107;
for (i=0, cs=w160; i<2; ++i) *rr++ = *cs++;
/* #489: @165 = @166[:15] */
for (rr=w165, ss=w166+0; ss!=w166+15; ss+=1) *rr++ = *ss;
/* #490: (@55[7, 12, 16, 28, 32, 36, 48, 52, 56, 68, 72, 76, 88, 92, 96] = @165) */
for (cii=casadi_s9, rr=w55, ss=w165; cii!=casadi_s9+15; ++cii, ++ss) rr[*cii] = *ss;
/* #491: @169 = @55' */
casadi_trans(w55,casadi_s11, w169, casadi_s10, iw);
/* #492: output[1][0] = @169 */
casadi_copy(w169, 102, res[1]);
return 0;
}
/* fwd1_ode:(x[2],u,z[0],p,t[1x1,0nz],out_ode[2x1,0nz],out_alg[0],out_quad[0],fwd_x[2],fwd_u,fwd_z[0],fwd_p,fwd_t[1x1,0nz])->(fwd_ode[2],fwd_alg[0],fwd_quad[0]) */
static int casadi_f19(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *w0=w+0, w1, w2, w3;
/* #0: @0 = input[8][0] */
casadi_copy(arg[8], 2, w0);
/* #1: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #2: @2 = (@1-@2) */
w2 = (w1-w2);
/* #3: @3 = input[9][0] */
w3 = arg[9] ? arg[9][0] : 0;
/* #4: @2 = (@2+@3) */
w2 += w3;
/* #5: @3 = input[11][0] */
w3 = arg[11] ? arg[11][0] : 0;
/* #6: @2 = (@2+@3) */
w2 += w3;
/* #7: output[0][0] = @2 */
if (res[0]) res[0][0] = w2;
/* #8: output[0][1] = @1 */
if (res[0]) res[0][1] = w1;
return 0;
}
/* fwd1_adj1_ode:(x[2],u,z[0],p,t[1x1,0nz],out_ode[2x1,0nz],out_alg[0],out_quad[0],adj_ode[2],adj_alg[0],adj_quad[0],out_adj_x[2x1,0nz],out_adj_u[1x1,0nz],out_adj_z[0],out_adj_p[1x1,0nz],out_adj_t[1x1,0nz],fwd_x[2],fwd_u,fwd_z[0],fwd_p,fwd_t[1x1,0nz],fwd_out_ode[2x1,0nz],fwd_out_alg[0],fwd_out_quad[0],fwd_adj_ode[2],fwd_adj_alg[0],fwd_adj_quad[0])->(fwd_adj_x[2],fwd_adj_u,fwd_adj_z[0],fwd_adj_p,fwd_adj_t[1x1,0nz]) */
static int casadi_f20(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *w0=w+0, w1, w2;
/* #0: @0 = input[24][0] */
casadi_copy(arg[24], 2, w0);
/* #1: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #2: @2 = (@2+@1) */
w2 += w1;
/* #3: output[0][0] = @2 */
if (res[0]) res[0][0] = w2;
/* #4: @2 = (-@1) */
w2 = (- w1 );
/* #5: output[0][1] = @2 */
if (res[0]) res[0][1] = w2;
/* #6: output[1][0] = @1 */
if (res[1]) res[1][0] = w1;
/* #7: output[3][0] = @1 */
if (res[3]) res[3][0] = w1;
return 0;
}
/* fwd1_adj1_F:(x0[2],u,t0,DT,DT_control,p,z0[0],out_xf[2x1,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_poly_coeff_q[0x4],out_zf[0],out_poly_coeff_z[],adj_xf[2],adj_poly_coeff[2x5],adj_qf[0],adj_poly_coeff_q[0x4],adj_zf[0],adj_poly_coeff_z[],out_adj_x0[2x1,0nz],out_adj_u[1x1,0nz],out_adj_t0[1x1,0nz],out_adj_DT[1x1,0nz],out_adj_DT_control[1x1,0nz],out_adj_p[1x1,0nz],out_adj_z0[0],fwd_x0[2],fwd_u,fwd_t0,fwd_DT,fwd_DT_control,fwd_p,fwd_z0[0],fwd_out_xf[2x1,0nz],fwd_out_poly_coeff[2x5,0nz],fwd_out_qf[0],fwd_out_poly_coeff_q[0x4],fwd_out_zf[0],fwd_out_poly_coeff_z[],fwd_adj_xf[2],fwd_adj_poly_coeff[2x5],fwd_adj_qf[0],fwd_adj_poly_coeff_q[0x4],fwd_adj_zf[0],fwd_adj_poly_coeff_z[])->(fwd_adj_x0[2],fwd_adj_u,fwd_adj_t0[1x1,0nz],fwd_adj_DT,fwd_adj_DT_control[1x1,0nz],fwd_adj_p,fwd_adj_z0[0]) */
static int casadi_f18(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+7, *rr;
const casadi_real **arg1=arg+45, *cr, *cs;
casadi_real *w0=w+5, *w1=w+15, *w2=w+17, *w3=w+19, *w4=w+21, *w5=w+23, *w6=w+25, *w7=w+27, w8, w9, w10, w11, w13, *w15=w+34, *w16=w+36, *w19=w+38, *w20=w+40, *w23=w+42, *w24=w+44, w30, w31, *w32=w+48, *w33=w+50, *w34=w+52, *w35=w+54, w36, w37, *w38=w+58, *w39=w+60, w40, *w41=w+63, *w42=w+65, *w43=w+67, *w51=w+69, w52, *w53=w+72, w57, *w58=w+75, w62, *w63=w+78, w67, w69, *w71=w+82, *w72=w+84, *w73=w+86, *w74=w+88, w75, *w76=w+91, *w79=w+93, w80, w81, w82, *w83=w+98, *w84=w+100, *w85=w+102, w86, *w87=w+105, *w88=w+107, w89, w90, w91, w92;
/* #0: @0 = input[40][0] */
casadi_copy(arg[40], 10, w0);
/* #1: {@1, @2, @3, @4, @5} = horzsplit(@0) */
casadi_copy(w0, 2, w1);
casadi_copy(w0+2, 2, w2);
casadi_copy(w0+4, 2, w3);
casadi_copy(w0+6, 2, w4);
casadi_copy(w0+8, 2, w5);
/* #2: @6 = input[39][0] */
casadi_copy(arg[39], 2, w6);
/* #3: @1 = (@1+@6) */
for (i=0, rr=w1, cs=w6; i<2; ++i) (*rr++) += (*cs++);
/* #4: @7 = input[0][0] */
casadi_copy(arg[0], 2, w7);
/* #5: @8 = input[3][0] */
w8 = arg[3] ? arg[3][0] : 0;
/* #6: @9 = 2 */
w9 = 2.;
/* #7: @9 = (@8/@9) */
w9 = (w8/w9);
/* #8: @10 = 2 */
w10 = 2.;
/* #9: @10 = (@8/@10) */
w10 = (w8/w10);
/* #10: @11 = input[1][0] */
w11 = arg[1] ? arg[1][0] : 0;
/* #11: @12 = 0x1 */
/* #12: @13 = input[5][0] */
w13 = arg[5] ? arg[5][0] : 0;
/* #13: @14 = 00 */
/* #14: {@15, NULL, NULL} = ode(@7, @11, @12, @13, @14) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w15;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #15: @16 = (@10*@15) */
for (i=0, rr=w16, cs=w15; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #16: @16 = (@7+@16) */
for (i=0, rr=w16, cr=w7, cs=w16; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #17: @17 = 0x1 */
/* #18: @18 = 00 */
/* #19: {@19, NULL, NULL} = ode(@16, @11, @17, @13, @18) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w19;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #20: @20 = (@9*@19) */
for (i=0, rr=w20, cs=w19; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #21: @20 = (@7+@20) */
for (i=0, rr=w20, cr=w7, cs=w20; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #22: @21 = 0x1 */
/* #23: @22 = 00 */
/* #24: {@23, NULL, NULL} = ode(@20, @11, @21, @13, @22) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w23;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #25: @24 = (@8*@23) */
for (i=0, rr=w24, cs=w23; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #26: @24 = (@7+@24) */
for (i=0, rr=w24, cr=w7, cs=w24; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #27: @25 = 0x1 */
/* #28: @26 = 00 */
/* #29: @27 = zeros(2x1,0nz) */
/* #30: @28 = 0x1 */
/* #31: @29 = 0x1 */
/* #32: @30 = 4 */
w30 = 4.;
/* #33: @31 = 0.0416667 */
w31 = 4.1666666666666664e-02;
/* #34: @0 = input[14][0] */
casadi_copy(arg[14], 10, w0);
/* #35: {NULL, @32, @33, @34, @35} = horzsplit(@0) */
casadi_copy(w0+2, 2, w32);
casadi_copy(w0+4, 2, w33);
casadi_copy(w0+6, 2, w34);
casadi_copy(w0+8, 2, w35);
/* #36: @35 = (@31*@35) */
for (i=0, rr=w35, cs=w35; i<2; ++i) (*rr++) = (w31*(*cs++));
/* #37: @36 = 3 */
w36 = 3.;
/* #38: @37 = pow(@8,@36) */
w37 = pow(w8,w36);
/* #39: @38 = (@35/@37) */
for (i=0, rr=w38, cr=w35; i<2; ++i) (*rr++) = ((*cr++)/w37);
/* #40: @39 = (@30*@38) */
for (i=0, rr=w39, cs=w38; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #41: @40 = 6 */
w40 = 6.;
/* #42: @40 = (@8/@40) */
w40 = (w8/w40);
/* #43: @41 = input[13][0] */
casadi_copy(arg[13], 2, w41);
/* #44: @42 = (@40*@41) */
for (i=0, rr=w42, cs=w41; i<2; ++i) (*rr++) = (w40*(*cs++));
/* #45: @43 = (@39+@42) */
for (i=0, rr=w43, cr=w39, cs=w42; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #46: @44 = 0x1 */
/* #47: @45 = 0x1 */
/* #48: @46 = zeros(2x1,0nz) */
/* #49: @47 = 00 */
/* #50: @48 = 0x1 */
/* #51: @49 = 00 */
/* #52: @50 = 00 */
/* #53: @51 = input[26][0] */
casadi_copy(arg[26], 2, w51);
/* #54: @52 = input[29][0] */
w52 = arg[29] ? arg[29][0] : 0;
/* #55: @53 = (@23*@52) */
for (i=0, rr=w53, cr=w23; i<2; ++i) (*rr++) = ((*cr++)*w52);
/* #56: @54 = zeros(2x1,0nz) */
/* #57: @55 = 0x1 */
/* #58: @56 = 0x1 */
/* #59: @57 = 0.5 */
w57 = 5.0000000000000000e-01;
/* #60: @57 = (@57*@52) */
w57 *= w52;
/* #61: @58 = (@19*@57) */
for (i=0, rr=w58, cr=w19; i<2; ++i) (*rr++) = ((*cr++)*w57);
/* #62: @59 = zeros(2x1,0nz) */
/* #63: @60 = 0x1 */
/* #64: @61 = 0x1 */
/* #65: @62 = 0.5 */
w62 = 5.0000000000000000e-01;
/* #66: @62 = (@62*@52) */
w62 *= w52;
/* #67: @63 = (@15*@62) */
for (i=0, rr=w63, cr=w15; i<2; ++i) (*rr++) = ((*cr++)*w62);
/* #68: @64 = zeros(2x1,0nz) */
/* #69: @65 = 0x1 */
/* #70: @66 = 0x1 */
/* #71: @67 = input[27][0] */
w67 = arg[27] ? arg[27][0] : 0;
/* #72: @68 = 0x1 */
/* #73: @69 = input[31][0] */
w69 = arg[31] ? arg[31][0] : 0;
/* #74: @70 = 00 */
/* #75: {@71, NULL, NULL} = fwd1_ode(@7, @11, @12, @13, @14, @64, @65, @66, @51, @67, @68, @69, @70) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w51;
arg1[9]=(&w67);
arg1[10]=0;
arg1[11]=(&w69);
arg1[12]=0;
res1[0]=w71;
res1[1]=0;
res1[2]=0;
if (casadi_f19(arg1, res1, iw, w, 0)) return 1;
/* #76: @72 = (@10*@71) */
for (i=0, rr=w72, cs=w71; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #77: @63 = (@63+@72) */
for (i=0, rr=w63, cs=w72; i<2; ++i) (*rr++) += (*cs++);
/* #78: @63 = (@51+@63) */
for (i=0, rr=w63, cr=w51, cs=w63; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #79: @64 = 0x1 */
/* #80: @65 = 00 */
/* #81: {@72, NULL, NULL} = fwd1_ode(@16, @11, @17, @13, @18, @59, @60, @61, @63, @67, @64, @69, @65) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w63;
arg1[9]=(&w67);
arg1[10]=0;
arg1[11]=(&w69);
arg1[12]=0;
res1[0]=w72;
res1[1]=0;
res1[2]=0;
if (casadi_f19(arg1, res1, iw, w, 0)) return 1;
/* #82: @73 = (@9*@72) */
for (i=0, rr=w73, cs=w72; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #83: @58 = (@58+@73) */
for (i=0, rr=w58, cs=w73; i<2; ++i) (*rr++) += (*cs++);
/* #84: @58 = (@51+@58) */
for (i=0, rr=w58, cr=w51, cs=w58; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #85: @59 = 0x1 */
/* #86: @60 = 00 */
/* #87: {@73, NULL, NULL} = fwd1_ode(@20, @11, @21, @13, @22, @54, @55, @56, @58, @67, @59, @69, @60) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w58;
arg1[9]=(&w67);
arg1[10]=0;
arg1[11]=(&w69);
arg1[12]=0;
res1[0]=w73;
res1[1]=0;
res1[2]=0;
if (casadi_f19(arg1, res1, iw, w, 0)) return 1;
/* #88: @74 = (@8*@73) */
for (i=0, rr=w74, cs=w73; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #89: @53 = (@53+@74) */
for (i=0, rr=w53, cs=w74; i<2; ++i) (*rr++) += (*cs++);
/* #90: @53 = (@51+@53) */
for (i=0, rr=w53, cr=w51, cs=w53; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #91: @54 = 0x1 */
/* #92: @55 = 00 */
/* #93: @56 = zeros(2x1,0nz) */
/* #94: @61 = 0x1 */
/* #95: @66 = 0x1 */
/* #96: @5 = (@31*@5) */
for (i=0, rr=w5, cs=w5; i<2; ++i) (*rr++) = (w31*(*cs++));
/* #97: @74 = (@5/@37) */
for (i=0, rr=w74, cr=w5; i<2; ++i) (*rr++) = ((*cr++)/w37);
/* #98: @38 = (@38/@37) */
for (i=0, rr=w38; i<2; ++i) (*rr++) /= w37;
/* #99: @31 = sq(@8) */
w31 = casadi_sq( w8 );
/* #100: @31 = (@36*@31) */
w31 = (w36*w31);
/* #101: @31 = (@31*@52) */
w31 *= w52;
/* #102: @38 = (@38*@31) */
for (i=0, rr=w38; i<2; ++i) (*rr++) *= w31;
/* #103: @74 = (@74-@38) */
for (i=0, rr=w74, cs=w38; i<2; ++i) (*rr++) -= (*cs++);
/* #104: @74 = (@30*@74) */
for (i=0, rr=w74, cs=w74; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #105: @75 = 0.166667 */
w75 = 1.6666666666666666e-01;
/* #106: @75 = (@75*@52) */
w75 *= w52;
/* #107: @38 = (@41*@75) */
for (i=0, rr=w38, cr=w41; i<2; ++i) (*rr++) = ((*cr++)*w75);
/* #108: @76 = (@40*@6) */
for (i=0, rr=w76, cs=w6; i<2; ++i) (*rr++) = (w40*(*cs++));
/* #109: @38 = (@38+@76) */
for (i=0, rr=w38, cs=w76; i<2; ++i) (*rr++) += (*cs++);
/* #110: @76 = (@74+@38) */
for (i=0, rr=w76, cr=w74, cs=w38; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #111: @77 = 0x1 */
/* #112: @78 = 0x1 */
/* #113: {@79, @40, NULL, @75, NULL} = fwd1_adj1_ode(@24, @11, @25, @13, @26, @27, @28, @29, @43, @44, @45, @46, @47, @48, @49, @50, @53, @67, @54, @69, @55, @56, @61, @66, @76, @77, @78) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w43;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=0;
arg1[16]=w53;
arg1[17]=(&w67);
arg1[18]=0;
arg1[19]=(&w69);
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=w76;
arg1[25]=0;
arg1[26]=0;
res1[0]=w79;
res1[1]=(&w40);
res1[2]=0;
res1[3]=(&w75);
res1[4]=0;
if (casadi_f20(arg1, res1, iw, w, 0)) return 1;
/* #114: @1 = (@1+@79) */
for (i=0, rr=w1, cs=w79; i<2; ++i) (*rr++) += (*cs++);
/* #115: @46 = zeros(2x1,0nz) */
/* #116: @47 = 0x1 */
/* #117: @48 = 0x1 */
/* #118: @76 = (-@39) */
for (i=0, rr=w76, cs=w39; i<2; ++i) *rr++ = (- *cs++ );
/* #119: @76 = (2.*@76) */
for (i=0, rr=w76, cs=w76; i<2; ++i) *rr++ = (2.* *cs++ );
/* #120: @80 = 4 */
w80 = 4.;
/* #121: @81 = sq(@8) */
w81 = casadi_sq( w8 );
/* #122: @80 = (@80/@81) */
w80 /= w81;
/* #123: @82 = 0.166667 */
w82 = 1.6666666666666666e-01;
/* #124: @34 = (@82*@34) */
for (i=0, rr=w34, cs=w34; i<2; ++i) (*rr++) = (w82*(*cs++));
/* #125: @83 = (@80*@34) */
for (i=0, rr=w83, cs=w34; i<2; ++i) (*rr++) = (w80*(*cs++));
/* #126: @76 = (@76+@83) */
for (i=0, rr=w76, cs=w83; i<2; ++i) (*rr++) += (*cs++);
/* #127: {@84, NULL, NULL, NULL, NULL} = adj1_ode(@24, @11, @25, @13, @26, @27, @28, @29, @43, @44, @45) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w43;
arg1[9]=0;
arg1[10]=0;
res1[0]=w84;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #128: @43 = (@8*@84) */
for (i=0, rr=w43, cs=w84; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #129: @76 = (@76+@43) */
for (i=0, rr=w76, cs=w43; i<2; ++i) (*rr++) += (*cs++);
/* #130: @43 = (2.*@42) */
for (i=0, rr=w43, cs=w42; i<2; ++i) *rr++ = (2.* *cs++ );
/* #131: @76 = (@76+@43) */
for (i=0, rr=w76, cs=w43; i<2; ++i) (*rr++) += (*cs++);
/* #132: @27 = 0x1 */
/* #133: @28 = 0x1 */
/* #134: @29 = zeros(2x1,0nz) */
/* #135: @44 = 00 */
/* #136: @45 = 0x1 */
/* #137: @49 = 00 */
/* #138: @50 = 00 */
/* #139: @56 = zeros(2x1,0nz) */
/* #140: @61 = 0x1 */
/* #141: @66 = 0x1 */
/* #142: @43 = (-@74) */
for (i=0, rr=w43, cs=w74; i<2; ++i) *rr++ = (- *cs++ );
/* #143: @43 = (2.*@43) */
for (i=0, rr=w43, cs=w43; i<2; ++i) *rr++ = (2.* *cs++ );
/* #144: @4 = (@82*@4) */
for (i=0, rr=w4, cs=w4; i<2; ++i) (*rr++) = (w82*(*cs++));
/* #145: @85 = (@80*@4) */
for (i=0, rr=w85, cs=w4; i<2; ++i) (*rr++) = (w80*(*cs++));
/* #146: @82 = (@80/@81) */
w82 = (w80/w81);
/* #147: @86 = (2.*@8) */
w86 = (2.* w8 );
/* #148: @86 = (@86*@52) */
w86 *= w52;
/* #149: @82 = (@82*@86) */
w82 *= w86;
/* #150: @87 = (@34*@82) */
for (i=0, rr=w87, cr=w34; i<2; ++i) (*rr++) = ((*cr++)*w82);
/* #151: @85 = (@85-@87) */
for (i=0, rr=w85, cs=w87; i<2; ++i) (*rr++) -= (*cs++);
/* #152: @43 = (@43+@85) */
for (i=0, rr=w43, cs=w85; i<2; ++i) (*rr++) += (*cs++);
/* #153: @87 = (@84*@52) */
for (i=0, rr=w87, cr=w84; i<2; ++i) (*rr++) = ((*cr++)*w52);
/* #154: @88 = (@8*@79) */
for (i=0, rr=w88, cs=w79; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #155: @87 = (@87+@88) */
for (i=0, rr=w87, cs=w88; i<2; ++i) (*rr++) += (*cs++);
/* #156: @43 = (@43+@87) */
for (i=0, rr=w43, cs=w87; i<2; ++i) (*rr++) += (*cs++);
/* #157: @87 = (2.*@38) */
for (i=0, rr=w87, cs=w38; i<2; ++i) *rr++ = (2.* *cs++ );
/* #158: @43 = (@43+@87) */
for (i=0, rr=w43, cs=w87; i<2; ++i) (*rr++) += (*cs++);
/* #159: @77 = 0x1 */
/* #160: @78 = 0x1 */
/* #161: {@87, @89, NULL, @90, NULL} = fwd1_adj1_ode(@20, @11, @21, @13, @22, @46, @47, @48, @76, @27, @28, @29, @44, @45, @49, @50, @58, @67, @59, @69, @60, @56, @61, @66, @43, @77, @78) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w76;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=0;
arg1[16]=w58;
arg1[17]=(&w67);
arg1[18]=0;
arg1[19]=(&w69);
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=w43;
arg1[25]=0;
arg1[26]=0;
res1[0]=w87;
res1[1]=(&w89);
res1[2]=0;
res1[3]=(&w90);
res1[4]=0;
if (casadi_f20(arg1, res1, iw, w, 0)) return 1;
/* #162: @1 = (@1+@87) */
for (i=0, rr=w1, cs=w87; i<2; ++i) (*rr++) += (*cs++);
/* #163: @29 = zeros(2x1,0nz) */
/* #164: @44 = 0x1 */
/* #165: @45 = 0x1 */
/* #166: @91 = 2 */
w91 = 2.;
/* #167: @91 = (@91/@8) */
w91 /= w8;
/* #168: @92 = 0.5 */
w92 = 5.0000000000000000e-01;
/* #169: @33 = (@92*@33) */
for (i=0, rr=w33, cs=w33; i<2; ++i) (*rr++) = (w92*(*cs++));
/* #170: @58 = (@91*@33) */
for (i=0, rr=w58, cs=w33; i<2; ++i) (*rr++) = (w91*(*cs++));
/* #171: @83 = (@58-@83) */
for (i=0, rr=w83, cr=w58, cs=w83; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #172: {@43, NULL, NULL, NULL, NULL} = adj1_ode(@20, @11, @21, @13, @22, @46, @47, @48, @76, @27, @28) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w76;
arg1[9]=0;
arg1[10]=0;
res1[0]=w43;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #173: @20 = (@9*@43) */
for (i=0, rr=w20, cs=w43; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #174: @83 = (@83+@20) */
for (i=0, rr=w83, cs=w20; i<2; ++i) (*rr++) += (*cs++);
/* #175: @20 = (2.*@42) */
for (i=0, rr=w20, cs=w42; i<2; ++i) *rr++ = (2.* *cs++ );
/* #176: @83 = (@83+@20) */
for (i=0, rr=w83, cs=w20; i<2; ++i) (*rr++) += (*cs++);
/* #177: @21 = 0x1 */
/* #178: @22 = 0x1 */
/* #179: @46 = zeros(2x1,0nz) */
/* #180: @47 = 00 */
/* #181: @48 = 0x1 */
/* #182: @27 = 00 */
/* #183: @28 = 00 */
/* #184: @49 = zeros(2x1,0nz) */
/* #185: @50 = 0x1 */
/* #186: @59 = 0x1 */
/* #187: @3 = (@92*@3) */
for (i=0, rr=w3, cs=w3; i<2; ++i) (*rr++) = (w92*(*cs++));
/* #188: @20 = (@91*@3) */
for (i=0, rr=w20, cs=w3; i<2; ++i) (*rr++) = (w91*(*cs++));
/* #189: @92 = (@91/@8) */
w92 = (w91/w8);
/* #190: @92 = (@92*@52) */
w92 *= w52;
/* #191: @76 = (@33*@92) */
for (i=0, rr=w76, cr=w33; i<2; ++i) (*rr++) = ((*cr++)*w92);
/* #192: @20 = (@20-@76) */
for (i=0, rr=w20, cs=w76; i<2; ++i) (*rr++) -= (*cs++);
/* #193: @85 = (@20-@85) */
for (i=0, rr=w85, cr=w20, cs=w85; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #194: @76 = (@43*@57) */
for (i=0, rr=w76, cr=w43; i<2; ++i) (*rr++) = ((*cr++)*w57);
/* #195: @88 = (@9*@87) */
for (i=0, rr=w88, cs=w87; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #196: @76 = (@76+@88) */
for (i=0, rr=w76, cs=w88; i<2; ++i) (*rr++) += (*cs++);
/* #197: @85 = (@85+@76) */
for (i=0, rr=w85, cs=w76; i<2; ++i) (*rr++) += (*cs++);
/* #198: @76 = (2.*@38) */
for (i=0, rr=w76, cs=w38; i<2; ++i) *rr++ = (2.* *cs++ );
/* #199: @85 = (@85+@76) */
for (i=0, rr=w85, cs=w76; i<2; ++i) (*rr++) += (*cs++);
/* #200: @60 = 0x1 */
/* #201: @56 = 0x1 */
/* #202: {@76, @9, NULL, @57, NULL} = fwd1_adj1_ode(@16, @11, @17, @13, @18, @29, @44, @45, @83, @21, @22, @46, @47, @48, @27, @28, @63, @67, @64, @69, @65, @49, @50, @59, @85, @60, @56) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w83;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=0;
arg1[16]=w63;
arg1[17]=(&w67);
arg1[18]=0;
arg1[19]=(&w69);
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=w85;
arg1[25]=0;
arg1[26]=0;
res1[0]=w76;
res1[1]=(&w9);
res1[2]=0;
res1[3]=(&w57);
res1[4]=0;
if (casadi_f20(arg1, res1, iw, w, 0)) return 1;
/* #203: @1 = (@1+@76) */
for (i=0, rr=w1, cs=w76; i<2; ++i) (*rr++) += (*cs++);
/* #204: @46 = zeros(2x1,0nz) */
/* #205: @47 = 0x1 */
/* #206: @48 = 0x1 */
/* #207: @39 = (@39-@58) */
for (i=0, rr=w39, cs=w58; i<2; ++i) (*rr++) -= (*cs++);
/* #208: @39 = (@39+@32) */
for (i=0, rr=w39, cs=w32; i<2; ++i) (*rr++) += (*cs++);
/* #209: @39 = (@39+@42) */
for (i=0, rr=w39, cs=w42; i<2; ++i) (*rr++) += (*cs++);
/* #210: {@42, NULL, NULL, NULL, NULL} = adj1_ode(@16, @11, @17, @13, @18, @29, @44, @45, @83, @21, @22) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w83;
arg1[9]=0;
arg1[10]=0;
res1[0]=w42;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #211: @16 = (@10*@42) */
for (i=0, rr=w16, cs=w42; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #212: @39 = (@39+@16) */
for (i=0, rr=w39, cs=w16; i<2; ++i) (*rr++) += (*cs++);
/* #213: @17 = 0x1 */
/* #214: @18 = 0x1 */
/* #215: @29 = zeros(2x1,0nz) */
/* #216: @44 = 00 */
/* #217: @45 = 0x1 */
/* #218: @21 = 00 */
/* #219: @22 = 00 */
/* #220: @27 = zeros(2x1,0nz) */
/* #221: @28 = 0x1 */
/* #222: @64 = 0x1 */
/* #223: @74 = (@74-@20) */
for (i=0, rr=w74, cs=w20; i<2; ++i) (*rr++) -= (*cs++);
/* #224: @74 = (@74+@2) */
for (i=0, rr=w74, cs=w2; i<2; ++i) (*rr++) += (*cs++);
/* #225: @74 = (@74+@38) */
for (i=0, rr=w74, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #226: @38 = (@42*@62) */
for (i=0, rr=w38, cr=w42; i<2; ++i) (*rr++) = ((*cr++)*w62);
/* #227: @2 = (@10*@76) */
for (i=0, rr=w2, cs=w76; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #228: @38 = (@38+@2) */
for (i=0, rr=w38, cs=w2; i<2; ++i) (*rr++) += (*cs++);
/* #229: @74 = (@74+@38) */
for (i=0, rr=w74, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #230: @65 = 0x1 */
/* #231: @49 = 0x1 */
/* #232: {@38, @10, NULL, @62, NULL} = fwd1_adj1_ode(@7, @11, @12, @13, @14, @46, @47, @48, @39, @17, @18, @29, @44, @45, @21, @22, @51, @67, @68, @69, @70, @27, @28, @64, @74, @65, @49) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w39;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=0;
arg1[16]=w51;
arg1[17]=(&w67);
arg1[18]=0;
arg1[19]=(&w69);
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=w74;
arg1[25]=0;
arg1[26]=0;
res1[0]=w38;
res1[1]=(&w10);
res1[2]=0;
res1[3]=(&w62);
res1[4]=0;
if (casadi_f20(arg1, res1, iw, w, 0)) return 1;
/* #233: @1 = (@1+@38) */
for (i=0, rr=w1, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #234: output[0][0] = @1 */
casadi_copy(w1, 2, res[0]);
/* #235: @40 = (@40+@89) */
w40 += w89;
/* #236: @40 = (@40+@9) */
w40 += w9;
/* #237: @40 = (@40+@10) */
w40 += w10;
/* #238: output[1][0] = @40 */
if (res[1]) res[1][0] = w40;
/* #239: {@1, NULL, NULL} = ode(@24, @11, @25, @13, @26) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w1;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #240: @38 = (2.*@23) */
for (i=0, rr=w38, cs=w23; i<2; ++i) *rr++ = (2.* *cs++ );
/* #241: @38 = (@1-@38) */
for (i=0, rr=w38, cr=w1, cs=w38; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #242: @38 = (@38+@15) */
for (i=0, rr=w38, cs=w15; i<2; ++i) (*rr++) += (*cs++);
/* #243: @38 = (@30*@38) */
for (i=0, rr=w38, cs=w38; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #244: @38 = (@38/@37) */
for (i=0, rr=w38; i<2; ++i) (*rr++) /= w37;
/* #245: @7 = (@38/@37) */
for (i=0, rr=w7, cr=w38; i<2; ++i) (*rr++) = ((*cr++)/w37);
/* #246: @39 = (-@7) */
for (i=0, rr=w39, cs=w7; i<2; ++i) *rr++ = (- *cs++ );
/* #247: @40 = dot(@39, @35) */
w40 = casadi_dot(2, w39, w35);
/* #248: @10 = (2.*@8) */
w10 = (2.* w8 );
/* #249: @10 = (@10*@52) */
w10 *= w52;
/* #250: @10 = (@36*@10) */
w10 = (w36*w10);
/* #251: @40 = (@40*@10) */
w40 *= w10;
/* #252: @10 = sq(@8) */
w10 = casadi_sq( w8 );
/* #253: @36 = (@36*@10) */
w36 *= w10;
/* #254: @10 = dot(@39, @5) */
w10 = casadi_dot(2, w39, w5);
/* #255: @12 = zeros(2x1,0nz) */
/* #256: @14 = 0x1 */
/* #257: @46 = 0x1 */
/* #258: {@39, NULL, NULL} = fwd1_ode(@24, @11, @25, @13, @26, @12, @14, @46, @53, @67, @54, @69, @55) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w53;
arg1[9]=(&w67);
arg1[10]=0;
arg1[11]=(&w69);
arg1[12]=0;
res1[0]=w39;
res1[1]=0;
res1[2]=0;
if (casadi_f19(arg1, res1, iw, w, 0)) return 1;
/* #259: @24 = (2.*@73) */
for (i=0, rr=w24, cs=w73; i<2; ++i) *rr++ = (2.* *cs++ );
/* #260: @24 = (@39-@24) */
for (i=0, rr=w24, cr=w39, cs=w24; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #261: @24 = (@24+@71) */
for (i=0, rr=w24, cs=w71; i<2; ++i) (*rr++) += (*cs++);
/* #262: @24 = (@30*@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #263: @24 = (@24/@37) */
for (i=0, rr=w24; i<2; ++i) (*rr++) /= w37;
/* #264: @38 = (@38/@37) */
for (i=0, rr=w38; i<2; ++i) (*rr++) /= w37;
/* #265: @38 = (@38*@31) */
for (i=0, rr=w38; i<2; ++i) (*rr++) *= w31;
/* #266: @24 = (@24-@38) */
for (i=0, rr=w24, cs=w38; i<2; ++i) (*rr++) -= (*cs++);
/* #267: @24 = (@24/@37) */
for (i=0, rr=w24; i<2; ++i) (*rr++) /= w37;
/* #268: @7 = (@7/@37) */
for (i=0, rr=w7; i<2; ++i) (*rr++) /= w37;
/* #269: @7 = (@7*@31) */
for (i=0, rr=w7; i<2; ++i) (*rr++) *= w31;
/* #270: @24 = (@24-@7) */
for (i=0, rr=w24, cs=w7; i<2; ++i) (*rr++) -= (*cs++);
/* #271: @24 = (-@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) *rr++ = (- *cs++ );
/* #272: @31 = dot(@24, @35) */
w31 = casadi_dot(2, w24, w35);
/* #273: @10 = (@10+@31) */
w10 += w31;
/* #274: @36 = (@36*@10) */
w36 *= w10;
/* #275: @40 = (@40+@36) */
w40 += w36;
/* #276: @80 = (@80/@81) */
w80 /= w81;
/* #277: @24 = (@23-@19) */
for (i=0, rr=w24, cr=w23, cs=w19; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #278: @36 = dot(@24, @34) */
w36 = casadi_dot(2, w24, w34);
/* #279: @10 = (@80*@36) */
w10 = (w80*w36);
/* #280: @31 = (2.*@52) */
w31 = (2.* w52 );
/* #281: @10 = (@10*@31) */
w10 *= w31;
/* #282: @31 = (2.*@8) */
w31 = (2.* w8 );
/* #283: @37 = (@80/@81) */
w37 = (w80/w81);
/* #284: @37 = (@37*@86) */
w37 *= w86;
/* #285: @37 = (-@37) */
w37 = (- w37 );
/* #286: @82 = (@82/@81) */
w82 /= w81;
/* #287: @37 = (@37-@82) */
w37 -= w82;
/* #288: @36 = (@36*@37) */
w36 *= w37;
/* #289: @37 = dot(@24, @4) */
w37 = casadi_dot(2, w24, w4);
/* #290: @24 = (@73-@72) */
for (i=0, rr=w24, cr=w73, cs=w72; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #291: @82 = dot(@24, @34) */
w82 = casadi_dot(2, w24, w34);
/* #292: @37 = (@37+@82) */
w37 += w82;
/* #293: @80 = (@80*@37) */
w80 *= w37;
/* #294: @36 = (@36+@80) */
w36 += w80;
/* #295: @31 = (@31*@36) */
w31 *= w36;
/* #296: @10 = (@10+@31) */
w10 += w31;
/* #297: @40 = (@40-@10) */
w40 -= w10;
/* #298: @24 = (@19-@15) */
for (i=0, rr=w24, cr=w19, cs=w15; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #299: @10 = dot(@24, @33) */
w10 = casadi_dot(2, w24, w33);
/* #300: @91 = (@91/@8) */
w91 /= w8;
/* #301: @31 = (@91/@8) */
w31 = (w91/w8);
/* #302: @31 = (@31*@52) */
w31 *= w52;
/* #303: @31 = (-@31) */
w31 = (- w31 );
/* #304: @92 = (@92/@8) */
w92 /= w8;
/* #305: @31 = (@31-@92) */
w31 -= w92;
/* #306: @10 = (@10*@31) */
w10 *= w31;
/* #307: @31 = dot(@24, @3) */
w31 = casadi_dot(2, w24, w3);
/* #308: @24 = (@72-@71) */
for (i=0, rr=w24, cr=w72, cs=w71; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #309: @92 = dot(@24, @33) */
w92 = casadi_dot(2, w24, w33);
/* #310: @31 = (@31+@92) */
w31 += w92;
/* #311: @91 = (@91*@31) */
w91 *= w31;
/* #312: @10 = (@10+@91) */
w10 += w91;
/* #313: @40 = (@40-@10) */
w40 -= w10;
/* #314: @10 = dot(@23, @79) */
w10 = casadi_dot(2, w23, w79);
/* #315: @91 = dot(@73, @84) */
w91 = casadi_dot(2, w73, w84);
/* #316: @10 = (@10+@91) */
w10 += w91;
/* #317: @40 = (@40+@10) */
w40 += w10;
/* #318: @10 = 0.5 */
w10 = 5.0000000000000000e-01;
/* #319: @91 = dot(@19, @87) */
w91 = casadi_dot(2, w19, w87);
/* #320: @31 = dot(@72, @43) */
w31 = casadi_dot(2, w72, w43);
/* #321: @91 = (@91+@31) */
w91 += w31;
/* #322: @10 = (@10*@91) */
w10 *= w91;
/* #323: @40 = (@40+@10) */
w40 += w10;
/* #324: @10 = 0.5 */
w10 = 5.0000000000000000e-01;
/* #325: @91 = dot(@15, @76) */
w91 = casadi_dot(2, w15, w76);
/* #326: @31 = dot(@71, @42) */
w31 = casadi_dot(2, w71, w42);
/* #327: @91 = (@91+@31) */
w91 += w31;
/* #328: @10 = (@10*@91) */
w10 *= w91;
/* #329: @40 = (@40+@10) */
w40 += w10;
/* #330: @10 = 0.166667 */
w10 = 1.6666666666666666e-01;
/* #331: @19 = (2.*@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) *rr++ = (2.* *cs++ );
/* #332: @15 = (@15+@19) */
for (i=0, rr=w15, cs=w19; i<2; ++i) (*rr++) += (*cs++);
/* #333: @23 = (2.*@23) */
for (i=0, rr=w23, cs=w23; i<2; ++i) *rr++ = (2.* *cs++ );
/* #334: @15 = (@15+@23) */
for (i=0, rr=w15, cs=w23; i<2; ++i) (*rr++) += (*cs++);
/* #335: @15 = (@15+@1) */
for (i=0, rr=w15, cs=w1; i<2; ++i) (*rr++) += (*cs++);
/* #336: @91 = dot(@15, @6) */
w91 = casadi_dot(2, w15, w6);
/* #337: @72 = (2.*@72) */
for (i=0, rr=w72, cs=w72; i<2; ++i) *rr++ = (2.* *cs++ );
/* #338: @71 = (@71+@72) */
for (i=0, rr=w71, cs=w72; i<2; ++i) (*rr++) += (*cs++);
/* #339: @73 = (2.*@73) */
for (i=0, rr=w73, cs=w73; i<2; ++i) *rr++ = (2.* *cs++ );
/* #340: @71 = (@71+@73) */
for (i=0, rr=w71, cs=w73; i<2; ++i) (*rr++) += (*cs++);
/* #341: @71 = (@71+@39) */
for (i=0, rr=w71, cs=w39; i<2; ++i) (*rr++) += (*cs++);
/* #342: @31 = dot(@71, @41) */
w31 = casadi_dot(2, w71, w41);
/* #343: @91 = (@91+@31) */
w91 += w31;
/* #344: @10 = (@10*@91) */
w10 *= w91;
/* #345: @40 = (@40+@10) */
w40 += w10;
/* #346: output[3][0] = @40 */
if (res[3]) res[3][0] = w40;
/* #347: @75 = (@75+@90) */
w75 += w90;
/* #348: @75 = (@75+@57) */
w75 += w57;
/* #349: @75 = (@75+@62) */
w75 += w62;
/* #350: output[5][0] = @75 */
if (res[5]) res[5][0] = w75;
return 0;
}
/* fwd1_adj1_F:(x0[2],u,T,t0,p,z0[0],out_xf[2x1,0nz],out_Xi[2x2,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_Qi[0],out_poly_coeff_q[0x4],out_zf[0],out_Zi[0],out_poly_coeff_z[],adj_xf[2],adj_Xi[2x2],adj_poly_coeff[2x5],adj_qf[0],adj_Qi[0],adj_poly_coeff_q[0x4],adj_zf[0],adj_Zi[0],adj_poly_coeff_z[],out_adj_x0[2x1,0nz],out_adj_u[1x1,0nz],out_adj_T[1x1,0nz],out_adj_t0[1x1,0nz],out_adj_p[1x1,0nz],out_adj_z0[0],fwd_x0[2],fwd_u,fwd_T,fwd_t0,fwd_p,fwd_z0[0],fwd_out_xf[2x1,0nz],fwd_out_Xi[2x2,0nz],fwd_out_poly_coeff[2x5,0nz],fwd_out_qf[0],fwd_out_Qi[0],fwd_out_poly_coeff_q[0x4],fwd_out_zf[0],fwd_out_Zi[0],fwd_out_poly_coeff_z[],fwd_adj_xf[2],fwd_adj_Xi[2x2],fwd_adj_poly_coeff[2x5],fwd_adj_qf[0],fwd_adj_Qi[0],fwd_adj_poly_coeff_q[0x4],fwd_adj_zf[0],fwd_adj_Zi[0],fwd_adj_poly_coeff_z[])->(fwd_adj_x0[2],fwd_adj_u,fwd_adj_T,fwd_adj_t0[1x1,0nz],fwd_adj_p,fwd_adj_z0[0]) */
static int casadi_f17(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+6, *rr;
const casadi_real **arg1=arg+54, *cs;
casadi_real *w0=w+113, *w1=w+117, *w2=w+119, *w3=w+121, w4, w5, w6, w7, *w15=w+127, *w16=w+129, *w17=w+131, w28, w29, w30, w31, *w38=w+145, *w39=w+147, w43, w44, w45;
/* #0: @0 = input[46][0] */
casadi_copy(arg[46], 4, w0);
/* #1: {@1, @2} = horzsplit(@0) */
casadi_copy(w0, 2, w1);
casadi_copy(w0+2, 2, w2);
/* #2: @3 = input[0][0] */
casadi_copy(arg[0], 2, w3);
/* #3: @4 = input[1][0] */
w4 = arg[1] ? arg[1][0] : 0;
/* #4: @5 = input[3][0] */
w5 = arg[3] ? arg[3][0] : 0;
/* #5: @6 = input[2][0] */
w6 = arg[2] ? arg[2][0] : 0;
/* #6: @7 = input[4][0] */
w7 = arg[4] ? arg[4][0] : 0;
/* #7: @8 = 0x1 */
/* #8: @9 = zeros(2x1,0nz) */
/* #9: @10 = zeros(2x5,0nz) */
/* #10: @11 = 0x1 */
/* #11: @12 = 0x4 */
/* #12: @13 = 0x1 */
/* #13: @14 = 0x0 */
/* #14: @0 = input[16][0] */
casadi_copy(arg[16], 4, w0);
/* #15: {NULL, @15} = horzsplit(@0) */
casadi_copy(w0+2, 2, w15);
/* #16: @16 = input[15][0] */
casadi_copy(arg[15], 2, w16);
/* #17: @15 = (@15+@16) */
for (i=0, rr=w15, cs=w16; i<2; ++i) (*rr++) += (*cs++);
/* #18: @17 = input[17][0] */
casadi_copy(arg[17], 10, w17);
/* #19: @18 = 0x1 */
/* #20: @19 = 0x4 */
/* #21: @20 = 0x1 */
/* #22: @21 = zeros(2x1,0nz) */
/* #23: @22 = 00 */
/* #24: @23 = 00 */
/* #25: @24 = 00 */
/* #26: @25 = 00 */
/* #27: @26 = 00 */
/* #28: @27 = 0x1 */
/* #29: @16 = input[30][0] */
casadi_copy(arg[30], 2, w16);
/* #30: @28 = input[31][0] */
w28 = arg[31] ? arg[31][0] : 0;
/* #31: @29 = input[33][0] */
w29 = arg[33] ? arg[33][0] : 0;
/* #32: @30 = input[32][0] */
w30 = arg[32] ? arg[32][0] : 0;
/* #33: @31 = input[34][0] */
w31 = arg[34] ? arg[34][0] : 0;
/* #34: @32 = 0x1 */
/* #35: @33 = zeros(2x1,0nz) */
/* #36: @34 = zeros(2x5,0nz) */
/* #37: @35 = 0x1 */
/* #38: @36 = 0x4 */
/* #39: @37 = 0x1 */
/* #40: @38 = input[45][0] */
casadi_copy(arg[45], 2, w38);
/* #41: @2 = (@2+@38) */
for (i=0, rr=w2, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #42: @39 = input[47][0] */
casadi_copy(arg[47], 10, w39);
/* #43: @40 = 0x1 */
/* #44: @41 = 0x4 */
/* #45: @42 = 0x1 */
/* #46: {@38, @43, NULL, @44, NULL, @45, NULL} = fwd1_adj1_F(@3, @4, @5, @6, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @17, @18, @19, @20, @14, @21, @22, @23, @24, @25, @26, @27, @16, @28, @29, @30, @30, @31, @32, @33, @34, @35, @36, @37, @14, @2, @39, @40, @41, @42, @14) */
arg1[0]=w3;
arg1[1]=(&w4);
arg1[2]=(&w5);
arg1[3]=(&w6);
arg1[4]=(&w6);
arg1[5]=(&w7);
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=w15;
arg1[14]=w17;
arg1[15]=0;
arg1[16]=0;
arg1[17]=0;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=w16;
arg1[27]=(&w28);
arg1[28]=(&w29);
arg1[29]=(&w30);
arg1[30]=(&w30);
arg1[31]=(&w31);
arg1[32]=0;
arg1[33]=0;
arg1[34]=0;
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=w2;
arg1[40]=w39;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
res1[0]=w38;
res1[1]=(&w43);
res1[2]=0;
res1[3]=(&w44);
res1[4]=0;
res1[5]=(&w45);
res1[6]=0;
if (casadi_f18(arg1, res1, iw, w, 0)) return 1;
/* #47: @1 = (@1+@38) */
for (i=0, rr=w1, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #48: output[0][0] = @1 */
casadi_copy(w1, 2, res[0]);
/* #49: output[1][0] = @43 */
if (res[1]) res[1][0] = w43;
/* #50: output[2][0] = @44 */
if (res[2]) res[2][0] = w44;
/* #51: output[4][0] = @45 */
if (res[4]) res[4][0] = w45;
return 0;
}
/* nlp_hess_l:(x[32],p,lam_f,lam_g[42])->(triu_hess_gamma_x_x[32x32,31nz]) */
static int casadi_f16(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+1, *rr, *ss;
const casadi_real **arg1=arg+4, *cs;
casadi_real *w0=w+160, w1, w2, *w3=w+193, w4, w5, *w16=w+197, *w17=w+239, *w18=w+241, *w19=w+243, *w20=w+245, *w21=w+247, *w22=w+249, *w23=w+251, *w24=w+253, *w25=w+255, *w26=w+257, *w27=w+259, *w28=w+263, *w40=w+273, w41, w42, w43, w44, w45, w46, w47, w48, w49, w50, w51, w52, w53, w54, w55, w56, w57, w58, w59, w60, w61, w62, w63, w64, w65, w66, w67, w68, w69, w70, w71, *w72=w+336, w73, w74, w75, *w85=w+341, *w86=w+343, *w87=w+347, *w93=w+357, w94, w95, *w96=w+361, *w97=w+392;
/* #0: @0 = zeros(32x32,31nz) */
casadi_clear(w0, 31);
/* #1: @1 = input[0][0] */
w1 = arg[0] ? arg[0][0] : 0;
/* #2: @2 = input[0][1] */
w2 = arg[0] ? arg[0][1] : 0;
/* #3: @3 = vertcat(@1, @2) */
rr=w3;
*rr++ = w1;
*rr++ = w2;
/* #4: @1 = input[0][2] */
w1 = arg[0] ? arg[0][2] : 0;
/* #5: @2 = 1 */
w2 = 1.;
/* #6: @4 = 0 */
w4 = 0.;
/* #7: @5 = input[1][0] */
w5 = arg[1] ? arg[1][0] : 0;
/* #8: @6 = 0x1 */
/* #9: @7 = zeros(2x1,0nz) */
/* #10: @8 = zeros(2x2,0nz) */
/* #11: @9 = zeros(2x5,0nz) */
/* #12: @10 = 0x1 */
/* #13: @11 = 0x1 */
/* #14: @12 = 0x4 */
/* #15: @13 = 0x1 */
/* #16: @14 = 0x1 */
/* #17: @15 = 0x0 */
/* #18: @16 = input[3][0] */
casadi_copy(arg[3], 42, w16);
/* #19: {@17, NULL, NULL, NULL, @18, NULL, NULL, @19, NULL, NULL, @20, NULL, NULL, @21, NULL, NULL, @22, NULL, NULL, @23, NULL, NULL, @24, NULL, NULL, @25, NULL, NULL, @26, NULL, NULL, NULL} = vertsplit(@16) */
casadi_copy(w16, 2, w17);
casadi_copy(w16+5, 2, w18);
casadi_copy(w16+9, 2, w19);
casadi_copy(w16+13, 2, w20);
casadi_copy(w16+17, 2, w21);
casadi_copy(w16+21, 2, w22);
casadi_copy(w16+25, 2, w23);
casadi_copy(w16+29, 2, w24);
casadi_copy(w16+33, 2, w25);
casadi_copy(w16+37, 2, w26);
/* #20: @17 = (-@17) */
for (i=0, rr=w17, cs=w17; i<2; ++i) *rr++ = (- *cs++ );
/* #21: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #22: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #23: @29 = 0x1 */
/* #24: @30 = 0x1 */
/* #25: @31 = 0x4 */
/* #26: @32 = 0x1 */
/* #27: @33 = 0x1 */
/* #28: @34 = zeros(2x1,0nz) */
/* #29: @35 = 00 */
/* #30: @36 = 00 */
/* #31: @37 = 00 */
/* #32: @38 = 00 */
/* #33: @39 = 0x1 */
/* #34: @40 = ones(32x1) */
casadi_fill(w40, 32, 1.);
/* #35: {@41, @42, @43, @44, @45, @46, @47, @48, @49, @50, @51, @52, @53, @54, @55, @56, @57, @58, @59, @60, @61, @62, @63, @64, @65, @66, @67, @68, @69, @70, @71, NULL} = vertsplit(@40) */
w41 = w40[0];
w42 = w40[1];
w43 = w40[2];
w44 = w40[3];
w45 = w40[4];
w46 = w40[5];
w47 = w40[6];
w48 = w40[7];
w49 = w40[8];
w50 = w40[9];
w51 = w40[10];
w52 = w40[11];
w53 = w40[12];
w54 = w40[13];
w55 = w40[14];
w56 = w40[15];
w57 = w40[16];
w58 = w40[17];
w59 = w40[18];
w60 = w40[19];
w61 = w40[20];
w62 = w40[21];
w63 = w40[22];
w64 = w40[23];
w65 = w40[24];
w66 = w40[25];
w67 = w40[26];
w68 = w40[27];
w69 = w40[28];
w70 = w40[29];
w71 = w40[30];
/* #36: @72 = vertcat(@41, @42) */
rr=w72;
*rr++ = w41;
*rr++ = w42;
/* #37: @73 = 0 */
w73 = 0.;
/* #38: @74 = 0 */
w74 = 0.;
/* #39: @75 = 0 */
w75 = 0.;
/* #40: @76 = 0x1 */
/* #41: @77 = zeros(2x1,0nz) */
/* #42: @78 = zeros(2x2,0nz) */
/* #43: @79 = zeros(2x5,0nz) */
/* #44: @80 = 0x1 */
/* #45: @81 = 0x1 */
/* #46: @82 = 0x4 */
/* #47: @83 = 0x1 */
/* #48: @84 = 0x1 */
/* #49: @85 = zeros(2x1) */
casadi_clear(w85, 2);
/* #50: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #51: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #52: @88 = 0x1 */
/* #53: @89 = 0x1 */
/* #54: @90 = 0x4 */
/* #55: @91 = 0x1 */
/* #56: @92 = 0x1 */
/* #57: {@93, @94, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@3, @1, @2, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @17, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @72, @43, @73, @74, @75, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @85, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w3;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w17;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w72;
arg1[31]=(&w43);
arg1[32]=(&w73);
arg1[33]=(&w74);
arg1[34]=(&w75);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w85;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w93;
res1[1]=(&w94);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #58: {@1, @2} = vertsplit(@93) */
w1 = w93[0];
w2 = w93[1];
/* #59: @4 = input[2][0] */
w4 = arg[2] ? arg[2][0] : 0;
/* #60: @41 = (2.*@41) */
w41 = (2.* w41 );
/* #61: @41 = (@4*@41) */
w41 = (w4*w41);
/* #62: @1 = (@1+@41) */
w1 += w41;
/* #63: @42 = (2.*@42) */
w42 = (2.* w42 );
/* #64: @42 = (@4*@42) */
w42 = (w4*w42);
/* #65: @2 = (@2+@42) */
w2 += w42;
/* #66: @43 = (2.*@43) */
w43 = (2.* w43 );
/* #67: @43 = (@4*@43) */
w43 = (w4*w43);
/* #68: @94 = (@94+@43) */
w94 += w43;
/* #69: @43 = input[0][3] */
w43 = arg[0] ? arg[0][3] : 0;
/* #70: @42 = input[0][4] */
w42 = arg[0] ? arg[0][4] : 0;
/* #71: @93 = vertcat(@43, @42) */
rr=w93;
*rr++ = w43;
*rr++ = w42;
/* #72: @43 = input[0][5] */
w43 = arg[0] ? arg[0][5] : 0;
/* #73: @42 = 1 */
w42 = 1.;
/* #74: @41 = 1 */
w41 = 1.;
/* #75: @6 = 0x1 */
/* #76: @7 = zeros(2x1,0nz) */
/* #77: @8 = zeros(2x2,0nz) */
/* #78: @9 = zeros(2x5,0nz) */
/* #79: @10 = 0x1 */
/* #80: @11 = 0x1 */
/* #81: @12 = 0x4 */
/* #82: @13 = 0x1 */
/* #83: @14 = 0x1 */
/* #84: @18 = (-@18) */
for (i=0, rr=w18, cs=w18; i<2; ++i) *rr++ = (- *cs++ );
/* #85: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #86: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #87: @29 = 0x1 */
/* #88: @30 = 0x1 */
/* #89: @31 = 0x4 */
/* #90: @32 = 0x1 */
/* #91: @33 = 0x1 */
/* #92: @34 = zeros(2x1,0nz) */
/* #93: @35 = 00 */
/* #94: @36 = 00 */
/* #95: @37 = 00 */
/* #96: @38 = 00 */
/* #97: @39 = 0x1 */
/* #98: @3 = vertcat(@44, @45) */
rr=w3;
*rr++ = w44;
*rr++ = w45;
/* #99: @73 = 0 */
w73 = 0.;
/* #100: @74 = 0 */
w74 = 0.;
/* #101: @75 = 0 */
w75 = 0.;
/* #102: @76 = 0x1 */
/* #103: @77 = zeros(2x1,0nz) */
/* #104: @78 = zeros(2x2,0nz) */
/* #105: @79 = zeros(2x5,0nz) */
/* #106: @80 = 0x1 */
/* #107: @81 = 0x1 */
/* #108: @82 = 0x4 */
/* #109: @83 = 0x1 */
/* #110: @84 = 0x1 */
/* #111: @17 = zeros(2x1) */
casadi_clear(w17, 2);
/* #112: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #113: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #114: @88 = 0x1 */
/* #115: @89 = 0x1 */
/* #116: @90 = 0x4 */
/* #117: @91 = 0x1 */
/* #118: @92 = 0x1 */
/* #119: {@72, @95, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@93, @43, @42, @41, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @18, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @3, @46, @73, @74, @75, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @17, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w93;
arg1[1]=(&w43);
arg1[2]=(&w42);
arg1[3]=(&w41);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w18;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w3;
arg1[31]=(&w46);
arg1[32]=(&w73);
arg1[33]=(&w74);
arg1[34]=(&w75);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w17;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w72;
res1[1]=(&w95);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #120: {@43, @42} = vertsplit(@72) */
w43 = w72[0];
w42 = w72[1];
/* #121: @44 = (2.*@44) */
w44 = (2.* w44 );
/* #122: @44 = (@4*@44) */
w44 = (w4*w44);
/* #123: @43 = (@43+@44) */
w43 += w44;
/* #124: @45 = (2.*@45) */
w45 = (2.* w45 );
/* #125: @45 = (@4*@45) */
w45 = (w4*w45);
/* #126: @42 = (@42+@45) */
w42 += w45;
/* #127: @46 = (2.*@46) */
w46 = (2.* w46 );
/* #128: @46 = (@4*@46) */
w46 = (w4*w46);
/* #129: @95 = (@95+@46) */
w95 += w46;
/* #130: @46 = input[0][6] */
w46 = arg[0] ? arg[0][6] : 0;
/* #131: @45 = input[0][7] */
w45 = arg[0] ? arg[0][7] : 0;
/* #132: @72 = vertcat(@46, @45) */
rr=w72;
*rr++ = w46;
*rr++ = w45;
/* #133: @46 = input[0][8] */
w46 = arg[0] ? arg[0][8] : 0;
/* #134: @45 = 1 */
w45 = 1.;
/* #135: @44 = 2 */
w44 = 2.;
/* #136: @6 = 0x1 */
/* #137: @7 = zeros(2x1,0nz) */
/* #138: @8 = zeros(2x2,0nz) */
/* #139: @9 = zeros(2x5,0nz) */
/* #140: @10 = 0x1 */
/* #141: @11 = 0x1 */
/* #142: @12 = 0x4 */
/* #143: @13 = 0x1 */
/* #144: @14 = 0x1 */
/* #145: @19 = (-@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) *rr++ = (- *cs++ );
/* #146: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #147: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #148: @29 = 0x1 */
/* #149: @30 = 0x1 */
/* #150: @31 = 0x4 */
/* #151: @32 = 0x1 */
/* #152: @33 = 0x1 */
/* #153: @34 = zeros(2x1,0nz) */
/* #154: @35 = 00 */
/* #155: @36 = 00 */
/* #156: @37 = 00 */
/* #157: @38 = 00 */
/* #158: @39 = 0x1 */
/* #159: @93 = vertcat(@47, @48) */
rr=w93;
*rr++ = w47;
*rr++ = w48;
/* #160: @41 = 0 */
w41 = 0.;
/* #161: @73 = 0 */
w73 = 0.;
/* #162: @74 = 0 */
w74 = 0.;
/* #163: @76 = 0x1 */
/* #164: @77 = zeros(2x1,0nz) */
/* #165: @78 = zeros(2x2,0nz) */
/* #166: @79 = zeros(2x5,0nz) */
/* #167: @80 = 0x1 */
/* #168: @81 = 0x1 */
/* #169: @82 = 0x4 */
/* #170: @83 = 0x1 */
/* #171: @84 = 0x1 */
/* #172: @18 = zeros(2x1) */
casadi_clear(w18, 2);
/* #173: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #174: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #175: @88 = 0x1 */
/* #176: @89 = 0x1 */
/* #177: @90 = 0x4 */
/* #178: @91 = 0x1 */
/* #179: @92 = 0x1 */
/* #180: {@3, @75, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@72, @46, @45, @44, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @19, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @93, @49, @41, @73, @74, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @18, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w72;
arg1[1]=(&w46);
arg1[2]=(&w45);
arg1[3]=(&w44);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w19;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w93;
arg1[31]=(&w49);
arg1[32]=(&w41);
arg1[33]=(&w73);
arg1[34]=(&w74);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w18;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w3;
res1[1]=(&w75);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #181: {@46, @45} = vertsplit(@3) */
w46 = w3[0];
w45 = w3[1];
/* #182: @47 = (2.*@47) */
w47 = (2.* w47 );
/* #183: @47 = (@4*@47) */
w47 = (w4*w47);
/* #184: @46 = (@46+@47) */
w46 += w47;
/* #185: @48 = (2.*@48) */
w48 = (2.* w48 );
/* #186: @48 = (@4*@48) */
w48 = (w4*w48);
/* #187: @45 = (@45+@48) */
w45 += w48;
/* #188: @49 = (2.*@49) */
w49 = (2.* w49 );
/* #189: @49 = (@4*@49) */
w49 = (w4*w49);
/* #190: @75 = (@75+@49) */
w75 += w49;
/* #191: @49 = input[0][9] */
w49 = arg[0] ? arg[0][9] : 0;
/* #192: @48 = input[0][10] */
w48 = arg[0] ? arg[0][10] : 0;
/* #193: @3 = vertcat(@49, @48) */
rr=w3;
*rr++ = w49;
*rr++ = w48;
/* #194: @49 = input[0][11] */
w49 = arg[0] ? arg[0][11] : 0;
/* #195: @48 = 1 */
w48 = 1.;
/* #196: @47 = 3 */
w47 = 3.;
/* #197: @6 = 0x1 */
/* #198: @7 = zeros(2x1,0nz) */
/* #199: @8 = zeros(2x2,0nz) */
/* #200: @9 = zeros(2x5,0nz) */
/* #201: @10 = 0x1 */
/* #202: @11 = 0x1 */
/* #203: @12 = 0x4 */
/* #204: @13 = 0x1 */
/* #205: @14 = 0x1 */
/* #206: @20 = (-@20) */
for (i=0, rr=w20, cs=w20; i<2; ++i) *rr++ = (- *cs++ );
/* #207: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #208: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #209: @29 = 0x1 */
/* #210: @30 = 0x1 */
/* #211: @31 = 0x4 */
/* #212: @32 = 0x1 */
/* #213: @33 = 0x1 */
/* #214: @34 = zeros(2x1,0nz) */
/* #215: @35 = 00 */
/* #216: @36 = 00 */
/* #217: @37 = 00 */
/* #218: @38 = 00 */
/* #219: @39 = 0x1 */
/* #220: @72 = vertcat(@50, @51) */
rr=w72;
*rr++ = w50;
*rr++ = w51;
/* #221: @44 = 0 */
w44 = 0.;
/* #222: @41 = 0 */
w41 = 0.;
/* #223: @73 = 0 */
w73 = 0.;
/* #224: @76 = 0x1 */
/* #225: @77 = zeros(2x1,0nz) */
/* #226: @78 = zeros(2x2,0nz) */
/* #227: @79 = zeros(2x5,0nz) */
/* #228: @80 = 0x1 */
/* #229: @81 = 0x1 */
/* #230: @82 = 0x4 */
/* #231: @83 = 0x1 */
/* #232: @84 = 0x1 */
/* #233: @19 = zeros(2x1) */
casadi_clear(w19, 2);
/* #234: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #235: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #236: @88 = 0x1 */
/* #237: @89 = 0x1 */
/* #238: @90 = 0x4 */
/* #239: @91 = 0x1 */
/* #240: @92 = 0x1 */
/* #241: {@93, @74, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@3, @49, @48, @47, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @20, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @72, @52, @44, @41, @73, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @19, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w3;
arg1[1]=(&w49);
arg1[2]=(&w48);
arg1[3]=(&w47);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w20;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w72;
arg1[31]=(&w52);
arg1[32]=(&w44);
arg1[33]=(&w41);
arg1[34]=(&w73);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w19;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w93;
res1[1]=(&w74);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #242: {@49, @48} = vertsplit(@93) */
w49 = w93[0];
w48 = w93[1];
/* #243: @50 = (2.*@50) */
w50 = (2.* w50 );
/* #244: @50 = (@4*@50) */
w50 = (w4*w50);
/* #245: @49 = (@49+@50) */
w49 += w50;
/* #246: @51 = (2.*@51) */
w51 = (2.* w51 );
/* #247: @51 = (@4*@51) */
w51 = (w4*w51);
/* #248: @48 = (@48+@51) */
w48 += w51;
/* #249: @52 = (2.*@52) */
w52 = (2.* w52 );
/* #250: @52 = (@4*@52) */
w52 = (w4*w52);
/* #251: @74 = (@74+@52) */
w74 += w52;
/* #252: @52 = input[0][12] */
w52 = arg[0] ? arg[0][12] : 0;
/* #253: @51 = input[0][13] */
w51 = arg[0] ? arg[0][13] : 0;
/* #254: @93 = vertcat(@52, @51) */
rr=w93;
*rr++ = w52;
*rr++ = w51;
/* #255: @52 = input[0][14] */
w52 = arg[0] ? arg[0][14] : 0;
/* #256: @51 = 1 */
w51 = 1.;
/* #257: @50 = 4 */
w50 = 4.;
/* #258: @6 = 0x1 */
/* #259: @7 = zeros(2x1,0nz) */
/* #260: @8 = zeros(2x2,0nz) */
/* #261: @9 = zeros(2x5,0nz) */
/* #262: @10 = 0x1 */
/* #263: @11 = 0x1 */
/* #264: @12 = 0x4 */
/* #265: @13 = 0x1 */
/* #266: @14 = 0x1 */
/* #267: @21 = (-@21) */
for (i=0, rr=w21, cs=w21; i<2; ++i) *rr++ = (- *cs++ );
/* #268: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #269: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #270: @29 = 0x1 */
/* #271: @30 = 0x1 */
/* #272: @31 = 0x4 */
/* #273: @32 = 0x1 */
/* #274: @33 = 0x1 */
/* #275: @34 = zeros(2x1,0nz) */
/* #276: @35 = 00 */
/* #277: @36 = 00 */
/* #278: @37 = 00 */
/* #279: @38 = 00 */
/* #280: @39 = 0x1 */
/* #281: @3 = vertcat(@53, @54) */
rr=w3;
*rr++ = w53;
*rr++ = w54;
/* #282: @47 = 0 */
w47 = 0.;
/* #283: @44 = 0 */
w44 = 0.;
/* #284: @41 = 0 */
w41 = 0.;
/* #285: @76 = 0x1 */
/* #286: @77 = zeros(2x1,0nz) */
/* #287: @78 = zeros(2x2,0nz) */
/* #288: @79 = zeros(2x5,0nz) */
/* #289: @80 = 0x1 */
/* #290: @81 = 0x1 */
/* #291: @82 = 0x4 */
/* #292: @83 = 0x1 */
/* #293: @84 = 0x1 */
/* #294: @20 = zeros(2x1) */
casadi_clear(w20, 2);
/* #295: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #296: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #297: @88 = 0x1 */
/* #298: @89 = 0x1 */
/* #299: @90 = 0x4 */
/* #300: @91 = 0x1 */
/* #301: @92 = 0x1 */
/* #302: {@72, @73, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@93, @52, @51, @50, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @21, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @3, @55, @47, @44, @41, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @20, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w93;
arg1[1]=(&w52);
arg1[2]=(&w51);
arg1[3]=(&w50);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w21;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w3;
arg1[31]=(&w55);
arg1[32]=(&w47);
arg1[33]=(&w44);
arg1[34]=(&w41);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w20;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w72;
res1[1]=(&w73);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #303: {@52, @51} = vertsplit(@72) */
w52 = w72[0];
w51 = w72[1];
/* #304: @53 = (2.*@53) */
w53 = (2.* w53 );
/* #305: @53 = (@4*@53) */
w53 = (w4*w53);
/* #306: @52 = (@52+@53) */
w52 += w53;
/* #307: @54 = (2.*@54) */
w54 = (2.* w54 );
/* #308: @54 = (@4*@54) */
w54 = (w4*w54);
/* #309: @51 = (@51+@54) */
w51 += w54;
/* #310: @55 = (2.*@55) */
w55 = (2.* w55 );
/* #311: @55 = (@4*@55) */
w55 = (w4*w55);
/* #312: @73 = (@73+@55) */
w73 += w55;
/* #313: @55 = input[0][15] */
w55 = arg[0] ? arg[0][15] : 0;
/* #314: @54 = input[0][16] */
w54 = arg[0] ? arg[0][16] : 0;
/* #315: @72 = vertcat(@55, @54) */
rr=w72;
*rr++ = w55;
*rr++ = w54;
/* #316: @55 = input[0][17] */
w55 = arg[0] ? arg[0][17] : 0;
/* #317: @54 = 1 */
w54 = 1.;
/* #318: @53 = 5 */
w53 = 5.;
/* #319: @6 = 0x1 */
/* #320: @7 = zeros(2x1,0nz) */
/* #321: @8 = zeros(2x2,0nz) */
/* #322: @9 = zeros(2x5,0nz) */
/* #323: @10 = 0x1 */
/* #324: @11 = 0x1 */
/* #325: @12 = 0x4 */
/* #326: @13 = 0x1 */
/* #327: @14 = 0x1 */
/* #328: @22 = (-@22) */
for (i=0, rr=w22, cs=w22; i<2; ++i) *rr++ = (- *cs++ );
/* #329: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #330: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #331: @29 = 0x1 */
/* #332: @30 = 0x1 */
/* #333: @31 = 0x4 */
/* #334: @32 = 0x1 */
/* #335: @33 = 0x1 */
/* #336: @34 = zeros(2x1,0nz) */
/* #337: @35 = 00 */
/* #338: @36 = 00 */
/* #339: @37 = 00 */
/* #340: @38 = 00 */
/* #341: @39 = 0x1 */
/* #342: @93 = vertcat(@56, @57) */
rr=w93;
*rr++ = w56;
*rr++ = w57;
/* #343: @50 = 0 */
w50 = 0.;
/* #344: @47 = 0 */
w47 = 0.;
/* #345: @44 = 0 */
w44 = 0.;
/* #346: @76 = 0x1 */
/* #347: @77 = zeros(2x1,0nz) */
/* #348: @78 = zeros(2x2,0nz) */
/* #349: @79 = zeros(2x5,0nz) */
/* #350: @80 = 0x1 */
/* #351: @81 = 0x1 */
/* #352: @82 = 0x4 */
/* #353: @83 = 0x1 */
/* #354: @84 = 0x1 */
/* #355: @21 = zeros(2x1) */
casadi_clear(w21, 2);
/* #356: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #357: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #358: @88 = 0x1 */
/* #359: @89 = 0x1 */
/* #360: @90 = 0x4 */
/* #361: @91 = 0x1 */
/* #362: @92 = 0x1 */
/* #363: {@3, @41, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@72, @55, @54, @53, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @22, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @93, @58, @50, @47, @44, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @21, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w72;
arg1[1]=(&w55);
arg1[2]=(&w54);
arg1[3]=(&w53);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w22;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w93;
arg1[31]=(&w58);
arg1[32]=(&w50);
arg1[33]=(&w47);
arg1[34]=(&w44);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w21;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w3;
res1[1]=(&w41);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #364: {@55, @54} = vertsplit(@3) */
w55 = w3[0];
w54 = w3[1];
/* #365: @56 = (2.*@56) */
w56 = (2.* w56 );
/* #366: @56 = (@4*@56) */
w56 = (w4*w56);
/* #367: @55 = (@55+@56) */
w55 += w56;
/* #368: @57 = (2.*@57) */
w57 = (2.* w57 );
/* #369: @57 = (@4*@57) */
w57 = (w4*w57);
/* #370: @54 = (@54+@57) */
w54 += w57;
/* #371: @58 = (2.*@58) */
w58 = (2.* w58 );
/* #372: @58 = (@4*@58) */
w58 = (w4*w58);
/* #373: @41 = (@41+@58) */
w41 += w58;
/* #374: @58 = input[0][18] */
w58 = arg[0] ? arg[0][18] : 0;
/* #375: @57 = input[0][19] */
w57 = arg[0] ? arg[0][19] : 0;
/* #376: @3 = vertcat(@58, @57) */
rr=w3;
*rr++ = w58;
*rr++ = w57;
/* #377: @58 = input[0][20] */
w58 = arg[0] ? arg[0][20] : 0;
/* #378: @57 = 1 */
w57 = 1.;
/* #379: @56 = 6 */
w56 = 6.;
/* #380: @6 = 0x1 */
/* #381: @7 = zeros(2x1,0nz) */
/* #382: @8 = zeros(2x2,0nz) */
/* #383: @9 = zeros(2x5,0nz) */
/* #384: @10 = 0x1 */
/* #385: @11 = 0x1 */
/* #386: @12 = 0x4 */
/* #387: @13 = 0x1 */
/* #388: @14 = 0x1 */
/* #389: @23 = (-@23) */
for (i=0, rr=w23, cs=w23; i<2; ++i) *rr++ = (- *cs++ );
/* #390: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #391: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #392: @29 = 0x1 */
/* #393: @30 = 0x1 */
/* #394: @31 = 0x4 */
/* #395: @32 = 0x1 */
/* #396: @33 = 0x1 */
/* #397: @34 = zeros(2x1,0nz) */
/* #398: @35 = 00 */
/* #399: @36 = 00 */
/* #400: @37 = 00 */
/* #401: @38 = 00 */
/* #402: @39 = 0x1 */
/* #403: @72 = vertcat(@59, @60) */
rr=w72;
*rr++ = w59;
*rr++ = w60;
/* #404: @53 = 0 */
w53 = 0.;
/* #405: @50 = 0 */
w50 = 0.;
/* #406: @47 = 0 */
w47 = 0.;
/* #407: @76 = 0x1 */
/* #408: @77 = zeros(2x1,0nz) */
/* #409: @78 = zeros(2x2,0nz) */
/* #410: @79 = zeros(2x5,0nz) */
/* #411: @80 = 0x1 */
/* #412: @81 = 0x1 */
/* #413: @82 = 0x4 */
/* #414: @83 = 0x1 */
/* #415: @84 = 0x1 */
/* #416: @22 = zeros(2x1) */
casadi_clear(w22, 2);
/* #417: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #418: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #419: @88 = 0x1 */
/* #420: @89 = 0x1 */
/* #421: @90 = 0x4 */
/* #422: @91 = 0x1 */
/* #423: @92 = 0x1 */
/* #424: {@93, @44, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@3, @58, @57, @56, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @23, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @72, @61, @53, @50, @47, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @22, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w3;
arg1[1]=(&w58);
arg1[2]=(&w57);
arg1[3]=(&w56);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w23;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w72;
arg1[31]=(&w61);
arg1[32]=(&w53);
arg1[33]=(&w50);
arg1[34]=(&w47);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w22;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w93;
res1[1]=(&w44);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #425: {@58, @57} = vertsplit(@93) */
w58 = w93[0];
w57 = w93[1];
/* #426: @59 = (2.*@59) */
w59 = (2.* w59 );
/* #427: @59 = (@4*@59) */
w59 = (w4*w59);
/* #428: @58 = (@58+@59) */
w58 += w59;
/* #429: @60 = (2.*@60) */
w60 = (2.* w60 );
/* #430: @60 = (@4*@60) */
w60 = (w4*w60);
/* #431: @57 = (@57+@60) */
w57 += w60;
/* #432: @61 = (2.*@61) */
w61 = (2.* w61 );
/* #433: @61 = (@4*@61) */
w61 = (w4*w61);
/* #434: @44 = (@44+@61) */
w44 += w61;
/* #435: @61 = input[0][21] */
w61 = arg[0] ? arg[0][21] : 0;
/* #436: @60 = input[0][22] */
w60 = arg[0] ? arg[0][22] : 0;
/* #437: @93 = vertcat(@61, @60) */
rr=w93;
*rr++ = w61;
*rr++ = w60;
/* #438: @61 = input[0][23] */
w61 = arg[0] ? arg[0][23] : 0;
/* #439: @60 = 1 */
w60 = 1.;
/* #440: @59 = 7 */
w59 = 7.;
/* #441: @6 = 0x1 */
/* #442: @7 = zeros(2x1,0nz) */
/* #443: @8 = zeros(2x2,0nz) */
/* #444: @9 = zeros(2x5,0nz) */
/* #445: @10 = 0x1 */
/* #446: @11 = 0x1 */
/* #447: @12 = 0x4 */
/* #448: @13 = 0x1 */
/* #449: @14 = 0x1 */
/* #450: @24 = (-@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) *rr++ = (- *cs++ );
/* #451: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #452: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #453: @29 = 0x1 */
/* #454: @30 = 0x1 */
/* #455: @31 = 0x4 */
/* #456: @32 = 0x1 */
/* #457: @33 = 0x1 */
/* #458: @34 = zeros(2x1,0nz) */
/* #459: @35 = 00 */
/* #460: @36 = 00 */
/* #461: @37 = 00 */
/* #462: @38 = 00 */
/* #463: @39 = 0x1 */
/* #464: @3 = vertcat(@62, @63) */
rr=w3;
*rr++ = w62;
*rr++ = w63;
/* #465: @56 = 0 */
w56 = 0.;
/* #466: @53 = 0 */
w53 = 0.;
/* #467: @50 = 0 */
w50 = 0.;
/* #468: @76 = 0x1 */
/* #469: @77 = zeros(2x1,0nz) */
/* #470: @78 = zeros(2x2,0nz) */
/* #471: @79 = zeros(2x5,0nz) */
/* #472: @80 = 0x1 */
/* #473: @81 = 0x1 */
/* #474: @82 = 0x4 */
/* #475: @83 = 0x1 */
/* #476: @84 = 0x1 */
/* #477: @23 = zeros(2x1) */
casadi_clear(w23, 2);
/* #478: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #479: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #480: @88 = 0x1 */
/* #481: @89 = 0x1 */
/* #482: @90 = 0x4 */
/* #483: @91 = 0x1 */
/* #484: @92 = 0x1 */
/* #485: {@72, @47, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@93, @61, @60, @59, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @24, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @3, @64, @56, @53, @50, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @23, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w93;
arg1[1]=(&w61);
arg1[2]=(&w60);
arg1[3]=(&w59);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w24;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w3;
arg1[31]=(&w64);
arg1[32]=(&w56);
arg1[33]=(&w53);
arg1[34]=(&w50);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w23;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w72;
res1[1]=(&w47);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #486: {@61, @60} = vertsplit(@72) */
w61 = w72[0];
w60 = w72[1];
/* #487: @62 = (2.*@62) */
w62 = (2.* w62 );
/* #488: @62 = (@4*@62) */
w62 = (w4*w62);
/* #489: @61 = (@61+@62) */
w61 += w62;
/* #490: @63 = (2.*@63) */
w63 = (2.* w63 );
/* #491: @63 = (@4*@63) */
w63 = (w4*w63);
/* #492: @60 = (@60+@63) */
w60 += w63;
/* #493: @64 = (2.*@64) */
w64 = (2.* w64 );
/* #494: @64 = (@4*@64) */
w64 = (w4*w64);
/* #495: @47 = (@47+@64) */
w47 += w64;
/* #496: @64 = input[0][24] */
w64 = arg[0] ? arg[0][24] : 0;
/* #497: @63 = input[0][25] */
w63 = arg[0] ? arg[0][25] : 0;
/* #498: @72 = vertcat(@64, @63) */
rr=w72;
*rr++ = w64;
*rr++ = w63;
/* #499: @64 = input[0][26] */
w64 = arg[0] ? arg[0][26] : 0;
/* #500: @63 = 1 */
w63 = 1.;
/* #501: @62 = 8 */
w62 = 8.;
/* #502: @6 = 0x1 */
/* #503: @7 = zeros(2x1,0nz) */
/* #504: @8 = zeros(2x2,0nz) */
/* #505: @9 = zeros(2x5,0nz) */
/* #506: @10 = 0x1 */
/* #507: @11 = 0x1 */
/* #508: @12 = 0x4 */
/* #509: @13 = 0x1 */
/* #510: @14 = 0x1 */
/* #511: @25 = (-@25) */
for (i=0, rr=w25, cs=w25; i<2; ++i) *rr++ = (- *cs++ );
/* #512: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #513: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #514: @29 = 0x1 */
/* #515: @30 = 0x1 */
/* #516: @31 = 0x4 */
/* #517: @32 = 0x1 */
/* #518: @33 = 0x1 */
/* #519: @34 = zeros(2x1,0nz) */
/* #520: @35 = 00 */
/* #521: @36 = 00 */
/* #522: @37 = 00 */
/* #523: @38 = 00 */
/* #524: @39 = 0x1 */
/* #525: @93 = vertcat(@65, @66) */
rr=w93;
*rr++ = w65;
*rr++ = w66;
/* #526: @59 = 0 */
w59 = 0.;
/* #527: @56 = 0 */
w56 = 0.;
/* #528: @53 = 0 */
w53 = 0.;
/* #529: @76 = 0x1 */
/* #530: @77 = zeros(2x1,0nz) */
/* #531: @78 = zeros(2x2,0nz) */
/* #532: @79 = zeros(2x5,0nz) */
/* #533: @80 = 0x1 */
/* #534: @81 = 0x1 */
/* #535: @82 = 0x4 */
/* #536: @83 = 0x1 */
/* #537: @84 = 0x1 */
/* #538: @24 = zeros(2x1) */
casadi_clear(w24, 2);
/* #539: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #540: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #541: @88 = 0x1 */
/* #542: @89 = 0x1 */
/* #543: @90 = 0x4 */
/* #544: @91 = 0x1 */
/* #545: @92 = 0x1 */
/* #546: {@3, @50, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@72, @64, @63, @62, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @25, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @93, @67, @59, @56, @53, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @24, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w72;
arg1[1]=(&w64);
arg1[2]=(&w63);
arg1[3]=(&w62);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w25;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w93;
arg1[31]=(&w67);
arg1[32]=(&w59);
arg1[33]=(&w56);
arg1[34]=(&w53);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w24;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w3;
res1[1]=(&w50);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #547: {@64, @63} = vertsplit(@3) */
w64 = w3[0];
w63 = w3[1];
/* #548: @65 = (2.*@65) */
w65 = (2.* w65 );
/* #549: @65 = (@4*@65) */
w65 = (w4*w65);
/* #550: @64 = (@64+@65) */
w64 += w65;
/* #551: @66 = (2.*@66) */
w66 = (2.* w66 );
/* #552: @66 = (@4*@66) */
w66 = (w4*w66);
/* #553: @63 = (@63+@66) */
w63 += w66;
/* #554: @67 = (2.*@67) */
w67 = (2.* w67 );
/* #555: @67 = (@4*@67) */
w67 = (w4*w67);
/* #556: @50 = (@50+@67) */
w50 += w67;
/* #557: @67 = input[0][27] */
w67 = arg[0] ? arg[0][27] : 0;
/* #558: @66 = input[0][28] */
w66 = arg[0] ? arg[0][28] : 0;
/* #559: @3 = vertcat(@67, @66) */
rr=w3;
*rr++ = w67;
*rr++ = w66;
/* #560: @67 = input[0][29] */
w67 = arg[0] ? arg[0][29] : 0;
/* #561: @66 = 1 */
w66 = 1.;
/* #562: @65 = 9 */
w65 = 9.;
/* #563: @6 = 0x1 */
/* #564: @7 = zeros(2x1,0nz) */
/* #565: @8 = zeros(2x2,0nz) */
/* #566: @9 = zeros(2x5,0nz) */
/* #567: @10 = 0x1 */
/* #568: @11 = 0x1 */
/* #569: @12 = 0x4 */
/* #570: @13 = 0x1 */
/* #571: @14 = 0x1 */
/* #572: @26 = (-@26) */
for (i=0, rr=w26, cs=w26; i<2; ++i) *rr++ = (- *cs++ );
/* #573: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #574: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #575: @29 = 0x1 */
/* #576: @30 = 0x1 */
/* #577: @31 = 0x4 */
/* #578: @32 = 0x1 */
/* #579: @33 = 0x1 */
/* #580: @34 = zeros(2x1,0nz) */
/* #581: @35 = 00 */
/* #582: @36 = 00 */
/* #583: @37 = 00 */
/* #584: @38 = 00 */
/* #585: @39 = 0x1 */
/* #586: @72 = vertcat(@68, @69) */
rr=w72;
*rr++ = w68;
*rr++ = w69;
/* #587: @62 = 0 */
w62 = 0.;
/* #588: @59 = 0 */
w59 = 0.;
/* #589: @56 = 0 */
w56 = 0.;
/* #590: @76 = 0x1 */
/* #591: @77 = zeros(2x1,0nz) */
/* #592: @78 = zeros(2x2,0nz) */
/* #593: @79 = zeros(2x5,0nz) */
/* #594: @80 = 0x1 */
/* #595: @81 = 0x1 */
/* #596: @82 = 0x4 */
/* #597: @83 = 0x1 */
/* #598: @84 = 0x1 */
/* #599: @25 = zeros(2x1) */
casadi_clear(w25, 2);
/* #600: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #601: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #602: @88 = 0x1 */
/* #603: @89 = 0x1 */
/* #604: @90 = 0x4 */
/* #605: @91 = 0x1 */
/* #606: @92 = 0x1 */
/* #607: {@93, @53, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@3, @67, @66, @65, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @26, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @72, @70, @62, @59, @56, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @25, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w3;
arg1[1]=(&w67);
arg1[2]=(&w66);
arg1[3]=(&w65);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w26;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w72;
arg1[31]=(&w70);
arg1[32]=(&w62);
arg1[33]=(&w59);
arg1[34]=(&w56);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w25;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w93;
res1[1]=(&w53);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #608: {@67, @66} = vertsplit(@93) */
w67 = w93[0];
w66 = w93[1];
/* #609: @68 = (2.*@68) */
w68 = (2.* w68 );
/* #610: @68 = (@4*@68) */
w68 = (w4*w68);
/* #611: @67 = (@67+@68) */
w67 += w68;
/* #612: @69 = (2.*@69) */
w69 = (2.* w69 );
/* #613: @69 = (@4*@69) */
w69 = (w4*w69);
/* #614: @66 = (@66+@69) */
w66 += w69;
/* #615: @70 = (2.*@70) */
w70 = (2.* w70 );
/* #616: @70 = (@4*@70) */
w70 = (w4*w70);
/* #617: @53 = (@53+@70) */
w53 += w70;
/* #618: @71 = (2.*@71) */
w71 = (2.* w71 );
/* #619: @4 = (@4*@71) */
w4 *= w71;
/* #620: @6 = 00 */
/* #621: @96 = vertcat(@1, @2, @94, @43, @42, @95, @46, @45, @75, @49, @48, @74, @52, @51, @73, @55, @54, @41, @58, @57, @44, @61, @60, @47, @64, @63, @50, @67, @66, @53, @4, @6) */
rr=w96;
*rr++ = w1;
*rr++ = w2;
*rr++ = w94;
*rr++ = w43;
*rr++ = w42;
*rr++ = w95;
*rr++ = w46;
*rr++ = w45;
*rr++ = w75;
*rr++ = w49;
*rr++ = w48;
*rr++ = w74;
*rr++ = w52;
*rr++ = w51;
*rr++ = w73;
*rr++ = w55;
*rr++ = w54;
*rr++ = w41;
*rr++ = w58;
*rr++ = w57;
*rr++ = w44;
*rr++ = w61;
*rr++ = w60;
*rr++ = w47;
*rr++ = w64;
*rr++ = w63;
*rr++ = w50;
*rr++ = w67;
*rr++ = w66;
*rr++ = w53;
*rr++ = w4;
/* #622: @97 = @96[:31] */
for (rr=w97, ss=w96+0; ss!=w96+31; ss+=1) *rr++ = *ss;
/* #623: (@0[:31] = @97) */
for (rr=w0+0, ss=w97; rr!=w0+31; rr+=1) *rr = *ss++;
/* #624: @97 = @96[:31] */
for (rr=w97, ss=w96+0; ss!=w96+31; ss+=1) *rr++ = *ss;
/* #625: (@0[:31] = @97) */
for (rr=w0+0, ss=w97; rr!=w0+31; rr+=1) *rr = *ss++;
/* #626: @97 = @0' */
casadi_trans(w0,casadi_s12, w97, casadi_s12, iw);
/* #627: output[0][0] = @97 */
casadi_copy(w97, 31, res[0]);
return 0;
}
bool casadi_nlp_f0(ipindex n, ipnumber *x, bool new_x, ipnumber *obj_value, UserDataPtr user_data) {
struct casadi_ipopt_data* d = (struct casadi_ipopt_data*) user_data;
d->arg[0] = x;
d->arg[1] = d->nlp->p;
d->res[0] = obj_value;
if (casadi_f9(d->arg, d->res, d->iw, d->w, 0)) return false;
return true;
}
bool casadi_nlp_g0(ipindex n, ipnumber *x, bool new_x, ipindex m, ipnumber *g, UserDataPtr user_data) {
struct casadi_ipopt_data* d = (struct casadi_ipopt_data*) user_data;
d->arg[0] = x;
d->arg[1] = d->nlp->p;
d->res[0] = g;
if (casadi_f11(d->arg, d->res, d->iw, d->w, 0)) return false;
return true;
}
bool casadi_nlp_grad_f0(ipindex n, ipnumber *x, bool new_x, ipnumber *grad_f, UserDataPtr user_data) {
struct casadi_ipopt_data* d = (struct casadi_ipopt_data*) user_data;
d->arg[0] = x;
d->arg[1] = d->nlp->p;
d->res[0] = 0;
d->res[1] = grad_f;
if (casadi_f10(d->arg, d->res, d->iw, d->w, 0)) return false;
return true;
}
bool casadi_nlp_jac_g0(ipindex n, ipnumber *x, bool new_x, ipindex m, ipindex nele_jac, ipindex *iRow, ipindex *jCol, ipnumber *values, UserDataPtr user_data) {
struct casadi_ipopt_data* d = (struct casadi_ipopt_data*) user_data;
if (values) {
d->arg[0] = x;
d->arg[1] = d->nlp->p;
d->res[0] = 0;
d->res[1] = values;
if (casadi_f12(d->arg, d->res, d->iw, d->w, 0)) return false;
} else {
casadi_ipopt_sparsity(d->prob->sp_a, iRow, jCol);
}
return true;
}
bool casadi_nlp_hess_l0(ipindex n, ipnumber *x, bool new_x, ipnumber obj_factor,ipindex m, ipnumber *lambda, bool new_lambda, ipindex nele_hess, ipindex *iRow, ipindex *jCol, ipnumber *values, UserDataPtr user_data) {
struct casadi_ipopt_data* d = (struct casadi_ipopt_data*) user_data;
if (values) {
d->arg[0] = x;
d->arg[1] = d->nlp->p;
d->arg[2] = &obj_factor;
d->arg[3] = lambda;
d->res[0] = values;
if (casadi_f16(d->arg, d->res, d->iw, d->w, 0)) return false;
return true;
} else {
casadi_ipopt_sparsity(d->prob->sp_h, iRow, jCol);
}
return true;
}
/* solver:(x0[32],p,lbx[32],ubx[32],lbg[42],ubg[42],lam_x0[32],lam_g0[42])->(x[32],f,g[42],lam_x[32],lam_g[42],lam_p) */
static int casadi_f1(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
const casadi_real one=1;
struct casadi_ipopt_data* d=&casadi_f1_mem[mem];
struct casadi_ipopt_prob p;
struct casadi_nlpsol_data d_nlp;
struct casadi_nlpsol_prob p_nlp;
struct casadi_oracle_data d_oracle;
d_nlp.oracle = &d_oracle;
d_nlp.p = arg[1];
d_nlp.lbx = arg[2];
d_nlp.ubx = arg[3];
d_nlp.lbg = arg[4];
d_nlp.ubg = arg[5];
d_nlp.x0 = arg[0];
d_nlp.lam_x0 = arg[6];
d_nlp.lam_g0 = arg[7];
d_nlp.x = res[0];
d_nlp.f = res[1];
d_nlp.g = res[2];
d_nlp.lam_x = res[3];
d_nlp.lam_g = res[4];
d_nlp.lam_p = res[5];
d_nlp.prob = &p_nlp;
p_nlp.nx = 32;
p_nlp.ng = 42;
p_nlp.np = 1;
p_nlp.detect_bounds.ng = 0;
casadi_nlpsol_init(&d_nlp, &arg, &res, &iw, &w);
if (d_nlp.x0) {
casadi_copy(d_nlp.x0, 32, d_nlp.z);
} else {
casadi_clear(d_nlp.z, 32);
}
if (d_nlp.lbx) {
casadi_copy(d_nlp.lbx, 32, d_nlp.lbz);
} else {
casadi_fill(d_nlp.lbz, 32, -casadi_inf);
}
if (d_nlp.ubx) {
casadi_copy(d_nlp.ubx, 32, d_nlp.ubz);
} else {
casadi_fill(d_nlp.ubz, 32, casadi_inf);
}
if (d_nlp.lam_x0) {
casadi_copy(d_nlp.lam_x0, 32, d_nlp.lam);
} else {
casadi_clear(d_nlp.lam, 32);
}
if (d_nlp.lbg) {
casadi_copy(d_nlp.lbg, 42, d_nlp.lbz+32);
} else {
casadi_fill(d_nlp.lbz+32, 42, -casadi_inf);
}
if (d_nlp.ubg) {
casadi_copy(d_nlp.ubg, 42, d_nlp.ubz+32);
} else {
casadi_fill(d_nlp.ubz+32, 42, casadi_inf);
}
if (d_nlp.lam_g0) {
casadi_copy(d_nlp.lam_g0, 42, d_nlp.lam+32);
} else {
casadi_clear(d_nlp.lam+32, 42);
}
d->nlp = &d_nlp;
d->prob = &p;
p.nlp = &p_nlp;
p.sp_a = casadi_s10;
p.sp_h = casadi_s12;
casadi_ipopt_setup(&p);
p.eval_f = casadi_nlp_f0;
p.eval_g = casadi_nlp_g0;
p.eval_grad_f = casadi_nlp_grad_f0;
p.eval_jac_g = casadi_nlp_jac_g0;
p.eval_h = casadi_nlp_hess_l0;
casadi_ipopt_init(d, &arg, &res, &iw, &w);
casadi_ipopt_presolve(d);
AddIpoptStrOption(d->ipopt, "linear_solver","mumps");
casadi_ipopt_solve(d);
d->arg[0] = d_nlp.z;
d->arg[1] = d_nlp.p;
d->arg[2] = &one;
d->arg[3] = d_nlp.lam+32;
d->res[0] = 0;
d->res[1] = 0;
d->res[2] = 0;
d->res[3] = d_nlp.lam_p;
if (casadi_f2(d->arg, d->res, d->iw, d->w, 0)) return 1;
casadi_scal(1, -1.0, d_nlp.lam_p);
casadi_copy(d_nlp.z, 32, d_nlp.x);
casadi_copy(d_nlp.z + 32, 42, d_nlp.g);
casadi_copy(d_nlp.lam, 32, d_nlp.lam_x);
casadi_copy(d_nlp.lam + 32, 42, d_nlp.lam_g);
if (d_nlp.f) casadi_copy(&d_nlp.objective, 1, d_nlp.f);
if (d_nlp.lam_p) casadi_copy(d_nlp.lam_p, 1, d_nlp.lam_p);
return 0;
return 0;
}
int casadi_f1_alloc_mem(void) {
return casadi_f1_mem_counter++;
}
int casadi_f1_init_mem(int mem) {
ipopt_init_mem(&casadi_f1_mem[mem]);
return 0;
}
void casadi_f1_free_mem(int mem) {
ipopt_free_mem(&casadi_f1_mem[mem]);
}
int casadi_f1_checkout(void) {
int mid;
if (casadi_f1_unused_stack_counter>=0) {
return casadi_f1_unused_stack[casadi_f1_unused_stack_counter--];
} else {
if (casadi_f1_mem_counter==CASADI_MAX_NUM_THREADS) return -1;
mid = casadi_f1_alloc_mem();
if (mid<0) return -1;
if(casadi_f1_init_mem(mid)) return -1;
return mid;
}
}
void casadi_f1_release(int mem) {
casadi_f1_unused_stack[++casadi_f1_unused_stack_counter] = mem;
}
/* helper:(i0[32],i1,i2[42])->(o0[1x11]) */
static int casadi_f21(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real w0;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: output[0][0] = @0 */
if (res[0]) res[0][0] = w0;
/* #2: @0 = input[0][3] */
w0 = arg[0] ? arg[0][3] : 0;
/* #3: output[0][1] = @0 */
if (res[0]) res[0][1] = w0;
/* #4: @0 = input[0][6] */
w0 = arg[0] ? arg[0][6] : 0;
/* #5: output[0][2] = @0 */
if (res[0]) res[0][2] = w0;
/* #6: @0 = input[0][9] */
w0 = arg[0] ? arg[0][9] : 0;
/* #7: output[0][3] = @0 */
if (res[0]) res[0][3] = w0;
/* #8: @0 = input[0][12] */
w0 = arg[0] ? arg[0][12] : 0;
/* #9: output[0][4] = @0 */
if (res[0]) res[0][4] = w0;
/* #10: @0 = input[0][15] */
w0 = arg[0] ? arg[0][15] : 0;
/* #11: output[0][5] = @0 */
if (res[0]) res[0][5] = w0;
/* #12: @0 = input[0][18] */
w0 = arg[0] ? arg[0][18] : 0;
/* #13: output[0][6] = @0 */
if (res[0]) res[0][6] = w0;
/* #14: @0 = input[0][21] */
w0 = arg[0] ? arg[0][21] : 0;
/* #15: output[0][7] = @0 */
if (res[0]) res[0][7] = w0;
/* #16: @0 = input[0][24] */
w0 = arg[0] ? arg[0][24] : 0;
/* #17: output[0][8] = @0 */
if (res[0]) res[0][8] = w0;
/* #18: @0 = input[0][27] */
w0 = arg[0] ? arg[0][27] : 0;
/* #19: output[0][9] = @0 */
if (res[0]) res[0][9] = w0;
/* #20: @0 = input[0][30] */
w0 = arg[0] ? arg[0][30] : 0;
/* #21: output[0][10] = @0 */
if (res[0]) res[0][10] = w0;
return 0;
}
/* F:(i0)->(o0[1x11]) */
static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+1, *rr;
const casadi_real **arg1=arg+1, *cs;
int flag, mid;
casadi_real w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, w17, w18, w19, w20, w21, w22, w23, w24, w25, w26, w27, w28, w29, w30, w31, *w32=w+1243, *w33=w+1275, *w34=w+1307, *w35=w+1339, *w36=w+1341, *w37=w+1343, *w38=w+1345, *w39=w+1347, *w40=w+1349, *w41=w+1351, *w42=w+1353, *w43=w+1355, *w44=w+1357, *w45=w+1359, *w46=w+1401, *w47=w+1443, *w48=w+1475, *w49=w+1517, *w50=w+1549, *w51=w+1591;
/* #0: @0 = 0 */
w0 = 0.;
/* #1: @1 = 0.1 */
w1 = 1.0000000000000001e-01;
/* #2: @2 = 1 */
w2 = 1.;
/* #3: @3 = 0.02 */
w3 = 2.0000000000000000e-02;
/* #4: @4 = 0.1 */
w4 = 1.0000000000000001e-01;
/* #5: @5 = 1.11111 */
w5 = 1.1111111111111112e+00;
/* #6: @6 = 0.04 */
w6 = 4.0000000000000001e-02;
/* #7: @7 = 0.1 */
w7 = 1.0000000000000001e-01;
/* #8: @8 = 1.22222 */
w8 = 1.2222222222222223e+00;
/* #9: @9 = 0.06 */
w9 = 5.9999999999999998e-02;
/* #10: @10 = 0.1 */
w10 = 1.0000000000000001e-01;
/* #11: @11 = 1.33333 */
w11 = 1.3333333333333333e+00;
/* #12: @12 = 0.08 */
w12 = 8.0000000000000002e-02;
/* #13: @13 = 0.1 */
w13 = 1.0000000000000001e-01;
/* #14: @14 = 1.44444 */
w14 = 1.4444444444444444e+00;
/* #15: @15 = 0.1 */
w15 = 1.0000000000000001e-01;
/* #16: @16 = 0.1 */
w16 = 1.0000000000000001e-01;
/* #17: @17 = 1.55556 */
w17 = 1.5555555555555556e+00;
/* #18: @18 = 0.12 */
w18 = 1.2000000000000000e-01;
/* #19: @19 = 0.1 */
w19 = 1.0000000000000001e-01;
/* #20: @20 = 1.66667 */
w20 = 1.6666666666666665e+00;
/* #21: @21 = 0.14 */
w21 = 1.4000000000000001e-01;
/* #22: @22 = 0.1 */
w22 = 1.0000000000000001e-01;
/* #23: @23 = 1.77778 */
w23 = 1.7777777777777777e+00;
/* #24: @24 = 0.16 */
w24 = 1.6000000000000000e-01;
/* #25: @25 = 0.1 */
w25 = 1.0000000000000001e-01;
/* #26: @26 = 1.88889 */
w26 = 1.8888888888888888e+00;
/* #27: @27 = 0.18 */
w27 = 1.7999999999999999e-01;
/* #28: @28 = 0.1 */
w28 = 1.0000000000000001e-01;
/* #29: @29 = 2 */
w29 = 2.;
/* #30: @30 = 0.2 */
w30 = 2.0000000000000001e-01;
/* #31: @31 = 0.1 */
w31 = 1.0000000000000001e-01;
/* #32: @32 = vertcat(@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, @20, @21, @22, @23, @24, @25, @26, @27, @28, @29, @30, @31) */
rr=w32;
*rr++ = w0;
*rr++ = w1;
*rr++ = w2;
*rr++ = w3;
*rr++ = w4;
*rr++ = w5;
*rr++ = w6;
*rr++ = w7;
*rr++ = w8;
*rr++ = w9;
*rr++ = w10;
*rr++ = w11;
*rr++ = w12;
*rr++ = w13;
*rr++ = w14;
*rr++ = w15;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
*rr++ = w19;
*rr++ = w20;
*rr++ = w21;
*rr++ = w22;
*rr++ = w23;
*rr++ = w24;
*rr++ = w25;
*rr++ = w26;
*rr++ = w27;
*rr++ = w28;
*rr++ = w29;
*rr++ = w30;
*rr++ = w31;
/* #33: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #34: @33 = -inf(32x1) */
casadi_fill(w33, 32, -casadi_inf);
/* #35: @34 = inf(32x1) */
casadi_fill(w34, 32, casadi_inf);
/* #36: @35 = zeros(2x1) */
casadi_clear(w35, 2);
/* #37: @1 = 0 */
w1 = 0.;
/* #38: @2 = 1 */
w2 = 1.;
/* #39: @3 = -1 */
w3 = -1.;
/* #40: @36 = zeros(2x1) */
casadi_clear(w36, 2);
/* #41: @4 = -0.25 */
w4 = -2.5000000000000000e-01;
/* #42: @5 = -1 */
w5 = -1.;
/* #43: @37 = zeros(2x1) */
casadi_clear(w37, 2);
/* #44: @6 = -0.25 */
w6 = -2.5000000000000000e-01;
/* #45: @7 = -1 */
w7 = -1.;
/* #46: @38 = zeros(2x1) */
casadi_clear(w38, 2);
/* #47: @8 = -0.25 */
w8 = -2.5000000000000000e-01;
/* #48: @9 = -1 */
w9 = -1.;
/* #49: @39 = zeros(2x1) */
casadi_clear(w39, 2);
/* #50: @10 = -0.25 */
w10 = -2.5000000000000000e-01;
/* #51: @11 = -1 */
w11 = -1.;
/* #52: @40 = zeros(2x1) */
casadi_clear(w40, 2);
/* #53: @12 = -0.25 */
w12 = -2.5000000000000000e-01;
/* #54: @13 = -1 */
w13 = -1.;
/* #55: @41 = zeros(2x1) */
casadi_clear(w41, 2);
/* #56: @14 = -0.25 */
w14 = -2.5000000000000000e-01;
/* #57: @15 = -1 */
w15 = -1.;
/* #58: @42 = zeros(2x1) */
casadi_clear(w42, 2);
/* #59: @16 = -0.25 */
w16 = -2.5000000000000000e-01;
/* #60: @17 = -1 */
w17 = -1.;
/* #61: @43 = zeros(2x1) */
casadi_clear(w43, 2);
/* #62: @18 = -0.25 */
w18 = -2.5000000000000000e-01;
/* #63: @19 = -1 */
w19 = -1.;
/* #64: @44 = zeros(2x1) */
casadi_clear(w44, 2);
/* #65: @20 = -0.25 */
w20 = -2.5000000000000000e-01;
/* #66: @21 = -1 */
w21 = -1.;
/* #67: @22 = -0.25 */
w22 = -2.5000000000000000e-01;
/* #68: @45 = vertcat(@35, @1, @2, @3, @36, @4, @5, @37, @6, @7, @38, @8, @9, @39, @10, @11, @40, @12, @13, @41, @14, @15, @42, @16, @17, @43, @18, @19, @44, @20, @21, @22) */
rr=w45;
for (i=0, cs=w35; i<2; ++i) *rr++ = *cs++;
*rr++ = w1;
*rr++ = w2;
*rr++ = w3;
for (i=0, cs=w36; i<2; ++i) *rr++ = *cs++;
*rr++ = w4;
*rr++ = w5;
for (i=0, cs=w37; i<2; ++i) *rr++ = *cs++;
*rr++ = w6;
*rr++ = w7;
for (i=0, cs=w38; i<2; ++i) *rr++ = *cs++;
*rr++ = w8;
*rr++ = w9;
for (i=0, cs=w39; i<2; ++i) *rr++ = *cs++;
*rr++ = w10;
*rr++ = w11;
for (i=0, cs=w40; i<2; ++i) *rr++ = *cs++;
*rr++ = w12;
*rr++ = w13;
for (i=0, cs=w41; i<2; ++i) *rr++ = *cs++;
*rr++ = w14;
*rr++ = w15;
for (i=0, cs=w42; i<2; ++i) *rr++ = *cs++;
*rr++ = w16;
*rr++ = w17;
for (i=0, cs=w43; i<2; ++i) *rr++ = *cs++;
*rr++ = w18;
*rr++ = w19;
for (i=0, cs=w44; i<2; ++i) *rr++ = *cs++;
*rr++ = w20;
*rr++ = w21;
*rr++ = w22;
/* #69: @3 = 1 */
w3 = 1.;
/* #70: @4 = inf */
w4 = casadi_inf;
/* #71: @5 = 1 */
w5 = 1.;
/* #72: @6 = inf */
w6 = casadi_inf;
/* #73: @7 = 1 */
w7 = 1.;
/* #74: @8 = inf */
w8 = casadi_inf;
/* #75: @9 = 1 */
w9 = 1.;
/* #76: @10 = inf */
w10 = casadi_inf;
/* #77: @11 = 1 */
w11 = 1.;
/* #78: @12 = inf */
w12 = casadi_inf;
/* #79: @13 = 1 */
w13 = 1.;
/* #80: @14 = inf */
w14 = casadi_inf;
/* #81: @15 = 1 */
w15 = 1.;
/* #82: @16 = inf */
w16 = casadi_inf;
/* #83: @17 = 1 */
w17 = 1.;
/* #84: @18 = inf */
w18 = casadi_inf;
/* #85: @19 = 1 */
w19 = 1.;
/* #86: @20 = inf */
w20 = casadi_inf;
/* #87: @21 = 1 */
w21 = 1.;
/* #88: @22 = inf */
w22 = casadi_inf;
/* #89: @46 = vertcat(@35, @1, @2, @3, @36, @4, @5, @37, @6, @7, @38, @8, @9, @39, @10, @11, @40, @12, @13, @41, @14, @15, @42, @16, @17, @43, @18, @19, @44, @20, @21, @22) */
rr=w46;
for (i=0, cs=w35; i<2; ++i) *rr++ = *cs++;
*rr++ = w1;
*rr++ = w2;
*rr++ = w3;
for (i=0, cs=w36; i<2; ++i) *rr++ = *cs++;
*rr++ = w4;
*rr++ = w5;
for (i=0, cs=w37; i<2; ++i) *rr++ = *cs++;
*rr++ = w6;
*rr++ = w7;
for (i=0, cs=w38; i<2; ++i) *rr++ = *cs++;
*rr++ = w8;
*rr++ = w9;
for (i=0, cs=w39; i<2; ++i) *rr++ = *cs++;
*rr++ = w10;
*rr++ = w11;
for (i=0, cs=w40; i<2; ++i) *rr++ = *cs++;
*rr++ = w12;
*rr++ = w13;
for (i=0, cs=w41; i<2; ++i) *rr++ = *cs++;
*rr++ = w14;
*rr++ = w15;
for (i=0, cs=w42; i<2; ++i) *rr++ = *cs++;
*rr++ = w16;
*rr++ = w17;
for (i=0, cs=w43; i<2; ++i) *rr++ = *cs++;
*rr++ = w18;
*rr++ = w19;
for (i=0, cs=w44; i<2; ++i) *rr++ = *cs++;
*rr++ = w20;
*rr++ = w21;
*rr++ = w22;
/* #90: @47 = zeros(32x1) */
casadi_clear(w47, 32);
/* #91: @48 = zeros(42x1) */
casadi_clear(w48, 42);
/* #92: {@49, NULL, NULL, NULL, @50, NULL} = solver(@32, @0, @33, @34, @45, @46, @47, @48) */
arg1[0]=w32;
arg1[1]=(&w0);
arg1[2]=w33;
arg1[3]=w34;
arg1[4]=w45;
arg1[5]=w46;
arg1[6]=w47;
arg1[7]=w48;
res1[0]=w49;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=w50;
res1[5]=0;
mid = casadi_f1_checkout();
if (mid<0) return 1;
flag = casadi_f1(arg1, res1, iw, w, mid);
casadi_f1_release(mid);
if (flag) return 1;
/* #93: @51 = helper(@49, @0, @50) */
arg1[0]=w49;
arg1[1]=(&w0);
arg1[2]=w50;
res1[0]=w51;
if (casadi_f21(arg1, res1, iw, w, 0)) return 1;
/* #94: output[0][0] = @51 */
casadi_copy(w51, 11, res[0]);
return 0;
}
CASADI_SYMBOL_EXPORT int F(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem){
return casadi_f0(arg, res, iw, w, mem);
}
CASADI_SYMBOL_EXPORT int F_alloc_mem(void) {
return 0;
}
CASADI_SYMBOL_EXPORT int F_init_mem(int mem) {
return 0;
}
CASADI_SYMBOL_EXPORT void F_free_mem(int mem) {
}
CASADI_SYMBOL_EXPORT int F_checkout(void) {
return 0;
}
CASADI_SYMBOL_EXPORT void F_release(int mem) {
}
CASADI_SYMBOL_EXPORT void F_incref(void) {
}
CASADI_SYMBOL_EXPORT void F_decref(void) {
}
CASADI_SYMBOL_EXPORT casadi_int F_n_in(void) { return 1;}
CASADI_SYMBOL_EXPORT casadi_int F_n_out(void) { return 1;}
CASADI_SYMBOL_EXPORT casadi_real F_default_in(casadi_int i) {
switch (i) {
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const char* F_name_in(casadi_int i) {
switch (i) {
case 0: return "i0";
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const char* F_name_out(casadi_int i) {
switch (i) {
case 0: return "o0";
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const casadi_int* F_sparsity_in(casadi_int i) {
switch (i) {
case 0: return casadi_s13;
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const casadi_int* F_sparsity_out(casadi_int i) {
switch (i) {
case 0: return casadi_s14;
default: return 0;
}
}
CASADI_SYMBOL_EXPORT int F_work(casadi_int *sz_arg, casadi_int* sz_res, casadi_int *sz_iw, casadi_int *sz_w) {
if (sz_arg) *sz_arg = 141;
if (sz_res) *sz_res = 43;
if (sz_iw) *sz_iw = 33;
if (sz_w) *sz_w = 1602;
return 0;
}
CASADI_SYMBOL_EXPORT int F_work_bytes(casadi_int *sz_arg, casadi_int* sz_res, casadi_int *sz_iw, casadi_int *sz_w) {
if (sz_arg) *sz_arg = 141*sizeof(const casadi_real*);
if (sz_res) *sz_res = 43*sizeof(casadi_real*);
if (sz_iw) *sz_iw = 33*sizeof(casadi_int);
if (sz_w) *sz_w = 1602*sizeof(casadi_real);
return 0;
}
casadi_int main_F(casadi_int argc, char* argv[]) {
casadi_int j;
casadi_real* a;
const casadi_real* r;
casadi_int flag;
casadi_int iw[33];
casadi_real w[1614];
const casadi_real* arg[141];
casadi_real* res[43];
arg[0] = w+0;
res[0] = w+1;
a = w;
for (j=0; j<1; ++j) if (scanf("%lg", a++)<=0) return 2;
flag = F(arg, res, iw, w+12, 0);
if (flag) return flag;
r = w+1;
for (j=0; j<11; ++j) CASADI_PRINTF("%g ", *r++);
CASADI_PRINTF("\n");
return 0;
}
CASADI_SYMBOL_EXPORT int main(int argc, char* argv[]) {
if (argc<2) {
/* name error */
} else if (strcmp(argv[1], "F")==0) {
return main_F(argc-2, argv+2);
}
fprintf(stderr, "First input should be a command string. Possible values: 'F'\nNote: you may use function.generate_input to create a command string.\n");
return 1;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
/* This file was automatically generated by CasADi 3.6.5+.
* It consists of:
* 1) content generated by CasADi runtime: not copyrighted
* 2) template code copied from CasADi source: permissively licensed (MIT-0)
* 3) user code: owned by the user
*
*/
#ifdef __cplusplus
extern "C" {
#endif
/* How to prefix internal symbols */
#ifdef CASADI_CODEGEN_PREFIX
#define CASADI_NAMESPACE_CONCAT(NS, ID) _CASADI_NAMESPACE_CONCAT(NS, ID)
#define _CASADI_NAMESPACE_CONCAT(NS, ID) NS ## ID
#define CASADI_PREFIX(ID) CASADI_NAMESPACE_CONCAT(CODEGEN_PREFIX, ID)
#else
#define CASADI_PREFIX(ID) F_ ## ID
#endif
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <ocp/OCPCInterface.h>
#ifndef casadi_real
#define casadi_real double
#endif
#ifndef casadi_int
#define casadi_int long long int
#endif
#ifndef CASADI_MAX_NUM_THREADS
#define CASADI_MAX_NUM_THREADS 1
#endif
/* Add prefix to internal symbols */
#define casadi_call CASADI_PREFIX(call)
#define casadi_clear CASADI_PREFIX(clear)
#define casadi_copy CASADI_PREFIX(copy)
#define casadi_densify CASADI_PREFIX(densify)
#define casadi_dot CASADI_PREFIX(dot)
#define casadi_f0 CASADI_PREFIX(f0)
#define casadi_f1 CASADI_PREFIX(f1)
#define casadi_f10 CASADI_PREFIX(f10)
#define casadi_f11 CASADI_PREFIX(f11)
#define casadi_f12 CASADI_PREFIX(f12)
#define casadi_f13 CASADI_PREFIX(f13)
#define casadi_f14 CASADI_PREFIX(f14)
#define casadi_f15 CASADI_PREFIX(f15)
#define casadi_f16 CASADI_PREFIX(f16)
#define casadi_f17 CASADI_PREFIX(f17)
#define casadi_f18 CASADI_PREFIX(f18)
#define casadi_f19 CASADI_PREFIX(f19)
#define casadi_f1_alloc_mem CASADI_PREFIX(f1_alloc_mem)
#define casadi_f1_init_mem CASADI_PREFIX(f1_init_mem)
#define casadi_f1_mem CASADI_PREFIX(f1_mem)
#define casadi_f1_mem_counter CASADI_PREFIX(f1_mem_counter)
#define casadi_f1_unused_stack CASADI_PREFIX(f1_unused_stack)
#define casadi_f1_unused_stack_counter CASADI_PREFIX(f1_unused_stack_counter)
#define casadi_f2 CASADI_PREFIX(f2)
#define casadi_f20 CASADI_PREFIX(f20)
#define casadi_f21 CASADI_PREFIX(f21)
#define casadi_f3 CASADI_PREFIX(f3)
#define casadi_f4 CASADI_PREFIX(f4)
#define casadi_f5 CASADI_PREFIX(f5)
#define casadi_f6 CASADI_PREFIX(f6)
#define casadi_f7 CASADI_PREFIX(f7)
#define casadi_f8 CASADI_PREFIX(f8)
#define casadi_f9 CASADI_PREFIX(f9)
#define casadi_fabs CASADI_PREFIX(fabs)
#define casadi_fatrop_data CASADI_PREFIX(fatrop_data)
#define casadi_fatrop_dense_transfer CASADI_PREFIX(fatrop_dense_transfer)
#define casadi_fatrop_eval_BAbt CASADI_PREFIX(fatrop_eval_BAbt)
#define casadi_fatrop_free_mem CASADI_PREFIX(fatrop_free_mem)
#define casadi_fatrop_full_eval_constr_jac CASADI_PREFIX(fatrop_full_eval_constr_jac)
#define casadi_fatrop_get_bounds CASADI_PREFIX(fatrop_get_bounds)
#define casadi_fatrop_get_horizon_length CASADI_PREFIX(fatrop_get_horizon_length)
#define casadi_fatrop_get_initial_uk CASADI_PREFIX(fatrop_get_initial_uk)
#define casadi_fatrop_get_initial_xk CASADI_PREFIX(fatrop_get_initial_xk)
#define casadi_fatrop_get_ng CASADI_PREFIX(fatrop_get_ng)
#define casadi_fatrop_get_ng_ineq CASADI_PREFIX(fatrop_get_ng_ineq)
#define casadi_fatrop_get_nu CASADI_PREFIX(fatrop_get_nu)
#define casadi_fatrop_get_nx CASADI_PREFIX(fatrop_get_nx)
#define casadi_fatrop_init CASADI_PREFIX(fatrop_init)
#define casadi_fatrop_init_mem CASADI_PREFIX(fatrop_init_mem)
#define casadi_fatrop_mproject CASADI_PREFIX(fatrop_mproject)
#define casadi_fatrop_presolve CASADI_PREFIX(fatrop_presolve)
#define casadi_fatrop_read_primal_data CASADI_PREFIX(fatrop_read_primal_data)
#define casadi_fatrop_setup CASADI_PREFIX(fatrop_setup)
#define casadi_fatrop_solve CASADI_PREFIX(fatrop_solve)
#define casadi_fatrop_work CASADI_PREFIX(fatrop_work)
#define casadi_fill CASADI_PREFIX(fill)
#define casadi_nlpsol_data CASADI_PREFIX(nlpsol_data)
#define casadi_nlpsol_detect_bounds_after CASADI_PREFIX(nlpsol_detect_bounds_after)
#define casadi_nlpsol_detect_bounds_before CASADI_PREFIX(nlpsol_detect_bounds_before)
#define casadi_nlpsol_detect_bounds_data CASADI_PREFIX(nlpsol_detect_bounds_data)
#define casadi_nlpsol_detect_bounds_prob CASADI_PREFIX(nlpsol_detect_bounds_prob)
#define casadi_nlpsol_init CASADI_PREFIX(nlpsol_init)
#define casadi_nlpsol_prob CASADI_PREFIX(nlpsol_prob)
#define casadi_nlpsol_work CASADI_PREFIX(nlpsol_work)
#define casadi_ocp_block CASADI_PREFIX(ocp_block)
#define casadi_oracle_callback CASADI_PREFIX(oracle_callback)
#define casadi_oracle_data CASADI_PREFIX(oracle_data)
#define casadi_oracle_init CASADI_PREFIX(oracle_init)
#define casadi_project CASADI_PREFIX(project)
#define casadi_ptr_ocp_block CASADI_PREFIX(ptr_ocp_block)
#define casadi_s0 CASADI_PREFIX(s0)
#define casadi_s1 CASADI_PREFIX(s1)
#define casadi_s10 CASADI_PREFIX(s10)
#define casadi_s11 CASADI_PREFIX(s11)
#define casadi_s12 CASADI_PREFIX(s12)
#define casadi_s13 CASADI_PREFIX(s13)
#define casadi_s14 CASADI_PREFIX(s14)
#define casadi_s15 CASADI_PREFIX(s15)
#define casadi_s16 CASADI_PREFIX(s16)
#define casadi_s17 CASADI_PREFIX(s17)
#define casadi_s18 CASADI_PREFIX(s18)
#define casadi_s19 CASADI_PREFIX(s19)
#define casadi_s2 CASADI_PREFIX(s2)
#define casadi_s20 CASADI_PREFIX(s20)
#define casadi_s21 CASADI_PREFIX(s21)
#define casadi_s22 CASADI_PREFIX(s22)
#define casadi_s23 CASADI_PREFIX(s23)
#define casadi_s24 CASADI_PREFIX(s24)
#define casadi_s25 CASADI_PREFIX(s25)
#define casadi_s3 CASADI_PREFIX(s3)
#define casadi_s4 CASADI_PREFIX(s4)
#define casadi_s5 CASADI_PREFIX(s5)
#define casadi_s6 CASADI_PREFIX(s6)
#define casadi_s7 CASADI_PREFIX(s7)
#define casadi_s8 CASADI_PREFIX(s8)
#define casadi_s9 CASADI_PREFIX(s9)
#define casadi_scal CASADI_PREFIX(scal)
#define casadi_sp_nnz CASADI_PREFIX(sp_nnz)
#define casadi_sparsify CASADI_PREFIX(sparsify)
#define casadi_sq CASADI_PREFIX(sq)
#define casadi_trans CASADI_PREFIX(trans)
#define casadi_unpack_ocp_blocks CASADI_PREFIX(unpack_ocp_blocks)
/* Symbol visibility in DLLs */
#ifndef CASADI_SYMBOL_EXPORT
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#if defined(STATIC_LINKED)
#define CASADI_SYMBOL_EXPORT
#else
#define CASADI_SYMBOL_EXPORT __declspec(dllexport)
#endif
#elif defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#define CASADI_SYMBOL_EXPORT __attribute__ ((visibility ("default")))
#else
#define CASADI_SYMBOL_EXPORT
#endif
#endif
void casadi_fill(casadi_real* x, casadi_int n, casadi_real alpha) {
casadi_int i;
if (x) {
for (i=0; i<n; ++i) *x++ = alpha;
}
}
casadi_real casadi_fabs(casadi_real x) {
/* Pre-c99 compatibility */
#if __STDC_VERSION__ < 199901L
return x>0 ? x : -x;
#else
return fabs(x);
#endif
}
void casadi_copy(const casadi_real* x, casadi_int n, casadi_real* y) {
casadi_int i;
if (y) {
if (x) {
for (i=0; i<n; ++i) *y++ = *x++;
} else {
for (i=0; i<n; ++i) *y++ = 0.;
}
}
}
casadi_real casadi_sq(casadi_real x) { return x*x;}
casadi_real casadi_dot(casadi_int n, const casadi_real* x, const casadi_real* y) {
casadi_int i;
casadi_real r = 0;
for (i=0; i<n; ++i) r += *x++ * *y++;
return r;
}
void casadi_clear(casadi_real* x, casadi_int n) {
casadi_int i;
if (x) {
for (i=0; i<n; ++i) *x++ = 0;
}
}
struct casadi_oracle_data {
const casadi_real** arg;
casadi_real** res;
casadi_int* iw;
casadi_real* w;
void* m;
};
void casadi_oracle_init(struct casadi_oracle_data* d, const casadi_real*** arg, casadi_real*** res,
casadi_int** iw, casadi_real** w) {
d->arg = *arg;
d->res = *res;
d->iw = *iw;
d->w = *w;
}
struct casadi_nlpsol_detect_bounds_prob {
casadi_int sz_arg;
casadi_int sz_res;
casadi_int sz_iw;
casadi_int sz_w;
casadi_int ng;
casadi_int nb;
const casadi_int *target_x;
const casadi_int *target_g;
const char *is_simple;
int (*callback)(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, void* callback_data);
void* callback_data;
};
struct casadi_nlpsol_prob {
casadi_int nx, ng, np;
struct casadi_nlpsol_detect_bounds_prob detect_bounds;
};
struct casadi_nlpsol_detect_bounds_data {
const casadi_real** arg;
casadi_real** res;
casadi_int* iw;
casadi_real* w;
casadi_real* a;
casadi_real* b;
casadi_int* target_l;
casadi_int* target_u;
casadi_real* lam_xl;
casadi_real* lam_xu;
};
struct casadi_nlpsol_data {
const struct casadi_nlpsol_prob* prob;
struct casadi_oracle_data* oracle;
casadi_real *lbz, *ubz;
casadi_real *z;
casadi_real *lam;
casadi_real objective;
const casadi_real *p, *lbx, *ubx, *lbg, *ubg, *x0, *lam_x0, *lam_g0;
casadi_real *f, *x, *g, *lam_x, *lam_g, *lam_p;
struct casadi_nlpsol_detect_bounds_data detect_bounds;
};
void casadi_nlpsol_work(const struct casadi_nlpsol_prob* p, casadi_int* sz_arg, casadi_int* sz_res,
casadi_int* sz_iw, casadi_int* sz_w) {
*sz_arg = *sz_res = 0;
*sz_w = *sz_iw = 0;
*sz_w += p->nx + p->ng;
*sz_w += p->nx + p->ng;
*sz_w += p->nx + p->ng;
*sz_w += p->nx + p->ng;
if (p->detect_bounds.ng) {
*sz_arg += p->detect_bounds.sz_arg;
*sz_res += p->detect_bounds.sz_res;
*sz_iw += p->detect_bounds.sz_iw;
*sz_w += p->detect_bounds.sz_w;
*sz_w += p->detect_bounds.nb;
*sz_w += p->detect_bounds.nb;
*sz_iw += p->nx;
*sz_iw += p->nx;
*sz_w += p->nx;
*sz_w += p->nx;
}
}
void casadi_nlpsol_init(struct casadi_nlpsol_data* d, const casadi_real*** arg, casadi_real*** res,
casadi_int** iw, casadi_real** w) {
casadi_int nx, ng;
const struct casadi_nlpsol_prob* p = d->prob;
nx = p->nx;
ng = p->ng;
d->z = *w; *w += nx + ng;
d->lbz = *w; *w += nx + ng;
d->ubz = *w; *w += nx + ng;
d->lam = *w; *w += nx + ng;
if (p->detect_bounds.ng) {
d->detect_bounds.arg = *arg; *arg += p->detect_bounds.sz_arg;
d->detect_bounds.res = *res; *res += p->detect_bounds.sz_res;
d->detect_bounds.iw = *iw; *iw += p->detect_bounds.sz_iw;
d->detect_bounds.w = *w; *w += p->detect_bounds.sz_w;
d->detect_bounds.a = *w; *w += p->detect_bounds.nb;
d->detect_bounds.b = *w; *w += p->detect_bounds.nb;
d->detect_bounds.target_l = *iw; *iw += p->nx;
d->detect_bounds.target_u = *iw; *iw += p->nx;
d->detect_bounds.lam_xl = *w; *w += nx;
d->detect_bounds.lam_xu = *w; *w += nx;
}
}
int casadi_detect_bounds_before(struct casadi_nlpsol_data* d_nlp) {
const struct casadi_nlpsol_prob* p_nlp = d_nlp->prob;
struct casadi_nlpsol_detect_bounds_data* d_bounds = &d_nlp->detect_bounds;
const struct casadi_nlpsol_detect_bounds_prob* p_bounds = &p_nlp->detect_bounds;
casadi_int nx = p_nlp->nx;
d_bounds->arg[0] = d_nlp->p;
d_bounds->res[0] = d_bounds->a;
d_bounds->res[1] = d_bounds->b;
p_bounds->callback(d_bounds->arg, d_bounds->res,
d_bounds->iw, d_bounds->w, p_bounds->callback_data);
for (casadi_int i=0;i<p_bounds->nb;++i) {
if (d_bounds->a[i]==0) {
casadi_int k = p_bounds->target_g[i];
if (d_nlp->lbg[k]>d_bounds->b[i]) return 1;
if (d_nlp->ubg[k]<d_bounds->b[i]) return 1;
}
}
casadi_real* lbz = d_nlp->lbz+nx;
casadi_real* ubz = d_nlp->ubz+nx;
casadi_real* lam = d_nlp->lam+nx;
for (casadi_int i=0;i<nx;++i) {
d_bounds->lam_xl[i] = d_nlp->lam_x0 ? (d_nlp->lam_x0[i]<0)*d_nlp->lam_x0[i] : 0.;
d_bounds->lam_xu[i] = d_nlp->lam_x0 ? (d_nlp->lam_x0[i]>0)*d_nlp->lam_x0[i] : 0.;
}
for (casadi_int i=0;i<nx;++i) {
d_bounds->target_l[i] = i;
d_bounds->target_u[i] = i;
}
casadi_int k=0;
for (casadi_int i=0;i<p_bounds->ng;++i) {
if (p_bounds->is_simple[i]) {
casadi_real lb = (d_nlp->lbg[i]-d_bounds->b[k])/casadi_fabs(d_bounds->a[k]);
casadi_real ub = (d_nlp->ubg[i]-d_bounds->b[k])/casadi_fabs(d_bounds->a[k]);
casadi_int j = p_bounds->target_x[k];
if (lb==d_nlp->lbz[j]) {
if (d_nlp->lam_g0) d_bounds->lam_xl[j] += (d_nlp->lam_g0[i]<0)*d_nlp->lam_g0[i];
} else if (lb>d_nlp->lbz[j]) {
d_nlp->lbz[j] = lb;
d_bounds->target_l[j] = nx+i;
if (d_nlp->lam_g0) d_bounds->lam_xl[j] = (d_nlp->lam_g0[i]<0)*d_nlp->lam_g0[i];
}
if (ub==d_nlp->ubz[j]) {
if (d_nlp->lam_g0) d_bounds->lam_xu[j] += (d_nlp->lam_g0[i]>0)*d_nlp->lam_g0[i];
} else if (ub<d_nlp->ubz[j]) {
d_nlp->ubz[j] = ub;
d_bounds->target_u[j] = nx+i;
if (d_nlp->lam_g0) d_bounds->lam_xu[j] = (d_nlp->lam_g0[i]>0)*d_nlp->lam_g0[i];
}
k++;
} else {
*lbz++ = d_nlp->lbg[i];
*ubz++ = d_nlp->ubg[i];
if (d_nlp->lam_g0) *lam++ = d_nlp->lam_g0[i];
}
}
for (casadi_int i=0;i<nx;++i) {
d_nlp->lam[i] = d_bounds->lam_xl[i]+d_bounds->lam_xu[i];
}
return 0;
}
int casadi_detect_bounds_after(struct casadi_nlpsol_data* d_nlp) {
const struct casadi_nlpsol_prob* p_nlp = d_nlp->prob;
struct casadi_nlpsol_detect_bounds_data* d_bounds = &d_nlp->detect_bounds;
const struct casadi_nlpsol_detect_bounds_prob* p_bounds = &p_nlp->detect_bounds;
casadi_int nx = p_nlp->nx;
casadi_fill(d_nlp->lam_x, nx, 0.);
casadi_fill(d_nlp->lam_g, p_bounds->ng, 0.);
casadi_int k = 0;
casadi_int k_normal = 0;
for (casadi_int i=0;i<p_bounds->ng;++i) {
if (p_bounds->is_simple[i]) {
casadi_int j = p_bounds->target_x[k];
if (d_nlp->g) d_nlp->g[i] = d_bounds->a[k]*d_nlp->z[j]+d_bounds->b[k];
k++;
} else {
if (d_nlp->g) d_nlp->g[i] = d_nlp->z[nx+k_normal];
if (d_nlp->lam_g) d_nlp->lam_g[i] = d_nlp->lam[nx+k_normal];
k_normal++;
}
}
for (casadi_int i=0;i<nx;++i) {
if (d_bounds->target_l[i]<nx) {
if (d_nlp->lam_x) d_nlp->lam_x[i] += (d_nlp->lam[i]<0)*d_nlp->lam[i];
} else {
if (d_nlp->lam_g)
d_nlp->lam_g[d_bounds->target_l[i]-nx] += (d_nlp->lam[i]<0)*d_nlp->lam[i];
}
if (d_bounds->target_u[i]<nx) {
if (d_nlp->lam_x) d_nlp->lam_x[i] += (d_nlp->lam[i]>0)*d_nlp->lam[i];
} else {
if (d_nlp->lam_g)
d_nlp->lam_g[d_bounds->target_u[i]-nx] += (d_nlp->lam[i]>0)*d_nlp->lam[i];
}
}
return 0;
}
casadi_int casadi_max(casadi_int x, casadi_int y) {
return x>y ? x : y;
}
void casadi_project(const casadi_real* x, const casadi_int* sp_x, casadi_real* y, const casadi_int* sp_y, casadi_real* w) {
casadi_int ncol_x, ncol_y, i, el;
const casadi_int *colind_x, *row_x, *colind_y, *row_y;
ncol_x = sp_x[1];
colind_x = sp_x+2; row_x = sp_x + 2 + ncol_x+1;
ncol_y = sp_y[1];
colind_y = sp_y+2; row_y = sp_y + 2 + ncol_y+1;
for (i=0; i<ncol_x; ++i) {
for (el=colind_y[i]; el<colind_y[i+1]; ++el) w[row_y[el]] = 0;
for (el=colind_x[i]; el<colind_x[i+1]; ++el) w[row_x[el]] = x[el];
for (el=colind_y[i]; el<colind_y[i+1]; ++el) y[el] = w[row_y[el]];
}
}
void casadi_scal(casadi_int n, casadi_real alpha, casadi_real* x) {
casadi_int i;
if (!x) return;
for (i=0; i<n; ++i) *x++ *= alpha;
}
casadi_int casadi_sp_nnz(const casadi_int* sp) {
return sp[2+sp[1]];
}
struct casadi_oracle_callback {
int (*eval)(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem);
int (*checkout)(void);
void (*release)(int);
};
int casadi_oracle_call(const struct casadi_oracle_callback* cb, struct casadi_oracle_data* d) {
int flag;
int mem = 0;
if (cb->checkout) mem = cb->checkout();
flag = cb->eval(d->arg, d->res, d->iw, d->w, mem);
if (cb->release) cb->release(mem);
return flag;
}
struct casadi_ocp_block {
casadi_int offset_r;
casadi_int offset_c;
casadi_int rows;
casadi_int cols;
};
void casadi_unpack_ocp_blocks(casadi_int N, struct casadi_ocp_block* blocks, const casadi_int* packed) {
casadi_int i;
for (i=0;i<N;++i) {
blocks[i].offset_r = *packed++;
blocks[i].offset_c = *packed++;
blocks[i].rows = *packed++;
blocks[i].cols = *packed++;
}
}
void casadi_ptr_ocp_block(casadi_int N, casadi_real** vs, casadi_real* v, const struct casadi_ocp_block* blocks, int eye) {
casadi_int k, offset = 0;
for(k=0;k<N;++k) {
vs[k] = v+offset;
if (eye) {
offset += blocks[k].rows;
} else {
offset += blocks[k].rows*blocks[k].cols;
}
}
}
#define CASADI_CAST(x,y) ((x) y)
void casadi_densify(const casadi_real* x, const casadi_int* sp_x, casadi_real* y, casadi_int tr) {
casadi_int nrow_x, ncol_x, i, el;
const casadi_int *colind_x, *row_x;
if (!y) return;
nrow_x = sp_x[0]; ncol_x = sp_x[1];
colind_x = sp_x+2; row_x = sp_x+ncol_x+3;
casadi_clear(y, nrow_x*ncol_x);
if (!x) return;
if (tr) {
for (i=0; i<ncol_x; ++i) {
for (el=colind_x[i]; el!=colind_x[i+1]; ++el) {
y[i + row_x[el]*ncol_x] = CASADI_CAST(casadi_real, *x++);
}
}
} else {
for (i=0; i<ncol_x; ++i) {
for (el=colind_x[i]; el!=colind_x[i+1]; ++el) {
y[row_x[el]] = CASADI_CAST(casadi_real, *x++);
}
y += nrow_x;
}
}
}
void casadi_sparsify(const casadi_real* x, casadi_real* y, const casadi_int* sp_y, casadi_int tr) {
casadi_int nrow_y, ncol_y, i, el;
const casadi_int *colind_y, *row_y;
nrow_y = sp_y[0];
ncol_y = sp_y[1];
colind_y = sp_y+2; row_y = sp_y+ncol_y+3;
if (tr) {
for (i=0; i<ncol_y; ++i) {
for (el=colind_y[i]; el!=colind_y[i+1]; ++el) {
*y++ = CASADI_CAST(casadi_real, x[i + row_y[el]*ncol_y]);
}
}
} else {
for (i=0; i<ncol_y; ++i) {
for (el=colind_y[i]; el!=colind_y[i+1]; ++el) {
*y++ = CASADI_CAST(casadi_real, x[row_y[el]]);
}
x += nrow_y;
}
}
}
#ifndef casadi_inf
#define casadi_inf INFINITY
#endif
void casadi_trans(const casadi_real* x, const casadi_int* sp_x, casadi_real* y,
const casadi_int* sp_y, casadi_int* tmp) {
casadi_int ncol_x, nnz_x, ncol_y, k;
const casadi_int* row_x, *colind_y;
ncol_x = sp_x[1];
nnz_x = sp_x[2 + ncol_x];
row_x = sp_x + 2 + ncol_x+1;
ncol_y = sp_y[1];
colind_y = sp_y+2;
for (k=0; k<ncol_y; ++k) tmp[k] = colind_y[k];
for (k=0; k<nnz_x; ++k) {
y[tmp[row_x[k]]++] = x[k];
}
}
void casadi_fatrop_mproject(casadi_real factor, const casadi_real* x, const casadi_int* sp_x,
casadi_real* y, const casadi_int* sp_y, casadi_real* w) {
casadi_int ncol_y;
const casadi_int* colind_y;
ncol_y = sp_y[1];
colind_y = sp_y+2;
casadi_project(x, sp_x, y, sp_y, w);
casadi_scal(colind_y[ncol_y], factor, y);
}
void casadi_fatrop_dense_transfer(double factor, const casadi_real* x,
const casadi_int* sp_x, casadi_real* y,
const casadi_int* sp_y, casadi_real* w) {
casadi_sparsify(x, w, sp_x, 0);
casadi_int nrow_y = sp_y[0];
casadi_int ncol_y = sp_y[1];
const casadi_int *colind_y = sp_y+2, *row_y = sp_y + 2 + ncol_y+1;
/* Loop over columns of y */
casadi_int i, el;
for (i=0; i<ncol_y; ++i) {
for (el=colind_y[i]; el<colind_y[i+1]; ++el) y[nrow_y*i + row_y[el]] += factor*(*w++);
}
}
void casadi_fatrop_read_primal_data(const double* primal_data, casadi_real* x, const struct OCPStruct *s) {
int k;
for (k=0;k<s->K;++k) {
casadi_copy(primal_data+s->ux_offs[k], s->nu[k], x+s->nx[k]+s->ux_offs[k]);
casadi_copy(primal_data+s->ux_offs[k]+s->nu[k], s->nx[k], x+s->ux_offs[k]);
}
}
struct casadi_fatrop_prob {
const struct casadi_nlpsol_prob* nlp;
const casadi_int *nx, *nu, *ng;
const casadi_int *sp_h, *sp_a;
casadi_int nnz_h, nnz_a;
const casadi_int *ABsp;
const casadi_int *AB_offsets;
const casadi_int *CDsp;
const casadi_int *CD_offsets;
const casadi_int *RSQsp;
const casadi_int *RSQ_offsets;
casadi_int N;
struct casadi_ocp_block *AB, *CD, *RSQ;
struct casadi_oracle_callback nlp_jac_g;
};
void casadi_fatrop_setup(struct casadi_fatrop_prob* p) {
if (p->sp_h) {
p->nnz_h = p->sp_h[2+p->sp_h[1]];
} else {
p->nnz_h = 0;
}
p->nnz_a = p->sp_a[2+p->sp_a[1]];
}
struct casadi_fatrop_data {
const struct casadi_fatrop_prob* prob;
struct casadi_nlpsol_data* nlp;
casadi_real *AB, *CD, *RSQ;
casadi_int *a_eq, *a_ineq, *a_eq_idx, *a_ineq_idx;
casadi_int *x_eq, *x_ineq, *x_eq_idx, *x_ineq_idx;
const casadi_real** arg;
casadi_real** res;
casadi_int* iw;
casadi_real* w;
int unified_return_status;
int success;
casadi_real *pv, *x, *a;
struct blasfeo_dvec v, r;
struct OcpInterface ocp_interface;
};
int fatrop_init_mem(struct casadi_fatrop_data* d) {
return 0;
}
void fatrop_free_mem(struct casadi_fatrop_data* d) {
}
fatrop_int casadi_fatrop_full_eval_constr_jac(const double* primal_data, const double* stageparams_p, const double* globalparams_p,
struct blasfeo_dmat* BAbt_p, struct blasfeo_dmat* Ggt_p, struct blasfeo_dmat* Ggt_ineq_p, const struct OCPStruct* s, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
const struct casadi_fatrop_prob* p = d->prob;
struct casadi_nlpsol_data* d_nlp = d->nlp;
struct casadi_oracle_data* d_oracle = d_nlp->oracle;
casadi_fatrop_read_primal_data(primal_data, d->x, s);
d_oracle->arg[0] = d->x;
d_oracle->arg[1] = d_nlp->p;
d_oracle->res[0] = d->a;
casadi_oracle_call(&d->prob->nlp_jac_g, d_oracle);
for (int i=0;i<casadi_sp_nnz(p->sp_a);++i) {
printf("%e\n", d->a[i]);
}
casadi_fatrop_mproject(-1.0, d->a, p->sp_a, d->AB, p->ABsp, d->pv);
return 0;
}
fatrop_int casadi_fatrop_eval_BAbt(const double *states_kp1, const double *inputs_k,
const double *states_k, const double *stage_params_k,
const double *global_params, struct blasfeo_dmat *res, const fatrop_int k, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
const struct casadi_fatrop_prob* p = d->prob;
struct casadi_nlpsol_data* d_nlp = d->nlp;
blasfeo_pack_tran_dmat(p->nx[k+1], p->nx[k], d->AB+p->AB_offsets[k], p->nx[k+1], res, p->nu[k], 0);
blasfeo_pack_tran_dmat(p->nx[k+1], p->nu[k], d->AB+p->AB_offsets[k]+p->nx[k]*p->nx[k+1], p->nx[k+1], res, 0, 0);
blasfeo_pack_dmat(1, p->nx[k+1], (casadi_real*)(d_nlp->lbz+p->nlp->nx+p->AB[k].offset_r), 1, res, p->nx[k]+p->nu[k], 0);
blasfeo_pack_dvec(p->nu[k], (casadi_real*)(inputs_k), 1, &d->v, 0);
blasfeo_pack_dvec(p->nx[k], (casadi_real*)(states_k), 1, &d->v, p->nu[k]);
BLASFEO_DVECEL(&d->v, p->nu[k]+p->nx[k]) = 1;
blasfeo_dgemv_t(p->nx[k]+p->nu[k]+1, p->nx[k+1], 1.0, res, 0, 0,
&d->v, 0,
0.0, &d->r, 0,
&d->r, 0);
if (states_kp1) {
for (int i=0;i<p->nx[k+1];++i) {
d->r.pa[i] -= states_kp1[i];
}
}
blasfeo_drowin(p->nx[k+1], 1.0, &d->r, 0, res, p->nx[k]+p->nu[k], 0);
return 0;
}
fatrop_int casadi_fatrop_get_nx(const fatrop_int k, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
const struct casadi_fatrop_prob* p = d->prob;
printf("nx %lld\n", p->nx[k]);
if (k==p->N+1) return p->nx[k-1];
return p->nx[k];
}
fatrop_int casadi_fatrop_get_nu(const fatrop_int k, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
const struct casadi_fatrop_prob* p = d->prob;
printf("u %lld\n", p->nu[k]);
return p->nu[k];
}
fatrop_int casadi_fatrop_get_ng(const fatrop_int k, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
int ret;
fatrop_int n_a_eq = d->a_eq_idx[k+1]-d->a_eq_idx[k];
fatrop_int n_x_eq = d->x_eq_idx[k+1]-d->x_eq_idx[k];
ret = n_a_eq+n_x_eq;
printf("d->a_eq_idx[k] %lld\n", d->a_eq_idx[k]);
printf("d->a_eq_idx[k+1] %lld\n", d->a_eq_idx[k+1]);
printf("d->x_eq_idx[k] %lld\n", d->x_eq_idx[k]);
printf("d->x_eq_idx[k+1] %lld\n", d->x_eq_idx[k+1]);
printf("get_ng %d\n", ret);
return ret;
}
fatrop_int casadi_fatrop_get_horizon_length(void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
printf("horizon_length %lld\n", d->prob->N+1);
return d->prob->N+1;
}
fatrop_int casadi_fatrop_get_ng_ineq(const fatrop_int k, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
fatrop_int n_a_ineq = d->a_ineq_idx[k+1]-d->a_ineq_idx[k];
fatrop_int n_x_ineq = d->x_ineq_idx[k+1]-d->x_ineq_idx[k];
printf("get_ng_ineq %d\n", n_a_ineq+n_x_ineq);
return n_a_ineq+n_x_ineq;
}
fatrop_int casadi_fatrop_get_bounds(double *lower, double *upper, const fatrop_int k, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
const struct casadi_fatrop_prob* p = d->prob;
struct casadi_nlpsol_data* d_nlp = d->nlp;
casadi_int nx = p->nlp->nx;
int i=0;
int column = 0;
for (i=d->a_ineq_idx[k];i<d->a_ineq_idx[k+1];++i) {
lower[column] = d_nlp->lbz[nx+d->a_ineq[i]];
upper[column] = d_nlp->ubz[nx+d->a_ineq[i]];
column++;
}
for (i=d->x_ineq_idx[k];i<d->x_ineq_idx[k+1];++i) {
lower[column] = d_nlp->lbz[d->x_ineq[i]];
upper[column] = d_nlp->ubz[d->x_ineq[i]];
column++;
}
return 0;
}
fatrop_int casadi_fatrop_get_initial_xk(double *xk, const fatrop_int k, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
const struct casadi_fatrop_prob* p = d->prob;
struct casadi_nlpsol_data* d_nlp = d->nlp;
printf("casadi_fatrop_get_initial_xk offset %lld %e\n",p->CD[k].offset_c,d_nlp->z[p->CD[k].offset_c]);
casadi_copy(d_nlp->z+p->CD[k].offset_c, p->nx[k], xk);
return 0;
}
fatrop_int casadi_fatrop_get_initial_uk(double *uk, const fatrop_int k, void* user_data) {
struct casadi_fatrop_data* d = (struct casadi_fatrop_data*)(user_data);
const struct casadi_fatrop_prob* p = d->prob;
struct casadi_nlpsol_data* d_nlp = d->nlp;
casadi_copy(d_nlp->z+p->CD[k].offset_c+p->nx[k], p->nu[k], uk);
return 0;
}
void casadi_fatrop_work(const struct casadi_fatrop_prob* p, casadi_int* sz_arg, casadi_int* sz_res, casadi_int* sz_iw, casadi_int* sz_w) {
casadi_nlpsol_work(p->nlp, sz_arg, sz_res, sz_iw, sz_w);
*sz_w = casadi_max(*sz_w, 2*(p->nlp->nx+p->nlp->ng));
*sz_w = casadi_max(*sz_w, p->nlp->nx);
*sz_w += casadi_sp_nnz(p->ABsp);
*sz_w += casadi_sp_nnz(p->CDsp);
*sz_w += casadi_sp_nnz(p->RSQsp);
*sz_w += casadi_sp_nnz(p->sp_a);
*sz_w += blasfeo_memsize_dvec(p->nlp->nx)+64;
*sz_w += blasfeo_memsize_dvec(p->nlp->nx)+64;
*sz_iw += p->N+2;
*sz_iw += p->N+2;
*sz_iw += p->N+2;
*sz_iw += p->N+2;
*sz_iw += p->nlp->ng;
*sz_iw += p->nlp->ng;
*sz_iw += p->nlp->nx;
*sz_iw += p->nlp->nx;
}
void casadi_fatrop_init(struct casadi_fatrop_data* d, const casadi_real*** arg, casadi_real*** res, casadi_int** iw, casadi_real** w) {
const struct casadi_fatrop_prob* p = d->prob;
struct casadi_oracle_data* d_oracle = d->nlp->oracle;
d->AB = *w; *w += casadi_sp_nnz(p->ABsp);
d->CD = *w; *w += casadi_sp_nnz(p->CDsp);
d->RSQ = *w; *w += casadi_sp_nnz(p->RSQsp);
d->a = *w; *w += casadi_sp_nnz(p->sp_a);
blasfeo_create_dvec(p->nlp->nx, &d->v, (void*) (((unsigned long long) (*w)+63)/64*64));
*w += blasfeo_memsize_dvec(p->nlp->nx)+64;
blasfeo_create_dvec(p->nlp->nx, &d->r, (void*) (((unsigned long long) (*w)+63)/64*64));
*w += blasfeo_memsize_dvec(p->nlp->nx)+64;
d->a_eq_idx = *iw; *iw += p->N+2;
d->a_ineq_idx = *iw; *iw += p->N+2;
d->x_eq_idx = *iw; *iw += p->N+2;
d->x_ineq_idx = *iw; *iw += p->N+2;
d->a_eq = *iw; *iw += p->nlp->ng;
d->a_ineq = *iw; *iw += p->nlp->ng;
d->x_eq = *iw; *iw += p->nlp->nx;
d->x_ineq = *iw; *iw += p->nlp->nx;
d->pv = *w;
d->x = *w;
casadi_oracle_init(d_oracle, arg, res, iw, w);
}
void casadi_fatrop_presolve(struct casadi_fatrop_data* d) {
struct OcpInterface* ocp_interface = &d->ocp_interface;
ocp_interface->get_nx = casadi_fatrop_get_nx;
ocp_interface->get_nu = casadi_fatrop_get_nu;
ocp_interface->get_ng = casadi_fatrop_get_ng;
ocp_interface->get_n_stage_params = 0;
ocp_interface->get_n_global_params = 0;
ocp_interface->get_default_stage_params = 0;
ocp_interface->get_default_global_params = 0;
ocp_interface->get_ng_ineq = casadi_fatrop_get_ng_ineq;
ocp_interface->get_horizon_length = casadi_fatrop_get_horizon_length;
ocp_interface->get_bounds = casadi_fatrop_get_bounds;
ocp_interface->get_initial_xk = casadi_fatrop_get_initial_xk;
ocp_interface->get_initial_uk = casadi_fatrop_get_initial_uk;
ocp_interface->full_eval_constr_jac = casadi_fatrop_full_eval_constr_jac;
ocp_interface->eval_BAbt = casadi_fatrop_eval_BAbt;
}
void casadi_fatrop_solve(struct casadi_fatrop_data* d) {
casadi_int k, i, start, stop, nx;
const struct casadi_fatrop_prob* p = d->prob;
const struct casadi_nlpsol_prob* p_nlp = p->nlp;
struct casadi_nlpsol_data* d_nlp = d->nlp;
nx = p_nlp->nx;
d->a_eq_idx[0] = 0;
d->a_ineq_idx[0] = 0;
d->x_eq_idx[0] = 0;
d->x_ineq_idx[0] = 0;
for (k=0;k<p->N+1;++k) {
printf("k=%lld\n", k);
d->a_eq_idx[k+1] = d->a_eq_idx[k];
d->a_ineq_idx[k+1] = d->a_ineq_idx[k];
start = p->CD[k].offset_r;
stop = p->CD[k].offset_r+p->CD[k].rows;
printf("start %lld\n", start);
printf("stop %lld\n", stop);
for (i=start;i<stop;++i) {
if (d_nlp->lbz[nx+i]==d_nlp->ubz[nx+i]) {
d->a_eq[d->a_eq_idx[k+1]++] = i;
} else {
if (d_nlp->lbz[nx+i]==-casadi_inf && d_nlp->ubz[nx+i]==casadi_inf) continue;
d->a_ineq[d->a_ineq_idx[k+1]++] = i;
}
printf("a_eq_idx %lld\n", d->a_eq_idx[k]);
printf("a_ineq_idx %lld\n", d->a_ineq_idx[k]);
}
d->x_eq_idx[k+1] = d->x_eq_idx[k];
d->x_ineq_idx[k+1] = d->x_ineq_idx[k];
printf("x_eq_idx %lld\n", d->x_eq_idx[k]);
printf("x_ineq_idx %lld\n", d->x_ineq_idx[k]);
start = p->CD[k].offset_c;
stop = p->CD[k].offset_c+p->CD[k].cols;
printf("start %lld\n", start);
printf("stop %lld\n", stop);
for (i=start;i<stop;++i) {
if (d_nlp->lbz[i]==d_nlp->ubz[i]) {
d->x_eq[d->x_eq_idx[k+1]++] = i;
} else {
if (d_nlp->lbz[i]==-casadi_inf && d_nlp->ubz[i]==casadi_inf) continue;
d->x_ineq[d->x_ineq_idx[k+1]++] = i;
}
}
}
d->ocp_interface.user_data = d;
OcpSolver* s = fatrop_create_ocp_solver(&d->ocp_interface);
fatrop_set_option_bool(s, "accept_every_trial_step", 0);
fatrop_solve(s);
/*d->unified_return_status = 1;
for (casadi_int i=0; i<p_nlp->nx; ++i) {
d->z_L[i] = casadi_fmax(0., -d_nlp->lam[i]);
d->z_U[i] = casadi_fmax(0., d_nlp->lam[i]);
}
d->status = IpoptSolve(d->fatrop, d_nlp->z, d_nlp->z + p_nlp->nx, &d_nlp->objective, d_nlp->lam+p_nlp->nx, d->z_L, d->z_U, d);
for (casadi_int i=0; i<p_nlp->nx; ++i) {
d_nlp->lam[i] = d->z_U[i]-d->z_L[i];
}
FreeIpoptProblem(d->fatrop);
if (d->status==Solve_Succeeded ||
d->status==Solved_To_Acceptable_Level ||
d->status==Feasible_Point_Found) {
d->unified_return_status = 0;
} else if (d->status==Maximum_Iterations_Exceeded) {
d->unified_return_status = 2;
}
#if (IPOPT_VERSION_MAJOR > 3) || (IPOPT_VERSION_MAJOR == 3 && IPOPT_VERSION_MINOR >= 14)
if (d->status==Maximum_WallTime_Exceeded) d->unified_return_status = 2;
#endif
d->success = (d->unified_return_status == 0);*/
}
static int casadi_f1_mem_counter = 0;
static int casadi_f1_unused_stack_counter = -1;
static int casadi_f1_unused_stack[CASADI_MAX_NUM_THREADS];
static struct casadi_fatrop_data casadi_f1_mem[CASADI_MAX_NUM_THREADS];
#ifndef CASADI_PRINTF
#define CASADI_PRINTF printf
#ifndef CASADI_SNPRINTF
#define CASADI_SNPRINTF snprintf
#endif
#endif
static const casadi_int casadi_s0[35] = {32, 1, 0, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
static const casadi_int casadi_s1[8] = {2, 3, 0, 1, 2, 2, 0, 1};
static const casadi_int casadi_s2[7] = {1, 3, 0, 0, 0, 1, 0};
static const casadi_int casadi_s3[8] = {2, 3, 0, 0, 1, 2, 0, 1};
static const casadi_int casadi_s4[7] = {1, 3, 0, 1, 1, 1, 0};
static const casadi_int casadi_s5[30] = {0, 4, 8, 13, 17, 20, 23, 27, 30, 33, 37, 40, 43, 47, 50, 53, 57, 60, 63, 67, 70, 73, 77, 80, 83, 87, 90, 93, 97, 100};
static const casadi_int casadi_s6[22] = {1, 5, 9, 14, 21, 25, 29, 34, 41, 45, 49, 54, 61, 65, 69, 74, 81, 85, 89, 94, 98, 101};
static const casadi_int casadi_s7[15] = {2, 6, 10, 18, 22, 26, 38, 42, 46, 58, 62, 66, 78, 82, 86};
static const casadi_int casadi_s8[20] = {3, 11, 15, 19, 24, 31, 35, 39, 44, 51, 55, 59, 64, 71, 75, 79, 84, 91, 95, 99};
static const casadi_int casadi_s9[15] = {7, 12, 16, 28, 32, 36, 48, 52, 56, 68, 72, 76, 88, 92, 96};
static const casadi_int casadi_s10[137] = {42, 32, 0, 3, 6, 9, 13, 16, 19, 23, 26, 29, 33, 36, 39, 43, 46, 49, 53, 56, 59, 63, 66, 69, 73, 76, 79, 83, 86, 89, 93, 96, 99, 101, 102, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 5, 6, 7, 1, 5, 6, 5, 6, 8, 5, 9, 10, 11, 6, 9, 10, 9, 10, 12, 9, 13, 14, 15, 10, 13, 14, 13, 14, 16, 13, 17, 18, 19, 14, 17, 18, 17, 18, 20, 17, 21, 22, 23, 18, 21, 22, 21, 22, 24, 21, 25, 26, 27, 22, 25, 26, 25, 26, 28, 25, 29, 30, 31, 26, 29, 30, 29, 30, 32, 29, 33, 34, 35, 30, 33, 34, 33, 34, 36, 33, 37, 38, 39, 34, 37, 38, 37, 38, 40, 37, 41, 38};
static const casadi_int casadi_s11[147] = {32, 42, 0, 4, 8, 9, 10, 11, 15, 19, 20, 21, 25, 29, 30, 31, 35, 39, 40, 41, 45, 49, 50, 51, 55, 59, 60, 61, 65, 69, 70, 71, 75, 79, 80, 81, 85, 89, 90, 91, 95, 99, 100, 101, 102, 0, 1, 2, 3, 0, 1, 2, 4, 0, 1, 2, 3, 4, 5, 6, 3, 4, 5, 7, 3, 5, 6, 7, 8, 9, 6, 7, 8, 10, 6, 8, 9, 10, 11, 12, 9, 10, 11, 13, 9, 11, 12, 13, 14, 15, 12, 13, 14, 16, 12, 14, 15, 16, 17, 18, 15, 16, 17, 19, 15, 17, 18, 19, 20, 21, 18, 19, 20, 22, 18, 20, 21, 22, 23, 24, 21, 22, 23, 25, 21, 23, 24, 25, 26, 27, 24, 25, 26, 28, 24, 26, 27, 28, 29, 30, 27, 28, 29, 31, 27, 29, 30};
static const casadi_int casadi_s12[66] = {32, 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
static const casadi_int casadi_s13[11] = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
static const casadi_int casadi_s14[11] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0};
static const casadi_int casadi_s15[95] = {42, 32, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 60, 60, 0, 1, 0, 1, 0, 1, 5, 6, 5, 6, 5, 6, 9, 10, 9, 10, 9, 10, 13, 14, 13, 14, 13, 14, 17, 18, 17, 18, 17, 18, 21, 22, 21, 22, 21, 22, 25, 26, 25, 26, 25, 26, 29, 30, 29, 30, 29, 30, 33, 34, 33, 34, 33, 34, 37, 38, 37, 38, 37, 38};
static const casadi_int casadi_s16[11] = {0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60};
static const casadi_int casadi_s17[100] = {42, 32, 0, 3, 6, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 64, 65, 2, 3, 4, 2, 3, 4, 2, 3, 4, 7, 8, 7, 8, 7, 8, 11, 12, 11, 12, 11, 12, 15, 16, 15, 16, 15, 16, 19, 20, 19, 20, 19, 20, 23, 24, 23, 24, 23, 24, 27, 28, 27, 28, 27, 28, 31, 32, 31, 32, 31, 32, 35, 36, 35, 36, 35, 36, 39, 40, 39, 40, 39, 40, 41, 41};
static const casadi_int casadi_s18[12] = {0, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 65};
static const casadi_int casadi_s19[129] = {32, 32, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 92, 94, 0, 1, 2, 0, 1, 2, 0, 1, 2, 3, 4, 5, 3, 4, 5, 3, 4, 5, 6, 7, 8, 6, 7, 8, 6, 7, 8, 9, 10, 11, 9, 10, 11, 9, 10, 11, 12, 13, 14, 12, 13, 14, 12, 13, 14, 15, 16, 17, 15, 16, 17, 15, 16, 17, 18, 19, 20, 18, 19, 20, 18, 19, 20, 21, 22, 23, 21, 22, 23, 21, 22, 23, 24, 25, 26, 24, 25, 26, 24, 25, 26, 27, 28, 29, 27, 28, 29, 27, 28, 29, 30, 31, 30, 31};
static const casadi_int casadi_s20[12] = {0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 94};
static const casadi_int casadi_s21[40] = {0, 0, 2, 3, 5, 3, 2, 3, 9, 6, 2, 3, 13, 9, 2, 3, 17, 12, 2, 3, 21, 15, 2, 3, 25, 18, 2, 3, 29, 21, 2, 3, 33, 24, 2, 3, 37, 27, 2, 3};
static const casadi_int casadi_s22[44] = {2, 0, 3, 3, 7, 3, 2, 3, 11, 6, 2, 3, 15, 9, 2, 3, 19, 12, 2, 3, 23, 15, 2, 3, 27, 18, 2, 3, 31, 21, 2, 3, 35, 24, 2, 3, 39, 27, 2, 3, 41, 30, 1, 2};
static const casadi_int casadi_s23[44] = {0, 0, 3, 3, 3, 3, 3, 3, 6, 6, 3, 3, 9, 9, 3, 3, 12, 12, 3, 3, 15, 15, 3, 3, 18, 18, 3, 3, 21, 21, 3, 3, 24, 24, 3, 3, 27, 27, 3, 3, 30, 30, 2, 2};
static const casadi_int casadi_s24[5] = {1, 1, 0, 1, 0};
static const casadi_int casadi_s25[25] = {1, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/* ode:(x[2],u,z[0],p,t[1x1,0nz])->(ode[2],alg[0],quad[0]) */
static int casadi_f5(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real w0, w1, w2;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: @1 = input[0][1] */
w1 = arg[0] ? arg[0][1] : 0;
/* #2: @1 = (@0-@1) */
w1 = (w0-w1);
/* #3: @2 = input[1][0] */
w2 = arg[1] ? arg[1][0] : 0;
/* #4: @1 = (@1+@2) */
w1 += w2;
/* #5: @2 = input[3][0] */
w2 = arg[3] ? arg[3][0] : 0;
/* #6: @1 = (@1+@2) */
w1 += w2;
/* #7: output[0][0] = @1 */
if (res[0]) res[0][0] = w1;
/* #8: output[0][1] = @0 */
if (res[0]) res[0][1] = w0;
return 0;
}
/* F:(x0[2],u,t0,DT,DT_control,p,z0[0])->(xf[2],poly_coeff[2x5],qf[0],poly_coeff_q[0x4],zf[0],poly_coeff_z[]) */
static int casadi_f4(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+6, *rr;
const casadi_real **arg1=arg+7, *cr, *cs;
casadi_real *w0=w+3, w1, w2, w3, w5, *w7=w+9, w8, *w9=w+12, *w10=w+14, *w11=w+16, *w12=w+18, *w13=w+20;
/* #0: @0 = input[0][0] */
casadi_copy(arg[0], 2, w0);
/* #1: @1 = input[3][0] */
w1 = arg[3] ? arg[3][0] : 0;
/* #2: @2 = 6 */
w2 = 6.;
/* #3: @2 = (@1/@2) */
w2 = (w1/w2);
/* #4: @3 = input[1][0] */
w3 = arg[1] ? arg[1][0] : 0;
/* #5: @4 = 0x1 */
/* #6: @5 = input[5][0] */
w5 = arg[5] ? arg[5][0] : 0;
/* #7: @6 = 00 */
/* #8: {@7, NULL, NULL} = ode(@0, @3, @4, @5, @6) */
arg1[0]=w0;
arg1[1]=(&w3);
arg1[2]=0;
arg1[3]=(&w5);
arg1[4]=0;
res1[0]=w7;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #9: @8 = 2 */
w8 = 2.;
/* #10: @8 = (@1/@8) */
w8 = (w1/w8);
/* #11: @9 = (@8*@7) */
for (i=0, rr=w9, cs=w7; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #12: @9 = (@0+@9) */
for (i=0, rr=w9, cr=w0, cs=w9; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #13: @4 = 0x1 */
/* #14: @6 = 00 */
/* #15: {@10, NULL, NULL} = ode(@9, @3, @4, @5, @6) */
arg1[0]=w9;
arg1[1]=(&w3);
arg1[2]=0;
arg1[3]=(&w5);
arg1[4]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #16: @9 = (2.*@10) */
for (i=0, rr=w9, cs=w10; i<2; ++i) *rr++ = (2.* *cs++ );
/* #17: @9 = (@7+@9) */
for (i=0, rr=w9, cr=w7, cs=w9; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #18: @8 = 2 */
w8 = 2.;
/* #19: @8 = (@1/@8) */
w8 = (w1/w8);
/* #20: @11 = (@8*@10) */
for (i=0, rr=w11, cs=w10; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #21: @11 = (@0+@11) */
for (i=0, rr=w11, cr=w0, cs=w11; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #22: @4 = 0x1 */
/* #23: @6 = 00 */
/* #24: {@12, NULL, NULL} = ode(@11, @3, @4, @5, @6) */
arg1[0]=w11;
arg1[1]=(&w3);
arg1[2]=0;
arg1[3]=(&w5);
arg1[4]=0;
res1[0]=w12;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #25: @11 = (2.*@12) */
for (i=0, rr=w11, cs=w12; i<2; ++i) *rr++ = (2.* *cs++ );
/* #26: @9 = (@9+@11) */
for (i=0, rr=w9, cs=w11; i<2; ++i) (*rr++) += (*cs++);
/* #27: @11 = (@1*@12) */
for (i=0, rr=w11, cs=w12; i<2; ++i) (*rr++) = (w1*(*cs++));
/* #28: @11 = (@0+@11) */
for (i=0, rr=w11, cr=w0, cs=w11; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #29: @4 = 0x1 */
/* #30: @6 = 00 */
/* #31: {@13, NULL, NULL} = ode(@11, @3, @4, @5, @6) */
arg1[0]=w11;
arg1[1]=(&w3);
arg1[2]=0;
arg1[3]=(&w5);
arg1[4]=0;
res1[0]=w13;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #32: @9 = (@9+@13) */
for (i=0, rr=w9, cs=w13; i<2; ++i) (*rr++) += (*cs++);
/* #33: @9 = (@2*@9) */
for (i=0, rr=w9, cs=w9; i<2; ++i) (*rr++) = (w2*(*cs++));
/* #34: @9 = (@0+@9) */
for (i=0, rr=w9, cr=w0, cs=w9; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #35: output[0][0] = @9 */
casadi_copy(w9, 2, res[0]);
/* #36: output[1][0] = @0 */
casadi_copy(w0, 2, res[1]);
/* #37: output[1][1] = @7 */
if (res[1]) casadi_copy(w7, 2, res[1]+2);
/* #38: @2 = 2 */
w2 = 2.;
/* #39: @2 = (@2/@1) */
w2 /= w1;
/* #40: @0 = (@10-@7) */
for (i=0, rr=w0, cr=w10, cs=w7; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #41: @0 = (@2*@0) */
for (i=0, rr=w0, cs=w0; i<2; ++i) (*rr++) = (w2*(*cs++));
/* #42: @2 = 2 */
w2 = 2.;
/* #43: @0 = (@0/@2) */
for (i=0, rr=w0; i<2; ++i) (*rr++) /= w2;
/* #44: output[1][2] = @0 */
if (res[1]) casadi_copy(w0, 2, res[1]+4);
/* #45: @2 = 4 */
w2 = 4.;
/* #46: @3 = sq(@1) */
w3 = casadi_sq( w1 );
/* #47: @2 = (@2/@3) */
w2 /= w3;
/* #48: @10 = (@12-@10) */
for (i=0, rr=w10, cr=w12, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #49: @10 = (@2*@10) */
for (i=0, rr=w10, cs=w10; i<2; ++i) (*rr++) = (w2*(*cs++));
/* #50: @2 = 6 */
w2 = 6.;
/* #51: @10 = (@10/@2) */
for (i=0, rr=w10; i<2; ++i) (*rr++) /= w2;
/* #52: output[1][3] = @10 */
if (res[1]) casadi_copy(w10, 2, res[1]+6);
/* #53: @2 = 4 */
w2 = 4.;
/* #54: @12 = (2.*@12) */
for (i=0, rr=w12, cs=w12; i<2; ++i) *rr++ = (2.* *cs++ );
/* #55: @13 = (@13-@12) */
for (i=0, rr=w13, cs=w12; i<2; ++i) (*rr++) -= (*cs++);
/* #56: @13 = (@13+@7) */
for (i=0, rr=w13, cs=w7; i<2; ++i) (*rr++) += (*cs++);
/* #57: @13 = (@2*@13) */
for (i=0, rr=w13, cs=w13; i<2; ++i) (*rr++) = (w2*(*cs++));
/* #58: @2 = 3 */
w2 = 3.;
/* #59: @1 = pow(@1,@2) */
w1 = pow(w1,w2);
/* #60: @13 = (@13/@1) */
for (i=0, rr=w13; i<2; ++i) (*rr++) /= w1;
/* #61: @1 = 24 */
w1 = 24.;
/* #62: @13 = (@13/@1) */
for (i=0, rr=w13; i<2; ++i) (*rr++) /= w1;
/* #63: output[1][4] = @13 */
if (res[1]) casadi_copy(w13, 2, res[1]+8);
return 0;
}
/* F:(x0[2],u,T,t0,p,z0[0])->(xf[2],Xi[2x2],poly_coeff[2x5],qf[0],Qi[0],poly_coeff_q[0x4],zf[0],Zi[0],poly_coeff_z[]) */
static int casadi_f3(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real **res1=res+9;
const casadi_real **arg1=arg+6;
casadi_real *w0=w+22, w1, w2, w3, w4, *w6=w+28, *w7=w+30;
/* #0: @0 = input[0][0] */
casadi_copy(arg[0], 2, w0);
/* #1: @1 = input[1][0] */
w1 = arg[1] ? arg[1][0] : 0;
/* #2: @2 = input[3][0] */
w2 = arg[3] ? arg[3][0] : 0;
/* #3: @3 = input[2][0] */
w3 = arg[2] ? arg[2][0] : 0;
/* #4: @4 = input[4][0] */
w4 = arg[4] ? arg[4][0] : 0;
/* #5: @5 = 0x1 */
/* #6: {@6, @7, NULL, NULL, NULL, NULL} = F(@0, @1, @2, @3, @3, @4, @5) */
arg1[0]=w0;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w3);
arg1[4]=(&w3);
arg1[5]=(&w4);
arg1[6]=0;
res1[0]=w6;
res1[1]=w7;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f4(arg1, res1, iw, w, 0)) return 1;
/* #7: output[0][0] = @6 */
casadi_copy(w6, 2, res[0]);
/* #8: output[1][0] = @0 */
casadi_copy(w0, 2, res[1]);
/* #9: output[1][1] = @6 */
if (res[1]) casadi_copy(w6, 2, res[1]+2);
/* #10: output[2][0] = @7 */
casadi_copy(w7, 10, res[2]);
return 0;
}
/* adj1_ode:(x[2],u,z[0],p,t[1x1,0nz],out_ode[2x1,0nz],out_alg[0],out_quad[0],adj_ode[2],adj_alg[0],adj_quad[0])->(adj_x[2],adj_u,adj_z[0],adj_p,adj_t[1x1,0nz]) */
static int casadi_f8(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *w0=w+0, w1, w2;
/* #0: @0 = input[8][0] */
casadi_copy(arg[8], 2, w0);
/* #1: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #2: @2 = (@2+@1) */
w2 += w1;
/* #3: output[0][0] = @2 */
if (res[0]) res[0][0] = w2;
/* #4: @2 = (-@1) */
w2 = (- w1 );
/* #5: output[0][1] = @2 */
if (res[0]) res[0][1] = w2;
/* #6: output[1][0] = @1 */
if (res[1]) res[1][0] = w1;
/* #7: output[3][0] = @1 */
if (res[3]) res[3][0] = w1;
return 0;
}
/* adj1_F:(x0[2],u,t0,DT,DT_control,p,z0[0],out_xf[2x1,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_poly_coeff_q[0x4],out_zf[0],out_poly_coeff_z[],adj_xf[2],adj_poly_coeff[2x5],adj_qf[0],adj_poly_coeff_q[0x4],adj_zf[0],adj_poly_coeff_z[])->(adj_x0[2],adj_u,adj_t0[1x1,0nz],adj_DT,adj_DT_control[1x1,0nz],adj_p,adj_z0[0]) */
static int casadi_f7(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+7, *rr;
const casadi_real **arg1=arg+19, *cr, *cs;
casadi_real *w0=w+4, *w1=w+14, *w2=w+16, *w3=w+18, *w4=w+20, *w5=w+22, *w6=w+24, *w7=w+26, w8, w9, w10, w11, w13, *w15=w+33, *w16=w+35, *w19=w+37, *w20=w+39, *w23=w+41, *w24=w+43, w30, w31, w32, *w33=w+48, w34, *w35=w+51, *w36=w+53, *w39=w+55, w40, w41, w42, w43, *w44=w+61, *w45=w+63, w46, w47, w48, w49;
/* #0: @0 = input[14][0] */
casadi_copy(arg[14], 10, w0);
/* #1: {@1, @2, @3, @4, @5} = horzsplit(@0) */
casadi_copy(w0, 2, w1);
casadi_copy(w0+2, 2, w2);
casadi_copy(w0+4, 2, w3);
casadi_copy(w0+6, 2, w4);
casadi_copy(w0+8, 2, w5);
/* #2: @6 = input[13][0] */
casadi_copy(arg[13], 2, w6);
/* #3: @1 = (@1+@6) */
for (i=0, rr=w1, cs=w6; i<2; ++i) (*rr++) += (*cs++);
/* #4: @7 = input[0][0] */
casadi_copy(arg[0], 2, w7);
/* #5: @8 = input[3][0] */
w8 = arg[3] ? arg[3][0] : 0;
/* #6: @9 = 2 */
w9 = 2.;
/* #7: @9 = (@8/@9) */
w9 = (w8/w9);
/* #8: @10 = 2 */
w10 = 2.;
/* #9: @10 = (@8/@10) */
w10 = (w8/w10);
/* #10: @11 = input[1][0] */
w11 = arg[1] ? arg[1][0] : 0;
/* #11: @12 = 0x1 */
/* #12: @13 = input[5][0] */
w13 = arg[5] ? arg[5][0] : 0;
/* #13: @14 = 00 */
/* #14: {@15, NULL, NULL} = ode(@7, @11, @12, @13, @14) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w15;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #15: @16 = (@10*@15) */
for (i=0, rr=w16, cs=w15; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #16: @16 = (@7+@16) */
for (i=0, rr=w16, cr=w7, cs=w16; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #17: @17 = 0x1 */
/* #18: @18 = 00 */
/* #19: {@19, NULL, NULL} = ode(@16, @11, @17, @13, @18) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w19;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #20: @20 = (@9*@19) */
for (i=0, rr=w20, cs=w19; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #21: @20 = (@7+@20) */
for (i=0, rr=w20, cr=w7, cs=w20; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #22: @21 = 0x1 */
/* #23: @22 = 00 */
/* #24: {@23, NULL, NULL} = ode(@20, @11, @21, @13, @22) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w23;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #25: @24 = (@8*@23) */
for (i=0, rr=w24, cs=w23; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #26: @24 = (@7+@24) */
for (i=0, rr=w24, cr=w7, cs=w24; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #27: @25 = 0x1 */
/* #28: @26 = 00 */
/* #29: @27 = zeros(2x1,0nz) */
/* #30: @28 = 0x1 */
/* #31: @29 = 0x1 */
/* #32: @30 = 4 */
w30 = 4.;
/* #33: @31 = 0.0416667 */
w31 = 4.1666666666666664e-02;
/* #34: @5 = (@31*@5) */
for (i=0, rr=w5, cs=w5; i<2; ++i) (*rr++) = (w31*(*cs++));
/* #35: @31 = 3 */
w31 = 3.;
/* #36: @32 = pow(@8,@31) */
w32 = pow(w8,w31);
/* #37: @33 = (@5/@32) */
for (i=0, rr=w33, cr=w5; i<2; ++i) (*rr++) = ((*cr++)/w32);
/* #38: @33 = (@30*@33) */
for (i=0, rr=w33, cs=w33; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #39: @34 = 6 */
w34 = 6.;
/* #40: @34 = (@8/@34) */
w34 = (w8/w34);
/* #41: @35 = (@34*@6) */
for (i=0, rr=w35, cs=w6; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #42: @36 = (@33+@35) */
for (i=0, rr=w36, cr=w33, cs=w35; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #43: @37 = 0x1 */
/* #44: @38 = 0x1 */
/* #45: {@39, @34, NULL, @40, NULL} = adj1_ode(@24, @11, @25, @13, @26, @27, @28, @29, @36, @37, @38) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w36;
arg1[9]=0;
arg1[10]=0;
res1[0]=w39;
res1[1]=(&w34);
res1[2]=0;
res1[3]=(&w40);
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #46: @1 = (@1+@39) */
for (i=0, rr=w1, cs=w39; i<2; ++i) (*rr++) += (*cs++);
/* #47: @27 = zeros(2x1,0nz) */
/* #48: @28 = 0x1 */
/* #49: @29 = 0x1 */
/* #50: @36 = (-@33) */
for (i=0, rr=w36, cs=w33; i<2; ++i) *rr++ = (- *cs++ );
/* #51: @36 = (2.*@36) */
for (i=0, rr=w36, cs=w36; i<2; ++i) *rr++ = (2.* *cs++ );
/* #52: @41 = 4 */
w41 = 4.;
/* #53: @42 = sq(@8) */
w42 = casadi_sq( w8 );
/* #54: @41 = (@41/@42) */
w41 /= w42;
/* #55: @43 = 0.166667 */
w43 = 1.6666666666666666e-01;
/* #56: @4 = (@43*@4) */
for (i=0, rr=w4, cs=w4; i<2; ++i) (*rr++) = (w43*(*cs++));
/* #57: @44 = (@41*@4) */
for (i=0, rr=w44, cs=w4; i<2; ++i) (*rr++) = (w41*(*cs++));
/* #58: @36 = (@36+@44) */
for (i=0, rr=w36, cs=w44; i<2; ++i) (*rr++) += (*cs++);
/* #59: @45 = (@8*@39) */
for (i=0, rr=w45, cs=w39; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #60: @36 = (@36+@45) */
for (i=0, rr=w36, cs=w45; i<2; ++i) (*rr++) += (*cs++);
/* #61: @45 = (2.*@35) */
for (i=0, rr=w45, cs=w35; i<2; ++i) *rr++ = (2.* *cs++ );
/* #62: @36 = (@36+@45) */
for (i=0, rr=w36, cs=w45; i<2; ++i) (*rr++) += (*cs++);
/* #63: @37 = 0x1 */
/* #64: @38 = 0x1 */
/* #65: {@45, @43, NULL, @46, NULL} = adj1_ode(@20, @11, @21, @13, @22, @27, @28, @29, @36, @37, @38) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w36;
arg1[9]=0;
arg1[10]=0;
res1[0]=w45;
res1[1]=(&w43);
res1[2]=0;
res1[3]=(&w46);
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #66: @1 = (@1+@45) */
for (i=0, rr=w1, cs=w45; i<2; ++i) (*rr++) += (*cs++);
/* #67: @21 = zeros(2x1,0nz) */
/* #68: @22 = 0x1 */
/* #69: @27 = 0x1 */
/* #70: @47 = 2 */
w47 = 2.;
/* #71: @47 = (@47/@8) */
w47 /= w8;
/* #72: @48 = 0.5 */
w48 = 5.0000000000000000e-01;
/* #73: @3 = (@48*@3) */
for (i=0, rr=w3, cs=w3; i<2; ++i) (*rr++) = (w48*(*cs++));
/* #74: @20 = (@47*@3) */
for (i=0, rr=w20, cs=w3; i<2; ++i) (*rr++) = (w47*(*cs++));
/* #75: @44 = (@20-@44) */
for (i=0, rr=w44, cr=w20, cs=w44; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #76: @36 = (@9*@45) */
for (i=0, rr=w36, cs=w45; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #77: @44 = (@44+@36) */
for (i=0, rr=w44, cs=w36; i<2; ++i) (*rr++) += (*cs++);
/* #78: @36 = (2.*@35) */
for (i=0, rr=w36, cs=w35; i<2; ++i) *rr++ = (2.* *cs++ );
/* #79: @44 = (@44+@36) */
for (i=0, rr=w44, cs=w36; i<2; ++i) (*rr++) += (*cs++);
/* #80: @28 = 0x1 */
/* #81: @29 = 0x1 */
/* #82: {@36, @9, NULL, @48, NULL} = adj1_ode(@16, @11, @17, @13, @18, @21, @22, @27, @44, @28, @29) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w44;
arg1[9]=0;
arg1[10]=0;
res1[0]=w36;
res1[1]=(&w9);
res1[2]=0;
res1[3]=(&w48);
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #83: @1 = (@1+@36) */
for (i=0, rr=w1, cs=w36; i<2; ++i) (*rr++) += (*cs++);
/* #84: @17 = zeros(2x1,0nz) */
/* #85: @18 = 0x1 */
/* #86: @21 = 0x1 */
/* #87: @33 = (@33-@20) */
for (i=0, rr=w33, cs=w20; i<2; ++i) (*rr++) -= (*cs++);
/* #88: @33 = (@33+@2) */
for (i=0, rr=w33, cs=w2; i<2; ++i) (*rr++) += (*cs++);
/* #89: @33 = (@33+@35) */
for (i=0, rr=w33, cs=w35; i<2; ++i) (*rr++) += (*cs++);
/* #90: @35 = (@10*@36) */
for (i=0, rr=w35, cs=w36; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #91: @33 = (@33+@35) */
for (i=0, rr=w33, cs=w35; i<2; ++i) (*rr++) += (*cs++);
/* #92: @22 = 0x1 */
/* #93: @27 = 0x1 */
/* #94: {@35, @10, NULL, @49, NULL} = adj1_ode(@7, @11, @12, @13, @14, @17, @18, @21, @33, @22, @27) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w33;
arg1[9]=0;
arg1[10]=0;
res1[0]=w35;
res1[1]=(&w10);
res1[2]=0;
res1[3]=(&w49);
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #95: @1 = (@1+@35) */
for (i=0, rr=w1, cs=w35; i<2; ++i) (*rr++) += (*cs++);
/* #96: output[0][0] = @1 */
casadi_copy(w1, 2, res[0]);
/* #97: @34 = (@34+@43) */
w34 += w43;
/* #98: @34 = (@34+@9) */
w34 += w9;
/* #99: @34 = (@34+@10) */
w34 += w10;
/* #100: output[1][0] = @34 */
if (res[1]) res[1][0] = w34;
/* #101: @34 = sq(@8) */
w34 = casadi_sq( w8 );
/* #102: @31 = (@31*@34) */
w31 *= w34;
/* #103: {@1, NULL, NULL} = ode(@24, @11, @25, @13, @26) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w1;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #104: @24 = (2.*@23) */
for (i=0, rr=w24, cs=w23; i<2; ++i) *rr++ = (2.* *cs++ );
/* #105: @24 = (@1-@24) */
for (i=0, rr=w24, cr=w1, cs=w24; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #106: @24 = (@24+@15) */
for (i=0, rr=w24, cs=w15; i<2; ++i) (*rr++) += (*cs++);
/* #107: @24 = (@30*@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #108: @24 = (@24/@32) */
for (i=0, rr=w24; i<2; ++i) (*rr++) /= w32;
/* #109: @24 = (@24/@32) */
for (i=0, rr=w24; i<2; ++i) (*rr++) /= w32;
/* #110: @24 = (-@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) *rr++ = (- *cs++ );
/* #111: @32 = dot(@24, @5) */
w32 = casadi_dot(2, w24, w5);
/* #112: @31 = (@31*@32) */
w31 *= w32;
/* #113: @32 = (2.*@8) */
w32 = (2.* w8 );
/* #114: @41 = (@41/@42) */
w41 /= w42;
/* #115: @24 = (@23-@19) */
for (i=0, rr=w24, cr=w23, cs=w19; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #116: @42 = dot(@24, @4) */
w42 = casadi_dot(2, w24, w4);
/* #117: @41 = (@41*@42) */
w41 *= w42;
/* #118: @32 = (@32*@41) */
w32 *= w41;
/* #119: @31 = (@31-@32) */
w31 -= w32;
/* #120: @47 = (@47/@8) */
w47 /= w8;
/* #121: @24 = (@19-@15) */
for (i=0, rr=w24, cr=w19, cs=w15; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #122: @8 = dot(@24, @3) */
w8 = casadi_dot(2, w24, w3);
/* #123: @47 = (@47*@8) */
w47 *= w8;
/* #124: @31 = (@31-@47) */
w31 -= w47;
/* #125: @47 = dot(@23, @39) */
w47 = casadi_dot(2, w23, w39);
/* #126: @31 = (@31+@47) */
w31 += w47;
/* #127: @47 = 0.5 */
w47 = 5.0000000000000000e-01;
/* #128: @8 = dot(@19, @45) */
w8 = casadi_dot(2, w19, w45);
/* #129: @47 = (@47*@8) */
w47 *= w8;
/* #130: @31 = (@31+@47) */
w31 += w47;
/* #131: @47 = 0.5 */
w47 = 5.0000000000000000e-01;
/* #132: @8 = dot(@15, @36) */
w8 = casadi_dot(2, w15, w36);
/* #133: @47 = (@47*@8) */
w47 *= w8;
/* #134: @31 = (@31+@47) */
w31 += w47;
/* #135: @47 = 0.166667 */
w47 = 1.6666666666666666e-01;
/* #136: @19 = (2.*@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) *rr++ = (2.* *cs++ );
/* #137: @15 = (@15+@19) */
for (i=0, rr=w15, cs=w19; i<2; ++i) (*rr++) += (*cs++);
/* #138: @23 = (2.*@23) */
for (i=0, rr=w23, cs=w23; i<2; ++i) *rr++ = (2.* *cs++ );
/* #139: @15 = (@15+@23) */
for (i=0, rr=w15, cs=w23; i<2; ++i) (*rr++) += (*cs++);
/* #140: @15 = (@15+@1) */
for (i=0, rr=w15, cs=w1; i<2; ++i) (*rr++) += (*cs++);
/* #141: @8 = dot(@15, @6) */
w8 = casadi_dot(2, w15, w6);
/* #142: @47 = (@47*@8) */
w47 *= w8;
/* #143: @31 = (@31+@47) */
w31 += w47;
/* #144: output[3][0] = @31 */
if (res[3]) res[3][0] = w31;
/* #145: @40 = (@40+@46) */
w40 += w46;
/* #146: @40 = (@40+@48) */
w40 += w48;
/* #147: @40 = (@40+@49) */
w40 += w49;
/* #148: output[5][0] = @40 */
if (res[5]) res[5][0] = w40;
return 0;
}
/* adj1_F:(x0[2],u,T,t0,p,z0[0],out_xf[2x1,0nz],out_Xi[2x2,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_Qi[0],out_poly_coeff_q[0x4],out_zf[0],out_Zi[0],out_poly_coeff_z[],adj_xf[2],adj_Xi[2x2],adj_poly_coeff[2x5],adj_qf[0],adj_Qi[0],adj_poly_coeff_q[0x4],adj_zf[0],adj_Zi[0],adj_poly_coeff_z[])->(adj_x0[2],adj_u,adj_T,adj_t0[1x1,0nz],adj_p,adj_z0[0]) */
static int casadi_f6(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+6, *rr;
const casadi_real **arg1=arg+24, *cs;
casadi_real *w0=w+69, *w1=w+73, *w2=w+75, *w3=w+77, w4, w5, w6, w7, *w15=w+83, *w16=w+85, w20, w21, w22;
/* #0: @0 = input[16][0] */
casadi_copy(arg[16], 4, w0);
/* #1: {@1, @2} = horzsplit(@0) */
casadi_copy(w0, 2, w1);
casadi_copy(w0+2, 2, w2);
/* #2: @3 = input[0][0] */
casadi_copy(arg[0], 2, w3);
/* #3: @4 = input[1][0] */
w4 = arg[1] ? arg[1][0] : 0;
/* #4: @5 = input[3][0] */
w5 = arg[3] ? arg[3][0] : 0;
/* #5: @6 = input[2][0] */
w6 = arg[2] ? arg[2][0] : 0;
/* #6: @7 = input[4][0] */
w7 = arg[4] ? arg[4][0] : 0;
/* #7: @8 = 0x1 */
/* #8: @9 = zeros(2x1,0nz) */
/* #9: @10 = zeros(2x5,0nz) */
/* #10: @11 = 0x1 */
/* #11: @12 = 0x4 */
/* #12: @13 = 0x1 */
/* #13: @14 = 0x0 */
/* #14: @15 = input[15][0] */
casadi_copy(arg[15], 2, w15);
/* #15: @2 = (@2+@15) */
for (i=0, rr=w2, cs=w15; i<2; ++i) (*rr++) += (*cs++);
/* #16: @16 = input[17][0] */
casadi_copy(arg[17], 10, w16);
/* #17: @17 = 0x1 */
/* #18: @18 = 0x4 */
/* #19: @19 = 0x1 */
/* #20: {@15, @20, NULL, @21, NULL, @22, NULL} = adj1_F(@3, @4, @5, @6, @6, @7, @8, @9, @10, @11, @12, @13, @14, @2, @16, @17, @18, @19, @14) */
arg1[0]=w3;
arg1[1]=(&w4);
arg1[2]=(&w5);
arg1[3]=(&w6);
arg1[4]=(&w6);
arg1[5]=(&w7);
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=w2;
arg1[14]=w16;
arg1[15]=0;
arg1[16]=0;
arg1[17]=0;
arg1[18]=0;
res1[0]=w15;
res1[1]=(&w20);
res1[2]=0;
res1[3]=(&w21);
res1[4]=0;
res1[5]=(&w22);
res1[6]=0;
if (casadi_f7(arg1, res1, iw, w, 0)) return 1;
/* #21: @1 = (@1+@15) */
for (i=0, rr=w1, cs=w15; i<2; ++i) (*rr++) += (*cs++);
/* #22: output[0][0] = @1 */
casadi_copy(w1, 2, res[0]);
/* #23: output[1][0] = @20 */
if (res[1]) res[1][0] = w20;
/* #24: output[2][0] = @21 */
if (res[2]) res[2][0] = w21;
/* #25: output[4][0] = @22 */
if (res[4]) res[4][0] = w22;
return 0;
}
/* nlp_grad:(x[32],p,lam_f,lam_g[42])->(f,g[42],grad_gamma_x[32],grad_gamma_p) */
static int casadi_f2(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+4, *rr;
const casadi_real **arg1=arg+4, *cr, *cs;
casadi_real w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, w17, w18, w19, w20, w21, w22, w23, w24, w25, w26, w27, w28, w29, w30, w31, w32, *w33=w+131, *w34=w+133, w35, *w37=w+136, w38, w39, *w41=w+140, w42, w43, *w45=w+144, w46, w47, *w49=w+148, w50, w51, *w53=w+152, w54, w55, *w57=w+156, w58, w59, *w61=w+160, w62, w63, *w65=w+164, w66, w67, *w69=w+168, w70, w71, *w73=w+172, *w74=w+174, w75, w76, w77, w78, w79, *w80=w+221, w81, w82, *w83=w+225, w84, w85, *w86=w+229, w87, w88, *w89=w+233, w90, w91, *w92=w+237, w93, w94, *w95=w+241, w96, w97, *w98=w+245, w99, w100, *w101=w+249, w102, w103, w104, *w114=w+254, *w115=w+256, *w116=w+260, *w122=w+270, w123, w124, w125;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: @1 = sq(@0) */
w1 = casadi_sq( w0 );
/* #2: @2 = input[0][1] */
w2 = arg[0] ? arg[0][1] : 0;
/* #3: @3 = sq(@2) */
w3 = casadi_sq( w2 );
/* #4: @1 = (@1+@3) */
w1 += w3;
/* #5: @3 = input[0][2] */
w3 = arg[0] ? arg[0][2] : 0;
/* #6: @4 = sq(@3) */
w4 = casadi_sq( w3 );
/* #7: @1 = (@1+@4) */
w1 += w4;
/* #8: @4 = input[0][3] */
w4 = arg[0] ? arg[0][3] : 0;
/* #9: @5 = sq(@4) */
w5 = casadi_sq( w4 );
/* #10: @6 = input[0][4] */
w6 = arg[0] ? arg[0][4] : 0;
/* #11: @7 = sq(@6) */
w7 = casadi_sq( w6 );
/* #12: @5 = (@5+@7) */
w5 += w7;
/* #13: @7 = input[0][5] */
w7 = arg[0] ? arg[0][5] : 0;
/* #14: @8 = sq(@7) */
w8 = casadi_sq( w7 );
/* #15: @5 = (@5+@8) */
w5 += w8;
/* #16: @1 = (@1+@5) */
w1 += w5;
/* #17: @5 = input[0][6] */
w5 = arg[0] ? arg[0][6] : 0;
/* #18: @8 = sq(@5) */
w8 = casadi_sq( w5 );
/* #19: @9 = input[0][7] */
w9 = arg[0] ? arg[0][7] : 0;
/* #20: @10 = sq(@9) */
w10 = casadi_sq( w9 );
/* #21: @8 = (@8+@10) */
w8 += w10;
/* #22: @10 = input[0][8] */
w10 = arg[0] ? arg[0][8] : 0;
/* #23: @11 = sq(@10) */
w11 = casadi_sq( w10 );
/* #24: @8 = (@8+@11) */
w8 += w11;
/* #25: @1 = (@1+@8) */
w1 += w8;
/* #26: @8 = input[0][9] */
w8 = arg[0] ? arg[0][9] : 0;
/* #27: @11 = sq(@8) */
w11 = casadi_sq( w8 );
/* #28: @12 = input[0][10] */
w12 = arg[0] ? arg[0][10] : 0;
/* #29: @13 = sq(@12) */
w13 = casadi_sq( w12 );
/* #30: @11 = (@11+@13) */
w11 += w13;
/* #31: @13 = input[0][11] */
w13 = arg[0] ? arg[0][11] : 0;
/* #32: @14 = sq(@13) */
w14 = casadi_sq( w13 );
/* #33: @11 = (@11+@14) */
w11 += w14;
/* #34: @1 = (@1+@11) */
w1 += w11;
/* #35: @11 = input[0][12] */
w11 = arg[0] ? arg[0][12] : 0;
/* #36: @14 = sq(@11) */
w14 = casadi_sq( w11 );
/* #37: @15 = input[0][13] */
w15 = arg[0] ? arg[0][13] : 0;
/* #38: @16 = sq(@15) */
w16 = casadi_sq( w15 );
/* #39: @14 = (@14+@16) */
w14 += w16;
/* #40: @16 = input[0][14] */
w16 = arg[0] ? arg[0][14] : 0;
/* #41: @17 = sq(@16) */
w17 = casadi_sq( w16 );
/* #42: @14 = (@14+@17) */
w14 += w17;
/* #43: @1 = (@1+@14) */
w1 += w14;
/* #44: @14 = input[0][15] */
w14 = arg[0] ? arg[0][15] : 0;
/* #45: @17 = sq(@14) */
w17 = casadi_sq( w14 );
/* #46: @18 = input[0][16] */
w18 = arg[0] ? arg[0][16] : 0;
/* #47: @19 = sq(@18) */
w19 = casadi_sq( w18 );
/* #48: @17 = (@17+@19) */
w17 += w19;
/* #49: @19 = input[0][17] */
w19 = arg[0] ? arg[0][17] : 0;
/* #50: @20 = sq(@19) */
w20 = casadi_sq( w19 );
/* #51: @17 = (@17+@20) */
w17 += w20;
/* #52: @1 = (@1+@17) */
w1 += w17;
/* #53: @17 = input[0][18] */
w17 = arg[0] ? arg[0][18] : 0;
/* #54: @20 = sq(@17) */
w20 = casadi_sq( w17 );
/* #55: @21 = input[0][19] */
w21 = arg[0] ? arg[0][19] : 0;
/* #56: @22 = sq(@21) */
w22 = casadi_sq( w21 );
/* #57: @20 = (@20+@22) */
w20 += w22;
/* #58: @22 = input[0][20] */
w22 = arg[0] ? arg[0][20] : 0;
/* #59: @23 = sq(@22) */
w23 = casadi_sq( w22 );
/* #60: @20 = (@20+@23) */
w20 += w23;
/* #61: @1 = (@1+@20) */
w1 += w20;
/* #62: @20 = input[0][21] */
w20 = arg[0] ? arg[0][21] : 0;
/* #63: @23 = sq(@20) */
w23 = casadi_sq( w20 );
/* #64: @24 = input[0][22] */
w24 = arg[0] ? arg[0][22] : 0;
/* #65: @25 = sq(@24) */
w25 = casadi_sq( w24 );
/* #66: @23 = (@23+@25) */
w23 += w25;
/* #67: @25 = input[0][23] */
w25 = arg[0] ? arg[0][23] : 0;
/* #68: @26 = sq(@25) */
w26 = casadi_sq( w25 );
/* #69: @23 = (@23+@26) */
w23 += w26;
/* #70: @1 = (@1+@23) */
w1 += w23;
/* #71: @23 = input[0][24] */
w23 = arg[0] ? arg[0][24] : 0;
/* #72: @26 = sq(@23) */
w26 = casadi_sq( w23 );
/* #73: @27 = input[0][25] */
w27 = arg[0] ? arg[0][25] : 0;
/* #74: @28 = sq(@27) */
w28 = casadi_sq( w27 );
/* #75: @26 = (@26+@28) */
w26 += w28;
/* #76: @28 = input[0][26] */
w28 = arg[0] ? arg[0][26] : 0;
/* #77: @29 = sq(@28) */
w29 = casadi_sq( w28 );
/* #78: @26 = (@26+@29) */
w26 += w29;
/* #79: @1 = (@1+@26) */
w1 += w26;
/* #80: @26 = input[0][27] */
w26 = arg[0] ? arg[0][27] : 0;
/* #81: @29 = sq(@26) */
w29 = casadi_sq( w26 );
/* #82: @30 = input[0][28] */
w30 = arg[0] ? arg[0][28] : 0;
/* #83: @31 = sq(@30) */
w31 = casadi_sq( w30 );
/* #84: @29 = (@29+@31) */
w29 += w31;
/* #85: @31 = input[0][29] */
w31 = arg[0] ? arg[0][29] : 0;
/* #86: @32 = sq(@31) */
w32 = casadi_sq( w31 );
/* #87: @29 = (@29+@32) */
w29 += w32;
/* #88: @1 = (@1+@29) */
w1 += w29;
/* #89: @29 = input[0][30] */
w29 = arg[0] ? arg[0][30] : 0;
/* #90: @32 = sq(@29) */
w32 = casadi_sq( w29 );
/* #91: @1 = (@1+@32) */
w1 += w32;
/* #92: output[0][0] = @1 */
if (res[0]) res[0][0] = w1;
/* #93: @33 = vertcat(@4, @6) */
rr=w33;
*rr++ = w4;
*rr++ = w6;
/* #94: @34 = vertcat(@0, @2) */
rr=w34;
*rr++ = w0;
*rr++ = w2;
/* #95: @1 = 1 */
w1 = 1.;
/* #96: @32 = 0 */
w32 = 0.;
/* #97: @35 = input[1][0] */
w35 = arg[1] ? arg[1][0] : 0;
/* #98: @36 = 0x1 */
/* #99: {@37, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@34, @3, @1, @32, @35, @36) */
arg1[0]=w34;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w32);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w37;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #100: @37 = (@33-@37) */
for (i=0, rr=w37, cr=w33, cs=w37; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #101: output[1][0] = @37 */
casadi_copy(w37, 2, res[1]);
/* #102: output[1][1] = @0 */
if (res[1]) res[1][2] = w0;
/* #103: output[1][2] = @2 */
if (res[1]) res[1][3] = w2;
/* #104: output[1][3] = @3 */
if (res[1]) res[1][4] = w3;
/* #105: @37 = vertcat(@5, @9) */
rr=w37;
*rr++ = w5;
*rr++ = w9;
/* #106: @38 = 1 */
w38 = 1.;
/* #107: @39 = 1 */
w39 = 1.;
/* #108: @40 = 0x1 */
/* #109: {@41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@33, @7, @38, @39, @35, @40) */
arg1[0]=w33;
arg1[1]=(&w7);
arg1[2]=(&w38);
arg1[3]=(&w39);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w41;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #110: @41 = (@37-@41) */
for (i=0, rr=w41, cr=w37, cs=w41; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #111: output[1][4] = @41 */
if (res[1]) casadi_copy(w41, 2, res[1]+5);
/* #112: output[1][5] = @4 */
if (res[1]) res[1][7] = w4;
/* #113: output[1][6] = @7 */
if (res[1]) res[1][8] = w7;
/* #114: @41 = vertcat(@8, @12) */
rr=w41;
*rr++ = w8;
*rr++ = w12;
/* #115: @42 = 1 */
w42 = 1.;
/* #116: @43 = 2 */
w43 = 2.;
/* #117: @44 = 0x1 */
/* #118: {@45, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@37, @10, @42, @43, @35, @44) */
arg1[0]=w37;
arg1[1]=(&w10);
arg1[2]=(&w42);
arg1[3]=(&w43);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w45;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #119: @45 = (@41-@45) */
for (i=0, rr=w45, cr=w41, cs=w45; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #120: output[1][7] = @45 */
if (res[1]) casadi_copy(w45, 2, res[1]+9);
/* #121: output[1][8] = @5 */
if (res[1]) res[1][11] = w5;
/* #122: output[1][9] = @10 */
if (res[1]) res[1][12] = w10;
/* #123: @45 = vertcat(@11, @15) */
rr=w45;
*rr++ = w11;
*rr++ = w15;
/* #124: @46 = 1 */
w46 = 1.;
/* #125: @47 = 3 */
w47 = 3.;
/* #126: @48 = 0x1 */
/* #127: {@49, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@41, @13, @46, @47, @35, @48) */
arg1[0]=w41;
arg1[1]=(&w13);
arg1[2]=(&w46);
arg1[3]=(&w47);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w49;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #128: @49 = (@45-@49) */
for (i=0, rr=w49, cr=w45, cs=w49; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #129: output[1][10] = @49 */
if (res[1]) casadi_copy(w49, 2, res[1]+13);
/* #130: output[1][11] = @8 */
if (res[1]) res[1][15] = w8;
/* #131: output[1][12] = @13 */
if (res[1]) res[1][16] = w13;
/* #132: @49 = vertcat(@14, @18) */
rr=w49;
*rr++ = w14;
*rr++ = w18;
/* #133: @50 = 1 */
w50 = 1.;
/* #134: @51 = 4 */
w51 = 4.;
/* #135: @52 = 0x1 */
/* #136: {@53, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@45, @16, @50, @51, @35, @52) */
arg1[0]=w45;
arg1[1]=(&w16);
arg1[2]=(&w50);
arg1[3]=(&w51);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w53;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #137: @53 = (@49-@53) */
for (i=0, rr=w53, cr=w49, cs=w53; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #138: output[1][13] = @53 */
if (res[1]) casadi_copy(w53, 2, res[1]+17);
/* #139: output[1][14] = @11 */
if (res[1]) res[1][19] = w11;
/* #140: output[1][15] = @16 */
if (res[1]) res[1][20] = w16;
/* #141: @53 = vertcat(@17, @21) */
rr=w53;
*rr++ = w17;
*rr++ = w21;
/* #142: @54 = 1 */
w54 = 1.;
/* #143: @55 = 5 */
w55 = 5.;
/* #144: @56 = 0x1 */
/* #145: {@57, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@49, @19, @54, @55, @35, @56) */
arg1[0]=w49;
arg1[1]=(&w19);
arg1[2]=(&w54);
arg1[3]=(&w55);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w57;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #146: @57 = (@53-@57) */
for (i=0, rr=w57, cr=w53, cs=w57; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #147: output[1][16] = @57 */
if (res[1]) casadi_copy(w57, 2, res[1]+21);
/* #148: output[1][17] = @14 */
if (res[1]) res[1][23] = w14;
/* #149: output[1][18] = @19 */
if (res[1]) res[1][24] = w19;
/* #150: @57 = vertcat(@20, @24) */
rr=w57;
*rr++ = w20;
*rr++ = w24;
/* #151: @58 = 1 */
w58 = 1.;
/* #152: @59 = 6 */
w59 = 6.;
/* #153: @60 = 0x1 */
/* #154: {@61, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@53, @22, @58, @59, @35, @60) */
arg1[0]=w53;
arg1[1]=(&w22);
arg1[2]=(&w58);
arg1[3]=(&w59);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w61;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #155: @61 = (@57-@61) */
for (i=0, rr=w61, cr=w57, cs=w61; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #156: output[1][19] = @61 */
if (res[1]) casadi_copy(w61, 2, res[1]+25);
/* #157: output[1][20] = @17 */
if (res[1]) res[1][27] = w17;
/* #158: output[1][21] = @22 */
if (res[1]) res[1][28] = w22;
/* #159: @61 = vertcat(@23, @27) */
rr=w61;
*rr++ = w23;
*rr++ = w27;
/* #160: @62 = 1 */
w62 = 1.;
/* #161: @63 = 7 */
w63 = 7.;
/* #162: @64 = 0x1 */
/* #163: {@65, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@57, @25, @62, @63, @35, @64) */
arg1[0]=w57;
arg1[1]=(&w25);
arg1[2]=(&w62);
arg1[3]=(&w63);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w65;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #164: @65 = (@61-@65) */
for (i=0, rr=w65, cr=w61, cs=w65; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #165: output[1][22] = @65 */
if (res[1]) casadi_copy(w65, 2, res[1]+29);
/* #166: output[1][23] = @20 */
if (res[1]) res[1][31] = w20;
/* #167: output[1][24] = @25 */
if (res[1]) res[1][32] = w25;
/* #168: @65 = vertcat(@26, @30) */
rr=w65;
*rr++ = w26;
*rr++ = w30;
/* #169: @66 = 1 */
w66 = 1.;
/* #170: @67 = 8 */
w67 = 8.;
/* #171: @68 = 0x1 */
/* #172: {@69, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@61, @28, @66, @67, @35, @68) */
arg1[0]=w61;
arg1[1]=(&w28);
arg1[2]=(&w66);
arg1[3]=(&w67);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w69;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #173: @69 = (@65-@69) */
for (i=0, rr=w69, cr=w65, cs=w69; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #174: output[1][25] = @69 */
if (res[1]) casadi_copy(w69, 2, res[1]+33);
/* #175: output[1][26] = @23 */
if (res[1]) res[1][35] = w23;
/* #176: output[1][27] = @28 */
if (res[1]) res[1][36] = w28;
/* #177: @70 = input[0][31] */
w70 = arg[0] ? arg[0][31] : 0;
/* #178: @69 = vertcat(@29, @70) */
rr=w69;
*rr++ = w29;
*rr++ = w70;
/* #179: @70 = 1 */
w70 = 1.;
/* #180: @71 = 9 */
w71 = 9.;
/* #181: @72 = 0x1 */
/* #182: {@73, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@65, @31, @70, @71, @35, @72) */
arg1[0]=w65;
arg1[1]=(&w31);
arg1[2]=(&w70);
arg1[3]=(&w71);
arg1[4]=(&w35);
arg1[5]=0;
res1[0]=w73;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #183: @69 = (@69-@73) */
for (i=0, rr=w69, cs=w73; i<2; ++i) (*rr++) -= (*cs++);
/* #184: output[1][28] = @69 */
if (res[1]) casadi_copy(w69, 2, res[1]+37);
/* #185: output[1][29] = @26 */
if (res[1]) res[1][39] = w26;
/* #186: output[1][30] = @31 */
if (res[1]) res[1][40] = w31;
/* #187: output[1][31] = @29 */
if (res[1]) res[1][41] = w29;
/* #188: @74 = input[3][0] */
casadi_copy(arg[3], 42, w74);
/* #189: {@69, @75, @76, @77, @73, @78, @79, @80, @81, @82, @83, @84, @85, @86, @87, @88, @89, @90, @91, @92, @93, @94, @95, @96, @97, @98, @99, @100, @101, @102, @103, @104} = vertsplit(@74) */
casadi_copy(w74, 2, w69);
w75 = w74[2];
w76 = w74[3];
w77 = w74[4];
casadi_copy(w74+5, 2, w73);
w78 = w74[7];
w79 = w74[8];
casadi_copy(w74+9, 2, w80);
w81 = w74[11];
w82 = w74[12];
casadi_copy(w74+13, 2, w83);
w84 = w74[15];
w85 = w74[16];
casadi_copy(w74+17, 2, w86);
w87 = w74[19];
w88 = w74[20];
casadi_copy(w74+21, 2, w89);
w90 = w74[23];
w91 = w74[24];
casadi_copy(w74+25, 2, w92);
w93 = w74[27];
w94 = w74[28];
casadi_copy(w74+29, 2, w95);
w96 = w74[31];
w97 = w74[32];
casadi_copy(w74+33, 2, w98);
w99 = w74[35];
w100 = w74[36];
casadi_copy(w74+37, 2, w101);
w102 = w74[39];
w103 = w74[40];
w104 = w74[41];
/* #190: @105 = zeros(2x1,0nz) */
/* #191: @106 = zeros(2x2,0nz) */
/* #192: @107 = zeros(2x5,0nz) */
/* #193: @108 = 0x1 */
/* #194: @109 = 0x1 */
/* #195: @110 = 0x4 */
/* #196: @111 = 0x1 */
/* #197: @112 = 0x1 */
/* #198: @113 = 0x0 */
/* #199: @114 = (-@69) */
for (i=0, rr=w114, cs=w69; i<2; ++i) *rr++ = (- *cs++ );
/* #200: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #201: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #202: @117 = 0x1 */
/* #203: @118 = 0x1 */
/* #204: @119 = 0x4 */
/* #205: @120 = 0x1 */
/* #206: @121 = 0x1 */
/* #207: {@122, @123, NULL, NULL, NULL, NULL} = adj1_F(@34, @3, @1, @32, @35, @36, @105, @106, @107, @108, @109, @110, @111, @112, @113, @114, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w34;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w32);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w114;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w122;
res1[1]=(&w123);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #208: {@124, @125} = vertsplit(@122) */
w124 = w122[0];
w125 = w122[1];
/* #209: @75 = (@75+@124) */
w75 += w124;
/* #210: @0 = (2.*@0) */
w0 = (2.* w0 );
/* #211: @124 = input[2][0] */
w124 = arg[2] ? arg[2][0] : 0;
/* #212: @0 = (@0*@124) */
w0 *= w124;
/* #213: @75 = (@75+@0) */
w75 += w0;
/* #214: output[2][0] = @75 */
if (res[2]) res[2][0] = w75;
/* #215: @76 = (@76+@125) */
w76 += w125;
/* #216: @2 = (2.*@2) */
w2 = (2.* w2 );
/* #217: @2 = (@2*@124) */
w2 *= w124;
/* #218: @76 = (@76+@2) */
w76 += w2;
/* #219: output[2][1] = @76 */
if (res[2]) res[2][1] = w76;
/* #220: @77 = (@77+@123) */
w77 += w123;
/* #221: @123 = (2.*@3) */
w123 = (2.* w3 );
/* #222: @123 = (@123*@124) */
w123 *= w124;
/* #223: @77 = (@77+@123) */
w77 += w123;
/* #224: output[2][2] = @77 */
if (res[2]) res[2][2] = w77;
/* #225: @105 = zeros(2x1,0nz) */
/* #226: @106 = zeros(2x2,0nz) */
/* #227: @107 = zeros(2x5,0nz) */
/* #228: @108 = 0x1 */
/* #229: @109 = 0x1 */
/* #230: @110 = 0x4 */
/* #231: @111 = 0x1 */
/* #232: @112 = 0x1 */
/* #233: @122 = (-@73) */
for (i=0, rr=w122, cs=w73; i<2; ++i) *rr++ = (- *cs++ );
/* #234: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #235: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #236: @117 = 0x1 */
/* #237: @118 = 0x1 */
/* #238: @119 = 0x4 */
/* #239: @120 = 0x1 */
/* #240: @121 = 0x1 */
/* #241: {@114, @77, NULL, NULL, NULL, NULL} = adj1_F(@33, @7, @38, @39, @35, @40, @105, @106, @107, @108, @109, @110, @111, @112, @113, @122, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w33;
arg1[1]=(&w7);
arg1[2]=(&w38);
arg1[3]=(&w39);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w122;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w114;
res1[1]=(&w77);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #242: @114 = (@114+@69) */
for (i=0, rr=w114, cs=w69; i<2; ++i) (*rr++) += (*cs++);
/* #243: {@123, @76} = vertsplit(@114) */
w123 = w114[0];
w76 = w114[1];
/* #244: @78 = (@78+@123) */
w78 += w123;
/* #245: @4 = (2.*@4) */
w4 = (2.* w4 );
/* #246: @4 = (@4*@124) */
w4 *= w124;
/* #247: @78 = (@78+@4) */
w78 += w4;
/* #248: output[2][3] = @78 */
if (res[2]) res[2][3] = w78;
/* #249: @6 = (2.*@6) */
w6 = (2.* w6 );
/* #250: @6 = (@6*@124) */
w6 *= w124;
/* #251: @76 = (@76+@6) */
w76 += w6;
/* #252: output[2][4] = @76 */
if (res[2]) res[2][4] = w76;
/* #253: @79 = (@79+@77) */
w79 += w77;
/* #254: @77 = (2.*@7) */
w77 = (2.* w7 );
/* #255: @77 = (@77*@124) */
w77 *= w124;
/* #256: @79 = (@79+@77) */
w79 += w77;
/* #257: output[2][5] = @79 */
if (res[2]) res[2][5] = w79;
/* #258: @105 = zeros(2x1,0nz) */
/* #259: @106 = zeros(2x2,0nz) */
/* #260: @107 = zeros(2x5,0nz) */
/* #261: @108 = 0x1 */
/* #262: @109 = 0x1 */
/* #263: @110 = 0x4 */
/* #264: @111 = 0x1 */
/* #265: @112 = 0x1 */
/* #266: @114 = (-@80) */
for (i=0, rr=w114, cs=w80; i<2; ++i) *rr++ = (- *cs++ );
/* #267: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #268: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #269: @117 = 0x1 */
/* #270: @118 = 0x1 */
/* #271: @119 = 0x4 */
/* #272: @120 = 0x1 */
/* #273: @121 = 0x1 */
/* #274: {@69, @79, NULL, NULL, NULL, NULL} = adj1_F(@37, @10, @42, @43, @35, @44, @105, @106, @107, @108, @109, @110, @111, @112, @113, @114, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w37;
arg1[1]=(&w10);
arg1[2]=(&w42);
arg1[3]=(&w43);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w114;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w69;
res1[1]=(&w79);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #275: @69 = (@69+@73) */
for (i=0, rr=w69, cs=w73; i<2; ++i) (*rr++) += (*cs++);
/* #276: {@77, @76} = vertsplit(@69) */
w77 = w69[0];
w76 = w69[1];
/* #277: @81 = (@81+@77) */
w81 += w77;
/* #278: @5 = (2.*@5) */
w5 = (2.* w5 );
/* #279: @5 = (@5*@124) */
w5 *= w124;
/* #280: @81 = (@81+@5) */
w81 += w5;
/* #281: output[2][6] = @81 */
if (res[2]) res[2][6] = w81;
/* #282: @9 = (2.*@9) */
w9 = (2.* w9 );
/* #283: @9 = (@9*@124) */
w9 *= w124;
/* #284: @76 = (@76+@9) */
w76 += w9;
/* #285: output[2][7] = @76 */
if (res[2]) res[2][7] = w76;
/* #286: @82 = (@82+@79) */
w82 += w79;
/* #287: @79 = (2.*@10) */
w79 = (2.* w10 );
/* #288: @79 = (@79*@124) */
w79 *= w124;
/* #289: @82 = (@82+@79) */
w82 += w79;
/* #290: output[2][8] = @82 */
if (res[2]) res[2][8] = w82;
/* #291: @105 = zeros(2x1,0nz) */
/* #292: @106 = zeros(2x2,0nz) */
/* #293: @107 = zeros(2x5,0nz) */
/* #294: @108 = 0x1 */
/* #295: @109 = 0x1 */
/* #296: @110 = 0x4 */
/* #297: @111 = 0x1 */
/* #298: @112 = 0x1 */
/* #299: @69 = (-@83) */
for (i=0, rr=w69, cs=w83; i<2; ++i) *rr++ = (- *cs++ );
/* #300: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #301: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #302: @117 = 0x1 */
/* #303: @118 = 0x1 */
/* #304: @119 = 0x4 */
/* #305: @120 = 0x1 */
/* #306: @121 = 0x1 */
/* #307: {@73, @82, NULL, NULL, NULL, NULL} = adj1_F(@41, @13, @46, @47, @35, @48, @105, @106, @107, @108, @109, @110, @111, @112, @113, @69, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w41;
arg1[1]=(&w13);
arg1[2]=(&w46);
arg1[3]=(&w47);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w69;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w73;
res1[1]=(&w82);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #308: @73 = (@73+@80) */
for (i=0, rr=w73, cs=w80; i<2; ++i) (*rr++) += (*cs++);
/* #309: {@79, @76} = vertsplit(@73) */
w79 = w73[0];
w76 = w73[1];
/* #310: @84 = (@84+@79) */
w84 += w79;
/* #311: @8 = (2.*@8) */
w8 = (2.* w8 );
/* #312: @8 = (@8*@124) */
w8 *= w124;
/* #313: @84 = (@84+@8) */
w84 += w8;
/* #314: output[2][9] = @84 */
if (res[2]) res[2][9] = w84;
/* #315: @12 = (2.*@12) */
w12 = (2.* w12 );
/* #316: @12 = (@12*@124) */
w12 *= w124;
/* #317: @76 = (@76+@12) */
w76 += w12;
/* #318: output[2][10] = @76 */
if (res[2]) res[2][10] = w76;
/* #319: @85 = (@85+@82) */
w85 += w82;
/* #320: @82 = (2.*@13) */
w82 = (2.* w13 );
/* #321: @82 = (@82*@124) */
w82 *= w124;
/* #322: @85 = (@85+@82) */
w85 += w82;
/* #323: output[2][11] = @85 */
if (res[2]) res[2][11] = w85;
/* #324: @105 = zeros(2x1,0nz) */
/* #325: @106 = zeros(2x2,0nz) */
/* #326: @107 = zeros(2x5,0nz) */
/* #327: @108 = 0x1 */
/* #328: @109 = 0x1 */
/* #329: @110 = 0x4 */
/* #330: @111 = 0x1 */
/* #331: @112 = 0x1 */
/* #332: @73 = (-@86) */
for (i=0, rr=w73, cs=w86; i<2; ++i) *rr++ = (- *cs++ );
/* #333: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #334: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #335: @117 = 0x1 */
/* #336: @118 = 0x1 */
/* #337: @119 = 0x4 */
/* #338: @120 = 0x1 */
/* #339: @121 = 0x1 */
/* #340: {@80, @85, NULL, NULL, NULL, NULL} = adj1_F(@45, @16, @50, @51, @35, @52, @105, @106, @107, @108, @109, @110, @111, @112, @113, @73, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w45;
arg1[1]=(&w16);
arg1[2]=(&w50);
arg1[3]=(&w51);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w73;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w80;
res1[1]=(&w85);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #341: @80 = (@80+@83) */
for (i=0, rr=w80, cs=w83; i<2; ++i) (*rr++) += (*cs++);
/* #342: {@82, @76} = vertsplit(@80) */
w82 = w80[0];
w76 = w80[1];
/* #343: @87 = (@87+@82) */
w87 += w82;
/* #344: @11 = (2.*@11) */
w11 = (2.* w11 );
/* #345: @11 = (@11*@124) */
w11 *= w124;
/* #346: @87 = (@87+@11) */
w87 += w11;
/* #347: output[2][12] = @87 */
if (res[2]) res[2][12] = w87;
/* #348: @15 = (2.*@15) */
w15 = (2.* w15 );
/* #349: @15 = (@15*@124) */
w15 *= w124;
/* #350: @76 = (@76+@15) */
w76 += w15;
/* #351: output[2][13] = @76 */
if (res[2]) res[2][13] = w76;
/* #352: @88 = (@88+@85) */
w88 += w85;
/* #353: @85 = (2.*@16) */
w85 = (2.* w16 );
/* #354: @85 = (@85*@124) */
w85 *= w124;
/* #355: @88 = (@88+@85) */
w88 += w85;
/* #356: output[2][14] = @88 */
if (res[2]) res[2][14] = w88;
/* #357: @105 = zeros(2x1,0nz) */
/* #358: @106 = zeros(2x2,0nz) */
/* #359: @107 = zeros(2x5,0nz) */
/* #360: @108 = 0x1 */
/* #361: @109 = 0x1 */
/* #362: @110 = 0x4 */
/* #363: @111 = 0x1 */
/* #364: @112 = 0x1 */
/* #365: @80 = (-@89) */
for (i=0, rr=w80, cs=w89; i<2; ++i) *rr++ = (- *cs++ );
/* #366: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #367: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #368: @117 = 0x1 */
/* #369: @118 = 0x1 */
/* #370: @119 = 0x4 */
/* #371: @120 = 0x1 */
/* #372: @121 = 0x1 */
/* #373: {@83, @88, NULL, NULL, NULL, NULL} = adj1_F(@49, @19, @54, @55, @35, @56, @105, @106, @107, @108, @109, @110, @111, @112, @113, @80, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w49;
arg1[1]=(&w19);
arg1[2]=(&w54);
arg1[3]=(&w55);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w80;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w83;
res1[1]=(&w88);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #374: @83 = (@83+@86) */
for (i=0, rr=w83, cs=w86; i<2; ++i) (*rr++) += (*cs++);
/* #375: {@85, @76} = vertsplit(@83) */
w85 = w83[0];
w76 = w83[1];
/* #376: @90 = (@90+@85) */
w90 += w85;
/* #377: @14 = (2.*@14) */
w14 = (2.* w14 );
/* #378: @14 = (@14*@124) */
w14 *= w124;
/* #379: @90 = (@90+@14) */
w90 += w14;
/* #380: output[2][15] = @90 */
if (res[2]) res[2][15] = w90;
/* #381: @18 = (2.*@18) */
w18 = (2.* w18 );
/* #382: @18 = (@18*@124) */
w18 *= w124;
/* #383: @76 = (@76+@18) */
w76 += w18;
/* #384: output[2][16] = @76 */
if (res[2]) res[2][16] = w76;
/* #385: @91 = (@91+@88) */
w91 += w88;
/* #386: @88 = (2.*@19) */
w88 = (2.* w19 );
/* #387: @88 = (@88*@124) */
w88 *= w124;
/* #388: @91 = (@91+@88) */
w91 += w88;
/* #389: output[2][17] = @91 */
if (res[2]) res[2][17] = w91;
/* #390: @105 = zeros(2x1,0nz) */
/* #391: @106 = zeros(2x2,0nz) */
/* #392: @107 = zeros(2x5,0nz) */
/* #393: @108 = 0x1 */
/* #394: @109 = 0x1 */
/* #395: @110 = 0x4 */
/* #396: @111 = 0x1 */
/* #397: @112 = 0x1 */
/* #398: @83 = (-@92) */
for (i=0, rr=w83, cs=w92; i<2; ++i) *rr++ = (- *cs++ );
/* #399: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #400: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #401: @117 = 0x1 */
/* #402: @118 = 0x1 */
/* #403: @119 = 0x4 */
/* #404: @120 = 0x1 */
/* #405: @121 = 0x1 */
/* #406: {@86, @91, NULL, NULL, NULL, NULL} = adj1_F(@53, @22, @58, @59, @35, @60, @105, @106, @107, @108, @109, @110, @111, @112, @113, @83, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w53;
arg1[1]=(&w22);
arg1[2]=(&w58);
arg1[3]=(&w59);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w83;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w86;
res1[1]=(&w91);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #407: @86 = (@86+@89) */
for (i=0, rr=w86, cs=w89; i<2; ++i) (*rr++) += (*cs++);
/* #408: {@88, @76} = vertsplit(@86) */
w88 = w86[0];
w76 = w86[1];
/* #409: @93 = (@93+@88) */
w93 += w88;
/* #410: @17 = (2.*@17) */
w17 = (2.* w17 );
/* #411: @17 = (@17*@124) */
w17 *= w124;
/* #412: @93 = (@93+@17) */
w93 += w17;
/* #413: output[2][18] = @93 */
if (res[2]) res[2][18] = w93;
/* #414: @21 = (2.*@21) */
w21 = (2.* w21 );
/* #415: @21 = (@21*@124) */
w21 *= w124;
/* #416: @76 = (@76+@21) */
w76 += w21;
/* #417: output[2][19] = @76 */
if (res[2]) res[2][19] = w76;
/* #418: @94 = (@94+@91) */
w94 += w91;
/* #419: @91 = (2.*@22) */
w91 = (2.* w22 );
/* #420: @91 = (@91*@124) */
w91 *= w124;
/* #421: @94 = (@94+@91) */
w94 += w91;
/* #422: output[2][20] = @94 */
if (res[2]) res[2][20] = w94;
/* #423: @105 = zeros(2x1,0nz) */
/* #424: @106 = zeros(2x2,0nz) */
/* #425: @107 = zeros(2x5,0nz) */
/* #426: @108 = 0x1 */
/* #427: @109 = 0x1 */
/* #428: @110 = 0x4 */
/* #429: @111 = 0x1 */
/* #430: @112 = 0x1 */
/* #431: @86 = (-@95) */
for (i=0, rr=w86, cs=w95; i<2; ++i) *rr++ = (- *cs++ );
/* #432: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #433: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #434: @117 = 0x1 */
/* #435: @118 = 0x1 */
/* #436: @119 = 0x4 */
/* #437: @120 = 0x1 */
/* #438: @121 = 0x1 */
/* #439: {@89, @94, NULL, NULL, NULL, NULL} = adj1_F(@57, @25, @62, @63, @35, @64, @105, @106, @107, @108, @109, @110, @111, @112, @113, @86, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w57;
arg1[1]=(&w25);
arg1[2]=(&w62);
arg1[3]=(&w63);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w86;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w89;
res1[1]=(&w94);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #440: @89 = (@89+@92) */
for (i=0, rr=w89, cs=w92; i<2; ++i) (*rr++) += (*cs++);
/* #441: {@91, @76} = vertsplit(@89) */
w91 = w89[0];
w76 = w89[1];
/* #442: @96 = (@96+@91) */
w96 += w91;
/* #443: @20 = (2.*@20) */
w20 = (2.* w20 );
/* #444: @20 = (@20*@124) */
w20 *= w124;
/* #445: @96 = (@96+@20) */
w96 += w20;
/* #446: output[2][21] = @96 */
if (res[2]) res[2][21] = w96;
/* #447: @24 = (2.*@24) */
w24 = (2.* w24 );
/* #448: @24 = (@24*@124) */
w24 *= w124;
/* #449: @76 = (@76+@24) */
w76 += w24;
/* #450: output[2][22] = @76 */
if (res[2]) res[2][22] = w76;
/* #451: @97 = (@97+@94) */
w97 += w94;
/* #452: @94 = (2.*@25) */
w94 = (2.* w25 );
/* #453: @94 = (@94*@124) */
w94 *= w124;
/* #454: @97 = (@97+@94) */
w97 += w94;
/* #455: output[2][23] = @97 */
if (res[2]) res[2][23] = w97;
/* #456: @105 = zeros(2x1,0nz) */
/* #457: @106 = zeros(2x2,0nz) */
/* #458: @107 = zeros(2x5,0nz) */
/* #459: @108 = 0x1 */
/* #460: @109 = 0x1 */
/* #461: @110 = 0x4 */
/* #462: @111 = 0x1 */
/* #463: @112 = 0x1 */
/* #464: @89 = (-@98) */
for (i=0, rr=w89, cs=w98; i<2; ++i) *rr++ = (- *cs++ );
/* #465: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #466: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #467: @117 = 0x1 */
/* #468: @118 = 0x1 */
/* #469: @119 = 0x4 */
/* #470: @120 = 0x1 */
/* #471: @121 = 0x1 */
/* #472: {@92, @97, NULL, NULL, NULL, NULL} = adj1_F(@61, @28, @66, @67, @35, @68, @105, @106, @107, @108, @109, @110, @111, @112, @113, @89, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w61;
arg1[1]=(&w28);
arg1[2]=(&w66);
arg1[3]=(&w67);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w89;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w92;
res1[1]=(&w97);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #473: @92 = (@92+@95) */
for (i=0, rr=w92, cs=w95; i<2; ++i) (*rr++) += (*cs++);
/* #474: {@94, @76} = vertsplit(@92) */
w94 = w92[0];
w76 = w92[1];
/* #475: @99 = (@99+@94) */
w99 += w94;
/* #476: @23 = (2.*@23) */
w23 = (2.* w23 );
/* #477: @23 = (@23*@124) */
w23 *= w124;
/* #478: @99 = (@99+@23) */
w99 += w23;
/* #479: output[2][24] = @99 */
if (res[2]) res[2][24] = w99;
/* #480: @27 = (2.*@27) */
w27 = (2.* w27 );
/* #481: @27 = (@27*@124) */
w27 *= w124;
/* #482: @76 = (@76+@27) */
w76 += w27;
/* #483: output[2][25] = @76 */
if (res[2]) res[2][25] = w76;
/* #484: @100 = (@100+@97) */
w100 += w97;
/* #485: @97 = (2.*@28) */
w97 = (2.* w28 );
/* #486: @97 = (@97*@124) */
w97 *= w124;
/* #487: @100 = (@100+@97) */
w100 += w97;
/* #488: output[2][26] = @100 */
if (res[2]) res[2][26] = w100;
/* #489: @105 = zeros(2x1,0nz) */
/* #490: @106 = zeros(2x2,0nz) */
/* #491: @107 = zeros(2x5,0nz) */
/* #492: @108 = 0x1 */
/* #493: @109 = 0x1 */
/* #494: @110 = 0x4 */
/* #495: @111 = 0x1 */
/* #496: @112 = 0x1 */
/* #497: @92 = (-@101) */
for (i=0, rr=w92, cs=w101; i<2; ++i) *rr++ = (- *cs++ );
/* #498: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #499: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #500: @117 = 0x1 */
/* #501: @118 = 0x1 */
/* #502: @119 = 0x4 */
/* #503: @120 = 0x1 */
/* #504: @121 = 0x1 */
/* #505: {@95, @100, NULL, NULL, NULL, NULL} = adj1_F(@65, @31, @70, @71, @35, @72, @105, @106, @107, @108, @109, @110, @111, @112, @113, @92, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w65;
arg1[1]=(&w31);
arg1[2]=(&w70);
arg1[3]=(&w71);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w92;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=w95;
res1[1]=(&w100);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #506: @95 = (@95+@98) */
for (i=0, rr=w95, cs=w98; i<2; ++i) (*rr++) += (*cs++);
/* #507: {@97, @76} = vertsplit(@95) */
w97 = w95[0];
w76 = w95[1];
/* #508: @102 = (@102+@97) */
w102 += w97;
/* #509: @26 = (2.*@26) */
w26 = (2.* w26 );
/* #510: @26 = (@26*@124) */
w26 *= w124;
/* #511: @102 = (@102+@26) */
w102 += w26;
/* #512: output[2][27] = @102 */
if (res[2]) res[2][27] = w102;
/* #513: @30 = (2.*@30) */
w30 = (2.* w30 );
/* #514: @30 = (@30*@124) */
w30 *= w124;
/* #515: @76 = (@76+@30) */
w76 += w30;
/* #516: output[2][28] = @76 */
if (res[2]) res[2][28] = w76;
/* #517: @103 = (@103+@100) */
w103 += w100;
/* #518: @100 = (2.*@31) */
w100 = (2.* w31 );
/* #519: @100 = (@100*@124) */
w100 *= w124;
/* #520: @103 = (@103+@100) */
w103 += w100;
/* #521: output[2][29] = @103 */
if (res[2]) res[2][29] = w103;
/* #522: {@103, @100} = vertsplit(@101) */
w103 = w101[0];
w100 = w101[1];
/* #523: @104 = (@104+@103) */
w104 += w103;
/* #524: @29 = (2.*@29) */
w29 = (2.* w29 );
/* #525: @29 = (@29*@124) */
w29 *= w124;
/* #526: @104 = (@104+@29) */
w104 += w29;
/* #527: output[2][30] = @104 */
if (res[2]) res[2][30] = w104;
/* #528: output[2][31] = @100 */
if (res[2]) res[2][31] = w100;
/* #529: @105 = zeros(2x1,0nz) */
/* #530: @106 = zeros(2x2,0nz) */
/* #531: @107 = zeros(2x5,0nz) */
/* #532: @108 = 0x1 */
/* #533: @109 = 0x1 */
/* #534: @110 = 0x4 */
/* #535: @111 = 0x1 */
/* #536: @112 = 0x1 */
/* #537: {@101, NULL, NULL, NULL, @95, NULL, NULL, @98, NULL, NULL, @92, NULL, NULL, @89, NULL, NULL, @86, NULL, NULL, @83, NULL, NULL, @80, NULL, NULL, @73, NULL, NULL, @69, NULL, NULL, NULL} = vertsplit(@74) */
casadi_copy(w74, 2, w101);
casadi_copy(w74+5, 2, w95);
casadi_copy(w74+9, 2, w98);
casadi_copy(w74+13, 2, w92);
casadi_copy(w74+17, 2, w89);
casadi_copy(w74+21, 2, w86);
casadi_copy(w74+25, 2, w83);
casadi_copy(w74+29, 2, w80);
casadi_copy(w74+33, 2, w73);
casadi_copy(w74+37, 2, w69);
/* #538: @69 = (-@69) */
for (i=0, rr=w69, cs=w69; i<2; ++i) *rr++ = (- *cs++ );
/* #539: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #540: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #541: @117 = 0x1 */
/* #542: @118 = 0x1 */
/* #543: @119 = 0x4 */
/* #544: @120 = 0x1 */
/* #545: @121 = 0x1 */
/* #546: {NULL, NULL, NULL, NULL, @100, NULL} = adj1_F(@65, @31, @70, @71, @35, @72, @105, @106, @107, @108, @109, @110, @111, @112, @113, @69, @115, @116, @117, @118, @119, @120, @121, @113) */
arg1[0]=w65;
arg1[1]=(&w31);
arg1[2]=(&w70);
arg1[3]=(&w71);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w69;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w100);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #547: @72 = zeros(2x1,0nz) */
/* #548: @105 = zeros(2x2,0nz) */
/* #549: @106 = zeros(2x5,0nz) */
/* #550: @107 = 0x1 */
/* #551: @108 = 0x1 */
/* #552: @109 = 0x4 */
/* #553: @110 = 0x1 */
/* #554: @111 = 0x1 */
/* #555: @73 = (-@73) */
for (i=0, rr=w73, cs=w73; i<2; ++i) *rr++ = (- *cs++ );
/* #556: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #557: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #558: @112 = 0x1 */
/* #559: @117 = 0x1 */
/* #560: @118 = 0x4 */
/* #561: @119 = 0x1 */
/* #562: @120 = 0x1 */
/* #563: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@61, @28, @66, @67, @35, @68, @72, @105, @106, @107, @108, @109, @110, @111, @113, @73, @115, @116, @112, @117, @118, @119, @120, @113) */
arg1[0]=w61;
arg1[1]=(&w28);
arg1[2]=(&w66);
arg1[3]=(&w67);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w73;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #564: @100 = (@100+@31) */
w100 += w31;
/* #565: @68 = zeros(2x1,0nz) */
/* #566: @72 = zeros(2x2,0nz) */
/* #567: @105 = zeros(2x5,0nz) */
/* #568: @106 = 0x1 */
/* #569: @107 = 0x1 */
/* #570: @108 = 0x4 */
/* #571: @109 = 0x1 */
/* #572: @110 = 0x1 */
/* #573: @80 = (-@80) */
for (i=0, rr=w80, cs=w80; i<2; ++i) *rr++ = (- *cs++ );
/* #574: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #575: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #576: @111 = 0x1 */
/* #577: @112 = 0x1 */
/* #578: @117 = 0x4 */
/* #579: @118 = 0x1 */
/* #580: @119 = 0x1 */
/* #581: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@57, @25, @62, @63, @35, @64, @68, @72, @105, @106, @107, @108, @109, @110, @113, @80, @115, @116, @111, @112, @117, @118, @119, @113) */
arg1[0]=w57;
arg1[1]=(&w25);
arg1[2]=(&w62);
arg1[3]=(&w63);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w80;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #582: @100 = (@100+@31) */
w100 += w31;
/* #583: @64 = zeros(2x1,0nz) */
/* #584: @68 = zeros(2x2,0nz) */
/* #585: @72 = zeros(2x5,0nz) */
/* #586: @105 = 0x1 */
/* #587: @106 = 0x1 */
/* #588: @107 = 0x4 */
/* #589: @108 = 0x1 */
/* #590: @109 = 0x1 */
/* #591: @83 = (-@83) */
for (i=0, rr=w83, cs=w83; i<2; ++i) *rr++ = (- *cs++ );
/* #592: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #593: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #594: @110 = 0x1 */
/* #595: @111 = 0x1 */
/* #596: @112 = 0x4 */
/* #597: @117 = 0x1 */
/* #598: @118 = 0x1 */
/* #599: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@53, @22, @58, @59, @35, @60, @64, @68, @72, @105, @106, @107, @108, @109, @113, @83, @115, @116, @110, @111, @112, @117, @118, @113) */
arg1[0]=w53;
arg1[1]=(&w22);
arg1[2]=(&w58);
arg1[3]=(&w59);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w83;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #600: @100 = (@100+@31) */
w100 += w31;
/* #601: @60 = zeros(2x1,0nz) */
/* #602: @64 = zeros(2x2,0nz) */
/* #603: @68 = zeros(2x5,0nz) */
/* #604: @72 = 0x1 */
/* #605: @105 = 0x1 */
/* #606: @106 = 0x4 */
/* #607: @107 = 0x1 */
/* #608: @108 = 0x1 */
/* #609: @86 = (-@86) */
for (i=0, rr=w86, cs=w86; i<2; ++i) *rr++ = (- *cs++ );
/* #610: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #611: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #612: @109 = 0x1 */
/* #613: @110 = 0x1 */
/* #614: @111 = 0x4 */
/* #615: @112 = 0x1 */
/* #616: @117 = 0x1 */
/* #617: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@49, @19, @54, @55, @35, @56, @60, @64, @68, @72, @105, @106, @107, @108, @113, @86, @115, @116, @109, @110, @111, @112, @117, @113) */
arg1[0]=w49;
arg1[1]=(&w19);
arg1[2]=(&w54);
arg1[3]=(&w55);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w86;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #618: @100 = (@100+@31) */
w100 += w31;
/* #619: @56 = zeros(2x1,0nz) */
/* #620: @60 = zeros(2x2,0nz) */
/* #621: @64 = zeros(2x5,0nz) */
/* #622: @68 = 0x1 */
/* #623: @72 = 0x1 */
/* #624: @105 = 0x4 */
/* #625: @106 = 0x1 */
/* #626: @107 = 0x1 */
/* #627: @89 = (-@89) */
for (i=0, rr=w89, cs=w89; i<2; ++i) *rr++ = (- *cs++ );
/* #628: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #629: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #630: @108 = 0x1 */
/* #631: @109 = 0x1 */
/* #632: @110 = 0x4 */
/* #633: @111 = 0x1 */
/* #634: @112 = 0x1 */
/* #635: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@45, @16, @50, @51, @35, @52, @56, @60, @64, @68, @72, @105, @106, @107, @113, @89, @115, @116, @108, @109, @110, @111, @112, @113) */
arg1[0]=w45;
arg1[1]=(&w16);
arg1[2]=(&w50);
arg1[3]=(&w51);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w89;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #636: @100 = (@100+@31) */
w100 += w31;
/* #637: @52 = zeros(2x1,0nz) */
/* #638: @56 = zeros(2x2,0nz) */
/* #639: @60 = zeros(2x5,0nz) */
/* #640: @64 = 0x1 */
/* #641: @68 = 0x1 */
/* #642: @72 = 0x4 */
/* #643: @105 = 0x1 */
/* #644: @106 = 0x1 */
/* #645: @92 = (-@92) */
for (i=0, rr=w92, cs=w92; i<2; ++i) *rr++ = (- *cs++ );
/* #646: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #647: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #648: @107 = 0x1 */
/* #649: @108 = 0x1 */
/* #650: @109 = 0x4 */
/* #651: @110 = 0x1 */
/* #652: @111 = 0x1 */
/* #653: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@41, @13, @46, @47, @35, @48, @52, @56, @60, @64, @68, @72, @105, @106, @113, @92, @115, @116, @107, @108, @109, @110, @111, @113) */
arg1[0]=w41;
arg1[1]=(&w13);
arg1[2]=(&w46);
arg1[3]=(&w47);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w92;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #654: @100 = (@100+@31) */
w100 += w31;
/* #655: @48 = zeros(2x1,0nz) */
/* #656: @52 = zeros(2x2,0nz) */
/* #657: @56 = zeros(2x5,0nz) */
/* #658: @60 = 0x1 */
/* #659: @64 = 0x1 */
/* #660: @68 = 0x4 */
/* #661: @72 = 0x1 */
/* #662: @105 = 0x1 */
/* #663: @98 = (-@98) */
for (i=0, rr=w98, cs=w98; i<2; ++i) *rr++ = (- *cs++ );
/* #664: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #665: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #666: @106 = 0x1 */
/* #667: @107 = 0x1 */
/* #668: @108 = 0x4 */
/* #669: @109 = 0x1 */
/* #670: @110 = 0x1 */
/* #671: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@37, @10, @42, @43, @35, @44, @48, @52, @56, @60, @64, @68, @72, @105, @113, @98, @115, @116, @106, @107, @108, @109, @110, @113) */
arg1[0]=w37;
arg1[1]=(&w10);
arg1[2]=(&w42);
arg1[3]=(&w43);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w98;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #672: @100 = (@100+@31) */
w100 += w31;
/* #673: @44 = zeros(2x1,0nz) */
/* #674: @48 = zeros(2x2,0nz) */
/* #675: @52 = zeros(2x5,0nz) */
/* #676: @56 = 0x1 */
/* #677: @60 = 0x1 */
/* #678: @64 = 0x4 */
/* #679: @68 = 0x1 */
/* #680: @72 = 0x1 */
/* #681: @95 = (-@95) */
for (i=0, rr=w95, cs=w95; i<2; ++i) *rr++ = (- *cs++ );
/* #682: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #683: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #684: @105 = 0x1 */
/* #685: @106 = 0x1 */
/* #686: @107 = 0x4 */
/* #687: @108 = 0x1 */
/* #688: @109 = 0x1 */
/* #689: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@33, @7, @38, @39, @35, @40, @44, @48, @52, @56, @60, @64, @68, @72, @113, @95, @115, @116, @105, @106, @107, @108, @109, @113) */
arg1[0]=w33;
arg1[1]=(&w7);
arg1[2]=(&w38);
arg1[3]=(&w39);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w95;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #690: @100 = (@100+@31) */
w100 += w31;
/* #691: @40 = zeros(2x1,0nz) */
/* #692: @44 = zeros(2x2,0nz) */
/* #693: @48 = zeros(2x5,0nz) */
/* #694: @52 = 0x1 */
/* #695: @56 = 0x1 */
/* #696: @60 = 0x4 */
/* #697: @64 = 0x1 */
/* #698: @68 = 0x1 */
/* #699: @101 = (-@101) */
for (i=0, rr=w101, cs=w101; i<2; ++i) *rr++ = (- *cs++ );
/* #700: @115 = zeros(2x2) */
casadi_clear(w115, 4);
/* #701: @116 = zeros(2x5) */
casadi_clear(w116, 10);
/* #702: @72 = 0x1 */
/* #703: @105 = 0x1 */
/* #704: @106 = 0x4 */
/* #705: @107 = 0x1 */
/* #706: @108 = 0x1 */
/* #707: {NULL, NULL, NULL, NULL, @31, NULL} = adj1_F(@34, @3, @1, @32, @35, @36, @40, @44, @48, @52, @56, @60, @64, @68, @113, @101, @115, @116, @72, @105, @106, @107, @108, @113) */
arg1[0]=w34;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w32);
arg1[4]=(&w35);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w101;
arg1[16]=w115;
arg1[17]=w116;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
res1[0]=0;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=(&w31);
res1[5]=0;
if (casadi_f6(arg1, res1, iw, w, 0)) return 1;
/* #708: @100 = (@100+@31) */
w100 += w31;
/* #709: output[3][0] = @100 */
if (res[3]) res[3][0] = w100;
return 0;
}
/* nlp_f:(x[32],p)->(f) */
static int casadi_f9(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real w0, w1, w2;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: @0 = sq(@0) */
w0 = casadi_sq( w0 );
/* #2: @1 = input[0][1] */
w1 = arg[0] ? arg[0][1] : 0;
/* #3: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #4: @0 = (@0+@1) */
w0 += w1;
/* #5: @1 = input[0][2] */
w1 = arg[0] ? arg[0][2] : 0;
/* #6: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #7: @0 = (@0+@1) */
w0 += w1;
/* #8: @1 = input[0][3] */
w1 = arg[0] ? arg[0][3] : 0;
/* #9: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #10: @2 = input[0][4] */
w2 = arg[0] ? arg[0][4] : 0;
/* #11: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #12: @1 = (@1+@2) */
w1 += w2;
/* #13: @2 = input[0][5] */
w2 = arg[0] ? arg[0][5] : 0;
/* #14: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #15: @1 = (@1+@2) */
w1 += w2;
/* #16: @0 = (@0+@1) */
w0 += w1;
/* #17: @1 = input[0][6] */
w1 = arg[0] ? arg[0][6] : 0;
/* #18: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #19: @2 = input[0][7] */
w2 = arg[0] ? arg[0][7] : 0;
/* #20: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #21: @1 = (@1+@2) */
w1 += w2;
/* #22: @2 = input[0][8] */
w2 = arg[0] ? arg[0][8] : 0;
/* #23: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #24: @1 = (@1+@2) */
w1 += w2;
/* #25: @0 = (@0+@1) */
w0 += w1;
/* #26: @1 = input[0][9] */
w1 = arg[0] ? arg[0][9] : 0;
/* #27: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #28: @2 = input[0][10] */
w2 = arg[0] ? arg[0][10] : 0;
/* #29: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #30: @1 = (@1+@2) */
w1 += w2;
/* #31: @2 = input[0][11] */
w2 = arg[0] ? arg[0][11] : 0;
/* #32: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #33: @1 = (@1+@2) */
w1 += w2;
/* #34: @0 = (@0+@1) */
w0 += w1;
/* #35: @1 = input[0][12] */
w1 = arg[0] ? arg[0][12] : 0;
/* #36: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #37: @2 = input[0][13] */
w2 = arg[0] ? arg[0][13] : 0;
/* #38: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #39: @1 = (@1+@2) */
w1 += w2;
/* #40: @2 = input[0][14] */
w2 = arg[0] ? arg[0][14] : 0;
/* #41: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #42: @1 = (@1+@2) */
w1 += w2;
/* #43: @0 = (@0+@1) */
w0 += w1;
/* #44: @1 = input[0][15] */
w1 = arg[0] ? arg[0][15] : 0;
/* #45: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #46: @2 = input[0][16] */
w2 = arg[0] ? arg[0][16] : 0;
/* #47: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #48: @1 = (@1+@2) */
w1 += w2;
/* #49: @2 = input[0][17] */
w2 = arg[0] ? arg[0][17] : 0;
/* #50: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #51: @1 = (@1+@2) */
w1 += w2;
/* #52: @0 = (@0+@1) */
w0 += w1;
/* #53: @1 = input[0][18] */
w1 = arg[0] ? arg[0][18] : 0;
/* #54: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #55: @2 = input[0][19] */
w2 = arg[0] ? arg[0][19] : 0;
/* #56: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #57: @1 = (@1+@2) */
w1 += w2;
/* #58: @2 = input[0][20] */
w2 = arg[0] ? arg[0][20] : 0;
/* #59: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #60: @1 = (@1+@2) */
w1 += w2;
/* #61: @0 = (@0+@1) */
w0 += w1;
/* #62: @1 = input[0][21] */
w1 = arg[0] ? arg[0][21] : 0;
/* #63: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #64: @2 = input[0][22] */
w2 = arg[0] ? arg[0][22] : 0;
/* #65: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #66: @1 = (@1+@2) */
w1 += w2;
/* #67: @2 = input[0][23] */
w2 = arg[0] ? arg[0][23] : 0;
/* #68: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #69: @1 = (@1+@2) */
w1 += w2;
/* #70: @0 = (@0+@1) */
w0 += w1;
/* #71: @1 = input[0][24] */
w1 = arg[0] ? arg[0][24] : 0;
/* #72: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #73: @2 = input[0][25] */
w2 = arg[0] ? arg[0][25] : 0;
/* #74: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #75: @1 = (@1+@2) */
w1 += w2;
/* #76: @2 = input[0][26] */
w2 = arg[0] ? arg[0][26] : 0;
/* #77: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #78: @1 = (@1+@2) */
w1 += w2;
/* #79: @0 = (@0+@1) */
w0 += w1;
/* #80: @1 = input[0][27] */
w1 = arg[0] ? arg[0][27] : 0;
/* #81: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #82: @2 = input[0][28] */
w2 = arg[0] ? arg[0][28] : 0;
/* #83: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #84: @1 = (@1+@2) */
w1 += w2;
/* #85: @2 = input[0][29] */
w2 = arg[0] ? arg[0][29] : 0;
/* #86: @2 = sq(@2) */
w2 = casadi_sq( w2 );
/* #87: @1 = (@1+@2) */
w1 += w2;
/* #88: @0 = (@0+@1) */
w0 += w1;
/* #89: @1 = input[0][30] */
w1 = arg[0] ? arg[0][30] : 0;
/* #90: @1 = sq(@1) */
w1 = casadi_sq( w1 );
/* #91: @0 = (@0+@1) */
w0 += w1;
/* #92: output[0][0] = @0 */
if (res[0]) res[0][0] = w0;
return 0;
}
/* nlp_grad_f:(x[32],p)->(grad_f_x[32]) */
static int casadi_f10(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *rr;
casadi_real w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, w17, w18, w19, w20, w21, w22, w23, w24, w25, w26, w27, w28, w29, w30, *w32=w+31, *w33=w+62;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: @0 = (2.*@0) */
w0 = (2.* w0 );
/* #2: @1 = input[0][1] */
w1 = arg[0] ? arg[0][1] : 0;
/* #3: @1 = (2.*@1) */
w1 = (2.* w1 );
/* #4: @2 = input[0][2] */
w2 = arg[0] ? arg[0][2] : 0;
/* #5: @2 = (2.*@2) */
w2 = (2.* w2 );
/* #6: @3 = input[0][3] */
w3 = arg[0] ? arg[0][3] : 0;
/* #7: @3 = (2.*@3) */
w3 = (2.* w3 );
/* #8: @4 = input[0][4] */
w4 = arg[0] ? arg[0][4] : 0;
/* #9: @4 = (2.*@4) */
w4 = (2.* w4 );
/* #10: @5 = input[0][5] */
w5 = arg[0] ? arg[0][5] : 0;
/* #11: @5 = (2.*@5) */
w5 = (2.* w5 );
/* #12: @6 = input[0][6] */
w6 = arg[0] ? arg[0][6] : 0;
/* #13: @6 = (2.*@6) */
w6 = (2.* w6 );
/* #14: @7 = input[0][7] */
w7 = arg[0] ? arg[0][7] : 0;
/* #15: @7 = (2.*@7) */
w7 = (2.* w7 );
/* #16: @8 = input[0][8] */
w8 = arg[0] ? arg[0][8] : 0;
/* #17: @8 = (2.*@8) */
w8 = (2.* w8 );
/* #18: @9 = input[0][9] */
w9 = arg[0] ? arg[0][9] : 0;
/* #19: @9 = (2.*@9) */
w9 = (2.* w9 );
/* #20: @10 = input[0][10] */
w10 = arg[0] ? arg[0][10] : 0;
/* #21: @10 = (2.*@10) */
w10 = (2.* w10 );
/* #22: @11 = input[0][11] */
w11 = arg[0] ? arg[0][11] : 0;
/* #23: @11 = (2.*@11) */
w11 = (2.* w11 );
/* #24: @12 = input[0][12] */
w12 = arg[0] ? arg[0][12] : 0;
/* #25: @12 = (2.*@12) */
w12 = (2.* w12 );
/* #26: @13 = input[0][13] */
w13 = arg[0] ? arg[0][13] : 0;
/* #27: @13 = (2.*@13) */
w13 = (2.* w13 );
/* #28: @14 = input[0][14] */
w14 = arg[0] ? arg[0][14] : 0;
/* #29: @14 = (2.*@14) */
w14 = (2.* w14 );
/* #30: @15 = input[0][15] */
w15 = arg[0] ? arg[0][15] : 0;
/* #31: @15 = (2.*@15) */
w15 = (2.* w15 );
/* #32: @16 = input[0][16] */
w16 = arg[0] ? arg[0][16] : 0;
/* #33: @16 = (2.*@16) */
w16 = (2.* w16 );
/* #34: @17 = input[0][17] */
w17 = arg[0] ? arg[0][17] : 0;
/* #35: @17 = (2.*@17) */
w17 = (2.* w17 );
/* #36: @18 = input[0][18] */
w18 = arg[0] ? arg[0][18] : 0;
/* #37: @18 = (2.*@18) */
w18 = (2.* w18 );
/* #38: @19 = input[0][19] */
w19 = arg[0] ? arg[0][19] : 0;
/* #39: @19 = (2.*@19) */
w19 = (2.* w19 );
/* #40: @20 = input[0][20] */
w20 = arg[0] ? arg[0][20] : 0;
/* #41: @20 = (2.*@20) */
w20 = (2.* w20 );
/* #42: @21 = input[0][21] */
w21 = arg[0] ? arg[0][21] : 0;
/* #43: @21 = (2.*@21) */
w21 = (2.* w21 );
/* #44: @22 = input[0][22] */
w22 = arg[0] ? arg[0][22] : 0;
/* #45: @22 = (2.*@22) */
w22 = (2.* w22 );
/* #46: @23 = input[0][23] */
w23 = arg[0] ? arg[0][23] : 0;
/* #47: @23 = (2.*@23) */
w23 = (2.* w23 );
/* #48: @24 = input[0][24] */
w24 = arg[0] ? arg[0][24] : 0;
/* #49: @24 = (2.*@24) */
w24 = (2.* w24 );
/* #50: @25 = input[0][25] */
w25 = arg[0] ? arg[0][25] : 0;
/* #51: @25 = (2.*@25) */
w25 = (2.* w25 );
/* #52: @26 = input[0][26] */
w26 = arg[0] ? arg[0][26] : 0;
/* #53: @26 = (2.*@26) */
w26 = (2.* w26 );
/* #54: @27 = input[0][27] */
w27 = arg[0] ? arg[0][27] : 0;
/* #55: @27 = (2.*@27) */
w27 = (2.* w27 );
/* #56: @28 = input[0][28] */
w28 = arg[0] ? arg[0][28] : 0;
/* #57: @28 = (2.*@28) */
w28 = (2.* w28 );
/* #58: @29 = input[0][29] */
w29 = arg[0] ? arg[0][29] : 0;
/* #59: @29 = (2.*@29) */
w29 = (2.* w29 );
/* #60: @30 = input[0][30] */
w30 = arg[0] ? arg[0][30] : 0;
/* #61: @30 = (2.*@30) */
w30 = (2.* w30 );
/* #62: @31 = 00 */
/* #63: @32 = vertcat(@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, @20, @21, @22, @23, @24, @25, @26, @27, @28, @29, @30, @31) */
rr=w32;
*rr++ = w0;
*rr++ = w1;
*rr++ = w2;
*rr++ = w3;
*rr++ = w4;
*rr++ = w5;
*rr++ = w6;
*rr++ = w7;
*rr++ = w8;
*rr++ = w9;
*rr++ = w10;
*rr++ = w11;
*rr++ = w12;
*rr++ = w13;
*rr++ = w14;
*rr++ = w15;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
*rr++ = w19;
*rr++ = w20;
*rr++ = w21;
*rr++ = w22;
*rr++ = w23;
*rr++ = w24;
*rr++ = w25;
*rr++ = w26;
*rr++ = w27;
*rr++ = w28;
*rr++ = w29;
*rr++ = w30;
/* #64: @33 = dense(@32) */
casadi_densify(w32, casadi_s0, w33, 0);
/* #65: output[0][0] = @33 */
casadi_copy(w33, 32, res[0]);
return 0;
}
/* nlp_g:(x[32],p)->(g[42]) */
static int casadi_f11(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+1, *rr;
const casadi_real **arg1=arg+2, *cr, *cs;
casadi_real w0, w1, *w2=w+42, w3, *w4=w+45, w5, w6, w7, w8, *w10=w+51;
/* #0: @0 = input[0][3] */
w0 = arg[0] ? arg[0][3] : 0;
/* #1: @1 = input[0][4] */
w1 = arg[0] ? arg[0][4] : 0;
/* #2: @2 = vertcat(@0, @1) */
rr=w2;
*rr++ = w0;
*rr++ = w1;
/* #3: @1 = input[0][0] */
w1 = arg[0] ? arg[0][0] : 0;
/* #4: @3 = input[0][1] */
w3 = arg[0] ? arg[0][1] : 0;
/* #5: @4 = vertcat(@1, @3) */
rr=w4;
*rr++ = w1;
*rr++ = w3;
/* #6: @5 = input[0][2] */
w5 = arg[0] ? arg[0][2] : 0;
/* #7: @6 = 1 */
w6 = 1.;
/* #8: @7 = 0 */
w7 = 0.;
/* #9: @8 = input[1][0] */
w8 = arg[1] ? arg[1][0] : 0;
/* #10: @9 = 0x1 */
/* #11: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @6, @7, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w6);
arg1[3]=(&w7);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #12: @10 = (@2-@10) */
for (i=0, rr=w10, cr=w2, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #13: output[0][0] = @10 */
casadi_copy(w10, 2, res[0]);
/* #14: output[0][1] = @1 */
if (res[0]) res[0][2] = w1;
/* #15: output[0][2] = @3 */
if (res[0]) res[0][3] = w3;
/* #16: output[0][3] = @5 */
if (res[0]) res[0][4] = w5;
/* #17: @5 = input[0][6] */
w5 = arg[0] ? arg[0][6] : 0;
/* #18: @3 = input[0][7] */
w3 = arg[0] ? arg[0][7] : 0;
/* #19: @10 = vertcat(@5, @3) */
rr=w10;
*rr++ = w5;
*rr++ = w3;
/* #20: @3 = input[0][5] */
w3 = arg[0] ? arg[0][5] : 0;
/* #21: @1 = 1 */
w1 = 1.;
/* #22: @6 = 1 */
w6 = 1.;
/* #23: @9 = 0x1 */
/* #24: {@4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@2, @3, @1, @6, @8, @9) */
arg1[0]=w2;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w4;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #25: @4 = (@10-@4) */
for (i=0, rr=w4, cr=w10, cs=w4; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #26: output[0][4] = @4 */
if (res[0]) casadi_copy(w4, 2, res[0]+5);
/* #27: output[0][5] = @0 */
if (res[0]) res[0][7] = w0;
/* #28: output[0][6] = @3 */
if (res[0]) res[0][8] = w3;
/* #29: @3 = input[0][9] */
w3 = arg[0] ? arg[0][9] : 0;
/* #30: @0 = input[0][10] */
w0 = arg[0] ? arg[0][10] : 0;
/* #31: @4 = vertcat(@3, @0) */
rr=w4;
*rr++ = w3;
*rr++ = w0;
/* #32: @0 = input[0][8] */
w0 = arg[0] ? arg[0][8] : 0;
/* #33: @1 = 1 */
w1 = 1.;
/* #34: @6 = 2 */
w6 = 2.;
/* #35: @9 = 0x1 */
/* #36: {@2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@10, @0, @1, @6, @8, @9) */
arg1[0]=w10;
arg1[1]=(&w0);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w2;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #37: @2 = (@4-@2) */
for (i=0, rr=w2, cr=w4, cs=w2; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #38: output[0][7] = @2 */
if (res[0]) casadi_copy(w2, 2, res[0]+9);
/* #39: output[0][8] = @5 */
if (res[0]) res[0][11] = w5;
/* #40: output[0][9] = @0 */
if (res[0]) res[0][12] = w0;
/* #41: @0 = input[0][12] */
w0 = arg[0] ? arg[0][12] : 0;
/* #42: @5 = input[0][13] */
w5 = arg[0] ? arg[0][13] : 0;
/* #43: @2 = vertcat(@0, @5) */
rr=w2;
*rr++ = w0;
*rr++ = w5;
/* #44: @5 = input[0][11] */
w5 = arg[0] ? arg[0][11] : 0;
/* #45: @1 = 1 */
w1 = 1.;
/* #46: @6 = 3 */
w6 = 3.;
/* #47: @9 = 0x1 */
/* #48: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @1, @6, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #49: @10 = (@2-@10) */
for (i=0, rr=w10, cr=w2, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #50: output[0][10] = @10 */
if (res[0]) casadi_copy(w10, 2, res[0]+13);
/* #51: output[0][11] = @3 */
if (res[0]) res[0][15] = w3;
/* #52: output[0][12] = @5 */
if (res[0]) res[0][16] = w5;
/* #53: @5 = input[0][15] */
w5 = arg[0] ? arg[0][15] : 0;
/* #54: @3 = input[0][16] */
w3 = arg[0] ? arg[0][16] : 0;
/* #55: @10 = vertcat(@5, @3) */
rr=w10;
*rr++ = w5;
*rr++ = w3;
/* #56: @3 = input[0][14] */
w3 = arg[0] ? arg[0][14] : 0;
/* #57: @1 = 1 */
w1 = 1.;
/* #58: @6 = 4 */
w6 = 4.;
/* #59: @9 = 0x1 */
/* #60: {@4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@2, @3, @1, @6, @8, @9) */
arg1[0]=w2;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w4;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #61: @4 = (@10-@4) */
for (i=0, rr=w4, cr=w10, cs=w4; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #62: output[0][13] = @4 */
if (res[0]) casadi_copy(w4, 2, res[0]+17);
/* #63: output[0][14] = @0 */
if (res[0]) res[0][19] = w0;
/* #64: output[0][15] = @3 */
if (res[0]) res[0][20] = w3;
/* #65: @3 = input[0][18] */
w3 = arg[0] ? arg[0][18] : 0;
/* #66: @0 = input[0][19] */
w0 = arg[0] ? arg[0][19] : 0;
/* #67: @4 = vertcat(@3, @0) */
rr=w4;
*rr++ = w3;
*rr++ = w0;
/* #68: @0 = input[0][17] */
w0 = arg[0] ? arg[0][17] : 0;
/* #69: @1 = 1 */
w1 = 1.;
/* #70: @6 = 5 */
w6 = 5.;
/* #71: @9 = 0x1 */
/* #72: {@2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@10, @0, @1, @6, @8, @9) */
arg1[0]=w10;
arg1[1]=(&w0);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w2;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #73: @2 = (@4-@2) */
for (i=0, rr=w2, cr=w4, cs=w2; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #74: output[0][16] = @2 */
if (res[0]) casadi_copy(w2, 2, res[0]+21);
/* #75: output[0][17] = @5 */
if (res[0]) res[0][23] = w5;
/* #76: output[0][18] = @0 */
if (res[0]) res[0][24] = w0;
/* #77: @0 = input[0][21] */
w0 = arg[0] ? arg[0][21] : 0;
/* #78: @5 = input[0][22] */
w5 = arg[0] ? arg[0][22] : 0;
/* #79: @2 = vertcat(@0, @5) */
rr=w2;
*rr++ = w0;
*rr++ = w5;
/* #80: @5 = input[0][20] */
w5 = arg[0] ? arg[0][20] : 0;
/* #81: @1 = 1 */
w1 = 1.;
/* #82: @6 = 6 */
w6 = 6.;
/* #83: @9 = 0x1 */
/* #84: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @1, @6, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #85: @10 = (@2-@10) */
for (i=0, rr=w10, cr=w2, cs=w10; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #86: output[0][19] = @10 */
if (res[0]) casadi_copy(w10, 2, res[0]+25);
/* #87: output[0][20] = @3 */
if (res[0]) res[0][27] = w3;
/* #88: output[0][21] = @5 */
if (res[0]) res[0][28] = w5;
/* #89: @5 = input[0][24] */
w5 = arg[0] ? arg[0][24] : 0;
/* #90: @3 = input[0][25] */
w3 = arg[0] ? arg[0][25] : 0;
/* #91: @10 = vertcat(@5, @3) */
rr=w10;
*rr++ = w5;
*rr++ = w3;
/* #92: @3 = input[0][23] */
w3 = arg[0] ? arg[0][23] : 0;
/* #93: @1 = 1 */
w1 = 1.;
/* #94: @6 = 7 */
w6 = 7.;
/* #95: @9 = 0x1 */
/* #96: {@4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@2, @3, @1, @6, @8, @9) */
arg1[0]=w2;
arg1[1]=(&w3);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w4;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #97: @4 = (@10-@4) */
for (i=0, rr=w4, cr=w10, cs=w4; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #98: output[0][22] = @4 */
if (res[0]) casadi_copy(w4, 2, res[0]+29);
/* #99: output[0][23] = @0 */
if (res[0]) res[0][31] = w0;
/* #100: output[0][24] = @3 */
if (res[0]) res[0][32] = w3;
/* #101: @3 = input[0][27] */
w3 = arg[0] ? arg[0][27] : 0;
/* #102: @0 = input[0][28] */
w0 = arg[0] ? arg[0][28] : 0;
/* #103: @4 = vertcat(@3, @0) */
rr=w4;
*rr++ = w3;
*rr++ = w0;
/* #104: @0 = input[0][26] */
w0 = arg[0] ? arg[0][26] : 0;
/* #105: @1 = 1 */
w1 = 1.;
/* #106: @6 = 8 */
w6 = 8.;
/* #107: @9 = 0x1 */
/* #108: {@2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@10, @0, @1, @6, @8, @9) */
arg1[0]=w10;
arg1[1]=(&w0);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w2;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #109: @2 = (@4-@2) */
for (i=0, rr=w2, cr=w4, cs=w2; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #110: output[0][25] = @2 */
if (res[0]) casadi_copy(w2, 2, res[0]+33);
/* #111: output[0][26] = @5 */
if (res[0]) res[0][35] = w5;
/* #112: output[0][27] = @0 */
if (res[0]) res[0][36] = w0;
/* #113: @0 = input[0][30] */
w0 = arg[0] ? arg[0][30] : 0;
/* #114: @5 = input[0][31] */
w5 = arg[0] ? arg[0][31] : 0;
/* #115: @2 = vertcat(@0, @5) */
rr=w2;
*rr++ = w0;
*rr++ = w5;
/* #116: @5 = input[0][29] */
w5 = arg[0] ? arg[0][29] : 0;
/* #117: @1 = 1 */
w1 = 1.;
/* #118: @6 = 9 */
w6 = 9.;
/* #119: @9 = 0x1 */
/* #120: {@10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = F(@4, @5, @1, @6, @8, @9) */
arg1[0]=w4;
arg1[1]=(&w5);
arg1[2]=(&w1);
arg1[3]=(&w6);
arg1[4]=(&w8);
arg1[5]=0;
res1[0]=w10;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #121: @2 = (@2-@10) */
for (i=0, rr=w2, cs=w10; i<2; ++i) (*rr++) -= (*cs++);
/* #122: output[0][28] = @2 */
if (res[0]) casadi_copy(w2, 2, res[0]+37);
/* #123: output[0][29] = @3 */
if (res[0]) res[0][39] = w3;
/* #124: output[0][30] = @5 */
if (res[0]) res[0][40] = w5;
/* #125: output[0][31] = @0 */
if (res[0]) res[0][41] = w0;
return 0;
}
/* fwd3_ode:(x[2],u,z[0],p,t[1x1,0nz],out_ode[2x1,0nz],out_alg[0],out_quad[0],fwd_x[2x3],fwd_u[1x3],fwd_z[0x3],fwd_p[1x3],fwd_t[1x3,0nz])->(fwd_ode[2x3],fwd_alg[0x3],fwd_quad[0x3]) */
static int casadi_f15(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *w0=w+0, w1, w2, w3;
/* #0: @0 = input[8][0] */
casadi_copy(arg[8], 2, w0);
/* #1: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #2: @2 = (@1-@2) */
w2 = (w1-w2);
/* #3: @3 = input[9][0] */
w3 = arg[9] ? arg[9][0] : 0;
/* #4: @2 = (@2+@3) */
w2 += w3;
/* #5: @3 = input[11][0] */
w3 = arg[11] ? arg[11][0] : 0;
/* #6: @2 = (@2+@3) */
w2 += w3;
/* #7: output[0][0] = @2 */
if (res[0]) res[0][0] = w2;
/* #8: output[0][1] = @1 */
if (res[0]) res[0][1] = w1;
/* #9: @0 = input[8][1] */
casadi_copy(arg[8] ? arg[8]+2 : 0, 2, w0);
/* #10: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #11: @2 = (@1-@2) */
w2 = (w1-w2);
/* #12: @3 = input[9][1] */
w3 = arg[9] ? arg[9][1] : 0;
/* #13: @2 = (@2+@3) */
w2 += w3;
/* #14: @3 = input[11][1] */
w3 = arg[11] ? arg[11][1] : 0;
/* #15: @2 = (@2+@3) */
w2 += w3;
/* #16: output[0][2] = @2 */
if (res[0]) res[0][2] = w2;
/* #17: output[0][3] = @1 */
if (res[0]) res[0][3] = w1;
/* #18: @0 = input[8][2] */
casadi_copy(arg[8] ? arg[8]+4 : 0, 2, w0);
/* #19: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #20: @2 = (@1-@2) */
w2 = (w1-w2);
/* #21: @3 = input[9][2] */
w3 = arg[9] ? arg[9][2] : 0;
/* #22: @2 = (@2+@3) */
w2 += w3;
/* #23: @3 = input[11][2] */
w3 = arg[11] ? arg[11][2] : 0;
/* #24: @2 = (@2+@3) */
w2 += w3;
/* #25: output[0][4] = @2 */
if (res[0]) res[0][4] = w2;
/* #26: output[0][5] = @1 */
if (res[0]) res[0][5] = w1;
return 0;
}
/* fwd3_F:(x0[2],u,t0,DT,DT_control,p,z0[0],out_xf[2x1,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_poly_coeff_q[0x4],out_zf[0],out_poly_coeff_z[],fwd_x0[2x3],fwd_u[1x3],fwd_t0[1x3],fwd_DT[1x3],fwd_DT_control[1x3],fwd_p[1x3],fwd_z0[0x3])->(fwd_xf[2x3],fwd_poly_coeff[2x15],fwd_qf[0x3],fwd_poly_coeff_q[0x12],fwd_zf[0x3],fwd_poly_coeff_z[]) */
static int casadi_f14(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+6, *rr;
const casadi_real **arg1=arg+20, *cr, *cs;
casadi_real *w0=w+5, *w1=w+7, w2, w4, *w6=w+11, w7, w8, *w9=w+15, *w12=w+17, *w13=w+19, w14, *w15=w+22, *w18=w+24, *w19=w+26, *w22=w+28, w23, w24, w25, *w26=w+33, *w30=w+35, *w31=w+37, *w32=w+39, w33, w34, w35, *w36=w+48, w38, w39, w40, *w41=w+54, *w43=w+57, *w44=w+63, *w45=w+65, w46, w47, *w48=w+69, *w49=w+71, w50, *w51=w+74, *w52=w+76, *w53=w+78, *w54=w+80, *w55=w+82, *w56=w+84, *w57=w+86;
/* #0: @0 = input[13][0] */
casadi_copy(arg[13], 2, w0);
/* #1: @1 = input[0][0] */
casadi_copy(arg[0], 2, w1);
/* #2: @2 = input[1][0] */
w2 = arg[1] ? arg[1][0] : 0;
/* #3: @3 = 0x1 */
/* #4: @4 = input[5][0] */
w4 = arg[5] ? arg[5][0] : 0;
/* #5: @5 = 00 */
/* #6: {@6, NULL, NULL} = ode(@1, @2, @3, @4, @5) */
arg1[0]=w1;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
res1[0]=w6;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #7: @7 = input[3][0] */
w7 = arg[3] ? arg[3][0] : 0;
/* #8: @8 = 2 */
w8 = 2.;
/* #9: @8 = (@7/@8) */
w8 = (w7/w8);
/* #10: @9 = (@8*@6) */
for (i=0, rr=w9, cs=w6; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #11: @9 = (@1+@9) */
for (i=0, rr=w9, cr=w1, cs=w9; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #12: @10 = 0x1 */
/* #13: @11 = 00 */
/* #14: {@12, NULL, NULL} = ode(@9, @2, @10, @4, @11) */
arg1[0]=w9;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
res1[0]=w12;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #15: @13 = (2.*@12) */
for (i=0, rr=w13, cs=w12; i<2; ++i) *rr++ = (2.* *cs++ );
/* #16: @13 = (@6+@13) */
for (i=0, rr=w13, cr=w6, cs=w13; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #17: @14 = 2 */
w14 = 2.;
/* #18: @14 = (@7/@14) */
w14 = (w7/w14);
/* #19: @15 = (@14*@12) */
for (i=0, rr=w15, cs=w12; i<2; ++i) (*rr++) = (w14*(*cs++));
/* #20: @15 = (@1+@15) */
for (i=0, rr=w15, cr=w1, cs=w15; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #21: @16 = 0x1 */
/* #22: @17 = 00 */
/* #23: {@18, NULL, NULL} = ode(@15, @2, @16, @4, @17) */
arg1[0]=w15;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
res1[0]=w18;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #24: @19 = (2.*@18) */
for (i=0, rr=w19, cs=w18; i<2; ++i) *rr++ = (2.* *cs++ );
/* #25: @13 = (@13+@19) */
for (i=0, rr=w13, cs=w19; i<2; ++i) (*rr++) += (*cs++);
/* #26: @19 = (@7*@18) */
for (i=0, rr=w19, cs=w18; i<2; ++i) (*rr++) = (w7*(*cs++));
/* #27: @19 = (@1+@19) */
for (i=0, rr=w19, cr=w1, cs=w19; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #28: @20 = 0x1 */
/* #29: @21 = 00 */
/* #30: {@22, NULL, NULL} = ode(@19, @2, @20, @4, @21) */
arg1[0]=w19;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
res1[0]=w22;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #31: @13 = (@13+@22) */
for (i=0, rr=w13, cs=w22; i<2; ++i) (*rr++) += (*cs++);
/* #32: @23 = 0.166667 */
w23 = 1.6666666666666666e-01;
/* #33: @24 = input[16][0] */
w24 = arg[16] ? arg[16][0] : 0;
/* #34: @25 = (@23*@24) */
w25 = (w23*w24);
/* #35: @26 = (@13*@25) */
for (i=0, rr=w26, cr=w13; i<2; ++i) (*rr++) = ((*cr++)*w25);
/* #36: @25 = 6 */
w25 = 6.;
/* #37: @25 = (@7/@25) */
w25 = (w7/w25);
/* #38: @27 = zeros(2x1,0nz) */
/* #39: @28 = 0x1 */
/* #40: @29 = 0x1 */
/* #41: @30 = input[13][1] */
casadi_copy(arg[13] ? arg[13]+2 : 0, 2, w30);
/* #42: @31 = input[13][2] */
casadi_copy(arg[13] ? arg[13]+4 : 0, 2, w31);
/* #43: @32 = horzcat(@0, @30, @31) */
rr=w32;
for (i=0, cs=w0; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w30; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w31; i<2; ++i) *rr++ = *cs++;
/* #44: @33 = input[14][0] */
w33 = arg[14] ? arg[14][0] : 0;
/* #45: @34 = input[14][1] */
w34 = arg[14] ? arg[14][1] : 0;
/* #46: @35 = input[14][2] */
w35 = arg[14] ? arg[14][2] : 0;
/* #47: @36 = horzcat(@33, @34, @35) */
rr=w36;
*rr++ = w33;
*rr++ = w34;
*rr++ = w35;
/* #48: @37 = 0x3 */
/* #49: @38 = input[18][0] */
w38 = arg[18] ? arg[18][0] : 0;
/* #50: @39 = input[18][1] */
w39 = arg[18] ? arg[18][1] : 0;
/* #51: @40 = input[18][2] */
w40 = arg[18] ? arg[18][2] : 0;
/* #52: @41 = horzcat(@38, @39, @40) */
rr=w41;
*rr++ = w38;
*rr++ = w39;
*rr++ = w40;
/* #53: @42 = zeros(1x3,0nz) */
/* #54: {@43, NULL, NULL} = fwd3_ode(@1, @2, @3, @4, @5, @27, @28, @29, @32, @36, @37, @41, @42) */
arg1[0]=w1;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w32;
arg1[9]=w36;
arg1[10]=0;
arg1[11]=w41;
arg1[12]=0;
res1[0]=w43;
res1[1]=0;
res1[2]=0;
if (casadi_f15(arg1, res1, iw, w, 0)) return 1;
/* #55: {@1, @44, @45} = horzsplit(@43) */
casadi_copy(w43, 2, w1);
casadi_copy(w43+2, 2, w44);
casadi_copy(w43+4, 2, w45);
/* #56: @3 = zeros(2x1,0nz) */
/* #57: @5 = 0x1 */
/* #58: @27 = 0x1 */
/* #59: @46 = 0.5 */
w46 = 5.0000000000000000e-01;
/* #60: @47 = (@46*@24) */
w47 = (w46*w24);
/* #61: @48 = (@6*@47) */
for (i=0, rr=w48, cr=w6; i<2; ++i) (*rr++) = ((*cr++)*w47);
/* #62: @49 = (@8*@1) */
for (i=0, rr=w49, cs=w1; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #63: @48 = (@48+@49) */
for (i=0, rr=w48, cs=w49; i<2; ++i) (*rr++) += (*cs++);
/* #64: @48 = (@0+@48) */
for (i=0, rr=w48, cr=w0, cs=w48; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #65: @47 = input[16][1] */
w47 = arg[16] ? arg[16][1] : 0;
/* #66: @50 = (@46*@47) */
w50 = (w46*w47);
/* #67: @49 = (@6*@50) */
for (i=0, rr=w49, cr=w6; i<2; ++i) (*rr++) = ((*cr++)*w50);
/* #68: @51 = (@8*@44) */
for (i=0, rr=w51, cs=w44; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #69: @49 = (@49+@51) */
for (i=0, rr=w49, cs=w51; i<2; ++i) (*rr++) += (*cs++);
/* #70: @49 = (@30+@49) */
for (i=0, rr=w49, cr=w30, cs=w49; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #71: @50 = input[16][2] */
w50 = arg[16] ? arg[16][2] : 0;
/* #72: @46 = (@46*@50) */
w46 *= w50;
/* #73: @51 = (@6*@46) */
for (i=0, rr=w51, cr=w6; i<2; ++i) (*rr++) = ((*cr++)*w46);
/* #74: @52 = (@8*@45) */
for (i=0, rr=w52, cs=w45; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #75: @51 = (@51+@52) */
for (i=0, rr=w51, cs=w52; i<2; ++i) (*rr++) += (*cs++);
/* #76: @51 = (@31+@51) */
for (i=0, rr=w51, cr=w31, cs=w51; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #77: @43 = horzcat(@48, @49, @51) */
rr=w43;
for (i=0, cs=w48; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w49; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w51; i<2; ++i) *rr++ = *cs++;
/* #78: @36 = horzcat(@33, @34, @35) */
rr=w36;
*rr++ = w33;
*rr++ = w34;
*rr++ = w35;
/* #79: @28 = 0x3 */
/* #80: @41 = horzcat(@38, @39, @40) */
rr=w41;
*rr++ = w38;
*rr++ = w39;
*rr++ = w40;
/* #81: @29 = zeros(1x3,0nz) */
/* #82: {@32, NULL, NULL} = fwd3_ode(@9, @2, @10, @4, @11, @3, @5, @27, @43, @36, @28, @41, @29) */
arg1[0]=w9;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w43;
arg1[9]=w36;
arg1[10]=0;
arg1[11]=w41;
arg1[12]=0;
res1[0]=w32;
res1[1]=0;
res1[2]=0;
if (casadi_f15(arg1, res1, iw, w, 0)) return 1;
/* #83: {@9, @48, @49} = horzsplit(@32) */
casadi_copy(w32, 2, w9);
casadi_copy(w32+2, 2, w48);
casadi_copy(w32+4, 2, w49);
/* #84: @51 = (2.*@9) */
for (i=0, rr=w51, cs=w9; i<2; ++i) *rr++ = (2.* *cs++ );
/* #85: @51 = (@1+@51) */
for (i=0, rr=w51, cr=w1, cs=w51; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #86: @10 = zeros(2x1,0nz) */
/* #87: @11 = 0x1 */
/* #88: @3 = 0x1 */
/* #89: @8 = 0.5 */
w8 = 5.0000000000000000e-01;
/* #90: @46 = (@8*@24) */
w46 = (w8*w24);
/* #91: @52 = (@12*@46) */
for (i=0, rr=w52, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w46);
/* #92: @53 = (@14*@9) */
for (i=0, rr=w53, cs=w9; i<2; ++i) (*rr++) = (w14*(*cs++));
/* #93: @52 = (@52+@53) */
for (i=0, rr=w52, cs=w53; i<2; ++i) (*rr++) += (*cs++);
/* #94: @52 = (@0+@52) */
for (i=0, rr=w52, cr=w0, cs=w52; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #95: @46 = (@8*@47) */
w46 = (w8*w47);
/* #96: @53 = (@12*@46) */
for (i=0, rr=w53, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w46);
/* #97: @54 = (@14*@48) */
for (i=0, rr=w54, cs=w48; i<2; ++i) (*rr++) = (w14*(*cs++));
/* #98: @53 = (@53+@54) */
for (i=0, rr=w53, cs=w54; i<2; ++i) (*rr++) += (*cs++);
/* #99: @53 = (@30+@53) */
for (i=0, rr=w53, cr=w30, cs=w53; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #100: @8 = (@8*@50) */
w8 *= w50;
/* #101: @54 = (@12*@8) */
for (i=0, rr=w54, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w8);
/* #102: @55 = (@14*@49) */
for (i=0, rr=w55, cs=w49; i<2; ++i) (*rr++) = (w14*(*cs++));
/* #103: @54 = (@54+@55) */
for (i=0, rr=w54, cs=w55; i<2; ++i) (*rr++) += (*cs++);
/* #104: @54 = (@31+@54) */
for (i=0, rr=w54, cr=w31, cs=w54; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #105: @32 = horzcat(@52, @53, @54) */
rr=w32;
for (i=0, cs=w52; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w53; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w54; i<2; ++i) *rr++ = *cs++;
/* #106: @36 = horzcat(@33, @34, @35) */
rr=w36;
*rr++ = w33;
*rr++ = w34;
*rr++ = w35;
/* #107: @5 = 0x3 */
/* #108: @41 = horzcat(@38, @39, @40) */
rr=w41;
*rr++ = w38;
*rr++ = w39;
*rr++ = w40;
/* #109: @27 = zeros(1x3,0nz) */
/* #110: {@43, NULL, NULL} = fwd3_ode(@15, @2, @16, @4, @17, @10, @11, @3, @32, @36, @5, @41, @27) */
arg1[0]=w15;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w32;
arg1[9]=w36;
arg1[10]=0;
arg1[11]=w41;
arg1[12]=0;
res1[0]=w43;
res1[1]=0;
res1[2]=0;
if (casadi_f15(arg1, res1, iw, w, 0)) return 1;
/* #111: {@15, @52, @53} = horzsplit(@43) */
casadi_copy(w43, 2, w15);
casadi_copy(w43+2, 2, w52);
casadi_copy(w43+4, 2, w53);
/* #112: @54 = (2.*@15) */
for (i=0, rr=w54, cs=w15; i<2; ++i) *rr++ = (2.* *cs++ );
/* #113: @51 = (@51+@54) */
for (i=0, rr=w51, cs=w54; i<2; ++i) (*rr++) += (*cs++);
/* #114: @16 = zeros(2x1,0nz) */
/* #115: @17 = 0x1 */
/* #116: @10 = 0x1 */
/* #117: @54 = (@18*@24) */
for (i=0, rr=w54, cr=w18; i<2; ++i) (*rr++) = ((*cr++)*w24);
/* #118: @55 = (@7*@15) */
for (i=0, rr=w55, cs=w15; i<2; ++i) (*rr++) = (w7*(*cs++));
/* #119: @54 = (@54+@55) */
for (i=0, rr=w54, cs=w55; i<2; ++i) (*rr++) += (*cs++);
/* #120: @54 = (@0+@54) */
for (i=0, rr=w54, cr=w0, cs=w54; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #121: @55 = (@18*@47) */
for (i=0, rr=w55, cr=w18; i<2; ++i) (*rr++) = ((*cr++)*w47);
/* #122: @56 = (@7*@52) */
for (i=0, rr=w56, cs=w52; i<2; ++i) (*rr++) = (w7*(*cs++));
/* #123: @55 = (@55+@56) */
for (i=0, rr=w55, cs=w56; i<2; ++i) (*rr++) += (*cs++);
/* #124: @55 = (@30+@55) */
for (i=0, rr=w55, cr=w30, cs=w55; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #125: @56 = (@18*@50) */
for (i=0, rr=w56, cr=w18; i<2; ++i) (*rr++) = ((*cr++)*w50);
/* #126: @57 = (@7*@53) */
for (i=0, rr=w57, cs=w53; i<2; ++i) (*rr++) = (w7*(*cs++));
/* #127: @56 = (@56+@57) */
for (i=0, rr=w56, cs=w57; i<2; ++i) (*rr++) += (*cs++);
/* #128: @56 = (@31+@56) */
for (i=0, rr=w56, cr=w31, cs=w56; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #129: @43 = horzcat(@54, @55, @56) */
rr=w43;
for (i=0, cs=w54; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w55; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w56; i<2; ++i) *rr++ = *cs++;
/* #130: @36 = horzcat(@33, @34, @35) */
rr=w36;
*rr++ = w33;
*rr++ = w34;
*rr++ = w35;
/* #131: @11 = 0x3 */
/* #132: @41 = horzcat(@38, @39, @40) */
rr=w41;
*rr++ = w38;
*rr++ = w39;
*rr++ = w40;
/* #133: @3 = zeros(1x3,0nz) */
/* #134: {@32, NULL, NULL} = fwd3_ode(@19, @2, @20, @4, @21, @16, @17, @10, @43, @36, @11, @41, @3) */
arg1[0]=w19;
arg1[1]=(&w2);
arg1[2]=0;
arg1[3]=(&w4);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w43;
arg1[9]=w36;
arg1[10]=0;
arg1[11]=w41;
arg1[12]=0;
res1[0]=w32;
res1[1]=0;
res1[2]=0;
if (casadi_f15(arg1, res1, iw, w, 0)) return 1;
/* #135: {@19, @54, @55} = horzsplit(@32) */
casadi_copy(w32, 2, w19);
casadi_copy(w32+2, 2, w54);
casadi_copy(w32+4, 2, w55);
/* #136: @51 = (@51+@19) */
for (i=0, rr=w51, cs=w19; i<2; ++i) (*rr++) += (*cs++);
/* #137: @51 = (@25*@51) */
for (i=0, rr=w51, cs=w51; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #138: @26 = (@26+@51) */
for (i=0, rr=w26, cs=w51; i<2; ++i) (*rr++) += (*cs++);
/* #139: @26 = (@0+@26) */
for (i=0, rr=w26, cr=w0, cs=w26; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #140: output[0][0] = @26 */
casadi_copy(w26, 2, res[0]);
/* #141: @2 = (@23*@47) */
w2 = (w23*w47);
/* #142: @26 = (@13*@2) */
for (i=0, rr=w26, cr=w13; i<2; ++i) (*rr++) = ((*cr++)*w2);
/* #143: @51 = (2.*@48) */
for (i=0, rr=w51, cs=w48; i<2; ++i) *rr++ = (2.* *cs++ );
/* #144: @51 = (@44+@51) */
for (i=0, rr=w51, cr=w44, cs=w51; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #145: @56 = (2.*@52) */
for (i=0, rr=w56, cs=w52; i<2; ++i) *rr++ = (2.* *cs++ );
/* #146: @51 = (@51+@56) */
for (i=0, rr=w51, cs=w56; i<2; ++i) (*rr++) += (*cs++);
/* #147: @51 = (@51+@54) */
for (i=0, rr=w51, cs=w54; i<2; ++i) (*rr++) += (*cs++);
/* #148: @51 = (@25*@51) */
for (i=0, rr=w51, cs=w51; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #149: @26 = (@26+@51) */
for (i=0, rr=w26, cs=w51; i<2; ++i) (*rr++) += (*cs++);
/* #150: @26 = (@30+@26) */
for (i=0, rr=w26, cr=w30, cs=w26; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #151: output[0][1] = @26 */
if (res[0]) casadi_copy(w26, 2, res[0]+2);
/* #152: @23 = (@23*@50) */
w23 *= w50;
/* #153: @13 = (@13*@23) */
for (i=0, rr=w13; i<2; ++i) (*rr++) *= w23;
/* #154: @26 = (2.*@49) */
for (i=0, rr=w26, cs=w49; i<2; ++i) *rr++ = (2.* *cs++ );
/* #155: @26 = (@45+@26) */
for (i=0, rr=w26, cr=w45, cs=w26; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #156: @51 = (2.*@53) */
for (i=0, rr=w51, cs=w53; i<2; ++i) *rr++ = (2.* *cs++ );
/* #157: @26 = (@26+@51) */
for (i=0, rr=w26, cs=w51; i<2; ++i) (*rr++) += (*cs++);
/* #158: @26 = (@26+@55) */
for (i=0, rr=w26, cs=w55; i<2; ++i) (*rr++) += (*cs++);
/* #159: @26 = (@25*@26) */
for (i=0, rr=w26, cs=w26; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #160: @13 = (@13+@26) */
for (i=0, rr=w13, cs=w26; i<2; ++i) (*rr++) += (*cs++);
/* #161: @13 = (@31+@13) */
for (i=0, rr=w13, cr=w31, cs=w13; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #162: output[0][2] = @13 */
if (res[0]) casadi_copy(w13, 2, res[0]+4);
/* #163: output[1][0] = @0 */
casadi_copy(w0, 2, res[1]);
/* #164: output[1][1] = @1 */
if (res[1]) casadi_copy(w1, 2, res[1]+2);
/* #165: @25 = 0.5 */
w25 = 5.0000000000000000e-01;
/* #166: @23 = 2 */
w23 = 2.;
/* #167: @23 = (@23/@7) */
w23 /= w7;
/* #168: @0 = (@9-@1) */
for (i=0, rr=w0, cr=w9, cs=w1; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #169: @0 = (@23*@0) */
for (i=0, rr=w0, cs=w0; i<2; ++i) (*rr++) = (w23*(*cs++));
/* #170: @13 = (@12-@6) */
for (i=0, rr=w13, cr=w12, cs=w6; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #171: @2 = (@23/@7) */
w2 = (w23/w7);
/* #172: @4 = (@2*@24) */
w4 = (w2*w24);
/* #173: @26 = (@13*@4) */
for (i=0, rr=w26, cr=w13; i<2; ++i) (*rr++) = ((*cr++)*w4);
/* #174: @0 = (@0-@26) */
for (i=0, rr=w0, cs=w26; i<2; ++i) (*rr++) -= (*cs++);
/* #175: @0 = (@25*@0) */
for (i=0, rr=w0, cs=w0; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #176: output[1][2] = @0 */
if (res[1]) casadi_copy(w0, 2, res[1]+4);
/* #177: @4 = 0.166667 */
w4 = 1.6666666666666666e-01;
/* #178: @38 = 4 */
w38 = 4.;
/* #179: @39 = sq(@7) */
w39 = casadi_sq( w7 );
/* #180: @38 = (@38/@39) */
w38 /= w39;
/* #181: @9 = (@15-@9) */
for (i=0, rr=w9, cr=w15, cs=w9; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #182: @9 = (@38*@9) */
for (i=0, rr=w9, cs=w9; i<2; ++i) (*rr++) = (w38*(*cs++));
/* #183: @12 = (@18-@12) */
for (i=0, rr=w12, cr=w18, cs=w12; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #184: @39 = (@38/@39) */
w39 = (w38/w39);
/* #185: @40 = (2.*@7) */
w40 = (2.* w7 );
/* #186: @33 = (@40*@24) */
w33 = (w40*w24);
/* #187: @33 = (@39*@33) */
w33 = (w39*w33);
/* #188: @0 = (@12*@33) */
for (i=0, rr=w0, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w33);
/* #189: @9 = (@9-@0) */
for (i=0, rr=w9, cs=w0; i<2; ++i) (*rr++) -= (*cs++);
/* #190: @9 = (@4*@9) */
for (i=0, rr=w9, cs=w9; i<2; ++i) (*rr++) = (w4*(*cs++));
/* #191: output[1][3] = @9 */
if (res[1]) casadi_copy(w9, 2, res[1]+6);
/* #192: @33 = 0.0416667 */
w33 = 4.1666666666666664e-02;
/* #193: @34 = 4 */
w34 = 4.;
/* #194: @15 = (2.*@15) */
for (i=0, rr=w15, cs=w15; i<2; ++i) *rr++ = (2.* *cs++ );
/* #195: @19 = (@19-@15) */
for (i=0, rr=w19, cs=w15; i<2; ++i) (*rr++) -= (*cs++);
/* #196: @19 = (@19+@1) */
for (i=0, rr=w19, cs=w1; i<2; ++i) (*rr++) += (*cs++);
/* #197: @19 = (@34*@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #198: @35 = 3 */
w35 = 3.;
/* #199: @14 = pow(@7,@35) */
w14 = pow(w7,w35);
/* #200: @19 = (@19/@14) */
for (i=0, rr=w19; i<2; ++i) (*rr++) /= w14;
/* #201: @18 = (2.*@18) */
for (i=0, rr=w18, cs=w18; i<2; ++i) *rr++ = (2.* *cs++ );
/* #202: @22 = (@22-@18) */
for (i=0, rr=w22, cs=w18; i<2; ++i) (*rr++) -= (*cs++);
/* #203: @22 = (@22+@6) */
for (i=0, rr=w22, cs=w6; i<2; ++i) (*rr++) += (*cs++);
/* #204: @22 = (@34*@22) */
for (i=0, rr=w22, cs=w22; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #205: @22 = (@22/@14) */
for (i=0, rr=w22; i<2; ++i) (*rr++) /= w14;
/* #206: @22 = (@22/@14) */
for (i=0, rr=w22; i<2; ++i) (*rr++) /= w14;
/* #207: @7 = sq(@7) */
w7 = casadi_sq( w7 );
/* #208: @35 = (@35*@7) */
w35 *= w7;
/* #209: @24 = (@35*@24) */
w24 = (w35*w24);
/* #210: @6 = (@22*@24) */
for (i=0, rr=w6, cr=w22; i<2; ++i) (*rr++) = ((*cr++)*w24);
/* #211: @19 = (@19-@6) */
for (i=0, rr=w19, cs=w6; i<2; ++i) (*rr++) -= (*cs++);
/* #212: @19 = (@33*@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) (*rr++) = (w33*(*cs++));
/* #213: output[1][4] = @19 */
if (res[1]) casadi_copy(w19, 2, res[1]+8);
/* #214: output[1][5] = @30 */
if (res[1]) casadi_copy(w30, 2, res[1]+10);
/* #215: output[1][6] = @44 */
if (res[1]) casadi_copy(w44, 2, res[1]+12);
/* #216: @30 = (@48-@44) */
for (i=0, rr=w30, cr=w48, cs=w44; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #217: @30 = (@23*@30) */
for (i=0, rr=w30, cs=w30; i<2; ++i) (*rr++) = (w23*(*cs++));
/* #218: @24 = (@2*@47) */
w24 = (w2*w47);
/* #219: @19 = (@13*@24) */
for (i=0, rr=w19, cr=w13; i<2; ++i) (*rr++) = ((*cr++)*w24);
/* #220: @30 = (@30-@19) */
for (i=0, rr=w30, cs=w19; i<2; ++i) (*rr++) -= (*cs++);
/* #221: @30 = (@25*@30) */
for (i=0, rr=w30, cs=w30; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #222: output[1][7] = @30 */
if (res[1]) casadi_copy(w30, 2, res[1]+14);
/* #223: @48 = (@52-@48) */
for (i=0, rr=w48, cr=w52, cs=w48; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #224: @48 = (@38*@48) */
for (i=0, rr=w48, cs=w48; i<2; ++i) (*rr++) = (w38*(*cs++));
/* #225: @24 = (@40*@47) */
w24 = (w40*w47);
/* #226: @24 = (@39*@24) */
w24 = (w39*w24);
/* #227: @30 = (@12*@24) */
for (i=0, rr=w30, cr=w12; i<2; ++i) (*rr++) = ((*cr++)*w24);
/* #228: @48 = (@48-@30) */
for (i=0, rr=w48, cs=w30; i<2; ++i) (*rr++) -= (*cs++);
/* #229: @48 = (@4*@48) */
for (i=0, rr=w48, cs=w48; i<2; ++i) (*rr++) = (w4*(*cs++));
/* #230: output[1][8] = @48 */
if (res[1]) casadi_copy(w48, 2, res[1]+16);
/* #231: @52 = (2.*@52) */
for (i=0, rr=w52, cs=w52; i<2; ++i) *rr++ = (2.* *cs++ );
/* #232: @54 = (@54-@52) */
for (i=0, rr=w54, cs=w52; i<2; ++i) (*rr++) -= (*cs++);
/* #233: @54 = (@54+@44) */
for (i=0, rr=w54, cs=w44; i<2; ++i) (*rr++) += (*cs++);
/* #234: @54 = (@34*@54) */
for (i=0, rr=w54, cs=w54; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #235: @54 = (@54/@14) */
for (i=0, rr=w54; i<2; ++i) (*rr++) /= w14;
/* #236: @47 = (@35*@47) */
w47 = (w35*w47);
/* #237: @44 = (@22*@47) */
for (i=0, rr=w44, cr=w22; i<2; ++i) (*rr++) = ((*cr++)*w47);
/* #238: @54 = (@54-@44) */
for (i=0, rr=w54, cs=w44; i<2; ++i) (*rr++) -= (*cs++);
/* #239: @54 = (@33*@54) */
for (i=0, rr=w54, cs=w54; i<2; ++i) (*rr++) = (w33*(*cs++));
/* #240: output[1][9] = @54 */
if (res[1]) casadi_copy(w54, 2, res[1]+18);
/* #241: output[1][10] = @31 */
if (res[1]) casadi_copy(w31, 2, res[1]+20);
/* #242: output[1][11] = @45 */
if (res[1]) casadi_copy(w45, 2, res[1]+22);
/* #243: @31 = (@49-@45) */
for (i=0, rr=w31, cr=w49, cs=w45; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #244: @31 = (@23*@31) */
for (i=0, rr=w31, cs=w31; i<2; ++i) (*rr++) = (w23*(*cs++));
/* #245: @2 = (@2*@50) */
w2 *= w50;
/* #246: @13 = (@13*@2) */
for (i=0, rr=w13; i<2; ++i) (*rr++) *= w2;
/* #247: @31 = (@31-@13) */
for (i=0, rr=w31, cs=w13; i<2; ++i) (*rr++) -= (*cs++);
/* #248: @31 = (@25*@31) */
for (i=0, rr=w31, cs=w31; i<2; ++i) (*rr++) = (w25*(*cs++));
/* #249: output[1][12] = @31 */
if (res[1]) casadi_copy(w31, 2, res[1]+24);
/* #250: @49 = (@53-@49) */
for (i=0, rr=w49, cr=w53, cs=w49; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #251: @49 = (@38*@49) */
for (i=0, rr=w49, cs=w49; i<2; ++i) (*rr++) = (w38*(*cs++));
/* #252: @40 = (@40*@50) */
w40 *= w50;
/* #253: @39 = (@39*@40) */
w39 *= w40;
/* #254: @12 = (@12*@39) */
for (i=0, rr=w12; i<2; ++i) (*rr++) *= w39;
/* #255: @49 = (@49-@12) */
for (i=0, rr=w49, cs=w12; i<2; ++i) (*rr++) -= (*cs++);
/* #256: @49 = (@4*@49) */
for (i=0, rr=w49, cs=w49; i<2; ++i) (*rr++) = (w4*(*cs++));
/* #257: output[1][13] = @49 */
if (res[1]) casadi_copy(w49, 2, res[1]+26);
/* #258: @53 = (2.*@53) */
for (i=0, rr=w53, cs=w53; i<2; ++i) *rr++ = (2.* *cs++ );
/* #259: @55 = (@55-@53) */
for (i=0, rr=w55, cs=w53; i<2; ++i) (*rr++) -= (*cs++);
/* #260: @55 = (@55+@45) */
for (i=0, rr=w55, cs=w45; i<2; ++i) (*rr++) += (*cs++);
/* #261: @55 = (@34*@55) */
for (i=0, rr=w55, cs=w55; i<2; ++i) (*rr++) = (w34*(*cs++));
/* #262: @55 = (@55/@14) */
for (i=0, rr=w55; i<2; ++i) (*rr++) /= w14;
/* #263: @35 = (@35*@50) */
w35 *= w50;
/* #264: @22 = (@22*@35) */
for (i=0, rr=w22; i<2; ++i) (*rr++) *= w35;
/* #265: @55 = (@55-@22) */
for (i=0, rr=w55, cs=w22; i<2; ++i) (*rr++) -= (*cs++);
/* #266: @55 = (@33*@55) */
for (i=0, rr=w55, cs=w55; i<2; ++i) (*rr++) = (w33*(*cs++));
/* #267: output[1][14] = @55 */
if (res[1]) casadi_copy(w55, 2, res[1]+28);
return 0;
}
/* fwd3_F:(x0[2],u,T,t0,p,z0[0],out_xf[2x1,0nz],out_Xi[2x2,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_Qi[0],out_poly_coeff_q[0x4],out_zf[0],out_Zi[0],out_poly_coeff_z[],fwd_x0[2x3],fwd_u[1x3],fwd_T[1x3],fwd_t0[1x3],fwd_p[1x3],fwd_z0[0x3])->(fwd_xf[2x3],fwd_Xi[2x6],fwd_poly_coeff[2x15],fwd_qf[0x3],fwd_Qi[0x3],fwd_poly_coeff_q[0x12],fwd_zf[0x3],fwd_Zi[0x3],fwd_poly_coeff_z[]) */
static int casadi_f13(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+9, *rr;
const casadi_real **arg1=arg+21, *cs;
casadi_real *w0=w+88, w1, w2, w3, w4, *w12=w+94, *w13=w+96, *w14=w+98, *w15=w+100, w16, w17, w18, *w19=w+109, *w20=w+112, *w21=w+115, *w22=w+118, *w23=w+121, *w25=w+124, *w26=w+130, *w27=w+160;
/* #0: @0 = input[0][0] */
casadi_copy(arg[0], 2, w0);
/* #1: @1 = input[1][0] */
w1 = arg[1] ? arg[1][0] : 0;
/* #2: @2 = input[3][0] */
w2 = arg[3] ? arg[3][0] : 0;
/* #3: @3 = input[2][0] */
w3 = arg[2] ? arg[2][0] : 0;
/* #4: @4 = input[4][0] */
w4 = arg[4] ? arg[4][0] : 0;
/* #5: @5 = 0x1 */
/* #6: @6 = zeros(2x1,0nz) */
/* #7: @7 = zeros(2x5,0nz) */
/* #8: @8 = 0x1 */
/* #9: @9 = 0x4 */
/* #10: @10 = 0x1 */
/* #11: @11 = 0x0 */
/* #12: @12 = input[15][0] */
casadi_copy(arg[15], 2, w12);
/* #13: @13 = input[15][1] */
casadi_copy(arg[15] ? arg[15]+2 : 0, 2, w13);
/* #14: @14 = input[15][2] */
casadi_copy(arg[15] ? arg[15]+4 : 0, 2, w14);
/* #15: @15 = horzcat(@12, @13, @14) */
rr=w15;
for (i=0, cs=w12; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w13; i<2; ++i) *rr++ = *cs++;
for (i=0, cs=w14; i<2; ++i) *rr++ = *cs++;
/* #16: @16 = input[16][0] */
w16 = arg[16] ? arg[16][0] : 0;
/* #17: @17 = input[16][1] */
w17 = arg[16] ? arg[16][1] : 0;
/* #18: @18 = input[16][2] */
w18 = arg[16] ? arg[16][2] : 0;
/* #19: @19 = horzcat(@16, @17, @18) */
rr=w19;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #20: @16 = input[18][0] */
w16 = arg[18] ? arg[18][0] : 0;
/* #21: @17 = input[18][1] */
w17 = arg[18] ? arg[18][1] : 0;
/* #22: @18 = input[18][2] */
w18 = arg[18] ? arg[18][2] : 0;
/* #23: @20 = horzcat(@16, @17, @18) */
rr=w20;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #24: @16 = input[17][0] */
w16 = arg[17] ? arg[17][0] : 0;
/* #25: @17 = input[17][1] */
w17 = arg[17] ? arg[17][1] : 0;
/* #26: @18 = input[17][2] */
w18 = arg[17] ? arg[17][2] : 0;
/* #27: @21 = horzcat(@16, @17, @18) */
rr=w21;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #28: @22 = horzcat(@16, @17, @18) */
rr=w22;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #29: @16 = input[19][0] */
w16 = arg[19] ? arg[19][0] : 0;
/* #30: @17 = input[19][1] */
w17 = arg[19] ? arg[19][1] : 0;
/* #31: @18 = input[19][2] */
w18 = arg[19] ? arg[19][2] : 0;
/* #32: @23 = horzcat(@16, @17, @18) */
rr=w23;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
/* #33: @24 = 0x3 */
/* #34: {@25, @26, NULL, NULL, NULL, NULL} = fwd3_F(@0, @1, @2, @3, @3, @4, @5, @6, @7, @8, @9, @10, @11, @15, @19, @20, @21, @22, @23, @24) */
arg1[0]=w0;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w3);
arg1[4]=(&w3);
arg1[5]=(&w4);
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=w15;
arg1[14]=w19;
arg1[15]=w20;
arg1[16]=w21;
arg1[17]=w22;
arg1[18]=w23;
arg1[19]=0;
res1[0]=w25;
res1[1]=w26;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f14(arg1, res1, iw, w, 0)) return 1;
/* #35: output[0][0] = @25 */
casadi_copy(w25, 6, res[0]);
/* #36: output[1][0] = @12 */
casadi_copy(w12, 2, res[1]);
/* #37: {@12, @0, @27} = horzsplit(@25) */
casadi_copy(w25, 2, w12);
casadi_copy(w25+2, 2, w0);
casadi_copy(w25+4, 2, w27);
/* #38: output[1][1] = @12 */
if (res[1]) casadi_copy(w12, 2, res[1]+2);
/* #39: output[1][2] = @13 */
if (res[1]) casadi_copy(w13, 2, res[1]+4);
/* #40: output[1][3] = @0 */
if (res[1]) casadi_copy(w0, 2, res[1]+6);
/* #41: output[1][4] = @14 */
if (res[1]) casadi_copy(w14, 2, res[1]+8);
/* #42: output[1][5] = @27 */
if (res[1]) casadi_copy(w27, 2, res[1]+10);
/* #43: output[2][0] = @26 */
casadi_copy(w26, 30, res[2]);
return 0;
}
/* nlp_jac_g:(x[32],p)->(jac_g_x[42x32,102nz]) */
static int casadi_f12(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+1, *rr, *ss;
const casadi_int *cii;
const casadi_real **arg1=arg+2, *cs;
casadi_real *w0=w+162, w1, w2, *w3=w+266, w4, w5, *w16=w+270, w17, w18, w19, w20, w21, w22, w23, w24, w25, w26, w28, *w30=w+291, w31, w32, w33, w34, w35, w36, w37, w38, *w40=w+306, *w41=w+308, *w43=w+314, w44, w45, w46, w47, *w48=w+323, *w49=w+326, *w50=w+329, *w51=w+332, *w53=w+335, *w54=w+341, *w55=w+343, w56, w57, w58, w59, w61, w63, w64, w65, w66, w67, w68, *w69=w+356, *w72=w+358, *w73=w+360, *w77=w+362, *w80=w+364, *w81=w+366, *w85=w+368, *w88=w+370, *w89=w+372, *w93=w+374, *w96=w+376, *w97=w+378, *w101=w+380, *w104=w+382, *w105=w+384, *w109=w+386, *w112=w+388, *w113=w+390, *w117=w+392, *w120=w+394, *w121=w+396, *w125=w+398, *w128=w+400, *w129=w+402, *w133=w+404, *w136=w+406, *w137=w+408, *w138=w+438, *w139=w+468, *w140=w+490, *w141=w+512, *w142=w+527, *w143=w+542, *w144=w+562, *w145=w+582;
/* #0: @0 = zeros(32x42,102nz) */
casadi_clear(w0, 102);
/* #1: @1 = input[0][0] */
w1 = arg[0] ? arg[0][0] : 0;
/* #2: @2 = input[0][1] */
w2 = arg[0] ? arg[0][1] : 0;
/* #3: @3 = vertcat(@1, @2) */
rr=w3;
*rr++ = w1;
*rr++ = w2;
/* #4: @1 = input[0][2] */
w1 = arg[0] ? arg[0][2] : 0;
/* #5: @2 = 1 */
w2 = 1.;
/* #6: @4 = 0 */
w4 = 0.;
/* #7: @5 = input[1][0] */
w5 = arg[1] ? arg[1][0] : 0;
/* #8: @6 = 0x1 */
/* #9: @7 = zeros(2x1,0nz) */
/* #10: @8 = zeros(2x2,0nz) */
/* #11: @9 = zeros(2x5,0nz) */
/* #12: @10 = 0x1 */
/* #13: @11 = 0x1 */
/* #14: @12 = 0x4 */
/* #15: @13 = 0x1 */
/* #16: @14 = 0x1 */
/* #17: @15 = 0x0 */
/* #18: @16 = ones(32x1,10nz) */
casadi_fill(w16, 10, 1.);
/* #19: {@17, NULL, NULL, NULL, NULL, @18, NULL, NULL, @19, NULL, NULL, @20, NULL, NULL, @21, NULL, NULL, @22, NULL, NULL, @23, NULL, NULL, @24, NULL, NULL, @25, NULL, NULL, @26, NULL, NULL} = vertsplit(@16) */
w17 = w16[0];
w18 = w16[1];
w19 = w16[2];
w20 = w16[3];
w21 = w16[4];
w22 = w16[5];
w23 = w16[6];
w24 = w16[7];
w25 = w16[8];
w26 = w16[9];
/* #20: @27 = 00 */
/* #21: @28 = vertcat(@17, @27) */
rr=(&w28);
*rr++ = w17;
/* #22: @29 = 00 */
/* #23: @30 = ones(32x1,7nz) */
casadi_fill(w30, 7, 1.);
/* #24: {NULL, @31, NULL, NULL, NULL, NULL, @32, NULL, NULL, NULL, NULL, NULL, @33, NULL, NULL, NULL, NULL, NULL, @34, NULL, NULL, NULL, NULL, NULL, @35, NULL, NULL, NULL, NULL, NULL, @36, @37} = vertsplit(@30) */
w31 = w30[0];
w32 = w30[1];
w33 = w30[2];
w34 = w30[3];
w35 = w30[4];
w36 = w30[5];
w37 = w30[6];
/* #25: @38 = vertcat(@29, @31) */
rr=(&w38);
*rr++ = w31;
/* #26: @39 = zeros(2x1,0nz) */
/* #27: @40 = horzcat(@28, @38, @39) */
rr=w40;
*rr++ = w28;
*rr++ = w38;
/* #28: @41 = dense(@40) */
casadi_densify(w40, casadi_s1, w41, 0);
/* #29: @39 = 00 */
/* #30: @42 = 00 */
/* #31: @43 = ones(32x1,5nz) */
casadi_fill(w43, 5, 1.);
/* #32: {NULL, NULL, @28, NULL, NULL, NULL, NULL, @38, NULL, NULL, NULL, NULL, NULL, @44, NULL, NULL, NULL, NULL, NULL, @45, NULL, NULL, NULL, NULL, NULL, @46, NULL, NULL, NULL, NULL, NULL, NULL} = vertsplit(@43) */
w28 = w43[0];
w38 = w43[1];
w44 = w43[2];
w45 = w43[3];
w46 = w43[4];
/* #33: @47 = horzcat(@39, @42, @28) */
rr=(&w47);
*rr++ = w28;
/* #34: @48 = dense(@47) */
casadi_densify((&w47), casadi_s2, w48, 0);
/* #35: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #36: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #37: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #38: @52 = 0x3 */
/* #39: {@53, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@3, @1, @2, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @41, @48, @49, @50, @51, @52) */
arg1[0]=w3;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w41;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w53;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #40: {@3, @40, @54} = horzsplit(@53) */
casadi_copy(w53, 2, w3);
casadi_copy(w53+2, 2, w40);
casadi_copy(w53+4, 2, w54);
/* #41: @3 = (-@3) */
for (i=0, rr=w3, cs=w3; i<2; ++i) *rr++ = (- *cs++ );
/* #42: @1 = input[0][3] */
w1 = arg[0] ? arg[0][3] : 0;
/* #43: @2 = input[0][4] */
w2 = arg[0] ? arg[0][4] : 0;
/* #44: @55 = vertcat(@1, @2) */
rr=w55;
*rr++ = w1;
*rr++ = w2;
/* #45: @1 = input[0][5] */
w1 = arg[0] ? arg[0][5] : 0;
/* #46: @2 = 1 */
w2 = 1.;
/* #47: @4 = 1 */
w4 = 1.;
/* #48: @6 = 0x1 */
/* #49: @7 = zeros(2x1,0nz) */
/* #50: @8 = zeros(2x2,0nz) */
/* #51: @9 = zeros(2x5,0nz) */
/* #52: @10 = 0x1 */
/* #53: @11 = 0x1 */
/* #54: @12 = 0x4 */
/* #55: @13 = 0x1 */
/* #56: @14 = 0x1 */
/* #57: @52 = zeros(2x1,0nz) */
/* #58: @43 = ones(32x1,5nz) */
casadi_fill(w43, 5, 1.);
/* #59: {NULL, NULL, NULL, @47, NULL, NULL, NULL, NULL, NULL, @56, NULL, NULL, NULL, NULL, NULL, @57, NULL, NULL, NULL, NULL, NULL, @58, NULL, NULL, NULL, NULL, NULL, @59, NULL, NULL, NULL, NULL} = vertsplit(@43) */
w47 = w43[0];
w56 = w43[1];
w57 = w43[2];
w58 = w43[3];
w59 = w43[4];
/* #60: @60 = 00 */
/* #61: @61 = vertcat(@47, @60) */
rr=(&w61);
*rr++ = w47;
/* #62: @62 = 00 */
/* #63: @43 = ones(32x1,5nz) */
casadi_fill(w43, 5, 1.);
/* #64: {NULL, NULL, NULL, NULL, @63, NULL, NULL, NULL, NULL, NULL, @64, NULL, NULL, NULL, NULL, NULL, @65, NULL, NULL, NULL, NULL, NULL, @66, NULL, NULL, NULL, NULL, NULL, @67, NULL, NULL, NULL} = vertsplit(@43) */
w63 = w43[0];
w64 = w43[1];
w65 = w43[2];
w66 = w43[3];
w67 = w43[4];
/* #65: @68 = vertcat(@62, @63) */
rr=(&w68);
*rr++ = w63;
/* #66: @69 = horzcat(@52, @61, @68) */
rr=w69;
*rr++ = w61;
*rr++ = w68;
/* #67: @53 = dense(@69) */
casadi_densify(w69, casadi_s3, w53, 0);
/* #68: @52 = 00 */
/* #69: @70 = 00 */
/* #70: @61 = horzcat(@18, @52, @70) */
rr=(&w61);
*rr++ = w18;
/* #71: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #72: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #73: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #74: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #75: @71 = 0x3 */
/* #76: {@41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@55, @1, @2, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @53, @48, @49, @50, @51, @71) */
arg1[0]=w55;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w53;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w41;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #77: {@55, @69, @72} = horzsplit(@41) */
casadi_copy(w41, 2, w55);
casadi_copy(w41+2, 2, w69);
casadi_copy(w41+4, 2, w72);
/* #78: @55 = (-@55) */
for (i=0, rr=w55, cs=w55; i<2; ++i) *rr++ = (- *cs++ );
/* #79: @6 = 00 */
/* #80: @1 = input[0][6] */
w1 = arg[0] ? arg[0][6] : 0;
/* #81: @2 = input[0][7] */
w2 = arg[0] ? arg[0][7] : 0;
/* #82: @73 = vertcat(@1, @2) */
rr=w73;
*rr++ = w1;
*rr++ = w2;
/* #83: @1 = input[0][8] */
w1 = arg[0] ? arg[0][8] : 0;
/* #84: @2 = 1 */
w2 = 1.;
/* #85: @4 = 2 */
w4 = 2.;
/* #86: @7 = 0x1 */
/* #87: @8 = zeros(2x1,0nz) */
/* #88: @9 = zeros(2x2,0nz) */
/* #89: @10 = zeros(2x5,0nz) */
/* #90: @11 = 0x1 */
/* #91: @12 = 0x1 */
/* #92: @13 = 0x4 */
/* #93: @14 = 0x1 */
/* #94: @71 = 0x1 */
/* #95: @74 = zeros(2x1,0nz) */
/* #96: @75 = 00 */
/* #97: @61 = vertcat(@32, @75) */
rr=(&w61);
*rr++ = w32;
/* #98: @76 = 00 */
/* #99: @68 = vertcat(@76, @38) */
rr=(&w68);
*rr++ = w38;
/* #100: @77 = horzcat(@74, @61, @68) */
rr=w77;
*rr++ = w61;
*rr++ = w68;
/* #101: @41 = dense(@77) */
casadi_densify(w77, casadi_s3, w41, 0);
/* #102: @74 = 00 */
/* #103: @78 = 00 */
/* #104: @61 = horzcat(@19, @74, @78) */
rr=(&w61);
*rr++ = w19;
/* #105: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #106: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #107: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #108: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #109: @79 = 0x3 */
/* #110: {@53, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@73, @1, @2, @4, @5, @7, @8, @9, @10, @11, @12, @13, @14, @71, @15, @41, @48, @49, @50, @51, @79) */
arg1[0]=w73;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w41;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w53;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #111: {@73, @77, @80} = horzsplit(@53) */
casadi_copy(w53, 2, w73);
casadi_copy(w53+2, 2, w77);
casadi_copy(w53+4, 2, w80);
/* #112: @73 = (-@73) */
for (i=0, rr=w73, cs=w73; i<2; ++i) *rr++ = (- *cs++ );
/* #113: @7 = 00 */
/* #114: @1 = input[0][9] */
w1 = arg[0] ? arg[0][9] : 0;
/* #115: @2 = input[0][10] */
w2 = arg[0] ? arg[0][10] : 0;
/* #116: @81 = vertcat(@1, @2) */
rr=w81;
*rr++ = w1;
*rr++ = w2;
/* #117: @1 = input[0][11] */
w1 = arg[0] ? arg[0][11] : 0;
/* #118: @2 = 1 */
w2 = 1.;
/* #119: @4 = 3 */
w4 = 3.;
/* #120: @8 = 0x1 */
/* #121: @9 = zeros(2x1,0nz) */
/* #122: @10 = zeros(2x2,0nz) */
/* #123: @11 = zeros(2x5,0nz) */
/* #124: @12 = 0x1 */
/* #125: @13 = 0x1 */
/* #126: @14 = 0x4 */
/* #127: @71 = 0x1 */
/* #128: @79 = 0x1 */
/* #129: @82 = zeros(2x1,0nz) */
/* #130: @83 = 00 */
/* #131: @61 = vertcat(@56, @83) */
rr=(&w61);
*rr++ = w56;
/* #132: @84 = 00 */
/* #133: @68 = vertcat(@84, @64) */
rr=(&w68);
*rr++ = w64;
/* #134: @85 = horzcat(@82, @61, @68) */
rr=w85;
*rr++ = w61;
*rr++ = w68;
/* #135: @53 = dense(@85) */
casadi_densify(w85, casadi_s3, w53, 0);
/* #136: @82 = 00 */
/* #137: @86 = 00 */
/* #138: @61 = horzcat(@20, @82, @86) */
rr=(&w61);
*rr++ = w20;
/* #139: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #140: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #141: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #142: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #143: @87 = 0x3 */
/* #144: {@41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@81, @1, @2, @4, @5, @8, @9, @10, @11, @12, @13, @14, @71, @79, @15, @53, @48, @49, @50, @51, @87) */
arg1[0]=w81;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w53;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w41;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #145: {@81, @85, @88} = horzsplit(@41) */
casadi_copy(w41, 2, w81);
casadi_copy(w41+2, 2, w85);
casadi_copy(w41+4, 2, w88);
/* #146: @81 = (-@81) */
for (i=0, rr=w81, cs=w81; i<2; ++i) *rr++ = (- *cs++ );
/* #147: @8 = 00 */
/* #148: @1 = input[0][12] */
w1 = arg[0] ? arg[0][12] : 0;
/* #149: @2 = input[0][13] */
w2 = arg[0] ? arg[0][13] : 0;
/* #150: @89 = vertcat(@1, @2) */
rr=w89;
*rr++ = w1;
*rr++ = w2;
/* #151: @1 = input[0][14] */
w1 = arg[0] ? arg[0][14] : 0;
/* #152: @2 = 1 */
w2 = 1.;
/* #153: @4 = 4 */
w4 = 4.;
/* #154: @9 = 0x1 */
/* #155: @10 = zeros(2x1,0nz) */
/* #156: @11 = zeros(2x2,0nz) */
/* #157: @12 = zeros(2x5,0nz) */
/* #158: @13 = 0x1 */
/* #159: @14 = 0x1 */
/* #160: @71 = 0x4 */
/* #161: @79 = 0x1 */
/* #162: @87 = 0x1 */
/* #163: @90 = zeros(2x1,0nz) */
/* #164: @91 = 00 */
/* #165: @61 = vertcat(@33, @91) */
rr=(&w61);
*rr++ = w33;
/* #166: @92 = 00 */
/* #167: @68 = vertcat(@92, @44) */
rr=(&w68);
*rr++ = w44;
/* #168: @93 = horzcat(@90, @61, @68) */
rr=w93;
*rr++ = w61;
*rr++ = w68;
/* #169: @41 = dense(@93) */
casadi_densify(w93, casadi_s3, w41, 0);
/* #170: @90 = 00 */
/* #171: @94 = 00 */
/* #172: @61 = horzcat(@21, @90, @94) */
rr=(&w61);
*rr++ = w21;
/* #173: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #174: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #175: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #176: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #177: @95 = 0x3 */
/* #178: {@53, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@89, @1, @2, @4, @5, @9, @10, @11, @12, @13, @14, @71, @79, @87, @15, @41, @48, @49, @50, @51, @95) */
arg1[0]=w89;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w41;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w53;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #179: {@89, @93, @96} = horzsplit(@53) */
casadi_copy(w53, 2, w89);
casadi_copy(w53+2, 2, w93);
casadi_copy(w53+4, 2, w96);
/* #180: @89 = (-@89) */
for (i=0, rr=w89, cs=w89; i<2; ++i) *rr++ = (- *cs++ );
/* #181: @9 = 00 */
/* #182: @1 = input[0][15] */
w1 = arg[0] ? arg[0][15] : 0;
/* #183: @2 = input[0][16] */
w2 = arg[0] ? arg[0][16] : 0;
/* #184: @97 = vertcat(@1, @2) */
rr=w97;
*rr++ = w1;
*rr++ = w2;
/* #185: @1 = input[0][17] */
w1 = arg[0] ? arg[0][17] : 0;
/* #186: @2 = 1 */
w2 = 1.;
/* #187: @4 = 5 */
w4 = 5.;
/* #188: @10 = 0x1 */
/* #189: @11 = zeros(2x1,0nz) */
/* #190: @12 = zeros(2x2,0nz) */
/* #191: @13 = zeros(2x5,0nz) */
/* #192: @14 = 0x1 */
/* #193: @71 = 0x1 */
/* #194: @79 = 0x4 */
/* #195: @87 = 0x1 */
/* #196: @95 = 0x1 */
/* #197: @98 = zeros(2x1,0nz) */
/* #198: @99 = 00 */
/* #199: @61 = vertcat(@57, @99) */
rr=(&w61);
*rr++ = w57;
/* #200: @100 = 00 */
/* #201: @68 = vertcat(@100, @65) */
rr=(&w68);
*rr++ = w65;
/* #202: @101 = horzcat(@98, @61, @68) */
rr=w101;
*rr++ = w61;
*rr++ = w68;
/* #203: @53 = dense(@101) */
casadi_densify(w101, casadi_s3, w53, 0);
/* #204: @98 = 00 */
/* #205: @102 = 00 */
/* #206: @61 = horzcat(@22, @98, @102) */
rr=(&w61);
*rr++ = w22;
/* #207: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #208: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #209: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #210: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #211: @103 = 0x3 */
/* #212: {@41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@97, @1, @2, @4, @5, @10, @11, @12, @13, @14, @71, @79, @87, @95, @15, @53, @48, @49, @50, @51, @103) */
arg1[0]=w97;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w53;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w41;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #213: {@97, @101, @104} = horzsplit(@41) */
casadi_copy(w41, 2, w97);
casadi_copy(w41+2, 2, w101);
casadi_copy(w41+4, 2, w104);
/* #214: @97 = (-@97) */
for (i=0, rr=w97, cs=w97; i<2; ++i) *rr++ = (- *cs++ );
/* #215: @10 = 00 */
/* #216: @1 = input[0][18] */
w1 = arg[0] ? arg[0][18] : 0;
/* #217: @2 = input[0][19] */
w2 = arg[0] ? arg[0][19] : 0;
/* #218: @105 = vertcat(@1, @2) */
rr=w105;
*rr++ = w1;
*rr++ = w2;
/* #219: @1 = input[0][20] */
w1 = arg[0] ? arg[0][20] : 0;
/* #220: @2 = 1 */
w2 = 1.;
/* #221: @4 = 6 */
w4 = 6.;
/* #222: @11 = 0x1 */
/* #223: @12 = zeros(2x1,0nz) */
/* #224: @13 = zeros(2x2,0nz) */
/* #225: @14 = zeros(2x5,0nz) */
/* #226: @71 = 0x1 */
/* #227: @79 = 0x1 */
/* #228: @87 = 0x4 */
/* #229: @95 = 0x1 */
/* #230: @103 = 0x1 */
/* #231: @106 = zeros(2x1,0nz) */
/* #232: @107 = 00 */
/* #233: @61 = vertcat(@34, @107) */
rr=(&w61);
*rr++ = w34;
/* #234: @108 = 00 */
/* #235: @68 = vertcat(@108, @45) */
rr=(&w68);
*rr++ = w45;
/* #236: @109 = horzcat(@106, @61, @68) */
rr=w109;
*rr++ = w61;
*rr++ = w68;
/* #237: @41 = dense(@109) */
casadi_densify(w109, casadi_s3, w41, 0);
/* #238: @106 = 00 */
/* #239: @110 = 00 */
/* #240: @61 = horzcat(@23, @106, @110) */
rr=(&w61);
*rr++ = w23;
/* #241: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #242: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #243: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #244: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #245: @111 = 0x3 */
/* #246: {@53, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@105, @1, @2, @4, @5, @11, @12, @13, @14, @71, @79, @87, @95, @103, @15, @41, @48, @49, @50, @51, @111) */
arg1[0]=w105;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w41;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w53;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #247: {@105, @109, @112} = horzsplit(@53) */
casadi_copy(w53, 2, w105);
casadi_copy(w53+2, 2, w109);
casadi_copy(w53+4, 2, w112);
/* #248: @105 = (-@105) */
for (i=0, rr=w105, cs=w105; i<2; ++i) *rr++ = (- *cs++ );
/* #249: @11 = 00 */
/* #250: @1 = input[0][21] */
w1 = arg[0] ? arg[0][21] : 0;
/* #251: @2 = input[0][22] */
w2 = arg[0] ? arg[0][22] : 0;
/* #252: @113 = vertcat(@1, @2) */
rr=w113;
*rr++ = w1;
*rr++ = w2;
/* #253: @1 = input[0][23] */
w1 = arg[0] ? arg[0][23] : 0;
/* #254: @2 = 1 */
w2 = 1.;
/* #255: @4 = 7 */
w4 = 7.;
/* #256: @12 = 0x1 */
/* #257: @13 = zeros(2x1,0nz) */
/* #258: @14 = zeros(2x2,0nz) */
/* #259: @71 = zeros(2x5,0nz) */
/* #260: @79 = 0x1 */
/* #261: @87 = 0x1 */
/* #262: @95 = 0x4 */
/* #263: @103 = 0x1 */
/* #264: @111 = 0x1 */
/* #265: @114 = zeros(2x1,0nz) */
/* #266: @115 = 00 */
/* #267: @61 = vertcat(@58, @115) */
rr=(&w61);
*rr++ = w58;
/* #268: @116 = 00 */
/* #269: @68 = vertcat(@116, @66) */
rr=(&w68);
*rr++ = w66;
/* #270: @117 = horzcat(@114, @61, @68) */
rr=w117;
*rr++ = w61;
*rr++ = w68;
/* #271: @53 = dense(@117) */
casadi_densify(w117, casadi_s3, w53, 0);
/* #272: @114 = 00 */
/* #273: @118 = 00 */
/* #274: @61 = horzcat(@24, @114, @118) */
rr=(&w61);
*rr++ = w24;
/* #275: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #276: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #277: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #278: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #279: @119 = 0x3 */
/* #280: {@41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@113, @1, @2, @4, @5, @12, @13, @14, @71, @79, @87, @95, @103, @111, @15, @53, @48, @49, @50, @51, @119) */
arg1[0]=w113;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w53;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w41;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #281: {@113, @117, @120} = horzsplit(@41) */
casadi_copy(w41, 2, w113);
casadi_copy(w41+2, 2, w117);
casadi_copy(w41+4, 2, w120);
/* #282: @113 = (-@113) */
for (i=0, rr=w113, cs=w113; i<2; ++i) *rr++ = (- *cs++ );
/* #283: @12 = 00 */
/* #284: @1 = input[0][24] */
w1 = arg[0] ? arg[0][24] : 0;
/* #285: @2 = input[0][25] */
w2 = arg[0] ? arg[0][25] : 0;
/* #286: @121 = vertcat(@1, @2) */
rr=w121;
*rr++ = w1;
*rr++ = w2;
/* #287: @1 = input[0][26] */
w1 = arg[0] ? arg[0][26] : 0;
/* #288: @2 = 1 */
w2 = 1.;
/* #289: @4 = 8 */
w4 = 8.;
/* #290: @13 = 0x1 */
/* #291: @14 = zeros(2x1,0nz) */
/* #292: @71 = zeros(2x2,0nz) */
/* #293: @79 = zeros(2x5,0nz) */
/* #294: @87 = 0x1 */
/* #295: @95 = 0x1 */
/* #296: @103 = 0x4 */
/* #297: @111 = 0x1 */
/* #298: @119 = 0x1 */
/* #299: @122 = zeros(2x1,0nz) */
/* #300: @123 = 00 */
/* #301: @61 = vertcat(@35, @123) */
rr=(&w61);
*rr++ = w35;
/* #302: @124 = 00 */
/* #303: @68 = vertcat(@124, @46) */
rr=(&w68);
*rr++ = w46;
/* #304: @125 = horzcat(@122, @61, @68) */
rr=w125;
*rr++ = w61;
*rr++ = w68;
/* #305: @41 = dense(@125) */
casadi_densify(w125, casadi_s3, w41, 0);
/* #306: @122 = 00 */
/* #307: @126 = 00 */
/* #308: @61 = horzcat(@25, @122, @126) */
rr=(&w61);
*rr++ = w25;
/* #309: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #310: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #311: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #312: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #313: @127 = 0x3 */
/* #314: {@53, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@121, @1, @2, @4, @5, @13, @14, @71, @79, @87, @95, @103, @111, @119, @15, @41, @48, @49, @50, @51, @127) */
arg1[0]=w121;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w41;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w53;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #315: {@121, @125, @128} = horzsplit(@53) */
casadi_copy(w53, 2, w121);
casadi_copy(w53+2, 2, w125);
casadi_copy(w53+4, 2, w128);
/* #316: @121 = (-@121) */
for (i=0, rr=w121, cs=w121; i<2; ++i) *rr++ = (- *cs++ );
/* #317: @13 = 00 */
/* #318: @1 = input[0][27] */
w1 = arg[0] ? arg[0][27] : 0;
/* #319: @2 = input[0][28] */
w2 = arg[0] ? arg[0][28] : 0;
/* #320: @129 = vertcat(@1, @2) */
rr=w129;
*rr++ = w1;
*rr++ = w2;
/* #321: @1 = input[0][29] */
w1 = arg[0] ? arg[0][29] : 0;
/* #322: @2 = 1 */
w2 = 1.;
/* #323: @4 = 9 */
w4 = 9.;
/* #324: @14 = 0x1 */
/* #325: @71 = zeros(2x1,0nz) */
/* #326: @79 = zeros(2x2,0nz) */
/* #327: @87 = zeros(2x5,0nz) */
/* #328: @95 = 0x1 */
/* #329: @103 = 0x1 */
/* #330: @111 = 0x4 */
/* #331: @119 = 0x1 */
/* #332: @127 = 0x1 */
/* #333: @130 = zeros(2x1,0nz) */
/* #334: @131 = 00 */
/* #335: @61 = vertcat(@59, @131) */
rr=(&w61);
*rr++ = w59;
/* #336: @132 = 00 */
/* #337: @68 = vertcat(@132, @67) */
rr=(&w68);
*rr++ = w67;
/* #338: @133 = horzcat(@130, @61, @68) */
rr=w133;
*rr++ = w61;
*rr++ = w68;
/* #339: @53 = dense(@133) */
casadi_densify(w133, casadi_s3, w53, 0);
/* #340: @130 = 00 */
/* #341: @134 = 00 */
/* #342: @61 = horzcat(@26, @130, @134) */
rr=(&w61);
*rr++ = w26;
/* #343: @48 = dense(@61) */
casadi_densify((&w61), casadi_s4, w48, 0);
/* #344: @49 = zeros(1x3) */
casadi_clear(w49, 3);
/* #345: @50 = zeros(1x3) */
casadi_clear(w50, 3);
/* #346: @51 = zeros(1x3) */
casadi_clear(w51, 3);
/* #347: @135 = 0x3 */
/* #348: {@41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} = fwd3_F(@129, @1, @2, @4, @5, @14, @71, @79, @87, @95, @103, @111, @119, @127, @15, @53, @48, @49, @50, @51, @135) */
arg1[0]=w129;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w53;
arg1[16]=w48;
arg1[17]=w49;
arg1[18]=w50;
arg1[19]=w51;
arg1[20]=0;
res1[0]=w41;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
res1[6]=0;
res1[7]=0;
res1[8]=0;
if (casadi_f13(arg1, res1, iw, w, 0)) return 1;
/* #349: {@129, @133, @136} = horzsplit(@41) */
casadi_copy(w41, 2, w129);
casadi_copy(w41+2, 2, w133);
casadi_copy(w41+4, 2, w136);
/* #350: @129 = (-@129) */
for (i=0, rr=w129, cs=w129; i<2; ++i) *rr++ = (- *cs++ );
/* #351: @14 = 00 */
/* #352: @71 = 00 */
/* #353: @137 = vertcat(@3, @17, @27, @39, @55, @6, @18, @73, @7, @19, @81, @8, @20, @89, @9, @21, @97, @10, @22, @105, @11, @23, @113, @12, @24, @121, @13, @25, @129, @14, @26, @71) */
rr=w137;
for (i=0, cs=w3; i<2; ++i) *rr++ = *cs++;
*rr++ = w17;
for (i=0, cs=w55; i<2; ++i) *rr++ = *cs++;
*rr++ = w18;
for (i=0, cs=w73; i<2; ++i) *rr++ = *cs++;
*rr++ = w19;
for (i=0, cs=w81; i<2; ++i) *rr++ = *cs++;
*rr++ = w20;
for (i=0, cs=w89; i<2; ++i) *rr++ = *cs++;
*rr++ = w21;
for (i=0, cs=w97; i<2; ++i) *rr++ = *cs++;
*rr++ = w22;
for (i=0, cs=w105; i<2; ++i) *rr++ = *cs++;
*rr++ = w23;
for (i=0, cs=w113; i<2; ++i) *rr++ = *cs++;
*rr++ = w24;
for (i=0, cs=w121; i<2; ++i) *rr++ = *cs++;
*rr++ = w25;
for (i=0, cs=w129; i<2; ++i) *rr++ = *cs++;
*rr++ = w26;
/* #354: @138 = @137[:30] */
for (rr=w138, ss=w137+0; ss!=w137+30; ss+=1) *rr++ = *ss;
/* #355: (@0[0, 4, 8, 13, 17, 20, 23, 27, 30, 33, 37, 40, 43, 47, 50, 53, 57, 60, 63, 67, 70, 73, 77, 80, 83, 87, 90, 93, 97, 100] = @138) */
for (cii=casadi_s5, rr=w0, ss=w138; cii!=casadi_s5+30; ++cii, ++ss) rr[*cii] = *ss;
/* #356: @40 = (-@40) */
for (i=0, rr=w40, cs=w40; i<2; ++i) *rr++ = (- *cs++ );
/* #357: @27 = 00 */
/* #358: @39 = 00 */
/* #359: @77 = (-@77) */
for (i=0, rr=w77, cs=w77; i<2; ++i) *rr++ = (- *cs++ );
/* #360: @6 = 00 */
/* #361: @7 = 00 */
/* #362: @93 = (-@93) */
for (i=0, rr=w93, cs=w93; i<2; ++i) *rr++ = (- *cs++ );
/* #363: @8 = 00 */
/* #364: @9 = 00 */
/* #365: @109 = (-@109) */
for (i=0, rr=w109, cs=w109; i<2; ++i) *rr++ = (- *cs++ );
/* #366: @10 = 00 */
/* #367: @11 = 00 */
/* #368: @125 = (-@125) */
for (i=0, rr=w125, cs=w125; i<2; ++i) *rr++ = (- *cs++ );
/* #369: @12 = 00 */
/* #370: @13 = 00 */
/* #371: @139 = vertcat(@40, @29, @31, @42, @32, @75, @27, @39, @77, @32, @74, @33, @91, @6, @7, @93, @33, @90, @34, @107, @8, @9, @109, @34, @106, @35, @123, @10, @11, @125, @35, @122, @36, @37, @12, @13, @36) */
rr=w139;
for (i=0, cs=w40; i<2; ++i) *rr++ = *cs++;
*rr++ = w31;
*rr++ = w32;
for (i=0, cs=w77; i<2; ++i) *rr++ = *cs++;
*rr++ = w32;
*rr++ = w33;
for (i=0, cs=w93; i<2; ++i) *rr++ = *cs++;
*rr++ = w33;
*rr++ = w34;
for (i=0, cs=w109; i<2; ++i) *rr++ = *cs++;
*rr++ = w34;
*rr++ = w35;
for (i=0, cs=w125; i<2; ++i) *rr++ = *cs++;
*rr++ = w35;
*rr++ = w36;
*rr++ = w37;
*rr++ = w36;
/* #372: @140 = @139[:22] */
for (rr=w140, ss=w139+0; ss!=w139+22; ss+=1) *rr++ = *ss;
/* #373: (@0[1, 5, 9, 14, 21, 25, 29, 34, 41, 45, 49, 54, 61, 65, 69, 74, 81, 85, 89, 94, 98, 101] = @140) */
for (cii=casadi_s6, rr=w0, ss=w140; cii!=casadi_s6+22; ++cii, ++ss) rr[*cii] = *ss;
/* #374: @54 = (-@54) */
for (i=0, rr=w54, cs=w54; i<2; ++i) *rr++ = (- *cs++ );
/* #375: @29 = 00 */
/* #376: @42 = 00 */
/* #377: @75 = 00 */
/* #378: @27 = 00 */
/* #379: @80 = (-@80) */
for (i=0, rr=w80, cs=w80; i<2; ++i) *rr++ = (- *cs++ );
/* #380: @39 = 00 */
/* #381: @74 = 00 */
/* #382: @96 = (-@96) */
for (i=0, rr=w96, cs=w96; i<2; ++i) *rr++ = (- *cs++ );
/* #383: @91 = 00 */
/* #384: @6 = 00 */
/* #385: @112 = (-@112) */
for (i=0, rr=w112, cs=w112; i<2; ++i) *rr++ = (- *cs++ );
/* #386: @7 = 00 */
/* #387: @90 = 00 */
/* #388: @128 = (-@128) */
for (i=0, rr=w128, cs=w128; i<2; ++i) *rr++ = (- *cs++ );
/* #389: @107 = zeros(2x1,0nz) */
/* #390: @8 = 00 */
/* #391: @9 = 00 */
/* #392: @106 = 00 */
/* #393: @141 = vertcat(@54, @29, @42, @28, @76, @38, @75, @27, @80, @76, @78, @92, @44, @39, @74, @96, @92, @94, @108, @45, @91, @6, @112, @108, @110, @124, @46, @7, @90, @128, @124, @126, @107, @8, @9, @106) */
rr=w141;
for (i=0, cs=w54; i<2; ++i) *rr++ = *cs++;
*rr++ = w28;
*rr++ = w38;
for (i=0, cs=w80; i<2; ++i) *rr++ = *cs++;
*rr++ = w44;
for (i=0, cs=w96; i<2; ++i) *rr++ = *cs++;
*rr++ = w45;
for (i=0, cs=w112; i<2; ++i) *rr++ = *cs++;
*rr++ = w46;
for (i=0, cs=w128; i<2; ++i) *rr++ = *cs++;
/* #394: @142 = @141[:15] */
for (rr=w142, ss=w141+0; ss!=w141+15; ss+=1) *rr++ = *ss;
/* #395: (@0[2, 6, 10, 18, 22, 26, 38, 42, 46, 58, 62, 66, 78, 82, 86] = @142) */
for (cii=casadi_s7, rr=w0, ss=w142; cii!=casadi_s7+15; ++cii, ++ss) rr[*cii] = *ss;
/* #396: @29 = 00 */
/* #397: @42 = 00 */
/* #398: @76 = 00 */
/* #399: @69 = (-@69) */
for (i=0, rr=w69, cs=w69; i<2; ++i) *rr++ = (- *cs++ );
/* #400: @75 = 00 */
/* #401: @27 = 00 */
/* #402: @85 = (-@85) */
for (i=0, rr=w85, cs=w85; i<2; ++i) *rr++ = (- *cs++ );
/* #403: @78 = 00 */
/* #404: @92 = 00 */
/* #405: @101 = (-@101) */
for (i=0, rr=w101, cs=w101; i<2; ++i) *rr++ = (- *cs++ );
/* #406: @39 = 00 */
/* #407: @74 = 00 */
/* #408: @117 = (-@117) */
for (i=0, rr=w117, cs=w117; i<2; ++i) *rr++ = (- *cs++ );
/* #409: @94 = 00 */
/* #410: @108 = 00 */
/* #411: @133 = (-@133) */
for (i=0, rr=w133, cs=w133; i<2; ++i) *rr++ = (- *cs++ );
/* #412: @91 = 00 */
/* #413: @143 = vertcat(@47, @60, @29, @42, @76, @69, @47, @52, @56, @83, @75, @27, @85, @56, @82, @57, @99, @78, @92, @101, @57, @98, @58, @115, @39, @74, @117, @58, @114, @59, @131, @94, @108, @133, @59, @130, @91) */
rr=w143;
*rr++ = w47;
for (i=0, cs=w69; i<2; ++i) *rr++ = *cs++;
*rr++ = w47;
*rr++ = w56;
for (i=0, cs=w85; i<2; ++i) *rr++ = *cs++;
*rr++ = w56;
*rr++ = w57;
for (i=0, cs=w101; i<2; ++i) *rr++ = *cs++;
*rr++ = w57;
*rr++ = w58;
for (i=0, cs=w117; i<2; ++i) *rr++ = *cs++;
*rr++ = w58;
*rr++ = w59;
for (i=0, cs=w133; i<2; ++i) *rr++ = *cs++;
*rr++ = w59;
/* #414: @144 = @143[:20] */
for (rr=w144, ss=w143+0; ss!=w143+20; ss+=1) *rr++ = *ss;
/* #415: (@0[3, 11, 15, 19, 24, 31, 35, 39, 44, 51, 55, 59, 64, 71, 75, 79, 84, 91, 95, 99] = @144) */
for (cii=casadi_s8, rr=w0, ss=w144; cii!=casadi_s8+20; ++cii, ++ss) rr[*cii] = *ss;
/* #416: @60 = 00 */
/* #417: @29 = 00 */
/* #418: @42 = 00 */
/* #419: @72 = (-@72) */
for (i=0, rr=w72, cs=w72; i<2; ++i) *rr++ = (- *cs++ );
/* #420: @76 = 00 */
/* #421: @52 = 00 */
/* #422: @88 = (-@88) */
for (i=0, rr=w88, cs=w88; i<2; ++i) *rr++ = (- *cs++ );
/* #423: @83 = 00 */
/* #424: @75 = 00 */
/* #425: @104 = (-@104) */
for (i=0, rr=w104, cs=w104; i<2; ++i) *rr++ = (- *cs++ );
/* #426: @27 = 00 */
/* #427: @82 = 00 */
/* #428: @120 = (-@120) */
for (i=0, rr=w120, cs=w120; i<2; ++i) *rr++ = (- *cs++ );
/* #429: @99 = 00 */
/* #430: @78 = 00 */
/* #431: @136 = (-@136) */
for (i=0, rr=w136, cs=w136; i<2; ++i) *rr++ = (- *cs++ );
/* #432: @92 = 00 */
/* #433: @142 = vertcat(@62, @63, @60, @29, @42, @72, @62, @70, @84, @64, @76, @52, @88, @84, @86, @100, @65, @83, @75, @104, @100, @102, @116, @66, @27, @82, @120, @116, @118, @132, @67, @99, @78, @136, @132, @134, @92) */
rr=w142;
*rr++ = w63;
for (i=0, cs=w72; i<2; ++i) *rr++ = *cs++;
*rr++ = w64;
for (i=0, cs=w88; i<2; ++i) *rr++ = *cs++;
*rr++ = w65;
for (i=0, cs=w104; i<2; ++i) *rr++ = *cs++;
*rr++ = w66;
for (i=0, cs=w120; i<2; ++i) *rr++ = *cs++;
*rr++ = w67;
for (i=0, cs=w136; i<2; ++i) *rr++ = *cs++;
/* #434: @141 = @142[:15] */
for (rr=w141, ss=w142+0; ss!=w142+15; ss+=1) *rr++ = *ss;
/* #435: (@0[7, 12, 16, 28, 32, 36, 48, 52, 56, 68, 72, 76, 88, 92, 96] = @141) */
for (cii=casadi_s9, rr=w0, ss=w141; cii!=casadi_s9+15; ++cii, ++ss) rr[*cii] = *ss;
/* #436: @145 = @0' */
casadi_trans(w0,casadi_s11, w145, casadi_s10, iw);
/* #437: output[0][0] = @145 */
casadi_copy(w145, 102, res[0]);
return 0;
}
/* fwd1_ode:(x[2],u,z[0],p,t[1x1,0nz],out_ode[2x1,0nz],out_alg[0],out_quad[0],fwd_x[2],fwd_u,fwd_z[0],fwd_p,fwd_t[1x1,0nz])->(fwd_ode[2],fwd_alg[0],fwd_quad[0]) */
static int casadi_f19(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *w0=w+0, w1, w2, w3;
/* #0: @0 = input[8][0] */
casadi_copy(arg[8], 2, w0);
/* #1: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #2: @2 = (@1-@2) */
w2 = (w1-w2);
/* #3: @3 = input[9][0] */
w3 = arg[9] ? arg[9][0] : 0;
/* #4: @2 = (@2+@3) */
w2 += w3;
/* #5: @3 = input[11][0] */
w3 = arg[11] ? arg[11][0] : 0;
/* #6: @2 = (@2+@3) */
w2 += w3;
/* #7: output[0][0] = @2 */
if (res[0]) res[0][0] = w2;
/* #8: output[0][1] = @1 */
if (res[0]) res[0][1] = w1;
return 0;
}
/* fwd1_adj1_ode:(x[2],u,z[0],p,t[1x1,0nz],out_ode[2x1,0nz],out_alg[0],out_quad[0],adj_ode[2],adj_alg[0],adj_quad[0],out_adj_x[2x1,0nz],out_adj_u[1x1,0nz],out_adj_z[0],out_adj_p[1x1,0nz],out_adj_t[1x1,0nz],fwd_x[2],fwd_u,fwd_z[0],fwd_p,fwd_t[1x1,0nz],fwd_out_ode[2x1,0nz],fwd_out_alg[0],fwd_out_quad[0],fwd_adj_ode[2],fwd_adj_alg[0],fwd_adj_quad[0])->(fwd_adj_x[2],fwd_adj_u,fwd_adj_z[0],fwd_adj_p,fwd_adj_t[1x1,0nz]) */
static int casadi_f20(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real *w0=w+0, w1, w2;
/* #0: @0 = input[24][0] */
casadi_copy(arg[24], 2, w0);
/* #1: {@1, @2} = vertsplit(@0) */
w1 = w0[0];
w2 = w0[1];
/* #2: @2 = (@2+@1) */
w2 += w1;
/* #3: output[0][0] = @2 */
if (res[0]) res[0][0] = w2;
/* #4: @2 = (-@1) */
w2 = (- w1 );
/* #5: output[0][1] = @2 */
if (res[0]) res[0][1] = w2;
/* #6: output[1][0] = @1 */
if (res[1]) res[1][0] = w1;
/* #7: output[3][0] = @1 */
if (res[3]) res[3][0] = w1;
return 0;
}
/* fwd1_adj1_F:(x0[2],u,t0,DT,DT_control,p,z0[0],out_xf[2x1,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_poly_coeff_q[0x4],out_zf[0],out_poly_coeff_z[],adj_xf[2],adj_poly_coeff[2x5],adj_qf[0],adj_poly_coeff_q[0x4],adj_zf[0],adj_poly_coeff_z[],out_adj_x0[2x1,0nz],out_adj_u[1x1,0nz],out_adj_t0[1x1,0nz],out_adj_DT[1x1,0nz],out_adj_DT_control[1x1,0nz],out_adj_p[1x1,0nz],out_adj_z0[0],fwd_x0[2],fwd_u,fwd_t0,fwd_DT,fwd_DT_control,fwd_p,fwd_z0[0],fwd_out_xf[2x1,0nz],fwd_out_poly_coeff[2x5,0nz],fwd_out_qf[0],fwd_out_poly_coeff_q[0x4],fwd_out_zf[0],fwd_out_poly_coeff_z[],fwd_adj_xf[2],fwd_adj_poly_coeff[2x5],fwd_adj_qf[0],fwd_adj_poly_coeff_q[0x4],fwd_adj_zf[0],fwd_adj_poly_coeff_z[])->(fwd_adj_x0[2],fwd_adj_u,fwd_adj_t0[1x1,0nz],fwd_adj_DT,fwd_adj_DT_control[1x1,0nz],fwd_adj_p,fwd_adj_z0[0]) */
static int casadi_f18(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+7, *rr;
const casadi_real **arg1=arg+45, *cr, *cs;
casadi_real *w0=w+5, *w1=w+15, *w2=w+17, *w3=w+19, *w4=w+21, *w5=w+23, *w6=w+25, *w7=w+27, w8, w9, w10, w11, w13, *w15=w+34, *w16=w+36, *w19=w+38, *w20=w+40, *w23=w+42, *w24=w+44, w30, w31, *w32=w+48, *w33=w+50, *w34=w+52, *w35=w+54, w36, w37, *w38=w+58, *w39=w+60, w40, *w41=w+63, *w42=w+65, *w43=w+67, *w51=w+69, w52, *w53=w+72, w57, *w58=w+75, w62, *w63=w+78, w67, w69, *w71=w+82, *w72=w+84, *w73=w+86, *w74=w+88, w75, *w76=w+91, *w79=w+93, w80, w81, w82, *w83=w+98, *w84=w+100, *w85=w+102, w86, *w87=w+105, *w88=w+107, w89, w90, w91, w92;
/* #0: @0 = input[40][0] */
casadi_copy(arg[40], 10, w0);
/* #1: {@1, @2, @3, @4, @5} = horzsplit(@0) */
casadi_copy(w0, 2, w1);
casadi_copy(w0+2, 2, w2);
casadi_copy(w0+4, 2, w3);
casadi_copy(w0+6, 2, w4);
casadi_copy(w0+8, 2, w5);
/* #2: @6 = input[39][0] */
casadi_copy(arg[39], 2, w6);
/* #3: @1 = (@1+@6) */
for (i=0, rr=w1, cs=w6; i<2; ++i) (*rr++) += (*cs++);
/* #4: @7 = input[0][0] */
casadi_copy(arg[0], 2, w7);
/* #5: @8 = input[3][0] */
w8 = arg[3] ? arg[3][0] : 0;
/* #6: @9 = 2 */
w9 = 2.;
/* #7: @9 = (@8/@9) */
w9 = (w8/w9);
/* #8: @10 = 2 */
w10 = 2.;
/* #9: @10 = (@8/@10) */
w10 = (w8/w10);
/* #10: @11 = input[1][0] */
w11 = arg[1] ? arg[1][0] : 0;
/* #11: @12 = 0x1 */
/* #12: @13 = input[5][0] */
w13 = arg[5] ? arg[5][0] : 0;
/* #13: @14 = 00 */
/* #14: {@15, NULL, NULL} = ode(@7, @11, @12, @13, @14) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w15;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #15: @16 = (@10*@15) */
for (i=0, rr=w16, cs=w15; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #16: @16 = (@7+@16) */
for (i=0, rr=w16, cr=w7, cs=w16; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #17: @17 = 0x1 */
/* #18: @18 = 00 */
/* #19: {@19, NULL, NULL} = ode(@16, @11, @17, @13, @18) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w19;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #20: @20 = (@9*@19) */
for (i=0, rr=w20, cs=w19; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #21: @20 = (@7+@20) */
for (i=0, rr=w20, cr=w7, cs=w20; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #22: @21 = 0x1 */
/* #23: @22 = 00 */
/* #24: {@23, NULL, NULL} = ode(@20, @11, @21, @13, @22) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w23;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #25: @24 = (@8*@23) */
for (i=0, rr=w24, cs=w23; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #26: @24 = (@7+@24) */
for (i=0, rr=w24, cr=w7, cs=w24; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #27: @25 = 0x1 */
/* #28: @26 = 00 */
/* #29: @27 = zeros(2x1,0nz) */
/* #30: @28 = 0x1 */
/* #31: @29 = 0x1 */
/* #32: @30 = 4 */
w30 = 4.;
/* #33: @31 = 0.0416667 */
w31 = 4.1666666666666664e-02;
/* #34: @0 = input[14][0] */
casadi_copy(arg[14], 10, w0);
/* #35: {NULL, @32, @33, @34, @35} = horzsplit(@0) */
casadi_copy(w0+2, 2, w32);
casadi_copy(w0+4, 2, w33);
casadi_copy(w0+6, 2, w34);
casadi_copy(w0+8, 2, w35);
/* #36: @35 = (@31*@35) */
for (i=0, rr=w35, cs=w35; i<2; ++i) (*rr++) = (w31*(*cs++));
/* #37: @36 = 3 */
w36 = 3.;
/* #38: @37 = pow(@8,@36) */
w37 = pow(w8,w36);
/* #39: @38 = (@35/@37) */
for (i=0, rr=w38, cr=w35; i<2; ++i) (*rr++) = ((*cr++)/w37);
/* #40: @39 = (@30*@38) */
for (i=0, rr=w39, cs=w38; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #41: @40 = 6 */
w40 = 6.;
/* #42: @40 = (@8/@40) */
w40 = (w8/w40);
/* #43: @41 = input[13][0] */
casadi_copy(arg[13], 2, w41);
/* #44: @42 = (@40*@41) */
for (i=0, rr=w42, cs=w41; i<2; ++i) (*rr++) = (w40*(*cs++));
/* #45: @43 = (@39+@42) */
for (i=0, rr=w43, cr=w39, cs=w42; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #46: @44 = 0x1 */
/* #47: @45 = 0x1 */
/* #48: @46 = zeros(2x1,0nz) */
/* #49: @47 = 00 */
/* #50: @48 = 0x1 */
/* #51: @49 = 00 */
/* #52: @50 = 00 */
/* #53: @51 = input[26][0] */
casadi_copy(arg[26], 2, w51);
/* #54: @52 = input[29][0] */
w52 = arg[29] ? arg[29][0] : 0;
/* #55: @53 = (@23*@52) */
for (i=0, rr=w53, cr=w23; i<2; ++i) (*rr++) = ((*cr++)*w52);
/* #56: @54 = zeros(2x1,0nz) */
/* #57: @55 = 0x1 */
/* #58: @56 = 0x1 */
/* #59: @57 = 0.5 */
w57 = 5.0000000000000000e-01;
/* #60: @57 = (@57*@52) */
w57 *= w52;
/* #61: @58 = (@19*@57) */
for (i=0, rr=w58, cr=w19; i<2; ++i) (*rr++) = ((*cr++)*w57);
/* #62: @59 = zeros(2x1,0nz) */
/* #63: @60 = 0x1 */
/* #64: @61 = 0x1 */
/* #65: @62 = 0.5 */
w62 = 5.0000000000000000e-01;
/* #66: @62 = (@62*@52) */
w62 *= w52;
/* #67: @63 = (@15*@62) */
for (i=0, rr=w63, cr=w15; i<2; ++i) (*rr++) = ((*cr++)*w62);
/* #68: @64 = zeros(2x1,0nz) */
/* #69: @65 = 0x1 */
/* #70: @66 = 0x1 */
/* #71: @67 = input[27][0] */
w67 = arg[27] ? arg[27][0] : 0;
/* #72: @68 = 0x1 */
/* #73: @69 = input[31][0] */
w69 = arg[31] ? arg[31][0] : 0;
/* #74: @70 = 00 */
/* #75: {@71, NULL, NULL} = fwd1_ode(@7, @11, @12, @13, @14, @64, @65, @66, @51, @67, @68, @69, @70) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w51;
arg1[9]=(&w67);
arg1[10]=0;
arg1[11]=(&w69);
arg1[12]=0;
res1[0]=w71;
res1[1]=0;
res1[2]=0;
if (casadi_f19(arg1, res1, iw, w, 0)) return 1;
/* #76: @72 = (@10*@71) */
for (i=0, rr=w72, cs=w71; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #77: @63 = (@63+@72) */
for (i=0, rr=w63, cs=w72; i<2; ++i) (*rr++) += (*cs++);
/* #78: @63 = (@51+@63) */
for (i=0, rr=w63, cr=w51, cs=w63; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #79: @64 = 0x1 */
/* #80: @65 = 00 */
/* #81: {@72, NULL, NULL} = fwd1_ode(@16, @11, @17, @13, @18, @59, @60, @61, @63, @67, @64, @69, @65) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w63;
arg1[9]=(&w67);
arg1[10]=0;
arg1[11]=(&w69);
arg1[12]=0;
res1[0]=w72;
res1[1]=0;
res1[2]=0;
if (casadi_f19(arg1, res1, iw, w, 0)) return 1;
/* #82: @73 = (@9*@72) */
for (i=0, rr=w73, cs=w72; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #83: @58 = (@58+@73) */
for (i=0, rr=w58, cs=w73; i<2; ++i) (*rr++) += (*cs++);
/* #84: @58 = (@51+@58) */
for (i=0, rr=w58, cr=w51, cs=w58; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #85: @59 = 0x1 */
/* #86: @60 = 00 */
/* #87: {@73, NULL, NULL} = fwd1_ode(@20, @11, @21, @13, @22, @54, @55, @56, @58, @67, @59, @69, @60) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w58;
arg1[9]=(&w67);
arg1[10]=0;
arg1[11]=(&w69);
arg1[12]=0;
res1[0]=w73;
res1[1]=0;
res1[2]=0;
if (casadi_f19(arg1, res1, iw, w, 0)) return 1;
/* #88: @74 = (@8*@73) */
for (i=0, rr=w74, cs=w73; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #89: @53 = (@53+@74) */
for (i=0, rr=w53, cs=w74; i<2; ++i) (*rr++) += (*cs++);
/* #90: @53 = (@51+@53) */
for (i=0, rr=w53, cr=w51, cs=w53; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #91: @54 = 0x1 */
/* #92: @55 = 00 */
/* #93: @56 = zeros(2x1,0nz) */
/* #94: @61 = 0x1 */
/* #95: @66 = 0x1 */
/* #96: @5 = (@31*@5) */
for (i=0, rr=w5, cs=w5; i<2; ++i) (*rr++) = (w31*(*cs++));
/* #97: @74 = (@5/@37) */
for (i=0, rr=w74, cr=w5; i<2; ++i) (*rr++) = ((*cr++)/w37);
/* #98: @38 = (@38/@37) */
for (i=0, rr=w38; i<2; ++i) (*rr++) /= w37;
/* #99: @31 = sq(@8) */
w31 = casadi_sq( w8 );
/* #100: @31 = (@36*@31) */
w31 = (w36*w31);
/* #101: @31 = (@31*@52) */
w31 *= w52;
/* #102: @38 = (@38*@31) */
for (i=0, rr=w38; i<2; ++i) (*rr++) *= w31;
/* #103: @74 = (@74-@38) */
for (i=0, rr=w74, cs=w38; i<2; ++i) (*rr++) -= (*cs++);
/* #104: @74 = (@30*@74) */
for (i=0, rr=w74, cs=w74; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #105: @75 = 0.166667 */
w75 = 1.6666666666666666e-01;
/* #106: @75 = (@75*@52) */
w75 *= w52;
/* #107: @38 = (@41*@75) */
for (i=0, rr=w38, cr=w41; i<2; ++i) (*rr++) = ((*cr++)*w75);
/* #108: @76 = (@40*@6) */
for (i=0, rr=w76, cs=w6; i<2; ++i) (*rr++) = (w40*(*cs++));
/* #109: @38 = (@38+@76) */
for (i=0, rr=w38, cs=w76; i<2; ++i) (*rr++) += (*cs++);
/* #110: @76 = (@74+@38) */
for (i=0, rr=w76, cr=w74, cs=w38; i<2; ++i) (*rr++) = ((*cr++)+(*cs++));
/* #111: @77 = 0x1 */
/* #112: @78 = 0x1 */
/* #113: {@79, @40, NULL, @75, NULL} = fwd1_adj1_ode(@24, @11, @25, @13, @26, @27, @28, @29, @43, @44, @45, @46, @47, @48, @49, @50, @53, @67, @54, @69, @55, @56, @61, @66, @76, @77, @78) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w43;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=0;
arg1[16]=w53;
arg1[17]=(&w67);
arg1[18]=0;
arg1[19]=(&w69);
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=w76;
arg1[25]=0;
arg1[26]=0;
res1[0]=w79;
res1[1]=(&w40);
res1[2]=0;
res1[3]=(&w75);
res1[4]=0;
if (casadi_f20(arg1, res1, iw, w, 0)) return 1;
/* #114: @1 = (@1+@79) */
for (i=0, rr=w1, cs=w79; i<2; ++i) (*rr++) += (*cs++);
/* #115: @46 = zeros(2x1,0nz) */
/* #116: @47 = 0x1 */
/* #117: @48 = 0x1 */
/* #118: @76 = (-@39) */
for (i=0, rr=w76, cs=w39; i<2; ++i) *rr++ = (- *cs++ );
/* #119: @76 = (2.*@76) */
for (i=0, rr=w76, cs=w76; i<2; ++i) *rr++ = (2.* *cs++ );
/* #120: @80 = 4 */
w80 = 4.;
/* #121: @81 = sq(@8) */
w81 = casadi_sq( w8 );
/* #122: @80 = (@80/@81) */
w80 /= w81;
/* #123: @82 = 0.166667 */
w82 = 1.6666666666666666e-01;
/* #124: @34 = (@82*@34) */
for (i=0, rr=w34, cs=w34; i<2; ++i) (*rr++) = (w82*(*cs++));
/* #125: @83 = (@80*@34) */
for (i=0, rr=w83, cs=w34; i<2; ++i) (*rr++) = (w80*(*cs++));
/* #126: @76 = (@76+@83) */
for (i=0, rr=w76, cs=w83; i<2; ++i) (*rr++) += (*cs++);
/* #127: {@84, NULL, NULL, NULL, NULL} = adj1_ode(@24, @11, @25, @13, @26, @27, @28, @29, @43, @44, @45) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w43;
arg1[9]=0;
arg1[10]=0;
res1[0]=w84;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #128: @43 = (@8*@84) */
for (i=0, rr=w43, cs=w84; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #129: @76 = (@76+@43) */
for (i=0, rr=w76, cs=w43; i<2; ++i) (*rr++) += (*cs++);
/* #130: @43 = (2.*@42) */
for (i=0, rr=w43, cs=w42; i<2; ++i) *rr++ = (2.* *cs++ );
/* #131: @76 = (@76+@43) */
for (i=0, rr=w76, cs=w43; i<2; ++i) (*rr++) += (*cs++);
/* #132: @27 = 0x1 */
/* #133: @28 = 0x1 */
/* #134: @29 = zeros(2x1,0nz) */
/* #135: @44 = 00 */
/* #136: @45 = 0x1 */
/* #137: @49 = 00 */
/* #138: @50 = 00 */
/* #139: @56 = zeros(2x1,0nz) */
/* #140: @61 = 0x1 */
/* #141: @66 = 0x1 */
/* #142: @43 = (-@74) */
for (i=0, rr=w43, cs=w74; i<2; ++i) *rr++ = (- *cs++ );
/* #143: @43 = (2.*@43) */
for (i=0, rr=w43, cs=w43; i<2; ++i) *rr++ = (2.* *cs++ );
/* #144: @4 = (@82*@4) */
for (i=0, rr=w4, cs=w4; i<2; ++i) (*rr++) = (w82*(*cs++));
/* #145: @85 = (@80*@4) */
for (i=0, rr=w85, cs=w4; i<2; ++i) (*rr++) = (w80*(*cs++));
/* #146: @82 = (@80/@81) */
w82 = (w80/w81);
/* #147: @86 = (2.*@8) */
w86 = (2.* w8 );
/* #148: @86 = (@86*@52) */
w86 *= w52;
/* #149: @82 = (@82*@86) */
w82 *= w86;
/* #150: @87 = (@34*@82) */
for (i=0, rr=w87, cr=w34; i<2; ++i) (*rr++) = ((*cr++)*w82);
/* #151: @85 = (@85-@87) */
for (i=0, rr=w85, cs=w87; i<2; ++i) (*rr++) -= (*cs++);
/* #152: @43 = (@43+@85) */
for (i=0, rr=w43, cs=w85; i<2; ++i) (*rr++) += (*cs++);
/* #153: @87 = (@84*@52) */
for (i=0, rr=w87, cr=w84; i<2; ++i) (*rr++) = ((*cr++)*w52);
/* #154: @88 = (@8*@79) */
for (i=0, rr=w88, cs=w79; i<2; ++i) (*rr++) = (w8*(*cs++));
/* #155: @87 = (@87+@88) */
for (i=0, rr=w87, cs=w88; i<2; ++i) (*rr++) += (*cs++);
/* #156: @43 = (@43+@87) */
for (i=0, rr=w43, cs=w87; i<2; ++i) (*rr++) += (*cs++);
/* #157: @87 = (2.*@38) */
for (i=0, rr=w87, cs=w38; i<2; ++i) *rr++ = (2.* *cs++ );
/* #158: @43 = (@43+@87) */
for (i=0, rr=w43, cs=w87; i<2; ++i) (*rr++) += (*cs++);
/* #159: @77 = 0x1 */
/* #160: @78 = 0x1 */
/* #161: {@87, @89, NULL, @90, NULL} = fwd1_adj1_ode(@20, @11, @21, @13, @22, @46, @47, @48, @76, @27, @28, @29, @44, @45, @49, @50, @58, @67, @59, @69, @60, @56, @61, @66, @43, @77, @78) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w76;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=0;
arg1[16]=w58;
arg1[17]=(&w67);
arg1[18]=0;
arg1[19]=(&w69);
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=w43;
arg1[25]=0;
arg1[26]=0;
res1[0]=w87;
res1[1]=(&w89);
res1[2]=0;
res1[3]=(&w90);
res1[4]=0;
if (casadi_f20(arg1, res1, iw, w, 0)) return 1;
/* #162: @1 = (@1+@87) */
for (i=0, rr=w1, cs=w87; i<2; ++i) (*rr++) += (*cs++);
/* #163: @29 = zeros(2x1,0nz) */
/* #164: @44 = 0x1 */
/* #165: @45 = 0x1 */
/* #166: @91 = 2 */
w91 = 2.;
/* #167: @91 = (@91/@8) */
w91 /= w8;
/* #168: @92 = 0.5 */
w92 = 5.0000000000000000e-01;
/* #169: @33 = (@92*@33) */
for (i=0, rr=w33, cs=w33; i<2; ++i) (*rr++) = (w92*(*cs++));
/* #170: @58 = (@91*@33) */
for (i=0, rr=w58, cs=w33; i<2; ++i) (*rr++) = (w91*(*cs++));
/* #171: @83 = (@58-@83) */
for (i=0, rr=w83, cr=w58, cs=w83; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #172: {@43, NULL, NULL, NULL, NULL} = adj1_ode(@20, @11, @21, @13, @22, @46, @47, @48, @76, @27, @28) */
arg1[0]=w20;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w76;
arg1[9]=0;
arg1[10]=0;
res1[0]=w43;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #173: @20 = (@9*@43) */
for (i=0, rr=w20, cs=w43; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #174: @83 = (@83+@20) */
for (i=0, rr=w83, cs=w20; i<2; ++i) (*rr++) += (*cs++);
/* #175: @20 = (2.*@42) */
for (i=0, rr=w20, cs=w42; i<2; ++i) *rr++ = (2.* *cs++ );
/* #176: @83 = (@83+@20) */
for (i=0, rr=w83, cs=w20; i<2; ++i) (*rr++) += (*cs++);
/* #177: @21 = 0x1 */
/* #178: @22 = 0x1 */
/* #179: @46 = zeros(2x1,0nz) */
/* #180: @47 = 00 */
/* #181: @48 = 0x1 */
/* #182: @27 = 00 */
/* #183: @28 = 00 */
/* #184: @49 = zeros(2x1,0nz) */
/* #185: @50 = 0x1 */
/* #186: @59 = 0x1 */
/* #187: @3 = (@92*@3) */
for (i=0, rr=w3, cs=w3; i<2; ++i) (*rr++) = (w92*(*cs++));
/* #188: @20 = (@91*@3) */
for (i=0, rr=w20, cs=w3; i<2; ++i) (*rr++) = (w91*(*cs++));
/* #189: @92 = (@91/@8) */
w92 = (w91/w8);
/* #190: @92 = (@92*@52) */
w92 *= w52;
/* #191: @76 = (@33*@92) */
for (i=0, rr=w76, cr=w33; i<2; ++i) (*rr++) = ((*cr++)*w92);
/* #192: @20 = (@20-@76) */
for (i=0, rr=w20, cs=w76; i<2; ++i) (*rr++) -= (*cs++);
/* #193: @85 = (@20-@85) */
for (i=0, rr=w85, cr=w20, cs=w85; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #194: @76 = (@43*@57) */
for (i=0, rr=w76, cr=w43; i<2; ++i) (*rr++) = ((*cr++)*w57);
/* #195: @88 = (@9*@87) */
for (i=0, rr=w88, cs=w87; i<2; ++i) (*rr++) = (w9*(*cs++));
/* #196: @76 = (@76+@88) */
for (i=0, rr=w76, cs=w88; i<2; ++i) (*rr++) += (*cs++);
/* #197: @85 = (@85+@76) */
for (i=0, rr=w85, cs=w76; i<2; ++i) (*rr++) += (*cs++);
/* #198: @76 = (2.*@38) */
for (i=0, rr=w76, cs=w38; i<2; ++i) *rr++ = (2.* *cs++ );
/* #199: @85 = (@85+@76) */
for (i=0, rr=w85, cs=w76; i<2; ++i) (*rr++) += (*cs++);
/* #200: @60 = 0x1 */
/* #201: @56 = 0x1 */
/* #202: {@76, @9, NULL, @57, NULL} = fwd1_adj1_ode(@16, @11, @17, @13, @18, @29, @44, @45, @83, @21, @22, @46, @47, @48, @27, @28, @63, @67, @64, @69, @65, @49, @50, @59, @85, @60, @56) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w83;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=0;
arg1[16]=w63;
arg1[17]=(&w67);
arg1[18]=0;
arg1[19]=(&w69);
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=w85;
arg1[25]=0;
arg1[26]=0;
res1[0]=w76;
res1[1]=(&w9);
res1[2]=0;
res1[3]=(&w57);
res1[4]=0;
if (casadi_f20(arg1, res1, iw, w, 0)) return 1;
/* #203: @1 = (@1+@76) */
for (i=0, rr=w1, cs=w76; i<2; ++i) (*rr++) += (*cs++);
/* #204: @46 = zeros(2x1,0nz) */
/* #205: @47 = 0x1 */
/* #206: @48 = 0x1 */
/* #207: @39 = (@39-@58) */
for (i=0, rr=w39, cs=w58; i<2; ++i) (*rr++) -= (*cs++);
/* #208: @39 = (@39+@32) */
for (i=0, rr=w39, cs=w32; i<2; ++i) (*rr++) += (*cs++);
/* #209: @39 = (@39+@42) */
for (i=0, rr=w39, cs=w42; i<2; ++i) (*rr++) += (*cs++);
/* #210: {@42, NULL, NULL, NULL, NULL} = adj1_ode(@16, @11, @17, @13, @18, @29, @44, @45, @83, @21, @22) */
arg1[0]=w16;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w83;
arg1[9]=0;
arg1[10]=0;
res1[0]=w42;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=0;
if (casadi_f8(arg1, res1, iw, w, 0)) return 1;
/* #211: @16 = (@10*@42) */
for (i=0, rr=w16, cs=w42; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #212: @39 = (@39+@16) */
for (i=0, rr=w39, cs=w16; i<2; ++i) (*rr++) += (*cs++);
/* #213: @17 = 0x1 */
/* #214: @18 = 0x1 */
/* #215: @29 = zeros(2x1,0nz) */
/* #216: @44 = 00 */
/* #217: @45 = 0x1 */
/* #218: @21 = 00 */
/* #219: @22 = 00 */
/* #220: @27 = zeros(2x1,0nz) */
/* #221: @28 = 0x1 */
/* #222: @64 = 0x1 */
/* #223: @74 = (@74-@20) */
for (i=0, rr=w74, cs=w20; i<2; ++i) (*rr++) -= (*cs++);
/* #224: @74 = (@74+@2) */
for (i=0, rr=w74, cs=w2; i<2; ++i) (*rr++) += (*cs++);
/* #225: @74 = (@74+@38) */
for (i=0, rr=w74, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #226: @38 = (@42*@62) */
for (i=0, rr=w38, cr=w42; i<2; ++i) (*rr++) = ((*cr++)*w62);
/* #227: @2 = (@10*@76) */
for (i=0, rr=w2, cs=w76; i<2; ++i) (*rr++) = (w10*(*cs++));
/* #228: @38 = (@38+@2) */
for (i=0, rr=w38, cs=w2; i<2; ++i) (*rr++) += (*cs++);
/* #229: @74 = (@74+@38) */
for (i=0, rr=w74, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #230: @65 = 0x1 */
/* #231: @49 = 0x1 */
/* #232: {@38, @10, NULL, @62, NULL} = fwd1_adj1_ode(@7, @11, @12, @13, @14, @46, @47, @48, @39, @17, @18, @29, @44, @45, @21, @22, @51, @67, @68, @69, @70, @27, @28, @64, @74, @65, @49) */
arg1[0]=w7;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w39;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=0;
arg1[16]=w51;
arg1[17]=(&w67);
arg1[18]=0;
arg1[19]=(&w69);
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=w74;
arg1[25]=0;
arg1[26]=0;
res1[0]=w38;
res1[1]=(&w10);
res1[2]=0;
res1[3]=(&w62);
res1[4]=0;
if (casadi_f20(arg1, res1, iw, w, 0)) return 1;
/* #233: @1 = (@1+@38) */
for (i=0, rr=w1, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #234: output[0][0] = @1 */
casadi_copy(w1, 2, res[0]);
/* #235: @40 = (@40+@89) */
w40 += w89;
/* #236: @40 = (@40+@9) */
w40 += w9;
/* #237: @40 = (@40+@10) */
w40 += w10;
/* #238: output[1][0] = @40 */
if (res[1]) res[1][0] = w40;
/* #239: {@1, NULL, NULL} = ode(@24, @11, @25, @13, @26) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
res1[0]=w1;
res1[1]=0;
res1[2]=0;
if (casadi_f5(arg1, res1, iw, w, 0)) return 1;
/* #240: @38 = (2.*@23) */
for (i=0, rr=w38, cs=w23; i<2; ++i) *rr++ = (2.* *cs++ );
/* #241: @38 = (@1-@38) */
for (i=0, rr=w38, cr=w1, cs=w38; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #242: @38 = (@38+@15) */
for (i=0, rr=w38, cs=w15; i<2; ++i) (*rr++) += (*cs++);
/* #243: @38 = (@30*@38) */
for (i=0, rr=w38, cs=w38; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #244: @38 = (@38/@37) */
for (i=0, rr=w38; i<2; ++i) (*rr++) /= w37;
/* #245: @7 = (@38/@37) */
for (i=0, rr=w7, cr=w38; i<2; ++i) (*rr++) = ((*cr++)/w37);
/* #246: @39 = (-@7) */
for (i=0, rr=w39, cs=w7; i<2; ++i) *rr++ = (- *cs++ );
/* #247: @40 = dot(@39, @35) */
w40 = casadi_dot(2, w39, w35);
/* #248: @10 = (2.*@8) */
w10 = (2.* w8 );
/* #249: @10 = (@10*@52) */
w10 *= w52;
/* #250: @10 = (@36*@10) */
w10 = (w36*w10);
/* #251: @40 = (@40*@10) */
w40 *= w10;
/* #252: @10 = sq(@8) */
w10 = casadi_sq( w8 );
/* #253: @36 = (@36*@10) */
w36 *= w10;
/* #254: @10 = dot(@39, @5) */
w10 = casadi_dot(2, w39, w5);
/* #255: @12 = zeros(2x1,0nz) */
/* #256: @14 = 0x1 */
/* #257: @46 = 0x1 */
/* #258: {@39, NULL, NULL} = fwd1_ode(@24, @11, @25, @13, @26, @12, @14, @46, @53, @67, @54, @69, @55) */
arg1[0]=w24;
arg1[1]=(&w11);
arg1[2]=0;
arg1[3]=(&w13);
arg1[4]=0;
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=w53;
arg1[9]=(&w67);
arg1[10]=0;
arg1[11]=(&w69);
arg1[12]=0;
res1[0]=w39;
res1[1]=0;
res1[2]=0;
if (casadi_f19(arg1, res1, iw, w, 0)) return 1;
/* #259: @24 = (2.*@73) */
for (i=0, rr=w24, cs=w73; i<2; ++i) *rr++ = (2.* *cs++ );
/* #260: @24 = (@39-@24) */
for (i=0, rr=w24, cr=w39, cs=w24; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #261: @24 = (@24+@71) */
for (i=0, rr=w24, cs=w71; i<2; ++i) (*rr++) += (*cs++);
/* #262: @24 = (@30*@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) (*rr++) = (w30*(*cs++));
/* #263: @24 = (@24/@37) */
for (i=0, rr=w24; i<2; ++i) (*rr++) /= w37;
/* #264: @38 = (@38/@37) */
for (i=0, rr=w38; i<2; ++i) (*rr++) /= w37;
/* #265: @38 = (@38*@31) */
for (i=0, rr=w38; i<2; ++i) (*rr++) *= w31;
/* #266: @24 = (@24-@38) */
for (i=0, rr=w24, cs=w38; i<2; ++i) (*rr++) -= (*cs++);
/* #267: @24 = (@24/@37) */
for (i=0, rr=w24; i<2; ++i) (*rr++) /= w37;
/* #268: @7 = (@7/@37) */
for (i=0, rr=w7; i<2; ++i) (*rr++) /= w37;
/* #269: @7 = (@7*@31) */
for (i=0, rr=w7; i<2; ++i) (*rr++) *= w31;
/* #270: @24 = (@24-@7) */
for (i=0, rr=w24, cs=w7; i<2; ++i) (*rr++) -= (*cs++);
/* #271: @24 = (-@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) *rr++ = (- *cs++ );
/* #272: @31 = dot(@24, @35) */
w31 = casadi_dot(2, w24, w35);
/* #273: @10 = (@10+@31) */
w10 += w31;
/* #274: @36 = (@36*@10) */
w36 *= w10;
/* #275: @40 = (@40+@36) */
w40 += w36;
/* #276: @80 = (@80/@81) */
w80 /= w81;
/* #277: @24 = (@23-@19) */
for (i=0, rr=w24, cr=w23, cs=w19; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #278: @36 = dot(@24, @34) */
w36 = casadi_dot(2, w24, w34);
/* #279: @10 = (@80*@36) */
w10 = (w80*w36);
/* #280: @31 = (2.*@52) */
w31 = (2.* w52 );
/* #281: @10 = (@10*@31) */
w10 *= w31;
/* #282: @31 = (2.*@8) */
w31 = (2.* w8 );
/* #283: @37 = (@80/@81) */
w37 = (w80/w81);
/* #284: @37 = (@37*@86) */
w37 *= w86;
/* #285: @37 = (-@37) */
w37 = (- w37 );
/* #286: @82 = (@82/@81) */
w82 /= w81;
/* #287: @37 = (@37-@82) */
w37 -= w82;
/* #288: @36 = (@36*@37) */
w36 *= w37;
/* #289: @37 = dot(@24, @4) */
w37 = casadi_dot(2, w24, w4);
/* #290: @24 = (@73-@72) */
for (i=0, rr=w24, cr=w73, cs=w72; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #291: @82 = dot(@24, @34) */
w82 = casadi_dot(2, w24, w34);
/* #292: @37 = (@37+@82) */
w37 += w82;
/* #293: @80 = (@80*@37) */
w80 *= w37;
/* #294: @36 = (@36+@80) */
w36 += w80;
/* #295: @31 = (@31*@36) */
w31 *= w36;
/* #296: @10 = (@10+@31) */
w10 += w31;
/* #297: @40 = (@40-@10) */
w40 -= w10;
/* #298: @24 = (@19-@15) */
for (i=0, rr=w24, cr=w19, cs=w15; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #299: @10 = dot(@24, @33) */
w10 = casadi_dot(2, w24, w33);
/* #300: @91 = (@91/@8) */
w91 /= w8;
/* #301: @31 = (@91/@8) */
w31 = (w91/w8);
/* #302: @31 = (@31*@52) */
w31 *= w52;
/* #303: @31 = (-@31) */
w31 = (- w31 );
/* #304: @92 = (@92/@8) */
w92 /= w8;
/* #305: @31 = (@31-@92) */
w31 -= w92;
/* #306: @10 = (@10*@31) */
w10 *= w31;
/* #307: @31 = dot(@24, @3) */
w31 = casadi_dot(2, w24, w3);
/* #308: @24 = (@72-@71) */
for (i=0, rr=w24, cr=w72, cs=w71; i<2; ++i) (*rr++) = ((*cr++)-(*cs++));
/* #309: @92 = dot(@24, @33) */
w92 = casadi_dot(2, w24, w33);
/* #310: @31 = (@31+@92) */
w31 += w92;
/* #311: @91 = (@91*@31) */
w91 *= w31;
/* #312: @10 = (@10+@91) */
w10 += w91;
/* #313: @40 = (@40-@10) */
w40 -= w10;
/* #314: @10 = dot(@23, @79) */
w10 = casadi_dot(2, w23, w79);
/* #315: @91 = dot(@73, @84) */
w91 = casadi_dot(2, w73, w84);
/* #316: @10 = (@10+@91) */
w10 += w91;
/* #317: @40 = (@40+@10) */
w40 += w10;
/* #318: @10 = 0.5 */
w10 = 5.0000000000000000e-01;
/* #319: @91 = dot(@19, @87) */
w91 = casadi_dot(2, w19, w87);
/* #320: @31 = dot(@72, @43) */
w31 = casadi_dot(2, w72, w43);
/* #321: @91 = (@91+@31) */
w91 += w31;
/* #322: @10 = (@10*@91) */
w10 *= w91;
/* #323: @40 = (@40+@10) */
w40 += w10;
/* #324: @10 = 0.5 */
w10 = 5.0000000000000000e-01;
/* #325: @91 = dot(@15, @76) */
w91 = casadi_dot(2, w15, w76);
/* #326: @31 = dot(@71, @42) */
w31 = casadi_dot(2, w71, w42);
/* #327: @91 = (@91+@31) */
w91 += w31;
/* #328: @10 = (@10*@91) */
w10 *= w91;
/* #329: @40 = (@40+@10) */
w40 += w10;
/* #330: @10 = 0.166667 */
w10 = 1.6666666666666666e-01;
/* #331: @19 = (2.*@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) *rr++ = (2.* *cs++ );
/* #332: @15 = (@15+@19) */
for (i=0, rr=w15, cs=w19; i<2; ++i) (*rr++) += (*cs++);
/* #333: @23 = (2.*@23) */
for (i=0, rr=w23, cs=w23; i<2; ++i) *rr++ = (2.* *cs++ );
/* #334: @15 = (@15+@23) */
for (i=0, rr=w15, cs=w23; i<2; ++i) (*rr++) += (*cs++);
/* #335: @15 = (@15+@1) */
for (i=0, rr=w15, cs=w1; i<2; ++i) (*rr++) += (*cs++);
/* #336: @91 = dot(@15, @6) */
w91 = casadi_dot(2, w15, w6);
/* #337: @72 = (2.*@72) */
for (i=0, rr=w72, cs=w72; i<2; ++i) *rr++ = (2.* *cs++ );
/* #338: @71 = (@71+@72) */
for (i=0, rr=w71, cs=w72; i<2; ++i) (*rr++) += (*cs++);
/* #339: @73 = (2.*@73) */
for (i=0, rr=w73, cs=w73; i<2; ++i) *rr++ = (2.* *cs++ );
/* #340: @71 = (@71+@73) */
for (i=0, rr=w71, cs=w73; i<2; ++i) (*rr++) += (*cs++);
/* #341: @71 = (@71+@39) */
for (i=0, rr=w71, cs=w39; i<2; ++i) (*rr++) += (*cs++);
/* #342: @31 = dot(@71, @41) */
w31 = casadi_dot(2, w71, w41);
/* #343: @91 = (@91+@31) */
w91 += w31;
/* #344: @10 = (@10*@91) */
w10 *= w91;
/* #345: @40 = (@40+@10) */
w40 += w10;
/* #346: output[3][0] = @40 */
if (res[3]) res[3][0] = w40;
/* #347: @75 = (@75+@90) */
w75 += w90;
/* #348: @75 = (@75+@57) */
w75 += w57;
/* #349: @75 = (@75+@62) */
w75 += w62;
/* #350: output[5][0] = @75 */
if (res[5]) res[5][0] = w75;
return 0;
}
/* fwd1_adj1_F:(x0[2],u,T,t0,p,z0[0],out_xf[2x1,0nz],out_Xi[2x2,0nz],out_poly_coeff[2x5,0nz],out_qf[0],out_Qi[0],out_poly_coeff_q[0x4],out_zf[0],out_Zi[0],out_poly_coeff_z[],adj_xf[2],adj_Xi[2x2],adj_poly_coeff[2x5],adj_qf[0],adj_Qi[0],adj_poly_coeff_q[0x4],adj_zf[0],adj_Zi[0],adj_poly_coeff_z[],out_adj_x0[2x1,0nz],out_adj_u[1x1,0nz],out_adj_T[1x1,0nz],out_adj_t0[1x1,0nz],out_adj_p[1x1,0nz],out_adj_z0[0],fwd_x0[2],fwd_u,fwd_T,fwd_t0,fwd_p,fwd_z0[0],fwd_out_xf[2x1,0nz],fwd_out_Xi[2x2,0nz],fwd_out_poly_coeff[2x5,0nz],fwd_out_qf[0],fwd_out_Qi[0],fwd_out_poly_coeff_q[0x4],fwd_out_zf[0],fwd_out_Zi[0],fwd_out_poly_coeff_z[],fwd_adj_xf[2],fwd_adj_Xi[2x2],fwd_adj_poly_coeff[2x5],fwd_adj_qf[0],fwd_adj_Qi[0],fwd_adj_poly_coeff_q[0x4],fwd_adj_zf[0],fwd_adj_Zi[0],fwd_adj_poly_coeff_z[])->(fwd_adj_x0[2],fwd_adj_u,fwd_adj_T,fwd_adj_t0[1x1,0nz],fwd_adj_p,fwd_adj_z0[0]) */
static int casadi_f17(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+6, *rr;
const casadi_real **arg1=arg+54, *cs;
casadi_real *w0=w+113, *w1=w+117, *w2=w+119, *w3=w+121, w4, w5, w6, w7, *w15=w+127, *w16=w+129, *w17=w+131, w28, w29, w30, w31, *w38=w+145, *w39=w+147, w43, w44, w45;
/* #0: @0 = input[46][0] */
casadi_copy(arg[46], 4, w0);
/* #1: {@1, @2} = horzsplit(@0) */
casadi_copy(w0, 2, w1);
casadi_copy(w0+2, 2, w2);
/* #2: @3 = input[0][0] */
casadi_copy(arg[0], 2, w3);
/* #3: @4 = input[1][0] */
w4 = arg[1] ? arg[1][0] : 0;
/* #4: @5 = input[3][0] */
w5 = arg[3] ? arg[3][0] : 0;
/* #5: @6 = input[2][0] */
w6 = arg[2] ? arg[2][0] : 0;
/* #6: @7 = input[4][0] */
w7 = arg[4] ? arg[4][0] : 0;
/* #7: @8 = 0x1 */
/* #8: @9 = zeros(2x1,0nz) */
/* #9: @10 = zeros(2x5,0nz) */
/* #10: @11 = 0x1 */
/* #11: @12 = 0x4 */
/* #12: @13 = 0x1 */
/* #13: @14 = 0x0 */
/* #14: @0 = input[16][0] */
casadi_copy(arg[16], 4, w0);
/* #15: {NULL, @15} = horzsplit(@0) */
casadi_copy(w0+2, 2, w15);
/* #16: @16 = input[15][0] */
casadi_copy(arg[15], 2, w16);
/* #17: @15 = (@15+@16) */
for (i=0, rr=w15, cs=w16; i<2; ++i) (*rr++) += (*cs++);
/* #18: @17 = input[17][0] */
casadi_copy(arg[17], 10, w17);
/* #19: @18 = 0x1 */
/* #20: @19 = 0x4 */
/* #21: @20 = 0x1 */
/* #22: @21 = zeros(2x1,0nz) */
/* #23: @22 = 00 */
/* #24: @23 = 00 */
/* #25: @24 = 00 */
/* #26: @25 = 00 */
/* #27: @26 = 00 */
/* #28: @27 = 0x1 */
/* #29: @16 = input[30][0] */
casadi_copy(arg[30], 2, w16);
/* #30: @28 = input[31][0] */
w28 = arg[31] ? arg[31][0] : 0;
/* #31: @29 = input[33][0] */
w29 = arg[33] ? arg[33][0] : 0;
/* #32: @30 = input[32][0] */
w30 = arg[32] ? arg[32][0] : 0;
/* #33: @31 = input[34][0] */
w31 = arg[34] ? arg[34][0] : 0;
/* #34: @32 = 0x1 */
/* #35: @33 = zeros(2x1,0nz) */
/* #36: @34 = zeros(2x5,0nz) */
/* #37: @35 = 0x1 */
/* #38: @36 = 0x4 */
/* #39: @37 = 0x1 */
/* #40: @38 = input[45][0] */
casadi_copy(arg[45], 2, w38);
/* #41: @2 = (@2+@38) */
for (i=0, rr=w2, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #42: @39 = input[47][0] */
casadi_copy(arg[47], 10, w39);
/* #43: @40 = 0x1 */
/* #44: @41 = 0x4 */
/* #45: @42 = 0x1 */
/* #46: {@38, @43, NULL, @44, NULL, @45, NULL} = fwd1_adj1_F(@3, @4, @5, @6, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @17, @18, @19, @20, @14, @21, @22, @23, @24, @25, @26, @27, @16, @28, @29, @30, @30, @31, @32, @33, @34, @35, @36, @37, @14, @2, @39, @40, @41, @42, @14) */
arg1[0]=w3;
arg1[1]=(&w4);
arg1[2]=(&w5);
arg1[3]=(&w6);
arg1[4]=(&w6);
arg1[5]=(&w7);
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=w15;
arg1[14]=w17;
arg1[15]=0;
arg1[16]=0;
arg1[17]=0;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=w16;
arg1[27]=(&w28);
arg1[28]=(&w29);
arg1[29]=(&w30);
arg1[30]=(&w30);
arg1[31]=(&w31);
arg1[32]=0;
arg1[33]=0;
arg1[34]=0;
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=w2;
arg1[40]=w39;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
res1[0]=w38;
res1[1]=(&w43);
res1[2]=0;
res1[3]=(&w44);
res1[4]=0;
res1[5]=(&w45);
res1[6]=0;
if (casadi_f18(arg1, res1, iw, w, 0)) return 1;
/* #47: @1 = (@1+@38) */
for (i=0, rr=w1, cs=w38; i<2; ++i) (*rr++) += (*cs++);
/* #48: output[0][0] = @1 */
casadi_copy(w1, 2, res[0]);
/* #49: output[1][0] = @43 */
if (res[1]) res[1][0] = w43;
/* #50: output[2][0] = @44 */
if (res[2]) res[2][0] = w44;
/* #51: output[4][0] = @45 */
if (res[4]) res[4][0] = w45;
return 0;
}
/* nlp_hess_l:(x[32],p,lam_f,lam_g[42])->(triu_hess_gamma_x_x[32x32,31nz]) */
static int casadi_f16(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+1, *rr, *ss;
const casadi_real **arg1=arg+4, *cs;
casadi_real *w0=w+160, w1, w2, *w3=w+193, w4, w5, *w16=w+197, *w17=w+239, *w18=w+241, *w19=w+243, *w20=w+245, *w21=w+247, *w22=w+249, *w23=w+251, *w24=w+253, *w25=w+255, *w26=w+257, *w27=w+259, *w28=w+263, *w40=w+273, w41, w42, w43, w44, w45, w46, w47, w48, w49, w50, w51, w52, w53, w54, w55, w56, w57, w58, w59, w60, w61, w62, w63, w64, w65, w66, w67, w68, w69, w70, w71, *w72=w+336, w73, w74, w75, *w85=w+341, *w86=w+343, *w87=w+347, *w93=w+357, w94, w95, *w96=w+361, *w97=w+392;
/* #0: @0 = zeros(32x32,31nz) */
casadi_clear(w0, 31);
/* #1: @1 = input[0][0] */
w1 = arg[0] ? arg[0][0] : 0;
/* #2: @2 = input[0][1] */
w2 = arg[0] ? arg[0][1] : 0;
/* #3: @3 = vertcat(@1, @2) */
rr=w3;
*rr++ = w1;
*rr++ = w2;
/* #4: @1 = input[0][2] */
w1 = arg[0] ? arg[0][2] : 0;
/* #5: @2 = 1 */
w2 = 1.;
/* #6: @4 = 0 */
w4 = 0.;
/* #7: @5 = input[1][0] */
w5 = arg[1] ? arg[1][0] : 0;
/* #8: @6 = 0x1 */
/* #9: @7 = zeros(2x1,0nz) */
/* #10: @8 = zeros(2x2,0nz) */
/* #11: @9 = zeros(2x5,0nz) */
/* #12: @10 = 0x1 */
/* #13: @11 = 0x1 */
/* #14: @12 = 0x4 */
/* #15: @13 = 0x1 */
/* #16: @14 = 0x1 */
/* #17: @15 = 0x0 */
/* #18: @16 = input[3][0] */
casadi_copy(arg[3], 42, w16);
/* #19: {@17, NULL, NULL, NULL, @18, NULL, NULL, @19, NULL, NULL, @20, NULL, NULL, @21, NULL, NULL, @22, NULL, NULL, @23, NULL, NULL, @24, NULL, NULL, @25, NULL, NULL, @26, NULL, NULL, NULL} = vertsplit(@16) */
casadi_copy(w16, 2, w17);
casadi_copy(w16+5, 2, w18);
casadi_copy(w16+9, 2, w19);
casadi_copy(w16+13, 2, w20);
casadi_copy(w16+17, 2, w21);
casadi_copy(w16+21, 2, w22);
casadi_copy(w16+25, 2, w23);
casadi_copy(w16+29, 2, w24);
casadi_copy(w16+33, 2, w25);
casadi_copy(w16+37, 2, w26);
/* #20: @17 = (-@17) */
for (i=0, rr=w17, cs=w17; i<2; ++i) *rr++ = (- *cs++ );
/* #21: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #22: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #23: @29 = 0x1 */
/* #24: @30 = 0x1 */
/* #25: @31 = 0x4 */
/* #26: @32 = 0x1 */
/* #27: @33 = 0x1 */
/* #28: @34 = zeros(2x1,0nz) */
/* #29: @35 = 00 */
/* #30: @36 = 00 */
/* #31: @37 = 00 */
/* #32: @38 = 00 */
/* #33: @39 = 0x1 */
/* #34: @40 = ones(32x1) */
casadi_fill(w40, 32, 1.);
/* #35: {@41, @42, @43, @44, @45, @46, @47, @48, @49, @50, @51, @52, @53, @54, @55, @56, @57, @58, @59, @60, @61, @62, @63, @64, @65, @66, @67, @68, @69, @70, @71, NULL} = vertsplit(@40) */
w41 = w40[0];
w42 = w40[1];
w43 = w40[2];
w44 = w40[3];
w45 = w40[4];
w46 = w40[5];
w47 = w40[6];
w48 = w40[7];
w49 = w40[8];
w50 = w40[9];
w51 = w40[10];
w52 = w40[11];
w53 = w40[12];
w54 = w40[13];
w55 = w40[14];
w56 = w40[15];
w57 = w40[16];
w58 = w40[17];
w59 = w40[18];
w60 = w40[19];
w61 = w40[20];
w62 = w40[21];
w63 = w40[22];
w64 = w40[23];
w65 = w40[24];
w66 = w40[25];
w67 = w40[26];
w68 = w40[27];
w69 = w40[28];
w70 = w40[29];
w71 = w40[30];
/* #36: @72 = vertcat(@41, @42) */
rr=w72;
*rr++ = w41;
*rr++ = w42;
/* #37: @73 = 0 */
w73 = 0.;
/* #38: @74 = 0 */
w74 = 0.;
/* #39: @75 = 0 */
w75 = 0.;
/* #40: @76 = 0x1 */
/* #41: @77 = zeros(2x1,0nz) */
/* #42: @78 = zeros(2x2,0nz) */
/* #43: @79 = zeros(2x5,0nz) */
/* #44: @80 = 0x1 */
/* #45: @81 = 0x1 */
/* #46: @82 = 0x4 */
/* #47: @83 = 0x1 */
/* #48: @84 = 0x1 */
/* #49: @85 = zeros(2x1) */
casadi_clear(w85, 2);
/* #50: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #51: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #52: @88 = 0x1 */
/* #53: @89 = 0x1 */
/* #54: @90 = 0x4 */
/* #55: @91 = 0x1 */
/* #56: @92 = 0x1 */
/* #57: {@93, @94, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@3, @1, @2, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @17, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @72, @43, @73, @74, @75, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @85, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w3;
arg1[1]=(&w1);
arg1[2]=(&w2);
arg1[3]=(&w4);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w17;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w72;
arg1[31]=(&w43);
arg1[32]=(&w73);
arg1[33]=(&w74);
arg1[34]=(&w75);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w85;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w93;
res1[1]=(&w94);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #58: {@1, @2} = vertsplit(@93) */
w1 = w93[0];
w2 = w93[1];
/* #59: @4 = input[2][0] */
w4 = arg[2] ? arg[2][0] : 0;
/* #60: @41 = (2.*@41) */
w41 = (2.* w41 );
/* #61: @41 = (@4*@41) */
w41 = (w4*w41);
/* #62: @1 = (@1+@41) */
w1 += w41;
/* #63: @42 = (2.*@42) */
w42 = (2.* w42 );
/* #64: @42 = (@4*@42) */
w42 = (w4*w42);
/* #65: @2 = (@2+@42) */
w2 += w42;
/* #66: @43 = (2.*@43) */
w43 = (2.* w43 );
/* #67: @43 = (@4*@43) */
w43 = (w4*w43);
/* #68: @94 = (@94+@43) */
w94 += w43;
/* #69: @43 = input[0][3] */
w43 = arg[0] ? arg[0][3] : 0;
/* #70: @42 = input[0][4] */
w42 = arg[0] ? arg[0][4] : 0;
/* #71: @93 = vertcat(@43, @42) */
rr=w93;
*rr++ = w43;
*rr++ = w42;
/* #72: @43 = input[0][5] */
w43 = arg[0] ? arg[0][5] : 0;
/* #73: @42 = 1 */
w42 = 1.;
/* #74: @41 = 1 */
w41 = 1.;
/* #75: @6 = 0x1 */
/* #76: @7 = zeros(2x1,0nz) */
/* #77: @8 = zeros(2x2,0nz) */
/* #78: @9 = zeros(2x5,0nz) */
/* #79: @10 = 0x1 */
/* #80: @11 = 0x1 */
/* #81: @12 = 0x4 */
/* #82: @13 = 0x1 */
/* #83: @14 = 0x1 */
/* #84: @18 = (-@18) */
for (i=0, rr=w18, cs=w18; i<2; ++i) *rr++ = (- *cs++ );
/* #85: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #86: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #87: @29 = 0x1 */
/* #88: @30 = 0x1 */
/* #89: @31 = 0x4 */
/* #90: @32 = 0x1 */
/* #91: @33 = 0x1 */
/* #92: @34 = zeros(2x1,0nz) */
/* #93: @35 = 00 */
/* #94: @36 = 00 */
/* #95: @37 = 00 */
/* #96: @38 = 00 */
/* #97: @39 = 0x1 */
/* #98: @3 = vertcat(@44, @45) */
rr=w3;
*rr++ = w44;
*rr++ = w45;
/* #99: @73 = 0 */
w73 = 0.;
/* #100: @74 = 0 */
w74 = 0.;
/* #101: @75 = 0 */
w75 = 0.;
/* #102: @76 = 0x1 */
/* #103: @77 = zeros(2x1,0nz) */
/* #104: @78 = zeros(2x2,0nz) */
/* #105: @79 = zeros(2x5,0nz) */
/* #106: @80 = 0x1 */
/* #107: @81 = 0x1 */
/* #108: @82 = 0x4 */
/* #109: @83 = 0x1 */
/* #110: @84 = 0x1 */
/* #111: @17 = zeros(2x1) */
casadi_clear(w17, 2);
/* #112: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #113: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #114: @88 = 0x1 */
/* #115: @89 = 0x1 */
/* #116: @90 = 0x4 */
/* #117: @91 = 0x1 */
/* #118: @92 = 0x1 */
/* #119: {@72, @95, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@93, @43, @42, @41, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @18, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @3, @46, @73, @74, @75, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @17, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w93;
arg1[1]=(&w43);
arg1[2]=(&w42);
arg1[3]=(&w41);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w18;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w3;
arg1[31]=(&w46);
arg1[32]=(&w73);
arg1[33]=(&w74);
arg1[34]=(&w75);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w17;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w72;
res1[1]=(&w95);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #120: {@43, @42} = vertsplit(@72) */
w43 = w72[0];
w42 = w72[1];
/* #121: @44 = (2.*@44) */
w44 = (2.* w44 );
/* #122: @44 = (@4*@44) */
w44 = (w4*w44);
/* #123: @43 = (@43+@44) */
w43 += w44;
/* #124: @45 = (2.*@45) */
w45 = (2.* w45 );
/* #125: @45 = (@4*@45) */
w45 = (w4*w45);
/* #126: @42 = (@42+@45) */
w42 += w45;
/* #127: @46 = (2.*@46) */
w46 = (2.* w46 );
/* #128: @46 = (@4*@46) */
w46 = (w4*w46);
/* #129: @95 = (@95+@46) */
w95 += w46;
/* #130: @46 = input[0][6] */
w46 = arg[0] ? arg[0][6] : 0;
/* #131: @45 = input[0][7] */
w45 = arg[0] ? arg[0][7] : 0;
/* #132: @72 = vertcat(@46, @45) */
rr=w72;
*rr++ = w46;
*rr++ = w45;
/* #133: @46 = input[0][8] */
w46 = arg[0] ? arg[0][8] : 0;
/* #134: @45 = 1 */
w45 = 1.;
/* #135: @44 = 2 */
w44 = 2.;
/* #136: @6 = 0x1 */
/* #137: @7 = zeros(2x1,0nz) */
/* #138: @8 = zeros(2x2,0nz) */
/* #139: @9 = zeros(2x5,0nz) */
/* #140: @10 = 0x1 */
/* #141: @11 = 0x1 */
/* #142: @12 = 0x4 */
/* #143: @13 = 0x1 */
/* #144: @14 = 0x1 */
/* #145: @19 = (-@19) */
for (i=0, rr=w19, cs=w19; i<2; ++i) *rr++ = (- *cs++ );
/* #146: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #147: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #148: @29 = 0x1 */
/* #149: @30 = 0x1 */
/* #150: @31 = 0x4 */
/* #151: @32 = 0x1 */
/* #152: @33 = 0x1 */
/* #153: @34 = zeros(2x1,0nz) */
/* #154: @35 = 00 */
/* #155: @36 = 00 */
/* #156: @37 = 00 */
/* #157: @38 = 00 */
/* #158: @39 = 0x1 */
/* #159: @93 = vertcat(@47, @48) */
rr=w93;
*rr++ = w47;
*rr++ = w48;
/* #160: @41 = 0 */
w41 = 0.;
/* #161: @73 = 0 */
w73 = 0.;
/* #162: @74 = 0 */
w74 = 0.;
/* #163: @76 = 0x1 */
/* #164: @77 = zeros(2x1,0nz) */
/* #165: @78 = zeros(2x2,0nz) */
/* #166: @79 = zeros(2x5,0nz) */
/* #167: @80 = 0x1 */
/* #168: @81 = 0x1 */
/* #169: @82 = 0x4 */
/* #170: @83 = 0x1 */
/* #171: @84 = 0x1 */
/* #172: @18 = zeros(2x1) */
casadi_clear(w18, 2);
/* #173: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #174: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #175: @88 = 0x1 */
/* #176: @89 = 0x1 */
/* #177: @90 = 0x4 */
/* #178: @91 = 0x1 */
/* #179: @92 = 0x1 */
/* #180: {@3, @75, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@72, @46, @45, @44, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @19, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @93, @49, @41, @73, @74, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @18, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w72;
arg1[1]=(&w46);
arg1[2]=(&w45);
arg1[3]=(&w44);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w19;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w93;
arg1[31]=(&w49);
arg1[32]=(&w41);
arg1[33]=(&w73);
arg1[34]=(&w74);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w18;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w3;
res1[1]=(&w75);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #181: {@46, @45} = vertsplit(@3) */
w46 = w3[0];
w45 = w3[1];
/* #182: @47 = (2.*@47) */
w47 = (2.* w47 );
/* #183: @47 = (@4*@47) */
w47 = (w4*w47);
/* #184: @46 = (@46+@47) */
w46 += w47;
/* #185: @48 = (2.*@48) */
w48 = (2.* w48 );
/* #186: @48 = (@4*@48) */
w48 = (w4*w48);
/* #187: @45 = (@45+@48) */
w45 += w48;
/* #188: @49 = (2.*@49) */
w49 = (2.* w49 );
/* #189: @49 = (@4*@49) */
w49 = (w4*w49);
/* #190: @75 = (@75+@49) */
w75 += w49;
/* #191: @49 = input[0][9] */
w49 = arg[0] ? arg[0][9] : 0;
/* #192: @48 = input[0][10] */
w48 = arg[0] ? arg[0][10] : 0;
/* #193: @3 = vertcat(@49, @48) */
rr=w3;
*rr++ = w49;
*rr++ = w48;
/* #194: @49 = input[0][11] */
w49 = arg[0] ? arg[0][11] : 0;
/* #195: @48 = 1 */
w48 = 1.;
/* #196: @47 = 3 */
w47 = 3.;
/* #197: @6 = 0x1 */
/* #198: @7 = zeros(2x1,0nz) */
/* #199: @8 = zeros(2x2,0nz) */
/* #200: @9 = zeros(2x5,0nz) */
/* #201: @10 = 0x1 */
/* #202: @11 = 0x1 */
/* #203: @12 = 0x4 */
/* #204: @13 = 0x1 */
/* #205: @14 = 0x1 */
/* #206: @20 = (-@20) */
for (i=0, rr=w20, cs=w20; i<2; ++i) *rr++ = (- *cs++ );
/* #207: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #208: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #209: @29 = 0x1 */
/* #210: @30 = 0x1 */
/* #211: @31 = 0x4 */
/* #212: @32 = 0x1 */
/* #213: @33 = 0x1 */
/* #214: @34 = zeros(2x1,0nz) */
/* #215: @35 = 00 */
/* #216: @36 = 00 */
/* #217: @37 = 00 */
/* #218: @38 = 00 */
/* #219: @39 = 0x1 */
/* #220: @72 = vertcat(@50, @51) */
rr=w72;
*rr++ = w50;
*rr++ = w51;
/* #221: @44 = 0 */
w44 = 0.;
/* #222: @41 = 0 */
w41 = 0.;
/* #223: @73 = 0 */
w73 = 0.;
/* #224: @76 = 0x1 */
/* #225: @77 = zeros(2x1,0nz) */
/* #226: @78 = zeros(2x2,0nz) */
/* #227: @79 = zeros(2x5,0nz) */
/* #228: @80 = 0x1 */
/* #229: @81 = 0x1 */
/* #230: @82 = 0x4 */
/* #231: @83 = 0x1 */
/* #232: @84 = 0x1 */
/* #233: @19 = zeros(2x1) */
casadi_clear(w19, 2);
/* #234: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #235: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #236: @88 = 0x1 */
/* #237: @89 = 0x1 */
/* #238: @90 = 0x4 */
/* #239: @91 = 0x1 */
/* #240: @92 = 0x1 */
/* #241: {@93, @74, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@3, @49, @48, @47, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @20, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @72, @52, @44, @41, @73, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @19, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w3;
arg1[1]=(&w49);
arg1[2]=(&w48);
arg1[3]=(&w47);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w20;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w72;
arg1[31]=(&w52);
arg1[32]=(&w44);
arg1[33]=(&w41);
arg1[34]=(&w73);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w19;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w93;
res1[1]=(&w74);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #242: {@49, @48} = vertsplit(@93) */
w49 = w93[0];
w48 = w93[1];
/* #243: @50 = (2.*@50) */
w50 = (2.* w50 );
/* #244: @50 = (@4*@50) */
w50 = (w4*w50);
/* #245: @49 = (@49+@50) */
w49 += w50;
/* #246: @51 = (2.*@51) */
w51 = (2.* w51 );
/* #247: @51 = (@4*@51) */
w51 = (w4*w51);
/* #248: @48 = (@48+@51) */
w48 += w51;
/* #249: @52 = (2.*@52) */
w52 = (2.* w52 );
/* #250: @52 = (@4*@52) */
w52 = (w4*w52);
/* #251: @74 = (@74+@52) */
w74 += w52;
/* #252: @52 = input[0][12] */
w52 = arg[0] ? arg[0][12] : 0;
/* #253: @51 = input[0][13] */
w51 = arg[0] ? arg[0][13] : 0;
/* #254: @93 = vertcat(@52, @51) */
rr=w93;
*rr++ = w52;
*rr++ = w51;
/* #255: @52 = input[0][14] */
w52 = arg[0] ? arg[0][14] : 0;
/* #256: @51 = 1 */
w51 = 1.;
/* #257: @50 = 4 */
w50 = 4.;
/* #258: @6 = 0x1 */
/* #259: @7 = zeros(2x1,0nz) */
/* #260: @8 = zeros(2x2,0nz) */
/* #261: @9 = zeros(2x5,0nz) */
/* #262: @10 = 0x1 */
/* #263: @11 = 0x1 */
/* #264: @12 = 0x4 */
/* #265: @13 = 0x1 */
/* #266: @14 = 0x1 */
/* #267: @21 = (-@21) */
for (i=0, rr=w21, cs=w21; i<2; ++i) *rr++ = (- *cs++ );
/* #268: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #269: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #270: @29 = 0x1 */
/* #271: @30 = 0x1 */
/* #272: @31 = 0x4 */
/* #273: @32 = 0x1 */
/* #274: @33 = 0x1 */
/* #275: @34 = zeros(2x1,0nz) */
/* #276: @35 = 00 */
/* #277: @36 = 00 */
/* #278: @37 = 00 */
/* #279: @38 = 00 */
/* #280: @39 = 0x1 */
/* #281: @3 = vertcat(@53, @54) */
rr=w3;
*rr++ = w53;
*rr++ = w54;
/* #282: @47 = 0 */
w47 = 0.;
/* #283: @44 = 0 */
w44 = 0.;
/* #284: @41 = 0 */
w41 = 0.;
/* #285: @76 = 0x1 */
/* #286: @77 = zeros(2x1,0nz) */
/* #287: @78 = zeros(2x2,0nz) */
/* #288: @79 = zeros(2x5,0nz) */
/* #289: @80 = 0x1 */
/* #290: @81 = 0x1 */
/* #291: @82 = 0x4 */
/* #292: @83 = 0x1 */
/* #293: @84 = 0x1 */
/* #294: @20 = zeros(2x1) */
casadi_clear(w20, 2);
/* #295: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #296: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #297: @88 = 0x1 */
/* #298: @89 = 0x1 */
/* #299: @90 = 0x4 */
/* #300: @91 = 0x1 */
/* #301: @92 = 0x1 */
/* #302: {@72, @73, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@93, @52, @51, @50, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @21, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @3, @55, @47, @44, @41, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @20, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w93;
arg1[1]=(&w52);
arg1[2]=(&w51);
arg1[3]=(&w50);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w21;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w3;
arg1[31]=(&w55);
arg1[32]=(&w47);
arg1[33]=(&w44);
arg1[34]=(&w41);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w20;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w72;
res1[1]=(&w73);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #303: {@52, @51} = vertsplit(@72) */
w52 = w72[0];
w51 = w72[1];
/* #304: @53 = (2.*@53) */
w53 = (2.* w53 );
/* #305: @53 = (@4*@53) */
w53 = (w4*w53);
/* #306: @52 = (@52+@53) */
w52 += w53;
/* #307: @54 = (2.*@54) */
w54 = (2.* w54 );
/* #308: @54 = (@4*@54) */
w54 = (w4*w54);
/* #309: @51 = (@51+@54) */
w51 += w54;
/* #310: @55 = (2.*@55) */
w55 = (2.* w55 );
/* #311: @55 = (@4*@55) */
w55 = (w4*w55);
/* #312: @73 = (@73+@55) */
w73 += w55;
/* #313: @55 = input[0][15] */
w55 = arg[0] ? arg[0][15] : 0;
/* #314: @54 = input[0][16] */
w54 = arg[0] ? arg[0][16] : 0;
/* #315: @72 = vertcat(@55, @54) */
rr=w72;
*rr++ = w55;
*rr++ = w54;
/* #316: @55 = input[0][17] */
w55 = arg[0] ? arg[0][17] : 0;
/* #317: @54 = 1 */
w54 = 1.;
/* #318: @53 = 5 */
w53 = 5.;
/* #319: @6 = 0x1 */
/* #320: @7 = zeros(2x1,0nz) */
/* #321: @8 = zeros(2x2,0nz) */
/* #322: @9 = zeros(2x5,0nz) */
/* #323: @10 = 0x1 */
/* #324: @11 = 0x1 */
/* #325: @12 = 0x4 */
/* #326: @13 = 0x1 */
/* #327: @14 = 0x1 */
/* #328: @22 = (-@22) */
for (i=0, rr=w22, cs=w22; i<2; ++i) *rr++ = (- *cs++ );
/* #329: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #330: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #331: @29 = 0x1 */
/* #332: @30 = 0x1 */
/* #333: @31 = 0x4 */
/* #334: @32 = 0x1 */
/* #335: @33 = 0x1 */
/* #336: @34 = zeros(2x1,0nz) */
/* #337: @35 = 00 */
/* #338: @36 = 00 */
/* #339: @37 = 00 */
/* #340: @38 = 00 */
/* #341: @39 = 0x1 */
/* #342: @93 = vertcat(@56, @57) */
rr=w93;
*rr++ = w56;
*rr++ = w57;
/* #343: @50 = 0 */
w50 = 0.;
/* #344: @47 = 0 */
w47 = 0.;
/* #345: @44 = 0 */
w44 = 0.;
/* #346: @76 = 0x1 */
/* #347: @77 = zeros(2x1,0nz) */
/* #348: @78 = zeros(2x2,0nz) */
/* #349: @79 = zeros(2x5,0nz) */
/* #350: @80 = 0x1 */
/* #351: @81 = 0x1 */
/* #352: @82 = 0x4 */
/* #353: @83 = 0x1 */
/* #354: @84 = 0x1 */
/* #355: @21 = zeros(2x1) */
casadi_clear(w21, 2);
/* #356: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #357: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #358: @88 = 0x1 */
/* #359: @89 = 0x1 */
/* #360: @90 = 0x4 */
/* #361: @91 = 0x1 */
/* #362: @92 = 0x1 */
/* #363: {@3, @41, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@72, @55, @54, @53, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @22, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @93, @58, @50, @47, @44, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @21, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w72;
arg1[1]=(&w55);
arg1[2]=(&w54);
arg1[3]=(&w53);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w22;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w93;
arg1[31]=(&w58);
arg1[32]=(&w50);
arg1[33]=(&w47);
arg1[34]=(&w44);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w21;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w3;
res1[1]=(&w41);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #364: {@55, @54} = vertsplit(@3) */
w55 = w3[0];
w54 = w3[1];
/* #365: @56 = (2.*@56) */
w56 = (2.* w56 );
/* #366: @56 = (@4*@56) */
w56 = (w4*w56);
/* #367: @55 = (@55+@56) */
w55 += w56;
/* #368: @57 = (2.*@57) */
w57 = (2.* w57 );
/* #369: @57 = (@4*@57) */
w57 = (w4*w57);
/* #370: @54 = (@54+@57) */
w54 += w57;
/* #371: @58 = (2.*@58) */
w58 = (2.* w58 );
/* #372: @58 = (@4*@58) */
w58 = (w4*w58);
/* #373: @41 = (@41+@58) */
w41 += w58;
/* #374: @58 = input[0][18] */
w58 = arg[0] ? arg[0][18] : 0;
/* #375: @57 = input[0][19] */
w57 = arg[0] ? arg[0][19] : 0;
/* #376: @3 = vertcat(@58, @57) */
rr=w3;
*rr++ = w58;
*rr++ = w57;
/* #377: @58 = input[0][20] */
w58 = arg[0] ? arg[0][20] : 0;
/* #378: @57 = 1 */
w57 = 1.;
/* #379: @56 = 6 */
w56 = 6.;
/* #380: @6 = 0x1 */
/* #381: @7 = zeros(2x1,0nz) */
/* #382: @8 = zeros(2x2,0nz) */
/* #383: @9 = zeros(2x5,0nz) */
/* #384: @10 = 0x1 */
/* #385: @11 = 0x1 */
/* #386: @12 = 0x4 */
/* #387: @13 = 0x1 */
/* #388: @14 = 0x1 */
/* #389: @23 = (-@23) */
for (i=0, rr=w23, cs=w23; i<2; ++i) *rr++ = (- *cs++ );
/* #390: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #391: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #392: @29 = 0x1 */
/* #393: @30 = 0x1 */
/* #394: @31 = 0x4 */
/* #395: @32 = 0x1 */
/* #396: @33 = 0x1 */
/* #397: @34 = zeros(2x1,0nz) */
/* #398: @35 = 00 */
/* #399: @36 = 00 */
/* #400: @37 = 00 */
/* #401: @38 = 00 */
/* #402: @39 = 0x1 */
/* #403: @72 = vertcat(@59, @60) */
rr=w72;
*rr++ = w59;
*rr++ = w60;
/* #404: @53 = 0 */
w53 = 0.;
/* #405: @50 = 0 */
w50 = 0.;
/* #406: @47 = 0 */
w47 = 0.;
/* #407: @76 = 0x1 */
/* #408: @77 = zeros(2x1,0nz) */
/* #409: @78 = zeros(2x2,0nz) */
/* #410: @79 = zeros(2x5,0nz) */
/* #411: @80 = 0x1 */
/* #412: @81 = 0x1 */
/* #413: @82 = 0x4 */
/* #414: @83 = 0x1 */
/* #415: @84 = 0x1 */
/* #416: @22 = zeros(2x1) */
casadi_clear(w22, 2);
/* #417: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #418: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #419: @88 = 0x1 */
/* #420: @89 = 0x1 */
/* #421: @90 = 0x4 */
/* #422: @91 = 0x1 */
/* #423: @92 = 0x1 */
/* #424: {@93, @44, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@3, @58, @57, @56, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @23, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @72, @61, @53, @50, @47, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @22, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w3;
arg1[1]=(&w58);
arg1[2]=(&w57);
arg1[3]=(&w56);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w23;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w72;
arg1[31]=(&w61);
arg1[32]=(&w53);
arg1[33]=(&w50);
arg1[34]=(&w47);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w22;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w93;
res1[1]=(&w44);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #425: {@58, @57} = vertsplit(@93) */
w58 = w93[0];
w57 = w93[1];
/* #426: @59 = (2.*@59) */
w59 = (2.* w59 );
/* #427: @59 = (@4*@59) */
w59 = (w4*w59);
/* #428: @58 = (@58+@59) */
w58 += w59;
/* #429: @60 = (2.*@60) */
w60 = (2.* w60 );
/* #430: @60 = (@4*@60) */
w60 = (w4*w60);
/* #431: @57 = (@57+@60) */
w57 += w60;
/* #432: @61 = (2.*@61) */
w61 = (2.* w61 );
/* #433: @61 = (@4*@61) */
w61 = (w4*w61);
/* #434: @44 = (@44+@61) */
w44 += w61;
/* #435: @61 = input[0][21] */
w61 = arg[0] ? arg[0][21] : 0;
/* #436: @60 = input[0][22] */
w60 = arg[0] ? arg[0][22] : 0;
/* #437: @93 = vertcat(@61, @60) */
rr=w93;
*rr++ = w61;
*rr++ = w60;
/* #438: @61 = input[0][23] */
w61 = arg[0] ? arg[0][23] : 0;
/* #439: @60 = 1 */
w60 = 1.;
/* #440: @59 = 7 */
w59 = 7.;
/* #441: @6 = 0x1 */
/* #442: @7 = zeros(2x1,0nz) */
/* #443: @8 = zeros(2x2,0nz) */
/* #444: @9 = zeros(2x5,0nz) */
/* #445: @10 = 0x1 */
/* #446: @11 = 0x1 */
/* #447: @12 = 0x4 */
/* #448: @13 = 0x1 */
/* #449: @14 = 0x1 */
/* #450: @24 = (-@24) */
for (i=0, rr=w24, cs=w24; i<2; ++i) *rr++ = (- *cs++ );
/* #451: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #452: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #453: @29 = 0x1 */
/* #454: @30 = 0x1 */
/* #455: @31 = 0x4 */
/* #456: @32 = 0x1 */
/* #457: @33 = 0x1 */
/* #458: @34 = zeros(2x1,0nz) */
/* #459: @35 = 00 */
/* #460: @36 = 00 */
/* #461: @37 = 00 */
/* #462: @38 = 00 */
/* #463: @39 = 0x1 */
/* #464: @3 = vertcat(@62, @63) */
rr=w3;
*rr++ = w62;
*rr++ = w63;
/* #465: @56 = 0 */
w56 = 0.;
/* #466: @53 = 0 */
w53 = 0.;
/* #467: @50 = 0 */
w50 = 0.;
/* #468: @76 = 0x1 */
/* #469: @77 = zeros(2x1,0nz) */
/* #470: @78 = zeros(2x2,0nz) */
/* #471: @79 = zeros(2x5,0nz) */
/* #472: @80 = 0x1 */
/* #473: @81 = 0x1 */
/* #474: @82 = 0x4 */
/* #475: @83 = 0x1 */
/* #476: @84 = 0x1 */
/* #477: @23 = zeros(2x1) */
casadi_clear(w23, 2);
/* #478: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #479: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #480: @88 = 0x1 */
/* #481: @89 = 0x1 */
/* #482: @90 = 0x4 */
/* #483: @91 = 0x1 */
/* #484: @92 = 0x1 */
/* #485: {@72, @47, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@93, @61, @60, @59, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @24, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @3, @64, @56, @53, @50, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @23, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w93;
arg1[1]=(&w61);
arg1[2]=(&w60);
arg1[3]=(&w59);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w24;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w3;
arg1[31]=(&w64);
arg1[32]=(&w56);
arg1[33]=(&w53);
arg1[34]=(&w50);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w23;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w72;
res1[1]=(&w47);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #486: {@61, @60} = vertsplit(@72) */
w61 = w72[0];
w60 = w72[1];
/* #487: @62 = (2.*@62) */
w62 = (2.* w62 );
/* #488: @62 = (@4*@62) */
w62 = (w4*w62);
/* #489: @61 = (@61+@62) */
w61 += w62;
/* #490: @63 = (2.*@63) */
w63 = (2.* w63 );
/* #491: @63 = (@4*@63) */
w63 = (w4*w63);
/* #492: @60 = (@60+@63) */
w60 += w63;
/* #493: @64 = (2.*@64) */
w64 = (2.* w64 );
/* #494: @64 = (@4*@64) */
w64 = (w4*w64);
/* #495: @47 = (@47+@64) */
w47 += w64;
/* #496: @64 = input[0][24] */
w64 = arg[0] ? arg[0][24] : 0;
/* #497: @63 = input[0][25] */
w63 = arg[0] ? arg[0][25] : 0;
/* #498: @72 = vertcat(@64, @63) */
rr=w72;
*rr++ = w64;
*rr++ = w63;
/* #499: @64 = input[0][26] */
w64 = arg[0] ? arg[0][26] : 0;
/* #500: @63 = 1 */
w63 = 1.;
/* #501: @62 = 8 */
w62 = 8.;
/* #502: @6 = 0x1 */
/* #503: @7 = zeros(2x1,0nz) */
/* #504: @8 = zeros(2x2,0nz) */
/* #505: @9 = zeros(2x5,0nz) */
/* #506: @10 = 0x1 */
/* #507: @11 = 0x1 */
/* #508: @12 = 0x4 */
/* #509: @13 = 0x1 */
/* #510: @14 = 0x1 */
/* #511: @25 = (-@25) */
for (i=0, rr=w25, cs=w25; i<2; ++i) *rr++ = (- *cs++ );
/* #512: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #513: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #514: @29 = 0x1 */
/* #515: @30 = 0x1 */
/* #516: @31 = 0x4 */
/* #517: @32 = 0x1 */
/* #518: @33 = 0x1 */
/* #519: @34 = zeros(2x1,0nz) */
/* #520: @35 = 00 */
/* #521: @36 = 00 */
/* #522: @37 = 00 */
/* #523: @38 = 00 */
/* #524: @39 = 0x1 */
/* #525: @93 = vertcat(@65, @66) */
rr=w93;
*rr++ = w65;
*rr++ = w66;
/* #526: @59 = 0 */
w59 = 0.;
/* #527: @56 = 0 */
w56 = 0.;
/* #528: @53 = 0 */
w53 = 0.;
/* #529: @76 = 0x1 */
/* #530: @77 = zeros(2x1,0nz) */
/* #531: @78 = zeros(2x2,0nz) */
/* #532: @79 = zeros(2x5,0nz) */
/* #533: @80 = 0x1 */
/* #534: @81 = 0x1 */
/* #535: @82 = 0x4 */
/* #536: @83 = 0x1 */
/* #537: @84 = 0x1 */
/* #538: @24 = zeros(2x1) */
casadi_clear(w24, 2);
/* #539: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #540: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #541: @88 = 0x1 */
/* #542: @89 = 0x1 */
/* #543: @90 = 0x4 */
/* #544: @91 = 0x1 */
/* #545: @92 = 0x1 */
/* #546: {@3, @50, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@72, @64, @63, @62, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @25, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @93, @67, @59, @56, @53, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @24, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w72;
arg1[1]=(&w64);
arg1[2]=(&w63);
arg1[3]=(&w62);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w25;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w93;
arg1[31]=(&w67);
arg1[32]=(&w59);
arg1[33]=(&w56);
arg1[34]=(&w53);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w24;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w3;
res1[1]=(&w50);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #547: {@64, @63} = vertsplit(@3) */
w64 = w3[0];
w63 = w3[1];
/* #548: @65 = (2.*@65) */
w65 = (2.* w65 );
/* #549: @65 = (@4*@65) */
w65 = (w4*w65);
/* #550: @64 = (@64+@65) */
w64 += w65;
/* #551: @66 = (2.*@66) */
w66 = (2.* w66 );
/* #552: @66 = (@4*@66) */
w66 = (w4*w66);
/* #553: @63 = (@63+@66) */
w63 += w66;
/* #554: @67 = (2.*@67) */
w67 = (2.* w67 );
/* #555: @67 = (@4*@67) */
w67 = (w4*w67);
/* #556: @50 = (@50+@67) */
w50 += w67;
/* #557: @67 = input[0][27] */
w67 = arg[0] ? arg[0][27] : 0;
/* #558: @66 = input[0][28] */
w66 = arg[0] ? arg[0][28] : 0;
/* #559: @3 = vertcat(@67, @66) */
rr=w3;
*rr++ = w67;
*rr++ = w66;
/* #560: @67 = input[0][29] */
w67 = arg[0] ? arg[0][29] : 0;
/* #561: @66 = 1 */
w66 = 1.;
/* #562: @65 = 9 */
w65 = 9.;
/* #563: @6 = 0x1 */
/* #564: @7 = zeros(2x1,0nz) */
/* #565: @8 = zeros(2x2,0nz) */
/* #566: @9 = zeros(2x5,0nz) */
/* #567: @10 = 0x1 */
/* #568: @11 = 0x1 */
/* #569: @12 = 0x4 */
/* #570: @13 = 0x1 */
/* #571: @14 = 0x1 */
/* #572: @26 = (-@26) */
for (i=0, rr=w26, cs=w26; i<2; ++i) *rr++ = (- *cs++ );
/* #573: @27 = zeros(2x2) */
casadi_clear(w27, 4);
/* #574: @28 = zeros(2x5) */
casadi_clear(w28, 10);
/* #575: @29 = 0x1 */
/* #576: @30 = 0x1 */
/* #577: @31 = 0x4 */
/* #578: @32 = 0x1 */
/* #579: @33 = 0x1 */
/* #580: @34 = zeros(2x1,0nz) */
/* #581: @35 = 00 */
/* #582: @36 = 00 */
/* #583: @37 = 00 */
/* #584: @38 = 00 */
/* #585: @39 = 0x1 */
/* #586: @72 = vertcat(@68, @69) */
rr=w72;
*rr++ = w68;
*rr++ = w69;
/* #587: @62 = 0 */
w62 = 0.;
/* #588: @59 = 0 */
w59 = 0.;
/* #589: @56 = 0 */
w56 = 0.;
/* #590: @76 = 0x1 */
/* #591: @77 = zeros(2x1,0nz) */
/* #592: @78 = zeros(2x2,0nz) */
/* #593: @79 = zeros(2x5,0nz) */
/* #594: @80 = 0x1 */
/* #595: @81 = 0x1 */
/* #596: @82 = 0x4 */
/* #597: @83 = 0x1 */
/* #598: @84 = 0x1 */
/* #599: @25 = zeros(2x1) */
casadi_clear(w25, 2);
/* #600: @86 = zeros(2x2) */
casadi_clear(w86, 4);
/* #601: @87 = zeros(2x5) */
casadi_clear(w87, 10);
/* #602: @88 = 0x1 */
/* #603: @89 = 0x1 */
/* #604: @90 = 0x4 */
/* #605: @91 = 0x1 */
/* #606: @92 = 0x1 */
/* #607: {@93, @53, NULL, NULL, NULL, NULL} = fwd1_adj1_F(@3, @67, @66, @65, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @26, @27, @28, @29, @30, @31, @32, @33, @15, @34, @35, @36, @37, @38, @39, @72, @70, @62, @59, @56, @76, @77, @78, @79, @80, @81, @82, @83, @84, @15, @25, @86, @87, @88, @89, @90, @91, @92, @15) */
arg1[0]=w3;
arg1[1]=(&w67);
arg1[2]=(&w66);
arg1[3]=(&w65);
arg1[4]=(&w5);
arg1[5]=0;
arg1[6]=0;
arg1[7]=0;
arg1[8]=0;
arg1[9]=0;
arg1[10]=0;
arg1[11]=0;
arg1[12]=0;
arg1[13]=0;
arg1[14]=0;
arg1[15]=w26;
arg1[16]=w27;
arg1[17]=w28;
arg1[18]=0;
arg1[19]=0;
arg1[20]=0;
arg1[21]=0;
arg1[22]=0;
arg1[23]=0;
arg1[24]=0;
arg1[25]=0;
arg1[26]=0;
arg1[27]=0;
arg1[28]=0;
arg1[29]=0;
arg1[30]=w72;
arg1[31]=(&w70);
arg1[32]=(&w62);
arg1[33]=(&w59);
arg1[34]=(&w56);
arg1[35]=0;
arg1[36]=0;
arg1[37]=0;
arg1[38]=0;
arg1[39]=0;
arg1[40]=0;
arg1[41]=0;
arg1[42]=0;
arg1[43]=0;
arg1[44]=0;
arg1[45]=w25;
arg1[46]=w86;
arg1[47]=w87;
arg1[48]=0;
arg1[49]=0;
arg1[50]=0;
arg1[51]=0;
arg1[52]=0;
arg1[53]=0;
res1[0]=w93;
res1[1]=(&w53);
res1[2]=0;
res1[3]=0;
res1[4]=0;
res1[5]=0;
if (casadi_f17(arg1, res1, iw, w, 0)) return 1;
/* #608: {@67, @66} = vertsplit(@93) */
w67 = w93[0];
w66 = w93[1];
/* #609: @68 = (2.*@68) */
w68 = (2.* w68 );
/* #610: @68 = (@4*@68) */
w68 = (w4*w68);
/* #611: @67 = (@67+@68) */
w67 += w68;
/* #612: @69 = (2.*@69) */
w69 = (2.* w69 );
/* #613: @69 = (@4*@69) */
w69 = (w4*w69);
/* #614: @66 = (@66+@69) */
w66 += w69;
/* #615: @70 = (2.*@70) */
w70 = (2.* w70 );
/* #616: @70 = (@4*@70) */
w70 = (w4*w70);
/* #617: @53 = (@53+@70) */
w53 += w70;
/* #618: @71 = (2.*@71) */
w71 = (2.* w71 );
/* #619: @4 = (@4*@71) */
w4 *= w71;
/* #620: @6 = 00 */
/* #621: @96 = vertcat(@1, @2, @94, @43, @42, @95, @46, @45, @75, @49, @48, @74, @52, @51, @73, @55, @54, @41, @58, @57, @44, @61, @60, @47, @64, @63, @50, @67, @66, @53, @4, @6) */
rr=w96;
*rr++ = w1;
*rr++ = w2;
*rr++ = w94;
*rr++ = w43;
*rr++ = w42;
*rr++ = w95;
*rr++ = w46;
*rr++ = w45;
*rr++ = w75;
*rr++ = w49;
*rr++ = w48;
*rr++ = w74;
*rr++ = w52;
*rr++ = w51;
*rr++ = w73;
*rr++ = w55;
*rr++ = w54;
*rr++ = w41;
*rr++ = w58;
*rr++ = w57;
*rr++ = w44;
*rr++ = w61;
*rr++ = w60;
*rr++ = w47;
*rr++ = w64;
*rr++ = w63;
*rr++ = w50;
*rr++ = w67;
*rr++ = w66;
*rr++ = w53;
*rr++ = w4;
/* #622: @97 = @96[:31] */
for (rr=w97, ss=w96+0; ss!=w96+31; ss+=1) *rr++ = *ss;
/* #623: (@0[:31] = @97) */
for (rr=w0+0, ss=w97; rr!=w0+31; rr+=1) *rr = *ss++;
/* #624: @97 = @96[:31] */
for (rr=w97, ss=w96+0; ss!=w96+31; ss+=1) *rr++ = *ss;
/* #625: (@0[:31] = @97) */
for (rr=w0+0, ss=w97; rr!=w0+31; rr+=1) *rr = *ss++;
/* #626: @97 = @0' */
casadi_trans(w0,casadi_s12, w97, casadi_s12, iw);
/* #627: output[0][0] = @97 */
casadi_copy(w97, 31, res[0]);
return 0;
}
/* solver:(x0[32],p,lbx[32],ubx[32],lbg[42],ubg[42],lam_x0[32],lam_g0[42])->(x[32],f,g[42],lam_x[32],lam_g[42],lam_p) */
static int casadi_f1(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
const casadi_real one=1;
static struct casadi_ocp_block block_AB[10], block_CD[11], block_RSQ[11];
struct casadi_fatrop_data* d=&casadi_f1_mem[mem];
struct casadi_fatrop_prob p;
struct casadi_nlpsol_data d_nlp;
struct casadi_nlpsol_prob p_nlp;
struct casadi_oracle_data d_oracle;
d_nlp.oracle = &d_oracle;
d_nlp.p = arg[1];
d_nlp.lbx = arg[2];
d_nlp.ubx = arg[3];
d_nlp.lbg = arg[4];
d_nlp.ubg = arg[5];
d_nlp.x0 = arg[0];
d_nlp.lam_x0 = arg[6];
d_nlp.lam_g0 = arg[7];
d_nlp.x = res[0];
d_nlp.f = res[1];
d_nlp.g = res[2];
d_nlp.lam_x = res[3];
d_nlp.lam_g = res[4];
d_nlp.lam_p = res[5];
d_nlp.prob = &p_nlp;
p_nlp.nx = 32;
p_nlp.ng = 42;
p_nlp.np = 1;
p_nlp.detect_bounds.ng = 0;
casadi_nlpsol_init(&d_nlp, &arg, &res, &iw, &w);
if (d_nlp.x0) {
casadi_copy(d_nlp.x0, 32, d_nlp.z);
} else {
casadi_clear(d_nlp.z, 32);
}
if (d_nlp.lbx) {
casadi_copy(d_nlp.lbx, 32, d_nlp.lbz);
} else {
casadi_fill(d_nlp.lbz, 32, -casadi_inf);
}
if (d_nlp.ubx) {
casadi_copy(d_nlp.ubx, 32, d_nlp.ubz);
} else {
casadi_fill(d_nlp.ubz, 32, casadi_inf);
}
if (d_nlp.lam_x0) {
casadi_copy(d_nlp.lam_x0, 32, d_nlp.lam);
} else {
casadi_clear(d_nlp.lam, 32);
}
if (d_nlp.lbg) {
casadi_copy(d_nlp.lbg, 42, d_nlp.lbz+32);
} else {
casadi_fill(d_nlp.lbz+32, 42, -casadi_inf);
}
if (d_nlp.ubg) {
casadi_copy(d_nlp.ubg, 42, d_nlp.ubz+32);
} else {
casadi_fill(d_nlp.ubz+32, 42, casadi_inf);
}
if (d_nlp.lam_g0) {
casadi_copy(d_nlp.lam_g0, 42, d_nlp.lam+32);
} else {
casadi_clear(d_nlp.lam+32, 42);
}
d->nlp = &d_nlp;
d->prob = &p;
p.nlp = &p_nlp;
p.nx = casadi_s13;
p.nu = casadi_s14;
p.ABsp = casadi_s15;
p.AB_offsets = casadi_s16;
p.CDsp = casadi_s17;
p.CD_offsets = casadi_s18;
p.RSQsp = casadi_s19;
p.RSQ_offsets = casadi_s20;
p.AB = block_AB;
casadi_unpack_ocp_blocks(10, p.AB, casadi_s21);
p.CD = block_CD;
casadi_unpack_ocp_blocks(11, p.CD, casadi_s22);
p.RSQ = block_RSQ;
casadi_unpack_ocp_blocks(11, p.RSQ, casadi_s23);
p.N = 10;
p.nlp_jac_g.checkout = 0;
p.nlp_jac_g.eval = casadi_f12;
p.nlp_jac_g.release = 0;
p.sp_a = casadi_s10;
p.sp_h = casadi_s12;
casadi_fatrop_setup(&p);
casadi_fatrop_init(d, &arg, &res, &iw, &w);
casadi_fatrop_presolve(d);
casadi_fatrop_solve(d);
d->arg[0] = d_nlp.z;
d->arg[1] = d_nlp.p;
d->arg[2] = &one;
d->arg[3] = d_nlp.lam+32;
d->res[0] = 0;
d->res[1] = 0;
d->res[2] = 0;
d->res[3] = d_nlp.lam_p;
if (casadi_f2(d->arg, d->res, d->iw, d->w, 0)) return 1;
casadi_scal(1, -1.0, d_nlp.lam_p);
casadi_copy(d_nlp.z, 32, d_nlp.x);
casadi_copy(d_nlp.z + 32, 42, d_nlp.g);
casadi_copy(d_nlp.lam, 32, d_nlp.lam_x);
casadi_copy(d_nlp.lam + 32, 42, d_nlp.lam_g);
if (d_nlp.f) casadi_copy(&d_nlp.objective, 1, d_nlp.f);
if (d_nlp.lam_p) casadi_copy(d_nlp.lam_p, 1, d_nlp.lam_p);
return 0;
return 0;
}
int casadi_f1_alloc_mem(void) {
return casadi_f1_mem_counter++;
}
int casadi_f1_init_mem(int mem) {
fatrop_init_mem(&casadi_f1_mem[mem]);
return 0;
}
void casadi_f1_free_mem(int mem) {
fatrop_free_mem(&casadi_f1_mem[mem]);
}
int casadi_f1_checkout(void) {
int mid;
if (casadi_f1_unused_stack_counter>=0) {
return casadi_f1_unused_stack[casadi_f1_unused_stack_counter--];
} else {
if (casadi_f1_mem_counter==CASADI_MAX_NUM_THREADS) return -1;
mid = casadi_f1_alloc_mem();
if (mid<0) return -1;
if(casadi_f1_init_mem(mid)) return -1;
return mid;
}
}
void casadi_f1_release(int mem) {
casadi_f1_unused_stack[++casadi_f1_unused_stack_counter] = mem;
}
/* helper:(i0[32],i1,i2[42])->(o0[1x11]) */
static int casadi_f21(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_real w0;
/* #0: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #1: output[0][0] = @0 */
if (res[0]) res[0][0] = w0;
/* #2: @0 = input[0][3] */
w0 = arg[0] ? arg[0][3] : 0;
/* #3: output[0][1] = @0 */
if (res[0]) res[0][1] = w0;
/* #4: @0 = input[0][6] */
w0 = arg[0] ? arg[0][6] : 0;
/* #5: output[0][2] = @0 */
if (res[0]) res[0][2] = w0;
/* #6: @0 = input[0][9] */
w0 = arg[0] ? arg[0][9] : 0;
/* #7: output[0][3] = @0 */
if (res[0]) res[0][3] = w0;
/* #8: @0 = input[0][12] */
w0 = arg[0] ? arg[0][12] : 0;
/* #9: output[0][4] = @0 */
if (res[0]) res[0][4] = w0;
/* #10: @0 = input[0][15] */
w0 = arg[0] ? arg[0][15] : 0;
/* #11: output[0][5] = @0 */
if (res[0]) res[0][5] = w0;
/* #12: @0 = input[0][18] */
w0 = arg[0] ? arg[0][18] : 0;
/* #13: output[0][6] = @0 */
if (res[0]) res[0][6] = w0;
/* #14: @0 = input[0][21] */
w0 = arg[0] ? arg[0][21] : 0;
/* #15: output[0][7] = @0 */
if (res[0]) res[0][7] = w0;
/* #16: @0 = input[0][24] */
w0 = arg[0] ? arg[0][24] : 0;
/* #17: output[0][8] = @0 */
if (res[0]) res[0][8] = w0;
/* #18: @0 = input[0][27] */
w0 = arg[0] ? arg[0][27] : 0;
/* #19: output[0][9] = @0 */
if (res[0]) res[0][9] = w0;
/* #20: @0 = input[0][30] */
w0 = arg[0] ? arg[0][30] : 0;
/* #21: output[0][10] = @0 */
if (res[0]) res[0][10] = w0;
return 0;
}
/* F:(i0)->(o0[1x11]) */
static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem) {
casadi_int i;
casadi_real **res1=res+1, *rr;
const casadi_real **arg1=arg+1, *cs;
int flag, mid;
casadi_real w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, w17, w18, w19, w20, w21, w22, w23, w24, w25, w26, w27, w28, w29, w30, w31, *w32=w+2269, *w33=w+2301, *w34=w+2333, *w35=w+2365, *w36=w+2367, *w37=w+2369, *w38=w+2371, *w39=w+2373, *w40=w+2375, *w41=w+2377, *w42=w+2379, *w43=w+2381, *w44=w+2383, *w45=w+2385, *w46=w+2427, *w47=w+2469, *w48=w+2501, *w49=w+2543, *w50=w+2575, *w51=w+2617;
/* #0: @0 = 0 */
w0 = 0.;
/* #1: @1 = 0.1 */
w1 = 1.0000000000000001e-01;
/* #2: @2 = 1 */
w2 = 1.;
/* #3: @3 = 0.02 */
w3 = 2.0000000000000000e-02;
/* #4: @4 = 0.1 */
w4 = 1.0000000000000001e-01;
/* #5: @5 = 1.11111 */
w5 = 1.1111111111111112e+00;
/* #6: @6 = 0.04 */
w6 = 4.0000000000000001e-02;
/* #7: @7 = 0.1 */
w7 = 1.0000000000000001e-01;
/* #8: @8 = 1.22222 */
w8 = 1.2222222222222223e+00;
/* #9: @9 = 0.06 */
w9 = 5.9999999999999998e-02;
/* #10: @10 = 0.1 */
w10 = 1.0000000000000001e-01;
/* #11: @11 = 1.33333 */
w11 = 1.3333333333333333e+00;
/* #12: @12 = 0.08 */
w12 = 8.0000000000000002e-02;
/* #13: @13 = 0.1 */
w13 = 1.0000000000000001e-01;
/* #14: @14 = 1.44444 */
w14 = 1.4444444444444444e+00;
/* #15: @15 = 0.1 */
w15 = 1.0000000000000001e-01;
/* #16: @16 = 0.1 */
w16 = 1.0000000000000001e-01;
/* #17: @17 = 1.55556 */
w17 = 1.5555555555555556e+00;
/* #18: @18 = 0.12 */
w18 = 1.2000000000000000e-01;
/* #19: @19 = 0.1 */
w19 = 1.0000000000000001e-01;
/* #20: @20 = 1.66667 */
w20 = 1.6666666666666665e+00;
/* #21: @21 = 0.14 */
w21 = 1.4000000000000001e-01;
/* #22: @22 = 0.1 */
w22 = 1.0000000000000001e-01;
/* #23: @23 = 1.77778 */
w23 = 1.7777777777777777e+00;
/* #24: @24 = 0.16 */
w24 = 1.6000000000000000e-01;
/* #25: @25 = 0.1 */
w25 = 1.0000000000000001e-01;
/* #26: @26 = 1.88889 */
w26 = 1.8888888888888888e+00;
/* #27: @27 = 0.18 */
w27 = 1.7999999999999999e-01;
/* #28: @28 = 0.1 */
w28 = 1.0000000000000001e-01;
/* #29: @29 = 2 */
w29 = 2.;
/* #30: @30 = 0.2 */
w30 = 2.0000000000000001e-01;
/* #31: @31 = 0.1 */
w31 = 1.0000000000000001e-01;
/* #32: @32 = vertcat(@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, @20, @21, @22, @23, @24, @25, @26, @27, @28, @29, @30, @31) */
rr=w32;
*rr++ = w0;
*rr++ = w1;
*rr++ = w2;
*rr++ = w3;
*rr++ = w4;
*rr++ = w5;
*rr++ = w6;
*rr++ = w7;
*rr++ = w8;
*rr++ = w9;
*rr++ = w10;
*rr++ = w11;
*rr++ = w12;
*rr++ = w13;
*rr++ = w14;
*rr++ = w15;
*rr++ = w16;
*rr++ = w17;
*rr++ = w18;
*rr++ = w19;
*rr++ = w20;
*rr++ = w21;
*rr++ = w22;
*rr++ = w23;
*rr++ = w24;
*rr++ = w25;
*rr++ = w26;
*rr++ = w27;
*rr++ = w28;
*rr++ = w29;
*rr++ = w30;
*rr++ = w31;
/* #33: @0 = input[0][0] */
w0 = arg[0] ? arg[0][0] : 0;
/* #34: @33 = -inf(32x1) */
casadi_fill(w33, 32, -casadi_inf);
/* #35: @34 = inf(32x1) */
casadi_fill(w34, 32, casadi_inf);
/* #36: @35 = zeros(2x1) */
casadi_clear(w35, 2);
/* #37: @1 = 0 */
w1 = 0.;
/* #38: @2 = 1 */
w2 = 1.;
/* #39: @3 = -1 */
w3 = -1.;
/* #40: @36 = zeros(2x1) */
casadi_clear(w36, 2);
/* #41: @4 = -0.25 */
w4 = -2.5000000000000000e-01;
/* #42: @5 = -1 */
w5 = -1.;
/* #43: @37 = zeros(2x1) */
casadi_clear(w37, 2);
/* #44: @6 = -0.25 */
w6 = -2.5000000000000000e-01;
/* #45: @7 = -1 */
w7 = -1.;
/* #46: @38 = zeros(2x1) */
casadi_clear(w38, 2);
/* #47: @8 = -0.25 */
w8 = -2.5000000000000000e-01;
/* #48: @9 = -1 */
w9 = -1.;
/* #49: @39 = zeros(2x1) */
casadi_clear(w39, 2);
/* #50: @10 = -0.25 */
w10 = -2.5000000000000000e-01;
/* #51: @11 = -1 */
w11 = -1.;
/* #52: @40 = zeros(2x1) */
casadi_clear(w40, 2);
/* #53: @12 = -0.25 */
w12 = -2.5000000000000000e-01;
/* #54: @13 = -1 */
w13 = -1.;
/* #55: @41 = zeros(2x1) */
casadi_clear(w41, 2);
/* #56: @14 = -0.25 */
w14 = -2.5000000000000000e-01;
/* #57: @15 = -1 */
w15 = -1.;
/* #58: @42 = zeros(2x1) */
casadi_clear(w42, 2);
/* #59: @16 = -0.25 */
w16 = -2.5000000000000000e-01;
/* #60: @17 = -1 */
w17 = -1.;
/* #61: @43 = zeros(2x1) */
casadi_clear(w43, 2);
/* #62: @18 = -0.25 */
w18 = -2.5000000000000000e-01;
/* #63: @19 = -1 */
w19 = -1.;
/* #64: @44 = zeros(2x1) */
casadi_clear(w44, 2);
/* #65: @20 = -0.25 */
w20 = -2.5000000000000000e-01;
/* #66: @21 = -1 */
w21 = -1.;
/* #67: @22 = -0.25 */
w22 = -2.5000000000000000e-01;
/* #68: @45 = vertcat(@35, @1, @2, @3, @36, @4, @5, @37, @6, @7, @38, @8, @9, @39, @10, @11, @40, @12, @13, @41, @14, @15, @42, @16, @17, @43, @18, @19, @44, @20, @21, @22) */
rr=w45;
for (i=0, cs=w35; i<2; ++i) *rr++ = *cs++;
*rr++ = w1;
*rr++ = w2;
*rr++ = w3;
for (i=0, cs=w36; i<2; ++i) *rr++ = *cs++;
*rr++ = w4;
*rr++ = w5;
for (i=0, cs=w37; i<2; ++i) *rr++ = *cs++;
*rr++ = w6;
*rr++ = w7;
for (i=0, cs=w38; i<2; ++i) *rr++ = *cs++;
*rr++ = w8;
*rr++ = w9;
for (i=0, cs=w39; i<2; ++i) *rr++ = *cs++;
*rr++ = w10;
*rr++ = w11;
for (i=0, cs=w40; i<2; ++i) *rr++ = *cs++;
*rr++ = w12;
*rr++ = w13;
for (i=0, cs=w41; i<2; ++i) *rr++ = *cs++;
*rr++ = w14;
*rr++ = w15;
for (i=0, cs=w42; i<2; ++i) *rr++ = *cs++;
*rr++ = w16;
*rr++ = w17;
for (i=0, cs=w43; i<2; ++i) *rr++ = *cs++;
*rr++ = w18;
*rr++ = w19;
for (i=0, cs=w44; i<2; ++i) *rr++ = *cs++;
*rr++ = w20;
*rr++ = w21;
*rr++ = w22;
/* #69: @3 = 1 */
w3 = 1.;
/* #70: @4 = inf */
w4 = casadi_inf;
/* #71: @5 = 1 */
w5 = 1.;
/* #72: @6 = inf */
w6 = casadi_inf;
/* #73: @7 = 1 */
w7 = 1.;
/* #74: @8 = inf */
w8 = casadi_inf;
/* #75: @9 = 1 */
w9 = 1.;
/* #76: @10 = inf */
w10 = casadi_inf;
/* #77: @11 = 1 */
w11 = 1.;
/* #78: @12 = inf */
w12 = casadi_inf;
/* #79: @13 = 1 */
w13 = 1.;
/* #80: @14 = inf */
w14 = casadi_inf;
/* #81: @15 = 1 */
w15 = 1.;
/* #82: @16 = inf */
w16 = casadi_inf;
/* #83: @17 = 1 */
w17 = 1.;
/* #84: @18 = inf */
w18 = casadi_inf;
/* #85: @19 = 1 */
w19 = 1.;
/* #86: @20 = inf */
w20 = casadi_inf;
/* #87: @21 = 1 */
w21 = 1.;
/* #88: @22 = inf */
w22 = casadi_inf;
/* #89: @46 = vertcat(@35, @1, @2, @3, @36, @4, @5, @37, @6, @7, @38, @8, @9, @39, @10, @11, @40, @12, @13, @41, @14, @15, @42, @16, @17, @43, @18, @19, @44, @20, @21, @22) */
rr=w46;
for (i=0, cs=w35; i<2; ++i) *rr++ = *cs++;
*rr++ = w1;
*rr++ = w2;
*rr++ = w3;
for (i=0, cs=w36; i<2; ++i) *rr++ = *cs++;
*rr++ = w4;
*rr++ = w5;
for (i=0, cs=w37; i<2; ++i) *rr++ = *cs++;
*rr++ = w6;
*rr++ = w7;
for (i=0, cs=w38; i<2; ++i) *rr++ = *cs++;
*rr++ = w8;
*rr++ = w9;
for (i=0, cs=w39; i<2; ++i) *rr++ = *cs++;
*rr++ = w10;
*rr++ = w11;
for (i=0, cs=w40; i<2; ++i) *rr++ = *cs++;
*rr++ = w12;
*rr++ = w13;
for (i=0, cs=w41; i<2; ++i) *rr++ = *cs++;
*rr++ = w14;
*rr++ = w15;
for (i=0, cs=w42; i<2; ++i) *rr++ = *cs++;
*rr++ = w16;
*rr++ = w17;
for (i=0, cs=w43; i<2; ++i) *rr++ = *cs++;
*rr++ = w18;
*rr++ = w19;
for (i=0, cs=w44; i<2; ++i) *rr++ = *cs++;
*rr++ = w20;
*rr++ = w21;
*rr++ = w22;
/* #90: @47 = zeros(32x1) */
casadi_clear(w47, 32);
/* #91: @48 = zeros(42x1) */
casadi_clear(w48, 42);
/* #92: {@49, NULL, NULL, NULL, @50, NULL} = solver(@32, @0, @33, @34, @45, @46, @47, @48) */
arg1[0]=w32;
arg1[1]=(&w0);
arg1[2]=w33;
arg1[3]=w34;
arg1[4]=w45;
arg1[5]=w46;
arg1[6]=w47;
arg1[7]=w48;
res1[0]=w49;
res1[1]=0;
res1[2]=0;
res1[3]=0;
res1[4]=w50;
res1[5]=0;
mid = casadi_f1_checkout();
if (mid<0) return 1;
flag = casadi_f1(arg1, res1, iw, w, mid);
casadi_f1_release(mid);
if (flag) return 1;
/* #93: @51 = helper(@49, @0, @50) */
arg1[0]=w49;
arg1[1]=(&w0);
arg1[2]=w50;
res1[0]=w51;
if (casadi_f21(arg1, res1, iw, w, 0)) return 1;
/* #94: output[0][0] = @51 */
casadi_copy(w51, 11, res[0]);
return 0;
}
CASADI_SYMBOL_EXPORT int F(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, int mem){
return casadi_f0(arg, res, iw, w, mem);
}
CASADI_SYMBOL_EXPORT int F_alloc_mem(void) {
return 0;
}
CASADI_SYMBOL_EXPORT int F_init_mem(int mem) {
return 0;
}
CASADI_SYMBOL_EXPORT void F_free_mem(int mem) {
}
CASADI_SYMBOL_EXPORT int F_checkout(void) {
return 0;
}
CASADI_SYMBOL_EXPORT void F_release(int mem) {
}
CASADI_SYMBOL_EXPORT void F_incref(void) {
}
CASADI_SYMBOL_EXPORT void F_decref(void) {
}
CASADI_SYMBOL_EXPORT casadi_int F_n_in(void) { return 1;}
CASADI_SYMBOL_EXPORT casadi_int F_n_out(void) { return 1;}
CASADI_SYMBOL_EXPORT casadi_real F_default_in(casadi_int i) {
switch (i) {
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const char* F_name_in(casadi_int i) {
switch (i) {
case 0: return "i0";
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const char* F_name_out(casadi_int i) {
switch (i) {
case 0: return "o0";
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const casadi_int* F_sparsity_in(casadi_int i) {
switch (i) {
case 0: return casadi_s24;
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const casadi_int* F_sparsity_out(casadi_int i) {
switch (i) {
case 0: return casadi_s25;
default: return 0;
}
}
CASADI_SYMBOL_EXPORT int F_work(casadi_int *sz_arg, casadi_int* sz_res, casadi_int *sz_iw, casadi_int *sz_w) {
if (sz_arg) *sz_arg = 141;
if (sz_res) *sz_res = 43;
if (sz_iw) *sz_iw = 229;
if (sz_w) *sz_w = 2628;
return 0;
}
CASADI_SYMBOL_EXPORT int F_work_bytes(casadi_int *sz_arg, casadi_int* sz_res, casadi_int *sz_iw, casadi_int *sz_w) {
if (sz_arg) *sz_arg = 141*sizeof(const casadi_real*);
if (sz_res) *sz_res = 43*sizeof(casadi_real*);
if (sz_iw) *sz_iw = 229*sizeof(casadi_int);
if (sz_w) *sz_w = 2628*sizeof(casadi_real);
return 0;
}
casadi_int main_F(casadi_int argc, char* argv[]) {
casadi_int j;
casadi_real* a;
const casadi_real* r;
casadi_int flag;
casadi_int iw[229];
casadi_real w[2640];
const casadi_real* arg[141];
casadi_real* res[43];
arg[0] = w+0;
res[0] = w+1;
a = w;
for (j=0; j<1; ++j) if (scanf("%lg", a++)<=0) return 2;
flag = F(arg, res, iw, w+12, 0);
if (flag) return flag;
r = w+1;
for (j=0; j<11; ++j) CASADI_PRINTF("%g ", *r++);
CASADI_PRINTF("\n");
return 0;
}
CASADI_SYMBOL_EXPORT int main(int argc, char* argv[]) {
if (argc<2) {
/* name error */
} else if (strcmp(argv[1], "F")==0) {
return main_F(argc-2, argv+2);
}
fprintf(stderr, "First input should be a command string. Possible values: 'F'\nNote: you may use function.generate_input to create a command string.\n");
return 1;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment