#include "live.h"

namespace {
#define DIM 22
#define EDIM 21
#define MEDIM 21
typedef void (*Hfun)(double *, double *, double *);
const static double MAHA_THRESH_4 = 7.814727903251177;
const static double MAHA_THRESH_9 = 7.814727903251177;
const static double MAHA_THRESH_10 = 7.814727903251177;
const static double MAHA_THRESH_12 = 7.814727903251177;
const static double MAHA_THRESH_35 = 7.814727903251177;
const static double MAHA_THRESH_32 = 9.487729036781154;
const static double MAHA_THRESH_13 = 7.814727903251177;
const static double MAHA_THRESH_14 = 7.814727903251177;
const static double MAHA_THRESH_33 = 7.814727903251177;

void H(double *in_vec, double *out_8674808526469126384) {
   out_8674808526469126384[0] = 0;
   out_8674808526469126384[1] = -sin(in_vec[1])*sin(in_vec[2])*in_vec[4] - sin(in_vec[1])*cos(in_vec[2])*in_vec[3] - cos(in_vec[1])*in_vec[5];
   out_8674808526469126384[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4];
   out_8674808526469126384[3] = cos(in_vec[1])*cos(in_vec[2]);
   out_8674808526469126384[4] = sin(in_vec[2])*cos(in_vec[1]);
   out_8674808526469126384[5] = -sin(in_vec[1]);
   out_8674808526469126384[6] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (-sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*in_vec[5];
   out_8674808526469126384[7] = -sin(in_vec[0])*sin(in_vec[1])*in_vec[5] + sin(in_vec[0])*sin(in_vec[2])*cos(in_vec[1])*in_vec[4] + sin(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3];
   out_8674808526469126384[8] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]))*in_vec[4];
   out_8674808526469126384[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]);
   out_8674808526469126384[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]);
   out_8674808526469126384[11] = sin(in_vec[0])*cos(in_vec[1]);
   out_8674808526469126384[12] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (-sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) + sin(in_vec[2])*cos(in_vec[0]))*in_vec[3] - sin(in_vec[0])*cos(in_vec[1])*in_vec[5];
   out_8674808526469126384[13] = -sin(in_vec[1])*cos(in_vec[0])*in_vec[5] + sin(in_vec[2])*cos(in_vec[0])*cos(in_vec[1])*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3];
   out_8674808526469126384[14] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (sin(in_vec[0])*cos(in_vec[2]) - sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[3];
   out_8674808526469126384[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]);
   out_8674808526469126384[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]);
   out_8674808526469126384[17] = cos(in_vec[0])*cos(in_vec[1]);
}
void err_fun(double *nom_x, double *delta_x, double *out_826382423215298085) {
   out_826382423215298085[0] = delta_x[0] + nom_x[0];
   out_826382423215298085[1] = delta_x[1] + nom_x[1];
   out_826382423215298085[2] = delta_x[2] + nom_x[2];
   out_826382423215298085[3] = -0.5*delta_x[3]*nom_x[4] - 0.5*delta_x[4]*nom_x[5] - 0.5*delta_x[5]*nom_x[6] + 1.0*nom_x[3];
   out_826382423215298085[4] = 0.5*delta_x[3]*nom_x[3] + 0.5*delta_x[4]*nom_x[6] - 0.5*delta_x[5]*nom_x[5] + 1.0*nom_x[4];
   out_826382423215298085[5] = -0.5*delta_x[3]*nom_x[6] + 0.5*delta_x[4]*nom_x[3] + 0.5*delta_x[5]*nom_x[4] + 1.0*nom_x[5];
   out_826382423215298085[6] = 0.5*delta_x[3]*nom_x[5] - 0.5*delta_x[4]*nom_x[4] + 0.5*delta_x[5]*nom_x[3] + 1.0*nom_x[6];
   out_826382423215298085[7] = delta_x[6] + nom_x[7];
   out_826382423215298085[8] = delta_x[7] + nom_x[8];
   out_826382423215298085[9] = delta_x[8] + nom_x[9];
   out_826382423215298085[10] = delta_x[9] + nom_x[10];
   out_826382423215298085[11] = delta_x[10] + nom_x[11];
   out_826382423215298085[12] = delta_x[11] + nom_x[12];
   out_826382423215298085[13] = delta_x[12] + nom_x[13];
   out_826382423215298085[14] = delta_x[13] + nom_x[14];
   out_826382423215298085[15] = delta_x[14] + nom_x[15];
   out_826382423215298085[16] = delta_x[15] + nom_x[16];
   out_826382423215298085[17] = delta_x[16] + nom_x[17];
   out_826382423215298085[18] = delta_x[17] + nom_x[18];
   out_826382423215298085[19] = delta_x[18] + nom_x[19];
   out_826382423215298085[20] = delta_x[19] + nom_x[20];
   out_826382423215298085[21] = delta_x[20] + nom_x[21];
}
void inv_err_fun(double *nom_x, double *true_x, double *out_7532358635846209890) {
   out_7532358635846209890[0] = -nom_x[0] + true_x[0];
   out_7532358635846209890[1] = -nom_x[1] + true_x[1];
   out_7532358635846209890[2] = -nom_x[2] + true_x[2];
   out_7532358635846209890[3] = 2*nom_x[3]*true_x[4] - 2*nom_x[4]*true_x[3] + 2*nom_x[5]*true_x[6] - 2*nom_x[6]*true_x[5];
   out_7532358635846209890[4] = 2*nom_x[3]*true_x[5] - 2*nom_x[4]*true_x[6] - 2*nom_x[5]*true_x[3] + 2*nom_x[6]*true_x[4];
   out_7532358635846209890[5] = 2*nom_x[3]*true_x[6] + 2*nom_x[4]*true_x[5] - 2*nom_x[5]*true_x[4] - 2*nom_x[6]*true_x[3];
   out_7532358635846209890[6] = -nom_x[7] + true_x[7];
   out_7532358635846209890[7] = -nom_x[8] + true_x[8];
   out_7532358635846209890[8] = -nom_x[9] + true_x[9];
   out_7532358635846209890[9] = -nom_x[10] + true_x[10];
   out_7532358635846209890[10] = -nom_x[11] + true_x[11];
   out_7532358635846209890[11] = -nom_x[12] + true_x[12];
   out_7532358635846209890[12] = -nom_x[13] + true_x[13];
   out_7532358635846209890[13] = -nom_x[14] + true_x[14];
   out_7532358635846209890[14] = -nom_x[15] + true_x[15];
   out_7532358635846209890[15] = -nom_x[16] + true_x[16];
   out_7532358635846209890[16] = -nom_x[17] + true_x[17];
   out_7532358635846209890[17] = -nom_x[18] + true_x[18];
   out_7532358635846209890[18] = -nom_x[19] + true_x[19];
   out_7532358635846209890[19] = -nom_x[20] + true_x[20];
   out_7532358635846209890[20] = -nom_x[21] + true_x[21];
}
void H_mod_fun(double *state, double *out_2474155941233457423) {
   out_2474155941233457423[0] = 1.0;
   out_2474155941233457423[1] = 0;
   out_2474155941233457423[2] = 0;
   out_2474155941233457423[3] = 0;
   out_2474155941233457423[4] = 0;
   out_2474155941233457423[5] = 0;
   out_2474155941233457423[6] = 0;
   out_2474155941233457423[7] = 0;
   out_2474155941233457423[8] = 0;
   out_2474155941233457423[9] = 0;
   out_2474155941233457423[10] = 0;
   out_2474155941233457423[11] = 0;
   out_2474155941233457423[12] = 0;
   out_2474155941233457423[13] = 0;
   out_2474155941233457423[14] = 0;
   out_2474155941233457423[15] = 0;
   out_2474155941233457423[16] = 0;
   out_2474155941233457423[17] = 0;
   out_2474155941233457423[18] = 0;
   out_2474155941233457423[19] = 0;
   out_2474155941233457423[20] = 0;
   out_2474155941233457423[21] = 0;
   out_2474155941233457423[22] = 1.0;
   out_2474155941233457423[23] = 0;
   out_2474155941233457423[24] = 0;
   out_2474155941233457423[25] = 0;
   out_2474155941233457423[26] = 0;
   out_2474155941233457423[27] = 0;
   out_2474155941233457423[28] = 0;
   out_2474155941233457423[29] = 0;
   out_2474155941233457423[30] = 0;
   out_2474155941233457423[31] = 0;
   out_2474155941233457423[32] = 0;
   out_2474155941233457423[33] = 0;
   out_2474155941233457423[34] = 0;
   out_2474155941233457423[35] = 0;
   out_2474155941233457423[36] = 0;
   out_2474155941233457423[37] = 0;
   out_2474155941233457423[38] = 0;
   out_2474155941233457423[39] = 0;
   out_2474155941233457423[40] = 0;
   out_2474155941233457423[41] = 0;
   out_2474155941233457423[42] = 0;
   out_2474155941233457423[43] = 0;
   out_2474155941233457423[44] = 1.0;
   out_2474155941233457423[45] = 0;
   out_2474155941233457423[46] = 0;
   out_2474155941233457423[47] = 0;
   out_2474155941233457423[48] = 0;
   out_2474155941233457423[49] = 0;
   out_2474155941233457423[50] = 0;
   out_2474155941233457423[51] = 0;
   out_2474155941233457423[52] = 0;
   out_2474155941233457423[53] = 0;
   out_2474155941233457423[54] = 0;
   out_2474155941233457423[55] = 0;
   out_2474155941233457423[56] = 0;
   out_2474155941233457423[57] = 0;
   out_2474155941233457423[58] = 0;
   out_2474155941233457423[59] = 0;
   out_2474155941233457423[60] = 0;
   out_2474155941233457423[61] = 0;
   out_2474155941233457423[62] = 0;
   out_2474155941233457423[63] = 0;
   out_2474155941233457423[64] = 0;
   out_2474155941233457423[65] = 0;
   out_2474155941233457423[66] = -0.5*state[4];
   out_2474155941233457423[67] = -0.5*state[5];
   out_2474155941233457423[68] = -0.5*state[6];
   out_2474155941233457423[69] = 0;
   out_2474155941233457423[70] = 0;
   out_2474155941233457423[71] = 0;
   out_2474155941233457423[72] = 0;
   out_2474155941233457423[73] = 0;
   out_2474155941233457423[74] = 0;
   out_2474155941233457423[75] = 0;
   out_2474155941233457423[76] = 0;
   out_2474155941233457423[77] = 0;
   out_2474155941233457423[78] = 0;
   out_2474155941233457423[79] = 0;
   out_2474155941233457423[80] = 0;
   out_2474155941233457423[81] = 0;
   out_2474155941233457423[82] = 0;
   out_2474155941233457423[83] = 0;
   out_2474155941233457423[84] = 0;
   out_2474155941233457423[85] = 0;
   out_2474155941233457423[86] = 0;
   out_2474155941233457423[87] = 0.5*state[3];
   out_2474155941233457423[88] = 0.5*state[6];
   out_2474155941233457423[89] = -0.5*state[5];
   out_2474155941233457423[90] = 0;
   out_2474155941233457423[91] = 0;
   out_2474155941233457423[92] = 0;
   out_2474155941233457423[93] = 0;
   out_2474155941233457423[94] = 0;
   out_2474155941233457423[95] = 0;
   out_2474155941233457423[96] = 0;
   out_2474155941233457423[97] = 0;
   out_2474155941233457423[98] = 0;
   out_2474155941233457423[99] = 0;
   out_2474155941233457423[100] = 0;
   out_2474155941233457423[101] = 0;
   out_2474155941233457423[102] = 0;
   out_2474155941233457423[103] = 0;
   out_2474155941233457423[104] = 0;
   out_2474155941233457423[105] = 0;
   out_2474155941233457423[106] = 0;
   out_2474155941233457423[107] = 0;
   out_2474155941233457423[108] = -0.5*state[6];
   out_2474155941233457423[109] = 0.5*state[3];
   out_2474155941233457423[110] = 0.5*state[4];
   out_2474155941233457423[111] = 0;
   out_2474155941233457423[112] = 0;
   out_2474155941233457423[113] = 0;
   out_2474155941233457423[114] = 0;
   out_2474155941233457423[115] = 0;
   out_2474155941233457423[116] = 0;
   out_2474155941233457423[117] = 0;
   out_2474155941233457423[118] = 0;
   out_2474155941233457423[119] = 0;
   out_2474155941233457423[120] = 0;
   out_2474155941233457423[121] = 0;
   out_2474155941233457423[122] = 0;
   out_2474155941233457423[123] = 0;
   out_2474155941233457423[124] = 0;
   out_2474155941233457423[125] = 0;
   out_2474155941233457423[126] = 0;
   out_2474155941233457423[127] = 0;
   out_2474155941233457423[128] = 0;
   out_2474155941233457423[129] = 0.5*state[5];
   out_2474155941233457423[130] = -0.5*state[4];
   out_2474155941233457423[131] = 0.5*state[3];
   out_2474155941233457423[132] = 0;
   out_2474155941233457423[133] = 0;
   out_2474155941233457423[134] = 0;
   out_2474155941233457423[135] = 0;
   out_2474155941233457423[136] = 0;
   out_2474155941233457423[137] = 0;
   out_2474155941233457423[138] = 0;
   out_2474155941233457423[139] = 0;
   out_2474155941233457423[140] = 0;
   out_2474155941233457423[141] = 0;
   out_2474155941233457423[142] = 0;
   out_2474155941233457423[143] = 0;
   out_2474155941233457423[144] = 0;
   out_2474155941233457423[145] = 0;
   out_2474155941233457423[146] = 0;
   out_2474155941233457423[147] = 0;
   out_2474155941233457423[148] = 0;
   out_2474155941233457423[149] = 0;
   out_2474155941233457423[150] = 0;
   out_2474155941233457423[151] = 0;
   out_2474155941233457423[152] = 0;
   out_2474155941233457423[153] = 1.0;
   out_2474155941233457423[154] = 0;
   out_2474155941233457423[155] = 0;
   out_2474155941233457423[156] = 0;
   out_2474155941233457423[157] = 0;
   out_2474155941233457423[158] = 0;
   out_2474155941233457423[159] = 0;
   out_2474155941233457423[160] = 0;
   out_2474155941233457423[161] = 0;
   out_2474155941233457423[162] = 0;
   out_2474155941233457423[163] = 0;
   out_2474155941233457423[164] = 0;
   out_2474155941233457423[165] = 0;
   out_2474155941233457423[166] = 0;
   out_2474155941233457423[167] = 0;
   out_2474155941233457423[168] = 0;
   out_2474155941233457423[169] = 0;
   out_2474155941233457423[170] = 0;
   out_2474155941233457423[171] = 0;
   out_2474155941233457423[172] = 0;
   out_2474155941233457423[173] = 0;
   out_2474155941233457423[174] = 0;
   out_2474155941233457423[175] = 1.0;
   out_2474155941233457423[176] = 0;
   out_2474155941233457423[177] = 0;
   out_2474155941233457423[178] = 0;
   out_2474155941233457423[179] = 0;
   out_2474155941233457423[180] = 0;
   out_2474155941233457423[181] = 0;
   out_2474155941233457423[182] = 0;
   out_2474155941233457423[183] = 0;
   out_2474155941233457423[184] = 0;
   out_2474155941233457423[185] = 0;
   out_2474155941233457423[186] = 0;
   out_2474155941233457423[187] = 0;
   out_2474155941233457423[188] = 0;
   out_2474155941233457423[189] = 0;
   out_2474155941233457423[190] = 0;
   out_2474155941233457423[191] = 0;
   out_2474155941233457423[192] = 0;
   out_2474155941233457423[193] = 0;
   out_2474155941233457423[194] = 0;
   out_2474155941233457423[195] = 0;
   out_2474155941233457423[196] = 0;
   out_2474155941233457423[197] = 1.0;
   out_2474155941233457423[198] = 0;
   out_2474155941233457423[199] = 0;
   out_2474155941233457423[200] = 0;
   out_2474155941233457423[201] = 0;
   out_2474155941233457423[202] = 0;
   out_2474155941233457423[203] = 0;
   out_2474155941233457423[204] = 0;
   out_2474155941233457423[205] = 0;
   out_2474155941233457423[206] = 0;
   out_2474155941233457423[207] = 0;
   out_2474155941233457423[208] = 0;
   out_2474155941233457423[209] = 0;
   out_2474155941233457423[210] = 0;
   out_2474155941233457423[211] = 0;
   out_2474155941233457423[212] = 0;
   out_2474155941233457423[213] = 0;
   out_2474155941233457423[214] = 0;
   out_2474155941233457423[215] = 0;
   out_2474155941233457423[216] = 0;
   out_2474155941233457423[217] = 0;
   out_2474155941233457423[218] = 0;
   out_2474155941233457423[219] = 1.0;
   out_2474155941233457423[220] = 0;
   out_2474155941233457423[221] = 0;
   out_2474155941233457423[222] = 0;
   out_2474155941233457423[223] = 0;
   out_2474155941233457423[224] = 0;
   out_2474155941233457423[225] = 0;
   out_2474155941233457423[226] = 0;
   out_2474155941233457423[227] = 0;
   out_2474155941233457423[228] = 0;
   out_2474155941233457423[229] = 0;
   out_2474155941233457423[230] = 0;
   out_2474155941233457423[231] = 0;
   out_2474155941233457423[232] = 0;
   out_2474155941233457423[233] = 0;
   out_2474155941233457423[234] = 0;
   out_2474155941233457423[235] = 0;
   out_2474155941233457423[236] = 0;
   out_2474155941233457423[237] = 0;
   out_2474155941233457423[238] = 0;
   out_2474155941233457423[239] = 0;
   out_2474155941233457423[240] = 0;
   out_2474155941233457423[241] = 1.0;
   out_2474155941233457423[242] = 0;
   out_2474155941233457423[243] = 0;
   out_2474155941233457423[244] = 0;
   out_2474155941233457423[245] = 0;
   out_2474155941233457423[246] = 0;
   out_2474155941233457423[247] = 0;
   out_2474155941233457423[248] = 0;
   out_2474155941233457423[249] = 0;
   out_2474155941233457423[250] = 0;
   out_2474155941233457423[251] = 0;
   out_2474155941233457423[252] = 0;
   out_2474155941233457423[253] = 0;
   out_2474155941233457423[254] = 0;
   out_2474155941233457423[255] = 0;
   out_2474155941233457423[256] = 0;
   out_2474155941233457423[257] = 0;
   out_2474155941233457423[258] = 0;
   out_2474155941233457423[259] = 0;
   out_2474155941233457423[260] = 0;
   out_2474155941233457423[261] = 0;
   out_2474155941233457423[262] = 0;
   out_2474155941233457423[263] = 1.0;
   out_2474155941233457423[264] = 0;
   out_2474155941233457423[265] = 0;
   out_2474155941233457423[266] = 0;
   out_2474155941233457423[267] = 0;
   out_2474155941233457423[268] = 0;
   out_2474155941233457423[269] = 0;
   out_2474155941233457423[270] = 0;
   out_2474155941233457423[271] = 0;
   out_2474155941233457423[272] = 0;
   out_2474155941233457423[273] = 0;
   out_2474155941233457423[274] = 0;
   out_2474155941233457423[275] = 0;
   out_2474155941233457423[276] = 0;
   out_2474155941233457423[277] = 0;
   out_2474155941233457423[278] = 0;
   out_2474155941233457423[279] = 0;
   out_2474155941233457423[280] = 0;
   out_2474155941233457423[281] = 0;
   out_2474155941233457423[282] = 0;
   out_2474155941233457423[283] = 0;
   out_2474155941233457423[284] = 0;
   out_2474155941233457423[285] = 1.0;
   out_2474155941233457423[286] = 0;
   out_2474155941233457423[287] = 0;
   out_2474155941233457423[288] = 0;
   out_2474155941233457423[289] = 0;
   out_2474155941233457423[290] = 0;
   out_2474155941233457423[291] = 0;
   out_2474155941233457423[292] = 0;
   out_2474155941233457423[293] = 0;
   out_2474155941233457423[294] = 0;
   out_2474155941233457423[295] = 0;
   out_2474155941233457423[296] = 0;
   out_2474155941233457423[297] = 0;
   out_2474155941233457423[298] = 0;
   out_2474155941233457423[299] = 0;
   out_2474155941233457423[300] = 0;
   out_2474155941233457423[301] = 0;
   out_2474155941233457423[302] = 0;
   out_2474155941233457423[303] = 0;
   out_2474155941233457423[304] = 0;
   out_2474155941233457423[305] = 0;
   out_2474155941233457423[306] = 0;
   out_2474155941233457423[307] = 1.0;
   out_2474155941233457423[308] = 0;
   out_2474155941233457423[309] = 0;
   out_2474155941233457423[310] = 0;
   out_2474155941233457423[311] = 0;
   out_2474155941233457423[312] = 0;
   out_2474155941233457423[313] = 0;
   out_2474155941233457423[314] = 0;
   out_2474155941233457423[315] = 0;
   out_2474155941233457423[316] = 0;
   out_2474155941233457423[317] = 0;
   out_2474155941233457423[318] = 0;
   out_2474155941233457423[319] = 0;
   out_2474155941233457423[320] = 0;
   out_2474155941233457423[321] = 0;
   out_2474155941233457423[322] = 0;
   out_2474155941233457423[323] = 0;
   out_2474155941233457423[324] = 0;
   out_2474155941233457423[325] = 0;
   out_2474155941233457423[326] = 0;
   out_2474155941233457423[327] = 0;
   out_2474155941233457423[328] = 0;
   out_2474155941233457423[329] = 1.0;
   out_2474155941233457423[330] = 0;
   out_2474155941233457423[331] = 0;
   out_2474155941233457423[332] = 0;
   out_2474155941233457423[333] = 0;
   out_2474155941233457423[334] = 0;
   out_2474155941233457423[335] = 0;
   out_2474155941233457423[336] = 0;
   out_2474155941233457423[337] = 0;
   out_2474155941233457423[338] = 0;
   out_2474155941233457423[339] = 0;
   out_2474155941233457423[340] = 0;
   out_2474155941233457423[341] = 0;
   out_2474155941233457423[342] = 0;
   out_2474155941233457423[343] = 0;
   out_2474155941233457423[344] = 0;
   out_2474155941233457423[345] = 0;
   out_2474155941233457423[346] = 0;
   out_2474155941233457423[347] = 0;
   out_2474155941233457423[348] = 0;
   out_2474155941233457423[349] = 0;
   out_2474155941233457423[350] = 0;
   out_2474155941233457423[351] = 1.0;
   out_2474155941233457423[352] = 0;
   out_2474155941233457423[353] = 0;
   out_2474155941233457423[354] = 0;
   out_2474155941233457423[355] = 0;
   out_2474155941233457423[356] = 0;
   out_2474155941233457423[357] = 0;
   out_2474155941233457423[358] = 0;
   out_2474155941233457423[359] = 0;
   out_2474155941233457423[360] = 0;
   out_2474155941233457423[361] = 0;
   out_2474155941233457423[362] = 0;
   out_2474155941233457423[363] = 0;
   out_2474155941233457423[364] = 0;
   out_2474155941233457423[365] = 0;
   out_2474155941233457423[366] = 0;
   out_2474155941233457423[367] = 0;
   out_2474155941233457423[368] = 0;
   out_2474155941233457423[369] = 0;
   out_2474155941233457423[370] = 0;
   out_2474155941233457423[371] = 0;
   out_2474155941233457423[372] = 0;
   out_2474155941233457423[373] = 1.0;
   out_2474155941233457423[374] = 0;
   out_2474155941233457423[375] = 0;
   out_2474155941233457423[376] = 0;
   out_2474155941233457423[377] = 0;
   out_2474155941233457423[378] = 0;
   out_2474155941233457423[379] = 0;
   out_2474155941233457423[380] = 0;
   out_2474155941233457423[381] = 0;
   out_2474155941233457423[382] = 0;
   out_2474155941233457423[383] = 0;
   out_2474155941233457423[384] = 0;
   out_2474155941233457423[385] = 0;
   out_2474155941233457423[386] = 0;
   out_2474155941233457423[387] = 0;
   out_2474155941233457423[388] = 0;
   out_2474155941233457423[389] = 0;
   out_2474155941233457423[390] = 0;
   out_2474155941233457423[391] = 0;
   out_2474155941233457423[392] = 0;
   out_2474155941233457423[393] = 0;
   out_2474155941233457423[394] = 0;
   out_2474155941233457423[395] = 1.0;
   out_2474155941233457423[396] = 0;
   out_2474155941233457423[397] = 0;
   out_2474155941233457423[398] = 0;
   out_2474155941233457423[399] = 0;
   out_2474155941233457423[400] = 0;
   out_2474155941233457423[401] = 0;
   out_2474155941233457423[402] = 0;
   out_2474155941233457423[403] = 0;
   out_2474155941233457423[404] = 0;
   out_2474155941233457423[405] = 0;
   out_2474155941233457423[406] = 0;
   out_2474155941233457423[407] = 0;
   out_2474155941233457423[408] = 0;
   out_2474155941233457423[409] = 0;
   out_2474155941233457423[410] = 0;
   out_2474155941233457423[411] = 0;
   out_2474155941233457423[412] = 0;
   out_2474155941233457423[413] = 0;
   out_2474155941233457423[414] = 0;
   out_2474155941233457423[415] = 0;
   out_2474155941233457423[416] = 0;
   out_2474155941233457423[417] = 1.0;
   out_2474155941233457423[418] = 0;
   out_2474155941233457423[419] = 0;
   out_2474155941233457423[420] = 0;
   out_2474155941233457423[421] = 0;
   out_2474155941233457423[422] = 0;
   out_2474155941233457423[423] = 0;
   out_2474155941233457423[424] = 0;
   out_2474155941233457423[425] = 0;
   out_2474155941233457423[426] = 0;
   out_2474155941233457423[427] = 0;
   out_2474155941233457423[428] = 0;
   out_2474155941233457423[429] = 0;
   out_2474155941233457423[430] = 0;
   out_2474155941233457423[431] = 0;
   out_2474155941233457423[432] = 0;
   out_2474155941233457423[433] = 0;
   out_2474155941233457423[434] = 0;
   out_2474155941233457423[435] = 0;
   out_2474155941233457423[436] = 0;
   out_2474155941233457423[437] = 0;
   out_2474155941233457423[438] = 0;
   out_2474155941233457423[439] = 1.0;
   out_2474155941233457423[440] = 0;
   out_2474155941233457423[441] = 0;
   out_2474155941233457423[442] = 0;
   out_2474155941233457423[443] = 0;
   out_2474155941233457423[444] = 0;
   out_2474155941233457423[445] = 0;
   out_2474155941233457423[446] = 0;
   out_2474155941233457423[447] = 0;
   out_2474155941233457423[448] = 0;
   out_2474155941233457423[449] = 0;
   out_2474155941233457423[450] = 0;
   out_2474155941233457423[451] = 0;
   out_2474155941233457423[452] = 0;
   out_2474155941233457423[453] = 0;
   out_2474155941233457423[454] = 0;
   out_2474155941233457423[455] = 0;
   out_2474155941233457423[456] = 0;
   out_2474155941233457423[457] = 0;
   out_2474155941233457423[458] = 0;
   out_2474155941233457423[459] = 0;
   out_2474155941233457423[460] = 0;
   out_2474155941233457423[461] = 1.0;
}
void f_fun(double *state, double dt, double *out_5893392617996069488) {
   out_5893392617996069488[0] = dt*state[7] + state[0];
   out_5893392617996069488[1] = dt*state[8] + state[1];
   out_5893392617996069488[2] = dt*state[9] + state[2];
   out_5893392617996069488[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3];
   out_5893392617996069488[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4];
   out_5893392617996069488[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5];
   out_5893392617996069488[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6];
   out_5893392617996069488[7] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]) + state[7];
   out_5893392617996069488[8] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]) + state[8];
   out_5893392617996069488[9] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]) + state[9];
   out_5893392617996069488[10] = state[10];
   out_5893392617996069488[11] = state[11];
   out_5893392617996069488[12] = state[12];
   out_5893392617996069488[13] = state[13];
   out_5893392617996069488[14] = state[14];
   out_5893392617996069488[15] = state[15];
   out_5893392617996069488[16] = state[16];
   out_5893392617996069488[17] = state[17];
   out_5893392617996069488[18] = state[18];
   out_5893392617996069488[19] = state[19];
   out_5893392617996069488[20] = state[20];
   out_5893392617996069488[21] = state[21];
}
void F_fun(double *state, double dt, double *out_4522217942656145191) {
   out_4522217942656145191[0] = 1;
   out_4522217942656145191[1] = 0;
   out_4522217942656145191[2] = 0;
   out_4522217942656145191[3] = 0;
   out_4522217942656145191[4] = 0;
   out_4522217942656145191[5] = 0;
   out_4522217942656145191[6] = dt;
   out_4522217942656145191[7] = 0;
   out_4522217942656145191[8] = 0;
   out_4522217942656145191[9] = 0;
   out_4522217942656145191[10] = 0;
   out_4522217942656145191[11] = 0;
   out_4522217942656145191[12] = 0;
   out_4522217942656145191[13] = 0;
   out_4522217942656145191[14] = 0;
   out_4522217942656145191[15] = 0;
   out_4522217942656145191[16] = 0;
   out_4522217942656145191[17] = 0;
   out_4522217942656145191[18] = 0;
   out_4522217942656145191[19] = 0;
   out_4522217942656145191[20] = 0;
   out_4522217942656145191[21] = 0;
   out_4522217942656145191[22] = 1;
   out_4522217942656145191[23] = 0;
   out_4522217942656145191[24] = 0;
   out_4522217942656145191[25] = 0;
   out_4522217942656145191[26] = 0;
   out_4522217942656145191[27] = 0;
   out_4522217942656145191[28] = dt;
   out_4522217942656145191[29] = 0;
   out_4522217942656145191[30] = 0;
   out_4522217942656145191[31] = 0;
   out_4522217942656145191[32] = 0;
   out_4522217942656145191[33] = 0;
   out_4522217942656145191[34] = 0;
   out_4522217942656145191[35] = 0;
   out_4522217942656145191[36] = 0;
   out_4522217942656145191[37] = 0;
   out_4522217942656145191[38] = 0;
   out_4522217942656145191[39] = 0;
   out_4522217942656145191[40] = 0;
   out_4522217942656145191[41] = 0;
   out_4522217942656145191[42] = 0;
   out_4522217942656145191[43] = 0;
   out_4522217942656145191[44] = 1;
   out_4522217942656145191[45] = 0;
   out_4522217942656145191[46] = 0;
   out_4522217942656145191[47] = 0;
   out_4522217942656145191[48] = 0;
   out_4522217942656145191[49] = 0;
   out_4522217942656145191[50] = dt;
   out_4522217942656145191[51] = 0;
   out_4522217942656145191[52] = 0;
   out_4522217942656145191[53] = 0;
   out_4522217942656145191[54] = 0;
   out_4522217942656145191[55] = 0;
   out_4522217942656145191[56] = 0;
   out_4522217942656145191[57] = 0;
   out_4522217942656145191[58] = 0;
   out_4522217942656145191[59] = 0;
   out_4522217942656145191[60] = 0;
   out_4522217942656145191[61] = 0;
   out_4522217942656145191[62] = 0;
   out_4522217942656145191[63] = 0;
   out_4522217942656145191[64] = 0;
   out_4522217942656145191[65] = 0;
   out_4522217942656145191[66] = 1;
   out_4522217942656145191[67] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[11] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]);
   out_4522217942656145191[68] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[12] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[10] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[11]);
   out_4522217942656145191[69] = 0;
   out_4522217942656145191[70] = 0;
   out_4522217942656145191[71] = 0;
   out_4522217942656145191[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
   out_4522217942656145191[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]);
   out_4522217942656145191[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]);
   out_4522217942656145191[75] = 0;
   out_4522217942656145191[76] = 0;
   out_4522217942656145191[77] = 0;
   out_4522217942656145191[78] = 0;
   out_4522217942656145191[79] = 0;
   out_4522217942656145191[80] = 0;
   out_4522217942656145191[81] = 0;
   out_4522217942656145191[82] = 0;
   out_4522217942656145191[83] = 0;
   out_4522217942656145191[84] = 0;
   out_4522217942656145191[85] = 0;
   out_4522217942656145191[86] = 0;
   out_4522217942656145191[87] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[11] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]);
   out_4522217942656145191[88] = 1;
   out_4522217942656145191[89] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[12] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[11] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[10]);
   out_4522217942656145191[90] = 0;
   out_4522217942656145191[91] = 0;
   out_4522217942656145191[92] = 0;
   out_4522217942656145191[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]);
   out_4522217942656145191[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
   out_4522217942656145191[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]);
   out_4522217942656145191[96] = 0;
   out_4522217942656145191[97] = 0;
   out_4522217942656145191[98] = 0;
   out_4522217942656145191[99] = 0;
   out_4522217942656145191[100] = 0;
   out_4522217942656145191[101] = 0;
   out_4522217942656145191[102] = 0;
   out_4522217942656145191[103] = 0;
   out_4522217942656145191[104] = 0;
   out_4522217942656145191[105] = 0;
   out_4522217942656145191[106] = 0;
   out_4522217942656145191[107] = 0;
   out_4522217942656145191[108] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[12] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[10] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[11]);
   out_4522217942656145191[109] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[12] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[11] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[10]);
   out_4522217942656145191[110] = 1;
   out_4522217942656145191[111] = 0;
   out_4522217942656145191[112] = 0;
   out_4522217942656145191[113] = 0;
   out_4522217942656145191[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]);
   out_4522217942656145191[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]);
   out_4522217942656145191[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
   out_4522217942656145191[117] = 0;
   out_4522217942656145191[118] = 0;
   out_4522217942656145191[119] = 0;
   out_4522217942656145191[120] = 0;
   out_4522217942656145191[121] = 0;
   out_4522217942656145191[122] = 0;
   out_4522217942656145191[123] = 0;
   out_4522217942656145191[124] = 0;
   out_4522217942656145191[125] = 0;
   out_4522217942656145191[126] = 0;
   out_4522217942656145191[127] = 0;
   out_4522217942656145191[128] = 0;
   out_4522217942656145191[129] = 0;
   out_4522217942656145191[130] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]);
   out_4522217942656145191[131] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[18] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[16] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[17]);
   out_4522217942656145191[132] = 1;
   out_4522217942656145191[133] = 0;
   out_4522217942656145191[134] = 0;
   out_4522217942656145191[135] = 0;
   out_4522217942656145191[136] = 0;
   out_4522217942656145191[137] = 0;
   out_4522217942656145191[138] = 0;
   out_4522217942656145191[139] = 0;
   out_4522217942656145191[140] = 0;
   out_4522217942656145191[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
   out_4522217942656145191[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]);
   out_4522217942656145191[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]);
   out_4522217942656145191[144] = 0;
   out_4522217942656145191[145] = 0;
   out_4522217942656145191[146] = 0;
   out_4522217942656145191[147] = 0;
   out_4522217942656145191[148] = 0;
   out_4522217942656145191[149] = 0;
   out_4522217942656145191[150] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[17] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]);
   out_4522217942656145191[151] = 0;
   out_4522217942656145191[152] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]);
   out_4522217942656145191[153] = 0;
   out_4522217942656145191[154] = 1;
   out_4522217942656145191[155] = 0;
   out_4522217942656145191[156] = 0;
   out_4522217942656145191[157] = 0;
   out_4522217942656145191[158] = 0;
   out_4522217942656145191[159] = 0;
   out_4522217942656145191[160] = 0;
   out_4522217942656145191[161] = 0;
   out_4522217942656145191[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]);
   out_4522217942656145191[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
   out_4522217942656145191[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]);
   out_4522217942656145191[165] = 0;
   out_4522217942656145191[166] = 0;
   out_4522217942656145191[167] = 0;
   out_4522217942656145191[168] = 0;
   out_4522217942656145191[169] = 0;
   out_4522217942656145191[170] = 0;
   out_4522217942656145191[171] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]);
   out_4522217942656145191[172] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[18] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[17] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[16]);
   out_4522217942656145191[173] = 0;
   out_4522217942656145191[174] = 0;
   out_4522217942656145191[175] = 0;
   out_4522217942656145191[176] = 1;
   out_4522217942656145191[177] = 0;
   out_4522217942656145191[178] = 0;
   out_4522217942656145191[179] = 0;
   out_4522217942656145191[180] = 0;
   out_4522217942656145191[181] = 0;
   out_4522217942656145191[182] = 0;
   out_4522217942656145191[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]);
   out_4522217942656145191[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]);
   out_4522217942656145191[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
   out_4522217942656145191[186] = 0;
   out_4522217942656145191[187] = 0;
   out_4522217942656145191[188] = 0;
   out_4522217942656145191[189] = 0;
   out_4522217942656145191[190] = 0;
   out_4522217942656145191[191] = 0;
   out_4522217942656145191[192] = 0;
   out_4522217942656145191[193] = 0;
   out_4522217942656145191[194] = 0;
   out_4522217942656145191[195] = 0;
   out_4522217942656145191[196] = 0;
   out_4522217942656145191[197] = 0;
   out_4522217942656145191[198] = 1;
   out_4522217942656145191[199] = 0;
   out_4522217942656145191[200] = 0;
   out_4522217942656145191[201] = 0;
   out_4522217942656145191[202] = 0;
   out_4522217942656145191[203] = 0;
   out_4522217942656145191[204] = 0;
   out_4522217942656145191[205] = 0;
   out_4522217942656145191[206] = 0;
   out_4522217942656145191[207] = 0;
   out_4522217942656145191[208] = 0;
   out_4522217942656145191[209] = 0;
   out_4522217942656145191[210] = 0;
   out_4522217942656145191[211] = 0;
   out_4522217942656145191[212] = 0;
   out_4522217942656145191[213] = 0;
   out_4522217942656145191[214] = 0;
   out_4522217942656145191[215] = 0;
   out_4522217942656145191[216] = 0;
   out_4522217942656145191[217] = 0;
   out_4522217942656145191[218] = 0;
   out_4522217942656145191[219] = 0;
   out_4522217942656145191[220] = 1;
   out_4522217942656145191[221] = 0;
   out_4522217942656145191[222] = 0;
   out_4522217942656145191[223] = 0;
   out_4522217942656145191[224] = 0;
   out_4522217942656145191[225] = 0;
   out_4522217942656145191[226] = 0;
   out_4522217942656145191[227] = 0;
   out_4522217942656145191[228] = 0;
   out_4522217942656145191[229] = 0;
   out_4522217942656145191[230] = 0;
   out_4522217942656145191[231] = 0;
   out_4522217942656145191[232] = 0;
   out_4522217942656145191[233] = 0;
   out_4522217942656145191[234] = 0;
   out_4522217942656145191[235] = 0;
   out_4522217942656145191[236] = 0;
   out_4522217942656145191[237] = 0;
   out_4522217942656145191[238] = 0;
   out_4522217942656145191[239] = 0;
   out_4522217942656145191[240] = 0;
   out_4522217942656145191[241] = 0;
   out_4522217942656145191[242] = 1;
   out_4522217942656145191[243] = 0;
   out_4522217942656145191[244] = 0;
   out_4522217942656145191[245] = 0;
   out_4522217942656145191[246] = 0;
   out_4522217942656145191[247] = 0;
   out_4522217942656145191[248] = 0;
   out_4522217942656145191[249] = 0;
   out_4522217942656145191[250] = 0;
   out_4522217942656145191[251] = 0;
   out_4522217942656145191[252] = 0;
   out_4522217942656145191[253] = 0;
   out_4522217942656145191[254] = 0;
   out_4522217942656145191[255] = 0;
   out_4522217942656145191[256] = 0;
   out_4522217942656145191[257] = 0;
   out_4522217942656145191[258] = 0;
   out_4522217942656145191[259] = 0;
   out_4522217942656145191[260] = 0;
   out_4522217942656145191[261] = 0;
   out_4522217942656145191[262] = 0;
   out_4522217942656145191[263] = 0;
   out_4522217942656145191[264] = 1;
   out_4522217942656145191[265] = 0;
   out_4522217942656145191[266] = 0;
   out_4522217942656145191[267] = 0;
   out_4522217942656145191[268] = 0;
   out_4522217942656145191[269] = 0;
   out_4522217942656145191[270] = 0;
   out_4522217942656145191[271] = 0;
   out_4522217942656145191[272] = 0;
   out_4522217942656145191[273] = 0;
   out_4522217942656145191[274] = 0;
   out_4522217942656145191[275] = 0;
   out_4522217942656145191[276] = 0;
   out_4522217942656145191[277] = 0;
   out_4522217942656145191[278] = 0;
   out_4522217942656145191[279] = 0;
   out_4522217942656145191[280] = 0;
   out_4522217942656145191[281] = 0;
   out_4522217942656145191[282] = 0;
   out_4522217942656145191[283] = 0;
   out_4522217942656145191[284] = 0;
   out_4522217942656145191[285] = 0;
   out_4522217942656145191[286] = 1;
   out_4522217942656145191[287] = 0;
   out_4522217942656145191[288] = 0;
   out_4522217942656145191[289] = 0;
   out_4522217942656145191[290] = 0;
   out_4522217942656145191[291] = 0;
   out_4522217942656145191[292] = 0;
   out_4522217942656145191[293] = 0;
   out_4522217942656145191[294] = 0;
   out_4522217942656145191[295] = 0;
   out_4522217942656145191[296] = 0;
   out_4522217942656145191[297] = 0;
   out_4522217942656145191[298] = 0;
   out_4522217942656145191[299] = 0;
   out_4522217942656145191[300] = 0;
   out_4522217942656145191[301] = 0;
   out_4522217942656145191[302] = 0;
   out_4522217942656145191[303] = 0;
   out_4522217942656145191[304] = 0;
   out_4522217942656145191[305] = 0;
   out_4522217942656145191[306] = 0;
   out_4522217942656145191[307] = 0;
   out_4522217942656145191[308] = 1;
   out_4522217942656145191[309] = 0;
   out_4522217942656145191[310] = 0;
   out_4522217942656145191[311] = 0;
   out_4522217942656145191[312] = 0;
   out_4522217942656145191[313] = 0;
   out_4522217942656145191[314] = 0;
   out_4522217942656145191[315] = 0;
   out_4522217942656145191[316] = 0;
   out_4522217942656145191[317] = 0;
   out_4522217942656145191[318] = 0;
   out_4522217942656145191[319] = 0;
   out_4522217942656145191[320] = 0;
   out_4522217942656145191[321] = 0;
   out_4522217942656145191[322] = 0;
   out_4522217942656145191[323] = 0;
   out_4522217942656145191[324] = 0;
   out_4522217942656145191[325] = 0;
   out_4522217942656145191[326] = 0;
   out_4522217942656145191[327] = 0;
   out_4522217942656145191[328] = 0;
   out_4522217942656145191[329] = 0;
   out_4522217942656145191[330] = 1;
   out_4522217942656145191[331] = 0;
   out_4522217942656145191[332] = 0;
   out_4522217942656145191[333] = 0;
   out_4522217942656145191[334] = 0;
   out_4522217942656145191[335] = 0;
   out_4522217942656145191[336] = 0;
   out_4522217942656145191[337] = 0;
   out_4522217942656145191[338] = 0;
   out_4522217942656145191[339] = 0;
   out_4522217942656145191[340] = 0;
   out_4522217942656145191[341] = 0;
   out_4522217942656145191[342] = 0;
   out_4522217942656145191[343] = 0;
   out_4522217942656145191[344] = 0;
   out_4522217942656145191[345] = 0;
   out_4522217942656145191[346] = 0;
   out_4522217942656145191[347] = 0;
   out_4522217942656145191[348] = 0;
   out_4522217942656145191[349] = 0;
   out_4522217942656145191[350] = 0;
   out_4522217942656145191[351] = 0;
   out_4522217942656145191[352] = 1;
   out_4522217942656145191[353] = 0;
   out_4522217942656145191[354] = 0;
   out_4522217942656145191[355] = 0;
   out_4522217942656145191[356] = 0;
   out_4522217942656145191[357] = 0;
   out_4522217942656145191[358] = 0;
   out_4522217942656145191[359] = 0;
   out_4522217942656145191[360] = 0;
   out_4522217942656145191[361] = 0;
   out_4522217942656145191[362] = 0;
   out_4522217942656145191[363] = 0;
   out_4522217942656145191[364] = 0;
   out_4522217942656145191[365] = 0;
   out_4522217942656145191[366] = 0;
   out_4522217942656145191[367] = 0;
   out_4522217942656145191[368] = 0;
   out_4522217942656145191[369] = 0;
   out_4522217942656145191[370] = 0;
   out_4522217942656145191[371] = 0;
   out_4522217942656145191[372] = 0;
   out_4522217942656145191[373] = 0;
   out_4522217942656145191[374] = 1;
   out_4522217942656145191[375] = 0;
   out_4522217942656145191[376] = 0;
   out_4522217942656145191[377] = 0;
   out_4522217942656145191[378] = 0;
   out_4522217942656145191[379] = 0;
   out_4522217942656145191[380] = 0;
   out_4522217942656145191[381] = 0;
   out_4522217942656145191[382] = 0;
   out_4522217942656145191[383] = 0;
   out_4522217942656145191[384] = 0;
   out_4522217942656145191[385] = 0;
   out_4522217942656145191[386] = 0;
   out_4522217942656145191[387] = 0;
   out_4522217942656145191[388] = 0;
   out_4522217942656145191[389] = 0;
   out_4522217942656145191[390] = 0;
   out_4522217942656145191[391] = 0;
   out_4522217942656145191[392] = 0;
   out_4522217942656145191[393] = 0;
   out_4522217942656145191[394] = 0;
   out_4522217942656145191[395] = 0;
   out_4522217942656145191[396] = 1;
   out_4522217942656145191[397] = 0;
   out_4522217942656145191[398] = 0;
   out_4522217942656145191[399] = 0;
   out_4522217942656145191[400] = 0;
   out_4522217942656145191[401] = 0;
   out_4522217942656145191[402] = 0;
   out_4522217942656145191[403] = 0;
   out_4522217942656145191[404] = 0;
   out_4522217942656145191[405] = 0;
   out_4522217942656145191[406] = 0;
   out_4522217942656145191[407] = 0;
   out_4522217942656145191[408] = 0;
   out_4522217942656145191[409] = 0;
   out_4522217942656145191[410] = 0;
   out_4522217942656145191[411] = 0;
   out_4522217942656145191[412] = 0;
   out_4522217942656145191[413] = 0;
   out_4522217942656145191[414] = 0;
   out_4522217942656145191[415] = 0;
   out_4522217942656145191[416] = 0;
   out_4522217942656145191[417] = 0;
   out_4522217942656145191[418] = 1;
   out_4522217942656145191[419] = 0;
   out_4522217942656145191[420] = 0;
   out_4522217942656145191[421] = 0;
   out_4522217942656145191[422] = 0;
   out_4522217942656145191[423] = 0;
   out_4522217942656145191[424] = 0;
   out_4522217942656145191[425] = 0;
   out_4522217942656145191[426] = 0;
   out_4522217942656145191[427] = 0;
   out_4522217942656145191[428] = 0;
   out_4522217942656145191[429] = 0;
   out_4522217942656145191[430] = 0;
   out_4522217942656145191[431] = 0;
   out_4522217942656145191[432] = 0;
   out_4522217942656145191[433] = 0;
   out_4522217942656145191[434] = 0;
   out_4522217942656145191[435] = 0;
   out_4522217942656145191[436] = 0;
   out_4522217942656145191[437] = 0;
   out_4522217942656145191[438] = 0;
   out_4522217942656145191[439] = 0;
   out_4522217942656145191[440] = 1;
}
void h_4(double *state, double *unused, double *out_4900326243380033195) {
   out_4900326243380033195[0] = state[10] + state[13];
   out_4900326243380033195[1] = state[11] + state[14];
   out_4900326243380033195[2] = state[12] + state[15];
}
void H_4(double *state, double *unused, double *out_1849829052632691181) {
   out_1849829052632691181[0] = 0;
   out_1849829052632691181[1] = 0;
   out_1849829052632691181[2] = 0;
   out_1849829052632691181[3] = 0;
   out_1849829052632691181[4] = 0;
   out_1849829052632691181[5] = 0;
   out_1849829052632691181[6] = 0;
   out_1849829052632691181[7] = 0;
   out_1849829052632691181[8] = 0;
   out_1849829052632691181[9] = 0;
   out_1849829052632691181[10] = 1;
   out_1849829052632691181[11] = 0;
   out_1849829052632691181[12] = 0;
   out_1849829052632691181[13] = 1;
   out_1849829052632691181[14] = 0;
   out_1849829052632691181[15] = 0;
   out_1849829052632691181[16] = 0;
   out_1849829052632691181[17] = 0;
   out_1849829052632691181[18] = 0;
   out_1849829052632691181[19] = 0;
   out_1849829052632691181[20] = 0;
   out_1849829052632691181[21] = 0;
   out_1849829052632691181[22] = 0;
   out_1849829052632691181[23] = 0;
   out_1849829052632691181[24] = 0;
   out_1849829052632691181[25] = 0;
   out_1849829052632691181[26] = 0;
   out_1849829052632691181[27] = 0;
   out_1849829052632691181[28] = 0;
   out_1849829052632691181[29] = 0;
   out_1849829052632691181[30] = 0;
   out_1849829052632691181[31] = 0;
   out_1849829052632691181[32] = 0;
   out_1849829052632691181[33] = 1;
   out_1849829052632691181[34] = 0;
   out_1849829052632691181[35] = 0;
   out_1849829052632691181[36] = 1;
   out_1849829052632691181[37] = 0;
   out_1849829052632691181[38] = 0;
   out_1849829052632691181[39] = 0;
   out_1849829052632691181[40] = 0;
   out_1849829052632691181[41] = 0;
   out_1849829052632691181[42] = 0;
   out_1849829052632691181[43] = 0;
   out_1849829052632691181[44] = 0;
   out_1849829052632691181[45] = 0;
   out_1849829052632691181[46] = 0;
   out_1849829052632691181[47] = 0;
   out_1849829052632691181[48] = 0;
   out_1849829052632691181[49] = 0;
   out_1849829052632691181[50] = 0;
   out_1849829052632691181[51] = 0;
   out_1849829052632691181[52] = 0;
   out_1849829052632691181[53] = 0;
   out_1849829052632691181[54] = 0;
   out_1849829052632691181[55] = 0;
   out_1849829052632691181[56] = 1;
   out_1849829052632691181[57] = 0;
   out_1849829052632691181[58] = 0;
   out_1849829052632691181[59] = 1;
   out_1849829052632691181[60] = 0;
   out_1849829052632691181[61] = 0;
   out_1849829052632691181[62] = 0;
   out_1849829052632691181[63] = 0;
   out_1849829052632691181[64] = 0;
   out_1849829052632691181[65] = 0;
}
void h_9(double *state, double *unused, double *out_3074700386960502334) {
   out_3074700386960502334[0] = state[10];
   out_3074700386960502334[1] = state[11];
   out_3074700386960502334[2] = state[12];
}
void H_9(double *state, double *unused, double *out_1608639406003100536) {
   out_1608639406003100536[0] = 0;
   out_1608639406003100536[1] = 0;
   out_1608639406003100536[2] = 0;
   out_1608639406003100536[3] = 0;
   out_1608639406003100536[4] = 0;
   out_1608639406003100536[5] = 0;
   out_1608639406003100536[6] = 0;
   out_1608639406003100536[7] = 0;
   out_1608639406003100536[8] = 0;
   out_1608639406003100536[9] = 0;
   out_1608639406003100536[10] = 1;
   out_1608639406003100536[11] = 0;
   out_1608639406003100536[12] = 0;
   out_1608639406003100536[13] = 0;
   out_1608639406003100536[14] = 0;
   out_1608639406003100536[15] = 0;
   out_1608639406003100536[16] = 0;
   out_1608639406003100536[17] = 0;
   out_1608639406003100536[18] = 0;
   out_1608639406003100536[19] = 0;
   out_1608639406003100536[20] = 0;
   out_1608639406003100536[21] = 0;
   out_1608639406003100536[22] = 0;
   out_1608639406003100536[23] = 0;
   out_1608639406003100536[24] = 0;
   out_1608639406003100536[25] = 0;
   out_1608639406003100536[26] = 0;
   out_1608639406003100536[27] = 0;
   out_1608639406003100536[28] = 0;
   out_1608639406003100536[29] = 0;
   out_1608639406003100536[30] = 0;
   out_1608639406003100536[31] = 0;
   out_1608639406003100536[32] = 0;
   out_1608639406003100536[33] = 1;
   out_1608639406003100536[34] = 0;
   out_1608639406003100536[35] = 0;
   out_1608639406003100536[36] = 0;
   out_1608639406003100536[37] = 0;
   out_1608639406003100536[38] = 0;
   out_1608639406003100536[39] = 0;
   out_1608639406003100536[40] = 0;
   out_1608639406003100536[41] = 0;
   out_1608639406003100536[42] = 0;
   out_1608639406003100536[43] = 0;
   out_1608639406003100536[44] = 0;
   out_1608639406003100536[45] = 0;
   out_1608639406003100536[46] = 0;
   out_1608639406003100536[47] = 0;
   out_1608639406003100536[48] = 0;
   out_1608639406003100536[49] = 0;
   out_1608639406003100536[50] = 0;
   out_1608639406003100536[51] = 0;
   out_1608639406003100536[52] = 0;
   out_1608639406003100536[53] = 0;
   out_1608639406003100536[54] = 0;
   out_1608639406003100536[55] = 0;
   out_1608639406003100536[56] = 1;
   out_1608639406003100536[57] = 0;
   out_1608639406003100536[58] = 0;
   out_1608639406003100536[59] = 0;
   out_1608639406003100536[60] = 0;
   out_1608639406003100536[61] = 0;
   out_1608639406003100536[62] = 0;
   out_1608639406003100536[63] = 0;
   out_1608639406003100536[64] = 0;
   out_1608639406003100536[65] = 0;
}
void h_10(double *state, double *unused, double *out_294220397151957808) {
   out_294220397151957808[0] = 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0] + state[16] + state[19];
   out_294220397151957808[1] = 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1] + state[17] + state[20];
   out_294220397151957808[2] = 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[2] + state[18] + state[21];
}
void H_10(double *state, double *unused, double *out_7113328125087702607) {
   out_7113328125087702607[0] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*pow(state[0], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
   out_7113328125087702607[1] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1];
   out_7113328125087702607[2] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[2];
   out_7113328125087702607[3] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
   out_7113328125087702607[4] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
   out_7113328125087702607[5] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
   out_7113328125087702607[6] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
   out_7113328125087702607[7] = 0;
   out_7113328125087702607[8] = 0;
   out_7113328125087702607[9] = 0;
   out_7113328125087702607[10] = 0;
   out_7113328125087702607[11] = 0;
   out_7113328125087702607[12] = 0;
   out_7113328125087702607[13] = 0;
   out_7113328125087702607[14] = 0;
   out_7113328125087702607[15] = 0;
   out_7113328125087702607[16] = 1;
   out_7113328125087702607[17] = 0;
   out_7113328125087702607[18] = 0;
   out_7113328125087702607[19] = 1;
   out_7113328125087702607[20] = 0;
   out_7113328125087702607[21] = 0;
   out_7113328125087702607[22] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1];
   out_7113328125087702607[23] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*pow(state[1], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
   out_7113328125087702607[24] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1]*state[2];
   out_7113328125087702607[25] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
   out_7113328125087702607[26] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
   out_7113328125087702607[27] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
   out_7113328125087702607[28] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
   out_7113328125087702607[29] = 0;
   out_7113328125087702607[30] = 0;
   out_7113328125087702607[31] = 0;
   out_7113328125087702607[32] = 0;
   out_7113328125087702607[33] = 0;
   out_7113328125087702607[34] = 0;
   out_7113328125087702607[35] = 0;
   out_7113328125087702607[36] = 0;
   out_7113328125087702607[37] = 0;
   out_7113328125087702607[38] = 0;
   out_7113328125087702607[39] = 1;
   out_7113328125087702607[40] = 0;
   out_7113328125087702607[41] = 0;
   out_7113328125087702607[42] = 1;
   out_7113328125087702607[43] = 0;
   out_7113328125087702607[44] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[0]*state[2];
   out_7113328125087702607[45] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[1]*state[2];
   out_7113328125087702607[46] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*pow(state[2], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
   out_7113328125087702607[47] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
   out_7113328125087702607[48] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
   out_7113328125087702607[49] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
   out_7113328125087702607[50] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
   out_7113328125087702607[51] = 0;
   out_7113328125087702607[52] = 0;
   out_7113328125087702607[53] = 0;
   out_7113328125087702607[54] = 0;
   out_7113328125087702607[55] = 0;
   out_7113328125087702607[56] = 0;
   out_7113328125087702607[57] = 0;
   out_7113328125087702607[58] = 0;
   out_7113328125087702607[59] = 0;
   out_7113328125087702607[60] = 0;
   out_7113328125087702607[61] = 0;
   out_7113328125087702607[62] = 1;
   out_7113328125087702607[63] = 0;
   out_7113328125087702607[64] = 0;
   out_7113328125087702607[65] = 1;
}
void h_12(double *state, double *unused, double *out_1340863276117353804) {
   out_1340863276117353804[0] = state[0];
   out_1340863276117353804[1] = state[1];
   out_1340863276117353804[2] = state[2];
}
void H_12(double *state, double *unused, double *out_3169627355399270614) {
   out_3169627355399270614[0] = 1;
   out_3169627355399270614[1] = 0;
   out_3169627355399270614[2] = 0;
   out_3169627355399270614[3] = 0;
   out_3169627355399270614[4] = 0;
   out_3169627355399270614[5] = 0;
   out_3169627355399270614[6] = 0;
   out_3169627355399270614[7] = 0;
   out_3169627355399270614[8] = 0;
   out_3169627355399270614[9] = 0;
   out_3169627355399270614[10] = 0;
   out_3169627355399270614[11] = 0;
   out_3169627355399270614[12] = 0;
   out_3169627355399270614[13] = 0;
   out_3169627355399270614[14] = 0;
   out_3169627355399270614[15] = 0;
   out_3169627355399270614[16] = 0;
   out_3169627355399270614[17] = 0;
   out_3169627355399270614[18] = 0;
   out_3169627355399270614[19] = 0;
   out_3169627355399270614[20] = 0;
   out_3169627355399270614[21] = 0;
   out_3169627355399270614[22] = 0;
   out_3169627355399270614[23] = 1;
   out_3169627355399270614[24] = 0;
   out_3169627355399270614[25] = 0;
   out_3169627355399270614[26] = 0;
   out_3169627355399270614[27] = 0;
   out_3169627355399270614[28] = 0;
   out_3169627355399270614[29] = 0;
   out_3169627355399270614[30] = 0;
   out_3169627355399270614[31] = 0;
   out_3169627355399270614[32] = 0;
   out_3169627355399270614[33] = 0;
   out_3169627355399270614[34] = 0;
   out_3169627355399270614[35] = 0;
   out_3169627355399270614[36] = 0;
   out_3169627355399270614[37] = 0;
   out_3169627355399270614[38] = 0;
   out_3169627355399270614[39] = 0;
   out_3169627355399270614[40] = 0;
   out_3169627355399270614[41] = 0;
   out_3169627355399270614[42] = 0;
   out_3169627355399270614[43] = 0;
   out_3169627355399270614[44] = 0;
   out_3169627355399270614[45] = 0;
   out_3169627355399270614[46] = 1;
   out_3169627355399270614[47] = 0;
   out_3169627355399270614[48] = 0;
   out_3169627355399270614[49] = 0;
   out_3169627355399270614[50] = 0;
   out_3169627355399270614[51] = 0;
   out_3169627355399270614[52] = 0;
   out_3169627355399270614[53] = 0;
   out_3169627355399270614[54] = 0;
   out_3169627355399270614[55] = 0;
   out_3169627355399270614[56] = 0;
   out_3169627355399270614[57] = 0;
   out_3169627355399270614[58] = 0;
   out_3169627355399270614[59] = 0;
   out_3169627355399270614[60] = 0;
   out_3169627355399270614[61] = 0;
   out_3169627355399270614[62] = 0;
   out_3169627355399270614[63] = 0;
   out_3169627355399270614[64] = 0;
   out_3169627355399270614[65] = 0;
}
void h_35(double *state, double *unused, double *out_3634549000190945085) {
   out_3634549000190945085[0] = state[7];
   out_3634549000190945085[1] = state[8];
   out_3634549000190945085[2] = state[9];
}
void H_35(double *state, double *unused, double *out_5915190387724284323) {
   out_5915190387724284323[0] = 0;
   out_5915190387724284323[1] = 0;
   out_5915190387724284323[2] = 0;
   out_5915190387724284323[3] = 0;
   out_5915190387724284323[4] = 0;
   out_5915190387724284323[5] = 0;
   out_5915190387724284323[6] = 0;
   out_5915190387724284323[7] = 1;
   out_5915190387724284323[8] = 0;
   out_5915190387724284323[9] = 0;
   out_5915190387724284323[10] = 0;
   out_5915190387724284323[11] = 0;
   out_5915190387724284323[12] = 0;
   out_5915190387724284323[13] = 0;
   out_5915190387724284323[14] = 0;
   out_5915190387724284323[15] = 0;
   out_5915190387724284323[16] = 0;
   out_5915190387724284323[17] = 0;
   out_5915190387724284323[18] = 0;
   out_5915190387724284323[19] = 0;
   out_5915190387724284323[20] = 0;
   out_5915190387724284323[21] = 0;
   out_5915190387724284323[22] = 0;
   out_5915190387724284323[23] = 0;
   out_5915190387724284323[24] = 0;
   out_5915190387724284323[25] = 0;
   out_5915190387724284323[26] = 0;
   out_5915190387724284323[27] = 0;
   out_5915190387724284323[28] = 0;
   out_5915190387724284323[29] = 0;
   out_5915190387724284323[30] = 1;
   out_5915190387724284323[31] = 0;
   out_5915190387724284323[32] = 0;
   out_5915190387724284323[33] = 0;
   out_5915190387724284323[34] = 0;
   out_5915190387724284323[35] = 0;
   out_5915190387724284323[36] = 0;
   out_5915190387724284323[37] = 0;
   out_5915190387724284323[38] = 0;
   out_5915190387724284323[39] = 0;
   out_5915190387724284323[40] = 0;
   out_5915190387724284323[41] = 0;
   out_5915190387724284323[42] = 0;
   out_5915190387724284323[43] = 0;
   out_5915190387724284323[44] = 0;
   out_5915190387724284323[45] = 0;
   out_5915190387724284323[46] = 0;
   out_5915190387724284323[47] = 0;
   out_5915190387724284323[48] = 0;
   out_5915190387724284323[49] = 0;
   out_5915190387724284323[50] = 0;
   out_5915190387724284323[51] = 0;
   out_5915190387724284323[52] = 0;
   out_5915190387724284323[53] = 1;
   out_5915190387724284323[54] = 0;
   out_5915190387724284323[55] = 0;
   out_5915190387724284323[56] = 0;
   out_5915190387724284323[57] = 0;
   out_5915190387724284323[58] = 0;
   out_5915190387724284323[59] = 0;
   out_5915190387724284323[60] = 0;
   out_5915190387724284323[61] = 0;
   out_5915190387724284323[62] = 0;
   out_5915190387724284323[63] = 0;
   out_5915190387724284323[64] = 0;
   out_5915190387724284323[65] = 0;
}
void h_32(double *state, double *unused, double *out_5880204314189519423) {
   out_5880204314189519423[0] = state[3];
   out_5880204314189519423[1] = state[4];
   out_5880204314189519423[2] = state[5];
   out_5880204314189519423[3] = state[6];
}
void H_32(double *state, double *unused, double *out_5602568692836839295) {
   out_5602568692836839295[0] = 0;
   out_5602568692836839295[1] = 0;
   out_5602568692836839295[2] = 0;
   out_5602568692836839295[3] = 1;
   out_5602568692836839295[4] = 0;
   out_5602568692836839295[5] = 0;
   out_5602568692836839295[6] = 0;
   out_5602568692836839295[7] = 0;
   out_5602568692836839295[8] = 0;
   out_5602568692836839295[9] = 0;
   out_5602568692836839295[10] = 0;
   out_5602568692836839295[11] = 0;
   out_5602568692836839295[12] = 0;
   out_5602568692836839295[13] = 0;
   out_5602568692836839295[14] = 0;
   out_5602568692836839295[15] = 0;
   out_5602568692836839295[16] = 0;
   out_5602568692836839295[17] = 0;
   out_5602568692836839295[18] = 0;
   out_5602568692836839295[19] = 0;
   out_5602568692836839295[20] = 0;
   out_5602568692836839295[21] = 0;
   out_5602568692836839295[22] = 0;
   out_5602568692836839295[23] = 0;
   out_5602568692836839295[24] = 0;
   out_5602568692836839295[25] = 0;
   out_5602568692836839295[26] = 1;
   out_5602568692836839295[27] = 0;
   out_5602568692836839295[28] = 0;
   out_5602568692836839295[29] = 0;
   out_5602568692836839295[30] = 0;
   out_5602568692836839295[31] = 0;
   out_5602568692836839295[32] = 0;
   out_5602568692836839295[33] = 0;
   out_5602568692836839295[34] = 0;
   out_5602568692836839295[35] = 0;
   out_5602568692836839295[36] = 0;
   out_5602568692836839295[37] = 0;
   out_5602568692836839295[38] = 0;
   out_5602568692836839295[39] = 0;
   out_5602568692836839295[40] = 0;
   out_5602568692836839295[41] = 0;
   out_5602568692836839295[42] = 0;
   out_5602568692836839295[43] = 0;
   out_5602568692836839295[44] = 0;
   out_5602568692836839295[45] = 0;
   out_5602568692836839295[46] = 0;
   out_5602568692836839295[47] = 0;
   out_5602568692836839295[48] = 0;
   out_5602568692836839295[49] = 1;
   out_5602568692836839295[50] = 0;
   out_5602568692836839295[51] = 0;
   out_5602568692836839295[52] = 0;
   out_5602568692836839295[53] = 0;
   out_5602568692836839295[54] = 0;
   out_5602568692836839295[55] = 0;
   out_5602568692836839295[56] = 0;
   out_5602568692836839295[57] = 0;
   out_5602568692836839295[58] = 0;
   out_5602568692836839295[59] = 0;
   out_5602568692836839295[60] = 0;
   out_5602568692836839295[61] = 0;
   out_5602568692836839295[62] = 0;
   out_5602568692836839295[63] = 0;
   out_5602568692836839295[64] = 0;
   out_5602568692836839295[65] = 0;
   out_5602568692836839295[66] = 0;
   out_5602568692836839295[67] = 0;
   out_5602568692836839295[68] = 0;
   out_5602568692836839295[69] = 0;
   out_5602568692836839295[70] = 0;
   out_5602568692836839295[71] = 0;
   out_5602568692836839295[72] = 1;
   out_5602568692836839295[73] = 0;
   out_5602568692836839295[74] = 0;
   out_5602568692836839295[75] = 0;
   out_5602568692836839295[76] = 0;
   out_5602568692836839295[77] = 0;
   out_5602568692836839295[78] = 0;
   out_5602568692836839295[79] = 0;
   out_5602568692836839295[80] = 0;
   out_5602568692836839295[81] = 0;
   out_5602568692836839295[82] = 0;
   out_5602568692836839295[83] = 0;
   out_5602568692836839295[84] = 0;
   out_5602568692836839295[85] = 0;
   out_5602568692836839295[86] = 0;
   out_5602568692836839295[87] = 0;
}
void h_13(double *state, double *unused, double *out_5340999065095199952) {
   out_5340999065095199952[0] = (-2*state[3]*state[5] + 2*state[4]*state[6])*state[9] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[8] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[7];
   out_5340999065095199952[1] = (2*state[3]*state[4] + 2*state[5]*state[6])*state[9] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[7] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[8];
   out_5340999065095199952[2] = (-2*state[3]*state[4] + 2*state[5]*state[6])*state[8] + (2*state[3]*state[5] + 2*state[4]*state[6])*state[7] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[9];
}
void H_13(double *state, double *unused, double *out_6684707275772634272) {
   out_6684707275772634272[0] = 0;
   out_6684707275772634272[1] = 0;
   out_6684707275772634272[2] = 0;
   out_6684707275772634272[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8];
   out_6684707275772634272[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
   out_6684707275772634272[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7];
   out_6684707275772634272[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7];
   out_6684707275772634272[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2);
   out_6684707275772634272[8] = 2*state[3]*state[6] + 2*state[4]*state[5];
   out_6684707275772634272[9] = -2*state[3]*state[5] + 2*state[4]*state[6];
   out_6684707275772634272[10] = 0;
   out_6684707275772634272[11] = 0;
   out_6684707275772634272[12] = 0;
   out_6684707275772634272[13] = 0;
   out_6684707275772634272[14] = 0;
   out_6684707275772634272[15] = 0;
   out_6684707275772634272[16] = 0;
   out_6684707275772634272[17] = 0;
   out_6684707275772634272[18] = 0;
   out_6684707275772634272[19] = 0;
   out_6684707275772634272[20] = 0;
   out_6684707275772634272[21] = 0;
   out_6684707275772634272[22] = 0;
   out_6684707275772634272[23] = 0;
   out_6684707275772634272[24] = 0;
   out_6684707275772634272[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7];
   out_6684707275772634272[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7];
   out_6684707275772634272[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
   out_6684707275772634272[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8];
   out_6684707275772634272[29] = -2*state[3]*state[6] + 2*state[4]*state[5];
   out_6684707275772634272[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2);
   out_6684707275772634272[31] = 2*state[3]*state[4] + 2*state[5]*state[6];
   out_6684707275772634272[32] = 0;
   out_6684707275772634272[33] = 0;
   out_6684707275772634272[34] = 0;
   out_6684707275772634272[35] = 0;
   out_6684707275772634272[36] = 0;
   out_6684707275772634272[37] = 0;
   out_6684707275772634272[38] = 0;
   out_6684707275772634272[39] = 0;
   out_6684707275772634272[40] = 0;
   out_6684707275772634272[41] = 0;
   out_6684707275772634272[42] = 0;
   out_6684707275772634272[43] = 0;
   out_6684707275772634272[44] = 0;
   out_6684707275772634272[45] = 0;
   out_6684707275772634272[46] = 0;
   out_6684707275772634272[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7];
   out_6684707275772634272[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7];
   out_6684707275772634272[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8];
   out_6684707275772634272[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
   out_6684707275772634272[51] = 2*state[3]*state[5] + 2*state[4]*state[6];
   out_6684707275772634272[52] = -2*state[3]*state[4] + 2*state[5]*state[6];
   out_6684707275772634272[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2);
   out_6684707275772634272[54] = 0;
   out_6684707275772634272[55] = 0;
   out_6684707275772634272[56] = 0;
   out_6684707275772634272[57] = 0;
   out_6684707275772634272[58] = 0;
   out_6684707275772634272[59] = 0;
   out_6684707275772634272[60] = 0;
   out_6684707275772634272[61] = 0;
   out_6684707275772634272[62] = 0;
   out_6684707275772634272[63] = 0;
   out_6684707275772634272[64] = 0;
   out_6684707275772634272[65] = 0;
}
void h_14(double *state, double *unused, double *out_3074700386960502334) {
   out_3074700386960502334[0] = state[10];
   out_3074700386960502334[1] = state[11];
   out_3074700386960502334[2] = state[12];
}
void H_14(double *state, double *unused, double *out_1608639406003100536) {
   out_1608639406003100536[0] = 0;
   out_1608639406003100536[1] = 0;
   out_1608639406003100536[2] = 0;
   out_1608639406003100536[3] = 0;
   out_1608639406003100536[4] = 0;
   out_1608639406003100536[5] = 0;
   out_1608639406003100536[6] = 0;
   out_1608639406003100536[7] = 0;
   out_1608639406003100536[8] = 0;
   out_1608639406003100536[9] = 0;
   out_1608639406003100536[10] = 1;
   out_1608639406003100536[11] = 0;
   out_1608639406003100536[12] = 0;
   out_1608639406003100536[13] = 0;
   out_1608639406003100536[14] = 0;
   out_1608639406003100536[15] = 0;
   out_1608639406003100536[16] = 0;
   out_1608639406003100536[17] = 0;
   out_1608639406003100536[18] = 0;
   out_1608639406003100536[19] = 0;
   out_1608639406003100536[20] = 0;
   out_1608639406003100536[21] = 0;
   out_1608639406003100536[22] = 0;
   out_1608639406003100536[23] = 0;
   out_1608639406003100536[24] = 0;
   out_1608639406003100536[25] = 0;
   out_1608639406003100536[26] = 0;
   out_1608639406003100536[27] = 0;
   out_1608639406003100536[28] = 0;
   out_1608639406003100536[29] = 0;
   out_1608639406003100536[30] = 0;
   out_1608639406003100536[31] = 0;
   out_1608639406003100536[32] = 0;
   out_1608639406003100536[33] = 1;
   out_1608639406003100536[34] = 0;
   out_1608639406003100536[35] = 0;
   out_1608639406003100536[36] = 0;
   out_1608639406003100536[37] = 0;
   out_1608639406003100536[38] = 0;
   out_1608639406003100536[39] = 0;
   out_1608639406003100536[40] = 0;
   out_1608639406003100536[41] = 0;
   out_1608639406003100536[42] = 0;
   out_1608639406003100536[43] = 0;
   out_1608639406003100536[44] = 0;
   out_1608639406003100536[45] = 0;
   out_1608639406003100536[46] = 0;
   out_1608639406003100536[47] = 0;
   out_1608639406003100536[48] = 0;
   out_1608639406003100536[49] = 0;
   out_1608639406003100536[50] = 0;
   out_1608639406003100536[51] = 0;
   out_1608639406003100536[52] = 0;
   out_1608639406003100536[53] = 0;
   out_1608639406003100536[54] = 0;
   out_1608639406003100536[55] = 0;
   out_1608639406003100536[56] = 1;
   out_1608639406003100536[57] = 0;
   out_1608639406003100536[58] = 0;
   out_1608639406003100536[59] = 0;
   out_1608639406003100536[60] = 0;
   out_1608639406003100536[61] = 0;
   out_1608639406003100536[62] = 0;
   out_1608639406003100536[63] = 0;
   out_1608639406003100536[64] = 0;
   out_1608639406003100536[65] = 0;
}
void h_33(double *state, double *unused, double *out_4252459005722954991) {
   out_4252459005722954991[0] = state[16];
   out_4252459005722954991[1] = state[17];
   out_4252459005722954991[2] = state[18];
}
void H_33(double *state, double *unused, double *out_9065747392363141927) {
   out_9065747392363141927[0] = 0;
   out_9065747392363141927[1] = 0;
   out_9065747392363141927[2] = 0;
   out_9065747392363141927[3] = 0;
   out_9065747392363141927[4] = 0;
   out_9065747392363141927[5] = 0;
   out_9065747392363141927[6] = 0;
   out_9065747392363141927[7] = 0;
   out_9065747392363141927[8] = 0;
   out_9065747392363141927[9] = 0;
   out_9065747392363141927[10] = 0;
   out_9065747392363141927[11] = 0;
   out_9065747392363141927[12] = 0;
   out_9065747392363141927[13] = 0;
   out_9065747392363141927[14] = 0;
   out_9065747392363141927[15] = 0;
   out_9065747392363141927[16] = 1;
   out_9065747392363141927[17] = 0;
   out_9065747392363141927[18] = 0;
   out_9065747392363141927[19] = 0;
   out_9065747392363141927[20] = 0;
   out_9065747392363141927[21] = 0;
   out_9065747392363141927[22] = 0;
   out_9065747392363141927[23] = 0;
   out_9065747392363141927[24] = 0;
   out_9065747392363141927[25] = 0;
   out_9065747392363141927[26] = 0;
   out_9065747392363141927[27] = 0;
   out_9065747392363141927[28] = 0;
   out_9065747392363141927[29] = 0;
   out_9065747392363141927[30] = 0;
   out_9065747392363141927[31] = 0;
   out_9065747392363141927[32] = 0;
   out_9065747392363141927[33] = 0;
   out_9065747392363141927[34] = 0;
   out_9065747392363141927[35] = 0;
   out_9065747392363141927[36] = 0;
   out_9065747392363141927[37] = 0;
   out_9065747392363141927[38] = 0;
   out_9065747392363141927[39] = 1;
   out_9065747392363141927[40] = 0;
   out_9065747392363141927[41] = 0;
   out_9065747392363141927[42] = 0;
   out_9065747392363141927[43] = 0;
   out_9065747392363141927[44] = 0;
   out_9065747392363141927[45] = 0;
   out_9065747392363141927[46] = 0;
   out_9065747392363141927[47] = 0;
   out_9065747392363141927[48] = 0;
   out_9065747392363141927[49] = 0;
   out_9065747392363141927[50] = 0;
   out_9065747392363141927[51] = 0;
   out_9065747392363141927[52] = 0;
   out_9065747392363141927[53] = 0;
   out_9065747392363141927[54] = 0;
   out_9065747392363141927[55] = 0;
   out_9065747392363141927[56] = 0;
   out_9065747392363141927[57] = 0;
   out_9065747392363141927[58] = 0;
   out_9065747392363141927[59] = 0;
   out_9065747392363141927[60] = 0;
   out_9065747392363141927[61] = 0;
   out_9065747392363141927[62] = 1;
   out_9065747392363141927[63] = 0;
   out_9065747392363141927[64] = 0;
   out_9065747392363141927[65] = 0;
}
#include <eigen3/Eigen/Dense>
#include <iostream>

typedef Eigen::Matrix<double, DIM, DIM, Eigen::RowMajor> DDM;
typedef Eigen::Matrix<double, EDIM, EDIM, Eigen::RowMajor> EEM;
typedef Eigen::Matrix<double, DIM, EDIM, Eigen::RowMajor> DEM;

void predict(double *in_x, double *in_P, double *in_Q, double dt) {
  typedef Eigen::Matrix<double, MEDIM, MEDIM, Eigen::RowMajor> RRM;

  double nx[DIM] = {0};
  double in_F[EDIM*EDIM] = {0};

  f_fun(in_x, dt, nx);
  F_fun(in_x, dt, in_F);

  EEM F(in_F);
  EEM P(in_P);
  EEM Q(in_Q);

  RRM F_main = F.topLeftCorner(MEDIM, MEDIM);
  P.topLeftCorner(MEDIM, MEDIM) = (F_main * P.topLeftCorner(MEDIM, MEDIM)) * F_main.transpose();
  P.topRightCorner(MEDIM, EDIM - MEDIM) = F_main * P.topRightCorner(MEDIM, EDIM - MEDIM);
  P.bottomLeftCorner(EDIM - MEDIM, MEDIM) = P.bottomLeftCorner(EDIM - MEDIM, MEDIM) * F_main.transpose();

  P = P + dt*Q;

  memcpy(in_x, nx, DIM * sizeof(double));
  memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double));
}

template <int ZDIM, int EADIM, bool MAHA_TEST>
void update(double *in_x, double *in_P, Hfun h_fun, Hfun H_fun, Hfun Hea_fun, double *in_z, double *in_R, double *in_ea, double MAHA_THRESHOLD) {
  typedef Eigen::Matrix<double, ZDIM, ZDIM, Eigen::RowMajor> ZZM;
  typedef Eigen::Matrix<double, ZDIM, DIM, Eigen::RowMajor> ZDM;
  typedef Eigen::Matrix<double, Eigen::Dynamic, EDIM, Eigen::RowMajor> XEM;

  typedef Eigen::Matrix<double, Eigen::Dynamic, 1> X1M;
  typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> XXM;

  double in_hx[ZDIM] = {0};
  double in_H[ZDIM * DIM] = {0};
  double in_H_mod[EDIM * DIM] = {0};
  double delta_x[EDIM] = {0};
  double x_new[DIM] = {0};

  Eigen::Matrix<double, ZDIM, 1> z(in_z);
  EEM P(in_P);
  ZZM pre_R(in_R);

  h_fun(in_x, in_ea, in_hx);
  H_fun(in_x, in_ea, in_H);
  ZDM pre_H(in_H);

  Eigen::Matrix<double, ZDIM, 1> pre_y(in_hx); pre_y = z - pre_y;
  X1M y; XXM H; XXM R;
  if (Hea_fun){
    typedef Eigen::Matrix<double, ZDIM, EADIM, Eigen::RowMajor> ZAM;
    double in_Hea[ZDIM * EADIM] = {0};
    Hea_fun(in_x, in_ea, in_Hea);
    ZAM Hea(in_Hea);
    XXM A = Hea.transpose().fullPivLu().kernel();

    y = A.transpose() * pre_y;
    H = A.transpose() * pre_H;
    R = A.transpose() * pre_R * A;
  } else {
    y = pre_y;
    H = pre_H;
    R = pre_R;
  }

  H_mod_fun(in_x, in_H_mod);
  DEM H_mod(in_H_mod);
  XEM H_err = H * H_mod;

  if (MAHA_TEST){
    XXM a = (H_err * P * H_err.transpose() + R).inverse();
    double maha_dist = y.transpose() * a * y;
    if (maha_dist > MAHA_THRESHOLD){
      R = 1.0e16 * R;
    }
  }

  double weight = 1;

  XXM S = ((H_err * P) * H_err.transpose()) + R/weight;
  XEM KT = S.fullPivLu().solve(H_err * P.transpose());

  EEM I_KH = Eigen::Matrix<double, EDIM, EDIM>::Identity() - (KT.transpose() * H_err);

  Eigen::Matrix<double, EDIM, 1> dx(delta_x);
  dx  = (KT.transpose() * y);
  memcpy(delta_x, dx.data(), EDIM * sizeof(double));
  err_fun(in_x, delta_x, x_new);
  Eigen::Matrix<double, DIM, 1> x(x_new);

  P = ((I_KH * P) * I_KH.transpose()) + ((KT.transpose() * R) * KT);

  memcpy(in_x, x.data(), DIM * sizeof(double));
  memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double));
  memcpy(in_z, y.data(), y.rows() * sizeof(double));
}

}
extern "C" {

void live_update_4(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_4, H_4, NULL, in_z, in_R, in_ea, MAHA_THRESH_4);
}
void live_update_9(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_9, H_9, NULL, in_z, in_R, in_ea, MAHA_THRESH_9);
}
void live_update_10(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_10, H_10, NULL, in_z, in_R, in_ea, MAHA_THRESH_10);
}
void live_update_12(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_12, H_12, NULL, in_z, in_R, in_ea, MAHA_THRESH_12);
}
void live_update_35(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_35, H_35, NULL, in_z, in_R, in_ea, MAHA_THRESH_35);
}
void live_update_32(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<4, 3, 0>(in_x, in_P, h_32, H_32, NULL, in_z, in_R, in_ea, MAHA_THRESH_32);
}
void live_update_13(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_13, H_13, NULL, in_z, in_R, in_ea, MAHA_THRESH_13);
}
void live_update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_14, H_14, NULL, in_z, in_R, in_ea, MAHA_THRESH_14);
}
void live_update_33(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_33, H_33, NULL, in_z, in_R, in_ea, MAHA_THRESH_33);
}
void live_H(double *in_vec, double *out_8674808526469126384) {
  H(in_vec, out_8674808526469126384);
}
void live_err_fun(double *nom_x, double *delta_x, double *out_826382423215298085) {
  err_fun(nom_x, delta_x, out_826382423215298085);
}
void live_inv_err_fun(double *nom_x, double *true_x, double *out_7532358635846209890) {
  inv_err_fun(nom_x, true_x, out_7532358635846209890);
}
void live_H_mod_fun(double *state, double *out_2474155941233457423) {
  H_mod_fun(state, out_2474155941233457423);
}
void live_f_fun(double *state, double dt, double *out_5893392617996069488) {
  f_fun(state,  dt, out_5893392617996069488);
}
void live_F_fun(double *state, double dt, double *out_4522217942656145191) {
  F_fun(state,  dt, out_4522217942656145191);
}
void live_h_4(double *state, double *unused, double *out_4900326243380033195) {
  h_4(state, unused, out_4900326243380033195);
}
void live_H_4(double *state, double *unused, double *out_1849829052632691181) {
  H_4(state, unused, out_1849829052632691181);
}
void live_h_9(double *state, double *unused, double *out_3074700386960502334) {
  h_9(state, unused, out_3074700386960502334);
}
void live_H_9(double *state, double *unused, double *out_1608639406003100536) {
  H_9(state, unused, out_1608639406003100536);
}
void live_h_10(double *state, double *unused, double *out_294220397151957808) {
  h_10(state, unused, out_294220397151957808);
}
void live_H_10(double *state, double *unused, double *out_7113328125087702607) {
  H_10(state, unused, out_7113328125087702607);
}
void live_h_12(double *state, double *unused, double *out_1340863276117353804) {
  h_12(state, unused, out_1340863276117353804);
}
void live_H_12(double *state, double *unused, double *out_3169627355399270614) {
  H_12(state, unused, out_3169627355399270614);
}
void live_h_35(double *state, double *unused, double *out_3634549000190945085) {
  h_35(state, unused, out_3634549000190945085);
}
void live_H_35(double *state, double *unused, double *out_5915190387724284323) {
  H_35(state, unused, out_5915190387724284323);
}
void live_h_32(double *state, double *unused, double *out_5880204314189519423) {
  h_32(state, unused, out_5880204314189519423);
}
void live_H_32(double *state, double *unused, double *out_5602568692836839295) {
  H_32(state, unused, out_5602568692836839295);
}
void live_h_13(double *state, double *unused, double *out_5340999065095199952) {
  h_13(state, unused, out_5340999065095199952);
}
void live_H_13(double *state, double *unused, double *out_6684707275772634272) {
  H_13(state, unused, out_6684707275772634272);
}
void live_h_14(double *state, double *unused, double *out_3074700386960502334) {
  h_14(state, unused, out_3074700386960502334);
}
void live_H_14(double *state, double *unused, double *out_1608639406003100536) {
  H_14(state, unused, out_1608639406003100536);
}
void live_h_33(double *state, double *unused, double *out_4252459005722954991) {
  h_33(state, unused, out_4252459005722954991);
}
void live_H_33(double *state, double *unused, double *out_9065747392363141927) {
  H_33(state, unused, out_9065747392363141927);
}
void live_predict(double *in_x, double *in_P, double *in_Q, double dt) {
  predict(in_x, in_P, in_Q, dt);
}
}

const EKF live = {
  .name = "live",
  .kinds = { 4, 9, 10, 12, 35, 32, 13, 14, 33 },
  .feature_kinds = {  },
  .f_fun = live_f_fun,
  .F_fun = live_F_fun,
  .err_fun = live_err_fun,
  .inv_err_fun = live_inv_err_fun,
  .H_mod_fun = live_H_mod_fun,
  .predict = live_predict,
  .hs = {
    { 4, live_h_4 },
    { 9, live_h_9 },
    { 10, live_h_10 },
    { 12, live_h_12 },
    { 35, live_h_35 },
    { 32, live_h_32 },
    { 13, live_h_13 },
    { 14, live_h_14 },
    { 33, live_h_33 },
  },
  .Hs = {
    { 4, live_H_4 },
    { 9, live_H_9 },
    { 10, live_H_10 },
    { 12, live_H_12 },
    { 35, live_H_35 },
    { 32, live_H_32 },
    { 13, live_H_13 },
    { 14, live_H_14 },
    { 33, live_H_33 },
  },
  .updates = {
    { 4, live_update_4 },
    { 9, live_update_9 },
    { 10, live_update_10 },
    { 12, live_update_12 },
    { 35, live_update_35 },
    { 32, live_update_32 },
    { 13, live_update_13 },
    { 14, live_update_14 },
    { 33, live_update_33 },
  },
  .Hes = {
  },
  .sets = {
  },
  .extra_routines = {
    { "H", live_H },
  },
};

ekf_init(live);
#include "live.h"

namespace {
#define DIM 22
#define EDIM 21
#define MEDIM 21
typedef void (*Hfun)(double *, double *, double *);
const static double MAHA_THRESH_4 = 7.814727903251177;
const static double MAHA_THRESH_9 = 7.814727903251177;
const static double MAHA_THRESH_10 = 7.814727903251177;
const static double MAHA_THRESH_12 = 7.814727903251177;
const static double MAHA_THRESH_35 = 7.814727903251177;
const static double MAHA_THRESH_32 = 9.487729036781154;
const static double MAHA_THRESH_13 = 7.814727903251177;
const static double MAHA_THRESH_14 = 7.814727903251177;
const static double MAHA_THRESH_33 = 7.814727903251177;

/******************************************************************************
 *                      Code generated with SymPy 1.10.1                      *
 *                                                                            *
 *              See http://www.sympy.org/ for more information.               *
 *                                                                            *
 *                         This file is part of 'ekf'                         *
 ******************************************************************************/
void H(double *in_vec, double *out_8674808526469126384) {
   out_8674808526469126384[0] = 0;
   out_8674808526469126384[1] = -sin(in_vec[1])*sin(in_vec[2])*in_vec[4] - sin(in_vec[1])*cos(in_vec[2])*in_vec[3] - cos(in_vec[1])*in_vec[5];
   out_8674808526469126384[2] = -sin(in_vec[2])*cos(in_vec[1])*in_vec[3] + cos(in_vec[1])*cos(in_vec[2])*in_vec[4];
   out_8674808526469126384[3] = cos(in_vec[1])*cos(in_vec[2]);
   out_8674808526469126384[4] = sin(in_vec[2])*cos(in_vec[1]);
   out_8674808526469126384[5] = -sin(in_vec[1]);
   out_8674808526469126384[6] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (-sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*in_vec[5];
   out_8674808526469126384[7] = -sin(in_vec[0])*sin(in_vec[1])*in_vec[5] + sin(in_vec[0])*sin(in_vec[2])*cos(in_vec[1])*in_vec[4] + sin(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3];
   out_8674808526469126384[8] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[3] + (sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]))*in_vec[4];
   out_8674808526469126384[9] = sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) - sin(in_vec[2])*cos(in_vec[0]);
   out_8674808526469126384[10] = sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) + cos(in_vec[0])*cos(in_vec[2]);
   out_8674808526469126384[11] = sin(in_vec[0])*cos(in_vec[1]);
   out_8674808526469126384[12] = (-sin(in_vec[0])*sin(in_vec[1])*sin(in_vec[2]) - cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (-sin(in_vec[0])*sin(in_vec[1])*cos(in_vec[2]) + sin(in_vec[2])*cos(in_vec[0]))*in_vec[3] - sin(in_vec[0])*cos(in_vec[1])*in_vec[5];
   out_8674808526469126384[13] = -sin(in_vec[1])*cos(in_vec[0])*in_vec[5] + sin(in_vec[2])*cos(in_vec[0])*cos(in_vec[1])*in_vec[4] + cos(in_vec[0])*cos(in_vec[1])*cos(in_vec[2])*in_vec[3];
   out_8674808526469126384[14] = (sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]))*in_vec[4] + (sin(in_vec[0])*cos(in_vec[2]) - sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]))*in_vec[3];
   out_8674808526469126384[15] = sin(in_vec[0])*sin(in_vec[2]) + sin(in_vec[1])*cos(in_vec[0])*cos(in_vec[2]);
   out_8674808526469126384[16] = -sin(in_vec[0])*cos(in_vec[2]) + sin(in_vec[1])*sin(in_vec[2])*cos(in_vec[0]);
   out_8674808526469126384[17] = cos(in_vec[0])*cos(in_vec[1]);
}
void err_fun(double *nom_x, double *delta_x, double *out_826382423215298085) {
   out_826382423215298085[0] = delta_x[0] + nom_x[0];
   out_826382423215298085[1] = delta_x[1] + nom_x[1];
   out_826382423215298085[2] = delta_x[2] + nom_x[2];
   out_826382423215298085[3] = -0.5*delta_x[3]*nom_x[4] - 0.5*delta_x[4]*nom_x[5] - 0.5*delta_x[5]*nom_x[6] + 1.0*nom_x[3];
   out_826382423215298085[4] = 0.5*delta_x[3]*nom_x[3] + 0.5*delta_x[4]*nom_x[6] - 0.5*delta_x[5]*nom_x[5] + 1.0*nom_x[4];
   out_826382423215298085[5] = -0.5*delta_x[3]*nom_x[6] + 0.5*delta_x[4]*nom_x[3] + 0.5*delta_x[5]*nom_x[4] + 1.0*nom_x[5];
   out_826382423215298085[6] = 0.5*delta_x[3]*nom_x[5] - 0.5*delta_x[4]*nom_x[4] + 0.5*delta_x[5]*nom_x[3] + 1.0*nom_x[6];
   out_826382423215298085[7] = delta_x[6] + nom_x[7];
   out_826382423215298085[8] = delta_x[7] + nom_x[8];
   out_826382423215298085[9] = delta_x[8] + nom_x[9];
   out_826382423215298085[10] = delta_x[9] + nom_x[10];
   out_826382423215298085[11] = delta_x[10] + nom_x[11];
   out_826382423215298085[12] = delta_x[11] + nom_x[12];
   out_826382423215298085[13] = delta_x[12] + nom_x[13];
   out_826382423215298085[14] = delta_x[13] + nom_x[14];
   out_826382423215298085[15] = delta_x[14] + nom_x[15];
   out_826382423215298085[16] = delta_x[15] + nom_x[16];
   out_826382423215298085[17] = delta_x[16] + nom_x[17];
   out_826382423215298085[18] = delta_x[17] + nom_x[18];
   out_826382423215298085[19] = delta_x[18] + nom_x[19];
   out_826382423215298085[20] = delta_x[19] + nom_x[20];
   out_826382423215298085[21] = delta_x[20] + nom_x[21];
}
void inv_err_fun(double *nom_x, double *true_x, double *out_7532358635846209890) {
   out_7532358635846209890[0] = -nom_x[0] + true_x[0];
   out_7532358635846209890[1] = -nom_x[1] + true_x[1];
   out_7532358635846209890[2] = -nom_x[2] + true_x[2];
   out_7532358635846209890[3] = 2*nom_x[3]*true_x[4] - 2*nom_x[4]*true_x[3] + 2*nom_x[5]*true_x[6] - 2*nom_x[6]*true_x[5];
   out_7532358635846209890[4] = 2*nom_x[3]*true_x[5] - 2*nom_x[4]*true_x[6] - 2*nom_x[5]*true_x[3] + 2*nom_x[6]*true_x[4];
   out_7532358635846209890[5] = 2*nom_x[3]*true_x[6] + 2*nom_x[4]*true_x[5] - 2*nom_x[5]*true_x[4] - 2*nom_x[6]*true_x[3];
   out_7532358635846209890[6] = -nom_x[7] + true_x[7];
   out_7532358635846209890[7] = -nom_x[8] + true_x[8];
   out_7532358635846209890[8] = -nom_x[9] + true_x[9];
   out_7532358635846209890[9] = -nom_x[10] + true_x[10];
   out_7532358635846209890[10] = -nom_x[11] + true_x[11];
   out_7532358635846209890[11] = -nom_x[12] + true_x[12];
   out_7532358635846209890[12] = -nom_x[13] + true_x[13];
   out_7532358635846209890[13] = -nom_x[14] + true_x[14];
   out_7532358635846209890[14] = -nom_x[15] + true_x[15];
   out_7532358635846209890[15] = -nom_x[16] + true_x[16];
   out_7532358635846209890[16] = -nom_x[17] + true_x[17];
   out_7532358635846209890[17] = -nom_x[18] + true_x[18];
   out_7532358635846209890[18] = -nom_x[19] + true_x[19];
   out_7532358635846209890[19] = -nom_x[20] + true_x[20];
   out_7532358635846209890[20] = -nom_x[21] + true_x[21];
}
void H_mod_fun(double *state, double *out_2474155941233457423) {
   out_2474155941233457423[0] = 1.0;
   out_2474155941233457423[1] = 0;
   out_2474155941233457423[2] = 0;
   out_2474155941233457423[3] = 0;
   out_2474155941233457423[4] = 0;
   out_2474155941233457423[5] = 0;
   out_2474155941233457423[6] = 0;
   out_2474155941233457423[7] = 0;
   out_2474155941233457423[8] = 0;
   out_2474155941233457423[9] = 0;
   out_2474155941233457423[10] = 0;
   out_2474155941233457423[11] = 0;
   out_2474155941233457423[12] = 0;
   out_2474155941233457423[13] = 0;
   out_2474155941233457423[14] = 0;
   out_2474155941233457423[15] = 0;
   out_2474155941233457423[16] = 0;
   out_2474155941233457423[17] = 0;
   out_2474155941233457423[18] = 0;
   out_2474155941233457423[19] = 0;
   out_2474155941233457423[20] = 0;
   out_2474155941233457423[21] = 0;
   out_2474155941233457423[22] = 1.0;
   out_2474155941233457423[23] = 0;
   out_2474155941233457423[24] = 0;
   out_2474155941233457423[25] = 0;
   out_2474155941233457423[26] = 0;
   out_2474155941233457423[27] = 0;
   out_2474155941233457423[28] = 0;
   out_2474155941233457423[29] = 0;
   out_2474155941233457423[30] = 0;
   out_2474155941233457423[31] = 0;
   out_2474155941233457423[32] = 0;
   out_2474155941233457423[33] = 0;
   out_2474155941233457423[34] = 0;
   out_2474155941233457423[35] = 0;
   out_2474155941233457423[36] = 0;
   out_2474155941233457423[37] = 0;
   out_2474155941233457423[38] = 0;
   out_2474155941233457423[39] = 0;
   out_2474155941233457423[40] = 0;
   out_2474155941233457423[41] = 0;
   out_2474155941233457423[42] = 0;
   out_2474155941233457423[43] = 0;
   out_2474155941233457423[44] = 1.0;
   out_2474155941233457423[45] = 0;
   out_2474155941233457423[46] = 0;
   out_2474155941233457423[47] = 0;
   out_2474155941233457423[48] = 0;
   out_2474155941233457423[49] = 0;
   out_2474155941233457423[50] = 0;
   out_2474155941233457423[51] = 0;
   out_2474155941233457423[52] = 0;
   out_2474155941233457423[53] = 0;
   out_2474155941233457423[54] = 0;
   out_2474155941233457423[55] = 0;
   out_2474155941233457423[56] = 0;
   out_2474155941233457423[57] = 0;
   out_2474155941233457423[58] = 0;
   out_2474155941233457423[59] = 0;
   out_2474155941233457423[60] = 0;
   out_2474155941233457423[61] = 0;
   out_2474155941233457423[62] = 0;
   out_2474155941233457423[63] = 0;
   out_2474155941233457423[64] = 0;
   out_2474155941233457423[65] = 0;
   out_2474155941233457423[66] = -0.5*state[4];
   out_2474155941233457423[67] = -0.5*state[5];
   out_2474155941233457423[68] = -0.5*state[6];
   out_2474155941233457423[69] = 0;
   out_2474155941233457423[70] = 0;
   out_2474155941233457423[71] = 0;
   out_2474155941233457423[72] = 0;
   out_2474155941233457423[73] = 0;
   out_2474155941233457423[74] = 0;
   out_2474155941233457423[75] = 0;
   out_2474155941233457423[76] = 0;
   out_2474155941233457423[77] = 0;
   out_2474155941233457423[78] = 0;
   out_2474155941233457423[79] = 0;
   out_2474155941233457423[80] = 0;
   out_2474155941233457423[81] = 0;
   out_2474155941233457423[82] = 0;
   out_2474155941233457423[83] = 0;
   out_2474155941233457423[84] = 0;
   out_2474155941233457423[85] = 0;
   out_2474155941233457423[86] = 0;
   out_2474155941233457423[87] = 0.5*state[3];
   out_2474155941233457423[88] = 0.5*state[6];
   out_2474155941233457423[89] = -0.5*state[5];
   out_2474155941233457423[90] = 0;
   out_2474155941233457423[91] = 0;
   out_2474155941233457423[92] = 0;
   out_2474155941233457423[93] = 0;
   out_2474155941233457423[94] = 0;
   out_2474155941233457423[95] = 0;
   out_2474155941233457423[96] = 0;
   out_2474155941233457423[97] = 0;
   out_2474155941233457423[98] = 0;
   out_2474155941233457423[99] = 0;
   out_2474155941233457423[100] = 0;
   out_2474155941233457423[101] = 0;
   out_2474155941233457423[102] = 0;
   out_2474155941233457423[103] = 0;
   out_2474155941233457423[104] = 0;
   out_2474155941233457423[105] = 0;
   out_2474155941233457423[106] = 0;
   out_2474155941233457423[107] = 0;
   out_2474155941233457423[108] = -0.5*state[6];
   out_2474155941233457423[109] = 0.5*state[3];
   out_2474155941233457423[110] = 0.5*state[4];
   out_2474155941233457423[111] = 0;
   out_2474155941233457423[112] = 0;
   out_2474155941233457423[113] = 0;
   out_2474155941233457423[114] = 0;
   out_2474155941233457423[115] = 0;
   out_2474155941233457423[116] = 0;
   out_2474155941233457423[117] = 0;
   out_2474155941233457423[118] = 0;
   out_2474155941233457423[119] = 0;
   out_2474155941233457423[120] = 0;
   out_2474155941233457423[121] = 0;
   out_2474155941233457423[122] = 0;
   out_2474155941233457423[123] = 0;
   out_2474155941233457423[124] = 0;
   out_2474155941233457423[125] = 0;
   out_2474155941233457423[126] = 0;
   out_2474155941233457423[127] = 0;
   out_2474155941233457423[128] = 0;
   out_2474155941233457423[129] = 0.5*state[5];
   out_2474155941233457423[130] = -0.5*state[4];
   out_2474155941233457423[131] = 0.5*state[3];
   out_2474155941233457423[132] = 0;
   out_2474155941233457423[133] = 0;
   out_2474155941233457423[134] = 0;
   out_2474155941233457423[135] = 0;
   out_2474155941233457423[136] = 0;
   out_2474155941233457423[137] = 0;
   out_2474155941233457423[138] = 0;
   out_2474155941233457423[139] = 0;
   out_2474155941233457423[140] = 0;
   out_2474155941233457423[141] = 0;
   out_2474155941233457423[142] = 0;
   out_2474155941233457423[143] = 0;
   out_2474155941233457423[144] = 0;
   out_2474155941233457423[145] = 0;
   out_2474155941233457423[146] = 0;
   out_2474155941233457423[147] = 0;
   out_2474155941233457423[148] = 0;
   out_2474155941233457423[149] = 0;
   out_2474155941233457423[150] = 0;
   out_2474155941233457423[151] = 0;
   out_2474155941233457423[152] = 0;
   out_2474155941233457423[153] = 1.0;
   out_2474155941233457423[154] = 0;
   out_2474155941233457423[155] = 0;
   out_2474155941233457423[156] = 0;
   out_2474155941233457423[157] = 0;
   out_2474155941233457423[158] = 0;
   out_2474155941233457423[159] = 0;
   out_2474155941233457423[160] = 0;
   out_2474155941233457423[161] = 0;
   out_2474155941233457423[162] = 0;
   out_2474155941233457423[163] = 0;
   out_2474155941233457423[164] = 0;
   out_2474155941233457423[165] = 0;
   out_2474155941233457423[166] = 0;
   out_2474155941233457423[167] = 0;
   out_2474155941233457423[168] = 0;
   out_2474155941233457423[169] = 0;
   out_2474155941233457423[170] = 0;
   out_2474155941233457423[171] = 0;
   out_2474155941233457423[172] = 0;
   out_2474155941233457423[173] = 0;
   out_2474155941233457423[174] = 0;
   out_2474155941233457423[175] = 1.0;
   out_2474155941233457423[176] = 0;
   out_2474155941233457423[177] = 0;
   out_2474155941233457423[178] = 0;
   out_2474155941233457423[179] = 0;
   out_2474155941233457423[180] = 0;
   out_2474155941233457423[181] = 0;
   out_2474155941233457423[182] = 0;
   out_2474155941233457423[183] = 0;
   out_2474155941233457423[184] = 0;
   out_2474155941233457423[185] = 0;
   out_2474155941233457423[186] = 0;
   out_2474155941233457423[187] = 0;
   out_2474155941233457423[188] = 0;
   out_2474155941233457423[189] = 0;
   out_2474155941233457423[190] = 0;
   out_2474155941233457423[191] = 0;
   out_2474155941233457423[192] = 0;
   out_2474155941233457423[193] = 0;
   out_2474155941233457423[194] = 0;
   out_2474155941233457423[195] = 0;
   out_2474155941233457423[196] = 0;
   out_2474155941233457423[197] = 1.0;
   out_2474155941233457423[198] = 0;
   out_2474155941233457423[199] = 0;
   out_2474155941233457423[200] = 0;
   out_2474155941233457423[201] = 0;
   out_2474155941233457423[202] = 0;
   out_2474155941233457423[203] = 0;
   out_2474155941233457423[204] = 0;
   out_2474155941233457423[205] = 0;
   out_2474155941233457423[206] = 0;
   out_2474155941233457423[207] = 0;
   out_2474155941233457423[208] = 0;
   out_2474155941233457423[209] = 0;
   out_2474155941233457423[210] = 0;
   out_2474155941233457423[211] = 0;
   out_2474155941233457423[212] = 0;
   out_2474155941233457423[213] = 0;
   out_2474155941233457423[214] = 0;
   out_2474155941233457423[215] = 0;
   out_2474155941233457423[216] = 0;
   out_2474155941233457423[217] = 0;
   out_2474155941233457423[218] = 0;
   out_2474155941233457423[219] = 1.0;
   out_2474155941233457423[220] = 0;
   out_2474155941233457423[221] = 0;
   out_2474155941233457423[222] = 0;
   out_2474155941233457423[223] = 0;
   out_2474155941233457423[224] = 0;
   out_2474155941233457423[225] = 0;
   out_2474155941233457423[226] = 0;
   out_2474155941233457423[227] = 0;
   out_2474155941233457423[228] = 0;
   out_2474155941233457423[229] = 0;
   out_2474155941233457423[230] = 0;
   out_2474155941233457423[231] = 0;
   out_2474155941233457423[232] = 0;
   out_2474155941233457423[233] = 0;
   out_2474155941233457423[234] = 0;
   out_2474155941233457423[235] = 0;
   out_2474155941233457423[236] = 0;
   out_2474155941233457423[237] = 0;
   out_2474155941233457423[238] = 0;
   out_2474155941233457423[239] = 0;
   out_2474155941233457423[240] = 0;
   out_2474155941233457423[241] = 1.0;
   out_2474155941233457423[242] = 0;
   out_2474155941233457423[243] = 0;
   out_2474155941233457423[244] = 0;
   out_2474155941233457423[245] = 0;
   out_2474155941233457423[246] = 0;
   out_2474155941233457423[247] = 0;
   out_2474155941233457423[248] = 0;
   out_2474155941233457423[249] = 0;
   out_2474155941233457423[250] = 0;
   out_2474155941233457423[251] = 0;
   out_2474155941233457423[252] = 0;
   out_2474155941233457423[253] = 0;
   out_2474155941233457423[254] = 0;
   out_2474155941233457423[255] = 0;
   out_2474155941233457423[256] = 0;
   out_2474155941233457423[257] = 0;
   out_2474155941233457423[258] = 0;
   out_2474155941233457423[259] = 0;
   out_2474155941233457423[260] = 0;
   out_2474155941233457423[261] = 0;
   out_2474155941233457423[262] = 0;
   out_2474155941233457423[263] = 1.0;
   out_2474155941233457423[264] = 0;
   out_2474155941233457423[265] = 0;
   out_2474155941233457423[266] = 0;
   out_2474155941233457423[267] = 0;
   out_2474155941233457423[268] = 0;
   out_2474155941233457423[269] = 0;
   out_2474155941233457423[270] = 0;
   out_2474155941233457423[271] = 0;
   out_2474155941233457423[272] = 0;
   out_2474155941233457423[273] = 0;
   out_2474155941233457423[274] = 0;
   out_2474155941233457423[275] = 0;
   out_2474155941233457423[276] = 0;
   out_2474155941233457423[277] = 0;
   out_2474155941233457423[278] = 0;
   out_2474155941233457423[279] = 0;
   out_2474155941233457423[280] = 0;
   out_2474155941233457423[281] = 0;
   out_2474155941233457423[282] = 0;
   out_2474155941233457423[283] = 0;
   out_2474155941233457423[284] = 0;
   out_2474155941233457423[285] = 1.0;
   out_2474155941233457423[286] = 0;
   out_2474155941233457423[287] = 0;
   out_2474155941233457423[288] = 0;
   out_2474155941233457423[289] = 0;
   out_2474155941233457423[290] = 0;
   out_2474155941233457423[291] = 0;
   out_2474155941233457423[292] = 0;
   out_2474155941233457423[293] = 0;
   out_2474155941233457423[294] = 0;
   out_2474155941233457423[295] = 0;
   out_2474155941233457423[296] = 0;
   out_2474155941233457423[297] = 0;
   out_2474155941233457423[298] = 0;
   out_2474155941233457423[299] = 0;
   out_2474155941233457423[300] = 0;
   out_2474155941233457423[301] = 0;
   out_2474155941233457423[302] = 0;
   out_2474155941233457423[303] = 0;
   out_2474155941233457423[304] = 0;
   out_2474155941233457423[305] = 0;
   out_2474155941233457423[306] = 0;
   out_2474155941233457423[307] = 1.0;
   out_2474155941233457423[308] = 0;
   out_2474155941233457423[309] = 0;
   out_2474155941233457423[310] = 0;
   out_2474155941233457423[311] = 0;
   out_2474155941233457423[312] = 0;
   out_2474155941233457423[313] = 0;
   out_2474155941233457423[314] = 0;
   out_2474155941233457423[315] = 0;
   out_2474155941233457423[316] = 0;
   out_2474155941233457423[317] = 0;
   out_2474155941233457423[318] = 0;
   out_2474155941233457423[319] = 0;
   out_2474155941233457423[320] = 0;
   out_2474155941233457423[321] = 0;
   out_2474155941233457423[322] = 0;
   out_2474155941233457423[323] = 0;
   out_2474155941233457423[324] = 0;
   out_2474155941233457423[325] = 0;
   out_2474155941233457423[326] = 0;
   out_2474155941233457423[327] = 0;
   out_2474155941233457423[328] = 0;
   out_2474155941233457423[329] = 1.0;
   out_2474155941233457423[330] = 0;
   out_2474155941233457423[331] = 0;
   out_2474155941233457423[332] = 0;
   out_2474155941233457423[333] = 0;
   out_2474155941233457423[334] = 0;
   out_2474155941233457423[335] = 0;
   out_2474155941233457423[336] = 0;
   out_2474155941233457423[337] = 0;
   out_2474155941233457423[338] = 0;
   out_2474155941233457423[339] = 0;
   out_2474155941233457423[340] = 0;
   out_2474155941233457423[341] = 0;
   out_2474155941233457423[342] = 0;
   out_2474155941233457423[343] = 0;
   out_2474155941233457423[344] = 0;
   out_2474155941233457423[345] = 0;
   out_2474155941233457423[346] = 0;
   out_2474155941233457423[347] = 0;
   out_2474155941233457423[348] = 0;
   out_2474155941233457423[349] = 0;
   out_2474155941233457423[350] = 0;
   out_2474155941233457423[351] = 1.0;
   out_2474155941233457423[352] = 0;
   out_2474155941233457423[353] = 0;
   out_2474155941233457423[354] = 0;
   out_2474155941233457423[355] = 0;
   out_2474155941233457423[356] = 0;
   out_2474155941233457423[357] = 0;
   out_2474155941233457423[358] = 0;
   out_2474155941233457423[359] = 0;
   out_2474155941233457423[360] = 0;
   out_2474155941233457423[361] = 0;
   out_2474155941233457423[362] = 0;
   out_2474155941233457423[363] = 0;
   out_2474155941233457423[364] = 0;
   out_2474155941233457423[365] = 0;
   out_2474155941233457423[366] = 0;
   out_2474155941233457423[367] = 0;
   out_2474155941233457423[368] = 0;
   out_2474155941233457423[369] = 0;
   out_2474155941233457423[370] = 0;
   out_2474155941233457423[371] = 0;
   out_2474155941233457423[372] = 0;
   out_2474155941233457423[373] = 1.0;
   out_2474155941233457423[374] = 0;
   out_2474155941233457423[375] = 0;
   out_2474155941233457423[376] = 0;
   out_2474155941233457423[377] = 0;
   out_2474155941233457423[378] = 0;
   out_2474155941233457423[379] = 0;
   out_2474155941233457423[380] = 0;
   out_2474155941233457423[381] = 0;
   out_2474155941233457423[382] = 0;
   out_2474155941233457423[383] = 0;
   out_2474155941233457423[384] = 0;
   out_2474155941233457423[385] = 0;
   out_2474155941233457423[386] = 0;
   out_2474155941233457423[387] = 0;
   out_2474155941233457423[388] = 0;
   out_2474155941233457423[389] = 0;
   out_2474155941233457423[390] = 0;
   out_2474155941233457423[391] = 0;
   out_2474155941233457423[392] = 0;
   out_2474155941233457423[393] = 0;
   out_2474155941233457423[394] = 0;
   out_2474155941233457423[395] = 1.0;
   out_2474155941233457423[396] = 0;
   out_2474155941233457423[397] = 0;
   out_2474155941233457423[398] = 0;
   out_2474155941233457423[399] = 0;
   out_2474155941233457423[400] = 0;
   out_2474155941233457423[401] = 0;
   out_2474155941233457423[402] = 0;
   out_2474155941233457423[403] = 0;
   out_2474155941233457423[404] = 0;
   out_2474155941233457423[405] = 0;
   out_2474155941233457423[406] = 0;
   out_2474155941233457423[407] = 0;
   out_2474155941233457423[408] = 0;
   out_2474155941233457423[409] = 0;
   out_2474155941233457423[410] = 0;
   out_2474155941233457423[411] = 0;
   out_2474155941233457423[412] = 0;
   out_2474155941233457423[413] = 0;
   out_2474155941233457423[414] = 0;
   out_2474155941233457423[415] = 0;
   out_2474155941233457423[416] = 0;
   out_2474155941233457423[417] = 1.0;
   out_2474155941233457423[418] = 0;
   out_2474155941233457423[419] = 0;
   out_2474155941233457423[420] = 0;
   out_2474155941233457423[421] = 0;
   out_2474155941233457423[422] = 0;
   out_2474155941233457423[423] = 0;
   out_2474155941233457423[424] = 0;
   out_2474155941233457423[425] = 0;
   out_2474155941233457423[426] = 0;
   out_2474155941233457423[427] = 0;
   out_2474155941233457423[428] = 0;
   out_2474155941233457423[429] = 0;
   out_2474155941233457423[430] = 0;
   out_2474155941233457423[431] = 0;
   out_2474155941233457423[432] = 0;
   out_2474155941233457423[433] = 0;
   out_2474155941233457423[434] = 0;
   out_2474155941233457423[435] = 0;
   out_2474155941233457423[436] = 0;
   out_2474155941233457423[437] = 0;
   out_2474155941233457423[438] = 0;
   out_2474155941233457423[439] = 1.0;
   out_2474155941233457423[440] = 0;
   out_2474155941233457423[441] = 0;
   out_2474155941233457423[442] = 0;
   out_2474155941233457423[443] = 0;
   out_2474155941233457423[444] = 0;
   out_2474155941233457423[445] = 0;
   out_2474155941233457423[446] = 0;
   out_2474155941233457423[447] = 0;
   out_2474155941233457423[448] = 0;
   out_2474155941233457423[449] = 0;
   out_2474155941233457423[450] = 0;
   out_2474155941233457423[451] = 0;
   out_2474155941233457423[452] = 0;
   out_2474155941233457423[453] = 0;
   out_2474155941233457423[454] = 0;
   out_2474155941233457423[455] = 0;
   out_2474155941233457423[456] = 0;
   out_2474155941233457423[457] = 0;
   out_2474155941233457423[458] = 0;
   out_2474155941233457423[459] = 0;
   out_2474155941233457423[460] = 0;
   out_2474155941233457423[461] = 1.0;
}
void f_fun(double *state, double dt, double *out_5893392617996069488) {
   out_5893392617996069488[0] = dt*state[7] + state[0];
   out_5893392617996069488[1] = dt*state[8] + state[1];
   out_5893392617996069488[2] = dt*state[9] + state[2];
   out_5893392617996069488[3] = dt*(-0.5*state[4]*state[10] - 0.5*state[5]*state[11] - 0.5*state[6]*state[12]) + state[3];
   out_5893392617996069488[4] = dt*(0.5*state[3]*state[10] + 0.5*state[5]*state[12] - 0.5*state[6]*state[11]) + state[4];
   out_5893392617996069488[5] = dt*(0.5*state[3]*state[11] - 0.5*state[4]*state[12] + 0.5*state[6]*state[10]) + state[5];
   out_5893392617996069488[6] = dt*(0.5*state[3]*state[12] + 0.5*state[4]*state[11] - 0.5*state[5]*state[10]) + state[6];
   out_5893392617996069488[7] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]) + state[7];
   out_5893392617996069488[8] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]) + state[8];
   out_5893392617996069488[9] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]) + state[9];
   out_5893392617996069488[10] = state[10];
   out_5893392617996069488[11] = state[11];
   out_5893392617996069488[12] = state[12];
   out_5893392617996069488[13] = state[13];
   out_5893392617996069488[14] = state[14];
   out_5893392617996069488[15] = state[15];
   out_5893392617996069488[16] = state[16];
   out_5893392617996069488[17] = state[17];
   out_5893392617996069488[18] = state[18];
   out_5893392617996069488[19] = state[19];
   out_5893392617996069488[20] = state[20];
   out_5893392617996069488[21] = state[21];
}
void F_fun(double *state, double dt, double *out_4522217942656145191) {
   out_4522217942656145191[0] = 1;
   out_4522217942656145191[1] = 0;
   out_4522217942656145191[2] = 0;
   out_4522217942656145191[3] = 0;
   out_4522217942656145191[4] = 0;
   out_4522217942656145191[5] = 0;
   out_4522217942656145191[6] = dt;
   out_4522217942656145191[7] = 0;
   out_4522217942656145191[8] = 0;
   out_4522217942656145191[9] = 0;
   out_4522217942656145191[10] = 0;
   out_4522217942656145191[11] = 0;
   out_4522217942656145191[12] = 0;
   out_4522217942656145191[13] = 0;
   out_4522217942656145191[14] = 0;
   out_4522217942656145191[15] = 0;
   out_4522217942656145191[16] = 0;
   out_4522217942656145191[17] = 0;
   out_4522217942656145191[18] = 0;
   out_4522217942656145191[19] = 0;
   out_4522217942656145191[20] = 0;
   out_4522217942656145191[21] = 0;
   out_4522217942656145191[22] = 1;
   out_4522217942656145191[23] = 0;
   out_4522217942656145191[24] = 0;
   out_4522217942656145191[25] = 0;
   out_4522217942656145191[26] = 0;
   out_4522217942656145191[27] = 0;
   out_4522217942656145191[28] = dt;
   out_4522217942656145191[29] = 0;
   out_4522217942656145191[30] = 0;
   out_4522217942656145191[31] = 0;
   out_4522217942656145191[32] = 0;
   out_4522217942656145191[33] = 0;
   out_4522217942656145191[34] = 0;
   out_4522217942656145191[35] = 0;
   out_4522217942656145191[36] = 0;
   out_4522217942656145191[37] = 0;
   out_4522217942656145191[38] = 0;
   out_4522217942656145191[39] = 0;
   out_4522217942656145191[40] = 0;
   out_4522217942656145191[41] = 0;
   out_4522217942656145191[42] = 0;
   out_4522217942656145191[43] = 0;
   out_4522217942656145191[44] = 1;
   out_4522217942656145191[45] = 0;
   out_4522217942656145191[46] = 0;
   out_4522217942656145191[47] = 0;
   out_4522217942656145191[48] = 0;
   out_4522217942656145191[49] = 0;
   out_4522217942656145191[50] = dt;
   out_4522217942656145191[51] = 0;
   out_4522217942656145191[52] = 0;
   out_4522217942656145191[53] = 0;
   out_4522217942656145191[54] = 0;
   out_4522217942656145191[55] = 0;
   out_4522217942656145191[56] = 0;
   out_4522217942656145191[57] = 0;
   out_4522217942656145191[58] = 0;
   out_4522217942656145191[59] = 0;
   out_4522217942656145191[60] = 0;
   out_4522217942656145191[61] = 0;
   out_4522217942656145191[62] = 0;
   out_4522217942656145191[63] = 0;
   out_4522217942656145191[64] = 0;
   out_4522217942656145191[65] = 0;
   out_4522217942656145191[66] = 1;
   out_4522217942656145191[67] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[11] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]);
   out_4522217942656145191[68] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[12] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[10] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[11]);
   out_4522217942656145191[69] = 0;
   out_4522217942656145191[70] = 0;
   out_4522217942656145191[71] = 0;
   out_4522217942656145191[72] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
   out_4522217942656145191[73] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]);
   out_4522217942656145191[74] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]);
   out_4522217942656145191[75] = 0;
   out_4522217942656145191[76] = 0;
   out_4522217942656145191[77] = 0;
   out_4522217942656145191[78] = 0;
   out_4522217942656145191[79] = 0;
   out_4522217942656145191[80] = 0;
   out_4522217942656145191[81] = 0;
   out_4522217942656145191[82] = 0;
   out_4522217942656145191[83] = 0;
   out_4522217942656145191[84] = 0;
   out_4522217942656145191[85] = 0;
   out_4522217942656145191[86] = 0;
   out_4522217942656145191[87] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[11] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[10] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[12]);
   out_4522217942656145191[88] = 1;
   out_4522217942656145191[89] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[12] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[11] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[10]);
   out_4522217942656145191[90] = 0;
   out_4522217942656145191[91] = 0;
   out_4522217942656145191[92] = 0;
   out_4522217942656145191[93] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]);
   out_4522217942656145191[94] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
   out_4522217942656145191[95] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]);
   out_4522217942656145191[96] = 0;
   out_4522217942656145191[97] = 0;
   out_4522217942656145191[98] = 0;
   out_4522217942656145191[99] = 0;
   out_4522217942656145191[100] = 0;
   out_4522217942656145191[101] = 0;
   out_4522217942656145191[102] = 0;
   out_4522217942656145191[103] = 0;
   out_4522217942656145191[104] = 0;
   out_4522217942656145191[105] = 0;
   out_4522217942656145191[106] = 0;
   out_4522217942656145191[107] = 0;
   out_4522217942656145191[108] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[12] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[10] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[11]);
   out_4522217942656145191[109] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[12] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[11] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[10]);
   out_4522217942656145191[110] = 1;
   out_4522217942656145191[111] = 0;
   out_4522217942656145191[112] = 0;
   out_4522217942656145191[113] = 0;
   out_4522217942656145191[114] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]);
   out_4522217942656145191[115] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]);
   out_4522217942656145191[116] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
   out_4522217942656145191[117] = 0;
   out_4522217942656145191[118] = 0;
   out_4522217942656145191[119] = 0;
   out_4522217942656145191[120] = 0;
   out_4522217942656145191[121] = 0;
   out_4522217942656145191[122] = 0;
   out_4522217942656145191[123] = 0;
   out_4522217942656145191[124] = 0;
   out_4522217942656145191[125] = 0;
   out_4522217942656145191[126] = 0;
   out_4522217942656145191[127] = 0;
   out_4522217942656145191[128] = 0;
   out_4522217942656145191[129] = 0;
   out_4522217942656145191[130] = dt*((2*state[3]*state[4] + 2*state[5]*state[6])*state[17] + (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]);
   out_4522217942656145191[131] = dt*((2*state[3]*state[4] - 2*state[5]*state[6])*state[18] + (-2*state[3]*state[6] - 2*state[4]*state[5])*state[16] + (-pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[17]);
   out_4522217942656145191[132] = 1;
   out_4522217942656145191[133] = 0;
   out_4522217942656145191[134] = 0;
   out_4522217942656145191[135] = 0;
   out_4522217942656145191[136] = 0;
   out_4522217942656145191[137] = 0;
   out_4522217942656145191[138] = 0;
   out_4522217942656145191[139] = 0;
   out_4522217942656145191[140] = 0;
   out_4522217942656145191[141] = dt*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
   out_4522217942656145191[142] = dt*(-2*state[3]*state[6] + 2*state[4]*state[5]);
   out_4522217942656145191[143] = dt*(2*state[3]*state[5] + 2*state[4]*state[6]);
   out_4522217942656145191[144] = 0;
   out_4522217942656145191[145] = 0;
   out_4522217942656145191[146] = 0;
   out_4522217942656145191[147] = 0;
   out_4522217942656145191[148] = 0;
   out_4522217942656145191[149] = 0;
   out_4522217942656145191[150] = dt*(-(2*state[3]*state[4] + 2*state[5]*state[6])*state[17] - (-2*state[3]*state[5] + 2*state[4]*state[6])*state[16] - (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[18]);
   out_4522217942656145191[151] = 0;
   out_4522217942656145191[152] = dt*((2*state[3]*state[5] + 2*state[4]*state[6])*state[18] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[17] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[16]);
   out_4522217942656145191[153] = 0;
   out_4522217942656145191[154] = 1;
   out_4522217942656145191[155] = 0;
   out_4522217942656145191[156] = 0;
   out_4522217942656145191[157] = 0;
   out_4522217942656145191[158] = 0;
   out_4522217942656145191[159] = 0;
   out_4522217942656145191[160] = 0;
   out_4522217942656145191[161] = 0;
   out_4522217942656145191[162] = dt*(2*state[3]*state[6] + 2*state[4]*state[5]);
   out_4522217942656145191[163] = dt*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
   out_4522217942656145191[164] = dt*(-2*state[3]*state[4] + 2*state[5]*state[6]);
   out_4522217942656145191[165] = 0;
   out_4522217942656145191[166] = 0;
   out_4522217942656145191[167] = 0;
   out_4522217942656145191[168] = 0;
   out_4522217942656145191[169] = 0;
   out_4522217942656145191[170] = 0;
   out_4522217942656145191[171] = dt*((-2*state[3]*state[4] + 2*state[5]*state[6])*state[18] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[16] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[17]);
   out_4522217942656145191[172] = dt*((-2*state[3]*state[5] - 2*state[4]*state[6])*state[18] + (2*state[3]*state[6] - 2*state[4]*state[5])*state[17] + (-pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) + pow(state[6], 2))*state[16]);
   out_4522217942656145191[173] = 0;
   out_4522217942656145191[174] = 0;
   out_4522217942656145191[175] = 0;
   out_4522217942656145191[176] = 1;
   out_4522217942656145191[177] = 0;
   out_4522217942656145191[178] = 0;
   out_4522217942656145191[179] = 0;
   out_4522217942656145191[180] = 0;
   out_4522217942656145191[181] = 0;
   out_4522217942656145191[182] = 0;
   out_4522217942656145191[183] = dt*(-2*state[3]*state[5] + 2*state[4]*state[6]);
   out_4522217942656145191[184] = dt*(2*state[3]*state[4] + 2*state[5]*state[6]);
   out_4522217942656145191[185] = dt*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
   out_4522217942656145191[186] = 0;
   out_4522217942656145191[187] = 0;
   out_4522217942656145191[188] = 0;
   out_4522217942656145191[189] = 0;
   out_4522217942656145191[190] = 0;
   out_4522217942656145191[191] = 0;
   out_4522217942656145191[192] = 0;
   out_4522217942656145191[193] = 0;
   out_4522217942656145191[194] = 0;
   out_4522217942656145191[195] = 0;
   out_4522217942656145191[196] = 0;
   out_4522217942656145191[197] = 0;
   out_4522217942656145191[198] = 1;
   out_4522217942656145191[199] = 0;
   out_4522217942656145191[200] = 0;
   out_4522217942656145191[201] = 0;
   out_4522217942656145191[202] = 0;
   out_4522217942656145191[203] = 0;
   out_4522217942656145191[204] = 0;
   out_4522217942656145191[205] = 0;
   out_4522217942656145191[206] = 0;
   out_4522217942656145191[207] = 0;
   out_4522217942656145191[208] = 0;
   out_4522217942656145191[209] = 0;
   out_4522217942656145191[210] = 0;
   out_4522217942656145191[211] = 0;
   out_4522217942656145191[212] = 0;
   out_4522217942656145191[213] = 0;
   out_4522217942656145191[214] = 0;
   out_4522217942656145191[215] = 0;
   out_4522217942656145191[216] = 0;
   out_4522217942656145191[217] = 0;
   out_4522217942656145191[218] = 0;
   out_4522217942656145191[219] = 0;
   out_4522217942656145191[220] = 1;
   out_4522217942656145191[221] = 0;
   out_4522217942656145191[222] = 0;
   out_4522217942656145191[223] = 0;
   out_4522217942656145191[224] = 0;
   out_4522217942656145191[225] = 0;
   out_4522217942656145191[226] = 0;
   out_4522217942656145191[227] = 0;
   out_4522217942656145191[228] = 0;
   out_4522217942656145191[229] = 0;
   out_4522217942656145191[230] = 0;
   out_4522217942656145191[231] = 0;
   out_4522217942656145191[232] = 0;
   out_4522217942656145191[233] = 0;
   out_4522217942656145191[234] = 0;
   out_4522217942656145191[235] = 0;
   out_4522217942656145191[236] = 0;
   out_4522217942656145191[237] = 0;
   out_4522217942656145191[238] = 0;
   out_4522217942656145191[239] = 0;
   out_4522217942656145191[240] = 0;
   out_4522217942656145191[241] = 0;
   out_4522217942656145191[242] = 1;
   out_4522217942656145191[243] = 0;
   out_4522217942656145191[244] = 0;
   out_4522217942656145191[245] = 0;
   out_4522217942656145191[246] = 0;
   out_4522217942656145191[247] = 0;
   out_4522217942656145191[248] = 0;
   out_4522217942656145191[249] = 0;
   out_4522217942656145191[250] = 0;
   out_4522217942656145191[251] = 0;
   out_4522217942656145191[252] = 0;
   out_4522217942656145191[253] = 0;
   out_4522217942656145191[254] = 0;
   out_4522217942656145191[255] = 0;
   out_4522217942656145191[256] = 0;
   out_4522217942656145191[257] = 0;
   out_4522217942656145191[258] = 0;
   out_4522217942656145191[259] = 0;
   out_4522217942656145191[260] = 0;
   out_4522217942656145191[261] = 0;
   out_4522217942656145191[262] = 0;
   out_4522217942656145191[263] = 0;
   out_4522217942656145191[264] = 1;
   out_4522217942656145191[265] = 0;
   out_4522217942656145191[266] = 0;
   out_4522217942656145191[267] = 0;
   out_4522217942656145191[268] = 0;
   out_4522217942656145191[269] = 0;
   out_4522217942656145191[270] = 0;
   out_4522217942656145191[271] = 0;
   out_4522217942656145191[272] = 0;
   out_4522217942656145191[273] = 0;
   out_4522217942656145191[274] = 0;
   out_4522217942656145191[275] = 0;
   out_4522217942656145191[276] = 0;
   out_4522217942656145191[277] = 0;
   out_4522217942656145191[278] = 0;
   out_4522217942656145191[279] = 0;
   out_4522217942656145191[280] = 0;
   out_4522217942656145191[281] = 0;
   out_4522217942656145191[282] = 0;
   out_4522217942656145191[283] = 0;
   out_4522217942656145191[284] = 0;
   out_4522217942656145191[285] = 0;
   out_4522217942656145191[286] = 1;
   out_4522217942656145191[287] = 0;
   out_4522217942656145191[288] = 0;
   out_4522217942656145191[289] = 0;
   out_4522217942656145191[290] = 0;
   out_4522217942656145191[291] = 0;
   out_4522217942656145191[292] = 0;
   out_4522217942656145191[293] = 0;
   out_4522217942656145191[294] = 0;
   out_4522217942656145191[295] = 0;
   out_4522217942656145191[296] = 0;
   out_4522217942656145191[297] = 0;
   out_4522217942656145191[298] = 0;
   out_4522217942656145191[299] = 0;
   out_4522217942656145191[300] = 0;
   out_4522217942656145191[301] = 0;
   out_4522217942656145191[302] = 0;
   out_4522217942656145191[303] = 0;
   out_4522217942656145191[304] = 0;
   out_4522217942656145191[305] = 0;
   out_4522217942656145191[306] = 0;
   out_4522217942656145191[307] = 0;
   out_4522217942656145191[308] = 1;
   out_4522217942656145191[309] = 0;
   out_4522217942656145191[310] = 0;
   out_4522217942656145191[311] = 0;
   out_4522217942656145191[312] = 0;
   out_4522217942656145191[313] = 0;
   out_4522217942656145191[314] = 0;
   out_4522217942656145191[315] = 0;
   out_4522217942656145191[316] = 0;
   out_4522217942656145191[317] = 0;
   out_4522217942656145191[318] = 0;
   out_4522217942656145191[319] = 0;
   out_4522217942656145191[320] = 0;
   out_4522217942656145191[321] = 0;
   out_4522217942656145191[322] = 0;
   out_4522217942656145191[323] = 0;
   out_4522217942656145191[324] = 0;
   out_4522217942656145191[325] = 0;
   out_4522217942656145191[326] = 0;
   out_4522217942656145191[327] = 0;
   out_4522217942656145191[328] = 0;
   out_4522217942656145191[329] = 0;
   out_4522217942656145191[330] = 1;
   out_4522217942656145191[331] = 0;
   out_4522217942656145191[332] = 0;
   out_4522217942656145191[333] = 0;
   out_4522217942656145191[334] = 0;
   out_4522217942656145191[335] = 0;
   out_4522217942656145191[336] = 0;
   out_4522217942656145191[337] = 0;
   out_4522217942656145191[338] = 0;
   out_4522217942656145191[339] = 0;
   out_4522217942656145191[340] = 0;
   out_4522217942656145191[341] = 0;
   out_4522217942656145191[342] = 0;
   out_4522217942656145191[343] = 0;
   out_4522217942656145191[344] = 0;
   out_4522217942656145191[345] = 0;
   out_4522217942656145191[346] = 0;
   out_4522217942656145191[347] = 0;
   out_4522217942656145191[348] = 0;
   out_4522217942656145191[349] = 0;
   out_4522217942656145191[350] = 0;
   out_4522217942656145191[351] = 0;
   out_4522217942656145191[352] = 1;
   out_4522217942656145191[353] = 0;
   out_4522217942656145191[354] = 0;
   out_4522217942656145191[355] = 0;
   out_4522217942656145191[356] = 0;
   out_4522217942656145191[357] = 0;
   out_4522217942656145191[358] = 0;
   out_4522217942656145191[359] = 0;
   out_4522217942656145191[360] = 0;
   out_4522217942656145191[361] = 0;
   out_4522217942656145191[362] = 0;
   out_4522217942656145191[363] = 0;
   out_4522217942656145191[364] = 0;
   out_4522217942656145191[365] = 0;
   out_4522217942656145191[366] = 0;
   out_4522217942656145191[367] = 0;
   out_4522217942656145191[368] = 0;
   out_4522217942656145191[369] = 0;
   out_4522217942656145191[370] = 0;
   out_4522217942656145191[371] = 0;
   out_4522217942656145191[372] = 0;
   out_4522217942656145191[373] = 0;
   out_4522217942656145191[374] = 1;
   out_4522217942656145191[375] = 0;
   out_4522217942656145191[376] = 0;
   out_4522217942656145191[377] = 0;
   out_4522217942656145191[378] = 0;
   out_4522217942656145191[379] = 0;
   out_4522217942656145191[380] = 0;
   out_4522217942656145191[381] = 0;
   out_4522217942656145191[382] = 0;
   out_4522217942656145191[383] = 0;
   out_4522217942656145191[384] = 0;
   out_4522217942656145191[385] = 0;
   out_4522217942656145191[386] = 0;
   out_4522217942656145191[387] = 0;
   out_4522217942656145191[388] = 0;
   out_4522217942656145191[389] = 0;
   out_4522217942656145191[390] = 0;
   out_4522217942656145191[391] = 0;
   out_4522217942656145191[392] = 0;
   out_4522217942656145191[393] = 0;
   out_4522217942656145191[394] = 0;
   out_4522217942656145191[395] = 0;
   out_4522217942656145191[396] = 1;
   out_4522217942656145191[397] = 0;
   out_4522217942656145191[398] = 0;
   out_4522217942656145191[399] = 0;
   out_4522217942656145191[400] = 0;
   out_4522217942656145191[401] = 0;
   out_4522217942656145191[402] = 0;
   out_4522217942656145191[403] = 0;
   out_4522217942656145191[404] = 0;
   out_4522217942656145191[405] = 0;
   out_4522217942656145191[406] = 0;
   out_4522217942656145191[407] = 0;
   out_4522217942656145191[408] = 0;
   out_4522217942656145191[409] = 0;
   out_4522217942656145191[410] = 0;
   out_4522217942656145191[411] = 0;
   out_4522217942656145191[412] = 0;
   out_4522217942656145191[413] = 0;
   out_4522217942656145191[414] = 0;
   out_4522217942656145191[415] = 0;
   out_4522217942656145191[416] = 0;
   out_4522217942656145191[417] = 0;
   out_4522217942656145191[418] = 1;
   out_4522217942656145191[419] = 0;
   out_4522217942656145191[420] = 0;
   out_4522217942656145191[421] = 0;
   out_4522217942656145191[422] = 0;
   out_4522217942656145191[423] = 0;
   out_4522217942656145191[424] = 0;
   out_4522217942656145191[425] = 0;
   out_4522217942656145191[426] = 0;
   out_4522217942656145191[427] = 0;
   out_4522217942656145191[428] = 0;
   out_4522217942656145191[429] = 0;
   out_4522217942656145191[430] = 0;
   out_4522217942656145191[431] = 0;
   out_4522217942656145191[432] = 0;
   out_4522217942656145191[433] = 0;
   out_4522217942656145191[434] = 0;
   out_4522217942656145191[435] = 0;
   out_4522217942656145191[436] = 0;
   out_4522217942656145191[437] = 0;
   out_4522217942656145191[438] = 0;
   out_4522217942656145191[439] = 0;
   out_4522217942656145191[440] = 1;
}
void h_4(double *state, double *unused, double *out_4900326243380033195) {
   out_4900326243380033195[0] = state[10] + state[13];
   out_4900326243380033195[1] = state[11] + state[14];
   out_4900326243380033195[2] = state[12] + state[15];
}
void H_4(double *state, double *unused, double *out_1849829052632691181) {
   out_1849829052632691181[0] = 0;
   out_1849829052632691181[1] = 0;
   out_1849829052632691181[2] = 0;
   out_1849829052632691181[3] = 0;
   out_1849829052632691181[4] = 0;
   out_1849829052632691181[5] = 0;
   out_1849829052632691181[6] = 0;
   out_1849829052632691181[7] = 0;
   out_1849829052632691181[8] = 0;
   out_1849829052632691181[9] = 0;
   out_1849829052632691181[10] = 1;
   out_1849829052632691181[11] = 0;
   out_1849829052632691181[12] = 0;
   out_1849829052632691181[13] = 1;
   out_1849829052632691181[14] = 0;
   out_1849829052632691181[15] = 0;
   out_1849829052632691181[16] = 0;
   out_1849829052632691181[17] = 0;
   out_1849829052632691181[18] = 0;
   out_1849829052632691181[19] = 0;
   out_1849829052632691181[20] = 0;
   out_1849829052632691181[21] = 0;
   out_1849829052632691181[22] = 0;
   out_1849829052632691181[23] = 0;
   out_1849829052632691181[24] = 0;
   out_1849829052632691181[25] = 0;
   out_1849829052632691181[26] = 0;
   out_1849829052632691181[27] = 0;
   out_1849829052632691181[28] = 0;
   out_1849829052632691181[29] = 0;
   out_1849829052632691181[30] = 0;
   out_1849829052632691181[31] = 0;
   out_1849829052632691181[32] = 0;
   out_1849829052632691181[33] = 1;
   out_1849829052632691181[34] = 0;
   out_1849829052632691181[35] = 0;
   out_1849829052632691181[36] = 1;
   out_1849829052632691181[37] = 0;
   out_1849829052632691181[38] = 0;
   out_1849829052632691181[39] = 0;
   out_1849829052632691181[40] = 0;
   out_1849829052632691181[41] = 0;
   out_1849829052632691181[42] = 0;
   out_1849829052632691181[43] = 0;
   out_1849829052632691181[44] = 0;
   out_1849829052632691181[45] = 0;
   out_1849829052632691181[46] = 0;
   out_1849829052632691181[47] = 0;
   out_1849829052632691181[48] = 0;
   out_1849829052632691181[49] = 0;
   out_1849829052632691181[50] = 0;
   out_1849829052632691181[51] = 0;
   out_1849829052632691181[52] = 0;
   out_1849829052632691181[53] = 0;
   out_1849829052632691181[54] = 0;
   out_1849829052632691181[55] = 0;
   out_1849829052632691181[56] = 1;
   out_1849829052632691181[57] = 0;
   out_1849829052632691181[58] = 0;
   out_1849829052632691181[59] = 1;
   out_1849829052632691181[60] = 0;
   out_1849829052632691181[61] = 0;
   out_1849829052632691181[62] = 0;
   out_1849829052632691181[63] = 0;
   out_1849829052632691181[64] = 0;
   out_1849829052632691181[65] = 0;
}
void h_9(double *state, double *unused, double *out_3074700386960502334) {
   out_3074700386960502334[0] = state[10];
   out_3074700386960502334[1] = state[11];
   out_3074700386960502334[2] = state[12];
}
void H_9(double *state, double *unused, double *out_1608639406003100536) {
   out_1608639406003100536[0] = 0;
   out_1608639406003100536[1] = 0;
   out_1608639406003100536[2] = 0;
   out_1608639406003100536[3] = 0;
   out_1608639406003100536[4] = 0;
   out_1608639406003100536[5] = 0;
   out_1608639406003100536[6] = 0;
   out_1608639406003100536[7] = 0;
   out_1608639406003100536[8] = 0;
   out_1608639406003100536[9] = 0;
   out_1608639406003100536[10] = 1;
   out_1608639406003100536[11] = 0;
   out_1608639406003100536[12] = 0;
   out_1608639406003100536[13] = 0;
   out_1608639406003100536[14] = 0;
   out_1608639406003100536[15] = 0;
   out_1608639406003100536[16] = 0;
   out_1608639406003100536[17] = 0;
   out_1608639406003100536[18] = 0;
   out_1608639406003100536[19] = 0;
   out_1608639406003100536[20] = 0;
   out_1608639406003100536[21] = 0;
   out_1608639406003100536[22] = 0;
   out_1608639406003100536[23] = 0;
   out_1608639406003100536[24] = 0;
   out_1608639406003100536[25] = 0;
   out_1608639406003100536[26] = 0;
   out_1608639406003100536[27] = 0;
   out_1608639406003100536[28] = 0;
   out_1608639406003100536[29] = 0;
   out_1608639406003100536[30] = 0;
   out_1608639406003100536[31] = 0;
   out_1608639406003100536[32] = 0;
   out_1608639406003100536[33] = 1;
   out_1608639406003100536[34] = 0;
   out_1608639406003100536[35] = 0;
   out_1608639406003100536[36] = 0;
   out_1608639406003100536[37] = 0;
   out_1608639406003100536[38] = 0;
   out_1608639406003100536[39] = 0;
   out_1608639406003100536[40] = 0;
   out_1608639406003100536[41] = 0;
   out_1608639406003100536[42] = 0;
   out_1608639406003100536[43] = 0;
   out_1608639406003100536[44] = 0;
   out_1608639406003100536[45] = 0;
   out_1608639406003100536[46] = 0;
   out_1608639406003100536[47] = 0;
   out_1608639406003100536[48] = 0;
   out_1608639406003100536[49] = 0;
   out_1608639406003100536[50] = 0;
   out_1608639406003100536[51] = 0;
   out_1608639406003100536[52] = 0;
   out_1608639406003100536[53] = 0;
   out_1608639406003100536[54] = 0;
   out_1608639406003100536[55] = 0;
   out_1608639406003100536[56] = 1;
   out_1608639406003100536[57] = 0;
   out_1608639406003100536[58] = 0;
   out_1608639406003100536[59] = 0;
   out_1608639406003100536[60] = 0;
   out_1608639406003100536[61] = 0;
   out_1608639406003100536[62] = 0;
   out_1608639406003100536[63] = 0;
   out_1608639406003100536[64] = 0;
   out_1608639406003100536[65] = 0;
}
void h_10(double *state, double *unused, double *out_294220397151957808) {
   out_294220397151957808[0] = 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0] + state[16] + state[19];
   out_294220397151957808[1] = 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2] + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1] + state[17] + state[20];
   out_294220397151957808[2] = 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1] + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0] + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[2] + state[18] + state[21];
}
void H_10(double *state, double *unused, double *out_7113328125087702607) {
   out_7113328125087702607[0] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*pow(state[0], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2));
   out_7113328125087702607[1] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1];
   out_7113328125087702607[2] = -1195801500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(-2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[0]*state[2];
   out_7113328125087702607[3] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
   out_7113328125087702607[4] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
   out_7113328125087702607[5] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
   out_7113328125087702607[6] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
   out_7113328125087702607[7] = 0;
   out_7113328125087702607[8] = 0;
   out_7113328125087702607[9] = 0;
   out_7113328125087702607[10] = 0;
   out_7113328125087702607[11] = 0;
   out_7113328125087702607[12] = 0;
   out_7113328125087702607[13] = 0;
   out_7113328125087702607[14] = 0;
   out_7113328125087702607[15] = 0;
   out_7113328125087702607[16] = 1;
   out_7113328125087702607[17] = 0;
   out_7113328125087702607[18] = 0;
   out_7113328125087702607[19] = 1;
   out_7113328125087702607[20] = 0;
   out_7113328125087702607[21] = 0;
   out_7113328125087702607[22] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[0]*state[1];
   out_7113328125087702607[23] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*pow(state[1], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2));
   out_7113328125087702607[24] = -1195801500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[2], 2) + 398600500000000.0*(2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(-2*state[3]*state[6] + 2*state[4]*state[5])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[1]*state[2];
   out_7113328125087702607[25] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
   out_7113328125087702607[26] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
   out_7113328125087702607[27] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
   out_7113328125087702607[28] = -797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
   out_7113328125087702607[29] = 0;
   out_7113328125087702607[30] = 0;
   out_7113328125087702607[31] = 0;
   out_7113328125087702607[32] = 0;
   out_7113328125087702607[33] = 0;
   out_7113328125087702607[34] = 0;
   out_7113328125087702607[35] = 0;
   out_7113328125087702607[36] = 0;
   out_7113328125087702607[37] = 0;
   out_7113328125087702607[38] = 0;
   out_7113328125087702607[39] = 1;
   out_7113328125087702607[40] = 0;
   out_7113328125087702607[41] = 0;
   out_7113328125087702607[42] = 1;
   out_7113328125087702607[43] = 0;
   out_7113328125087702607[44] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[0], 2) + 398600500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[0]*state[2];
   out_7113328125087702607[45] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*pow(state[1], 2) + 398600500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5) - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[1] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[1]*state[2];
   out_7113328125087702607[46] = -1195801500000000.0*(-2*state[3]*state[4] + 2*state[5]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[1]*state[2] - 1195801500000000.0*(2*state[3]*state[5] + 2*state[4]*state[6])*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*state[0]*state[2] - 1195801500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -2.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*pow(state[2], 2) + 398600500000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*(pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2));
   out_7113328125087702607[47] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[5] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[3];
   out_7113328125087702607[48] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[3] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[4];
   out_7113328125087702607[49] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[3] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[6] - 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[5];
   out_7113328125087702607[50] = 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[0]*state[4] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[1]*state[5] + 797201000000000.0*pow(pow(state[0], 2) + pow(state[1], 2) + pow(state[2], 2), -1.5)*state[2]*state[6];
   out_7113328125087702607[51] = 0;
   out_7113328125087702607[52] = 0;
   out_7113328125087702607[53] = 0;
   out_7113328125087702607[54] = 0;
   out_7113328125087702607[55] = 0;
   out_7113328125087702607[56] = 0;
   out_7113328125087702607[57] = 0;
   out_7113328125087702607[58] = 0;
   out_7113328125087702607[59] = 0;
   out_7113328125087702607[60] = 0;
   out_7113328125087702607[61] = 0;
   out_7113328125087702607[62] = 1;
   out_7113328125087702607[63] = 0;
   out_7113328125087702607[64] = 0;
   out_7113328125087702607[65] = 1;
}
void h_12(double *state, double *unused, double *out_1340863276117353804) {
   out_1340863276117353804[0] = state[0];
   out_1340863276117353804[1] = state[1];
   out_1340863276117353804[2] = state[2];
}
void H_12(double *state, double *unused, double *out_3169627355399270614) {
   out_3169627355399270614[0] = 1;
   out_3169627355399270614[1] = 0;
   out_3169627355399270614[2] = 0;
   out_3169627355399270614[3] = 0;
   out_3169627355399270614[4] = 0;
   out_3169627355399270614[5] = 0;
   out_3169627355399270614[6] = 0;
   out_3169627355399270614[7] = 0;
   out_3169627355399270614[8] = 0;
   out_3169627355399270614[9] = 0;
   out_3169627355399270614[10] = 0;
   out_3169627355399270614[11] = 0;
   out_3169627355399270614[12] = 0;
   out_3169627355399270614[13] = 0;
   out_3169627355399270614[14] = 0;
   out_3169627355399270614[15] = 0;
   out_3169627355399270614[16] = 0;
   out_3169627355399270614[17] = 0;
   out_3169627355399270614[18] = 0;
   out_3169627355399270614[19] = 0;
   out_3169627355399270614[20] = 0;
   out_3169627355399270614[21] = 0;
   out_3169627355399270614[22] = 0;
   out_3169627355399270614[23] = 1;
   out_3169627355399270614[24] = 0;
   out_3169627355399270614[25] = 0;
   out_3169627355399270614[26] = 0;
   out_3169627355399270614[27] = 0;
   out_3169627355399270614[28] = 0;
   out_3169627355399270614[29] = 0;
   out_3169627355399270614[30] = 0;
   out_3169627355399270614[31] = 0;
   out_3169627355399270614[32] = 0;
   out_3169627355399270614[33] = 0;
   out_3169627355399270614[34] = 0;
   out_3169627355399270614[35] = 0;
   out_3169627355399270614[36] = 0;
   out_3169627355399270614[37] = 0;
   out_3169627355399270614[38] = 0;
   out_3169627355399270614[39] = 0;
   out_3169627355399270614[40] = 0;
   out_3169627355399270614[41] = 0;
   out_3169627355399270614[42] = 0;
   out_3169627355399270614[43] = 0;
   out_3169627355399270614[44] = 0;
   out_3169627355399270614[45] = 0;
   out_3169627355399270614[46] = 1;
   out_3169627355399270614[47] = 0;
   out_3169627355399270614[48] = 0;
   out_3169627355399270614[49] = 0;
   out_3169627355399270614[50] = 0;
   out_3169627355399270614[51] = 0;
   out_3169627355399270614[52] = 0;
   out_3169627355399270614[53] = 0;
   out_3169627355399270614[54] = 0;
   out_3169627355399270614[55] = 0;
   out_3169627355399270614[56] = 0;
   out_3169627355399270614[57] = 0;
   out_3169627355399270614[58] = 0;
   out_3169627355399270614[59] = 0;
   out_3169627355399270614[60] = 0;
   out_3169627355399270614[61] = 0;
   out_3169627355399270614[62] = 0;
   out_3169627355399270614[63] = 0;
   out_3169627355399270614[64] = 0;
   out_3169627355399270614[65] = 0;
}
void h_35(double *state, double *unused, double *out_3634549000190945085) {
   out_3634549000190945085[0] = state[7];
   out_3634549000190945085[1] = state[8];
   out_3634549000190945085[2] = state[9];
}
void H_35(double *state, double *unused, double *out_5915190387724284323) {
   out_5915190387724284323[0] = 0;
   out_5915190387724284323[1] = 0;
   out_5915190387724284323[2] = 0;
   out_5915190387724284323[3] = 0;
   out_5915190387724284323[4] = 0;
   out_5915190387724284323[5] = 0;
   out_5915190387724284323[6] = 0;
   out_5915190387724284323[7] = 1;
   out_5915190387724284323[8] = 0;
   out_5915190387724284323[9] = 0;
   out_5915190387724284323[10] = 0;
   out_5915190387724284323[11] = 0;
   out_5915190387724284323[12] = 0;
   out_5915190387724284323[13] = 0;
   out_5915190387724284323[14] = 0;
   out_5915190387724284323[15] = 0;
   out_5915190387724284323[16] = 0;
   out_5915190387724284323[17] = 0;
   out_5915190387724284323[18] = 0;
   out_5915190387724284323[19] = 0;
   out_5915190387724284323[20] = 0;
   out_5915190387724284323[21] = 0;
   out_5915190387724284323[22] = 0;
   out_5915190387724284323[23] = 0;
   out_5915190387724284323[24] = 0;
   out_5915190387724284323[25] = 0;
   out_5915190387724284323[26] = 0;
   out_5915190387724284323[27] = 0;
   out_5915190387724284323[28] = 0;
   out_5915190387724284323[29] = 0;
   out_5915190387724284323[30] = 1;
   out_5915190387724284323[31] = 0;
   out_5915190387724284323[32] = 0;
   out_5915190387724284323[33] = 0;
   out_5915190387724284323[34] = 0;
   out_5915190387724284323[35] = 0;
   out_5915190387724284323[36] = 0;
   out_5915190387724284323[37] = 0;
   out_5915190387724284323[38] = 0;
   out_5915190387724284323[39] = 0;
   out_5915190387724284323[40] = 0;
   out_5915190387724284323[41] = 0;
   out_5915190387724284323[42] = 0;
   out_5915190387724284323[43] = 0;
   out_5915190387724284323[44] = 0;
   out_5915190387724284323[45] = 0;
   out_5915190387724284323[46] = 0;
   out_5915190387724284323[47] = 0;
   out_5915190387724284323[48] = 0;
   out_5915190387724284323[49] = 0;
   out_5915190387724284323[50] = 0;
   out_5915190387724284323[51] = 0;
   out_5915190387724284323[52] = 0;
   out_5915190387724284323[53] = 1;
   out_5915190387724284323[54] = 0;
   out_5915190387724284323[55] = 0;
   out_5915190387724284323[56] = 0;
   out_5915190387724284323[57] = 0;
   out_5915190387724284323[58] = 0;
   out_5915190387724284323[59] = 0;
   out_5915190387724284323[60] = 0;
   out_5915190387724284323[61] = 0;
   out_5915190387724284323[62] = 0;
   out_5915190387724284323[63] = 0;
   out_5915190387724284323[64] = 0;
   out_5915190387724284323[65] = 0;
}
void h_32(double *state, double *unused, double *out_5880204314189519423) {
   out_5880204314189519423[0] = state[3];
   out_5880204314189519423[1] = state[4];
   out_5880204314189519423[2] = state[5];
   out_5880204314189519423[3] = state[6];
}
void H_32(double *state, double *unused, double *out_5602568692836839295) {
   out_5602568692836839295[0] = 0;
   out_5602568692836839295[1] = 0;
   out_5602568692836839295[2] = 0;
   out_5602568692836839295[3] = 1;
   out_5602568692836839295[4] = 0;
   out_5602568692836839295[5] = 0;
   out_5602568692836839295[6] = 0;
   out_5602568692836839295[7] = 0;
   out_5602568692836839295[8] = 0;
   out_5602568692836839295[9] = 0;
   out_5602568692836839295[10] = 0;
   out_5602568692836839295[11] = 0;
   out_5602568692836839295[12] = 0;
   out_5602568692836839295[13] = 0;
   out_5602568692836839295[14] = 0;
   out_5602568692836839295[15] = 0;
   out_5602568692836839295[16] = 0;
   out_5602568692836839295[17] = 0;
   out_5602568692836839295[18] = 0;
   out_5602568692836839295[19] = 0;
   out_5602568692836839295[20] = 0;
   out_5602568692836839295[21] = 0;
   out_5602568692836839295[22] = 0;
   out_5602568692836839295[23] = 0;
   out_5602568692836839295[24] = 0;
   out_5602568692836839295[25] = 0;
   out_5602568692836839295[26] = 1;
   out_5602568692836839295[27] = 0;
   out_5602568692836839295[28] = 0;
   out_5602568692836839295[29] = 0;
   out_5602568692836839295[30] = 0;
   out_5602568692836839295[31] = 0;
   out_5602568692836839295[32] = 0;
   out_5602568692836839295[33] = 0;
   out_5602568692836839295[34] = 0;
   out_5602568692836839295[35] = 0;
   out_5602568692836839295[36] = 0;
   out_5602568692836839295[37] = 0;
   out_5602568692836839295[38] = 0;
   out_5602568692836839295[39] = 0;
   out_5602568692836839295[40] = 0;
   out_5602568692836839295[41] = 0;
   out_5602568692836839295[42] = 0;
   out_5602568692836839295[43] = 0;
   out_5602568692836839295[44] = 0;
   out_5602568692836839295[45] = 0;
   out_5602568692836839295[46] = 0;
   out_5602568692836839295[47] = 0;
   out_5602568692836839295[48] = 0;
   out_5602568692836839295[49] = 1;
   out_5602568692836839295[50] = 0;
   out_5602568692836839295[51] = 0;
   out_5602568692836839295[52] = 0;
   out_5602568692836839295[53] = 0;
   out_5602568692836839295[54] = 0;
   out_5602568692836839295[55] = 0;
   out_5602568692836839295[56] = 0;
   out_5602568692836839295[57] = 0;
   out_5602568692836839295[58] = 0;
   out_5602568692836839295[59] = 0;
   out_5602568692836839295[60] = 0;
   out_5602568692836839295[61] = 0;
   out_5602568692836839295[62] = 0;
   out_5602568692836839295[63] = 0;
   out_5602568692836839295[64] = 0;
   out_5602568692836839295[65] = 0;
   out_5602568692836839295[66] = 0;
   out_5602568692836839295[67] = 0;
   out_5602568692836839295[68] = 0;
   out_5602568692836839295[69] = 0;
   out_5602568692836839295[70] = 0;
   out_5602568692836839295[71] = 0;
   out_5602568692836839295[72] = 1;
   out_5602568692836839295[73] = 0;
   out_5602568692836839295[74] = 0;
   out_5602568692836839295[75] = 0;
   out_5602568692836839295[76] = 0;
   out_5602568692836839295[77] = 0;
   out_5602568692836839295[78] = 0;
   out_5602568692836839295[79] = 0;
   out_5602568692836839295[80] = 0;
   out_5602568692836839295[81] = 0;
   out_5602568692836839295[82] = 0;
   out_5602568692836839295[83] = 0;
   out_5602568692836839295[84] = 0;
   out_5602568692836839295[85] = 0;
   out_5602568692836839295[86] = 0;
   out_5602568692836839295[87] = 0;
}
void h_13(double *state, double *unused, double *out_5340999065095199952) {
   out_5340999065095199952[0] = (-2*state[3]*state[5] + 2*state[4]*state[6])*state[9] + (2*state[3]*state[6] + 2*state[4]*state[5])*state[8] + (pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2))*state[7];
   out_5340999065095199952[1] = (2*state[3]*state[4] + 2*state[5]*state[6])*state[9] + (-2*state[3]*state[6] + 2*state[4]*state[5])*state[7] + (pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2))*state[8];
   out_5340999065095199952[2] = (-2*state[3]*state[4] + 2*state[5]*state[6])*state[8] + (2*state[3]*state[5] + 2*state[4]*state[6])*state[7] + (pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2))*state[9];
}
void H_13(double *state, double *unused, double *out_6684707275772634272) {
   out_6684707275772634272[0] = 0;
   out_6684707275772634272[1] = 0;
   out_6684707275772634272[2] = 0;
   out_6684707275772634272[3] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8];
   out_6684707275772634272[4] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
   out_6684707275772634272[5] = -2*state[3]*state[9] + 2*state[4]*state[8] - 2*state[5]*state[7];
   out_6684707275772634272[6] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7];
   out_6684707275772634272[7] = pow(state[3], 2) + pow(state[4], 2) - pow(state[5], 2) - pow(state[6], 2);
   out_6684707275772634272[8] = 2*state[3]*state[6] + 2*state[4]*state[5];
   out_6684707275772634272[9] = -2*state[3]*state[5] + 2*state[4]*state[6];
   out_6684707275772634272[10] = 0;
   out_6684707275772634272[11] = 0;
   out_6684707275772634272[12] = 0;
   out_6684707275772634272[13] = 0;
   out_6684707275772634272[14] = 0;
   out_6684707275772634272[15] = 0;
   out_6684707275772634272[16] = 0;
   out_6684707275772634272[17] = 0;
   out_6684707275772634272[18] = 0;
   out_6684707275772634272[19] = 0;
   out_6684707275772634272[20] = 0;
   out_6684707275772634272[21] = 0;
   out_6684707275772634272[22] = 0;
   out_6684707275772634272[23] = 0;
   out_6684707275772634272[24] = 0;
   out_6684707275772634272[25] = 2*state[3]*state[8] + 2*state[4]*state[9] - 2*state[6]*state[7];
   out_6684707275772634272[26] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7];
   out_6684707275772634272[27] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
   out_6684707275772634272[28] = -2*state[3]*state[7] + 2*state[5]*state[9] - 2*state[6]*state[8];
   out_6684707275772634272[29] = -2*state[3]*state[6] + 2*state[4]*state[5];
   out_6684707275772634272[30] = pow(state[3], 2) - pow(state[4], 2) + pow(state[5], 2) - pow(state[6], 2);
   out_6684707275772634272[31] = 2*state[3]*state[4] + 2*state[5]*state[6];
   out_6684707275772634272[32] = 0;
   out_6684707275772634272[33] = 0;
   out_6684707275772634272[34] = 0;
   out_6684707275772634272[35] = 0;
   out_6684707275772634272[36] = 0;
   out_6684707275772634272[37] = 0;
   out_6684707275772634272[38] = 0;
   out_6684707275772634272[39] = 0;
   out_6684707275772634272[40] = 0;
   out_6684707275772634272[41] = 0;
   out_6684707275772634272[42] = 0;
   out_6684707275772634272[43] = 0;
   out_6684707275772634272[44] = 0;
   out_6684707275772634272[45] = 0;
   out_6684707275772634272[46] = 0;
   out_6684707275772634272[47] = 2*state[3]*state[9] - 2*state[4]*state[8] + 2*state[5]*state[7];
   out_6684707275772634272[48] = -2*state[3]*state[8] - 2*state[4]*state[9] + 2*state[6]*state[7];
   out_6684707275772634272[49] = 2*state[3]*state[7] - 2*state[5]*state[9] + 2*state[6]*state[8];
   out_6684707275772634272[50] = 2*state[4]*state[7] + 2*state[5]*state[8] + 2*state[6]*state[9];
   out_6684707275772634272[51] = 2*state[3]*state[5] + 2*state[4]*state[6];
   out_6684707275772634272[52] = -2*state[3]*state[4] + 2*state[5]*state[6];
   out_6684707275772634272[53] = pow(state[3], 2) - pow(state[4], 2) - pow(state[5], 2) + pow(state[6], 2);
   out_6684707275772634272[54] = 0;
   out_6684707275772634272[55] = 0;
   out_6684707275772634272[56] = 0;
   out_6684707275772634272[57] = 0;
   out_6684707275772634272[58] = 0;
   out_6684707275772634272[59] = 0;
   out_6684707275772634272[60] = 0;
   out_6684707275772634272[61] = 0;
   out_6684707275772634272[62] = 0;
   out_6684707275772634272[63] = 0;
   out_6684707275772634272[64] = 0;
   out_6684707275772634272[65] = 0;
}
void h_14(double *state, double *unused, double *out_3074700386960502334) {
   out_3074700386960502334[0] = state[10];
   out_3074700386960502334[1] = state[11];
   out_3074700386960502334[2] = state[12];
}
void H_14(double *state, double *unused, double *out_1608639406003100536) {
   out_1608639406003100536[0] = 0;
   out_1608639406003100536[1] = 0;
   out_1608639406003100536[2] = 0;
   out_1608639406003100536[3] = 0;
   out_1608639406003100536[4] = 0;
   out_1608639406003100536[5] = 0;
   out_1608639406003100536[6] = 0;
   out_1608639406003100536[7] = 0;
   out_1608639406003100536[8] = 0;
   out_1608639406003100536[9] = 0;
   out_1608639406003100536[10] = 1;
   out_1608639406003100536[11] = 0;
   out_1608639406003100536[12] = 0;
   out_1608639406003100536[13] = 0;
   out_1608639406003100536[14] = 0;
   out_1608639406003100536[15] = 0;
   out_1608639406003100536[16] = 0;
   out_1608639406003100536[17] = 0;
   out_1608639406003100536[18] = 0;
   out_1608639406003100536[19] = 0;
   out_1608639406003100536[20] = 0;
   out_1608639406003100536[21] = 0;
   out_1608639406003100536[22] = 0;
   out_1608639406003100536[23] = 0;
   out_1608639406003100536[24] = 0;
   out_1608639406003100536[25] = 0;
   out_1608639406003100536[26] = 0;
   out_1608639406003100536[27] = 0;
   out_1608639406003100536[28] = 0;
   out_1608639406003100536[29] = 0;
   out_1608639406003100536[30] = 0;
   out_1608639406003100536[31] = 0;
   out_1608639406003100536[32] = 0;
   out_1608639406003100536[33] = 1;
   out_1608639406003100536[34] = 0;
   out_1608639406003100536[35] = 0;
   out_1608639406003100536[36] = 0;
   out_1608639406003100536[37] = 0;
   out_1608639406003100536[38] = 0;
   out_1608639406003100536[39] = 0;
   out_1608639406003100536[40] = 0;
   out_1608639406003100536[41] = 0;
   out_1608639406003100536[42] = 0;
   out_1608639406003100536[43] = 0;
   out_1608639406003100536[44] = 0;
   out_1608639406003100536[45] = 0;
   out_1608639406003100536[46] = 0;
   out_1608639406003100536[47] = 0;
   out_1608639406003100536[48] = 0;
   out_1608639406003100536[49] = 0;
   out_1608639406003100536[50] = 0;
   out_1608639406003100536[51] = 0;
   out_1608639406003100536[52] = 0;
   out_1608639406003100536[53] = 0;
   out_1608639406003100536[54] = 0;
   out_1608639406003100536[55] = 0;
   out_1608639406003100536[56] = 1;
   out_1608639406003100536[57] = 0;
   out_1608639406003100536[58] = 0;
   out_1608639406003100536[59] = 0;
   out_1608639406003100536[60] = 0;
   out_1608639406003100536[61] = 0;
   out_1608639406003100536[62] = 0;
   out_1608639406003100536[63] = 0;
   out_1608639406003100536[64] = 0;
   out_1608639406003100536[65] = 0;
}
void h_33(double *state, double *unused, double *out_4252459005722954991) {
   out_4252459005722954991[0] = state[16];
   out_4252459005722954991[1] = state[17];
   out_4252459005722954991[2] = state[18];
}
void H_33(double *state, double *unused, double *out_9065747392363141927) {
   out_9065747392363141927[0] = 0;
   out_9065747392363141927[1] = 0;
   out_9065747392363141927[2] = 0;
   out_9065747392363141927[3] = 0;
   out_9065747392363141927[4] = 0;
   out_9065747392363141927[5] = 0;
   out_9065747392363141927[6] = 0;
   out_9065747392363141927[7] = 0;
   out_9065747392363141927[8] = 0;
   out_9065747392363141927[9] = 0;
   out_9065747392363141927[10] = 0;
   out_9065747392363141927[11] = 0;
   out_9065747392363141927[12] = 0;
   out_9065747392363141927[13] = 0;
   out_9065747392363141927[14] = 0;
   out_9065747392363141927[15] = 0;
   out_9065747392363141927[16] = 1;
   out_9065747392363141927[17] = 0;
   out_9065747392363141927[18] = 0;
   out_9065747392363141927[19] = 0;
   out_9065747392363141927[20] = 0;
   out_9065747392363141927[21] = 0;
   out_9065747392363141927[22] = 0;
   out_9065747392363141927[23] = 0;
   out_9065747392363141927[24] = 0;
   out_9065747392363141927[25] = 0;
   out_9065747392363141927[26] = 0;
   out_9065747392363141927[27] = 0;
   out_9065747392363141927[28] = 0;
   out_9065747392363141927[29] = 0;
   out_9065747392363141927[30] = 0;
   out_9065747392363141927[31] = 0;
   out_9065747392363141927[32] = 0;
   out_9065747392363141927[33] = 0;
   out_9065747392363141927[34] = 0;
   out_9065747392363141927[35] = 0;
   out_9065747392363141927[36] = 0;
   out_9065747392363141927[37] = 0;
   out_9065747392363141927[38] = 0;
   out_9065747392363141927[39] = 1;
   out_9065747392363141927[40] = 0;
   out_9065747392363141927[41] = 0;
   out_9065747392363141927[42] = 0;
   out_9065747392363141927[43] = 0;
   out_9065747392363141927[44] = 0;
   out_9065747392363141927[45] = 0;
   out_9065747392363141927[46] = 0;
   out_9065747392363141927[47] = 0;
   out_9065747392363141927[48] = 0;
   out_9065747392363141927[49] = 0;
   out_9065747392363141927[50] = 0;
   out_9065747392363141927[51] = 0;
   out_9065747392363141927[52] = 0;
   out_9065747392363141927[53] = 0;
   out_9065747392363141927[54] = 0;
   out_9065747392363141927[55] = 0;
   out_9065747392363141927[56] = 0;
   out_9065747392363141927[57] = 0;
   out_9065747392363141927[58] = 0;
   out_9065747392363141927[59] = 0;
   out_9065747392363141927[60] = 0;
   out_9065747392363141927[61] = 0;
   out_9065747392363141927[62] = 1;
   out_9065747392363141927[63] = 0;
   out_9065747392363141927[64] = 0;
   out_9065747392363141927[65] = 0;
}
#include <eigen3/Eigen/Dense>
#include <iostream>

typedef Eigen::Matrix<double, DIM, DIM, Eigen::RowMajor> DDM;
typedef Eigen::Matrix<double, EDIM, EDIM, Eigen::RowMajor> EEM;
typedef Eigen::Matrix<double, DIM, EDIM, Eigen::RowMajor> DEM;

void predict(double *in_x, double *in_P, double *in_Q, double dt) {
  typedef Eigen::Matrix<double, MEDIM, MEDIM, Eigen::RowMajor> RRM;

  double nx[DIM] = {0};
  double in_F[EDIM*EDIM] = {0};

  // functions from sympy
  f_fun(in_x, dt, nx);
  F_fun(in_x, dt, in_F);


  EEM F(in_F);
  EEM P(in_P);
  EEM Q(in_Q);

  RRM F_main = F.topLeftCorner(MEDIM, MEDIM);
  P.topLeftCorner(MEDIM, MEDIM) = (F_main * P.topLeftCorner(MEDIM, MEDIM)) * F_main.transpose();
  P.topRightCorner(MEDIM, EDIM - MEDIM) = F_main * P.topRightCorner(MEDIM, EDIM - MEDIM);
  P.bottomLeftCorner(EDIM - MEDIM, MEDIM) = P.bottomLeftCorner(EDIM - MEDIM, MEDIM) * F_main.transpose();

  P = P + dt*Q;

  // copy out state
  memcpy(in_x, nx, DIM * sizeof(double));
  memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double));
}

// note: extra_args dim only correct when null space projecting
// otherwise 1
template <int ZDIM, int EADIM, bool MAHA_TEST>
void update(double *in_x, double *in_P, Hfun h_fun, Hfun H_fun, Hfun Hea_fun, double *in_z, double *in_R, double *in_ea, double MAHA_THRESHOLD) {
  typedef Eigen::Matrix<double, ZDIM, ZDIM, Eigen::RowMajor> ZZM;
  typedef Eigen::Matrix<double, ZDIM, DIM, Eigen::RowMajor> ZDM;
  typedef Eigen::Matrix<double, Eigen::Dynamic, EDIM, Eigen::RowMajor> XEM;
  //typedef Eigen::Matrix<double, EDIM, ZDIM, Eigen::RowMajor> EZM;
  typedef Eigen::Matrix<double, Eigen::Dynamic, 1> X1M;
  typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> XXM;

  double in_hx[ZDIM] = {0};
  double in_H[ZDIM * DIM] = {0};
  double in_H_mod[EDIM * DIM] = {0};
  double delta_x[EDIM] = {0};
  double x_new[DIM] = {0};


  // state x, P
  Eigen::Matrix<double, ZDIM, 1> z(in_z);
  EEM P(in_P);
  ZZM pre_R(in_R);

  // functions from sympy
  h_fun(in_x, in_ea, in_hx);
  H_fun(in_x, in_ea, in_H);
  ZDM pre_H(in_H);

  // get y (y = z - hx)
  Eigen::Matrix<double, ZDIM, 1> pre_y(in_hx); pre_y = z - pre_y;
  X1M y; XXM H; XXM R;
  if (Hea_fun){
    typedef Eigen::Matrix<double, ZDIM, EADIM, Eigen::RowMajor> ZAM;
    double in_Hea[ZDIM * EADIM] = {0};
    Hea_fun(in_x, in_ea, in_Hea);
    ZAM Hea(in_Hea);
    XXM A = Hea.transpose().fullPivLu().kernel();


    y = A.transpose() * pre_y;
    H = A.transpose() * pre_H;
    R = A.transpose() * pre_R * A;
  } else {
    y = pre_y;
    H = pre_H;
    R = pre_R;
  }
  // get modified H
  H_mod_fun(in_x, in_H_mod);
  DEM H_mod(in_H_mod);
  XEM H_err = H * H_mod;

  // Do mahalobis distance test
  if (MAHA_TEST){
    XXM a = (H_err * P * H_err.transpose() + R).inverse();
    double maha_dist = y.transpose() * a * y;
    if (maha_dist > MAHA_THRESHOLD){
      R = 1.0e16 * R;
    }
  }

  // Outlier resilient weighting
  double weight = 1;//(1.5)/(1 + y.squaredNorm()/R.sum());

  // kalman gains and I_KH
  XXM S = ((H_err * P) * H_err.transpose()) + R/weight;
  XEM KT = S.fullPivLu().solve(H_err * P.transpose());
  //EZM K = KT.transpose(); TODO: WHY DOES THIS NOT COMPILE?
  //EZM K = S.fullPivLu().solve(H_err * P.transpose()).transpose();
  //std::cout << "Here is the matrix rot:\n" << K << std::endl;
  EEM I_KH = Eigen::Matrix<double, EDIM, EDIM>::Identity() - (KT.transpose() * H_err);

  // update state by injecting dx
  Eigen::Matrix<double, EDIM, 1> dx(delta_x);
  dx  = (KT.transpose() * y);
  memcpy(delta_x, dx.data(), EDIM * sizeof(double));
  err_fun(in_x, delta_x, x_new);
  Eigen::Matrix<double, DIM, 1> x(x_new);

  // update cov
  P = ((I_KH * P) * I_KH.transpose()) + ((KT.transpose() * R) * KT);

  // copy out state
  memcpy(in_x, x.data(), DIM * sizeof(double));
  memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double));
  memcpy(in_z, y.data(), y.rows() * sizeof(double));
}




}
extern "C" {

void live_update_4(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_4, H_4, NULL, in_z, in_R, in_ea, MAHA_THRESH_4);
}
void live_update_9(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_9, H_9, NULL, in_z, in_R, in_ea, MAHA_THRESH_9);
}
void live_update_10(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_10, H_10, NULL, in_z, in_R, in_ea, MAHA_THRESH_10);
}
void live_update_12(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_12, H_12, NULL, in_z, in_R, in_ea, MAHA_THRESH_12);
}
void live_update_35(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_35, H_35, NULL, in_z, in_R, in_ea, MAHA_THRESH_35);
}
void live_update_32(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<4, 3, 0>(in_x, in_P, h_32, H_32, NULL, in_z, in_R, in_ea, MAHA_THRESH_32);
}
void live_update_13(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_13, H_13, NULL, in_z, in_R, in_ea, MAHA_THRESH_13);
}
void live_update_14(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_14, H_14, NULL, in_z, in_R, in_ea, MAHA_THRESH_14);
}
void live_update_33(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) {
  update<3, 3, 0>(in_x, in_P, h_33, H_33, NULL, in_z, in_R, in_ea, MAHA_THRESH_33);
}
void live_H(double *in_vec, double *out_8674808526469126384) {
  H(in_vec, out_8674808526469126384);
}
void live_err_fun(double *nom_x, double *delta_x, double *out_826382423215298085) {
  err_fun(nom_x, delta_x, out_826382423215298085);
}
void live_inv_err_fun(double *nom_x, double *true_x, double *out_7532358635846209890) {
  inv_err_fun(nom_x, true_x, out_7532358635846209890);
}
void live_H_mod_fun(double *state, double *out_2474155941233457423) {
  H_mod_fun(state, out_2474155941233457423);
}
void live_f_fun(double *state, double dt, double *out_5893392617996069488) {
  f_fun(state,  dt, out_5893392617996069488);
}
void live_F_fun(double *state, double dt, double *out_4522217942656145191) {
  F_fun(state,  dt, out_4522217942656145191);
}
void live_h_4(double *state, double *unused, double *out_4900326243380033195) {
  h_4(state, unused, out_4900326243380033195);
}
void live_H_4(double *state, double *unused, double *out_1849829052632691181) {
  H_4(state, unused, out_1849829052632691181);
}
void live_h_9(double *state, double *unused, double *out_3074700386960502334) {
  h_9(state, unused, out_3074700386960502334);
}
void live_H_9(double *state, double *unused, double *out_1608639406003100536) {
  H_9(state, unused, out_1608639406003100536);
}
void live_h_10(double *state, double *unused, double *out_294220397151957808) {
  h_10(state, unused, out_294220397151957808);
}
void live_H_10(double *state, double *unused, double *out_7113328125087702607) {
  H_10(state, unused, out_7113328125087702607);
}
void live_h_12(double *state, double *unused, double *out_1340863276117353804) {
  h_12(state, unused, out_1340863276117353804);
}
void live_H_12(double *state, double *unused, double *out_3169627355399270614) {
  H_12(state, unused, out_3169627355399270614);
}
void live_h_35(double *state, double *unused, double *out_3634549000190945085) {
  h_35(state, unused, out_3634549000190945085);
}
void live_H_35(double *state, double *unused, double *out_5915190387724284323) {
  H_35(state, unused, out_5915190387724284323);
}
void live_h_32(double *state, double *unused, double *out_5880204314189519423) {
  h_32(state, unused, out_5880204314189519423);
}
void live_H_32(double *state, double *unused, double *out_5602568692836839295) {
  H_32(state, unused, out_5602568692836839295);
}
void live_h_13(double *state, double *unused, double *out_5340999065095199952) {
  h_13(state, unused, out_5340999065095199952);
}
void live_H_13(double *state, double *unused, double *out_6684707275772634272) {
  H_13(state, unused, out_6684707275772634272);
}
void live_h_14(double *state, double *unused, double *out_3074700386960502334) {
  h_14(state, unused, out_3074700386960502334);
}
void live_H_14(double *state, double *unused, double *out_1608639406003100536) {
  H_14(state, unused, out_1608639406003100536);
}
void live_h_33(double *state, double *unused, double *out_4252459005722954991) {
  h_33(state, unused, out_4252459005722954991);
}
void live_H_33(double *state, double *unused, double *out_9065747392363141927) {
  H_33(state, unused, out_9065747392363141927);
}
void live_predict(double *in_x, double *in_P, double *in_Q, double dt) {
  predict(in_x, in_P, in_Q, dt);
}
}

const EKF live = {
  .name = "live",
  .kinds = { 4, 9, 10, 12, 35, 32, 13, 14, 33 },
  .feature_kinds = {  },
  .f_fun = live_f_fun,
  .F_fun = live_F_fun,
  .err_fun = live_err_fun,
  .inv_err_fun = live_inv_err_fun,
  .H_mod_fun = live_H_mod_fun,
  .predict = live_predict,
  .hs = {
    { 4, live_h_4 },
    { 9, live_h_9 },
    { 10, live_h_10 },
    { 12, live_h_12 },
    { 35, live_h_35 },
    { 32, live_h_32 },
    { 13, live_h_13 },
    { 14, live_h_14 },
    { 33, live_h_33 },
  },
  .Hs = {
    { 4, live_H_4 },
    { 9, live_H_9 },
    { 10, live_H_10 },
    { 12, live_H_12 },
    { 35, live_H_35 },
    { 32, live_H_32 },
    { 13, live_H_13 },
    { 14, live_H_14 },
    { 33, live_H_33 },
  },
  .updates = {
    { 4, live_update_4 },
    { 9, live_update_9 },
    { 10, live_update_10 },
    { 12, live_update_12 },
    { 35, live_update_35 },
    { 32, live_update_32 },
    { 13, live_update_13 },
    { 14, live_update_14 },
    { 33, live_update_33 },
  },
  .Hes = {
  },
  .sets = {
  },
  .extra_routines = {
    { "H", live_H },
  },
};

ekf_init(live);
